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": { "dependencies": {
"uview-ui": { "uview-ui": {
"version": "2.0.35", "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==" "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g=="
} }
} }

View File

@@ -21,10 +21,17 @@
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
<view class="footer"> <view class="footer" @click="showModal()">
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon> <u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text> <text>联系客服</text>
</view> </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;"> <view style="margin:0 20rpx;">
<u-overlay :show="!isLoad"> <u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login> <login @success="reOnLoad()" @fail="failToLoad()"></login>
@@ -44,7 +51,9 @@
id: '', id: '',
detailList: [], detailList: [],
imgUrl: '', imgUrl: '',
isLoad: true isLoad: true,
showCall: false,
phone: '138 1222 222',
} }
}, },
onLoad(option) { onLoad(option) {
@@ -84,6 +93,26 @@
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' 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> <text>{{detailList.pub_time}}</text>
</view> </view>
<u-parse :content="detailList.desc" @preview="preview" @navigate="navigate"></u-parse> <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> <u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text> <text>联系客服</text>
</view> </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;"> <view style="margin:0 20rpx;">
<u-overlay :show="!isLoad"> <u-overlay :show="!isLoad">
<login @success="reOnLoad()" @fail="failToLoad()"></login> <login @success="reOnLoad()" @fail="failToLoad()"></login>
@@ -92,6 +99,8 @@
detailList: [], detailList: [],
isLoad: true, isLoad: true,
showM: false, showM: false,
showCall: false,
phone: '138 1222 222',
content: '您暂无权限访问请升级VIP访问' content: '您暂无权限访问请升级VIP访问'
} }
}, },
@@ -188,6 +197,26 @@
uni.navigateTo({ uni.navigateTo({
url: '../../../packageMy/memberCenter/memberCenter?ask=' + 1 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
} }
} }
} }