客服电话换接口获取

This commit is contained in:
BAKEYi 2026-04-17 14:27:31 +08:00
parent e89470df68
commit 126e236cc2
1 changed files with 56 additions and 42 deletions

View File

@ -26,17 +26,31 @@
<script> <script>
import permissionUtils from "@/utils/per"; import permissionUtils from "@/utils/per";
import locationService from "@/utils/locationService"; import locationService from "@/utils/locationService";
import request from "@/utils/request";
export default { export default {
data() { data() {
return { return {
isShowPer: false, // isShowPer: false, //
phone: '19950079687' phone: '19950079687' // 使
} }
}, },
onLoad(options) { onLoad(options) {
this.phone = options.phone || '19950079687' //
this.getCustomerService();
}, },
methods: { methods: {
//
async getCustomerService() {
try {
const res = await request.post('/sj/poster/getCustomerService');
if (res.code === 200 && res.data && res.data.phone) {
this.phone = res.data.phone;
}
} catch (error) {
console.error('获取客服电话失败', error);
}
},
// //
async callPhone() { async callPhone() {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();