diff --git a/package-lock.json b/package-lock.json index acc031c..b23d8bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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==" } } diff --git a/packageReport/certifiedCjDetail/certifiedCjDetail.vue b/packageReport/certifiedCjDetail/certifiedCjDetail.vue index b633aff..2466bb7 100644 --- a/packageReport/certifiedCjDetail/certifiedCjDetail.vue +++ b/packageReport/certifiedCjDetail/certifiedCjDetail.vue @@ -21,10 +21,17 @@ - + 联系客服 + + + {{phone}} + 是否拨打客服电话 + + @@ -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 } } } diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue index 252cad2..976af68 100644 --- a/pages/detail/productsDetail/productsDetail.vue +++ b/pages/detail/productsDetail/productsDetail.vue @@ -58,10 +58,17 @@ {{detailList.pub_time}} - + 联系客服 + + + {{phone}} + 是否拨打客服电话 + + @@ -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 } } }