You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.5 KiB

2 years ago
<template>
<view class="right-nav row">
<view
class="right-nav-button col-12"
v-for="(item,index) in buttonGroup"
@click="handle(item.type)"
>
<u-image :src="item.image" width="93" height="93"></u-image>
</view>
2 years ago
</view>
</template>
<script>
import { imghost } from '@/config/host.js'
1 year ago
import functions from "@/utils/functions";
import {getConfig} from "@/api/other";
2 years ago
export default{
data() {
return {
title: 'Hello',
loading: true,
2 years ago
buttonGroup:[
{
image:imghost+"/static/image/right-button-wechat.png",
type:'wechat'
},{
image:imghost+"/static/image/right-button-chat.png",
type:'chat'
},{
image:imghost+"/static/image/right-button-phone.png",
type:'phone'
},
1 year ago
],
kefu_phone:''
2 years ago
}
},
onLoad() {
1 year ago
2 years ago
},
methods: {
callPhone(phone){
uni.makePhoneCall({
phoneNumber: phone.toString()
});
},
2 years ago
handle(type){
switch (type) {
case 'chat':
uni.navigateTo({
1 year ago
url:"/pages/ChatDetail/index?id=0"
});
break;
case 'wechat':
functions.success('跳转微信客服');
break;
default:
this.callPhone(this.kefu_phone)
2 years ago
}
1 year ago
},
getPhone(){
getConfig('kefu_phone').then(res => {
this.kefu_phone = res.data.kefu_phone;
})
}
},
created() {
this.getPhone();
},
2 years ago
}
</script>
<style lang="scss">
@import './components/index.scss';
2 years ago
</style>