客服更改

master
chen 2022-03-27 16:18:43 +08:00
parent a492c1b6be
commit 3ffc98b979
27 changed files with 123 additions and 41 deletions

66
App.vue
View File

@ -6,6 +6,7 @@
outside:true//,
},
onLaunch: function() {
this.autoUpdate();
//
toolAll.tools.currentContext();
//
@ -33,7 +34,7 @@
onShow: function() {
if(uni.getStorageSync('token')!='') {
toolAll.tools.networkStatus();//
toolAll.tools.updaX();//
// toolAll.tools.updaX();//
toolAll.tools.isLogin();//token
}
toolAll.tools.checkQuan(); //
@ -44,6 +45,69 @@
uni.removeStorageSync('quanImg'); //
uni.removeStorageSync('quanId'); // id
uni.removeStorageSync('isVedio'); //
},
methods:{
autoUpdate: function() {
var self = this;
//
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager() //1.
updateManager.onCheckForUpdate(function(res) { //
if (res.hasUpdate) {
//
wx.showModal({
title: '更新提示',
content: '检测到新版本,是否下载新版本并重启小程序?',
success: function(res) {
if (res.confirm) {
//2.
self.downLoadAndUpdate(updateManager)
uni.clearStorage();
} else if (res.cancel) {
//
wx.showModal({
title: '温馨提示~',
content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
showCancel:false,//
confirmText:"确定更新",//
success: function(res) {
if (res.confirm) {
//
self.downLoadAndUpdate(updateManager)
console.log(5);
}
}
})
}
}
})
}
})
} else { //
wx.showModal({
title: '提示',
content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
})
}
},
/**
* 下载小程序新版本并重启应用
* */
downLoadAndUpdate: function (updateManager){
var self = this;
wx.showLoading(); //
updateManager.onUpdateReady(function () {
wx.hideLoading() // applyUpdate
updateManager.applyUpdate()
uni.clearStorage();
})
updateManager.onUpdateFailed(function () { //
wx.showModal({
title: '已经有新版本了哟~',
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
})
})
}
}
};
</script>

View File

