Commit 5fdb4066 authored by lvtz's avatar lvtz

fix

parents f9aaf8b8 aa8d4a03
......@@ -25,7 +25,8 @@
"pages": [
"index",
"list",
"editor"
"editor",
"landpage"
]
},
{
......
......@@ -21,7 +21,6 @@ import {
bOssAccess,
} from '../../../service/common.js';
Page({
// mixins: [require('../../../mixins/myMins/audioCallback')],
data: {
maxLength: 500,
maxImgCount: 9,
......@@ -47,6 +46,10 @@ Page({
{ type: "text", value: "洛子帅, 书法练字训练营创始人,杭州阳关灿烂教育 \r\n 教学主管,专业书法教师,已帮助3000多人写好字。" },
{ type: "img", value: "https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2b/themeeditorlock/shoubiao.png" },
],
audioStorage: {},
has_subject: false,
deletePosting: false,
publishing: false,
},
onLoad: function (options) {
const { id, sid } = options;
......@@ -83,7 +86,23 @@ Page({
}).then((res) => {
const { code, data } = res;
if (code == 200) {
console.log(data, 'data');
let content = [];
try {
content = JSON.parse(data.content);
} catch (e) {
content = [];
}
this.setData({
content,
has_subject: data.has_subject,
params: {
title: data.title,
name: data.name,
mobile: data.mobile,
img: data.img,
cover: data.cover,
},
})
}
})
},
......@@ -151,7 +170,9 @@ Page({
}
})
params.content = JSON.stringify(_content);
wx.showLoading('保存中...');
wx.showLoading({
title: '保存中...'
});
editThemeAd(Object.assign(params, {
id: this.data.id,
school_id: this.data.sid
......@@ -160,6 +181,21 @@ Page({
this.data.publishing = false;
wx.hideLoading();
if (res.code == 200) {
wx.showToast({
title: '保存成功',
icon: 'none',
duration: 1000
})
let pages = getCurrentPages();
let currPage = null; //当前页面
let prevPage = null; //上一个页面
if (pages.length >= 2) {
currPage = pages[pages.length - 1]; //当前页面
prevPage = pages[pages.length - 2]; //上一个页面
}
prevPage.setData({
showRefresh: true,
});
wx.navigateBack({
delta: 1
})
......@@ -239,27 +275,13 @@ Page({
audioStorage[value].innerAudioContext.src = audioorigin(value);
audioStorage[value].innerAudioContext.obeyMuteSwitch = false;
audioStorage[value].innerAudioContext.onWaiting((e)=>{
console.log('等待中');
const { actPalyaudioValue, audioStorage} = this.data;
// if(audioStorage[value].isWaiting){
// return
// }
clearInterval(that.data.voiceInterval);
audioStorage[value].isWaiting = true
that.setData({
audioStorage,
})
// setTimeout((e)=>{
// this.data.audioStorage[value].isWaiting = false;
// this.setData({
// audioStorage: this.data.audioStorage
// })
// },5000)
})
// audioStorage[value].innerAudioContext.onPlay((e) => {
// console.log('dasdad');
// that.voiceIntervalPlay(value);
// })
audioStorage[value].innerAudioContext.onTimeUpdate((e) => {
console.log('sss');
const { actPalyaudioValue, audioStorage} = this.data
......@@ -343,25 +365,15 @@ Page({
console.log(value, '等待1111');
if (audioStorage[value] && !audioStorage[value].play) {
const { actPalyaudioValue, audioStorage} = this.data
// if(audioStorage[value].isWaiting){
// return
// }
audioStorage[value].isWaiting = true
that.setData({
audioStorage,
})
}
// setTimeout((e)=>{
// this.data.audioStorage[value].isWaiting = false;
// this.setData({
// audioStorage: this.data.audioStorage
// })
// },5000)
})
audioStorage[value].innerAudioContext.onTimeUpdate((e) => {
const { actPalyaudioValue, audioStorage} = this.data
if (audioStorage[value].isWaiting) {
console.log('22222222222222222');
clearInterval(that.data.voiceInterval);
that.voiceIntervalPlay(value);
audioStorage[value].isWaiting = false
......@@ -383,7 +395,6 @@ Page({
audioStorage,
})
});
// audioStorage[value].innerAudioContext.seek(slide);
} else {
if (slide >= audioStorage[value].duration) {
audioStorage[value].currentTime = 0;
......@@ -397,19 +408,6 @@ Page({
}
audioStorage[value].isWaiting = false;
}
// if (audioStorage[value] && audioStorage[value].play) { // 如果当前是播放状态 则启用定时器 播放按钮状态不需要改
// // audioStorage[value].play = false;
// console.log(slide, '播放slide')
// audioStorage[value].innerAudioContext.seek(slide); // audioStorage[value].currentTime
// // audioStorage[value].innerAudioContext.play();
// // clearInterval(this.data.voiceInterval);
// setTimeout(() => {
// audioStorage[value].innerAudioContext.play();
// }, 500)
// this.voiceIntervalPlay(value);
// } else { // 如果当前不是播放状态 则该干嘛干嘛
// // audioStorage[value].innerAudioContext.play();
// }
this.setData({
audioStorage,
})
......@@ -438,19 +436,6 @@ Page({
})
},
slideend (e) {
// const {value, slide} = e.detail;
// let audioStorage = this.data.audioStorage;
// clearInterval(this.slideTimeOut);
// if (audioStorage[value] && audioStorage[value].play) { // 如果当前是播放状态 则启用定时器 播放按钮状态不需要改
// // audioStorage[value].play = false;
// console.log(audioStorage[value].currentTime, '播放')
// audioStorage[value].innerAudioContext.seek(audioStorage[value].currentTime);
// // audioStorage[value].innerAudioContext.play();
// // clearInterval(this.data.voiceInterval);
// this.voiceIntervalPlay(value);
// } else { // 如果当前不是播放状态 则该干嘛干嘛
// // audioStorage[value].innerAudioContext.play();
// }
},
resetAudiosPlayStatus () { // 点击一个录音的时候把其他的录音状态改成暂停状态
let audioStorage = this.data.audioStorage;
......@@ -614,14 +599,59 @@ Page({
});
},
getThemeAdDetail() {
getThemeAdDetail({
delThemeAd () { // 删除落地页模板
const that = this;
if (this.data.has_subject) {
wx.showModal({
title: '这个营销页已经有主题使用,不能删除',
confirmText: '确定',
showCancel: false,
})
return;
}
wx.showModal({
title: '您确定删除这个主题营销页吗?',
cancelText: '取消',
confirmText: '删除',
success(res) {
if (res.confirm) {
that.sureDelThemeAd();
}
}
})
},
sureDelThemeAd() {
if (this.data.deletePosting) {
return;
}
this.data.deletePosting = true;
wx.showLoading({
title: '删除中...'
})
delThemeAd({
id: this.data.id
}).then((res) => {
const { code, data } = res;
wx.hideLoading();
this.data.deletePosting = false;
if (code == 200) {
console.log(data, 'data');
wx.showToast({
title: '删除成功',
duration: 1000
})
const currentPages = getCurrentPages();
const themeListPage = currentPages.find(ele => ele.route == 'business/pages/themead/list');
const themeListPageIndex = currentPages.findIndex(ele => ele.route == 'business/pages/themead/list');
const delta = currentPages.length - themeListPageIndex - 1;
themeListPage.setData({
showRefresh: true,
})
wx.navigateBack({
delta,
})
}
}).catch(() => {
this.data.deletePosting = false;
})
}
})
\ No newline at end of file
......@@ -74,7 +74,7 @@
<view class="footer-box">
<view class="footer-innerbox">
<view class="btn">删除</view>
<view class="btn" bindtap="delThemeAd">删除</view>
<view class="btn btn-primary" bindtap="saveLock">保存</view>
</view>
</view>
......
This diff is collapsed.
{
"navigationBarTitleText": "",
"usingComponents": {
"sjd-media-show": "../../../components/sjdmediashow"
}
}
\ No newline at end of file
<wxs src="./../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="section">
<view class="banner-box" >
<image class="banner" src="{{filter.imagify(landPageInfo.cover)}}"></image>
</view>
<view class="instro-bx" wx:if="{{landPageInfo.content && landPageInfo.content.length > 0}}">
<view class="title-box">
<view class="title">介绍</view>
</view>
<view class="media-box">
<sjd-media-show
content="{{landPageInfo.content}}"
bind:playvoice="playvoice"
actionsPalyvalue="{{actPalyaudioValue}}"
bind:pausevoice="pausevoice"
bind:voiceslide="voiceslide"
audioStorage="{{audioStorage}}"
bind:slidestart="slidestart"
bind:slideend="slideend"
widthtext="{{false}}"
expanded="{{isexpand}}"
bind:expandaction="expandaction"
text="点击"
bind:playvideo="playvideo"
expandeddefault="{{false}}"
>
</sjd-media-show>
</view>
</view>
</view>
<view class="section contact-box">
<view class="left">
<image class="avatar" src="{{filter.imagify(landPageInfo.img)}}" wx:if="{{landPageInfo.img}}"></image>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_teacher.png?{{imageVersion}}" wx:else></image>
<view class="nickname">{{landPageInfo.name}}</view>
</view>
<view class="right" bindtap="bindModalContact">
<view class="btn-contact">联系老师</view>
</view>
</view>
<view class="modal modal-contact {{modelContactAnimate? 'hide': ''}}" hidden="{{!modalContact}}">
<view class="mask" bindtap="bindModalContact"></view>
<view class="modal-content">
<view class="opt-box">
<button class="opt-item" open-type="contact" show-message-card="true" send-message-title="请求添加微信" send-message-path="/src/pages/themeindex/landpage?id=1" send-message-img="{{imageRoot}}service/works.png?{{imageVersion}}">
<image class="icon-opt" src="{{localImageRoot}}2c/themeindex/icon_wx.png?{{imageVersion}}"></image>
<view class="item-title">添加微信</view>
</button>
<view class="opt-item" bindtap="bindCall" wx:if="{{landPageInfo.mobile}}">
<image class="icon-opt" src="{{localImageRoot}}2c/themeindex/icon_call.png?{{imageVersion}}"></image>
<view class="item-title">拨打电话</view>
</view>
</view>
<image class="icon-cancel" src="{{localImageRoot}}2c/themeindex/icon_close.png?{{imageVersion}}" bindtap="bindModalContact"></image>
</view>
</view>
<view class="bottombtnbox">
<view class="editbtn bottombtn" bindtap="goedit">编辑</view>
<view class="usebtn bottombtn" bindtap="gouse">使用</view>
</view>
</view>
\ No newline at end of file
page {
background: #f6f6f6;
}
.container {
padding-bottom: 150rpx;
}
.section {
background: #fff;
margin-bottom: 16rpx;
}
/* 头部banner+介绍 start */
.banner-box {
width: 100%;
height: 422rpx;
position: relative;
}
.banner-box .banner {
width: 100%;
height: 100%;
}
.banner-box .btn-group {
position: absolute;
top: 20rpx;
right: 20rpx;
display: flex;
align-items: center;
}
.banner-box .btn-group .btn {
width: 120rpx;
height: 52rpx;
background: rgba(0, 0, 0, 0.7);
border-radius: 33px;
opacity: 0.5;
border: 1px solid rgba(255, 255, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
margin-left: 20rpx;
}
.banner-box .shadow-box {
width: 100%;
height: 260rpx;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.4) 100%
);
position: absolute;
left: 0;
bottom: 0;
}
.banner-box .title-box {
width: 100%;
padding: 0 40rpx 36rpx;
position: absolute;
left: 0;
bottom: 0;
}
.banner-box .title-box .title {
font-size: 34rpx;
color: #fff;
line-height: 48rpx;
text-shadow: 0 2rpx 3rpx rgba(40, 40, 40, 0.26);
}
.title-box .time {
font-size: 26rpx;
color: #fff;
line-height: 36rpx;
text-shadow: 0 1px 2rpx rgba(40, 40, 40, 0.26);
}
.instro-bx {
padding: 20rpx 20rpx 20rpx;
}
.instro-bx .title-box {
display: flex;
align-items: center;
}
.instro-bx .title-box .title {
font-size: 30rpx;
color: #222;
line-height: 42rpx;
position: relative;
/* padding-left: 30rpx;
font-weight: bold; */
}
/* .instro-bx .title-box .title::before{
content: '';
width: 6rpx;
height: 16rpx;
background: rgba(255, 209, 70, 0.4);
border-radius: 8rpx;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
} */
.instro-bx .media-box {
margin-top: -12rpx;
}
/* 头部banner+介绍 end*/
/* 联系老师 start */
.contact-box {
padding: 14rpx 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.contact-box .left {
display: flex;
align-items: center;
}
.contact-box .left .avatar {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-right: 16rpx;
}
.contact-box .left .nickname {
font-size: 26rpx;
color: #222;
}
.contact-box .btn-contact {
width: 136rpx;
height: 48rpx;
background: rgba(254, 169, 23, 1);
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
color: #fff;
}
/* 联系老师 end */
/* 已加入的人列表 start */
.clocker-box {
padding: 18rpx 24rpx;
}
.clocker-box .title {
font-size: 26rpx;
color: #222;
line-height: 36rpx;
}
.clocker-box .sub-title {
font-size: 22rpx;
color: #999;
line-height: 32rpx;
padding: 4rpx 0 20rpx;
}
.clocker-box .list {
display: flex;
align-items: center;
}
.clocker-box .list .item {
width: 92rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 30rpx;
}
.clocker-box .list .item:last-of-type {
margin-right: 0;
}
.clocker-box .list .item .avatar {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
}
.clocker-box .list .item .nickname {
font-size: 22rpx;
color: #666;
line-height: 32rpx;
padding: 2rpx 0;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
/* 已加入的人列表 end */
/* 精选打卡列表 start */
.recomend-clockbox {
}
.recomend-clockbox .title {
font-size: 26rpx;
color: #222;
line-height: 36rpx;
padding: 18rpx 24rpx;
}
/* 精选打卡列表 end */
/* 底部按钮 start */
.footer-box {
width: 100%;
position: fixed;
padding-bottom: env(safe-area-inset-bottom);
background: #fff;
left: 0;
bottom: 0;
z-index: 11;
}
.footer-box .footer-innerbox {
width: 100%;
height: auto;
display: flex;
justify-content: space-between;
box-sizing: border-box;
box-shadow: 0 -1px 4rpx 0 rgba(214, 205, 189, 0.5);
}
.footer-box .footer-innerbox .btn {
height: 98rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0;
}
.footer-box .footer-innerbox .btn-inviteinfo {
flex: 1;
background: #fff;
}
.footer-box .footer-innerbox .btn-inviteinfo .avatar {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.footer-box .footer-innerbox .btn-inviteinfo .info {
width: 110rpx;
text-align: left;
}
.footer-box .footer-innerbox .btn-inviteinfo .info .nickname {
font-size: 26rpx;
color: #222;
line-height: 36rpx;
}
.footer-box .footer-innerbox .btn-inviteinfo .info .tip {
font-size: 22rpx;
color: #999;
line-height: 32rpx;
padding-top: 4rpx;
}
.footer-box .footer-innerbox .btn-home {
flex-direction: column;
flex: 1;
background: #fff;
}
.footer-box .footer-innerbox .btn-home .icon-home {
width: 34rpx;
height: 36rpx;
margin-bottom: 6rpx;
}
.footer-box .footer-innerbox .btn-home .tip {
font-size: 18rpx;
color: #999;
line-height: 26rpx;
}
.footer-box .footer-innerbox .btn-clock {
width: 530rpx;
background: #fea917;
font-size: 26rpx;
color: #fff;
}
/* 底部按钮 start */
/* 弹框 start */
.modal {
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 20;
animation: modalshow 0.2s linear;
}
.modal.hide {
animation: modalhide 0.2s linear forwards;
}
.modal .mask {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 20;
}
.modal .modal-content {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
background: #fff;
border-radius: 20rpx 20rpx 0px 0px;
z-index: 21;
animation: modalmoveup 0.2s linear forwards;
}
.modal.hide .modal-content {
animation: modalmovedown 0.2s linear forwards;
}
.modal-contact .opt-box{
display: flex;
justify-content: space-around;
padding-top: 58rpx;
}
.modal-contact .opt-box .opt-item{
display: flex;
flex-direction: column;
align-items: center;
background: #fff;
margin: 0;
padding: 0 20rpx;
}
.modal-contact .opt-box .opt-item .icon-opt{
width: 112rpx;
height: 112rpx;
}
.modal-contact .opt-box .opt-item .item-title{
font-size: 22rpx;
color: #666;
line-height: 32rpx;
padding-top: 8rpx;
}
.modal-contact .icon-cancel {
width: 26rpx;
height: 24rpx;
display: block;
margin: 0 auto;
padding: 38rpx;
}
/* 弹框 end */
.videodialog {
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
left: 0;
top: 0;
z-index: 200;
}
.videodialog video {
width: 100%;
height: 600rpx;
}
.dailog-box {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
position: fixed;
left: 0;
bottom: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}
.dailog-box .content {
width: 494rpx;
height: 730rpx;
position: absolute;
}
.dailog-box .content .close-icon {
width: 50rpx;
height: 50rpx;
position: absolute;
right: -50rpx;
top: -100rpx;
}
.dailog-box .content .adimg {
width: 494rpx;
height: 730rpx;
}
.dailog-box .content .getprzbtn {
display: block;
width: 290rpx;
height: 114rpx;
position: absolute;
bottom: 0rpx;
left: 50%;
margin-left: -140rpx;
}
.dailog-box .content button {
position: absolute;
height: 100rpx;
width: 100%;
left: 0;
bottom: 10rpx;
opacity: 0;
z-index: 5;
}
.dailog-box.planb .content {
width: 566rpx;
height: 881rpx;
}
.dailog-box.planb .adimg {
width: 566rpx;
height: 881rpx;
}
.dailog-box.planb .content .getprzbtn {
width: 330rpx;
height: 124rpx;
transform-origin: 50% 50%;
margin-left: -115rpx;
animation: heartBeat 2s linear infinite forwards;
}
@import "../../../style/radio.wxss";
.clock-list {
margin-top: -12rpx;
}
.clock-list .clock-item {
border-bottom: 8rpx solid rgba(0, 0, 0, 0.05);
}
.clock-list .clock-item:last-of-type {
border-bottom: none;
}
.empty-content-box {
height: 500rpx;
position: relative;
}
.bottombtnbox {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
height: 100rpx;
display: flex;
}
.bottombtnbox .bottombtn{
display: flex;
align-items: center;
justify-content: center;
height: 100rpx;
font-size: 30rpx;
z-index: 5;
box-shadow:0px -2rpx 4rpx 0px rgba(214,205,189,0.5);
}
.bottombtnbox .bottombtn.editbtn {
width: 220rpx;
background-color: #FFFFFF;
color: #666666;
}
.bottombtnbox .bottombtn.usebtn {
width: 530rpx;
background-color: #16B0FD;
color: #fff;
}
\ No newline at end of file
......@@ -30,12 +30,13 @@ Page({
localImageRoot: '../../../images/',
sid: 0,
page: 1,
perPage: 10,
perPage: 100,
hasmore: true,
listLoading: false,
emptyPage: false,
list: [],
total: 0,
showRefresh: false
},
onLoad: function(options) { // Do some initialize when page load.
const { sid } = options;
......@@ -48,6 +49,15 @@ Page({
},
onShow: function() { // Do something when page show.
if (this.data.showRefresh) {
this.setData({
hasmore: true,
listLoading: false,
emptyPage: false,
})
this.getThemeAdList('init');
this.data.showRefresh = false;
}
},
onHide: function() { // Do something when page hide.
},
......@@ -169,17 +179,10 @@ Page({
},
useThemeAd(e) {
const { item } = e.currentTarget.dataset;
console.log(item, 'item');
const currentPages = getCurrentPages();
console.log(currentPages, 'currentPages');
// business/pages/themeeditor/index
const themeeditorPage = currentPages.find(ele => ele.path = 'business/pages/themeeditor/index');
const themeeditorPageIndex = currentPages.findIndex(ele => ele.path = 'business/pages/themeeditor/index');
const themeeditorPage = currentPages.find(ele => ele.route == 'business/pages/themeeditor/index');
const themeeditorPageIndex = currentPages.findIndex(ele => ele.route == 'business/pages/themeeditor/index');
const delta = currentPages.length - themeeditorPageIndex - 1;
console.log(themeeditorPage, 'themeeditorPage');
console.log(themeeditorPageIndex, 'themeeditorPageIndex');
console.log(delta, 'delta');
// if ()
themeeditorPage.setData({
themeAdInfo: {
id: item.id,
......@@ -192,7 +195,13 @@ Page({
},
toEditLandpage () {
wx.navigateTo({
url: `/business/pages/themead/index?sid=${this.data.sid}`
url: `/business/pages/themead/index?id=0&sid=${this.data.sid}`
})
},
viewThemeAd (e) {
const { item } = e.currentTarget.dataset;
wx.navigateTo({
url: `/business/pages/themead/landpage?id=${item.id}&sid=${this.data.sid}`
})
}
})
\ No newline at end of file
......@@ -16,7 +16,7 @@
<view class="status">当前使用</view>
<view class="itembtnbox">
<view class="itembtn" data-item="{{item}}" bindtap="useThemeAd">立即使用</view>
<view class="itembtn">查看模板</view>
<view class="itembtn" data-item="{{item}}" bindtap="viewThemeAd">查看模板</view>
</view>
</view>
</view>
......
......@@ -4,6 +4,7 @@ Page({
data: {
sid: 0,
imageRoot: app.globalData.imageRoot,
localImageRoot: '../../../images/',
imageVersion: app.globalData.imageVersion,
is_cheat: 0,
// is_encrypt: 0,
......@@ -103,17 +104,6 @@ Page({
})
}
},
// encryptswitch() {
// if (Number(this.data.is_encrypt) == 0) {
// this.setData({
// is_encrypt: 1
// })
// } else if (Number(this.data.is_encrypt) == 1) {
// this.setData({
// is_encrypt: 0
// })
// }
// },
readswitch(){
if (Number(this.data.force_status) == 2) {
this.setData({
......
......@@ -2,18 +2,18 @@
<view class="bigtitle">参与打卡方式 (单选)</view>
<view class="section">
<w-cell-group>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px" data-type="1" bindtap="joinruletypeChange">
<view class="form-item ">
<view class="item-l">
<text class="title">任何人都可参与</text>
<text class="title" style="color: #999999">(无通知)</text>
</view>
<view class="item-r">
<w-switch slot="content" value="{{ join_rule_type == 1 }}" color="#65B8F4" size="small" data-type="1" bind:onChange="joinruletypeChange" />
<image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 1 ? 'select1' : 'notselect'}}.png"></image>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px" data-type="2" bindtap="joinruletypeChange">
<view class="form-item ">
<view class="item-l" style="display: block;">
<view>
......@@ -23,29 +23,29 @@
<view wx:if="{{ join_rule_type == 2 }}" style="font-size: 22rpx;color: #999999;"><text wx:for="{{classes}}" wx:for-item="class" wx:key="id">{{class.title}}<text wx:if="{{index < classes.length}}">,</text></text></view>
</view>
<view class="item-r">
<w-switch slot="content" value="{{ join_rule_type == 2 }}" color="#65B8F4" size="small" data-type="2" bind:onChange="joinruletypeChange" />
<image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 2 ? 'select1' : 'notselect'}}.png"></image>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px" data-type="3" bindtap="joinruletypeChange">
<view class="form-item ">
<view class="item-l" style="display: block;">
<view class="title">输入密码都可参与</view>
<view style="font-size: 22rpx;color: #999999;" wx:if="{{ join_rule_type == 3 }}">{{join_secret ? '已设置(密码:' + join_secret + ')' : '未设置'}}<text bindtap="changePsd" style="font-size: 22rpx;color: #16B0FD;margin-left: 20rpx">修改</text></view>
</view>
<view class="item-r">
<w-switch slot="content" value="{{ join_rule_type == 3 }}" color="#65B8F4" size="small" data-type="3" bind:onChange="joinruletypeChange" />
<image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 3 ? 'select1' : 'notselect'}}.png" ></image>
</view>
</view>
</view>
<view class="form-itembox borderbottom1px">
<view class="form-itembox borderbottom1px" data-type="4" bindtap="joinruletypeChange">
<view class="form-item ">
<view class="item-l" style="display: block;">
<view class="title">指定班级学生参与</view>
<view wx:if="{{ join_rule_type == 4 }}" style="font-size: 22rpx;color: #999999;"><text wx:for="{{classes}}" wx:for-item="class" wx:key="id">{{class.title}}<text wx:if="{{index < (classes.length - 1)}}">,</text></text></view>
</view>
<view class="item-r">
<w-switch slot="content" value="{{ join_rule_type == 4 }}" color="#65B8F4" size="small" data-type="4" bind:onChange="joinruletypeChange" />
<image class="selectedicon" src="{{localImageRoot}}2b/common/{{join_rule_type == 4 ? 'select1' : 'notselect'}}.png" ></image>
</view>
</view>
</view>
......
......@@ -21,6 +21,10 @@ page{
/* padding: 10rpx 0; */
margin-bottom: 26rpx;
}
.selectedicon {
width: 38rpx;
height: 38rpx;
}
.usedesc {
color: #999999;
font-size: 22rpx;
......
......@@ -14,7 +14,7 @@ function getThemeAdList (data) { // 获取主题营销页列表
function getThemeAdDetail (data) { // 获取主题营销页详情
return wxRequest({
role: '2b',
url: `apis.business.themeAd.index/${data.id}`,
url: `${apis.business.themeAd.index}/${data.id}`,
data,
method: 'GET',
errorresolve: 1,
......@@ -24,7 +24,7 @@ function editThemeAd (data) { // 新增或修改主题营销模板
const { id } = data;
return wxRequest({
role: '2b',
url: id == 0 ? apis.business.themeAd.index : `apis.business.themeAd.index/${data.id}`,
url: id == 0 ? apis.business.themeAd.index : `${apis.business.themeAd.index}/${data.id}`,
data,
method: id == 0 ? 'POST' : 'PUT',
errorresolve: 1,
......@@ -34,7 +34,7 @@ function delThemeAd (data) { // 新增或修改主题营销模板
const { id } = data;
return wxRequest({
role: '2b',
url: `apis.business.themeAd.index/${data.id}`,
url: `${apis.business.themeAd.index}/${data.id}`,
data,
method: 'DELETE',
errorresolve: 1,
......
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