联系客服
This commit is contained in:
parent
51c6e872f3
commit
b6ec1958a2
@ -204,6 +204,7 @@
|
||||
<text class="menu-label">扫雷</text>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="menu-item" @click="toSettings">
|
||||
<view class="menu-icon-box">
|
||||
<image class="menu-icon-img" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMzMzMiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiLz48cGF0aCBkPSJNMTIgMTV2M20wLTZ2MyIvPjxwYXRoIGQ9Ik0xOS40IDE1YTEsMSAwIDAsMC0uMTc4LjM4OWwtMTAuNSA3LjJhMSwxIDAsMCwwLTEuMTg5LS4xODlsLTQuNS04LjVhMSwxIDAsMCwwIC4xNzgtMS4xODlsOC41LTQuNWExLDEgMCAwLDEgLjM4OS4xNzhsNC41IDguNTE5YTEsMSAwIDAsMC0uMTc4LjM4OXoiLz48L3N2Zz4=" mode="aspectFit"></image>
|
||||
@ -497,7 +498,7 @@
|
||||
<script>
|
||||
import {
|
||||
getUserInfo, getUserStats, getPointsBalance, getUserPoints, getUserCoupons, getItemCards,
|
||||
getUserTasks, getTaskProgress, getInviteRecords, modifyUser, getUserProfile, bindDouyinID
|
||||
getUserTasks, getTaskProgress, getInviteRecords, modifyUser, getUserProfile, bindDouyinID, getPublicConfig
|
||||
} from '../../api/appUser.js'
|
||||
import { checkPhoneBoundSync } from '../../utils/checkPhone.js'
|
||||
// #ifdef MP-TOUTIAO
|
||||
@ -525,6 +526,8 @@ export default {
|
||||
inviteCode: '',
|
||||
mobile: '', // 手机号
|
||||
douyinUserId: '', // 抖音用户ID
|
||||
douyinUserId: '', // 抖音用户ID
|
||||
customerServiceQrCode: '', // 客服二维码
|
||||
customerServiceId: '0071112x', // 抖音IM客服账号
|
||||
pointsBalance: 0,
|
||||
|
||||
@ -580,6 +583,14 @@ export default {
|
||||
uni.navigateTo({ url: '/pages/login/index' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取公共配置(客服二维码)
|
||||
getPublicConfig().then(res => {
|
||||
if (res && res.contact_service_qrcode) {
|
||||
this.customerServiceQrCode = res.contact_service_qrcode
|
||||
}
|
||||
}).catch(console.error)
|
||||
},
|
||||
onShow() {
|
||||
// 检查手机号绑定状态(快速检查本地缓存)
|
||||
@ -777,6 +788,14 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
handleContactService() {
|
||||
if (!this.customerServiceQrCode) return
|
||||
uni.previewImage({
|
||||
urls: [this.customerServiceQrCode],
|
||||
current: this.customerServiceQrCode
|
||||
})
|
||||
},
|
||||
|
||||
getInviteCode() {
|
||||
const v = this.inviteCode || uni.getStorageSync('invite_code') || (uni.getStorageSync('user_info') || {}).invite_code || ''
|
||||
return String(v || '').trim()
|
||||
@ -967,17 +986,23 @@ export default {
|
||||
uni.navigateTo({ url: '/pages-user/tasks/index' })
|
||||
},
|
||||
toHelp() {
|
||||
const items = ['购买协议', '用户协议']
|
||||
if (this.customerServiceQrCode) {
|
||||
items.push('联系客服')
|
||||
}
|
||||
|
||||
uni.showActionSheet({
|
||||
itemList: ['购买协议', '用户协议'],
|
||||
itemList: items,
|
||||
success: (res) => {
|
||||
const idx = Number(res && res.tapIndex)
|
||||
if (idx === 0) {
|
||||
const item = items[idx]
|
||||
|
||||
if (item === '购买协议') {
|
||||
uni.navigateTo({ url: '/pages-user/agreement/purchase' })
|
||||
return
|
||||
}
|
||||
if (idx === 1) {
|
||||
uni.navigateTo({ url: '/pages-user/agreement/user' })
|
||||
return
|
||||
} else if (item === '用户协议') {
|
||||
uni.navigateTo({ url: '/pages-user/agreement/user' })
|
||||
} else if (item === '联系客服') {
|
||||
this.handleContactService()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const BASE_URL = 'https://kdy.1024tool.vip'
|
||||
const BASE_URL = 'http://127.0.0.1:9991'
|
||||
|
||||
let authModalShown = false
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user