Commit 0ef5047ce728f55203b50fa38faebed02a70d9ed

Authored by vking
1 parent a32af856

隐藏号码

@@ -21,6 +21,7 @@ App({ @@ -21,6 +21,7 @@ App({
21 openid:"", 21 openid:"",
22 system:{}, 22 system:{},
23 shareTicket:"", 23 shareTicket:"",
  24 + isAdmin:false,//是否运营人员
24 onLaunch: async function (opt) { 25 onLaunch: async function (opt) {
25 console.log('onLaunch',opt,wx.env); 26 console.log('onLaunch',opt,wx.env);
26 wx.removeStorage({key: 'formids'});//清理历史formids 27 wx.removeStorage({key: 'formids'});//清理历史formids
@@ -20,6 +20,7 @@ module.exports = { @@ -20,6 +20,7 @@ module.exports = {
20 let enter_params = util.cache('enter_params'); 20 let enter_params = util.cache('enter_params');
21 let res = await App.Seller.VerificationIsAdmin({openid:enter_params.seller_openid}) 21 let res = await App.Seller.VerificationIsAdmin({openid:enter_params.seller_openid})
22 if (res.data && res.data.status==1) { 22 if (res.data && res.data.status==1) {
  23 + getApp().isAdmin=true
23 success() 24 success()
24 } else { 25 } else {
25 fail() 26 fail()
@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 sc: {}, 17 sc: {},
18 tpls: TP.tpls(), 18 tpls: TP.tpls(),
19 enter_params: {}, 19 enter_params: {},
  20 + hasCallPhone:false,
20 onLoad: async function (opt) { 21 onLoad: async function (opt) {
21 util.setBarTitle('预订详情'); 22 util.setBarTitle('预订详情');
22 console.log(opt) 23 console.log(opt)
@@ -30,6 +31,9 @@ Page({ @@ -30,6 +31,9 @@ Page({
30 this.enter_params = util.cache('enter_params'); 31 this.enter_params = util.cache('enter_params');
31 this.sc = (await App.Reserve.SellerInfo(this.enter_params)).data; 32 this.sc = (await App.Reserve.SellerInfo(this.enter_params)).data;
32 console.log('this.sc', this.sc); 33 console.log('this.sc', this.sc);
  34 + if(getApp().isAdmin || this.sc.seller.is_call_tel==1){
  35 + this.hasCallPhone=true;
  36 + }
33 this.chooseManagerInit(); 37 this.chooseManagerInit();
34 PubSub.on('arrangeDesk',(desk)=>{ 38 PubSub.on('arrangeDesk',(desk)=>{
35 this.arrangeDesk(desk) 39 this.arrangeDesk(desk)
@@ -76,6 +80,13 @@ Page({ @@ -76,6 +80,13 @@ Page({
76 }; 80 };
77 }, 81 },
78 getcall: function () { 82 getcall: function () {
  83 + let bi=this.data.bookInfo
  84 + //getApp().isAdmin
  85 + if(bi.type==1 && !this.hasCallPhone){//在线预订
  86 + if((bi.status==0 || bi.status==6)){
  87 + return;
  88 + }
  89 + }
79 if (!this.detailData.hasOwner) { 90 if (!this.detailData.hasOwner) {
80 return util.toast('只有记录人可以拨打', 'none'); 91 return util.toast('只有记录人可以拨打', 'none');
81 } 92 }
@@ -151,7 +162,7 @@ Page({ @@ -151,7 +162,7 @@ Page({
151 if (note_openid == res.data.note_openid || sc.seller_user.role_name == '管理员') { 162 if (note_openid == res.data.note_openid || sc.seller_user.role_name == '管理员') {
152 res.data.hasOwner = true; 163 res.data.hasOwner = true;
153 } 164 }
154 - if (!res.data.hasOwner) { 165 + if(!res.data.hasOwner && !this.hasCallPhone){
155 res.data.phoneStr = res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/, function ($0, $1, $2, $3) { 166 res.data.phoneStr = res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/, function ($0, $1, $2, $3) {
156 return $1 + '**' + $3; 167 return $1 + '**' + $3;
157 }) 168 })
@@ -284,6 +295,12 @@ Page({ @@ -284,6 +295,12 @@ Page({
284 }, 295 },
285 easyCall(e){ 296 easyCall(e){
286 let bi=this.data.bookInfo 297 let bi=this.data.bookInfo
  298 + //getApp().isAdmin
  299 + if(bi.type==1 && !this.hasCallPhone){//在线预订
  300 + if((bi.status==0 || bi.status==6)){
  301 + return;
  302 + }
  303 + }
287 let phone=bi.phone 304 let phone=bi.phone
288 if(util.attr(e,'key')=='seller'){ 305 if(util.attr(e,'key')=='seller'){
289 phone=bi.seller.phone 306 phone=bi.seller.phone