|
...
|
...
|
@@ -27,6 +27,7 @@ Page({ |
|
|
|
reservePhones:[],
|
|
|
|
note_name:'',
|
|
|
|
note_phone:'',
|
|
|
|
reduce_num:0,//扣除短信数量
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
...
|
...
|
@@ -120,8 +121,14 @@ Page({ |
|
|
|
form:form,
|
|
|
|
}
|
|
|
|
if(key=='send_msg'){
|
|
|
|
//123456789012345678901234567890123456789012345678901234567890
|
|
|
|
obj.totalChar=form[key].length;
|
|
|
|
obj.totalSms=Math.ceil((form[key].length+4)/67);
|
|
|
|
obj.totalSms=1
|
|
|
|
if(obj.totalChar>60){
|
|
|
|
//obj.totalSms=1+Math.ceil((obj.totalChar-57)/67);
|
|
|
|
obj.totalSms=Math.ceil((obj.totalChar+10)/67);
|
|
|
|
}
|
|
|
|
this.reduce_num=obj.totalSms*this.data.form.send_total
|
|
|
|
}
|
|
|
|
obj.buttonStatus=false;
|
|
|
|
if(this.data.form.send_msg && this.data.form.name && this.data.form.phone){
|
|
...
|
...
|
@@ -148,14 +155,15 @@ Page({ |
|
|
|
send_phones:this.reservePhones,
|
|
|
|
sid:this.options.seller_id,
|
|
|
|
note_name:this.note_name,
|
|
|
|
reduce_num:this.reduce_num,
|
|
|
|
}
|
|
|
|
if(this.options.hasScene==1){
|
|
|
|
param.note_name=e.detail.nickName
|
|
|
|
}
|
|
|
|
App.Reserve.SmsBatchUpdate(param).then(res=>{
|
|
|
|
this.options.id=res.data.id;
|
|
|
|
console.log('this.options.total',this.data.totalSms,this.reservePhonesMap.length)
|
|
|
|
this.options.total=this.data.totalSms*this.reservePhonesMap.length
|
|
|
|
console.log('this.reduce_num',this.reduce_num)
|
|
|
|
this.options.total=this.reduce_num
|
|
|
|
wx.redirectTo({
|
|
|
|
url:util.http_build_query(this.options,'./result'),
|
|
|
|
});
|
...
|
...
|
|