更新
This commit is contained in:
parent
255a1a5f71
commit
bef074338d
@ -20,7 +20,9 @@ export function addCart(data) {
|
||||
* 根据店铺id 获取店铺信息
|
||||
*/
|
||||
export function getProductInfo(data) {
|
||||
return request.get(`scanPay/product`, data);
|
||||
return request.get(`scanPay/product`, data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
@ -108,6 +113,7 @@
|
||||
title: '授权提醒',
|
||||
info: '请授权头像等信息,以便为您提供更好的服务!',
|
||||
//#endif
|
||||
payInfo: '',
|
||||
canUseGetUserProfile: false,
|
||||
code: null,
|
||||
top: 0,
|
||||
@ -146,6 +152,9 @@
|
||||
this.editModal = false
|
||||
},
|
||||
// #endif
|
||||
setPayInfo(e){
|
||||
this.payInfo = e;
|
||||
},
|
||||
setAuthStatus() {
|
||||
//#ifdef MP
|
||||
Routine.authorize().then(res => {
|
||||
@ -317,6 +326,7 @@
|
||||
}
|
||||
|
||||
.Popup .bottom .item {
|
||||
flex: 1;
|
||||
width: 250rpx;
|
||||
height: 80rpx;
|
||||
background-color: #eeeeee;
|
||||
|
@ -112,7 +112,7 @@
|
||||
{
|
||||
"path": "pages/payment/get_payment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提货付款",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
@ -52,8 +52,8 @@
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text style="margin-top: 60rpx;">{{tips}}</text>
|
||||
<!-- 登陆 -->
|
||||
<authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
@onLoadFun="onLoadFun">
|
||||
<authorize ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
@onLoadFun="onLoadFun" :isPay="true">
|
||||
</authorize>
|
||||
</view>
|
||||
</view>
|
||||
@ -70,7 +70,7 @@
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
export default {
|
||||
components: {
|
||||
authorize
|
||||
@ -92,6 +92,7 @@ import { Toast } from "../../libs/uniApi";
|
||||
total_amount: ''
|
||||
},
|
||||
merchantInfo: '',
|
||||
mer_name: '',
|
||||
checkForm: {
|
||||
address_id: '',
|
||||
cart_id: [],
|
||||
@ -114,19 +115,12 @@ import { Toast } from "../../libs/uniApi";
|
||||
},
|
||||
onShow() {
|
||||
if (!this.isLogin) {
|
||||
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true;
|
||||
if(this.isWeixin) {
|
||||
this.tips = '加载中...';
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.authRef.toWecahtAuth();
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.checkForm.cart_id = [];
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true;
|
||||
}
|
||||
this.checkForm.cart_id = [];
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
},
|
||||
methods: {
|
||||
validateDecimal(event) {
|
||||
@ -190,12 +184,20 @@ import { Toast } from "../../libs/uniApi";
|
||||
getProductInfo({
|
||||
mer_id: merid
|
||||
}).then(res => {
|
||||
this.merchantInfo = res.data;
|
||||
this.merchantInfo = res.data;
|
||||
let mer_name = '';
|
||||
if(this.merchantInfo.merchant&&this.merchantInfo.merchant.mer_name) mer_name = this.merchantInfo.merchant.mer_name || '';
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.authRef.setPayInfo(mer_name);
|
||||
})
|
||||
}).catch((err) => {
|
||||
this.tips = err.message || err.smg || err;
|
||||
this.$util.Tips({
|
||||
title: err.message || err.msg || err
|
||||
})
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.authRef.setPayInfo('');
|
||||
})
|
||||
// #ifdef APP
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
|
Loading…
x
Reference in New Issue
Block a user