Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FuLiMini
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjian
FuLiMini
Commits
49f05bfe
Commit
49f05bfe
authored
Apr 22, 2022
by
wangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6dec8742
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
41 deletions
+37
-41
net.js
common/net.js
+2
-2
mine.vue
pages/mine/mine.vue
+15
-13
login.vue
pagesA/login/login.vue
+8
-3
selectAccount.vue
pagesA/selectAccount/selectAccount.vue
+12
-23
No files found.
common/net.js
View file @
49f05bfe
...
...
@@ -150,13 +150,13 @@ export function refreshToken (token) {
export
function
uploadImage
(
image
,
name
,
type
)
{
// type 100 头像 200 退货 300 商品 其他type
let
header
=
headerCom
()
header
.
type
=
type
||
200
let
postObj
=
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
uploadFile
({
url
:
base_url
+
'/upload'
,
url
:
base_url
+
'/
staff/
upload'
,
header
:
header
,
filePath
:
image
,
name
:
name
,
formData
:
{
'uploadType'
:
1000
},
success
(
res
)
{
resolve
(
JSON
.
parse
(
res
.
data
))
},
...
...
pages/mine/mine.vue
View file @
49f05bfe
...
...
@@ -80,19 +80,10 @@
this
.
getUserInfo
()
},
onTabItemTap
()
{
if
(
!
this
.
$store
.
state
.
isLogin
)
{
this
.
$router
.
push
(
'login'
)
}
this
.
getUserInfo
()
},
onShow
()
{
if
(
uni
.
getStorageSync
(
'tokenArr'
).
token
==
undefined
)
{
uni
.
switchTab
({
url
:
'../home/home'
})
if
(
this
.
$store
.
state
.
isLogin
)
{
this
.
$router
.
push
(
'Login'
)
}
else
{
}
this
.
getUserInfo
()
},
methods
:
{
getUserInfo
()
{
...
...
@@ -112,13 +103,24 @@
sizeType
:
[
'original'
,
'compressed'
],
//original 原图,compressed 压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
//album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
success
:
function
(
res
)
{
console
.
log
(
JSON
.
stringify
(
res
.
tempFilePaths
));
that
.
imgArr
=
res
.
tempFilePaths
that
.
$net
.
uploadImage
(
res
.
tempFilePaths
[
0
],
'uploadFile'
,
1000
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
==
200
)
{
that
.
getUserInfo
()
}
else
{
that
.
toast
(
res
.
message
)
}
})
}
});
},
clickItem
(
index
)
{
if
(
index
===
1
)
{
}
else
if
(
index
===
2
)
{
this
.
$router
.
push
(
'IntegralDetail'
)
}
else
if
(
index
===
3
)
{
}
},
setting
()
{
this
.
$router
.
push
(
'Setting'
)
...
...
pagesA/login/login.vue
View file @
49f05bfe
...
...
@@ -104,10 +104,12 @@
this
.
loading
.
loadingHide
()
if
(
res
.
code
===
200
)
{
this
.
$net
.
tokenSave
(
res
.
data
.
token
||
''
)
if
(
res
.
date
&&
res
.
date
.
list
)
{
this
.
$store
.
commit
(
'refreshUserLogin'
,
true
)
if
(
res
.
data
.
list
&&
res
.
data
.
list
.
length
>
0
)
{
this
.
$router
.
replaceTo
(
'SelectAccount'
)
}
else
{
this
.
$router
.
pop
()
}
this
.
$router
.
push
(
'SelectAccount'
)
}
else
{
this
.
toast
(
res
.
message
)
}
...
...
@@ -115,6 +117,9 @@
},
liteLogin
(
liteCode
)
{
this
.
showGetPhoneBtn
=
false
if
(
!
liteCode
)
{
return
}
this
.
loading
.
loadingShow
(
'登录中...'
)
let
params
=
{
'authType'
:
'lite'
,
'authAccount'
:
liteCode
,
'resetToken'
:
'not'
}
this
.
$net
.
post
(
'/auth/authorization'
,
params
).
then
(
res
=>
{
...
...
pagesA/selectAccount/selectAccount.vue
View file @
49f05bfe
...
...
@@ -13,7 +13,7 @@
</view>
</view>
<view
class=
"bottom"
>
<image
v-if=
"!selectTips"
class=
"select-img"
src=
"../../static/select-n.png"
mode=
""
@
click=
"selectTips=
true
"
></image>
<image
v-if=
"!selectTips"
class=
"select-img"
src=
"../../static/select-n.png"
mode=
""
@
click=
"selectTips=
!selectTips
"
></image>
<image
v-else
class=
"select-img"
src=
"../../static/select-h.png"
mode=
""
@
click=
"selectTips=false"
></image>
<view
class=
"tips"
>
查看并同意
<text>
《隐私政策》
</text>
和
<text>
《服务协议》
</text>
...
...
@@ -28,26 +28,7 @@
return
{
topTitle
:
'选择账号'
,
subTitle
:
'系统检测到该手机号已在多家公司注册'
,
accountList
:
[
{
'avatar'
:
''
,
'staffName'
:
'xoakjsbfoq'
,
'accountName'
:
'手机号的不干胶王本岗位能力跟你'
,
'staffState'
:
100
},
{
'avatar'
:
''
,
'staffName'
:
'xoakjsbfoq'
,
'accountName'
:
'手机号的不干胶王本岗位能力跟你'
,
'staffState'
:
100
},
{
'avatar'
:
''
,
'staffName'
:
'xoakjsbfoq'
,
'accountName'
:
'手机号的不干胶王本岗位能力跟你'
,
'staffState'
:
200
}
],
accountList
:
[],
selectTips
:
false
};
},
...
...
@@ -56,14 +37,22 @@
},
methods
:
{
goAccount
(
item
)
{
if
(
!
this
.
selectTips
)
{
this
.
toast
(
'请先查看并同意《隐私政策》和《服务协议》'
)
return
}
this
.
$net
.
post
(
'/account/change'
,
{
'accountCode'
:
item
.
accountCode
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$router
.
pop
()
}
else
{
this
.
toast
(
res
.
message
)
}
})
},
getAllAccount
()
{
this
.
$net
.
get
(
'/staff/query'
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
accountList
=
this
.
accountList
.
concat
(
res
.
data
)
this
.
accountList
=
this
.
accountList
.
concat
(
res
.
data
.
QueryAccountOutput
)
}
else
{
this
.
toast
(
res
.
message
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment