This commit is contained in:
weipengfei 2024-03-21 10:11:41 +08:00
parent f0d75a0ae0
commit fc75cc723f
6 changed files with 33 additions and 15 deletions

View File

@ -6,7 +6,7 @@
<image class="image" :src='routine_logo' mode="aspectFit"></image>
</view> -->
<!--#ifdef H5-->
<text v-if="isWeixin" class='title'>授权提醒</text>
<text v-if="isWeixin" class='title'>{{isPay?'付款提醒':'授权提醒'}}</text>
<text v-else class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
@ -16,7 +16,7 @@
<text class='title'>{{title}}</text>
<!--#endif-->
<!--#ifdef H5-->
<text v-if="isWeixin" class='tip'>请授权头像等信息以便为您提供更好的服务</text>
<text v-if="isWeixin" class='tip'>{{ isPay ? payInfo : '请授权头像等信息,以便为您提供更好的服务!'}}</text>
<text v-else class='tip'>{{info}}</text>
<!--#endif-->
<!--#ifdef APP-PLUS-->
@ -26,7 +26,8 @@
<text class='tip'>{{info}}</text>
<!--#endif-->
<view class='bottom flex'>
<text class='item' @click='close'>随便逛逛</text>
<text v-if="isPay" class='item' @click='toWecahtAuth'>取消</text>
<text v-else class='item' @click='close'>随便逛逛</text>
<!-- #ifdef MP -->
<button class="item grant" hover-class="none" @tap="getUserProfile"><text
class="text">去授权</text></button>
@ -38,7 +39,7 @@
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="item grant" @tap="toWecahtAuth">
<text v-if="isWeixin" class="text">去授权</text>
<text v-if="isWeixin" class="text">{{isPay?'去支付':'去授权'}}</text>
<text v-else class="text">去登录</text>
</button>
<!-- #endif -->
@ -89,7 +90,11 @@
isShowAuth: {
type: Boolean,
default: false
}
},
isPay:{
type: Boolean,
default: false
},
},
components: {
// #ifdef MP
@ -102,11 +107,13 @@
info: '请登录,将为您提供更好的服务!',
//#ifdef H5
isWeixin: this.$wechat.isWeixin(),
// isWeixin: false, //
//#endif
//#ifdef MP
title: '授权提醒',
info: '请授权头像等信息,以便为您提供更好的服务!',
//#endif
payInfo: '',
canUseGetUserProfile: false,
code: null,
top: 0,
@ -145,6 +152,9 @@
this.editModal = false
},
// #endif
setPayInfo(e){
this.payInfo = e;
},
setAuthStatus() {
//#ifdef MP
Routine.authorize().then(res => {
@ -192,7 +202,7 @@
url: '/pages/users/login/login_copy'
})
// console.log(22);
return
return;
let self = this;
Routine.getUserProfile()
.then(res => {
@ -232,7 +242,6 @@
title: res.message,
icon: 'none',
duration: 2000,
});
});
})
@ -316,6 +325,7 @@
}
.Popup .bottom .item {
flex: 1;
width: 250rpx;
height: 80rpx;
background-color: #eeeeee;
@ -342,7 +352,7 @@
.Popup .bottom .item.grant {
font-weight: bold;
background-color: #E93323;
background-color: #40ae36;
/* background-color: var(--view-theme); */
border-radius: 0;
padding: 0;

View File

@ -48,7 +48,7 @@ export function toLogin(push, pathLogin) {
// #endif
if (!pathLogin)
pathLogin = '/page/users/login/login_copy'
Cache.set('login_back_url', path);
Cache.set('login_back_url', path);
// #ifdef H5
if (isWeixin()) {
if (Cache.get('WECHAT_APPID')) {

View File

@ -19,12 +19,14 @@ import skeleton from './components/skeleton/index.vue'
import BaseMoney from './components/BaseMoney.vue';
import loadmore from './components/loadmore';
import Loading from './components/Loading.vue';
import barcode from "@/components/barcode.vue"
import barcode from "@/components/barcode.vue";
import Authorize from "@/components/Authorize.vue";
Vue.component('skeleton', skeleton)
Vue.component('BaseMoney', BaseMoney)
Vue.component('loadmore', loadmore)
Vue.component('Loading', Loading)
Vue.component('barcode', barcode)
Vue.component('Authorize', Authorize)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "2.0.02",
"versionCode" : 2002,
"versionName" : "2.0.03",
"versionCode" : 2003,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -416,6 +416,7 @@
<!-- #endif -->
<!--套餐产品弹窗-->
<discounts-goods ref="discounts" :id="id" :uid="uid"></discounts-goods>
<Authorize :isShowAuth="isShowAuth" :isGoIndex="false" @authColse="isShowAuth=false"></Authorize>
</view>
</view>
</template>
@ -590,6 +591,7 @@
currentPage: false,
homeTop: 59,
sale_type: 1, //1-, 2-
isShowAuth: false,
selectNavList: [{
name: '首页',
icon: 'icon-shouye8',
@ -1473,7 +1475,8 @@
*/
goBuy: function(e) {
if (this.isLogin === false) {
toLogin()
// toLogin()
this.isShowAuth = true;
} else {
this.goCat(true);
}

View File

@ -171,6 +171,7 @@
<!-- 组件 -->
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<Authorize :isShowAuth="isShowAuth"></Authorize>
<!--自定义底部tab栏-->
<customTab :newData="newData" :activeRouter="activeRouter"></customTab>
</view>
@ -293,7 +294,8 @@
userInfo: {},
mer_info: {
mer_settlement_agree_status: 0
}
},
isShowAuth: false
};
},
computed: configMap({
@ -334,7 +336,8 @@
})
} else {
setTimeout(() => {
toLogin()
// toLogin()
this.isShowAuth = true;
}, 300);
}
},