|
@@ -74,11 +74,12 @@
|
|
|
</view>
|
|
|
<view class="u-m-t-20 u-m-b-40">
|
|
|
<u-cell-group>
|
|
|
- <u-cell-item title="拨打客服电话" @click="phoneCall(phoneNo)">
|
|
|
+ <u-cell-item title="拨打客服电话" @click="callPhoneShow = true">
|
|
|
<u-icon slot="icon" custom-prefix="custom-icon" size="35" name="dianhua"></u-icon>
|
|
|
</u-cell-item>
|
|
|
</u-cell-group>
|
|
|
</view>
|
|
|
+ <u-select v-model="callPhoneShow" :list="callPhoneList" @confirm="phoneCall"></u-select>
|
|
|
|
|
|
<!-- <view class="u-m-t-20">
|
|
|
<u-cell-group>
|
|
@@ -108,14 +109,16 @@
|
|
|
pic: '/static/img/default-avatar.png',
|
|
|
// 用户信息
|
|
|
userInfo: [],
|
|
|
- phoneNo: '0851-38222696',
|
|
|
logoutPop: false,
|
|
|
- messageNum: 0
|
|
|
+ messageNum: 0,
|
|
|
+ callPhoneShow: false,
|
|
|
+ callPhoneList: []
|
|
|
}
|
|
|
},
|
|
|
onLoad() {},
|
|
|
onShow() {
|
|
|
this.getMsgNum()
|
|
|
+ this.getDict()
|
|
|
if (this.$store.state.vuex_hasLogin) {
|
|
|
this.userInfo = this.$store.state.vuex_user;
|
|
|
if (this.$store.state.vuex_wxinfo) {
|
|
@@ -126,6 +129,23 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 获取客服电话字典
|
|
|
+ */
|
|
|
+ getDict() {
|
|
|
+ this.$u.api.getDictApi({
|
|
|
+ type: 'customer_service_phone'
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.callPhoneList = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ value: item.dictValue,
|
|
|
+ label: item.dictLabel
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 打开新页面
|
|
|
* @param {String} path 跳转路径
|
|
@@ -174,7 +194,7 @@
|
|
|
// 拨打电话
|
|
|
phoneCall(phone) {
|
|
|
uni.makePhoneCall({
|
|
|
- phoneNumber: phone
|
|
|
+ phoneNumber: phone[0].value || '0851-38222696'
|
|
|
});
|
|
|
},
|
|
|
// 登出
|