|
...
|
...
|
@@ -2,22 +2,38 @@ |
|
|
|
import util from '../../../utils/util';
|
|
|
|
import App from '../../../utils/api';
|
|
|
|
const {regeneratorRuntime} = global
|
|
|
|
const form={
|
|
|
|
send_total:0,
|
|
|
|
send_msg:'',
|
|
|
|
name:'',
|
|
|
|
phone:'',
|
|
|
|
}
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
form:{},
|
|
|
|
total:0,
|
|
|
|
form:JSON.parse(JSON.stringify(form)),
|
|
|
|
options:{
|
|
|
|
hasScene:0,
|
|
|
|
seller_id:'',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
reservePhonesMap:[],
|
|
|
|
reservePhones:[],
|
|
|
|
note_name:'',
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
options:{},
|
|
|
|
onLoad: function (options) {
|
|
|
|
|
|
|
|
this.options=options;
|
|
|
|
if(options.hasScene!=1){
|
|
|
|
App.Reserve.SellerInfo(util.cache('enter_params')).then(res=>{
|
|
|
|
this.note_name=res.data.seller_user.nickname;
|
|
|
|
})
|
|
|
|
}
|
|
|
|
App.Reserve.GetReservePhones({sid:options.seller_id}).then(res=>{
|
|
|
|
//this.reservePhones=res.data;
|
|
|
|
if(res.data.length>0){
|
|
...
|
...
|
@@ -29,8 +45,11 @@ Page({ |
|
|
|
reservePhones.push(m.phone);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.reservePhonesMap=reservePhonesMap;
|
|
|
|
this.reservePhones=reservePhones.toString();
|
|
|
|
this.setData({
|
|
|
|
total:reservePhones.length
|
|
|
|
options:options,
|
|
|
|
[`form.send_total`]:reservePhonesMap.length
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
...
|
...
|
@@ -92,9 +111,15 @@ Page({ |
|
|
|
form:form,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
submit(){
|
|
|
|
submit(e){
|
|
|
|
let param={
|
|
|
|
|
|
|
|
...this.data.form,
|
|
|
|
send_phones:this.reservePhones,
|
|
|
|
sid:this.options.seller_id,
|
|
|
|
note_name:this.note_name,
|
|
|
|
}
|
|
|
|
if(this.options.hasScene==1){
|
|
|
|
param.note_name=e.detail.nickName
|
|
|
|
}
|
|
|
|
App.Reserve.SmsBatchUpdate(param);
|
|
|
|
},
|
...
|
...
|
|