Commit 7397cfa9 authored by lvtz's avatar lvtz

fix

parent 4b9eaafa
...@@ -129,12 +129,12 @@ Page({ ...@@ -129,12 +129,12 @@ Page({
bindTemplateSelected(e) { bindTemplateSelected(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
wx.navigateTo({ wx.navigateTo({
url: `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&editType=1&tempid=${id}` url: `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&editType=1&tempid=${id}&fromLogin=1`
}) })
}, },
createCustom() { createCustom() {
wx.navigateTo({ wx.navigateTo({
url: `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&editType=1` url: `/business/pages/themeeditor/index?tid=0&sid=${this.data.sid}&editType=1&fromLogin=1`
}) })
} }
}); });
...@@ -321,6 +321,9 @@ Page({ ...@@ -321,6 +321,9 @@ Page({
hadCommentTotal: Number(data.review_count || 0), hadCommentTotal: Number(data.review_count || 0),
noCommentTotal: Number(data.not_review_count || 0), noCommentTotal: Number(data.not_review_count || 0),
}) })
wx.setNavigationBarTitle({
title: data.title
})
} }
}).catch((err) => { }).catch((err) => {
wx.hideLoading() wx.hideLoading()
......
{ {
"navigationBarTitleText": "闯关打卡", "navigationBarTitleText": "卡",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"usingComponents": { "usingComponents": {
"sjd-media-show": "../../../components/sjdmediashow", "sjd-media-show": "../../../components/sjdmediashow",
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<view class="theme-index-container"> <view class="theme-index-container">
<view class="page-topbg"> <view class="page-topbg">
<view class="top-title">{{params.title}}</view> <view class="top-title">{{params.title}}</view>
<view class="top-publish">{{params.subject_creator && params.subject_creator.nickname || ''}} {{filter.formatDateWithChinese(params.created_at)}}发布</view> <view class="top-publish">{{params.unlock_mode && params.unlock_mode.subject_creator && params.unlock_mode.subject_creator.nickname || ''}} {{filter.formatDateWithChinese(params.created_at)}}发布</view>
<view class="top-content" wx:if="{{params.content.length > 0}}"> <view class="top-content" wx:if="{{params.content.length > 0}}">
<view class="top-ask"> <view class="top-ask">
<text style="vertical-align: middle;">今日作业要求:</text> <text style="vertical-align: middle;">关卡内容详情:</text>
<block wx:for='{{params.content}}' wx:key='content'> <block wx:for='{{params.content}}' wx:key='content'>
<text class="text-block" wx:if='{{item.type=="text"}}'>{{item.value}}</text> <text class="text-block" wx:if='{{item.type=="text"}}'>{{item.value}}</text>
<text class="text-type" wx:if='{{item.type=="img"}}'>[图片]</text> <text class="text-type" wx:if='{{item.type=="img"}}'>[图片]</text>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<view class="mask" bindtap="closeDetailModal"></view> <view class="mask" bindtap="closeDetailModal"></view>
<view class="modal-content"> <view class="modal-content">
<view class="modal-title"> <view class="modal-title">
卡内容详情 卡内容详情
<image class="icon-close" src="{{imageRoot}}2b/themeindex/close_icon.png" bindtap="closeDetailModal"></image> <image class="icon-close" src="{{imageRoot}}2b/themeindex/close_icon.png" bindtap="closeDetailModal"></image>
</view> </view>
<view class="modal-detail-wrap" wx:if="{{params.content.length > 0}}"> <view class="modal-detail-wrap" wx:if="{{params.content.length > 0}}">
......
...@@ -526,7 +526,7 @@ Page({ ...@@ -526,7 +526,7 @@ Page({
if (res.code == 200) { // 成功的操作 if (res.code == 200) { // 成功的操作
if (this.data.sid == 0) { // 新增的操作 if (this.data.sid == 0) { // 新增的操作
wx.redirectTo({ wx.redirectTo({
url: `/business/pages/deskcenter/themetemplate?sid=${this.data.sid}` url: `/business/pages/deskcenter/themetemplate?sid=${res.data.id}`
// url: `/business/pages/organizationalmgt/qxknow?sid=${res.data.id}` // url: `/business/pages/organizationalmgt/qxknow?sid=${res.data.id}`
}); });
} else { } else {
......
...@@ -244,6 +244,7 @@ Page({ ...@@ -244,6 +244,7 @@ Page({
// has_subjects_count: 0, // has_subjects_count: 0,
tempid: 0,//作业模板id, tempid: 0,//作业模板id,
fromLogin: 0,//是否来源新注册创建 1是0不是
}, },
onLoad: function(options) { // Do some initialize when page load. onLoad: function(options) { // Do some initialize when page load.
const that = this; const that = this;
...@@ -254,7 +255,8 @@ Page({ ...@@ -254,7 +255,8 @@ Page({
my, my,
classes, classes,
editType, editType,
tempid tempid,
fromLogin
} = options; } = options;
this.setData({ this.setData({
tid, tid,
...@@ -262,7 +264,8 @@ Page({ ...@@ -262,7 +264,8 @@ Page({
sid: sid || '', sid: sid || '',
my: my || 0, my: my || 0,
editType, editType,
tempid: tempid || 0 tempid: tempid || 0,
fromLogin: fromLogin || 0
}); });
if (tid == 0) { if (tid == 0) {
const currentclasses = classes ? JSON.parse(decodeURIComponent(classes)) : []; const currentclasses = classes ? JSON.parse(decodeURIComponent(classes)) : [];
...@@ -891,12 +894,17 @@ Page({ ...@@ -891,12 +894,17 @@ Page({
if (code == 200) { if (code == 200) {
wx.hideLoading(); wx.hideLoading();
if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡 if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡
this.setData({ if(this.data.fromLogin){
confirmId: data.id, wx.reLaunch({
successDailogShow: true url: `/business/pages/deskcenter/index?sid=${this.data.sid}`,
}, () => { })
} else {
this.setData({
confirmId: data.id,
successDailogShow: true
})
this.data.publishing = false; this.data.publishing = false;
}) }
} else { } else {
const pages = getCurrentPages(); const pages = getCurrentPages();
let curPage = null; let curPage = null;
...@@ -1025,12 +1033,18 @@ Page({ ...@@ -1025,12 +1033,18 @@ Page({
wx.hideLoading(); wx.hideLoading();
if (code == 200) { if (code == 200) {
if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡 if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡
this.setData({ if(this.data.fromLogin){
confirmId: data.id, LocalStorage.setItem('dakarole', 1);
successDailogShow: true wx.reLaunch({
}, () => { url: `/business/pages/deskcenter/index?sid=${this.data.sid}`,
this.data.publishing = false; })
}) } else {
this.setData({
confirmId: data.id,
successDailogShow: true
})
}
this.data.publishing = false;
} else { } else {
const pages = getCurrentPages(); const pages = getCurrentPages();
let curPage = null; let curPage = null;
...@@ -2336,12 +2350,17 @@ Page({ ...@@ -2336,12 +2350,17 @@ Page({
const { code, data } = res; const { code, data } = res;
if (res.code == 200) { if (res.code == 200) {
if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡 if (this.data.tid == 0 || this.data.clone == 1) { // 生成新闯关打卡
this.setData({ if(this.data.fromLogin){
confirmId: data.id, wx.reLaunch({
successDailogShow: true url: `/business/pages/deskcenter/index?sid=${this.data.sid}`,
}, () => { })
} else {
this.setData({
confirmId: data.id,
successDailogShow: true
})
this.data.publishing = false; this.data.publishing = false;
}) }
} else { } else {
const pages = getCurrentPages(); const pages = getCurrentPages();
let curPage = null; let curPage = null;
......
...@@ -412,11 +412,11 @@ Page({ ...@@ -412,11 +412,11 @@ Page({
this.setData({ this.setData({
themeSelect: data themeSelect: data
}); });
// if(this.data.themeSelect.is_clock){ if(this.data.themeSelect.is_join){
// wx.redirectTo({ wx.redirectTo({
// url: `/src/pages/calendarthemeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/calendarthemeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
// }) })
// } }
} }
}); });
}, },
......
...@@ -383,12 +383,12 @@ Page({ ...@@ -383,12 +383,12 @@ Page({
themeSelect: data, themeSelect: data,
sid: data.school_id sid: data.school_id
}); });
// 已打卡 直接跳转 // 已加入 直接跳转
// if(this.data.themeSelect.is_clock){ if(this.data.themeSelect.is_join){
// wx.redirectTo({ wx.redirectTo({
// url: `/src/pages/themeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}` url: `/src/pages/themeindex/index?tid=${this.data.themeSelect.id}&sid=${this.data.sid}`
// }) })
// } }
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment