修复微信授权bug
This commit is contained in:
parent
0957979d20
commit
b3bdfe373a
@ -12,8 +12,8 @@ let httpApiSix
|
|||||||
let wsApi
|
let wsApi
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
@ -206,7 +206,7 @@ class AuthWechat {
|
|||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('auth_token', res.data.result.key);
|
uni.setStorageSync('auth_token', res.data.result.key);
|
||||||
return uni.navigateTo({
|
return uni.navigateTo({
|
||||||
url: '/pages/users/login/index'
|
url: '/pages/users/login/login_copy'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.9.4",
|
"versionName" : "1.9.5",
|
||||||
"versionCode" : 194,
|
"versionCode" : 195,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
console.log(option);
|
||||||
let that = this
|
let that = this
|
||||||
const {
|
const {
|
||||||
code,
|
code,
|
||||||
@ -33,12 +34,13 @@
|
|||||||
} = option;
|
} = option;
|
||||||
wechat.auth(code, state)
|
wechat.auth(code, state)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// console.log(decodeURIComponent(decodeURIComponent(option.back_url)),'back_url')
|
console.log('----', decodeURIComponent(decodeURIComponent(option.back_url)),'back_url')
|
||||||
const href = decodeURIComponent(decodeURIComponent(option.back_url))
|
const href = decodeURIComponent(decodeURIComponent(option.back_url))
|
||||||
location.replace(href)
|
location.replace(href)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
location.replace("/");
|
console.log('----', {...err})
|
||||||
|
location.replace("/pages/users/login/login_copy");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,56 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container" v-if="merchantInfo && !isEmpty">
|
<view>
|
||||||
<view class="v-navbar">
|
<view class="container" v-if="merchantInfo && !isEmpty">
|
||||||
<u-navbar title="面对面收款" :safeAreaInsetTop="false" :fixed="false" :autoBack="true" bgColor="transparent"
|
<view class="v-navbar">
|
||||||
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
<u-navbar title="面对面收款" :safeAreaInsetTop="false" :fixed="false" :autoBack="true" bgColor="transparent"
|
||||||
</u-navbar>
|
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
||||||
</view>
|
</u-navbar>
|
||||||
|
</view>
|
||||||
<view class="v-desc">
|
|
||||||
<view>
|
<view class="v-desc">
|
||||||
<view class="v-desc-main">付款给商家</view>
|
<view>
|
||||||
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
|
<view class="v-desc-main">付款给商家</view>
|
||||||
</view>
|
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
|
||||||
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
|
</view>
|
||||||
:radius="10" />
|
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
|
||||||
</view>
|
:radius="10" />
|
||||||
|
</view>
|
||||||
<!-- 付款金额 -->
|
|
||||||
<view class="v-con">
|
<!-- 付款金额 -->
|
||||||
<view class="v-con-text">付款金额</view>
|
<view class="v-con">
|
||||||
<view class="v-con-input">
|
<view class="v-con-text">付款金额</view>
|
||||||
<text style="color: #303133;font-size:46rpx;">¥</text>
|
<view class="v-con-input">
|
||||||
<u--input type="number" maxlength="5" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
<text style="color: #303133;font-size:46rpx;">¥</text>
|
||||||
border="none" placeholderStyle="color:#999;font-size:30rpx">
|
<u--input type="number" maxlength="5" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
||||||
</u--input>
|
border="none" placeholderStyle="color:#999;font-size:30rpx">
|
||||||
</view>
|
</u--input>
|
||||||
|
</view>
|
||||||
<view class="v-wrap" v-if="cartForm.total_amount">
|
|
||||||
<view class="v-wrap-money">
|
<view class="v-wrap" v-if="cartForm.total_amount">
|
||||||
<text class="icon">¥</text>
|
<view class="v-wrap-money">
|
||||||
<text class="num">{{cartForm.total_amount}}</text>
|
<text class="icon">¥</text>
|
||||||
</view>
|
<text class="num">{{cartForm.total_amount}}</text>
|
||||||
<view class="v-wrap-desc">
|
</view>
|
||||||
<view class="v-wrap-desc-main">实物提货券</view>
|
<view class="v-wrap-desc">
|
||||||
<view class="v-wrap-desc-sub">即买即用</view>
|
<view class="v-wrap-desc-main">实物提货券</view>
|
||||||
</view>
|
<view class="v-wrap-desc-sub">即买即用</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
<view class="v-btn-wrap">
|
|
||||||
<view class="v-btn" @click="submitOrder">提交订单</view>
|
<view class="v-btn-wrap">
|
||||||
</view>
|
<view class="v-btn" @click="submitOrder">提交订单</view>
|
||||||
<!-- 登陆 -->
|
</view>
|
||||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
<!-- 登陆 -->
|
||||||
</view>
|
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
||||||
|
</view>
|
||||||
<!-- 无商户信息提示 -->
|
|
||||||
<view v-else class="empty">
|
<!-- 无商户信息提示 -->
|
||||||
<image src="/static/images/no_thing.png"></image>
|
<view v-else class="empty">
|
||||||
<text>暂未登陆~</text>
|
<image src="/static/images/no_thing.png"></image>
|
||||||
<!-- 登陆 -->
|
<text>暂未登陆~</text>
|
||||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
<!-- 登陆 -->
|
||||||
</view>
|
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user