新增授权帮助页,授权页添加帮助流程入口
This commit is contained in:
parent
d1c0419d76
commit
1bdc9ecf2f
|
|
@ -10,7 +10,8 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dcloudio/uni-ui": "^1.5.12",
|
"@dcloudio/uni-ui": "^1.5.12",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/helper-string-parser": {
|
||||||
|
|
@ -326,6 +327,12 @@
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.2.0"
|
"vue": "^3.2.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/weixin-js-sdk": {
|
||||||
|
"version": "1.6.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
|
||||||
|
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ==",
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dcloudio/uni-ui": "^1.5.12",
|
"@dcloudio/uni-ui": "^1.5.12",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0",
|
||||||
|
"weixin-js-sdk": "^1.6.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,13 @@
|
||||||
"navigationBarTitleText": "授权"
|
"navigationBarTitleText": "授权"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/auth/help",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "授权帮助"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/activity/activity",
|
"path": "pages/activity/activity",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,10 @@
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="auth-help" @click="goAuthHelp">
|
||||||
|
授权帮助流程
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -48,6 +52,7 @@
|
||||||
import { getEnvironment } from '@/utils/env.js';
|
import { getEnvironment } from '@/utils/env.js';
|
||||||
import http from '@/request/request.js';
|
import http from '@/request/request.js';
|
||||||
import pagesConfig from '@/pages.json';
|
import pagesConfig from '@/pages.json';
|
||||||
|
import wx from 'weixin-js-sdk';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -275,6 +280,30 @@ export default {
|
||||||
const baseUrl = this.getBaseUrl();
|
const baseUrl = this.getBaseUrl();
|
||||||
return baseUrl + '/affiliate-activity/pages/auth/auth';
|
return baseUrl + '/affiliate-activity/pages/auth/auth';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
goAuthHelp() {
|
||||||
|
const env = getEnvironment();
|
||||||
|
if (env.isWechatMiniProgram) {
|
||||||
|
console.log('微信/小程序环境跳转淘宝授权帮助页');
|
||||||
|
wx.miniProgram.navigateTo({
|
||||||
|
url: '/pages/users/tbdesc/index',
|
||||||
|
success: (res) => {
|
||||||
|
console.log('跳转淘宝授权帮助页成功:', res);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
// 兜底方案,跳转小程序失败后跳本项目中的授权帮助页
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/auth/help'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log('其他平台默认跳转授权帮助页');
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/auth/help'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -376,4 +405,11 @@ export default {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.auth-help {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #868C97;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<view class="help-page">
|
||||||
|
<image class="help-image" src="https://imgs.agrimedia.cn/20260605178063075392792.png" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.help-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
background: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.help-image {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 750rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,8 +1,15 @@
|
||||||
{
|
{
|
||||||
"hash": "aee3647b",
|
"hash": "d2066d53",
|
||||||
"configHash": "43aa957d",
|
"configHash": "43aa957d",
|
||||||
"lockfileHash": "32773baf",
|
"lockfileHash": "82969c70",
|
||||||
"browserHash": "732cb9f3",
|
"browserHash": "9269f26f",
|
||||||
"optimized": {},
|
"optimized": {
|
||||||
|
"weixin-js-sdk": {
|
||||||
|
"src": "../../../../../node_modules/weixin-js-sdk/index.js",
|
||||||
|
"file": "weixin-js-sdk.js",
|
||||||
|
"fileHash": "9d4cff9a",
|
||||||
|
"needsInterop": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"chunks": {}
|
"chunks": {}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue