微信审核 强制登录限制

This commit is contained in:
lanzhihui 2025-06-16 10:06:17 +08:00
parent 6d7bc01f6f
commit 51e6d98827
14 changed files with 163 additions and 68 deletions

View File

@ -35,7 +35,7 @@ wepy.app({
} }
}, },
globalData: { globalData: {
versions: 'v5.5.98', // 版本号 versions: 'v5.5.99', // 版本号
navBarHeight: 0, // 导航栏高度 navBarHeight: 0, // 导航栏高度
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
navTop: 0, // 胶囊距顶部间距 navTop: 0, // 胶囊距顶部间距

View File

@ -79,6 +79,8 @@
</view> </view>
</view> </view>
</view> </view>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</view> </view>
</template> </template>
<script> <script>
@ -116,8 +118,8 @@ import https from '../mixins/https'
active: 1, active: 1,
selectedVal: '', selectedVal: '',
rankList: [], rankList: [],
payId: '' payId: '',
loginShow: false
}, },
watch: { watch: {
modalName(e) { modalName(e) {
@ -177,7 +179,16 @@ import https from '../mixins/https'
this.active = index this.active = index
this.payId = val this.payId = val
}, },
hiddenLogin() {
let vm = this
vm.loginShow = false
},
conversion(item) { conversion(item) {
// 校验是否完成注册资料
if (!this.$signInVerify()) {
this.$emit('signInVerify')
return
}
let that = this, let that = this,
url = `${service.host}/rank/buy` url = `${service.host}/rank/buy`
that.modalName = '' that.modalName = ''

View File

@ -364,12 +364,17 @@
showReplyView: true, showReplyView: true,
inputBoxH: 86, inputBoxH: 86,
modalName: '', modalName: '',
userInfo: {} userInfo: {},
loginShow: false
}, },
mixins: [https, base], mixins: [https, base],
methods: { methods: {
// 评论 // 评论
send() { send() {
if (!this.$signInVerify()) {
this.$emit('signInVerify')
return
}
let vm = this let vm = this
let comment = vm.replyId ? vm.inputVal.split(`回复@${vm.name}`)[1] : vm.inputVal let comment = vm.replyId ? vm.inputVal.split(`回复@${vm.name}`)[1] : vm.inputVal
let data = { let data = {

View File

@ -406,10 +406,10 @@ scroll-view {
jumpPath(url, type) { jumpPath(url, type) {
let vm = this let vm = this
// 校验是否完成注册资料 // 校验是否完成注册资料
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
vm.$emit('signInVerify') // vm.$emit('signInVerify')
return // return
} // }
console.log(vm.from, url, type, '7777') console.log(vm.from, url, type, '7777')
if (vm.from != 'dynamic' && vm.from != 'myDynamic' && type != 'vote' && vm.from != 'hotTopic') { if (vm.from != 'dynamic' && vm.from != 'myDynamic' && type != 'vote' && vm.from != 'hotTopic') {
console.log('44---') console.log('44---')
@ -421,10 +421,10 @@ scroll-view {
jumpPathV2(url, type) { jumpPathV2(url, type) {
let vm = this let vm = this
// 校验是否完成注册资料 // 校验是否完成注册资料
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
vm.$emit('signInVerify') // vm.$emit('signInVerify')
return // return
} // }
console.log(vm.from, url, type, '7777') console.log(vm.from, url, type, '7777')
if (vm.from != 'dynamicDetail' && vm.from != 'dynamic') { if (vm.from != 'dynamicDetail' && vm.from != 'dynamic') {
console.log('44---') console.log('44---')

View File

@ -11,7 +11,9 @@ page {
<!--动态操作功能selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件--> <!--动态操作功能selectData选择的动态数据、selectIndex选中的动态下标、admin是否管理员、from来自哪个父组件-->
<dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'home'" @hideModal="hideModal" @changeOperation="changeOperation"></dynamicOperation> <dynamicOperation :selectData="selectData" :chooseShow.sync="chooseShow" :selectIndex="selectIndex" :admin="admin" :from="'home'" @hideModal="hideModal" @changeOperation="changeOperation"></dynamicOperation>
<!--评论数据--> <!--评论数据-->
<dynamicDiscuss :list="list" :detail="detail" @getList="getList" @changLiker="changLiker" :type="'dynamic'" @deleteComment="deleteComment"></dynamicDiscuss> <dynamicDiscuss :list="list" :detail="detail" @getList="getList" @changLiker="changLiker" :type="'dynamic'" @signInVerify="signInVerify" @deleteComment="deleteComment"></dynamicDiscuss>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</template> </template>
<script> <script>
@ -32,7 +34,9 @@ wepy.page({
selectIndex: null, selectIndex: null,
detail: {}, detail: {},
dynamicList: [], dynamicList: [],
list: [] // 评论列表数据 list: [], // 评论列表数据
loginShow: false
}, },
async onShareAppMessage(res) { async onShareAppMessage(res) {
let that = this let that = this
@ -68,6 +72,14 @@ wepy.page({
} }
}, },
methods: { methods: {
signInVerify() {
let vm = this
vm.loginShow = true
},
hiddenLogin() {
let vm = this
vm.loginShow = false
},
getDetail() { getDetail() {
let vm = this let vm = this
vm.$get({url: `${service.host}/moment/${vm.id}`}).then(({code, data}) => { vm.$get({url: `${service.host}/moment/${vm.id}`}).then(({code, data}) => {
@ -183,6 +195,8 @@ usingComponents: {
dynamicList: '~@/components/dynamicList', dynamicList: '~@/components/dynamicList',
dynamicOperation: '~@/components/dynamicOperation', dynamicOperation: '~@/components/dynamicOperation',
dynamicDiscuss: '~@/components/dynamicDiscuss', dynamicDiscuss: '~@/components/dynamicDiscuss',
} loginDialog: '~@/components/loginDialog',
}
} }
</config> </config>

View File

@ -349,6 +349,10 @@ wepy.page({
methods: { methods: {
saveIssue() { saveIssue() {
let vm = this let vm = this
if (!vm.$signInVerify()) {
vm.loginShow = true
return
}
let data = { let data = {
topic_id: vm.id * 1, topic_id: vm.id * 1,
content: vm.value, content: vm.value,

View File

@ -394,10 +394,10 @@ wepy.page({
jumpPath(url) { jumpPath(url) {
let vm = this let vm = this
// 校验是否完成注册资料 // 校验是否完成注册资料
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
vm.loginShow = true // vm.loginShow = true
return // return
} // }
wx.navigateTo({url: url}) wx.navigateTo({url: url})
}, },
signInVerify() { signInVerify() {

View File

@ -801,11 +801,11 @@ wepy.page({
}, },
jumpPath(url) { jumpPath(url) {
let vm = this let vm = this
// 校验是否完成注册资料 // // 校验是否完成注册资料
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
vm.loginShow = true // vm.loginShow = true
return // return
} // }
wx.navigateTo({url: url}) wx.navigateTo({url: url})
}, },
hiddenLogin() { hiddenLogin() {
@ -889,8 +889,17 @@ wepy.page({
if (!vm.userInfo) { if (!vm.userInfo) {
console.log('444') console.log('444')
setTimeout(() => { setTimeout(() => {
wx.switchTab({url: '/pages/tabBar/home'}) vm.getTopUser()
}, 3000) vm.getArea()
vm.getEveryday()
vm.getSquare()
vm.applyTopUpState()
vm.getBannerList()
vm.advModal = wx.getStorageSync('adv')
if ((vm.advModal.id - 0) > 0) {
vm.modalName = 'showAdv'
}
}, 1200)
} else { } else {
vm.getTopUser() vm.getTopUser()
vm.getArea() vm.getArea()

View File

@ -446,10 +446,10 @@ wepy.page({
jumpPath(e) { jumpPath(e) {
let vm = this let vm = this
// 校验是否完成注册资料 // 校验是否完成注册资料
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
vm.loginShow = true // vm.loginShow = true
return // return
} // }
wx.navigateTo({url: e.path}) wx.navigateTo({url: e.path})
}, },
hiddenLogin() { hiddenLogin() {

View File

@ -33,11 +33,11 @@
<view class="dredge bold" @tap="goto('/pages/users/upgradeVIP')">去开通</view> <view class="dredge bold" @tap="goto('/pages/users/upgradeVIP')">去开通</view>
</block> </block>
</view> </view>
<view style="background: #FAF9F9;width: 100%;padding-top: 12rpx;position:relative;"> <!-- <view style="background: #FAF9F9;width: 100%;padding-top: 12rpx;position:relative;">-->
<view class="d_close" @tap="hideIphoneBtn"></view> <!-- <view class="d_close" @tap="hideIphoneBtn"></view>-->
<button class="u_lst f-fbc btn getUserIphone" v-if="isShowIphoneBtn" open-type="getPhoneNumber" <!-- <button class="u_lst f-fbc btn getUserIphone" v-if="isShowIphoneBtn" open-type="getPhoneNumber"-->
bindgetphonenumber="getPhoneNumber"></button> <!-- bindgetphonenumber="getPhoneNumber"></button>-->
</view> <!-- </view>-->
</view> </view>
<view class="m_spr"> <view class="m_spr">
<view class="u_spr f-fbc"> <view class="u_spr f-fbc">
@ -697,16 +697,16 @@
vm = this, {id} = wx.getStorageSync('userInfo') vm = this, {id} = wx.getStorageSync('userInfo')
// 校验是否完成注册资料 // 校验是否完成注册资料
console.log(vm.$signInVerify(), 'vm.$signInVerify()===') console.log(vm.$signInVerify(), 'vm.$signInVerify()===')
if (!vm.$signInVerify()) { // if (!vm.$signInVerify()) {
console.log('000') // console.log('000')
vm.loginShow = true // vm.loginShow = true
return // return
} // }
if (titles.includes(text) && !is_base_info) { // if (titles.includes(text) && !is_base_info) {
vm.showVisitorModel = true // vm.showVisitorModel = true
return // return
// return vm.$invoke('visitorModel', 'showModal', '0') // 游客模式,无法查看 // // return vm.$invoke('visitorModel', 'showModal', '0') // 游客模式,无法查看
} // }
// vm.$parent.getEvent(vm.config.navigationBarTitleText, `点击${text}`, `userID=${id}`) // vm.$parent.getEvent(vm.config.navigationBarTitleText, `点击${text}`, `userID=${id}`)
vm.modalName = '' vm.modalName = ''
vm.hide = true vm.hide = true

View File

@ -93,6 +93,8 @@
<view class="Know font_32" @tap="vanish">我知道了</view> <view class="Know font_32" @tap="vanish">我知道了</view>
</view> </view>
</view> </view>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</template> </template>
<script> <script>
@ -120,7 +122,8 @@
], ],
tempId: [], // 模板id tempId: [], // 模板id
system: wx.getStorageSync('system'), system: wx.getStorageSync('system'),
approve_time: 0 approve_time: 0,
loginShow: false
}, },
onShow() { onShow() {
this.$showLoading('加载中') this.$showLoading('加载中')
@ -200,17 +203,22 @@
let vm = this let vm = this
console.log(this.mobile, 'url===') console.log(this.mobile, 'url===')
if ((text == '真人认证' || text == '学历认证') && !this.mobile) { if ((text == '真人认证' || text == '学历认证') && !this.mobile) {
wx.showModal({ if (!vm.$signInVerify()) {
title: '温馨提示', console.log('000')
content: '请先绑定手机号后再真人认证', vm.loginShow = true
success(res) { return
if (res.confirm) { }
vm.$goto('/pages/home/information') // wx.showModal({
} else if (res.cancel) { // title: '温馨提示',
console.log('用户点击取消') // content: '请先绑定手机号后再真人认证',
} // success(res) {
} // if (res.confirm) {
}) // vm.$goto('/pages/home/information')
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
return return
} }
if (text == '学历认证' && this.is_real_approved !== 1) { if (text == '学历认证' && this.is_real_approved !== 1) {
@ -260,6 +268,10 @@
}, },
vanish() { vanish() {
this.modalName = '' this.modalName = ''
},
hiddenLogin() {
let vm = this
vm.loginShow = false
} }
} }
}) })
@ -450,7 +462,8 @@
backgroundColorTop: '#ffffff', backgroundColorTop: '#ffffff',
backgroundColorBottom: '#ffffff', backgroundColorBottom: '#ffffff',
usingComponents: { usingComponents: {
cuCustom: '~@/components/cuCustom' cuCustom: '~@/components/cuCustom',
} loginDialog: '~@/components/loginDialog',
}
} }
</config> </config>

View File

@ -43,7 +43,9 @@
</block> </block>
</view> </view>
</view> </view>
<UnlockingDialog :modalName="unlockIngModalName" @unlockingCut="unlockingCut" @toUpdateCut-="toUpdateCut"></UnlockingDialog> <UnlockingDialog :modalName="unlockIngModalName" @unlockingCut="unlockingCut" @toUpdateCut-="toUpdateCut" @signInVerify="signInVerify"></UnlockingDialog>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</template> </template>
<script> <script>
@ -153,7 +155,8 @@
path: '/pages/users/aboutLove' path: '/pages/users/aboutLove'
} }
] ]
] ],
loginShow: false
}, },
watch: { watch: {
@ -166,6 +169,14 @@
this.system = app.globalData.systemInfo.system.split(' ')[0] this.system = app.globalData.systemInfo.system.split(' ')[0]
}, },
methods: { methods: {
signInVerify() {
let vm = this
vm.loginShow = true
},
hiddenLogin() {
let vm = this
vm.loginShow = false
},
vipData() { vipData() {
this.$get({url: service.host + '/user/center'}).then(({code, data}) => { this.$get({url: service.host + '/user/center'}).then(({code, data}) => {
this.rankData = data.rank_profile this.rankData = data.rank_profile
@ -378,6 +389,8 @@ backgroundColorBottom: '#f2f2f2',
usingComponents: { usingComponents: {
UnlockingDialog: '~@/components/UnlockingDialog', UnlockingDialog: '~@/components/UnlockingDialog',
shareComponent: '~@/components/shareComponent', shareComponent: '~@/components/shareComponent',
} loginDialog: '~@/components/loginDialog',
}
} }
</config> </config>

View File

@ -121,6 +121,7 @@
</view> </view>
</view> </view>
<view style="height: 120rpx;"></view> <view style="height: 120rpx;"></view>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</template> </template>
@ -167,7 +168,8 @@
paymentAmount: 0, paymentAmount: 0,
coinMoney: 0, coinMoney: 0,
deductionPrice: 0, deductionPrice: 0,
bgVip: 'background: #333333;\ncolor: white' bgVip: 'background: #333333;\ncolor: white',
loginShow: false
}, },
computed: { computed: {
residue() { residue() {
@ -297,6 +299,10 @@
}, 800) }, 800)
}, },
showFn (index) { // 弹框支付 showFn (index) { // 弹框支付
if (!this.$signInVerify()) {
this.loginShow = true
return
}
if (this.system == 'iOS') { if (this.system == 'iOS') {
this.modalName = 'showTips' this.modalName = 'showTips'
return return
@ -397,6 +403,10 @@
}, },
payChoice(e) { payChoice(e) {
this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e
},
hiddenLogin() {
let vm = this
vm.loginShow = false
} }
} }
}) })
@ -613,7 +623,9 @@
backgroundColorTop: '#f2f2f2', backgroundColorTop: '#f2f2f2',
backgroundColorBottom: '#f2f2f2', backgroundColorBottom: '#f2f2f2',
usingComponents: { usingComponents: {
cuCustom: '~@/components/cu-custom' cuCustom: '~@/components/cu-custom',
} loginDialog: '~@/components/loginDialog',
}
} }
</config> </config>

View File

@ -121,6 +121,8 @@
</view> </view>
</view> </view>
<view style="height: 120rpx;"></view> <view style="height: 120rpx;"></view>
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
</template> </template>
<script> <script>
@ -168,7 +170,9 @@
wxPayShow: 'cash', wxPayShow: 'cash',
coinMoney: 0, coinMoney: 0,
deductionPrice: 0, deductionPrice: 0,
bgVip: 'background: #333333;\ncolor: white' bgVip: 'background: #333333;\ncolor: white',
loginShow: false
}, },
computed: { computed: {
residue() { residue() {
@ -347,6 +351,10 @@
}, 800) }, 800)
}, },
showFn (index) { // 弹框支付 showFn (index) { // 弹框支付
if (!this.$signInVerify()) {
this.loginShow = true
return
}
this.wxPayShow = 'cash' this.wxPayShow = 'cash'
this.coinMoney = (this.payData.coin / 10).toFixed(2) this.coinMoney = (this.payData.coin / 10).toFixed(2)
// this.deductionPrice = this.payData.coin >= this.specialVIP.can_coin_amount ? (this.payData.discount_price - this.specialVIP.can_cash_amount).toFixed(2) : (this.payData.discount_price - this.coinMoney).toFixed(2) // this.deductionPrice = this.payData.coin >= this.specialVIP.can_coin_amount ? (this.payData.discount_price - this.specialVIP.can_cash_amount).toFixed(2) : (this.payData.discount_price - this.coinMoney).toFixed(2)
@ -460,6 +468,10 @@
}, },
payChoice(e) { payChoice(e) {
this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e
},
hiddenLogin() {
let vm = this
vm.loginShow = false
} }
} }
}) })
@ -686,7 +698,9 @@
backgroundColorTop: '#f2f2f2', backgroundColorTop: '#f2f2f2',
backgroundColorBottom: '#f2f2f2', backgroundColorBottom: '#f2f2f2',
usingComponents: { usingComponents: {
cuCustom: '~@/components/cu-custom' cuCustom: '~@/components/cu-custom',
} loginDialog: '~@/components/loginDialog',
}
} }
</config> </config>