Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_minapp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4b268e3f
authored
2023-12-22 15:35:39 +0800
by
华明祺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登录
1 parent
9e55c13c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
421 additions
and
162 deletions
App.vue
common/login.js
config.js
myCenter/index.vue
myCenter/personInfo/index.vue
pages.json
pages/index/binding.vue
pages/index/index.vue
pages/index/login.vue
pages/myCenter/myCenter.vue → pages/myCenter/index.vue
App.vue
View file @
4b268e3
<
script
>
import
{
h5Login
getInfo
}
from
'@/common/login.js'
;
import
*
as
api
from
'@/common/api.js'
;
import
config
from
'@/config.js'
;
...
...
@@ -14,15 +14,13 @@ export default {
this
.
globalData
.
baseUrl_api
=
config
.
baseUrl_api
;
let
userName
=
uni
.
getStorageSync
(
'userName'
)
if
(
userName
)
{
this
.
globalData
.
isLogin
=
true
;
getInfo
()
}
else
{
this
.
globalData
.
isLogin
=
false
;
}
},
onShow
:
function
()
{
console
.
log
(
'App Show'
);
...
...
common/login.js
View file @
4b268e3
import
request
from
'./request'
import
config
from
'@/config.js'
import
aes
from
'@/common/aes.js'
function
pcLogin
(
data
)
{
return
request
({
// url: '/login',
...
...
@@ -16,6 +17,13 @@ function pcLogin(data) {
.
then
(
getInfo
)
}
function
bindIdcCode
(
idcCode
)
{
return
request
({
url
:
`
${
config
.
baseUrl_api
}
/bind?idcCode=
${
idcCode
}
`
,
method
:
'post'
})
}
function
h5Login
(
userName
)
{
return
request
({
url
:
`/h5Login`
,
...
...
@@ -36,6 +44,7 @@ function h5LoginAuto() {
uni
.
redirectTo
({
url
:
'/pages/index/login'
})
return
Promise
.
reject
()
}
}
...
...
@@ -71,7 +80,7 @@ function loginByPhone(phonenumber, code) {
code
}
return
request
({
url
:
'/userLoginByPhone'
,
url
:
`
${
config
.
baseUrl_api
}
/userLoginByPhoneForPc`
,
method
:
'post'
,
params
:
data
}).
then
((
res
)
=>
{
...
...
@@ -82,15 +91,13 @@ function loginByPhone(phonenumber, code) {
// 获取用户详细信息
function
getInfo
()
{
return
request
({
url
:
`
${
config
.
baseUrl_api
}
/getInfo`
,
url
:
`
${
config
.
baseUrl_api
}
/getInfo
ForPc
`
,
method
:
'get'
}).
then
(
res
=>
{
const
app
=
getApp
()
const
user
=
res
.
data
.
user
const
personInfo
=
res
.
data
.
personInfo
uni
.
setStorageSync
(
'userName'
,
user
.
userName
)
uni
.
setStorageSync
(
'perId'
,
aes
.
encrypt
(
personInfo
.
perId
))
app
.
globalData
.
deptType
=
user
.
dept
.
deptType
uni
.
setStorageSync
(
'perId'
,
aes
.
encrypt
(
user
.
userId
))
app
.
globalData
.
userInfo
=
user
})
}
...
...
@@ -116,14 +123,14 @@ function getMyOwnMemberInfo() {
})
}
//
for match
//
for match
function
getWxUserPhone
(
phoneRes
)
{
const
currUser
=
uni
.
getStorageSync
(
'currUser'
);
const
currUser
=
uni
.
getStorageSync
(
'currUser'
)
// getNowOpenId()
const
nowOpenId
=
uni
.
getStorageSync
(
'nowOpenId'
);
const
nowOpenId
=
uni
.
getStorageSync
(
'nowOpenId'
)
return
request
({
url
:
`/system/wx/updateMobile?openId=
${
nowOpenId
}
`
,
method
:
"POST"
,
method
:
'POST'
,
params
:
{
appId
:
appId
,
userId
:
currUser
.
id
,
...
...
@@ -134,27 +141,36 @@ function getWxUserPhone(phoneRes) {
signature
:
phoneRes
.
signature
}
}).
then
((
res
)
=>
{
let
user
=
res
.
data
;
const
user
=
res
.
data
// uni.setStorageSync('token', 'Bearer '+ user.token);
uni
.
setStorageSync
(
'token'
,
user
.
token
);
uni
.
setStorageSync
(
'currUser'
,
user
);
uni
.
setStorageSync
(
'token'
,
user
.
token
)
uni
.
setStorageSync
(
'currUser'
,
user
)
return
user
})
}
function
checkUserAuth
(
path
)
{
const
app
=
getApp
()
if
(
app
.
globalData
.
isLogin
)
{
if
(
app
.
globalData
.
userInfo
.
perId
)
{
return
true
}
else
{
uni
.
navigateTo
({
url
:
'/pages/index/binding?path='
+
encodeURIComponent
(
path
)
url
:
'/myCenter/personInfo/index?path='
+
encodeURIComponent
(
path
)
})
return
false
}
}
else
{
uni
.
navigateTo
({
url
:
'/pages/index/login?path='
+
encodeURIComponent
(
path
)
})
return
false
;
return
false
}
}
export
{
pcLogin
,
getInfo
,
pcLogin
,
getInfo
,
getCodeImg
,
getSmsCode
,
h5Login
,
...
...
@@ -163,5 +179,7 @@ export {
groupMemberRegister
,
getMyOwnMemberInfo
,
logout
,
getWxUserPhone
,
checkUserAuth
getWxUserPhone
,
checkUserAuth
,
bindIdcCode
}
...
...
config.js
View file @
4b268e3
...
...
@@ -8,9 +8,9 @@
// const baseUrl_api = 'https://newsystem.taekwondo.org.cn/stage-api/'
// train
const
baseUrl_api
=
'http://192.168.1.
11
:8787'
const
trainUrl_api
=
'http://192.168.1.
25
:8686'
//match
const
baseUrl_api
=
'http://192.168.1.
98
:8787'
const
trainUrl_api
=
'http://192.168.1.
98
:8686'
//
match
// const baseUrl_api = 'http://192.168.1.132:8081'
export
default
{
baseUrl_api
,
...
...
myCenter/index.vue
View file @
4b268e3
...
...
@@ -13,7 +13,7 @@
</view>
<view
class=
"rMainBox"
>
<uni-list
:border=
"false"
class=
"myList"
>
<!--
<uni-list-item
:border=
"false"
title=
"个人信息"
showArrow
:to=
"`./myInfo`"
>
<!--
<uni-list-item
:border=
"false"
title=
"个人信息"
showArrow
:to=
"`./myInfo`"
>
<template
v-slot:header
>
<view
class=
"slot-box"
>
<image
class=
"slot-image"
src=
"/static/user_icon03.png"
mode=
"widthFix"
></image>
...
...
@@ -51,7 +51,7 @@
</
template
>
</uni-list-item>
<!-- <uni-list-item :border="false" title="我的赛事" showArrow :to="`./match`">
<!-- <uni-list-item :border="false" title="我的赛事" showArrow :to="`./match`">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="/static/user_icon04.png" mode="widthFix"></image>
...
...
@@ -127,12 +127,12 @@ function building() {
duration
:
2000
});
}
function
goPath
(
path
)
{
function
goPath
(
path
)
{
if
(
path
)
uni
.
navigateTo
({
url
:
path
});
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
myCenter/personInfo/index.vue
0 → 100644
View file @
4b268e3
<
template
>
<view
class=
"bg"
>
<view
class=
"formbox"
v-if=
"form.perId"
>
身份证号:
{{
form
.
idcCode
}}
</view>
<view
class=
"formbox"
v-else
>
<view>
<view
class=
"round-input-item"
>
<uni-easyinput
:styles=
"inputstyle"
placeholder=
"身份证"
v-model=
"form.idcCode"
/>
</view>
</view>
<view
class=
"flex-item"
>
</view>
<view
class=
"center-item"
>
<button
@
click=
"handleBind"
class=
"btn-red"
>
绑定个人会员
</button>
</view>
</view>
</view>
</
template
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
config
from
'@/config.js'
import
{
bindIdcCode
}
from
'@/common/login.js'
const
app
=
getApp
()
const
form
=
ref
({})
let
path
=
'/pages/myCenter/index'
;
onLoad
((
option
)
=>
{
if
(
option
.
path
)
{
path
=
decodeURIComponent
(
option
.
path
)
}
form
.
value
=
app
.
globalData
.
userInfo
})
function
handleBind
()
{
if
(
!
form
.
value
.
idcCode
)
{
uni
.
showToast
({
title
:
'身份证号不能为空'
,
icon
:
'none'
})
return
}
bindIdcCode
(
form
.
value
.
idcCode
)
.
then
((
res
)
=>
{
uni
.
redirectTo
({
url
:
path
})
})
}
</
script
>
<
style
scoped
lang=
"scss"
>
.bg
{
background
:
linear-gradient
(
60deg
,
#ad1820
50%
,
#044a9f
50%
);
padding
:
1px
;
height
:
100vh
;
overflow
:
hidden
;}
.formbox
{
background
:
#fff
;
width
:
700
rpx
;
padding
:
50
rpx
;
box-sizing
:
border-box
;
margin
:
auto
;
border-radius
:
20
rpx
;
}
.logoView
{
/* margin: 20vh 0; */
}
.logo
{
width
:
420
rpx
;
height
:
179
rpx
;
margin
:
60
rpx
auto
60
rpx
;
display
:
block
;
}
.h1
{
font-size
:
36
rpx
;
color
:
#000000
;
text-align
:
center
;
}
.start
{
margin
:
0
auto
80
rpx
;
font-size
:
30
rpx
;
color
:
#fff
;
height
:
80
rpx
;
width
:
480
rpx
;
border-radius
:
40
rpx
;
background
:
#44A92F
;
}
.agreeArea
{
text-align
:
center
;
}
.agreeArea
label
{
font-size
:
26
rpx
;
}
.agreeArea
label
text
{
color
:
#00C176
;
}
.tip
{
margin
:
30
rpx
0
0
;
font-size
:
20
rpx
;
color
:
#181818
;
}
.h3
{}
.round-input-item
{
overflow
:
hidden
;
background
:
RGBA
(
247
,
247
,
248
,
1
);
border-radius
:
40
rpx
;
padding
:
0
0
0
30
rpx
;
height
:
80
rpx
;
margin-bottom
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
image
{
width
:
180
rpx
;
height
:
80
rpx
;
&.icon
{
width
:
30
rpx
;
height
:
30
rpx
;
margin-right
:
16
rpx
;
}
}
input
{
border-left
:
1
rpx
solid
RGBA
(
214
,
216
,
219
,
1
);
padding
:
0
0
0
20
rpx
;
font-size
:
30
rpx
;
}
input
::-webkit-input-placeholder
{
color
:
RGBA
(
158
,
166
,
174
,
1
);
font-size
:
30
rpx
;
}
input
::placeholder
{
color
:
RGBA
(
158
,
166
,
174
,
1
);
font-size
:
30
rpx
;
}
input
::-moz-placeholder
{
color
:
RGBA
(
158
,
166
,
174
,
1
);
font-size
:
30
rpx
;
}
text
{
font-size
:
28
rpx
;
color
:
#014A9F
;
padding
:
0
20
rpx
;
}
}
</
style
>
\ No newline at end of file
pages.json
View file @
4b268e3
...
...
@@ -33,7 +33,7 @@
}
},
{
"path"
:
"pages/myCenter/
myCenter
"
,
"path"
:
"pages/myCenter/
index
"
,
"style"
:
{
"navigationBarTitleText"
:
"我的"
,
"enablePullDownRefresh"
:
false
...
...
@@ -211,6 +211,13 @@
}
},
{
"path"
:
"personInfo/index"
,
"style"
:
{
"navigationBarTitleText"
:
"个人会员信息"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"mytrain/mytrain"
,
"style"
:
{
"navigationBarTitleText"
:
"我的培训"
,
...
...
@@ -263,7 +270,7 @@
"pagePath"
:
"pages/webView/auth"
,
"text"
:
"认证查询"
},
{
"pagePath"
:
"pages/myCenter/
myCenter
"
,
"pagePath"
:
"pages/myCenter/
index
"
,
"text"
:
"我的"
}]
}
...
...
pages/index/binding.vue
View file @
4b268e3
...
...
@@ -9,7 +9,6 @@
<view>
<!-- 密码登录 -->
<view
class=
"formbox"
>
<view>
<view
class=
"round-input-item"
>
<image
class=
"icon"
:src=
"config.baseUrl_api+'/fs/static/login/tag01@2x.png'"
></image>
...
...
@@ -88,48 +87,48 @@
</
template
>
<
script
setup
>
import
{
import
{
ref
}
from
'vue'
}
from
'vue'
import
{
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
config
from
'@/config.js'
import
{
}
from
'@dcloudio/uni-app'
import
config
from
'@/config.js'
import
{
pcLogin
,
getWxUserPhone
,
getCodeImg
,
getSmsCode
,
loginByPhone
}
from
'@/common/login.js'
}
from
'@/common/login.js'
const
popup
=
ref
(
null
)
const
agree
=
ref
(
true
)
const
loading
=
ref
(
false
)
const
showAgree
=
ref
(
false
)
const
form
=
ref
({})
const
codeUrl
=
ref
(
''
)
const
inputstyle
=
ref
({
const
popup
=
ref
(
null
)
const
agree
=
ref
(
true
)
const
loading
=
ref
(
false
)
const
showAgree
=
ref
(
false
)
const
form
=
ref
({})
const
codeUrl
=
ref
(
''
)
const
inputstyle
=
ref
({
borderColor
:
'transparent'
,
fontSize
:
'30rpx'
})
})
const
app
=
getApp
()
let
path
=
'/pages/index/index'
;
onLoad
((
option
)
=>
{
let
path
=
'/pages/index/index'
;
onLoad
((
option
)
=>
{
if
(
option
.
path
)
{
path
=
decodeURIComponent
(
option
.
path
)
}
getCode
()
})
})
function
radioChange
()
{
function
radioChange
()
{
popup
.
value
.
open
()
agree
.
value
=
true
}
function
decryptPhoneNumber
(
res
)
{
}
function
decryptPhoneNumber
(
res
)
{
// console.log(res)
loading
.
value
=
true
...
...
@@ -146,29 +145,29 @@ const app = getApp()
}
else
{
loading
.
value
=
false
}
}
}
function
subscribe
()
{
function
subscribe
()
{
uni
.
requestSubscribeMessage
({
tmplIds
:
[
'pvrlpWl1MDJfOghILwUsQtfcg96LWdstVOFLrDxGcdM'
],
success
:
(
res
)
=>
{
console
.
log
(
'success:'
,
res
)
}
})
}
}
function
showAgreement
()
{
function
showAgreement
()
{
popup
.
value
.
open
()
}
}
function
getCode
()
{
function
getCode
()
{
getCodeImg
().
then
((
res
)
=>
{
codeUrl
.
value
=
'data:image/gif;base64,'
+
res
.
data
.
img
form
.
value
.
uuid
=
res
.
data
.
uuid
})
}
}
function
handleLogin
()
{
function
handleLogin
()
{
if
(
!
form
.
value
.
username
)
{
uni
.
showToast
({
title
:
'账号不能为空'
,
...
...
@@ -197,7 +196,7 @@ const app = getApp()
url
:
path
})
})
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
pages/index/index.vue
View file @
4b268e3
...
...
@@ -28,7 +28,7 @@
<view
@
click=
"goPath('/webView/vipSystem')"
>
<image
/>
会员系统
</view>
<view
@
click=
"goPath('
/myCenter/index')"
>
<view
@
click=
"goTab('/pages
/myCenter/index')"
>
<image
/>
我的
</view>
...
...
@@ -37,29 +37,29 @@
</
template
>
<
script
setup
>
import
*
as
api
from
'@/common/api.js'
;
import
*
as
loginServer
from
'@/common/login.js'
;
import
config
from
'@/config.js'
import
{
import
*
as
api
from
'@/common/api.js'
;
import
*
as
loginServer
from
'@/common/login.js'
;
import
config
from
'@/config.js'
import
{
onLoad
,
onShow
,
onReady
,
onPullDownRefresh
}
from
'@dcloudio/uni-app'
;
import
{
}
from
'@dcloudio/uni-app'
;
import
{
ref
,
getCurrentInstance
}
from
'vue'
;
}
from
'vue'
;
const
{
const
{
proxy
}
=
getCurrentInstance
()
const
app
=
getApp
();
const
svId
=
ref
(
null
);
}
=
getCurrentInstance
()
const
app
=
getApp
();
const
svId
=
ref
(
null
);
const
messageList
=
ref
([])
onShow
(()
=>
{
const
messageList
=
ref
([])
onShow
(()
=>
{
if
(
app
.
globalData
.
isLogin
)
{
init
()
}
else
{
...
...
@@ -67,32 +67,37 @@
init
()
};
}
})
onLoad
(
option
=>
{
})
onLoad
(
option
=>
{
});
});
function
goPath
(
path
)
{
function
goPath
(
path
)
{
if
(
path
)
uni
.
navigateTo
({
url
:
path
});
}
}
function
goTab
(
path
){
uni
.
switchTab
({
url
:
path
})
}
function
init
()
{
function
init
()
{
uni
.
showLoading
({
title
:
'加载中'
});
uni
.
hideLoading
();
}
}
function
goItem
(
item
)
{
function
goItem
(
item
)
{
if
(
item
.
path
)
{
let
path
=
item
.
path
uni
.
navigateTo
({
...
...
@@ -105,7 +110,7 @@
icon
:
'none'
});
}
}
}
</
script
>
<
style
scope
lang=
"scss"
>
.page
{
width
:
100vw
;
overflow
:
hidden
;}
...
...
pages/index/login.vue
View file @
4b268e3
...
...
@@ -5,10 +5,10 @@
<view
class=
"retop"
>
<image
class=
"logotop"
:src=
"config.baseUrl_api+'/fs/static/login/logo@2x.png'"
></image>
<view
class=
"loginbox"
>
<view
class=
"loginNav"
>
<
!--
<
view
class=
"loginNav"
>
<view
class=
"n1"
:class=
"isActive==0?'active':''"
@
click=
"changeActive(0)"
>
密码登录
</view>
<view
class=
"n2"
:class=
"isActive==1?'active':''"
@
click=
"changeActive(1)"
>
短信登录
</view>
</view>
</view>
-->
<!-- 密码登录 -->
<view
class=
"formbox"
>
<form
v-if=
"isActive==0"
>
...
...
@@ -55,9 +55,9 @@
<view
class=
"center-item"
>
<button
@
click=
"login"
class=
"btn-red"
>
登录
</button>
</view>
<view
class=
"center-item"
>
<
!--
<
view
class=
"center-item"
>
<text
class=
"text-red"
@
click=
"goRegister"
>
没有账号,去注册
</text>
</view>
</view>
-->
</view>
...
...
@@ -85,15 +85,18 @@ import {
pcLogin
,
loginByPhone
}
from
'@/common/login.js'
import
{
onLoad
}
from
'@dcloudio/uni-app'
const
isActive
=
ref
(
0
)
const
isActive
=
ref
(
1
)
const
agree
=
ref
(
false
)
const
isRember
=
ref
(
true
)
const
codeUrl
=
ref
(
null
)
const
inputstyle
=
ref
({
const
inputstyle
=
ref
({
borderColor
:
'transparent'
,
fontSize
:
'30rpx'
})
})
const
form
=
ref
({
username
:
null
,
password
:
null
,
...
...
@@ -112,8 +115,12 @@ const countDown = ref({
})
const
app
=
getApp
()
onMounted
(()
=>
{
const
switchTab
=
[
'/pages/index/index'
,
'/pages/webView/auth'
,
'/pages/myCenter/index'
]
let
path
=
'/pages/index/index'
;
onLoad
((
option
)
=>
{
if
(
option
.
path
)
{
path
=
decodeURIComponent
(
option
.
path
)
}
getCode
()
})
...
...
@@ -152,7 +159,6 @@ function login() {
pcLogin
(
form
.
value
)
.
then
((
res
)
=>
{
app
.
globalData
.
isLogin
=
true
uni
.
redirectTo
({
url
:
'/pages/index/index'
...
...
@@ -178,9 +184,21 @@ function login() {
loginByPhone
(
form2
.
value
.
telNo
,
form2
.
value
.
code
)
.
then
(()
=>
{
app
.
globalData
.
isLogin
=
true
if
(
!
app
.
globalData
.
userInfo
.
perId
){
uni
.
redirectTo
({
url
:
'/pages/index/index'
url
:
'/myCenter/personInfo/index?path='
+
encodeURIComponent
(
path
)
})
}
else
{
if
(
switchTab
.
indexOf
(
path
)
>-
1
){
uni
.
switchTab
({
url
:
path
})
}
else
{
uni
.
redirectTo
({
url
:
path
})
}
}
})
}
}
...
...
pages/myCenter/
myCenter
.vue
→
pages/myCenter/
index
.vue
View file @
4b268e3
<
template
>
<view
class=
"box"
>
<view
class=
"box"
v-if=
'isShow'
>
<view
class=
"topBg"
>
<view
class=
"userInfoBox"
>
<view
class=
"headImg"
>
...
...
@@ -13,7 +13,7 @@
</view>
<view
class=
"rMainBox"
>
<uni-list
:border=
"false"
class=
"myList"
>
<!--
<uni-list-item
:border=
"false"
title=
"个人信息"
showArrow
:to=
"`./myInfo`"
>
<!--
<uni-list-item
:border=
"false"
title=
"个人信息"
showArrow
:to=
"`./myInfo`"
>
<template
v-slot:header
>
<view
class=
"slot-box"
>
<image
class=
"slot-image"
src=
"/static/user_icon03.png"
mode=
"widthFix"
></image>
...
...
@@ -42,8 +42,16 @@
</view>
</
template
>
</uni-list-item>
-->
<uni-list-item
:border=
"false"
title=
"我的培训"
showArrow
clickable
@
click=
"goPath('/myCenter/mytrain/mytrain')"
>
<uni-list-item
:border=
"false"
title=
"个人会员"
showArrow
clickable
@
click=
"goPath('/myCenter/personInfo/index')"
>
<
template
v-slot:header
>
<view
class=
"slot-box"
>
<image
class=
"slot-image"
mode=
"widthFix"
></image>
</view>
</
template
>
</uni-list-item>
<uni-list-item
:border=
"false"
title=
"我的培训"
showArrow
clickable
@
click=
"goPath('/myCenter/mytrain/mytrain')"
>
<
template
v-slot:header
>
<view
class=
"slot-box"
>
<image
class=
"slot-image"
mode=
"widthFix"
></image>
...
...
@@ -51,7 +59,7 @@
</
template
>
</uni-list-item>
<!-- <uni-list-item :border="false" title="我的赛事" showArrow :to="`./match`">
<!-- <uni-list-item :border="false" title="我的赛事" showArrow :to="`./match`">
<template v-slot:header>
<view class="slot-box">
<image class="slot-image" src="/static/user_icon04.png" mode="widthFix"></image>
...
...
@@ -67,32 +75,40 @@
<
script
setup
>
import
*
as
my
from
'@/myCenter/center_api.js'
;
import
*
as
loginServer
from
'@/common/login.js'
;
import
{
ref
}
from
'vue'
;
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
;
const
user
=
ref
({});
const
app
=
getApp
();
const
isShow
=
ref
(
false
)
onMounted
(()
=>
{
init
()
})
onShow
(()
=>
{
if
(
app
.
globalData
.
isLogin
)
{
init
();
}
else
{
app
.
firstLoadCallback
=
()
=>
{
init
();
};
}
});
function
init
()
{
console
.
log
(
app
.
globalData
.
isLogin
)
if
(
app
.
globalData
.
userInfo
){
if
(
app
.
globalData
.
isLogin
)
{
isShow
.
value
=
true
if
(
app
.
globalData
.
userInfo
)
{
const
currUser
=
app
.
globalData
.
userInfo
user
.
value
=
currUser
;
}
else
{
loginServer
.
getInfo
().
then
(
res
=>
{
loginServer
.
getInfo
().
then
(
res
=>
{
const
currUser
=
app
.
globalData
.
userInfo
user
.
value
=
currUser
})
}
}
else
{
uni
.
redirectTo
({
url
:
'/pages/index/login?path='
+
encodeURIComponent
(
getCurrentPages
()[
0
].
$page
.
fullPath
)
})
}
}
function
goBack
()
{
...
...
@@ -127,74 +143,87 @@ function building() {
duration
:
2000
});
}
function
goPath
(
path
)
{
if
(
path
)
function
goPath
(
path
)
{
if
(
path
)
uni
.
navigateTo
({
url
:
path
});
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.box
{
.box
{
width
:
100vw
;
overflow
:
hidden
;
}
.rMainBox
{
}
.rMainBox
{
box-sizing
:
border-box
;
padding
:
20
rpx
25
rpx
0
;
margin
:
25
rpx
;
}
.userInfoBox
{
}
.userInfoBox
{
height
:
200
rpx
;
}
.nameBox
{
}
.nameBox
{
position
:
absolute
;
left
:
180
rpx
;
top
:
70
rpx
;
font-size
:
30
rpx
;
}
.nameBox
view
{
}
.nameBox
view
{
color
:
#7b7f83
;
font-size
:
26
rpx
;
margin-top
:
10
rpx
;
}
.goback
{
}
.goback
{
position
:
absolute
;
color
:
#fff
;
top
:
100
rpx
;
left
:
35
rpx
;
}
.forAdmin
{
}
.forAdmin
{
padding
:
25
rpx
;
box-sizing
:
border-box
;
}
.topBg
{
}
.onlyCardBottom
{
}
.topBg
{}
.onlyCardBottom
{
position
:
relative
;
width
:
660
rpx
;
margin
:
auto
;
height
:
90
rpx
;
.bbg
{
height
:
90
rpx
;
width
:
660
rpx
;
}
.cardBottom
{
width
:
660
rpx
;
background
:
transparent
;
height
:
90
rpx
;
text
{
font-size
:
28
rpx
;
color
:
#925921
;
}
.renewBtn
{
background
:
#874f02
;
color
:
#fff
;
}
}
}
.headImg
{
}
.headImg
{
border-radius
:
50%
;
position
:
relative
;
top
:
50
rpx
;
...
...
@@ -204,59 +233,67 @@ function building() {
border
:
4px
solid
#ffffff
;
background
:
#c4f9cb
;
left
:
40
rpx
;
button
{
display
:
block
;
padding
:
0
;
}
image
{
width
:
100
rpx
;
height
:
100
rpx
;
display
:
block
;
}
}
}
.slot-image
{
.slot-image
{
width
:
50
rpx
;
position
:
relative
;
top
:
-8
rpx
;
height
:
50
rpx
;
margin-right
:
30
rpx
;
}
}
.myList
{
}
.funcBar
{
.myList
{}
.funcBar
{
display
:
flex
;
background
:
#fff
;
width
:
700
rpx
;
height
:
140
rpx
;
justify-content
:
space-around
;
}
.funcBar
view
{
}
.funcBar
view
{
display
:
flex
;
align-items
:
center
;
font-size
:
36
rpx
;
}
.funcBar
image
{
}
.funcBar
image
{
width
:
80
rpx
;
height
:
80
rpx
;
}
.topbgimg
{
}
.topbgimg
{
width
:
100vw
;
position
:
absolute
;
z-index
:
-1
;
}
.reportItembox
{
}
.reportItembox
{
overflow
:
hidden
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
}
.reportItem
{
}
.reportItem
{
background
:
#fff
;
border-radius
:
15
rpx
;
width
:
340
rpx
;
margin-top
:
25
rpx
;
.t
{
border-bottom
:
1px
solid
#e5e5e5
;
height
:
70
rpx
;
...
...
@@ -265,15 +302,18 @@ function building() {
font-size
:
30
rpx
;
padding-left
:
36
rpx
;
}
.rbody
{
display
:
flex
;
padding
:
36
rpx
;
box-sizing
:
border-box
;
view
{
font-size
:
26
rpx
;
color
:
#888
;
width
:
40%
;
}
text
{
color
:
#00c176
;
font-weight
:
bold
;
...
...
@@ -282,15 +322,18 @@ function building() {
margin-bottom
:
20
rpx
;
}
}
}
.changephonepop
{
}
.changephonepop
{
width
:
100%
;
}
.changephonepop
view
{
}
.changephonepop
view
{
width
:
100%
;
margin
:
0
0
30
rpx
;
}
.changephonepop
view
input
{
}
.changephonepop
view
input
{
width
:
100%
;
background
:
#f4f4f4
;
font-size
:
30
rpx
;
...
...
@@ -298,11 +341,13 @@ function building() {
padding
:
0
15
rpx
;
box-sizing
:
border-box
;
line-height
:
80
rpx
;
}
.changephonepop
view
.ffff
{
}
.changephonepop
view
.ffff
{
display
:
flex
;
}
.changephonepop
view
button
{
}
.changephonepop
view
button
{
font-size
:
24
rpx
;
margin-left
:
10
rpx
;
white-space
:
nowrap
;
...
...
@@ -312,5 +357,5 @@ function building() {
color
:
#fff
;
padding
:
0
;
border
:
none
;
}
}
</
style
>
\ No newline at end of file
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment