This commit is contained in:
wpf 2024-03-05 17:26:20 +08:00
parent 7b82ecd876
commit 1dc9449e47
2 changed files with 19 additions and 14 deletions

View File

@ -2,8 +2,8 @@
"name" : "惠农生活", "name" : "惠农生活",
"appid" : "__UNI__3A527D1", "appid" : "__UNI__3A527D1",
"description" : "", "description" : "",
"versionName" : "1.9.6", "versionName" : "1.9.7",
"versionCode" : 196, "versionCode" : 197,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {
@ -132,12 +132,7 @@
"name" : "amapIvoVHpJR" "name" : "amapIvoVHpJR"
} }
}, },
"oauth" : { "oauth" : {},
"weixin" : {
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://shop.lihaink.cn/"
}
},
"ad" : {}, "ad" : {},
"push" : {}, "push" : {},
"speech" : {} "speech" : {}

View File

@ -142,6 +142,8 @@
</checkbox-group> </checkbox-group>
</div> </div>
</div> </div>
<!-- <button @click="wxLogin">微信登录</button> -->
</div> </div>
<div class="bottom"></div> <div class="bottom"></div>
<view class="settlementAgreement" v-if="showAgreement"> <view class="settlementAgreement" v-if="showAgreement">
@ -523,10 +525,12 @@ import { Toast } from "../../../libs/uniApi";
provider: 'weixin', provider: 'weixin',
// onlyAuthorize: true, // onlyAuthorize: true,
success: function(loginRes) { success: function(loginRes) {
self.appUserInfo = loginRes console.log(loginRes);
self.appUserInfo = loginRes;
self.wxLoginApi() self.wxLoginApi()
}, },
fail(error) { fail(error) {
console.log(error);
uni.showToast({ uni.showToast({
title: '登录失败', title: '登录失败',
icon: 'none', icon: 'none',
@ -547,11 +551,16 @@ import { Toast } from "../../../libs/uniApi";
commonAuth({ commonAuth({
auth: { auth: {
type: 'app_wechat', type: 'app_wechat',
auth: { // auth: {
code: that.appUserInfo.authResult.access_token, // code: that.appUserInfo.authResult.access_token,
openid: that.appUserInfo.authResult.openid, // openid: that.appUserInfo.authResult.openid,
phone: this.account, // phone: this.account,
} // }
auth: {
code: that.appUserInfo.authResult.access_token,
openid: that.appUserInfo.authResult.openid,
phone: this.account,
}
} }
}).then(res => { }).then(res => {
const data = res.data; const data = res.data;
@ -590,6 +599,7 @@ import { Toast } from "../../../libs/uniApi";
} }
uni.hideLoading(); uni.hideLoading();
}).catch(res => { }).catch(res => {
console.log(res);
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: res.message || res, title: res.message || res,