Merge pull request 'dengjie' (#83) from dengjie into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/83
This commit is contained in:
odjbin
2023-02-03 10:44:40 +00:00
4 changed files with 71 additions and 6 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
}
}
}

View File

@@ -32,7 +32,7 @@
</view>
<!-- 认证厂家 -->
<view v-if="token">
<view v-if="token==true">
<view class="subtitle">
<u--image src="/static/report/hy_icon_cjx.png" width="24rpx" height="24rpx" :lazy-load="true">
</u--image>
@@ -74,7 +74,14 @@
}
},
onLoad() {
this.token = uni.getStorageSync('loginToken')
if (uni.getStorageSync('loginToken')) {
this.token = true
}
},
onShow() {
if (uni.getStorageSync('loginToken')) {
this.token = true
}
},
methods: {
//点击一级分类