Commit fbe34a6b authored by 刘用法's avatar 刘用法

客服页面

parent a7fd455c
<template>
<view class="cus-wrap-component">
<image class="top-image" mode="widthFix" :src="minekefutuImage"></image>
<view class="content-view">
<view class="title-view" v-if="!isPop">
<text class="title-text">客服微信</text>
<text v-if="isMine">下载二维码添加官方客服微信</text>
</view>
<u-image :class="['qrcode', {'is-pop': isPop}]" :src="cusQrcode" mode="widthFix" :fade="true"
duration="450">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<view v-if="isPop" class="pop-tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
<u-button class="settle-button" type="primary" shape="circle" @click="download" :custom-style="buttonStyle">
点击下载
</u-button>
<view class="bottom-view" v-if="isMine">
<view class="line-view"></view>
<view class="phone-view">
<view class="phone-left-view">
<text class="phone-text">客服电话</text>
<text>{{phone}}</text>
</view>
<image class="phone-image" :src="phoneIcon" @click="phoneToCustomer">
</u-image>
</view>
</view>
<view v-else-if="isExclusive" class="tip-view">
<text>请务必添加该微信号,后续工单相关通知均以微信消息形式通知</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
type: { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服
type: String,
default: 'mine'
}
},
data() {
return {
};
},
computed: {
cusQrcode() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
minekefutuImage() {
return process.uniEnv.qn_base_url + this.imageName
},
imageName() {
return this.isMine ? 'minekefutu.png' : 'kefutuzs.png'
},
isMine() { // exclusive:专属; mine:我的页面客服; pop: 弹窗客服
return this.type == 'mine'
},
isPop() {
return this.type == 'pop'
},
isExclusive() {
return this.type == 'exclusive'
},
phoneIcon() {
return process.uniEnv.qn_base_url + 'dianhua.png'
},
buttonStyle() {
return {
width: "300rpx",
height: "80rpx",
"font-size": "32rpx",
"font-weight": "bold",
};
},
phone() {
return '0755-81773817'
}
},
methods: {
phoneToCustomer() { // 联系客户
uni.makePhoneCall({
phoneNumber: this.phone, //仅为示例
complete() {}
});
},
download() {
let self = this
uni.downloadFile({ //获得二维码的临时地址
url: self.cusQrcode,
success: (result) => {
if (result.statusCode == 200) {
uni.saveImageToPhotosAlbum({
filePath: result.tempFilePath, //传入临时地址
success(e) {
self.$u.toast('保存成功!');
self.$emit('click')
},
fail(res) {
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res
.authSetting)
}
});
}
}
})
} else if (res.errMsg) {
self.$u.toast('保存失败!');
}
},
})
}
}
})
}
}
}
</script>
<style lang="scss">
.cus-wrap-component {
background: #FFFFFF;
border-radius: 12rpx;
.top-image {
width: 100%;
}
.content-view {
padding: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
.title-view {
font-size: 24rpx;
color: #666666;
width: 100%;
margin-top: 10rpx;
display: flex;
align-items: flex-end;
.title-text {
font-weight: bold;
font-size: 32rpx;
color: #333333;
margin-right: 30rpx;
}
}
.qrcode {
margin-top: 60rpx;
margin-bottom: 60rpx;
width: 400rpx;
height: 400rpx;
&.is-pop {
width: 248rpx;
height: 248rpx;
padding: 24rpx;
border: 6rpx solid #2272FF;
border-radius: 32rpx;
margin-top: 10rpx;
margin-bottom: 40rpx;
}
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
}
.bottom-view {
width: 100%;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
margin-top: 46rpx;
}
.phone-view {
display: flex;
align-items: center;
width: 100%;
justify-content: space-between;
padding: 40rpx 0 30rpx 0;
.phone-left-view {
display: flex;
align-items: center;
color: #999999;
font-size: 26rpx;
.phone-text {
color: #333333;
font-size: 32rpx;
font-weight: bold;
margin-right: 40rpx;
}
}
.phone-image {
width: 84rpx;
height: 56rpx;
}
}
}
.settle-button {
margin-bottom: 14rpx;
}
.pop-tip-view {
text-align: center;
color: #333333;
font-size: 28rpx;
margin: 0rpx 60rpx 40rpx 60rpx;
}
.tip-view {
margin: 46rpx 60rpx 50rpx 60rpx;
text-align: center;
color: #333333;
font-size: 28rpx;
}
}
}
</style>
...@@ -291,7 +291,6 @@ ...@@ -291,7 +291,6 @@
{ {
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationStyle": "custom", // 隐藏系统导航栏
"disableScroll": true "disableScroll": true
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh" refresher-background="#F4F5F7" @refresherpulling="triggered = true" @refresherrefresh="onRefresh"
@refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top> @refresherrestore="onRestore" @refresherabort="onAbort" enable-back-to-top>
<TabBarPage title="充电桩自营平台"> <TabBarPage title="充电桩自营平台">
<image class="banner-image" :src="bannerImage"></image> <image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image>
<view class="msg-view"> <view class="msg-view">
<view class="msg-title">最新消息</view> <view class="msg-title">最新消息</view>
...@@ -67,6 +67,12 @@ ...@@ -67,6 +67,12 @@
<view class="bottom-line-view"></view> <view class="bottom-line-view"></view>
</view> </view>
</TabBarPage> </TabBarPage>
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx" closeable
:mask-close-able="false" close-icon-color="#FFFFFF">
<view class="order-pop-view">
<Customer type="pop" @click="handleDownload"></Customer>
</view>
</u-popup>
</scroll-view> </scroll-view>
</template> </template>
...@@ -76,12 +82,14 @@ ...@@ -76,12 +82,14 @@
import NoOrder from "@/components/order/noOrder.vue" import NoOrder from "@/components/order/noOrder.vue"
const app = getApp(); const app = getApp();
import OrderCell from "@/components/order/index.vue"; import OrderCell from "@/components/order/index.vue";
import Customer from "@/components/mine/customer.vue"
export default { export default {
components: { components: {
OrderCell, OrderCell,
TabBarPage, TabBarPage,
NoOrder NoOrder,
Customer
}, },
data() { data() {
return { return {
...@@ -104,6 +112,7 @@ ...@@ -104,6 +112,7 @@
waitInit: false, // 当token为空时,等待自动登录结束 waitInit: false, // 当token为空时,等待自动登录结束
triggered: false, triggered: false,
_freshing: false, _freshing: false,
visible: false,
}; };
}, },
watch: { watch: {
...@@ -138,13 +147,16 @@ ...@@ -138,13 +147,16 @@
return process.uniEnv.qn_base_url + 'weiruzhu.png' return process.uniEnv.qn_base_url + 'weiruzhu.png'
}, },
}, },
onLoad() { onLoad(e) {
this._freshing = false; this._freshing = false;
if(this.vuex_token) { if(this.vuex_token) {
this.getOrderCount() this.getOrderCount()
} else { } else {
this.waitInit = true this.waitInit = true
} }
if (e && e.visible) {
this.visible = e.visible
}
}, },
onShow() { onShow() {
// 每次进入页面都刷新入驻状态 // 每次进入页面都刷新入驻状态
...@@ -383,6 +395,14 @@ ...@@ -383,6 +395,14 @@
res.eventChannel.emit('acceptDataFromLearn', item) res.eventChannel.emit('acceptDataFromLearn', item)
} }
}); });
},
handleClickBanner() {
uni.navigateTo({
url: "/pages/mine/customer/index" + '?type=exclusive',
});
},
handleDownload() {
this.visible = false
} }
}, },
}; };
......
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
return this.vuex_settled && this.vuex_settled.avatar || '' return this.vuex_settled && this.vuex_settled.avatar || ''
}, },
name() { name() {
return this.settled && this.settled.id_card_name return this.settled && (this.settled.id_card_name
|| this.settled.nickname || this.settled.name || '' || this.settled.nickname || this.settled.name) || ''
}, },
mobile() { mobile() {
return this.settled && this.settled.mobile || '' return this.settled && this.settled.mobile || ''
......
<template> <template>
<view class="cus-wrap"> <view class="cus-wrap">
<w-navbar title="联系客服"></w-navbar> <w-navbar title="联系客服"></w-navbar>
<view class="content"> <Customer :type="type"></Customer>
<u-image class="qrcode" :src="cusQrcode" width="400" height="400" mode="widthFix" :fade="true" duration="450">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<text class="desc">长按二维码保存图片添加官方客服微信</text>
</view>
</view> </view>
</template> </template>
<script> <script>
import Customer from "@/components/mine/customer.vue"
export default { export default {
components: {
Customer
},
data() { data() {
return { return {
type: 'mine'
}; };
}, },
computed: { onLoad(e) {
cusQrcode() { if (e && e.type) {
return process.uniEnv.qn_base_url + 'erweima-bg.png' this.type = e.type
},
},
methods: {
// download() {
// let that = this;
// uni.downloadFile({ //获得二维码的临时地址
// url: that.erweimaImage,
// success:(res)=>{
// if(res.statusCode == 200){
// uni.saveImageToPhotosAlbum({
// filePath:res.tempFilePath,//传入临时地址
// success() {
// that.$u.toast('保存成功!');
// },
// fail() {
// that.$u.toast('保存失败!');
// }
// })
// }
// }
// })
// }
} }
console.log('aaaaaaa:', e.visible)
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.cus-wrap { .cus-wrap {
background-color: #F4F5F7; background-color: #F4F5F7;
padding: 30rpx; padding: 20rpx 30rpx;
.content {
width: 690rpx;
height: 800rpx;
background: #FFFFFF;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
.qrcode {
margin-top: 160rpx;
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
} }
}
}
</style> </style>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
statusName: '已支付保证金', statusName: '已支付保证金',
txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"], txtArr: ['您已成功缴纳配件押金', " 成功缴纳配件押金后即前往接单"],
btnTxt: '去首页', btnTxt: '去首页',
url: '/pages/index/index' url: '/pages/index/index?visible=1'
}], }],
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
status: '', status: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment