dengjie commit : 产品详情和厂家详情下方的联系客服样式及跳转

This commit is contained in:
dengjie
2023-02-03 16:05:41 +08:00
parent cb2dba5323
commit be379b2ba9
3 changed files with 62 additions and 4 deletions

2
package-lock.json generated
View File

@@ -4,7 +4,7 @@
"dependencies": {
"uview-ui": {
"version": "2.0.35",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.35.tgz",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.35.tgz",
"integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g=="
}
}

View File

@@ -21,10 +21,17 @@
</u-grid-item>
</u-grid>
</view>
<view class="footer">
<view class="footer" @click="showModal()">
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text>
</view>
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
@confirm="confirmCall" @cancel="cancelCall">
<view>
<view>{{phone}}</view>
<text>是否拨打客服电话</text>
</view>
</u-modal>
<view style="margin:0 20rpx;">
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
@@ -44,7 +51,9 @@
id: '',
detailList: [],
imgUrl: '',
isLoad: true
isLoad: true,
showCall: false,
phone: '138 1222 222',
}
},
onLoad(option) {
@@ -84,6 +93,26 @@
uni.reLaunch({
url: '/pages/index/index'
})
},
// 联系客服模态框
showModal() {
this.showCall = true
},
confirmCall() {
this.showCall = false
let phone = '1381222222'
uni.makePhoneCall({
phoneNumber: phone,
success: function() {
console.log('拨打电话成功');
},
fail() {
console.log('打电话失败了');
}
})
},
cancelCall() {
this.showCall = false
}
}
}

View File

@@ -58,10 +58,17 @@
<text>{{detailList.pub_time}}</text>
</view>
<u-parse :content="detailList.desc" @preview="preview" @navigate="navigate"></u-parse>
<view class="footer">
<view class="footer" @click="showModal()">
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text>
</view>
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
@confirm="confirmCall" @cancel="cancelCall">
<view>
<view>{{phone}}</view>
<text>是否拨打客服电话</text>
</view>
</u-modal>
<view style="margin:0 20rpx;">
<u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login>
@@ -92,6 +99,8 @@
detailList: [],
isLoad: true,
showM: false,
showCall: false,
phone: '138 1222 222',
content: '您暂无权限访问请升级VIP访问'
}
},
@@ -188,6 +197,26 @@
uni.navigateTo({
url: '../../../packageMy/memberCenter/memberCenter?ask=' + 1
})
},
// 联系客服模态框
showModal() {
this.showCall = true
},
confirmCall() {
this.showCall = false
let phone = '1381222222'
uni.makePhoneCall({
phoneNumber: phone,
success: function() {
console.log('拨打电话成功');
},
fail() {
console.log('打电话失败了');
}
})
},
cancelCall() {
this.showCall = false
}
}
}