feat: 兼容客服跳转功能
This commit is contained in:
parent
403ee37a09
commit
3c4d229d23
@ -10,7 +10,8 @@ module.exports = {
|
||||
getApp: 'writable',
|
||||
wx: 'writable',
|
||||
getCurrentPages: 'writable',
|
||||
requirePlugin: 'writable'
|
||||
requirePlugin: 'writable',
|
||||
plus: 'writable'
|
||||
},
|
||||
// 指定如何解析语法
|
||||
parser: 'vue-eslint-parser',
|
||||
|
||||
@ -10,3 +10,12 @@ export function getCountryListRequest(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取app信息
|
||||
export function getAppInfoRequest(data) {
|
||||
return request({
|
||||
url: '/app/getAppInfo',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "wx-starlock",
|
||||
"name": "星星锁Lite",
|
||||
"appid": "__UNI__933D519",
|
||||
"description": "",
|
||||
"versionName": "1.3.0",
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
></image>
|
||||
</view>
|
||||
<view class="view-line"></view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<label for="contact">
|
||||
<view class="view-button">
|
||||
<view>客服</view>
|
||||
@ -21,6 +22,19 @@
|
||||
></image>
|
||||
</view>
|
||||
</label>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view @click="toContact">
|
||||
<view class="view-button">
|
||||
<view>客服</view>
|
||||
<image
|
||||
class="icon-arrow"
|
||||
src="https://oss-lock.xhjcn.ltd/mp/icon_arrow.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="view-line"></view>
|
||||
<view class="view-button" @click="toWebview()">
|
||||
<view>公司介绍</view>
|
||||
@ -118,6 +132,7 @@
|
||||
import env from '@/config/env'
|
||||
import { setStorage, getStorage, removeStorage } from '@/utils/storage'
|
||||
import { useNotificationStore } from '@/stores/notification'
|
||||
import { getAppInfoRequest } from '@/api/system'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -170,6 +185,13 @@
|
||||
url: '/pages/main/home'
|
||||
})
|
||||
},
|
||||
toContact() {
|
||||
getAppInfoRequest().then(res => {
|
||||
if (res.code === 0) {
|
||||
plus.runtime.openURL(res.data.wechat_service_url)
|
||||
}
|
||||
})
|
||||
},
|
||||
async changePhone(res) {
|
||||
if (res.detail.errMsg === 'getPhoneNumber:fail user deny') {
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user