Showing
10 changed files
with
183 additions
and
20 deletions
| @@ -23,7 +23,8 @@ | @@ -23,7 +23,8 @@ | ||
| 23 | "pages/book/smsbatch/index", | 23 | "pages/book/smsbatch/index", |
| 24 | "pages/book/smsbatch/update", | 24 | "pages/book/smsbatch/update", |
| 25 | "pages/book/smsbatch/detail", | 25 | "pages/book/smsbatch/detail", |
| 26 | - "pages/book/smsbatch/list" | 26 | + "pages/book/smsbatch/list", |
| 27 | + "pages/book/smsbatch/result" | ||
| 27 | ], | 28 | ], |
| 28 | "subpackages": [ | 29 | "subpackages": [ |
| 29 | { | 30 | { |
pages/book/smsbatch/result.js
0 → 100644
| 1 | +// pages/book/smsbatch/result.js | ||
| 2 | +Page({ | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * 页面的初始数据 | ||
| 6 | + */ | ||
| 7 | + data: { | ||
| 8 | + | ||
| 9 | + }, | ||
| 10 | + | ||
| 11 | + /** | ||
| 12 | + * 生命周期函数--监听页面加载 | ||
| 13 | + */ | ||
| 14 | + onLoad: function (options) { | ||
| 15 | + | ||
| 16 | + }, | ||
| 17 | + | ||
| 18 | + /** | ||
| 19 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 20 | + */ | ||
| 21 | + onReady: function () { | ||
| 22 | + | ||
| 23 | + }, | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 生命周期函数--监听页面显示 | ||
| 27 | + */ | ||
| 28 | + onShow: function () { | ||
| 29 | + | ||
| 30 | + }, | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 生命周期函数--监听页面隐藏 | ||
| 34 | + */ | ||
| 35 | + onHide: function () { | ||
| 36 | + | ||
| 37 | + }, | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 生命周期函数--监听页面卸载 | ||
| 41 | + */ | ||
| 42 | + onUnload: function () { | ||
| 43 | + | ||
| 44 | + }, | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 48 | + */ | ||
| 49 | + onPullDownRefresh: function () { | ||
| 50 | + | ||
| 51 | + }, | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 页面上拉触底事件的处理函数 | ||
| 55 | + */ | ||
| 56 | + onReachBottom: function () { | ||
| 57 | + | ||
| 58 | + }, | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 用户点击右上角分享 | ||
| 62 | + */ | ||
| 63 | + onShareAppMessage: function () { | ||
| 64 | + | ||
| 65 | + } | ||
| 66 | +}) |
pages/book/smsbatch/result.json
0 → 100644
| 1 | +{} |
pages/book/smsbatch/result.wxml
0 → 100644
pages/book/smsbatch/result.wxss
0 → 100644
| 1 | +/* pages/book/smsbatch/result.wxss */ |
| @@ -18,7 +18,10 @@ Page({ | @@ -18,7 +18,10 @@ Page({ | ||
| 18 | options:{ | 18 | options:{ |
| 19 | hasScene:0, | 19 | hasScene:0, |
| 20 | seller_id:'', | 20 | seller_id:'', |
| 21 | - } | 21 | + }, |
| 22 | + totalChar:0, | ||
| 23 | + totalSms:0, | ||
| 24 | + buttonStatus:false, | ||
| 22 | }, | 25 | }, |
| 23 | reservePhonesMap:[], | 26 | reservePhonesMap:[], |
| 24 | reservePhones:[], | 27 | reservePhones:[], |
| @@ -107,11 +110,24 @@ Page({ | @@ -107,11 +110,24 @@ Page({ | ||
| 107 | let key=util.attr(e,'key'); | 110 | let key=util.attr(e,'key'); |
| 108 | let form=this.data.form; | 111 | let form=this.data.form; |
| 109 | form[key]=util.val(e).trim(); | 112 | form[key]=util.val(e).trim(); |
| 110 | - this.setData({ | 113 | + let obj={ |
| 111 | form:form, | 114 | form:form, |
| 112 | - }) | 115 | + } |
| 116 | + if(key=='send_msg'){ | ||
| 117 | + obj.totalChar=form[key].length; | ||
| 118 | + obj.totalSms=Math.ceil((form[key].length+3)/67); | ||
| 119 | + } | ||
| 120 | + obj.buttonStatus=false; | ||
| 121 | + if(this.data.form.send_msg && this.data.form.name && this.data.form.phone){ | ||
| 122 | + obj.buttonStatus=true | ||
| 123 | + } | ||
| 124 | + this.setData(obj) | ||
| 113 | }, | 125 | }, |
| 114 | submit(e){ | 126 | submit(e){ |
| 127 | + if(!this.data.buttonStatus) return; | ||
| 128 | + if(this.data.form.send_total<1) { | ||
| 129 | + return util.toast('活动人数为空','none'); | ||
| 130 | + } | ||
| 115 | if(!this.data.form.send_msg){ | 131 | if(!this.data.form.send_msg){ |
| 116 | return util.toast('内容必须填写','none'); | 132 | return util.toast('内容必须填写','none'); |
| 117 | } | 133 | } |
| @@ -130,6 +146,11 @@ Page({ | @@ -130,6 +146,11 @@ Page({ | ||
| 130 | if(this.options.hasScene==1){ | 146 | if(this.options.hasScene==1){ |
| 131 | param.note_name=e.detail.nickName | 147 | param.note_name=e.detail.nickName |
| 132 | } | 148 | } |
| 133 | - App.Reserve.SmsBatchUpdate(param); | 149 | + App.Reserve.SmsBatchUpdate(param).then(res=>{ |
| 150 | + this.options.id=res.data.id; | ||
| 151 | + wx.redirect({ | ||
| 152 | + url:util.http_build_query(this.options,'./result'), | ||
| 153 | + }); | ||
| 154 | + }); | ||
| 134 | }, | 155 | }, |
| 135 | }) | 156 | }) |
| 1 | <!--pages/book/smsbatch/update.wxml--> | 1 | <!--pages/book/smsbatch/update.wxml--> |
| 2 | <nav id="nav" hasHome>短信营销</nav> | 2 | <nav id="nav" hasHome>短信营销</nav> |
| 3 | <view class="page"> | 3 | <view class="page"> |
| 4 | - <view>会员({{form.send_total}})人</view> | ||
| 5 | - <textarea bindinput="formValue" data-key="send_msg" placeholder="短信内容"></textarea> | ||
| 6 | - <input placeholder="姓名" bindinput="formValue" data-key="name"/> | ||
| 7 | - <input placeholder="电话" bindinput="formValue" data-key="phone" type="number"/> | 4 | + <textarea class="textarea" bindinput="formValue" |
| 5 | + maxlength="500" | ||
| 6 | + data-key="send_msg" placeholder="请输入要发送的短信内容"></textarea> | ||
| 7 | + <view class="sms-tip"> | ||
| 8 | + <block wx:if="{{totalChar>0}}">{{totalChar}}个字符,合{{totalSms}}条短信</block> | ||
| 9 | + </view> | ||
| 10 | + <view class="hr-one"></view> | ||
| 11 | + <view class="sms-total Medium flex-lr"> | ||
| 12 | + <view>活动人数</view> | ||
| 13 | + <view>{{form.send_total}}人</view> | ||
| 14 | + </view> | ||
| 15 | +</view> | ||
| 16 | +<view class="page Medium linker" style="padding-bottom: 36rpx;"> | ||
| 17 | + <view class="flex-ll linker-title"> | ||
| 18 | + <view>联系方式</view> | ||
| 19 | + <view style="font-size: 26rpx;">(审核结果会以电话/短信方式通知)</view> | ||
| 20 | + </view> | ||
| 21 | + <view class="hr-one"></view> | ||
| 22 | + <input placeholder="请输入姓名" bindinput="formValue" data-key="name"/> | ||
| 23 | + <view class="hr-one"></view> | ||
| 24 | + <input placeholder="请输入电话" bindinput="formValue" data-key="phone" type="number"/> | ||
| 25 | +</view> | ||
| 26 | +<view class="button-opt"> | ||
| 8 | <block wx:if="{{options.hasScene==1}}"> | 27 | <block wx:if="{{options.hasScene==1}}"> |
| 9 | - <userinfo binduserinfo="submit">提交</userinfo> | 28 | + <userinfo binduserinfo="submit"> |
| 29 | + <view class="but">提交审核</view> | ||
| 30 | + </userinfo> | ||
| 10 | </block> | 31 | </block> |
| 11 | <block wx:else=""> | 32 | <block wx:else=""> |
| 12 | - <button bindtap="submit">提交</button> | 33 | + <view class="but {{buttonStatus?'active':''}}" bindtap="submit">提交审核</view> |
| 13 | </block> | 34 | </block> |
| 14 | -</view> | 35 | +</view> |
| 1 | /* pages/book/smsbatch/update.wxss */ | 1 | /* pages/book/smsbatch/update.wxss */ |
| 2 | +page{ | ||
| 3 | + background-color: #F5F5F5; | ||
| 4 | + font-size: 34rpx; | ||
| 5 | + color: #353535; | ||
| 6 | +} | ||
| 2 | .page{ | 7 | .page{ |
| 8 | + width: 88%; | ||
| 9 | + margin: 20rpx auto; | ||
| 10 | + padding: 20rpx 3%; | ||
| 11 | + background-color: #FEFEFE; | ||
| 12 | + border-radius: 8rpx; | ||
| 13 | +} | ||
| 14 | +.hr-one{ | ||
| 15 | + background-color: #F1F0F4; | ||
| 16 | + width: 100%; | ||
| 17 | + height: 2rpx; | ||
| 18 | + margin-top: 16rpx; | ||
| 19 | + margin-bottom: 38rpx; | ||
| 20 | +} | ||
| 21 | +.sms-tip{ | ||
| 22 | + height: 60rpx; | ||
| 23 | + line-height: 60rpx; | ||
| 24 | + font-size: 26rpx; | ||
| 25 | +} | ||
| 26 | +.sms-total{ | ||
| 27 | + height: 48rpx; | ||
| 28 | + line-height: 48rpx; | ||
| 29 | + margin-bottom: 36rpx; | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +.linker-title{ | ||
| 33 | + height: 48rpx; | ||
| 34 | + line-height: 48rpx; | ||
| 35 | + margin-top: 16rpx; | ||
| 36 | +} | ||
| 37 | +.linker .hr-one{ | ||
| 38 | + margin-top: 36rpx; | ||
| 39 | + margin-bottom: 36rpx; | ||
| 40 | +} | ||
| 41 | +.button-opt{ | ||
| 3 | width: 90%; | 42 | width: 90%; |
| 4 | - margin: 0 auto; | ||
| 5 | - color: #353535; | ||
| 6 | - padding-top: 28rpx; | ||
| 7 | - font-size: 30rpx; | ||
| 8 | - color: #353535; | 43 | + margin: 98rpx auto 0; |
| 44 | +} | ||
| 45 | +.button-opt .but{ | ||
| 46 | + text-align: center; | ||
| 47 | + height: 84rpx; | ||
| 48 | + border-radius: 10rpx; | ||
| 49 | + line-height: 84rpx; | ||
| 50 | + background-color: #5AAEB1; | ||
| 51 | + color:#FEFEFE; | ||
| 52 | +} | ||
| 53 | +.button-opt .but.active{ | ||
| 54 | + background-color: #199095; | ||
| 55 | +} | ||
| 56 | +.textarea{ | ||
| 57 | + height: 240rpx; | ||
| 58 | + width: 100%; | ||
| 9 | } | 59 | } |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | "list": [] | 30 | "list": [] |
| 31 | }, | 31 | }, |
| 32 | "miniprogram": { | 32 | "miniprogram": { |
| 33 | - "current": 29, | 33 | + "current": 21, |
| 34 | "list": [ | 34 | "list": [ |
| 35 | { | 35 | { |
| 36 | "id": 0, | 36 | "id": 0, |
| @@ -199,7 +199,7 @@ | @@ -199,7 +199,7 @@ | ||
| 199 | "id": 21, | 199 | "id": 21, |
| 200 | "name": "预定本-80商家", | 200 | "name": "预定本-80商家", |
| 201 | "pathName": "pages/book/b_index", | 201 | "pathName": "pages/book/b_index", |
| 202 | - "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=1859", | 202 | + "query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=762", |
| 203 | "scene": "1001" | 203 | "scene": "1001" |
| 204 | }, | 204 | }, |
| 205 | { | 205 | { |
-
Please register or login to post a comment