From 1d8fb91684da7c04bdfef00cfa6f09ff5aad09a2 Mon Sep 17 00:00:00 2001
From: xuekang <914468783@qq.com>
Date: 星期三, 28 八月 2024 08:24:29 +0800
Subject: [PATCH] 删除未使用api
---
pay/login.vue | 53 +++++++++++++++++++++++++++++++++--------------------
1 files changed, 33 insertions(+), 20 deletions(-)
diff --git a/pay/login.vue b/pay/login.vue
index 286edea..0b2d5a5 100644
--- a/pay/login.vue
+++ b/pay/login.vue
@@ -6,35 +6,48 @@
<script>
import {
- config,
- ACCESSTOKEN
- } from '@/common/config.js';
+ config
+ } from 'common/config.js';
export default {
data() {
return {
+ opt: {},
platform: this.$utils.getPlat()
};
},
onLoad(opt) {
- const redirect_uri = encodeURIComponent(`${config.webURL}/pay/scanpay?cid=${opt.cid}`)
- /*if(uni.getStorageSync('UNIONID'+this.platform)){
+ this.opt = opt
+ },
+ onShow() {
+ let redirect_uri = `${config.webURL}/pay/scanpay?cid=${this.opt.cid||''}&shopId=${this.opt.shopId||''}&activityQrcodeId=${this.opt.activityQrcodeId||''}&smoney=${this.opt.smoney||''}`
+ if(this.platform==2&&uni.getStorageSync('OPENID')){
window.location.href = redirect_uri
return
- }*/
- uni.clearStorage()
- if (this.platform == 2) {
- window.location.href =
- `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
- } else if (this.platform == 5) {
- window.location.href =
- `https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
- } else {
- uni.reLaunch({
- url: `/pay/scanpay?cid=${opt.cid}`
- })
- }
-
- }
+ }
+ if(this.platform==5&&uni.getStorageSync('ALIUSERID')){
+ window.location.href = redirect_uri
+ return
+ }
+ if(this.platform==15&&uni.getStorageSync('UNIONPAYID')){
+ window.location.href = redirect_uri
+ return
+ }
+ redirect_uri = encodeURIComponent(redirect_uri)
+ if (this.platform == 2) {
+ window.location.href =
+ `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${config.wx_appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=0#wechat_redirect`
+ } else if (this.platform == 5) {
+ window.location.href =
+ `https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=${config.ali_appid}&scope=auth_base&redirect_uri=${redirect_uri}&state=STATE`
+ } else if (this.platform == 15) {
+ window.location.href =
+ `https://qr.95516.com/qrcGtwWeb-web/api/userAuth?version=1.0.0&redirectUrl=${redirect_uri}`
+ } else {
+ uni.reLaunch({
+ url: `/pay/scanpay?cid=${this.opt.cid}`
+ })
+ }
+ },
}
</script>
--
Gitblit v1.9.1