This commit is contained in:
weipengfei 2024-01-31 17:31:04 +08:00
parent 47215b2296
commit fad1ca2b30
2 changed files with 67 additions and 26 deletions

View File

@ -883,31 +883,35 @@
checkOpenId(user) {
if (user.wechat_user_id === 0) {
let that = this
wx.getUserInfo({
success: function(res) {
const encryptedData = res.encryptedData
const iv = res.iv
wx.login({
success(res) {
if (res.code) {
bindMp({
code: res.code,
iv: iv,
encryptedData: encryptedData,
phone: that.account
}).then(res => {
// console.log(res);
})
} else {
// console.log('' + res.errMsg)
}
}
})
},
fail(e) {
// console.log('' + res.errMsg)
}
})
try{
wx.getUserInfo({
success: function(res) {
const encryptedData = res.encryptedData
const iv = res.iv
wx.login({
success(res) {
if (res.code) {
bindMp({
code: res.code,
iv: iv,
encryptedData: encryptedData,
phone: that.account
}).then(res => {
// console.log(res);
})
} else {
// console.log('' + res.errMsg)
}
}
})
},
fail(e) {
// console.log('' + res.errMsg)
}
})
}catch(e){
console.log(e);
}
}
// #ifdef APP-PLUS
jpushModule.initJPushService()

View File

@ -434,6 +434,20 @@
<!--优惠明细弹窗-->
<discountDetails :isShowDiscount="isShowDiscount" @close="closeDiscount" :couponData="couponData">
</discountDetails>
<uni-popup ref="tipsRef">
<view class="tips_popup">
<image class="r_c_gb" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9b08120240131172018671.png"></image>
<view class="ref_content">
<view class="r_c_title">优惠提示</view>
<view class="r_c_text">当前订单金额已大于100元</view>
<view class="r_c_text">建议参与惠农供销活动进行购买下单满100元即可获得红包</view>
<view class="r_c_btn">
<button class="r_c_btn1">继续支付</button>
<button class="r_c_btn2">前往活动</button>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
@ -700,8 +714,11 @@
onLoad: function(options) {
this.type_id = options.type_id
this.product_type = options.product_type
this.source = options.source
this.seckillId = options.seckillId
if(options.source) this.source = options.source;
else this.$nextTick(()=>{
this.$refs.tipsRef.open();
})
// #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
// #endif
@ -2626,4 +2643,24 @@
padding-left: 20rpx;
font-size: 25rpx;
}
.tips_popup{
width: 600rpx;
height: 450rpx;
position: relative;
.r_c_gb{
width: 100%;
height: 420rpx;
margin-top: 30rpx;
}
.ref_content{
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
.r_c_title{
font-weight: blod;
}
}
}
</style>