Commit 55f95c0a4e01c49d68fdd9d92e828fa0603dc83b

Authored by wangfan
1 parent 590d94e0

smsbatch

Showing 1 changed file with 12 additions and 6 deletions
@@ -26,16 +26,20 @@ Page({ @@ -26,16 +26,20 @@ Page({
26 reservePhonesMap:[], 26 reservePhonesMap:[],
27 reservePhones:[], 27 reservePhones:[],
28 note_name:'', 28 note_name:'',
  29 + note_phone:'',
29 /** 30 /**
30 * 生命周期函数--监听页面加载 31 * 生命周期函数--监听页面加载
31 */ 32 */
32 options:{}, 33 options:{},
33 - onLoad: function (options) { 34 + onLoad: async function (options) {
34 this.options=options; 35 this.options=options;
35 - if(options.hasScene!=1){  
36 - App.Reserve.SellerInfo(util.cache('enter_params')).then(res=>{  
37 - this.note_name=res.data.seller_user.nickname;  
38 - }) 36 + let enter_params=util.cache('enter_params');
  37 + if(enter_params){
  38 + try{
  39 + let si=await App.Reserve.SellerInfo(enter_params);
  40 + this.note_name=si.data.seller_user.nick_name||res.data.seller_user.nickname;
  41 + this.note_phone=si.data.seller_user.phone;
  42 + }catch (e){}
39 } 43 }
40 App.Reserve.GetReservePhones({sid:options.seller_id}).then(res=>{ 44 App.Reserve.GetReservePhones({sid:options.seller_id}).then(res=>{
41 //this.reservePhones=res.data; 45 //this.reservePhones=res.data;
@@ -52,7 +56,9 @@ Page({ @@ -52,7 +56,9 @@ Page({
52 this.reservePhones=reservePhones.toString(); 56 this.reservePhones=reservePhones.toString();
53 this.setData({ 57 this.setData({
54 options:options, 58 options:options,
55 - [`form.send_total`]:reservePhonesMap.length 59 + [`form.send_total`]:reservePhonesMap.length,
  60 + [`form.name`]:this.note_name,
  61 + [`form.phone`]:this.note_phone,
56 }) 62 })
57 } 63 }
58 }) 64 })