feat(withdraw): 落地方案B一体化商城余额提现与手续费内扣模式,完善多端打款退款与对账闭环
这个提交包含在:
@@ -21,7 +21,7 @@ function load() {
|
||||
// 微信小程序静默授权登陆
|
||||
const login = async () => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const { code } = await third.wechat.login(
|
||||
const res = await third.wechat.login(
|
||||
{
|
||||
platform: 'miniProgram',
|
||||
|
||||
@@ -36,11 +36,14 @@ const login = async () => {
|
||||
},
|
||||
);
|
||||
|
||||
if (code > 0) {
|
||||
resolve(code);
|
||||
if (res?.code > 0) {
|
||||
if (res.data?.openid) {
|
||||
uni.setStorageSync('openid', res.data.openid);
|
||||
}
|
||||
resolve(res.code);
|
||||
}
|
||||
|
||||
if (code === -1) {
|
||||
if (res?.code === -1) {
|
||||
getSessionId(false);
|
||||
}
|
||||
resolve(false);
|
||||
@@ -80,6 +83,9 @@ const mobileLogin = async (e) => {
|
||||
);
|
||||
|
||||
if (res?.code === 1) {
|
||||
if (res.data?.openid) {
|
||||
uni.setStorageSync('openid', res.data.openid);
|
||||
}
|
||||
resolve(true);
|
||||
return;
|
||||
}
|
||||
@@ -104,6 +110,9 @@ const mobileLogin = async (e) => {
|
||||
},
|
||||
);
|
||||
if (retryRes?.code === 1) {
|
||||
if (retryRes.data?.openid) {
|
||||
uni.setStorageSync('openid', retryRes.data.openid);
|
||||
}
|
||||
resolve(true);
|
||||
return;
|
||||
}
|
||||
@@ -195,6 +204,9 @@ const getSessionId = async (auto_login = null) => {
|
||||
});
|
||||
if (code === 1) {
|
||||
uni.setStorageSync('sessionId', data.session_id);
|
||||
if (data.openid) {
|
||||
uni.setStorageSync('openid', data.openid);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
在新工单中引用
屏蔽一个用户