Commit 0ef5047ce728f55203b50fa38faebed02a70d9ed

Authored by vking
1 parent a32af856

隐藏号码

... ... @@ -21,6 +21,7 @@ App({
openid:"",
system:{},
shareTicket:"",
isAdmin:false,//是否运营人员
onLaunch: async function (opt) {
console.log('onLaunch',opt,wx.env);
wx.removeStorage({key: 'formids'});//清理历史formids
... ...
... ... @@ -20,6 +20,7 @@ module.exports = {
let enter_params = util.cache('enter_params');
let res = await App.Seller.VerificationIsAdmin({openid:enter_params.seller_openid})
if (res.data && res.data.status==1) {
getApp().isAdmin=true
success()
} else {
fail()
... ...
... ... @@ -17,6 +17,7 @@ Page({
sc: {},
tpls: TP.tpls(),
enter_params: {},
hasCallPhone:false,
onLoad: async function (opt) {
util.setBarTitle('预订详情');
console.log(opt)
... ... @@ -30,6 +31,9 @@ Page({
this.enter_params = util.cache('enter_params');
this.sc = (await App.Reserve.SellerInfo(this.enter_params)).data;
console.log('this.sc', this.sc);
if(getApp().isAdmin || this.sc.seller.is_call_tel==1){
this.hasCallPhone=true;
}
this.chooseManagerInit();
PubSub.on('arrangeDesk',(desk)=>{
this.arrangeDesk(desk)
... ... @@ -76,6 +80,13 @@ Page({
};
},
getcall: function () {
let bi=this.data.bookInfo
//getApp().isAdmin
if(bi.type==1 && !this.hasCallPhone){//在线预订
if((bi.status==0 || bi.status==6)){
return;
}
}
if (!this.detailData.hasOwner) {
return util.toast('只有记录人可以拨打', 'none');
}
... ... @@ -151,7 +162,7 @@ Page({
if (note_openid == res.data.note_openid || sc.seller_user.role_name == '管理员') {
res.data.hasOwner = true;
}
if (!res.data.hasOwner) {
if(!res.data.hasOwner && !this.hasCallPhone){
res.data.phoneStr = res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/, function ($0, $1, $2, $3) {
return $1 + '**' + $3;
})
... ... @@ -284,6 +295,12 @@ Page({
},
easyCall(e){
let bi=this.data.bookInfo
//getApp().isAdmin
if(bi.type==1 && !this.hasCallPhone){//在线预订
if((bi.status==0 || bi.status==6)){
return;
}
}
let phone=bi.phone
if(util.attr(e,'key')=='seller'){
phone=bi.seller.phone
... ...