优化
This commit is contained in:
+37
-11
@@ -1,6 +1,8 @@
|
||||
// Pages/yishi/index/index.js
|
||||
import { API } from './../../../utils/network/api'
|
||||
import { rpxTopx } from './../../../utils/util'
|
||||
import { pxTorpx } from './../../../utils/util'
|
||||
import { requestSubscribeMessage } from './../../../utils/requestSubscribeUtil';
|
||||
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
@@ -92,6 +94,7 @@ Page({
|
||||
},
|
||||
],
|
||||
contactKeFu: false,
|
||||
sub_visible: false,
|
||||
jiesuan_dialog_show: false,
|
||||
jiesuan_dialog_visible: false,
|
||||
funbox_height: 100,
|
||||
@@ -125,7 +128,7 @@ Page({
|
||||
const { statusBarHeight } = wx.getSystemInfoSync();
|
||||
// console.log("statusBarHeight: ", rpxTopx(statusBarHeight));
|
||||
let funbox_height = wx.getSystemInfoSync().windowHeight - (this.data.stateHeight + this.data.navHeight + 10) - 55;//减去底部空白
|
||||
funbox_height = rpxTopx(funbox_height);
|
||||
funbox_height = pxTorpx(funbox_height);
|
||||
// 147 userinfo的高度
|
||||
// 80 info_note
|
||||
// 155 认证部分的高度
|
||||
@@ -424,6 +427,8 @@ Page({
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
"info.info_shiming_status_txt": "未认证",
|
||||
"info.info_shiming_status": "info_shiming_status_no",
|
||||
dialog_content: "请您先完成实名认证",
|
||||
shiming_status_url: "/Pages/yishi/identity/index",
|
||||
dialog_url: "/Pages/yishi/identity/index",
|
||||
@@ -637,20 +642,41 @@ Page({
|
||||
|
||||
let checkDialog = this.checkDialog(e);
|
||||
if(checkDialog){
|
||||
// console.log("concatKeFu");
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc'],
|
||||
success (res) {
|
||||
// console.log(res);
|
||||
_this.setData({
|
||||
contactKeFu: true
|
||||
|
||||
let tmplIds = ['JMPmlYGh1HcUSuEfJCVQUIsZv4H5ar3QvXZfrNYNFuc']
|
||||
let sub_promise = requestSubscribeMessage(tmplIds)
|
||||
sub_promise.then(res => {
|
||||
console.log("订阅成功")
|
||||
this.setData({
|
||||
contactKeFu: true
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
let errCode = err.errCode
|
||||
if(errCode == 20004){
|
||||
this.setData({
|
||||
sub_visible: true,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
subcancelDialog(){
|
||||
this.setData({
|
||||
sub_visible: false,
|
||||
contactKeFu: true
|
||||
})
|
||||
},
|
||||
subconfirmDialog(){
|
||||
this.setData({
|
||||
sub_visible: false
|
||||
})
|
||||
wx.openSetting({
|
||||
success (res) {
|
||||
console.log(res.authSetting)
|
||||
}
|
||||
})
|
||||
},
|
||||
checkDialog(e){
|
||||
//实名认证
|
||||
let idcard_status = this.data.info.idcard_status;
|
||||
|
||||
@@ -233,6 +233,19 @@
|
||||
<van-button color="rgba(0, 0, 0, .1)" style="position: fixed;bottom: 50rpx;left: 50%;transform: translateX(-50%);width: 90vw;border: 1px solid #fff;border-radius: 50px;" block round bind:click="onClickHideOverlay">我知道了</van-button>
|
||||
</van-overlay>
|
||||
|
||||
<t-dialog
|
||||
visible="{{ sub_visible }}"
|
||||
title="温馨提示"
|
||||
content="您已关闭订阅消息通知,请点击“确认”按钮在设置中打开订阅通知。"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="subcancelDialog">
|
||||
取消
|
||||
</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="subconfirmDialog">
|
||||
确定
|
||||
</view>
|
||||
</t-dialog>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ page{
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx 0 20rpx;
|
||||
box-shadow: 0px 2px 10px 0px rgba(0,0,0,0.1);
|
||||
}
|
||||
.swiper{
|
||||
height:168rpx;
|
||||
|
||||
Reference in New Issue
Block a user