Commit 7397cfa9 authored by lvtz's avatar lvtz

fix

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