feat: 完成对接
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
# Run the commit-msg hook
|
||||
npx --no-install commitlint --edit
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
# Run the pre-commit hook
|
||||
npx --no-install -- lint-staged
|
||||
@@ -86,6 +86,7 @@
|
||||
"bin-wrapper": "npm:bin-wrapper-china"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chenfengyuan/vue-qrcode": "^2.0.0",
|
||||
"@dcloudio/uni-app": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4020920240930001",
|
||||
|
||||
@@ -3,7 +3,7 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
|
||||
export default defineUniPages({
|
||||
globalStyle: {
|
||||
navigationStyle: 'default',
|
||||
navigationBarTitleText: 'unibest',
|
||||
navigationBarTitleText: '',
|
||||
navigationBarBackgroundColor: '#f8f8f8',
|
||||
navigationBarTextStyle: 'black',
|
||||
backgroundColor: '#FFFFFF',
|
||||
@@ -18,25 +18,37 @@ export default defineUniPages({
|
||||
},
|
||||
tabBar: {
|
||||
color: '#999999',
|
||||
selectedColor: '#018d71',
|
||||
backgroundColor: '#F8F8F8',
|
||||
borderStyle: 'black',
|
||||
height: '50px',
|
||||
selectedColor: '#0E57A2',
|
||||
backgroundColor: '#ffffff',
|
||||
borderStyle: '#E7E7E7',
|
||||
height: '56px',
|
||||
fontSize: '10px',
|
||||
iconWidth: '24px',
|
||||
iconWidth: '20px',
|
||||
spacing: '3px',
|
||||
list: [
|
||||
{
|
||||
iconPath: 'static/tabbar/home.png',
|
||||
selectedIconPath: 'static/tabbar/homeHL.png',
|
||||
pagePath: 'pages/index/index',
|
||||
text: '%tabbar.home%',
|
||||
text: '首页',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/example.png',
|
||||
selectedIconPath: 'static/tabbar/exampleHL.png',
|
||||
pagePath: 'pages/about/about',
|
||||
text: '%tabbar.about%',
|
||||
iconPath: 'static/tabbar/invest.png',
|
||||
selectedIconPath: 'static/tabbar/investHL.png',
|
||||
pagePath: 'pages/invest/index',
|
||||
text: '投资',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/house.png',
|
||||
selectedIconPath: 'static/tabbar/houseHL.png',
|
||||
pagePath: 'pages/invite/index',
|
||||
text: '房屋',
|
||||
},
|
||||
{
|
||||
iconPath: 'static/tabbar/personal.png',
|
||||
selectedIconPath: 'static/tabbar/personalHL.png',
|
||||
pagePath: 'pages/my/index',
|
||||
text: '我的',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -11,6 +11,9 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@chenfengyuan/vue-qrcode':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(qrcode@1.5.4)(vue@3.4.21(typescript@5.7.2))
|
||||
'@dcloudio/uni-app':
|
||||
specifier: 3.0.0-4020920240930001
|
||||
version: 3.0.0-4020920240930001(@dcloudio/types@3.4.14)(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
|
||||
@@ -858,6 +861,12 @@ packages:
|
||||
'@bcoe/v8-coverage@0.2.3':
|
||||
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
|
||||
|
||||
'@chenfengyuan/vue-qrcode@2.0.0':
|
||||
resolution: {integrity: sha512-33Cfr0zjbc3Dd8d5b1IgzXRAgXH0c2Gv19VI4snS25V/x9Z41eg769tC+Us1x+vqgQQhgD5YUjLnkpkrQfeMSw==}
|
||||
peerDependencies:
|
||||
qrcode: ^1.5.0
|
||||
vue: ^3.0.0
|
||||
|
||||
'@commitlint/cli@18.6.1':
|
||||
resolution: {integrity: sha512-5IDE0a+lWGdkOvKH892HHAZgbAjcj1mT5QrfA/SVbLJV/BbBMGyKN0W5mhgjekPJJwEQdVNvhl9PwUacY58Usw==}
|
||||
engines: {node: '>=v18'}
|
||||
@@ -2436,6 +2445,9 @@ packages:
|
||||
resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
cliui@6.0.0:
|
||||
resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
|
||||
|
||||
cliui@7.0.4:
|
||||
resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==}
|
||||
|
||||
@@ -2740,6 +2752,9 @@ packages:
|
||||
resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
|
||||
dijkstrajs@1.0.3:
|
||||
resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==}
|
||||
|
||||
dir-glob@3.0.1:
|
||||
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -4442,6 +4457,10 @@ packages:
|
||||
resolution: {integrity: sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
|
||||
pngjs@5.0.0:
|
||||
resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
||||
possible-typed-array-names@1.0.0:
|
||||
resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -4589,6 +4608,11 @@ packages:
|
||||
resolution: {integrity: sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==}
|
||||
hasBin: true
|
||||
|
||||
qrcode@1.5.4:
|
||||
resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
hasBin: true
|
||||
|
||||
qs@6.13.0:
|
||||
resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
|
||||
engines: {node: '>=0.6'}
|
||||
@@ -4687,6 +4711,9 @@ packages:
|
||||
resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
require-main-filename@2.0.0:
|
||||
resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==}
|
||||
|
||||
requires-port@1.0.0:
|
||||
resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==}
|
||||
|
||||
@@ -4809,6 +4836,9 @@ packages:
|
||||
resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
set-blocking@2.0.0:
|
||||
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
|
||||
|
||||
set-function-length@1.2.2:
|
||||
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -5465,6 +5495,9 @@ packages:
|
||||
resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
which-module@2.0.1:
|
||||
resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==}
|
||||
|
||||
which-typed-array@1.1.16:
|
||||
resolution: {integrity: sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -5488,6 +5521,10 @@ packages:
|
||||
peerDependencies:
|
||||
vue: '>=3.2.47'
|
||||
|
||||
wrap-ansi@6.2.0:
|
||||
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5565,6 +5602,9 @@ packages:
|
||||
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
|
||||
engines: {node: '>=0.4'}
|
||||
|
||||
y18n@4.0.3:
|
||||
resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==}
|
||||
|
||||
y18n@5.0.8:
|
||||
resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5589,6 +5629,10 @@ packages:
|
||||
engines: {node: '>= 14'}
|
||||
hasBin: true
|
||||
|
||||
yargs-parser@18.1.3:
|
||||
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
yargs-parser@20.2.9:
|
||||
resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5597,6 +5641,10 @@ packages:
|
||||
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
yargs@15.4.1:
|
||||
resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
yargs@16.2.0:
|
||||
resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -6388,6 +6436,11 @@ snapshots:
|
||||
|
||||
'@bcoe/v8-coverage@0.2.3': {}
|
||||
|
||||
'@chenfengyuan/vue-qrcode@2.0.0(qrcode@1.5.4)(vue@3.4.21(typescript@5.7.2))':
|
||||
dependencies:
|
||||
qrcode: 1.5.4
|
||||
vue: 3.4.21(typescript@5.7.2)
|
||||
|
||||
'@commitlint/cli@18.6.1(@types/node@20.17.9)(typescript@5.7.2)':
|
||||
dependencies:
|
||||
'@commitlint/format': 18.6.1
|
||||
@@ -8859,6 +8912,12 @@ snapshots:
|
||||
slice-ansi: 5.0.0
|
||||
string-width: 7.2.0
|
||||
|
||||
cliui@6.0.0:
|
||||
dependencies:
|
||||
string-width: 4.2.3
|
||||
strip-ansi: 6.0.1
|
||||
wrap-ansi: 6.2.0
|
||||
|
||||
cliui@7.0.4:
|
||||
dependencies:
|
||||
string-width: 4.2.3
|
||||
@@ -9113,6 +9172,8 @@ snapshots:
|
||||
|
||||
diff-sequences@27.5.1: {}
|
||||
|
||||
dijkstrajs@1.0.3: {}
|
||||
|
||||
dir-glob@3.0.1:
|
||||
dependencies:
|
||||
path-type: 4.0.0
|
||||
@@ -11126,6 +11187,8 @@ snapshots:
|
||||
|
||||
pngjs@3.4.0: {}
|
||||
|
||||
pngjs@5.0.0: {}
|
||||
|
||||
possible-typed-array-names@1.0.0: {}
|
||||
|
||||
postcss-html@1.7.0:
|
||||
@@ -11260,6 +11323,12 @@ snapshots:
|
||||
|
||||
qrcode-terminal@0.12.0: {}
|
||||
|
||||
qrcode@1.5.4:
|
||||
dependencies:
|
||||
dijkstrajs: 1.0.3
|
||||
pngjs: 5.0.0
|
||||
yargs: 15.4.1
|
||||
|
||||
qs@6.13.0:
|
||||
dependencies:
|
||||
side-channel: 1.0.6
|
||||
@@ -11370,6 +11439,8 @@ snapshots:
|
||||
|
||||
require-from-string@2.0.2: {}
|
||||
|
||||
require-main-filename@2.0.0: {}
|
||||
|
||||
requires-port@1.0.0: {}
|
||||
|
||||
resolve-cwd@3.0.0:
|
||||
@@ -11514,6 +11585,8 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
set-blocking@2.0.0: {}
|
||||
|
||||
set-function-length@1.2.2:
|
||||
dependencies:
|
||||
define-data-property: 1.1.4
|
||||
@@ -12262,6 +12335,8 @@ snapshots:
|
||||
is-weakmap: 2.0.2
|
||||
is-weakset: 2.0.3
|
||||
|
||||
which-module@2.0.1: {}
|
||||
|
||||
which-typed-array@1.1.16:
|
||||
dependencies:
|
||||
available-typed-arrays: 1.0.7
|
||||
@@ -12284,6 +12359,12 @@ snapshots:
|
||||
dependencies:
|
||||
vue: 3.4.21(typescript@5.7.2)
|
||||
|
||||
wrap-ansi@6.2.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
string-width: 4.2.3
|
||||
strip-ansi: 6.0.1
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
@@ -12342,6 +12423,8 @@ snapshots:
|
||||
|
||||
xtend@4.0.2: {}
|
||||
|
||||
y18n@4.0.3: {}
|
||||
|
||||
y18n@5.0.8: {}
|
||||
|
||||
yallist@3.1.1: {}
|
||||
@@ -12354,10 +12437,29 @@ snapshots:
|
||||
|
||||
yaml@2.6.1: {}
|
||||
|
||||
yargs-parser@18.1.3:
|
||||
dependencies:
|
||||
camelcase: 5.3.1
|
||||
decamelize: 1.2.0
|
||||
|
||||
yargs-parser@20.2.9: {}
|
||||
|
||||
yargs-parser@21.1.1: {}
|
||||
|
||||
yargs@15.4.1:
|
||||
dependencies:
|
||||
cliui: 6.0.0
|
||||
decamelize: 1.2.0
|
||||
find-up: 4.1.0
|
||||
get-caller-file: 2.0.5
|
||||
require-directory: 2.1.1
|
||||
require-main-filename: 2.0.0
|
||||
set-blocking: 2.0.0
|
||||
string-width: 4.2.3
|
||||
which-module: 2.0.1
|
||||
y18n: 4.0.3
|
||||
yargs-parser: 18.1.3
|
||||
|
||||
yargs@16.2.0:
|
||||
dependencies:
|
||||
cliui: 7.0.4
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
import { onLaunch, onHide } from '@dcloudio/uni-app'
|
||||
import { useUserStore } from './store'
|
||||
import { checkWithRedirectLogin, loginRoute } from './interceptors/route'
|
||||
|
||||
onLaunch(() => {
|
||||
uni.showModal({ title: '提示', content: 'App Launch' })
|
||||
console.log('App Launch')
|
||||
onLaunch((options) => {
|
||||
if (checkWithRedirectLogin(options.path)) {
|
||||
uni.reLaunch({
|
||||
url: loginRoute,
|
||||
// query: {
|
||||
// redirect: options.path,
|
||||
// },
|
||||
})
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
console.log('App Show')
|
||||
|
||||
onPageNotFound(() => {
|
||||
console.log(1)
|
||||
uni.reLaunch({
|
||||
url: '/',
|
||||
})
|
||||
})
|
||||
|
||||
onHide(() => {
|
||||
console.log('App Hide')
|
||||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 覆盖 uniapp 自带rpx效果 */
|
||||
html {
|
||||
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
/* stylelint-disable-next-line selector-type-no-unknown */
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
import DefaultAavatar from '@/static/images/default-avatar.png'
|
||||
|
||||
defineProps({
|
||||
src: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
rounded-full
|
||||
p-4
|
||||
shadow-lg
|
||||
style="background: linear-gradient(45deg, #3b81f3 0%, #37e6ec 100%)"
|
||||
>
|
||||
<image
|
||||
block
|
||||
overflow-hidden
|
||||
rounded-full
|
||||
style="background: linear-gradient(180deg, #96e517 0%, #8bc135 100%)"
|
||||
class="h-full w-full"
|
||||
:src="src ?? DefaultAavatar"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<wd-navbar
|
||||
:title="title"
|
||||
custom-class="!bg-transparent"
|
||||
:left-arrow="showBack"
|
||||
:bordered="false"
|
||||
safeAreaInsetTop
|
||||
@click-left="handleClickLeft"
|
||||
>
|
||||
<template #right>
|
||||
<slot name="right" />
|
||||
</template>
|
||||
</wd-navbar>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getLastPage } from '@/utils'
|
||||
const title = getLastPage().$page.meta.navigationBar.titleText
|
||||
const showBack = getCurrentPages().length > 1
|
||||
const handleClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
:deep(.wd-navbar) {
|
||||
--wot-navbar-title-font-size: 32rpx;
|
||||
// --wot-navbar-title-font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +1,3 @@
|
||||
export { routeInterceptor } from './route'
|
||||
export { routeInterceptor, routerBeforeEachConfig } from './route'
|
||||
export { requestInterceptor } from './request'
|
||||
export { prototypeInterceptor } from './prototype'
|
||||
|
||||
@@ -5,14 +5,19 @@
|
||||
* 我这里应为大部分都可以随便进入,所以使用黑名单
|
||||
*/
|
||||
import { useUserStore } from '@/store'
|
||||
import { getNeedLoginPages, needLoginPages as _needLoginPages } from '@/utils'
|
||||
import {
|
||||
getNotNeedLoginPages as _getNotNeedLoginPages,
|
||||
notNeedLoginPages as _notNeedLoginPages,
|
||||
getIsTabbar,
|
||||
} from '@/utils'
|
||||
import type { Router } from 'vue-router'
|
||||
import { tabBar } from '@/pages.json'
|
||||
|
||||
// TODO Check
|
||||
const loginRoute = '/pages/login/index'
|
||||
export const loginRoute = '/pages/login/index'
|
||||
|
||||
const isLogined = () => {
|
||||
export const isLogged = () => {
|
||||
const userStore = useUserStore()
|
||||
return userStore.isLogined
|
||||
return userStore.isLogged
|
||||
}
|
||||
|
||||
const isDev = import.meta.env.DEV
|
||||
@@ -21,26 +26,14 @@ const isDev = import.meta.env.DEV
|
||||
const navigateToInterceptor = {
|
||||
// 注意,这里的url是 '/' 开头的,如 '/pages/index/index',跟 'pages.json' 里面的 path 不同
|
||||
invoke({ url }: { url: string }) {
|
||||
// console.log(url) // /pages/route-interceptor/index?name=feige&age=30
|
||||
const path = url.split('?')[0]
|
||||
let needLoginPages: string[] = []
|
||||
// 为了防止开发时出现BUG,这里每次都获取一下。生产环境可以移到函数外,性能更好
|
||||
if (isDev) {
|
||||
needLoginPages = getNeedLoginPages()
|
||||
} else {
|
||||
needLoginPages = _needLoginPages
|
||||
const isTabbar = getIsTabbar(url)
|
||||
console.log(url)
|
||||
// const redirectRoute = `${loginRoute}?redirect=${encodeURIComponent(url)}`
|
||||
if (isTabbar) {
|
||||
uni.switchTab({ url })
|
||||
return false
|
||||
}
|
||||
const isNeedLogin = needLoginPages.includes(path)
|
||||
if (!isNeedLogin) {
|
||||
return true
|
||||
}
|
||||
const hasLogin = isLogined()
|
||||
if (hasLogin) {
|
||||
return true
|
||||
}
|
||||
const redirectRoute = `${loginRoute}?redirect=${encodeURIComponent(url)}`
|
||||
uni.navigateTo({ url: redirectRoute })
|
||||
return false
|
||||
return true
|
||||
},
|
||||
}
|
||||
|
||||
@@ -51,3 +44,50 @@ export const routeInterceptor = {
|
||||
uni.addInterceptor('redirectTo', navigateToInterceptor)
|
||||
},
|
||||
}
|
||||
|
||||
export const getNotNeedLoginPages = () => {
|
||||
let notNeedLoginPages: string[] = []
|
||||
if (isDev) {
|
||||
notNeedLoginPages = _getNotNeedLoginPages()
|
||||
} else {
|
||||
notNeedLoginPages = _notNeedLoginPages
|
||||
}
|
||||
return notNeedLoginPages
|
||||
}
|
||||
|
||||
export const checkLoginUrl = (url: string) => {
|
||||
const path = url.split('?')[0]
|
||||
const isNotNeedLogin = getNotNeedLoginPages().includes(path.replace(/^pages/, '/pages'))
|
||||
console.log(path)
|
||||
return isNotNeedLogin
|
||||
}
|
||||
|
||||
export const checkWithRedirectLogin = (url: string) => {
|
||||
const isNotNeedLogin = checkLoginUrl(url)
|
||||
if (!isNotNeedLogin) {
|
||||
return !isLogged()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export const checkNotFound = (url: string) => {
|
||||
const isNotNeedLogin = checkLoginUrl(url)
|
||||
if (!isNotNeedLogin) {
|
||||
return !isLogged()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export const routerBeforeEachConfig = (router: Router) => {
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (checkWithRedirectLogin(to.path)) {
|
||||
return next({
|
||||
path: loginRoute,
|
||||
// query: {
|
||||
// redirect: to.fullPath,
|
||||
// },
|
||||
})
|
||||
}
|
||||
return next()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,12 @@ import { createSSRApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import store from './store'
|
||||
import i18n from './locale/index'
|
||||
import { routeInterceptor, requestInterceptor, prototypeInterceptor } from './interceptors'
|
||||
import {
|
||||
routeInterceptor,
|
||||
routerBeforeEachConfig,
|
||||
requestInterceptor,
|
||||
prototypeInterceptor,
|
||||
} from './interceptors'
|
||||
import 'virtual:uno.css'
|
||||
import '@/style/index.scss'
|
||||
|
||||
@@ -13,6 +18,10 @@ export function createApp() {
|
||||
app.use(routeInterceptor)
|
||||
app.use(requestInterceptor)
|
||||
app.use(prototypeInterceptor)
|
||||
|
||||
setTimeout(() => {
|
||||
routerBeforeEachConfig((app as any).router)
|
||||
}, 0)
|
||||
return {
|
||||
app,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '我的资产',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="min-h-screen py-15">
|
||||
<view class="mx-15 text-16 font-bold text-#333">我的资产</view>
|
||||
<view
|
||||
class="mt-15 mx-15 rounded-20 text-#476FFF main-content p-15 rounded-10 shadow-[0_5px_30px_rgba(149,195,255,0.4)]"
|
||||
>
|
||||
<view class="text-14 text-#6784C7">总投资金</view>
|
||||
<view class="text-35 mt-10 font-bold">10000.00</view>
|
||||
<view class="flex mt-15">
|
||||
<view class="flex-1">
|
||||
<view class="text-12 text-#6784C7 font-light">我的分红</view>
|
||||
<view class="text-16 font-bold mt-5">10000.00</view>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="text-12 text-#6784C7 font-light">数字人民币</view>
|
||||
<view class="text-16 font-bold mt-5">10000.00</view>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="text-12 text-#6784C7 font-light">认购点</view>
|
||||
<view class="text-16 font-bold mt-5">10000.00</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-16 mx-15 mb-15 font-bold text-#333 mt-30">资产记录</view>
|
||||
<view
|
||||
class="flex px-15 py-8 border-b items-center border-#E5E5E5 border-b-solid"
|
||||
v-for="item in 10"
|
||||
:key="item"
|
||||
>
|
||||
<image src="/static/images/page-sub/invite-icon.png" class="w-32 h-32 self-center" />
|
||||
<view class="flex flex-col flex-1 ml-15">
|
||||
<view class="text-14 text-#333">邀请好友奖励</view>
|
||||
<view class="text-12 mt-10 text-#999">奖励</view>
|
||||
<view class="text-12 mt-10 text-#999">2024-12-27 10:00:00</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-14 font-bold text-#FF5F5F">+20 股</view>
|
||||
<view class="text-14 mt-10 py-4 px-10 bg-#71C78A1A text-#71C78A">已到账</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.main-content {
|
||||
background-image: url('@/static/images/page-sub/team/main-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,78 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '转换',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<image
|
||||
@click="onWithdrawalDetail"
|
||||
src="/static/images/page-sub/recharge.png"
|
||||
class="w-24 h-24"
|
||||
/>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="p-15">
|
||||
<view class="mt-15">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="text-14 text-#333">我的股数</view>
|
||||
<view class="text-12 text-#999">可转换股数:1202.45</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10"
|
||||
>
|
||||
<input type="number" placeholder="请输入股数" class="text-14 text-#333 flex-1" />
|
||||
<view class="text-12 text-gradient">全部</view>
|
||||
</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">马尔代夫股权每股价值500元</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="bg-white fixed bottom-0 left-0 right-0 px-15 py-10 shadow-[0_0_10px_rgba(10,68,245,0.1)]"
|
||||
>
|
||||
<view class="flex items-center pb-safe">
|
||||
<view
|
||||
class="btn-gradient flex-1 text-center text-white rounded-full text-14 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
>
|
||||
确认转换至余额
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
|
||||
const onWithdrawalDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const onSelectPayType = () => {
|
||||
uni.$once('withdrawal-type', (data: any) => {
|
||||
console.log(data)
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/index?type=select',
|
||||
})
|
||||
}
|
||||
|
||||
const onSubmit = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '转换成功',
|
||||
showCancel: false,
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,23 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '公司简介',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="pt-15 pb-50 min-h-screen">
|
||||
<view class="text-center text-16 font-bold">国际钱包</view>
|
||||
<image
|
||||
class="w-345 h-170 rounded-10 mt-15 mx-auto block"
|
||||
src="@/static/images/page-sub/introduction.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="text-gray-500 mx-16 text-14 mt-15">
|
||||
国际钱包(集团)有限公司由具有160年历史的上海纺织集团和具有70年外贸历史的原东方国际集团联合重组而成,是一家拥有先进制造业与现代服务业,以时尚产业、健康产业和供应链服务为核心主业,以科技实业、产业地产、金融投资为支撑,构建“一体两翼三支撑”总体格局的大型综合性企业集团。名列中国企业500强第275位,上海企业100强第25位。
|
||||
集团拥有总资产627亿元、员工5.8万人(海外员工占70%),2023年快报营业收入780亿元,进出口56.64亿美元(出口41.34亿美元、进口15.3亿美元)。集团在海外拥有96家业务机构,分布在五大洲27个国家和地区。所属企业389家,上市公司4家(东方创业、申达股份、龙头股份、香港联泰控股)。
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -0,0 +1,29 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '投资记录',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<view
|
||||
class="flex px-15 py-8 border-b border-#E5E5E5 border-b-solid"
|
||||
v-for="item in 10"
|
||||
:key="item"
|
||||
>
|
||||
<image src="/static/images/page-sub/money-icon.png" class="w-32 h-32 self-center" />
|
||||
<view class="flex flex-col flex-1 justify-between ml-15">
|
||||
<view class="text-14 text-#333">5G通信</view>
|
||||
<view class="text-12 text-#999">投资</view>
|
||||
<view class="text-12 text-#999">2024-12-27 10:00:00</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-16 text-#FF5F5F">+1000 RMB</view>
|
||||
<view class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A">投资成功</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -0,0 +1,60 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '立即投资',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<image @click="onRecharge" src="/static/images/page-sub/recharge.png" class="w-24 h-24" />
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="p-15">
|
||||
<view class="text-20 text-#333">RMB</view>
|
||||
<view class="mt-15">
|
||||
<view class="text-14 text-#333">投资金额</view>
|
||||
<view class="text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<input type="number" placeholder="请输入投资金额" class="text-14 text-#333" />
|
||||
</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">当前余额:10012.12</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-50">
|
||||
<view class="text-14 text-#333">支付密码</view>
|
||||
<view class="text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<input type="password" placeholder="请输入支付密码" class="text-14 text-#333" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 px-15 pb-safe">
|
||||
<view
|
||||
class="btn-gradient mb-15 text-center text-white rounded-full text-16 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
>
|
||||
提交
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
|
||||
const onRecharge = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/invest-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const onSubmit = () => {
|
||||
uni.redirectTo({
|
||||
url: '/pages-sub/invest-result/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '投资成功',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen flex flex-col items-center justify-center">
|
||||
<image mode="aspectFit" src="/static/images/page-sub/invest-success.png" class="w-150 h-150" />
|
||||
<view class="text-17 text-#333">恭喜您!投资成功</view>
|
||||
<!-- 返回 -->
|
||||
<view class="mt-15">
|
||||
<view @click="onBack" class="btn-gradient text-14 text-white rounded-full px-30 py-10">
|
||||
返回
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const onBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '邀请好友',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
|
||||
const qrcodeValue = '/pages/register/index?invite=888888'
|
||||
|
||||
const onCopy = (code: string) => {
|
||||
uni.setClipboardData({
|
||||
data: code,
|
||||
})
|
||||
}
|
||||
|
||||
const onLottery = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/lottery/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="pb-100 min-h-screen invite-page">
|
||||
<NavBar />
|
||||
<view class="flex justify-center mt-80">
|
||||
<view class="text-white btn-gradient rounded-full px-30 py-10 text-14">邀请好友</view>
|
||||
<view class="ml-15 bg-white rounded-full px-30 py-10 text-14" @click="onLottery">
|
||||
<text class="text-gradient">幸运大转盘</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col items-center mt-180">
|
||||
<view
|
||||
class="flex items-center text-16 text-#333 bg-[rgba(255,255,255,0.8)] rounded-full px-15 py-4 text-12 mt-8"
|
||||
>
|
||||
<view>
|
||||
邀请码
|
||||
<text class="font-bold">9999999</text>
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full px-15 py-4 text-12 ml-10"
|
||||
@click="onCopy('99999')"
|
||||
>
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 rounded-10 overflow-hidden flex">
|
||||
<VueQrcode :value="qrcodeValue" :options="{ size: 200 }" />
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full text-14 px-30 py-8 mt-30"
|
||||
@click="onCopy(qrcodeValue)"
|
||||
>
|
||||
复制邀请链接
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.invite-page {
|
||||
background-image: url('@/static/images/page-sub/invite-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-size: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
</script>
|
||||
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '幸运大转盘',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="min-h-screen">
|
||||
<NavBar />
|
||||
</view>
|
||||
</template>
|
||||
@@ -0,0 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
</script>
|
||||
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '官方社群',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="official-community-page">
|
||||
<NavBar />
|
||||
<view class="p-15 text-center bg-white rounded-10 m-15 shadow-[0_0_10px_rgba(0,0,0,0.1)]">
|
||||
<view class="text-16 font-bold text-#333">扫码进入</view>
|
||||
<wd-icon name="arrow-down" color="#333" size="18px"></wd-icon>
|
||||
<view class="btn-gradient rounded-full w-fit mx-auto text-16 text-white py-10 px-15">
|
||||
微聊总群:50101011
|
||||
</view>
|
||||
<VueQrcode class="!w-270 !h-270 mx-auto" :value="'qrcodeValue'" :options="{ size: 600 }" />
|
||||
</view>
|
||||
<view class="p-15 text-center bg-white rounded-10 m-15 shadow-[0_0_10px_rgba(0,0,0,0.1)]">
|
||||
<view class="text-16 font-bold text-#333">扫码进入</view>
|
||||
<wd-icon name="arrow-down" color="#333" size="18px"></wd-icon>
|
||||
<view class="btn-gradient rounded-full w-fit mx-auto text-16 text-white py-10 px-15">
|
||||
QQ群2群:1011101011
|
||||
</view>
|
||||
<VueQrcode class="!w-270 !h-270 mx-auto" :value="'qrcodeValue'" :options="{ size: 600 }" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.official-community-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,92 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '实名认证',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="withdrawal-type-edit-page pb-100 min-h-screen">
|
||||
<view class="p-15 m-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<image src="@/static/images/page-sub/realname/realname-type.png" class="w-20 h-20" />
|
||||
<view class="ml-8">证件类型</view>
|
||||
<view class="flex-1 text-right text-14">身份证</view>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<image src="@/static/images/page-sub/realname/realname-name.png" class="w-20 h-20" />
|
||||
<view class="ml-8">真实姓名</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入真实姓名"
|
||||
v-model="form.name"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<image src="@/static/images/page-sub/realname/realname-number.png" class="w-20 h-20" />
|
||||
<view class="ml-8">身份证号</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入身份证号"
|
||||
v-model="form.idCard"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 pb-safe">
|
||||
<button class="btn-gradient text-white rounded-full m-15 text-16" @click="onAddType">
|
||||
提交
|
||||
</button>
|
||||
</view>
|
||||
<view class="flex flex-col items-center" v-if="false">
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-success.png"
|
||||
class="w-150 h-150 block"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="text-center mt-15 text-14 text-#999">恭喜您,实名认证成功</view>
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16" @click="onBack">
|
||||
返回
|
||||
</button>
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-fail.png"
|
||||
class="w-150 h-150 block"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="text-center mt-15 text-14 text-#999">您的实名认证正在审核中,请耐心等待</view>
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16" @click="onBack">
|
||||
返回
|
||||
</button>
|
||||
<image
|
||||
src="@/static/images/page-sub/realname/realname-checking.png"
|
||||
class="w-150 h-150 block"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="text-center mt-15 text-14 text-#999">您的实名认证审核未通过,请重新提交</view>
|
||||
<button class="btn-gradient px-30 text-white rounded-full m-15 text-16">重新提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const form = ref({
|
||||
type: '',
|
||||
})
|
||||
|
||||
const onBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.withdrawal-type-edit-page {
|
||||
--wot-input-placeholder-color: #889bc6;
|
||||
--wot-cell-wrapper-padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,116 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '我的邀请',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="team-page">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<view @click="handleRule" class="text-14 text-#333">邀请奖励规则</view>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="px-15 py-30 relative rounded-10 mt-50 w-345 mx-auto main-content">
|
||||
<image
|
||||
class="w-150 h-150 rounded-10 mt-15 mx-auto block absolute right-15 bottom-30"
|
||||
src="@/static/images/page-sub/team/team-main-hero.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="flex flex-col">
|
||||
<view class="text-14 text-#6784C7">看看人数</view>
|
||||
<view class="text-35 font-bold text-#476FFF mt-10 leading-35">1234</view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
class="w-201 h-46 rounded-10 mt-30 mx-auto block"
|
||||
src="@/static/images/page-sub/team/team-title.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="flex overflow-auto mt-25 pr-15 pl-8">
|
||||
<view
|
||||
class="px-40 ml-8 py-10 flex-shrink-0 rounded-10 bg-white"
|
||||
v-for="(item, index) in levelList"
|
||||
:key="item.title"
|
||||
:class="{
|
||||
'btn-gradient': currentLevelIndex === index,
|
||||
}"
|
||||
@click="() => (currentLevelIndex = index)"
|
||||
>
|
||||
<image class="w-30 h-30 rounded-10 mx-auto block" :src="item.icon" mode="aspectFill" />
|
||||
<view class="text-14 mt-10 text-center">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-25 bg-white rounded-10 w-345 mx-auto">
|
||||
<view class="flex p-15 items-center" v-for="item in 10" :key="item">
|
||||
<Avatar class="w-40 h-40" />
|
||||
<view class="flex-1 flex flex-col ml-15">
|
||||
<view class="text-14 text-#333">用户名</view>
|
||||
<view class="text-12 mt-10 text-#999">1234567890</view>
|
||||
<view class="text-12 mt-10 text-#999">2024-12-27 12:00:00</view>
|
||||
</view>
|
||||
<!-- <view class="bg-#71C78A80 text-white text-12 rounded-10 px-10 py-5">邀请成功</view> -->
|
||||
<view class="text-14 font-bold text-#FF5F5F">+20 股</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-action-sheet v-model="showRule" title="邀请奖励规则">
|
||||
<view class="text-16 text-#333 p-15">
|
||||
<view class="mb-10">1.每邀请一人可以获得1万投资金,2000数字人民币 1点认购点</view>
|
||||
<view class="mb-10">2.邀请满5人可以额外获得5万投资金。1万数字人民币 5点认购点</view>
|
||||
<view class="mb-10">3.邀请满10人可以额外获得10万投资金。2万数字人民币 10点认购点</view>
|
||||
<view class="mb-10">4.邀请满20人可以额外获得20万投资金。5万数字人民币 20点认购点</view>
|
||||
<view class="mb-10">5.邀请满50人可以额外获得50万投资金。10万数字人民币 50点认购点</view>
|
||||
</view>
|
||||
</wd-action-sheet>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import Level1 from '@/static/images/page-sub/team/level-1.png'
|
||||
import Level2 from '@/static/images/page-sub/team/level-2.png'
|
||||
import Level3 from '@/static/images/page-sub/team/level-3.png'
|
||||
|
||||
const showRule = ref(false)
|
||||
|
||||
const handleRule = () => {
|
||||
showRule.value = true
|
||||
}
|
||||
const currentLevelIndex = ref(0)
|
||||
|
||||
const levelList = ref([
|
||||
{
|
||||
title: '一级用户',
|
||||
icon: Level1,
|
||||
},
|
||||
{
|
||||
title: '二级用户',
|
||||
icon: Level2,
|
||||
},
|
||||
{
|
||||
title: '三级用户',
|
||||
icon: Level3,
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.team-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
}
|
||||
.main-content {
|
||||
background-image: url('@/static/images/page-sub/team/main-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,29 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '提现记录',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<view
|
||||
class="flex px-15 py-8 border-b border-#E5E5E5 border-b-solid"
|
||||
v-for="item in 10"
|
||||
:key="item"
|
||||
>
|
||||
<image src="/static/images/invest/unionpay-icon.png" class="w-32 h-32 self-center" />
|
||||
<view class="flex flex-col flex-1 justify-between ml-15">
|
||||
<view class="text-14 text-#333">银行卡</view>
|
||||
<view class="text-12 text-#999">提现</view>
|
||||
<view class="text-12 text-#999">2024-12-27 10:00:00</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-col items-end">
|
||||
<view class="text-16 text-#FF5F5F">-1000 RMB</view>
|
||||
<view class="text-14 mt-18 py-4 px-10 bg-#71C78A1A text-#71C78A">提现成功</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -0,0 +1,105 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '编辑收款方式',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="withdrawal-type-edit-page pb-100 min-h-screen">
|
||||
<view class="p-15 m-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>收款类型</view>
|
||||
<wd-select-picker
|
||||
type="radio"
|
||||
custom-class="!p-0"
|
||||
custom-value-class="text-14 text-#889BC6 text-right"
|
||||
class="flex-1"
|
||||
placeholder="请选择收款类型"
|
||||
v-model="form.type"
|
||||
:columns="columns"
|
||||
@change="handleChange"
|
||||
></wd-select-picker>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>开户行</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入开户行"
|
||||
v-model="form.bank"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>持卡人姓名</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入持卡人姓名"
|
||||
v-model="form.name"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>银行账号</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入银行账号"
|
||||
v-model="form.account"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15 text-14">
|
||||
<view>备注</view>
|
||||
<input
|
||||
class="flex-1 text-right text-14"
|
||||
placeholder-class=" text-#889BC6 text-right"
|
||||
type="text"
|
||||
placeholder="请输入备注"
|
||||
v-model="form.remark"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 pb-safe">
|
||||
<button class="btn-gradient text-white rounded-full m-15 text-16" @click="onAddType">
|
||||
提交
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const form = ref({
|
||||
type: '',
|
||||
})
|
||||
const columns = [
|
||||
{
|
||||
label: '支付宝',
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: '微信',
|
||||
value: '2',
|
||||
},
|
||||
{
|
||||
label: '银行卡',
|
||||
value: '3',
|
||||
},
|
||||
]
|
||||
|
||||
const handleChange = (value: string) => {
|
||||
console.log(value)
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.withdrawal-type-edit-page {
|
||||
--wot-input-placeholder-color: #889bc6;
|
||||
--wot-cell-wrapper-padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '收款方式',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="withdrawal-type-page min-h-screen pb-100">
|
||||
<view
|
||||
class="flex items-center justify-between py-15 text-14 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10 m-15 p-15"
|
||||
v-for="item in 10"
|
||||
:key="item"
|
||||
@click="onSelectType(item)"
|
||||
>
|
||||
<image class="w-45 h-45" src="@/static/images/invest/alipay-icon.png" mode="aspectFit" />
|
||||
<view class="flex-1 ml-15">
|
||||
<view class="text-16 font-bold">支付宝</view>
|
||||
<view class="mt-10 text-14 text-#889BC6">132****113</view>
|
||||
</view>
|
||||
<wd-icon name="arrow-right" size="14px"></wd-icon>
|
||||
</view>
|
||||
<view class="fixed bottom-0 left-0 right-0 pb-safe">
|
||||
<button class="text-16 btn-gradient text-white rounded-full m-15" @click="onAddType">
|
||||
添加收款方式
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
|
||||
let isSelect = false
|
||||
onLoad((options) => {
|
||||
if (options.type === 'select') {
|
||||
isSelect = true
|
||||
}
|
||||
})
|
||||
|
||||
const onSelectType = (item) => {
|
||||
if (isSelect) {
|
||||
uni.$emit('withdrawal-type', item)
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/edit?id=1',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const onAddType = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/edit',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,91 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '提现',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="min-h-screen pb-100">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<image
|
||||
@click="onWithdrawalDetail"
|
||||
src="/static/images/page-sub/recharge.png"
|
||||
class="w-24 h-24"
|
||||
/>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="p-15">
|
||||
<view class="mt-15">
|
||||
<view class="text-14 text-#333">提现金额</view>
|
||||
<view
|
||||
class="flex items-center text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10"
|
||||
>
|
||||
<input type="number" placeholder="请输入提现金额" class="text-14 text-#333 flex-1" />
|
||||
<view class="text-12 text-#04A9F9">全部</view>
|
||||
</view>
|
||||
<view class="text-12 text-#889BC6 mt-15">当前余额:10012.12</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-50">
|
||||
<view class="text-14 text-#333">收款方式</view>
|
||||
<view
|
||||
class="flex items-center text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10"
|
||||
@click="onSelectPayType"
|
||||
>
|
||||
<view class="flex-1">请选择收款方式</view>
|
||||
<wd-icon name="arrow-right" size="16px"></wd-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-50">
|
||||
<view class="text-14 text-#333">交易密码</view>
|
||||
<view class="text-14 mt-15 text-#333 p-16 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<input type="password" placeholder="请输入交易密码" class="text-14 text-#333" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="bg-white fixed bottom-0 left-0 right-0 px-15 py-10 shadow-[0_0_10px_rgba(10,68,245,0.1)]"
|
||||
>
|
||||
<view class="flex items-center pb-safe">
|
||||
<view class="text-gradient flex-1 text-14">到账CNY:13123.00</view>
|
||||
<view
|
||||
class="btn-gradient text-center text-white rounded-full text-14 px-30 py-10"
|
||||
@click="onSubmit"
|
||||
>
|
||||
申请提现
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
|
||||
const onWithdrawalDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const onSelectPayType = () => {
|
||||
uni.$once('withdrawal-type', (data: any) => {
|
||||
console.log(data)
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/index?type=select',
|
||||
})
|
||||
}
|
||||
|
||||
const onSubmit = () => {
|
||||
uni.redirectTo({
|
||||
url: '/pages-sub/invest-result/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"globalStyle": {
|
||||
"navigationStyle": "default",
|
||||
"navigationBarTitleText": "unibest",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#f8f8f8",
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundColor": "#FFFFFF"
|
||||
@@ -15,25 +15,37 @@
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#999999",
|
||||
"selectedColor": "#018d71",
|
||||
"backgroundColor": "#F8F8F8",
|
||||
"borderStyle": "black",
|
||||
"height": "50px",
|
||||
"selectedColor": "#0E57A2",
|
||||
"backgroundColor": "#ffffff",
|
||||
"borderStyle": "#E7E7E7",
|
||||
"height": "56px",
|
||||
"fontSize": "10px",
|
||||
"iconWidth": "24px",
|
||||
"iconWidth": "20px",
|
||||
"spacing": "3px",
|
||||
"list": [
|
||||
{
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/homeHL.png",
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "%tabbar.home%"
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/example.png",
|
||||
"selectedIconPath": "static/tabbar/exampleHL.png",
|
||||
"pagePath": "pages/about/about",
|
||||
"text": "%tabbar.about%"
|
||||
"iconPath": "static/tabbar/invest.png",
|
||||
"selectedIconPath": "static/tabbar/investHL.png",
|
||||
"pagePath": "pages/invest/index",
|
||||
"text": "投资"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/house.png",
|
||||
"selectedIconPath": "static/tabbar/houseHL.png",
|
||||
"pagePath": "pages/invite/index",
|
||||
"text": "房屋"
|
||||
},
|
||||
{
|
||||
"iconPath": "static/tabbar/personal.png",
|
||||
"selectedIconPath": "static/tabbar/personalHL.png",
|
||||
"pagePath": "pages/my/index",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -47,30 +59,192 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/about/about",
|
||||
"path": "pages/edit-password/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于"
|
||||
"navigationBarTitleText": "忘记密码",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
},
|
||||
{
|
||||
"path": "pages/invest/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "投资理财"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/about/i18n",
|
||||
"path": "pages/invite/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "%app.name%"
|
||||
"navigationBarTitleText": "邀请好友",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
},
|
||||
{
|
||||
"path": "pages/my/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "个人中心"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/register/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"notNeedLogin": false
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pages-sub",
|
||||
"pages": [
|
||||
{
|
||||
"path": "asset/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的资产",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "convert/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "转换"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "demo/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分包页面 标题"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "introduction/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公司简介",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invest-detail/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资记录",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invest-immediately/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "立即投资"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invest-result/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投资成功",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invite/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀请好友",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "lottery/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "幸运大转盘",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "official-community/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "官方社群",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "realname/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "实名认证",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "team/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的邀请",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "withdrawal/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTitleText": "提现"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "withdrawal-detail/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提现记录",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "withdrawal-type/edit",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑收款方式",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "withdrawal-type/index",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收款方式",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '关于',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view
|
||||
class="bg-white overflow-hidden pt-2 px-4"
|
||||
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
||||
>
|
||||
<view class="text-center text-3xl mt-8">
|
||||
鸽友们好,我是
|
||||
<text class="text-red-500">菲鸽</text>
|
||||
</view>
|
||||
<view class="text-center mt-8 text-#fff">
|
||||
<wd-button type="success" @click="gotoPage('i18n')">进入多语言页面</wd-button>
|
||||
</view>
|
||||
<RequestComp />
|
||||
<UploadComp />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import RequestComp from './components/request.vue'
|
||||
import UploadComp from './components/upload.vue'
|
||||
|
||||
// 获取屏幕边界到安全区域距离
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
const gotoPage = (path) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/about/${path}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-css {
|
||||
// mt-4=>1rem=>16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,97 +0,0 @@
|
||||
<route lang="json">
|
||||
{
|
||||
"style": {
|
||||
"navigationBarTitleText": "%app.name%"
|
||||
}
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="center flex-col mt-6">
|
||||
<view class="text-red-500 p-4 leading-6">
|
||||
经过我的测试发现,小程序里面会有2处BUG:
|
||||
<view>
|
||||
<text class="line-through">1. 页面标题多语言不生效</text>
|
||||
<text class="ml-2 text-green-500">已解决</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="line-through">2. 多语言传递的参数不生效,如下 heavy</text>
|
||||
<text class="ml-2 text-green-500">已解决</text>
|
||||
<view class="ml-2 text-green-500">把 $t 改为自定义的 t 即可</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-green-500">多语言测试</view>
|
||||
<view class="m-4">{{ $t('app.name') }}</view>
|
||||
<view class="m-4">{{ $t('weight', { heavy: 100 }) }}</view>
|
||||
<view class="m-4">{{ t('introduction', user) }}</view>
|
||||
|
||||
<view class="text-green-500 mt-12">切换语言</view>
|
||||
<view class="uni-list">
|
||||
<radio-group @change="radioChange" class="radio-group">
|
||||
<label class="uni-list-cell uni-list-cell-pd" v-for="item in languages" :key="item.value">
|
||||
<view>
|
||||
<radio :value="item.value" :checked="item.value === current" />
|
||||
</view>
|
||||
<view>{{ item.name }}</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
|
||||
<!-- http://localhost:9000/#/pages/index/i18n -->
|
||||
<button @click="testI18n" class="mt-20 mb-44">测试弹窗</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import i18n, { t } from '@/locale/index'
|
||||
import { testI18n } from '@/utils/i18n'
|
||||
|
||||
const current = ref(uni.getLocale())
|
||||
const user = { name: '张三', detail: { height: 178, weight: '75kg' } }
|
||||
const languages = [
|
||||
{
|
||||
value: 'zh-Hans',
|
||||
name: '中文',
|
||||
checked: 'true',
|
||||
},
|
||||
{
|
||||
value: 'en',
|
||||
name: '英文',
|
||||
},
|
||||
]
|
||||
|
||||
const radioChange = (evt) => {
|
||||
// console.log(evt)
|
||||
current.value = evt.detail.value
|
||||
// 下面2句缺一不可!!!
|
||||
uni.setLocale(evt.detail.value)
|
||||
i18n.global.locale = evt.detail.value
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.uni-list {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.radio-group {
|
||||
width: 200px;
|
||||
margin: 10px auto;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.uni-list-cell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px;
|
||||
background-color: #bcecd1;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '忘记密码',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="login-container relative">
|
||||
<NavBar />
|
||||
<view class="pt-45">
|
||||
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
|
||||
<input
|
||||
type="text"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入用户名"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/message.png" mode="aspectFit" />
|
||||
<input
|
||||
type="text"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入短信验证码"
|
||||
/>
|
||||
<view
|
||||
class="py-6 rounded-full ml-15 px-15 text-12 text-white btn-gradient text-14 text-#889BC6"
|
||||
@click="handleGetCode"
|
||||
>
|
||||
获取验证码
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请再次输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入支付密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请再次输入支付密码"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="mt-50 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
|
||||
@click="handleRegister"
|
||||
>
|
||||
确认
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { isLogged } from '@/interceptors/route'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
let redirect = '/'
|
||||
onLoad((options) => {
|
||||
redirect = options.redirect ?? '/'
|
||||
})
|
||||
|
||||
const handleRegister = () => {
|
||||
userStore.setUserInfo({
|
||||
token: '123456',
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
onLoad(() => {
|
||||
if (isLogged()) {
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.login-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
@@ -8,50 +8,86 @@
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view
|
||||
class="bg-white overflow-hidden pt-2 px-4"
|
||||
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
|
||||
>
|
||||
<view class="mt-12">
|
||||
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
|
||||
<view class="home-page">
|
||||
<NavBar />
|
||||
<image
|
||||
class="mx-auto block w-345 h-170 mt-15 rounded-10 overflow-hidden"
|
||||
src="@/static/images/home/main-bg.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="flex bg-#F5F9FF py-15 rounded-10 m-15 border-2 border-white border-solid">
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleIntroduction">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-1.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">简介</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleInvite">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">抽奖转盘</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleInvite">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-2.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">奖励制度</text>
|
||||
</view>
|
||||
<view class="flex-1 flex flex-col items-center" @click="handleOfficialCommunity">
|
||||
<image class="w-30 h-30" src="@/static/images/home/nav-3.png" mode="aspectFill" />
|
||||
<text class="mt-8 text-14 text-#333">官方社群</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center text-4xl main-title-color mt-4">unibest</view>
|
||||
<view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
|
||||
|
||||
<view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view>
|
||||
<view class="text-center mt-8">
|
||||
当前平台是:
|
||||
<text class="text-green-500">{{ PLATFORM.platform }}</text>
|
||||
<view class="flex bg-white py-8 px-15 rounded-10 m-15">
|
||||
<view class="text-14 text-#333">系统公告</view>
|
||||
<view class="text-12 ml-15 text-#999">每邀请人可以获得20股马尔代夫股权</view>
|
||||
</view>
|
||||
<view class="text-center mt-4">
|
||||
模板分支是:
|
||||
<text class="text-green-500">i18n</text>
|
||||
|
||||
<view class="bg-white py-15 px-15 rounded-10 m-15">
|
||||
<view class="text-14 text-#333">热点新闻</view>
|
||||
<view class="flex mt-15" v-for="item in 10" :key="item">
|
||||
<image
|
||||
class="w-85 h-85 rounded-10"
|
||||
src="@/static/images/home/news-2.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="ml-15 flex-1 flex flex-col justify-between">
|
||||
<view text-14>#人海战术#签约!中央广播电视总台与农业农村部达成战略合作</view>
|
||||
<view class="text-12 text-#999">证券时报网</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tabbar />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import PLATFORM from '@/utils/platform'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'Home',
|
||||
})
|
||||
|
||||
// 获取屏幕边界到安全区域距离
|
||||
const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
const author = ref('菲鸽')
|
||||
const description = ref(
|
||||
'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite4 + UnoCss + UniUI + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。',
|
||||
)
|
||||
// 测试 uni API 自动引入
|
||||
onLoad(() => {
|
||||
console.log(author)
|
||||
})
|
||||
const handleIntroduction = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/introduction/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleInvite = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/invite/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleOfficialCommunity = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/official-community/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.main-title-color {
|
||||
color: #d14328;
|
||||
.home-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '投资理财',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="invest-page">
|
||||
<NavBar>
|
||||
<template #right>
|
||||
<view @click="onGoInvestDetail" class="text-14 text-#486CCF">投资明细</view>
|
||||
</template>
|
||||
</NavBar>
|
||||
<view class="flex mt-30 flex-col mx-15 rounded-10 px-40 py-32 main-content">
|
||||
<view class="text-14 text-#6784C7">我的投资金</view>
|
||||
<view class="text-35 leading-35 mt-10 text-#BE7143 font-bold">1000000</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-100">
|
||||
<view
|
||||
v-for="item in 10"
|
||||
:key="item"
|
||||
class="invest-item relative flex flex-col items-center pt-15"
|
||||
>
|
||||
<view class="text-15 text-#3F88F6">5G通讯</view>
|
||||
<view class="flex w-full mt-15">
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-22 text-#333 font-bold">1000.00</view>
|
||||
<view class="text-12 mt-4 text-blue-red">投资金额</view>
|
||||
</view>
|
||||
<view class="flex-1 text-center">
|
||||
<view class="text-22 text-#FF3B30 font-bold">1000.00</view>
|
||||
<view class="text-12 mt-4 text-blue-red">每日分红</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="text-center px-50 absolute bottom-0 left-0 text-12 text-#fff rounded-full py-8 bg-blue-red"
|
||||
@click="onInvest(item)"
|
||||
>
|
||||
立即投资
|
||||
</view>
|
||||
<view
|
||||
class="text-center px-16 absolute bottom-13 right-33 text-12 text-#fff rounded-br-10 rounded-tl-10 py-4 bg-blue-red"
|
||||
>
|
||||
新手体验
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<wd-action-sheet v-model="showPayType" :panels="panels" @select="onSelectPayType" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import AlipayIcon from '@/static/images/invest/alipay-icon.png'
|
||||
import WechatIcon from '@/static/images/invest/wechat-icon.png'
|
||||
import UnionpayIcon from '@/static/images/invest/unionpay-icon.png'
|
||||
|
||||
defineOptions({
|
||||
name: 'Home',
|
||||
})
|
||||
const showPayType = ref(false)
|
||||
const panels = ref([
|
||||
{
|
||||
iconUrl: WechatIcon,
|
||||
title: '微信支付',
|
||||
},
|
||||
{
|
||||
iconUrl: AlipayIcon,
|
||||
title: '支付宝支付',
|
||||
},
|
||||
{
|
||||
iconUrl: UnionpayIcon,
|
||||
title: '银联支付',
|
||||
},
|
||||
])
|
||||
|
||||
const onGoInvestDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/invest-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const onSelectPayType = ({ item, index }: any) => {
|
||||
console.log(item, index)
|
||||
alert(item.title)
|
||||
}
|
||||
|
||||
const onInvest = (item: any) => {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages-sub/invest-immediately/index',
|
||||
// })
|
||||
showPayType.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.invest-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100px;
|
||||
background-color: #ebbf92;
|
||||
background-image: url('@/static/images/invest/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: top -80rpx center;
|
||||
background-size: 100%;
|
||||
}
|
||||
.invest-item {
|
||||
width: 690rpx;
|
||||
height: 352rpx;
|
||||
margin: 0 auto 30rpx;
|
||||
background-image: url('@/static/images/invest/item-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100%;
|
||||
}
|
||||
.main-content {
|
||||
background-image: url('@/static/images/invest/main-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.bg-blue-red {
|
||||
background-image: linear-gradient(90.02deg, #8bb9ff 0.02%, #be4343 100.27%);
|
||||
}
|
||||
.text-blue-red {
|
||||
background-image: linear-gradient(90.02deg, #8bb9ff 0.02%, #be4343 100.27%);
|
||||
background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,74 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '邀请好友',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<script setup lang="ts">
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import VueQrcode from '@chenfengyuan/vue-qrcode'
|
||||
|
||||
const qrcodeValue = '/pages/register/index?invite=888888'
|
||||
|
||||
const onCopy = (code: string) => {
|
||||
uni.setClipboardData({
|
||||
data: code,
|
||||
})
|
||||
}
|
||||
|
||||
const onLottery = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/lottery/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="pb-100 min-h-screen invite-page">
|
||||
<NavBar />
|
||||
<view class="flex justify-center mt-80">
|
||||
<view class="text-white btn-gradient rounded-full px-30 py-10 text-14">邀请好友</view>
|
||||
<view class="ml-15 bg-white rounded-full px-30 py-10 text-14" @click="onLottery">
|
||||
<text class="text-gradient">幸运大转盘</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex flex-col items-center mt-180">
|
||||
<view
|
||||
class="flex items-center text-16 text-#333 bg-[rgba(255,255,255,0.8)] rounded-full px-15 py-4 text-12 mt-8"
|
||||
>
|
||||
<view>
|
||||
邀请码
|
||||
<text class="font-bold">9999999</text>
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full px-15 py-4 text-12 ml-10"
|
||||
@click="onCopy('99999')"
|
||||
>
|
||||
复制
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-15 rounded-10 overflow-hidden flex">
|
||||
<VueQrcode :value="qrcodeValue" :options="{ size: 200 }" />
|
||||
</view>
|
||||
<view
|
||||
class="btn-gradient text-white rounded-full text-14 px-30 py-8 mt-30"
|
||||
@click="onCopy(qrcodeValue)"
|
||||
>
|
||||
复制邀请链接
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.invite-page {
|
||||
background-image: url('@/static/images/page-sub/invite-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top;
|
||||
background-size: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,118 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '登录',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="login-container relative">
|
||||
<NavBar />
|
||||
<view class="mt-44 text-28 pl-32 text-gradient" style="-webkit-background-clip: text">
|
||||
登录
|
||||
</view>
|
||||
<view class="pt-45">
|
||||
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.member_username"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入用户名"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="text"
|
||||
v-model="formData.member_password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ml-auto mr-0 w-fit text-gradient text-14 p-15" @click="handleEditPassword">
|
||||
忘记密码
|
||||
</view>
|
||||
<view
|
||||
class="mt-30 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
|
||||
@click="handleLogin"
|
||||
>
|
||||
登录
|
||||
</view>
|
||||
<view class="mt-30 text-center text-14 text-#999">
|
||||
没有账号?
|
||||
<text class="text-gradient" @click="handleRegister">立即注册</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute bottom-15 left-50% -translate-x-50% text-#999 text-14">V1.0.0</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { isLogged } from '@/interceptors/route'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const formData = ref({
|
||||
member_username: '',
|
||||
member_password: '',
|
||||
})
|
||||
|
||||
let redirect = '/'
|
||||
onLoad((options) => {
|
||||
redirect = options.redirect ?? '/'
|
||||
})
|
||||
|
||||
const handleLogin = async () => {
|
||||
if (!formData.value.member_username || !formData.value.member_password) {
|
||||
return uni.showToast({
|
||||
title: '请输入用户名和密码',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
userStore.setUserInfo({
|
||||
token: '123456',
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
|
||||
const handleRegister = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/register/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleEditPassword = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/edit-password/index',
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
if (isLogged()) {
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.login-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,166 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '个人中心',
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<template>
|
||||
<view class="my-page">
|
||||
<NavBar />
|
||||
<view class="flex flex-col items-center justify-center mt-30">
|
||||
<Avatar class="w-80 h-80 mx-auto" />
|
||||
<view class="text-16 mt-10">默认用户</view>
|
||||
<view class="text-12 mt-8">账号:199****654</view>
|
||||
</view>
|
||||
<view class="flex justify-center text-center mt-15 items-center">
|
||||
<view>
|
||||
<view class="text-30 font-bold">1002</view>
|
||||
<view class="text-14 mt-10 text-#3B81F3">我的余额</view>
|
||||
</view>
|
||||
<image class="w-100 h-100" src="@/static/images/my/translate.png" mode="aspectFit" />
|
||||
<view>
|
||||
<view class="text-30 font-bold">1231</view>
|
||||
<view class="text-14 mt-10 text-#3B81F3">我的股数</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex px-15 mt-15">
|
||||
<view
|
||||
class="flex py-30 justify-center items-center rounded-tl-10 rounded-br-10 flex-1 bg-[linear-gradient(180deg,#D9EBFF,#9EDAFF)] border-1 border-#5FAEFF80 border-solid"
|
||||
@click="handleWithdrawal"
|
||||
>
|
||||
<image class="w-40 h-40" src="@/static/images/my/withdrawal.png" mode="aspectFit" />
|
||||
<view class="text-white text-14 px-15 py-5 ml-15 rounded-full btn-gradient">提现</view>
|
||||
</view>
|
||||
<view
|
||||
class="ml-10 flex py-30 justify-center items-center rounded-tl-10 rounded-br-10 flex-1 bg-[linear-gradient(180deg,#D9EBFF,#9EDAFF)] border-1 border-#5FAEFF80 border-solid"
|
||||
@click="handleConvert"
|
||||
>
|
||||
<image class="w-40 h-40" src="@/static/images/my/top-up.png" mode="aspectFit" />
|
||||
<view class="text-white text-14 px-15 py-5 ml-15 rounded-full btn-gradient">转换</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<image
|
||||
class="w-330 h-123 mx-auto mt-15 block"
|
||||
src="@/static/images/my/recommend.png"
|
||||
mode="aspectFill"
|
||||
@click="handleInvite"
|
||||
/>
|
||||
|
||||
<view class="mt-15 grid grid-cols-2 gap-10 p-15">
|
||||
<view
|
||||
@click="handleTeam"
|
||||
class="flex justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/team.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的邀请</view>
|
||||
</view>
|
||||
<view
|
||||
@click="handleAsset"
|
||||
class="flex justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/house.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的资产</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
@click="handleRealName"
|
||||
class="flex justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/realname.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">实名认证</view>
|
||||
</view>
|
||||
<view
|
||||
@click="handleBankCard"
|
||||
class="flex justify-center rounded-tl-10 rounded-br-10 bg-[linear-gradient(45deg,#EFF7FF,#D1E8FF)] p-15 border border-#BEDCFF border-solid"
|
||||
>
|
||||
<image class="w-24 h-24" src="@/static/images/my/card.png" mode="aspectFit" />
|
||||
<view class="text-14 text-#333 ml-10">我的银行卡</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="mt-50 mx-auto w-294 btn-gradient rounded-full text-center text-14 text-white py-15 mt-15"
|
||||
@click="handleLogout"
|
||||
>
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Avatar from '@/components/Avatar.vue'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { loginRoute } from '@/interceptors/route'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const handleLogout = () => {
|
||||
userStore.clearUserInfo()
|
||||
uni.reLaunch({
|
||||
url: loginRoute,
|
||||
})
|
||||
}
|
||||
const handleWithdrawalDetail = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-detail/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleWithdrawal = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleTeam = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/team/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleRealName = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/realname/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleAsset = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/asset/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleBankCard = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/withdrawal-type/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleInvite = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/invite/index',
|
||||
})
|
||||
}
|
||||
|
||||
const handleConvert = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages-sub/convert/index',
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 100rpx;
|
||||
background-image: url('@/static/images/bg.png');
|
||||
background-position: top;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,133 @@
|
||||
<route lang="json5">
|
||||
{
|
||||
style: {
|
||||
navigationBarTitleText: '注册',
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
notNeedLogin: false,
|
||||
}
|
||||
</route>
|
||||
<template>
|
||||
<view class="login-container relative">
|
||||
<NavBar />
|
||||
<view class="pt-45">
|
||||
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
|
||||
<input
|
||||
type="text"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入用户名"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/message.png" mode="aspectFit" />
|
||||
<input
|
||||
type="text"
|
||||
placeholder-class="text-#889BC6"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入短信验证码"
|
||||
/>
|
||||
<view
|
||||
class="py-6 rounded-full ml-15 px-15 text-12 text-white btn-gradient text-14 text-#889BC6"
|
||||
@click="handleGetCode"
|
||||
>
|
||||
获取验证码
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请再次输入登录密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入支付密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请再次输入支付密码"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex items-center py-15">
|
||||
<image class="w-24 h-24" src="@/static/images/login/invite.png" mode="aspectFit" />
|
||||
<input
|
||||
placeholder-class="text-#889BC6"
|
||||
type="password"
|
||||
class="text-right flex-1 text-14"
|
||||
placeholder="请输入邀请码"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="mt-50 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
|
||||
@click="handleRegister"
|
||||
>
|
||||
注册
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import { isLogged } from '@/interceptors/route'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
let redirect = '/'
|
||||
onLoad((options) => {
|
||||
redirect = options.redirect ?? '/'
|
||||
})
|
||||
|
||||
const handleRegister = () => {
|
||||
userStore.setUserInfo({
|
||||
token: '123456',
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
onLoad(() => {
|
||||
if (isLogged()) {
|
||||
uni.reLaunch({
|
||||
url: redirect,
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.login-container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 200rpx;
|
||||
background-image: url('@/static/images/login-bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 525 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 201 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 745 B |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 507 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 956 B |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 920 B |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 863 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 676 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -15,18 +15,14 @@ export const useUserStore = defineStore(
|
||||
const clearUserInfo = () => {
|
||||
userInfo.value = { ...initState }
|
||||
}
|
||||
// 一般没有reset需求,不需要的可以删除
|
||||
const reset = () => {
|
||||
userInfo.value = { ...initState }
|
||||
}
|
||||
const isLogined = computed(() => !!userInfo.value.token)
|
||||
|
||||
const isLogged = computed(() => !!userInfo.value.token)
|
||||
|
||||
return {
|
||||
userInfo,
|
||||
setUserInfo,
|
||||
clearUserInfo,
|
||||
isLogined,
|
||||
reset,
|
||||
isLogged,
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,14 +5,33 @@
|
||||
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/index/index" |
|
||||
"/pages/about/about" |
|
||||
"/pages/about/i18n" |
|
||||
"/pages-sub/demo/index";
|
||||
"/pages/edit-password/index" |
|
||||
"/pages/invest/index" |
|
||||
"/pages/invite/index" |
|
||||
"/pages/login/index" |
|
||||
"/pages/my/index" |
|
||||
"/pages/register/index" |
|
||||
"/pages-sub/asset/index" |
|
||||
"/pages-sub/convert/index" |
|
||||
"/pages-sub/demo/index" |
|
||||
"/pages-sub/introduction/index" |
|
||||
"/pages-sub/invest-detail/index" |
|
||||
"/pages-sub/invest-immediately/index" |
|
||||
"/pages-sub/invest-result/index" |
|
||||
"/pages-sub/invite/index" |
|
||||
"/pages-sub/lottery/index" |
|
||||
"/pages-sub/official-community/index" |
|
||||
"/pages-sub/realname/index" |
|
||||
"/pages-sub/team/index" |
|
||||
"/pages-sub/withdrawal/index" |
|
||||
"/pages-sub/withdrawal-detail/index" |
|
||||
"/pages-sub/withdrawal-type/edit" |
|
||||
"/pages-sub/withdrawal-type/index";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
interface SwitchTabOptions {
|
||||
url: "/pages/index/index" | "/pages/about/about"
|
||||
url: "/pages/index/index" | "/pages/invest/index" | "/pages/invite/index" | "/pages/my/index"
|
||||
}
|
||||
|
||||
type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
|
||||
|
||||
@@ -9,8 +9,15 @@ export const getLastPage = () => {
|
||||
return pages[pages.length - 1]
|
||||
}
|
||||
|
||||
export const getPath = (url: string) => {
|
||||
if (typeof url === 'string') {
|
||||
return url.split('?')[0].replace(/^pages/, '/pages')
|
||||
}
|
||||
throw new Error('please input string type')
|
||||
}
|
||||
|
||||
/** 判断当前页面是否是tabbar页 */
|
||||
export const getIsTabbar = () => {
|
||||
export const getIsTabbar = (url?: string) => {
|
||||
if (!tabBar) {
|
||||
return false
|
||||
}
|
||||
@@ -18,29 +25,14 @@ export const getIsTabbar = () => {
|
||||
// 通常有tabBar的话,list不能有空,且至少有2个元素,这里其实不用处理
|
||||
return false
|
||||
}
|
||||
const lastPage = getLastPage()
|
||||
const currPath = lastPage.route
|
||||
return !!tabBar.list.find((e) => e.pagePath === currPath)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前页面路由的 path 路径和 redirectPath 路径
|
||||
* path 如 ‘/pages/login/index’
|
||||
* redirectPath 如 ‘/pages/demo/base/route-interceptor’
|
||||
*/
|
||||
export const currRoute = () => {
|
||||
const lastPage = getLastPage()
|
||||
const currRoute = (lastPage as any).$page
|
||||
// console.log('lastPage.$page:', currRoute)
|
||||
// console.log('lastPage.$page.fullpath:', currRoute.fullPath)
|
||||
// console.log('lastPage.$page.options:', currRoute.options)
|
||||
// console.log('lastPage.options:', (lastPage as any).options)
|
||||
// 经过多端测试,只有 fullPath 靠谱,其他都不靠谱
|
||||
const { fullPath } = currRoute as { fullPath: string }
|
||||
// console.log(fullPath)
|
||||
// eg: /pages/login/index?redirect=%2Fpages%2Fdemo%2Fbase%2Froute-interceptor (小程序)
|
||||
// eg: /pages/login/index?redirect=%2Fpages%2Froute-interceptor%2Findex%3Fname%3Dfeige%26age%3D30(h5)
|
||||
return getUrlObj(fullPath)
|
||||
if (url) {
|
||||
console.log(tabBar.list, getPath(url))
|
||||
return !!tabBar.list.some((e) => getPath(e.pagePath) === getPath(url))
|
||||
} else {
|
||||
const lastPage = getLastPage()
|
||||
const currPath = lastPage.route
|
||||
return !!tabBar.list.some((e) => e.pagePath === currPath)
|
||||
}
|
||||
}
|
||||
|
||||
const ensureDecodeURIComponent = (url: string) => {
|
||||
@@ -74,14 +66,17 @@ export const getUrlObj = (url: string) => {
|
||||
}
|
||||
/**
|
||||
* 得到所有的需要登录的pages,包括主包和分包的
|
||||
* 这里设计得通用一点,可以传递key作为判断依据,默认是 needLogin, 与 route-block 配对使用
|
||||
* 这里设计得通用一点,可以传递key作为判断依据,默认是 notNeedLogin, 与 route-block 配对使用
|
||||
* 如果没有传 key,则表示所有的pages,如果传递了 key, 则表示通过 key 过滤
|
||||
*/
|
||||
export const getAllPages = (key = 'needLogin') => {
|
||||
export const getAllPages = (key = 'notNeedLogin') => {
|
||||
// 这里处理主包
|
||||
const mainPages = [
|
||||
...pages
|
||||
.filter((page) => !key || page[key])
|
||||
.filter((page) => {
|
||||
if (!key) return false
|
||||
return page[key] === false
|
||||
})
|
||||
.map((page) => ({
|
||||
...page,
|
||||
path: `/${page.path}`,
|
||||
@@ -111,39 +106,21 @@ export const getAllPages = (key = 'needLogin') => {
|
||||
* 得到所有的需要登录的pages,包括主包和分包的
|
||||
* 只得到 path 数组
|
||||
*/
|
||||
export const getNeedLoginPages = (): string[] => getAllPages('needLogin').map((page) => page.path)
|
||||
export const getNotNeedLoginPages = (): string[] =>
|
||||
getAllPages('notNeedLogin').map((page) => page.path)
|
||||
|
||||
/**
|
||||
* 得到所有的需要登录的pages,包括主包和分包的
|
||||
* 只得到 path 数组
|
||||
*/
|
||||
export const needLoginPages: string[] = getAllPages('needLogin').map((page) => page.path)
|
||||
export const notNeedLoginPages: string[] = getAllPages('notNeedLogin').map((page) => page.path)
|
||||
|
||||
/**
|
||||
* 根据微信小程序当前环境,判断应该获取的BaseUrl
|
||||
*/
|
||||
export const getEnvBaseUrl = () => {
|
||||
// 请求基准地址
|
||||
let baseUrl = import.meta.env.VITE_SERVER_BASEURL
|
||||
|
||||
// 小程序端环境区分
|
||||
if (isMp) {
|
||||
const {
|
||||
miniProgram: { envVersion },
|
||||
} = uni.getAccountInfoSync()
|
||||
|
||||
switch (envVersion) {
|
||||
case 'develop':
|
||||
baseUrl = 'https://ukw0y1.laf.run'
|
||||
break
|
||||
case 'trial':
|
||||
baseUrl = 'https://ukw0y1.laf.run'
|
||||
break
|
||||
case 'release':
|
||||
baseUrl = 'https://ukw0y1.laf.run'
|
||||
break
|
||||
}
|
||||
}
|
||||
const baseUrl = import.meta.env.VITE_SERVER_BASEURL
|
||||
|
||||
return baseUrl
|
||||
}
|
||||
|
||||
@@ -78,6 +78,15 @@ export default defineConfig({
|
||||
],
|
||||
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
|
||||
['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
|
||||
['btn-gradient', { background: 'linear-gradient(90deg,#95C3FF,#4D72F6)' }],
|
||||
[
|
||||
'text-gradient',
|
||||
{
|
||||
'background-image': 'linear-gradient(90deg,#95C3FF,#4D72F6 30%)',
|
||||
'background-clip': 'text',
|
||||
color: 'transparent',
|
||||
},
|
||||
],
|
||||
],
|
||||
})
|
||||
|
||||
|
||||