@ -11,7 +11,7 @@
<view>是否选择授权登录</view>
</view>
</view>
<view class="auth-center">申请 获取你的昵称头像</view>
<view class="auth-center">为了给您提供更好的服务向您申请微信头像及昵称授权</view>
<view class="auth-bottom">
<view @tap="chooseBtn" :class="noAuthBtn?'isNyin':'noyin'" class="btn btn-no">暂不授权</view>
<view :class="yesAuthBtn?'isOyin':'noyin'" class="btn btn-yes">
@ -26,8 +26,8 @@
<view class="bacf radius20 width100 tank-box">
<view class="tc tank-box-itemone">请授权绑定手机号</view>
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
<view class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view class="pad-sx10 radius10 tank-btn posir pbackc">
<view class="pad-sx20 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view class="pad-sx20 radius10 tank-btn posir pbackc">
立即绑定
<button open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="posia syxzo">立即绑定</button>
</view>
@ -47,10 +47,10 @@
return {}
}
},
appletImg:{//
type:String,
default:'/static/public/like.png'
},
// appletImg:{//
// type:String,
// default:'/static/public/like.png'
// },
appletName:{//
type:String,
default:''
@ -65,7 +65,8 @@
currentPage:'', //
showMobile:true ,//
showUserInfo:false,
flag:true
flag:true,
appletImg:''//logo
};
},
destroyed() {
@ -73,6 +74,7 @@
uni.removeStorageSync('urlparams');
},
mounted() {
this.appletImg = uni.getStorageSync('appletImg');
//
let pages = getCurrentPages(); //
let currentPage = pages[pages.length - 1]; //
@ -197,6 +199,9 @@
this.showMobile = false;
uni.setStorageSync('phone_active',1);//
uni.setStorageSync('outside',6);//
setTimeout(()=>{
this.authEv();
},2000)
// this.showAuth = false; //
// uni.reLaunch({ //
// url:uni.getStorageSync('urlparams')
@ -222,7 +227,7 @@
.auth-top-content view:nth-child(1) {font-size: 30rpx;font-weight: bold;margin-top: 0;}
.auth-center {font-size: 28rpx;margin: 30rpx 0;border-bottom: 1rpx solid #F5F5F5;border-top: 1rpx solid #F5F5F5;padding: 20rpx 0;}
.auth-bottom {display: flex;justify-content: center;align-items: center;font-size: 24rpx;}
.btn {padding: 12rpx 40rpx;border-radius: 4rpx;}
.btn {padding: 20rpx 60rpx;border-radius: 4rpx;}
.btn-no {color: #07ad60;background-color: #FFFFFF;border: 1rpx solid #CCCCCC;}
.btn-yes {color: #FFFFFF;background-color: #07ad60;border: 1rpx solid #07ad60;position: relative;margin-left: 20rpx;}
.auth-btn {position: absolute;top: 0;left: 0;right: 0;bottom: 0;opacity: 0;}

View File

@ -17,7 +17,7 @@
<view class="posir" :class="index==2 ? 'centerBox-item':''">
<image :class="index==2 ? 'centerImg':'moImg'" v-if="newcurrent==index" :src="itemi.selectedIconPath"></image>
<image :class="index==2 ? 'centerImg':'moImg'" v-else :src="itemi.iconPath"></image>
<!-- <button v-if="index==2 && isKef" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact"></button> -->
<button v-if="index==2 && isKef" class="fon24 posia" style="opacity: 0;top: 0;left: 0;right: 0;bottom: 0;" open-type="contact"></button>
</view>
</view>
</view>
@ -102,11 +102,11 @@
break;
case 2:
if(existMobile!=''){
wx.openCustomerServiceChat({
extInfo: {url: `https://work.weixin.qq.com/kfid/kfcb3bba5b57d9a42ba?enc_scene=ENC616HXDjLYNcmsR49PBE75UERg8Ncv3dygpYjfnh3XVvA&scene_param=${uni.getStorageSync('openid')}`},
corpId: 'ww1f86f258d4ff5817',
success(res) {}
})
// wx.openCustomerServiceChat({
// extInfo: {url: `https://work.weixin.qq.com/kfid/kfcb3bba5b57d9a42ba?enc_scene=ENC616HXDjLYNcmsR49PBE75UERg8Ncv3dygpYjfnh3XVvA&scene_param=${uni.getStorageSync('openid')}`},
// corpId: 'ww1f86f258d4ff5817',
// success(res) {}
// })
this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})

View File

@ -37,7 +37,7 @@
},
titleVal:{//
type:String,
default:'恒美植发'
default:''
},
whereCome:{//
type:Number,

View File

@ -79,8 +79,20 @@ const request = (method, url, options) => {
break;
}
return new Promise((resolve, reject) => {
let hostapi = '';
// #ifdef MP-WEIXIN
let hInfo = wx.getAccountInfoSync();
// console.log(hInfo.envVersion);//develop:开发版 trial体验版 release正式版
if(hInfo.miniProgram.envVersion == "develop" || hInfo.miniProgram.envVersion == "trial"){
// (开发版,体验版)域名
hostapi = 'https://hengmei.scdxtc.cn/api/';
} else {
// 正式版-域名
hostapi = 'https://hm.hmzfyy.cn/api/';
}
// #endif
uni.request({
url: `${uni.getStorageSync('hostapi')}${url}`,
url: `${hostapi}${url}`,
method: methods,
data: options,
header: headers,

View File

@ -315,6 +315,8 @@ const tools = {
success: res => {
if(res.data.code==0){
res.data.data.v==0 ? uni.setStorageSync('isVedio',false) : uni.setStorageSync('isVedio',true);
let appletImg = 'https://oss.hmzfyy.cn' + res.data.data.logo;
uni.setStorageSync('appletImg',appletImg);
}
}
})

View File

@ -35,8 +35,8 @@
<view class="bacf radius20 width100 tank-box">
<view class="tc tank-box-itemone">微信授权</view>
<view class="fon28 colf pad-x30 pad-zy30 tc disjb">
<view class="pad-sx10 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view :style="{background:publicColor}" class="pad-sx10 radius10 tank-btn posir">
<view class="pad-sx20 radius10 tank-btn" style="background-color: rgba(230, 230, 230,1);color: #000000;">暂不绑定</view>
<view :style="{background:publicColor}" class="pad-sx20 radius10 tank-btn posir">
立即授权
<button @click="bindGetUserInfo" class="posia syxzo">立即授权</button>
</view>

View File

@ -161,7 +161,7 @@
export default {
data() {
return {
statusHNH:uni.getStorageSync('electric_nav_height'),
statusHNH:uni.getSystemInfoSync().statusBarHeight + 54,
publicColor:uni.getStorageSync('publicColor'),
tongList:[
{num:'0',title:'我的积分'},

View File

@ -413,8 +413,7 @@
url:res.data.ad[2].link,
}
}
// this.publicColor = res.data.mainColor
this.publicColor = uni.getStorageSync('publicColor')
this.publicColor = res.data.mainColor
}
})
},

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long