新增授权帮助页,授权页添加帮助流程入口

This commit is contained in:
yankang 2026-08-06 09:35:50 +08:00
parent d1c0419d76
commit 1bdc9ecf2f
6 changed files with 92 additions and 6 deletions

9
package-lock.json generated
View File

@ -10,7 +10,8 @@
"license": "ISC",
"dependencies": {
"@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": {
@ -326,6 +327,12 @@
"peerDependencies": {
"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"
}
}
}

View File

@ -16,6 +16,7 @@
"type": "commonjs",
"dependencies": {
"@dcloudio/uni-ui": "^1.5.12",
"vuex": "^4.1.0"
"vuex": "^4.1.0",
"weixin-js-sdk": "^1.6.5"
}
}

View File

@ -84,6 +84,13 @@
"navigationBarTitleText": "授权"
}
},
{
"path": "pages/auth/help",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "授权帮助"
}
},
{
"path": "pages/activity/activity",
"style": {

View File

@ -41,6 +41,10 @@
</button>
</template>
</view>
<view class="auth-help" @click="goAuthHelp">
授权帮助流程
</view>
</view>
</template>
@ -48,6 +52,7 @@
import { getEnvironment } from '@/utils/env.js';
import http from '@/request/request.js';
import pagesConfig from '@/pages.json';
import wx from 'weixin-js-sdk';
export default {
data() {
@ -275,6 +280,30 @@ export default {
const baseUrl = this.getBaseUrl();
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>
@ -376,4 +405,11 @@ export default {
font-size: 30rpx;
font-weight: 500;
}
.auth-help {
margin-top: 48rpx;
font-size: 32rpx;
color: #868C97;
text-align: center;
}
</style>

28
pages/auth/help.vue Normal file
View File

@ -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>

View File

@ -1,8 +1,15 @@
{
"hash": "aee3647b",
"hash": "d2066d53",
"configHash": "43aa957d",
"lockfileHash": "32773baf",
"browserHash": "732cb9f3",
"optimized": {},
"lockfileHash": "82969c70",
"browserHash": "9269f26f",
"optimized": {
"weixin-js-sdk": {
"src": "../../../../../node_modules/weixin-js-sdk/index.js",
"file": "weixin-js-sdk.js",
"fileHash": "9d4cff9a",
"needsInterop": true
}
},
"chunks": {}
}