Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
X
XiTianSenMall
Project
Project
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
leiqingsong
XiTianSenMall
Commits
9cffeb61
Commit
9cffeb61
authored
Mar 15, 2021
by
全球
Browse files
Options
Browse Files
Download
Plain Diff
修改
parents
f741c165
cc1a3c7d
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
423 additions
and
138 deletions
+423
-138
.env
H5/.env
+1
-1
App.vue
H5/src/App.vue
+22
-6
bank.js
H5/src/api/bank.js
+12
-1
user.js
H5/src/api/user.js
+16
-5
BaseNavBar.vue
H5/src/components/BaseNavBar.vue
+25
-1
main.js
H5/src/main.js
+6
-1
vant-ui.js
H5/src/plugins/vant-ui.js
+3
-1
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+76
-23
localGetter.js
H5/src/utils/localGetter.js
+17
-0
request.js
H5/src/utils/request.js
+1
-4
airDropPool.vue
H5/src/views/airDropPool.vue
+2
-2
bank.vue
H5/src/views/bank.vue
+38
-8
canCashOut.vue
H5/src/views/canCashOut.vue
+1
-1
cash-out-record.vue
H5/src/views/cashOut/cash-out-record.vue
+1
-1
cash-out.vue
H5/src/views/cashOut/cash-out.vue
+41
-7
customer-service.vue
H5/src/views/customer-service.vue
+6
-2
grade.vue
H5/src/views/grade.vue
+2
-1
allIncome.vue
H5/src/views/income/allIncome.vue
+1
-1
income-detail.vue
H5/src/views/income/income-detail.vue
+1
-1
wallet.vue
H5/src/views/income/wallet.vue
+31
-35
invite.vue
H5/src/views/invite.vue
+1
-2
leagueNums.vue
H5/src/views/leagueNums.vue
+1
-2
modefyAvatar.vue
H5/src/views/modefyAvatar.vue
+43
-8
moments.vue
H5/src/views/moments/moments.vue
+1
-1
publish.vue
H5/src/views/moments/publish.vue
+1
-1
myStatus.vue
H5/src/views/my/myStatus.vue
+4
-3
register.vue
H5/src/views/register.vue
+1
-1
fastest-progress.vue
H5/src/views/rewards/fastest-progress.vue
+27
-1
month-award.vue
H5/src/views/rewards/month-award.vue
+2
-2
settings.vue
H5/src/views/settings.vue
+39
-15
No files found.
H5/.env
View file @
9cffeb61
VUE_APP_BASE_URL = "http://8.131.244.76:81/"
VUE_APP_BASE_URL = "http://8.131.244.76:81"
\ No newline at end of file
\ No newline at end of file
H5/src/App.vue
View file @
9cffeb61
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAuthToken
}
from
"@/utils/bridgeToAppFun"
;
import
BaseNavBar
from
"./components/BaseNavBar.vue"
;
import
BaseNavBar
from
"./components/BaseNavBar.vue"
;
import
{
getUserInfo
}
from
"@/api/user"
;
export
default
{
export
default
{
components
:
{
components
:
{
BaseNavBar
BaseNavBar
...
@@ -22,15 +22,31 @@ export default {
...
@@ -22,15 +22,31 @@ export default {
this
.
currentTitle
=
val
.
meta
.
title
;
this
.
currentTitle
=
val
.
meta
.
title
;
}
}
},
},
mounted
()
{
created
()
{
getAuthToken
()
console
.
log
(
"和App开始交互"
);
this
.
$bridgeToAppFun
.
getAuthToken
()
.
then
(
res
=>
{
.
then
(
res
=>
{
// const token = res
;
console
.
log
(
"获取token成功"
,
res
)
;
console
.
log
(
res
);
this
.
saveUser
(
res
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
console
.
log
(
"
error
"
,
err
);
console
.
log
(
"
获取token失败
"
,
err
);
});
});
},
methods
:
{
saveUser
(
data
)
{
if
(
data
)
{
getUserInfo
().
then
(
res
=>
{
console
.
log
(
"存用户信息"
);
if
(
res
.
code
==
0
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
.
data
));
}
});
}
else
{
console
.
log
(
"调用失败"
);
}
}
}
}
};
};
</
script
>
</
script
>
...
...
H5/src/api/bank.js
View file @
9cffeb61
...
@@ -55,7 +55,7 @@ export function cashOut(params) {
...
@@ -55,7 +55,7 @@ export function cashOut(params) {
/**
/**
* 获取用户银行卡信息
* 获取用户银行卡信息
* @param {*} params
* @param {*} params
userId
* @returns
* @returns
*/
*/
export
function
getUserBankInfo
(
params
)
{
export
function
getUserBankInfo
(
params
)
{
...
@@ -65,3 +65,14 @@ export function getUserBankInfo(params) {
...
@@ -65,3 +65,14 @@ export function getUserBankInfo(params) {
params
params
});
});
}
}
/**
* 获取银行卡列表
* @returns
*/
export
function
getBankList
()
{
return
request
({
url
:
"/bank/getBankNameList"
,
method
:
"get"
});
}
H5/src/api/user.js
View file @
9cffeb61
...
@@ -65,15 +65,26 @@ export function logout(token) {
...
@@ -65,15 +65,26 @@ export function logout(token) {
});
});
}
}
/**
/**
* 根据token获取userId
* 根据token获取userId
* @param {*} params token
* @param {*} params token
*/
*/
export
function
getUserInfo
()
{
export
function
getUserInfo
()
{
return
request
({
return
request
({
url
:
"/api/user/info"
,
url
:
"/api/user/info"
,
method
:
"post"
,
method
:
"post"
});
}
/**
* 获取用户信息
* @param {*} params userId
* @returns
*/
export
function
getUserInfo2
(
params
)
{
return
request
({
url
:
"/user/getByUserId"
,
method
:
"get"
,
params
});
});
}
}
\ No newline at end of file
H5/src/components/BaseNavBar.vue
View file @
9cffeb61
...
@@ -20,7 +20,31 @@ export default {
...
@@ -20,7 +20,31 @@ export default {
},
},
methods
:
{
methods
:
{
onClickLeft
()
{
onClickLeft
()
{
this
.
$router
.
go
(
-
1
);
const
currentPage
=
this
.
$router
.
currentRoute
.
name
;
console
.
log
(
"router"
,
currentPage
);
const
whiteList
=
[
"MyStatus"
,
"Publish"
,
"FastestProgress"
,
"MonthAward"
,
"Instructions"
,
"Settings"
,
"Grade"
,
"AirDrop"
,
"Invite"
,
"AboutUs"
,
"customerService"
];
if
(
whiteList
.
indexOf
(
currentPage
)
>
-
1
)
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
}
catch
{
console
.
log
(
"不能交互"
);
}
}
else
{
this
.
$router
.
go
(
-
1
);
}
// this.$router.go(-1);
},
},
onClickRight
()
{
onClickRight
()
{
console
.
log
(
"right"
);
console
.
log
(
"right"
);
...
...
H5/src/main.js
View file @
9cffeb61
...
@@ -8,9 +8,14 @@ import "amfe-flexible";
...
@@ -8,9 +8,14 @@ import "amfe-flexible";
import
"@/plugins/vant-ui.js"
;
import
"@/plugins/vant-ui.js"
;
import
"@/plugins/echarts-plugins.js"
;
import
"@/plugins/echarts-plugins.js"
;
import
Vconsole
from
"vconsole"
;
import
Vconsole
from
"vconsole"
;
import
{
getUserId
,
getUserAvatar
}
from
"./utils/localGetter"
;
Vue
.
prototype
.
$userId
=
getUserId
();
Vue
.
prototype
.
$userAvatar
=
getUserAvatar
();
Vue
.
prototype
.
$vConsole
=
new
Vconsole
();
import
bridgeToAppFun
from
"@/utils/bridgeToAppFun"
;
Vue
.
prototype
.
$bridgeToAppFun
=
new
bridgeToAppFun
();
Vue
.
prototype
.
$vConsole
=
new
Vconsole
();
Vue
.
use
(
MiniRefreshTools
);
Vue
.
use
(
MiniRefreshTools
);
Vue
.
config
.
productionTip
=
false
;
Vue
.
config
.
productionTip
=
false
;
...
...
H5/src/plugins/vant-ui.js
View file @
9cffeb61
import
Vue
from
"vue"
;
import
Vue
from
"vue"
;
import
{
import
{
ActionSheet
,
Button
,
Button
,
Cell
,
Cell
,
CellGroup
,
CellGroup
,
...
@@ -24,7 +25,8 @@ import {
...
@@ -24,7 +25,8 @@ import {
Loading
Loading
}
from
"vant"
;
}
from
"vant"
;
Vue
.
use
(
Button
)
Vue
.
use
(
ActionSheet
)
.
use
(
Button
)
.
use
(
Cell
)
.
use
(
Cell
)
.
use
(
CellGroup
)
.
use
(
CellGroup
)
.
use
(
Dialog
)
.
use
(
Dialog
)
...
...
H5/src/utils/bridgeToAppFun.js
View file @
9cffeb61
// H5 去调用App的方法
// H5 去调用App的方法
import
jsBridge
from
"./bridge"
;
import
jsBridge
from
"./bridge"
;
import
{
getUserInfo
}
from
"@/api/user"
;
// 获取Token
export
function
getAuthToken
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
"调用1"
);
jsBridge
.
callhandler
(
"getAuthToken"
,
null
,
data
=>
{
console
.
log
(
"调用2"
);
localStorage
.
setItem
(
"token"
,
data
);
console
.
log
(
"--------------"
);
class
bridgeToAppFun
{
if
(
data
)
{
constructor
()
{
getUserInfo
().
then
(
res
=>
{
this
.
userAgent
=
null
;
console
.
log
(
navigator
.
userAgent
);
})
if
(
alert
(
"获取到的token"
+
data
);
navigator
.
userAgent
.
indexOf
(
"Android"
)
>
-
1
||
resolve
(
data
);
navigator
.
userAgent
.
indexOf
(
"Adr"
)
>
-
1
}
else
{
)
{
reject
(
"调用失败,未返回data"
);
this
.
userAgent
=
"android"
;
}
else
if
(
navigator
.
userAgent
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
))
{
this
.
userAgent
=
"ios"
;
}
else
{
this
.
userAgent
=
"web"
;
}
}
// 获取Token
getAuthToken
()
{
if
(
this
.
userAgent
===
"android"
)
{
// android
let
token
=
null
;
try
{
token
=
window
.
android
.
getAuthToken
();
localStorage
.
setItem
(
"token"
,
token
);
}
catch
{
console
.
log
(
"token获取失败"
);
}
}
});
return
new
Promise
((
resolve
,
reject
)
=>
{
});
if
(
token
)
{
resolve
(
token
);
}
else
{
reject
(
"失败"
);
}
});
}
else
if
(
this
.
userAgent
===
"ios"
)
{
// ios
return
new
Promise
((
resolve
,
reject
)
=>
{
jsBridge
.
callhandler
(
"getAuthToken"
,
null
,
data
=>
{
localStorage
.
setItem
(
"token"
,
data
);
if
(
data
)
{
resolve
(
data
);
}
else
{
console
.
log
(
"调用失败"
);
reject
(
"getAuthToken"
,
data
);
}
});
});
}
}
// 退出
logoutToApp
()
{
console
.
log
(
"退出登录"
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
window
.
android
.
logout
();
}
else
{
jsBridge
.
callhandler
(
"logout"
);
}
}
navigateBack
()
{
console
.
log
(
"返回"
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
window
.
android
.
navigateBack
();
}
else
{
jsBridge
.
callhandler
(
"navigateBack"
);
}
}
showBottomBar
(
params
)
{
console
.
log
(
"隐藏底部"
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
window
.
android
.
showBottomBar
(
params
);
}
else
{
jsBridge
.
callhandler
(
"showBottomBar"
,
params
);
}
}
}
}
// 退出
export
default
bridgeToAppFun
;
export
function
logoutToApp
()
{
jsBridge
.
callhandler
(
"logout"
);
}
H5/src/utils/localGetter.js
0 → 100644
View file @
9cffeb61
export
function
getUserId
()
{
let
userInfo
=
localStorage
.
getItem
(
"user"
);
if
(
userInfo
)
{
return
JSON
.
parse
(
userInfo
).
userId
;
}
else
{
return
""
;
}
}
export
function
getUserAvatar
()
{
let
userInfo
=
localStorage
.
getItem
(
"user"
);
if
(
userInfo
)
{
return
JSON
.
parse
(
userInfo
).
headImage
;
}
else
{
return
""
;
}
}
H5/src/utils/request.js
View file @
9cffeb61
...
@@ -5,14 +5,13 @@ let loading = null;
...
@@ -5,14 +5,13 @@ let loading = null;
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
"/shop-mall"
,
baseURL
:
"/shop-mall"
,
// baseURL: "http://192.168.204.152:8997/shop-mall",
timeout
:
5000
timeout
:
5000
});
});
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
const
token
=
localStorage
.
getItem
(
"token"
);
const
token
=
localStorage
.
getItem
(
"token"
);
config
.
headers
[
"
Authorization"
]
=
"Bearer "
+
token
;
config
.
headers
[
"
token"
]
=
token
;
if
(
!
config
.
loading
)
{
if
(
!
config
.
loading
)
{
loading
=
Toast
.
loading
({
loading
=
Toast
.
loading
({
forbidClick
:
true
,
forbidClick
:
true
,
...
@@ -23,8 +22,6 @@ service.interceptors.request.use(
...
@@ -23,8 +22,6 @@ service.interceptors.request.use(
},
},
error
=>
{
error
=>
{
if
(
loading
)
Toast
.
clear
();
if
(
loading
)
Toast
.
clear
();
console
.
log
(
"rqquest====错误"
,
error
);
console
.
log
(
error
);
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
);
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
);
}
}
);
);
...
...
H5/src/views/airDropPool.vue
View file @
9cffeb61
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
total
:
0
,
total
:
0
,
userPoolVos
:
[{
userId
:
""
}],
userPoolVos
:
[{
userId
:
this
.
$userId
}],
timer
:
null
timer
:
null
};
};
},
},
...
@@ -55,7 +55,7 @@ export default {
...
@@ -55,7 +55,7 @@ export default {
queryData
()
{
queryData
()
{
const
_this
=
this
;
const
_this
=
this
;
queryAerialDelivery
().
then
(
res
=>
{
queryAerialDelivery
().
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
'空投池'
,
res
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
_this
.
total
=
res
.
data
.
total
;
_this
.
total
=
res
.
data
.
total
;
_this
.
userPoolVos
=
res
.
data
.
userPoolVos
;
_this
.
userPoolVos
=
res
.
data
.
userPoolVos
;
...
...
H5/src/views/bank.vue
View file @
9cffeb61
<
template
>
<
template
>
<div
class=
"bank"
>
<div
class=
"bank"
>
<van-cell-group>
<van-cell-group>
<van-
field
<van-
cell
v-model=
"form.bankName"
is-link
label=
"所属银行
"
:value=
"form.bankName
"
right-icon=
"arrow
"
title=
"所属银行
"
placeholder=
"请选择"
placeholder=
"请选择"
size=
"large"
size=
"large"
readonly
@
click=
"sheetShow = true"
/>
/>
<van-field
<van-field
v-model=
"form.cardNumber"
v-model=
"form.cardNumber"
...
@@ -31,15 +31,33 @@
...
@@ -31,15 +31,33 @@
@
click=
"addAndEditBankInfo"
@
click=
"addAndEditBankInfo"
>
编辑
</van-button
>
编辑
</van-button
>
>
<van-popup
v-model=
"sheetShow"
round
position=
"bottom"
>
<van-picker
show-toolbar
title=
"请选择银行"
:columns=
"actions"
:default-index=
"2"
@
cancel=
"sheetShow = false"
@
confirm=
"onSelect"
/>
</van-popup>
<!--
<van-action-sheet
v-model=
"sheetShow"
:actions=
"actions"
@
select=
"onSelect"
/>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getUserBankInfo
,
addUserBankInfo
,
editUserBankInfo
}
from
"@/api/bank"
;
import
{
getUserBankInfo
,
addUserBankInfo
,
editUserBankInfo
,
getBankList
}
from
"@/api/bank"
;
export
default
{
export
default
{
name
:
"Bank"
,
name
:
"Bank"
,
data
()
{
data
()
{
return
{
return
{
sheetShow
:
false
,
actions
:
[],
form
:
{
form
:
{
bankName
:
""
,
bankName
:
""
,
cardNumber
:
""
,
cardNumber
:
""
,
...
@@ -49,9 +67,21 @@ export default {
...
@@ -49,9 +67,21 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
getBank
();
this
.
getBankInfo
();
this
.
getBankInfo
();
},
},
methods
:
{
methods
:
{
onSelect
(
item
)
{
this
.
form
.
bankName
=
item
;
this
.
sheetShow
=
false
;
},
getBank
()
{
getBankList
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
actions
=
res
.
data
;
}
});
},
addAndEditBankInfo
()
{
addAndEditBankInfo
()
{
const
params
=
this
.
form
;
const
params
=
this
.
form
;
if
(
this
.
form
.
id
)
{
if
(
this
.
form
.
id
)
{
...
@@ -86,10 +116,10 @@ export default {
...
@@ -86,10 +116,10 @@ export default {
},
},
getBankInfo
()
{
getBankInfo
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
getUserBankInfo
(
params
).
then
(
res
=>
{
getUserBankInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
&&
res
.
data
)
{
this
.
form
=
res
.
data
;
this
.
form
=
res
.
data
;
}
}
});
});
...
...
H5/src/views/canCashOut.vue
View file @
9cffeb61
...
@@ -48,7 +48,7 @@ export default {
...
@@ -48,7 +48,7 @@ export default {
methods
:
{
methods
:
{
getWithdrawal
()
{
getWithdrawal
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
getWithdrawalAmount
(
params
).
then
(
res
=>
{
getWithdrawalAmount
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/cashOut/cash-out-record.vue
View file @
9cffeb61
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
},
},
getRecordList
(
yearMonth
)
{
getRecordList
(
yearMonth
)
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
,
userId
:
this
.
$userId
,
yearMonth
:
yearMonth
yearMonth
:
yearMonth
};
};
getWithdrawalRecord
(
params
).
then
(
res
=>
{
getWithdrawalRecord
(
params
).
then
(
res
=>
{
...
...
H5/src/views/cashOut/cash-out.vue
View file @
9cffeb61
...
@@ -5,12 +5,18 @@
...
@@ -5,12 +5,18 @@
</van-cell-group>
</van-cell-group>
<div
class=
"detail"
>
<div
class=
"detail"
>
<p
style=
"font-size: 24px"
>
提现金额
</p>
<p
style=
"font-size: 24px"
>
提现金额
</p>
<van-field
v-model=
"money"
type=
"number"
label=
"¥"
class=
"money"
/>
<van-field
v-model=
"money"
type=
"number"
label=
"¥"
class=
"money"
@
blur=
"onFillMoneyBlur"
/>
<div
class=
"remain"
>
<div
class=
"remain"
>
<span
style=
"color: #666666"
<span
style=
"color: #666666"
>
可提现金额
{{
remainMoney
.
toFixed
(
2
)
}}
元
</span
>
可提现金额
{{
remainMoney
.
toFixed
(
2
)
}}
元
</span
>
>
<span
class=
"all"
@
click=
"allIn"
>
全部提现
</span>
<span
v-if=
"remainMoney > 0"
class=
"all"
@
click=
"allIn"
>
全部提现
</span>
</div>
</div>
<div
class=
"real"
>
<div
class=
"real"
>
<p
class=
"real-item"
>
<p
class=
"real-item"
>
...
@@ -76,6 +82,7 @@
...
@@ -76,6 +82,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getWithdrawalAmount
}
from
"@/api/wallet"
;
import
{
getUserBankInfo
,
sendSms
,
cashOut
}
from
"@/api/bank"
;
import
{
getUserBankInfo
,
sendSms
,
cashOut
}
from
"@/api/bank"
;
import
BaseDialog
from
"@/components/BaseDialog.vue"
;
import
BaseDialog
from
"@/components/BaseDialog.vue"
;
export
default
{
export
default
{
...
@@ -83,7 +90,7 @@ export default {
...
@@ -83,7 +90,7 @@ export default {
name
:
"CashOut"
,
name
:
"CashOut"
,
data
()
{
data
()
{
return
{
return
{
userPhone
:
"13100911369"
,
userPhone
:
this
.
$userId
,
bank
:
""
,
bank
:
""
,
money
:
null
,
money
:
null
,
remainMoney
:
100
,
remainMoney
:
100
,
...
@@ -97,8 +104,28 @@ export default {
...
@@ -97,8 +104,28 @@ export default {
},
},
created
()
{
created
()
{
this
.
getUserInfo
();
this
.
getUserInfo
();
this
.
canCashOut
();
},
},
methods
:
{
methods
:
{
onFillMoneyBlur
(
e
)
{
if
(
e
.
target
.
value
>
this
.
remainMoney
)
{
this
.
$toast
.
fail
(
"输入超过可提现金额,请重新输入"
);
return
false
;
}
},
canCashOut
()
{
const
params
=
{
userId
:
this
.
$userId
};
getWithdrawalAmount
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
remainMoney
=
res
.
data
.
currentMoneyCan
;
}
else
{
this
.
remainMoney
=
100
;
}
});
getWithdrawalAmount
;
},
jumpToBank
()
{
jumpToBank
()
{
console
.
log
(
"1"
);
console
.
log
(
"1"
);
this
.
$router
.
push
(
"/bank"
);
this
.
$router
.
push
(
"/bank"
);
...
@@ -113,9 +140,12 @@ export default {
...
@@ -113,9 +140,12 @@ export default {
this
.
$toast
.
fail
(
"未输入提现金额"
);
this
.
$toast
.
fail
(
"未输入提现金额"
);
return
;
return
;
}
}
if
(
this
.
money
>
this
.
remainMoney
)
{
this
.
$toast
.
fail
(
"输入超过可提现金额,请重新输入"
);
return
;
}
const
params
=
{
const
params
=
{
userId
:
this
.
userPhone
userId
:
this
.
$userId
};
};
sendSms
(
params
).
then
();
sendSms
(
params
).
then
();
this
.
validCode
=
null
;
this
.
validCode
=
null
;
...
@@ -123,11 +153,15 @@ export default {
...
@@ -123,11 +153,15 @@ export default {
},
},
getUserInfo
()
{
getUserInfo
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
getUserBankInfo
(
params
).
then
(
res
=>
{
getUserBankInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
bank
=
res
.
data
.
bankName
;
if
(
res
.
data
.
bankName
)
{
this
.
bank
=
res
.
data
.
bankName
;
}
else
{
this
.
bank
=
""
;
}
}
}
});
});
},
},
...
...
H5/src/views/customer-service.vue
View file @
9cffeb61
...
@@ -16,8 +16,9 @@
...
@@ -16,8 +16,9 @@
<div
class=
"save-code"
>
<div
class=
"save-code"
>
<p>
保存二维码
</p>
<p>
保存二维码
</p>
<p>
打开微信扫一扫添加客服
</p>
<p>
打开微信扫一扫添加客服
</p>
<p>
请截图保存!
</p>
</div>
</div>
<
van-button>
保存
</van-button
>
<
!--
<van-button>
保存
</van-button>
--
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -42,7 +43,10 @@ export default {
...
@@ -42,7 +43,10 @@ export default {
this
.
$router
.
push
({
name
:
urlName
});
this
.
$router
.
push
({
name
:
urlName
});
},
},
getCustomerData
()
{
getCustomerData
()
{
getCustomer
().
then
(
res
=>
{
let
params
=
{
userId
:
this
.
$userId
};
getCustomer
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
imageUrl
=
process
.
env
.
VUE_APP_BASE_URL
+
res
.
data
;
this
.
imageUrl
=
process
.
env
.
VUE_APP_BASE_URL
+
res
.
data
;
}
}
...
...
H5/src/views/grade.vue
View file @
9cffeb61
...
@@ -107,7 +107,8 @@ export default {
...
@@ -107,7 +107,8 @@ export default {
this
.
$router
.
push
({
name
:
urlName
});
this
.
$router
.
push
({
name
:
urlName
});
},
},
getstatus
()
{
getstatus
()
{
const
userId
=
13933770749
;
const
userId
=
this
.
$userId
;
console
.
log
(
userId
);
const
_this
=
this
;
const
_this
=
this
;
getForestStatus
(
userId
).
then
(
res
=>
{
getForestStatus
(
userId
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/allIncome.vue
View file @
9cffeb61
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
methods
:
{
methods
:
{
getAllRecord
()
{
getAllRecord
()
{
const
params
=
{
const
params
=
{
userId
:
"5"
userId
:
this
.
$userId
};
};
showIncomeRecord
(
params
).
then
(
res
=>
{
showIncomeRecord
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/income-detail.vue
View file @
9cffeb61
...
@@ -231,7 +231,7 @@ export default {
...
@@ -231,7 +231,7 @@ export default {
},
},
getDetail
()
{
getDetail
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
queryIncomeDetail
(
params
).
then
(
res
=>
{
queryIncomeDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/wallet.vue
View file @
9cffeb61
...
@@ -2,21 +2,12 @@
...
@@ -2,21 +2,12 @@
<div
class=
"wallet"
>
<div
class=
"wallet"
>
<div
class=
"content"
>
<div
class=
"content"
>
<img
class=
"balance-img"
src=
"@/assets/images/余额.png"
alt
/>
<img
class=
"balance-img"
src=
"@/assets/images/余额.png"
alt
/>
<p
<p
class=
"currentprofitlabel"
>
style=
"position:absolute;top:136px;width:100%;font-size:18px;color:#333333"
>
当月收益
当月收益
</p>
</p>
<div
<div
class=
"currentprofit"
@
click=
"jumpToIncomeDetail"
>
style=
"position:absolute;top:178px;width:100%"
@
click=
"jumpToIncomeDetail"
>
<span
class=
"month-income"
>
{{
walletInfo
.
moneyIncome
}}
</span>
<span
class=
"month-income"
>
{{
walletInfo
.
moneyIncome
}}
</span>
<img
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"month-income-arrow"
/>
src=
"@/assets/images/右箭头.png"
alt
style=
"width:11px;height:18px"
/>
</div>
</div>
<div
class=
"bottom-box"
>
<div
class=
"bottom-box"
>
<div
class=
"income-item"
>
<div
class=
"income-item"
>
...
@@ -24,11 +15,7 @@
...
@@ -24,11 +15,7 @@
<p>
累计收益
</p>
<p>
累计收益
</p>
<div
@
click=
"jumpToAll"
>
<div
@
click=
"jumpToAll"
>
<span
class=
"money"
>
{{
walletInfo
.
totalIncome
}}
</span>
<span
class=
"money"
>
{{
walletInfo
.
totalIncome
}}
</span>
<img
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"arrow"
/>
src=
"@/assets/images/右箭头.png"
alt
style=
"width:8px;height:15px"
/>
</div>
</div>
</div>
</div>
<div
class=
"income-item"
>
<div
class=
"income-item"
>
...
@@ -36,11 +23,7 @@
...
@@ -36,11 +23,7 @@
<p>
未提余额
</p>
<p>
未提余额
</p>
<div
@
click=
"jumpToCanCashOut"
>
<div
@
click=
"jumpToCanCashOut"
>
<span
class=
"money"
>
{{
walletInfo
.
currentMoneyCan
}}
</span>
<span
class=
"money"
>
{{
walletInfo
.
currentMoneyCan
}}
</span>
<img
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"arrow"
/>
src=
"@/assets/images/右箭头.png"
alt
style=
"width:8px;height:15px"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -55,9 +38,7 @@
...
@@ -55,9 +38,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getAuthToken
}
from
"@/utils/bridgeToAppFun"
;
import
{
getMoneyPackage
}
from
"@/api/wallet"
;
import
{
getMoneyPackage
}
from
"@/api/wallet"
;
export
default
{
export
default
{
name
:
"Wallet"
,
name
:
"Wallet"
,
data
()
{
data
()
{
...
@@ -71,13 +52,6 @@ export default {
...
@@ -71,13 +52,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getWalletInfo
();
this
.
getWalletInfo
();
getAuthToken
()
.
then
(
res
=>
{
console
.
log
(
"success"
,
res
);
})
.
catch
(
err
=>
{
console
.
log
(
"error"
,
err
);
});
},
},
methods
:
{
methods
:
{
// 跳转到可提现界面
// 跳转到可提现界面
...
@@ -101,7 +75,7 @@ export default {
...
@@ -101,7 +75,7 @@ export default {
// 获取用户钱包展示信息
// 获取用户钱包展示信息
getWalletInfo
()
{
getWalletInfo
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
getMoneyPackage
(
params
)
getMoneyPackage
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -122,17 +96,31 @@ export default {
...
@@ -122,17 +96,31 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wallet
{
.wallet
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
100vh
;
height
:
calc
(
100vh
-
48px
);
padding
:
10px
16px
;
overflow
:
hidden
;
padding
:
15px
;
box-sizing
:
border-box
;
p
{
p
{
margin
:
0
;
margin
:
0
;
}
}
.content
{
.content
{
position
:
relative
;
position
:
relative
;
width
:
345px
;
width
:
345px
;
height
:
9
0%
;
height
:
10
0%
;
text-align
:
center
;
text-align
:
center
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
.currentprofitlabel
{
position
:
absolute
;
top
:
136px
;
width
:
100%
;
font-size
:
18px
;
color
:
#333333
;
}
.currentprofit
{
position
:
absolute
;
width
:
100%
;
top
:
178px
;
}
.balance-img
{
.balance-img
{
position
:
absolute
;
position
:
absolute
;
top
:
72px
;
top
:
72px
;
...
@@ -146,6 +134,10 @@ export default {
...
@@ -146,6 +134,10 @@ export default {
font-size
:
28px
;
font-size
:
28px
;
color
:
#333333
;
color
:
#333333
;
}
}
.month-income-arrow
{
width
:
11px
;
height
:
18px
;
}
.bottom-box
{
.bottom-box
{
position
:
absolute
;
position
:
absolute
;
...
@@ -159,6 +151,10 @@ export default {
...
@@ -159,6 +151,10 @@ export default {
img
{
img
{
width
:
30px
;
width
:
30px
;
height
:
29px
;
height
:
29px
;
&
.arrow
{
width
:
12px
;
height
:
18px
;
}
}
}
.income-item
{
.income-item
{
display
:
flex
;
display
:
flex
;
...
...
H5/src/views/invite.vue
View file @
9cffeb61
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
inviteCode
}
from
"@/api/invite"
;
import
{
inviteCode
}
from
"@/api/invite"
;
var
userId
=
"13933770749"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -22,7 +21,7 @@ export default {
...
@@ -22,7 +21,7 @@ export default {
forbidClick
:
true
,
forbidClick
:
true
,
message
:
"加载中..."
message
:
"加载中..."
});
});
inviteCode
(
userId
).
then
(
res
=>
{
inviteCode
(
this
.
$
userId
).
then
(
res
=>
{
if
(
loading
)
_this
.
$toast
.
clear
();
if
(
loading
)
_this
.
$toast
.
clear
();
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
});
});
...
...
H5/src/views/leagueNums.vue
View file @
9cffeb61
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
var
userId
=
13100911369
;
import
{
getMyTeam
}
from
"@/api/grade"
;
import
{
getMyTeam
}
from
"@/api/grade"
;
export
default
{
export
default
{
name
:
"leagueNums"
,
name
:
"leagueNums"
,
...
@@ -76,7 +75,7 @@ export default {
...
@@ -76,7 +75,7 @@ export default {
},
},
methods
:
{
methods
:
{
getMyTeam
()
{
getMyTeam
()
{
getMyTeam
(
userId
).
then
(
res
=>
{
getMyTeam
(
this
.
$
userId
).
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
list
.
forEach
(
v
=>
{
this
.
list
.
forEach
(
v
=>
{
v
.
num
=
res
.
data
[
v
[
"field"
]];
v
.
num
=
res
.
data
[
v
[
"field"
]];
...
...
H5/src/views/modefyAvatar.vue
View file @
9cffeb61
...
@@ -2,9 +2,6 @@
...
@@ -2,9 +2,6 @@
<div
class=
"modefy-avatar"
>
<div
class=
"modefy-avatar"
>
<img
class=
"avatar"
:src=
"avatar"
alt
/>
<img
class=
"avatar"
:src=
"avatar"
alt
/>
<div
class=
"btn"
>
<div
class=
"btn"
>
<van-button
type=
"primary"
plain
style=
"height:44px;top:11px"
@
click=
"checkBtn"
>
确定
</van-button
>
<van-uploader
<van-uploader
:max-count=
"1"
:max-count=
"1"
:before-delete=
"onDeleteAvatar"
:before-delete=
"onDeleteAvatar"
...
@@ -12,6 +9,13 @@
...
@@ -12,6 +9,13 @@
>
>
<van-button
type=
"primary"
>
上传新头像
</van-button>
<van-button
type=
"primary"
>
上传新头像
</van-button>
</van-uploader>
</van-uploader>
<van-button
type=
"primary"
:class=
"!canSubmit && 'deactive-btn'"
plain
@
click=
"checkBtn"
>
确定
</van-button
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -23,21 +27,29 @@ export default {
...
@@ -23,21 +27,29 @@ export default {
name
:
"ModefyAvatar"
,
name
:
"ModefyAvatar"
,
data
()
{
data
()
{
return
{
return
{
canSubmit
:
false
,
avatar
:
""
,
avatar
:
""
,
imageUrl
:
""
imageUrl
:
""
};
};
},
},
mounted
()
{
mounted
()
{
console
.
log
(
"123"
);
console
.
log
(
this
.
$route
.
query
);
if
(
!
this
.
avatar
)
{
const
headImage
=
this
.
$route
.
query
.
headImage
;
if
(
headImage
)
{
this
.
avatar
=
process
.
env
.
VUE_APP_BASE_URL
+
headImage
;
}
else
{
this
.
avatar
=
require
(
"@/assets/images/no_avatar.png"
);
this
.
avatar
=
require
(
"@/assets/images/no_avatar.png"
);
}
}
},
},
methods
:
{
methods
:
{
checkBtn
()
{
checkBtn
()
{
if
(
!
this
.
canSubmit
)
{
return
;
}
this
.
canSubmit
=
false
;
const
params
=
{
const
params
=
{
headImage
:
this
.
imageUrl
,
headImage
:
this
.
imageUrl
,
userId
:
"18757121665"
userId
:
this
.
$userId
};
};
setAvatar
(
params
).
then
(
res
=>
{
setAvatar
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
@@ -57,6 +69,7 @@ export default {
...
@@ -57,6 +69,7 @@ export default {
uploadImage
(
params
,
fd
).
then
(
res
=>
{
uploadImage
(
params
,
fd
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
this
.
imageUrl
=
res
.
zxUrl
;
this
.
imageUrl
=
res
.
zxUrl
;
this
.
canSubmit
=
true
;
});
});
},
},
onDeleteAvatar
(
file
,
detail
)
{
onDeleteAvatar
(
file
,
detail
)
{
...
@@ -84,7 +97,7 @@ export default {
...
@@ -84,7 +97,7 @@ export default {
.modefy-avatar
{
.modefy-avatar
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
text-align
:
center
;
text-align
:
center
;
padding-top
:
11
5px
;
padding-top
:
2
5px
;
}
}
.avatar
{
.avatar
{
width
:
345px
;
width
:
345px
;
...
@@ -92,11 +105,33 @@ export default {
...
@@ -92,11 +105,33 @@ export default {
margin-bottom
:
52px
;
margin-bottom
:
52px
;
border-radius
:
4px
;
border-radius
:
4px
;
}
}
.btn
{
.btn
{
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-around
;
justify-content
:
space-between
;
align-content
:
center
;
width
:
345px
;
height
:
44px
;
margin
:
0
auto
;
.van-uploader
{
.van-button
{
position
:
absolute
;
top
:
0
;
left
:
0
;
}
::v-deep
input
{
width
:
165px
;
height
:
44px
;
}
}
.van-button
{
.van-button
{
width
:
165px
;
width
:
165px
;
}
}
.deactive-btn
{
color
:
#969595
e9
;
background-color
:
#dcd6d6
;
border-color
:
#dcd6d6
;
}
}
}
</
style
>
</
style
>
H5/src/views/moments/moments.vue
View file @
9cffeb61
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
methods
:
{
methods
:
{
getMoment
()
{
getMoment
()
{
const
params
=
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
};
findByUserId
(
params
).
then
(
res
=>
{
findByUserId
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
...
...
H5/src/views/moments/publish.vue
View file @
9cffeb61
...
@@ -51,7 +51,7 @@ export default {
...
@@ -51,7 +51,7 @@ export default {
fd
.
append
(
"files"
,
file
.
file
);
fd
.
append
(
"files"
,
file
.
file
);
});
});
fd
.
append
(
"zxField"
,
this
.
message
);
fd
.
append
(
"zxField"
,
this
.
message
);
fd
.
append
(
"userId"
,
"13100911369"
);
fd
.
append
(
"userId"
,
this
.
$userId
);
uploadImage
(
fd
).
then
();
uploadImage
(
fd
).
then
();
},
},
openPopup
()
{
openPopup
()
{
...
...
H5/src/views/my/myStatus.vue
View file @
9cffeb61
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
>
>
<div
class=
"userAvatar"
>
<div
class=
"userAvatar"
>
<div
class=
"avatar-box"
>
<div
class=
"avatar-box"
>
<img
class=
"avatar"
src=
"@/assets/images/avatar.png
"
alt=
"头像"
/>
<img
class=
"avatar"
:src=
"avatar
"
alt=
"头像"
/>
<img
class=
"level-img"
src=
"@/assets/images/等级展示框.png"
alt
/>
<img
class=
"level-img"
src=
"@/assets/images/等级展示框.png"
alt
/>
<span
class=
"avatar-level"
>
Lv.
{{
userRecommendInfo
.
userlevel
}}
</span>
<span
class=
"avatar-level"
>
Lv.
{{
userRecommendInfo
.
userlevel
}}
</span>
</div>
</div>
...
@@ -88,6 +88,7 @@ export default {
...
@@ -88,6 +88,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
avatar
:
process
.
env
.
VUE_APP_BASE_URL
+
this
.
$userAvatar
,
inviteeArr
:
[],
inviteeArr
:
[],
userRecommendInfo
:
{},
userRecommendInfo
:
{},
activeTab
:
""
,
activeTab
:
""
,
...
@@ -159,7 +160,7 @@ export default {
...
@@ -159,7 +160,7 @@ export default {
},
},
getRecommendInfo
()
{
getRecommendInfo
()
{
const
params
=
{
const
params
=
{
userId
:
"13933770749"
userId
:
this
.
$userId
};
};
recomendInfo
(
params
).
then
(
res
=>
{
recomendInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
@@ -177,7 +178,7 @@ export default {
...
@@ -177,7 +178,7 @@ export default {
},
},
getRecommendDetail
(
level
)
{
getRecommendDetail
(
level
)
{
const
params
=
{
const
params
=
{
user
id
:
"13933770749"
,
user
Id
:
this
.
$userId
,
userlevel
:
level
userlevel
:
level
};
};
recommendDetail
(
params
).
then
(
res
=>
{
recommendDetail
(
params
).
then
(
res
=>
{
...
...
H5/src/views/register.vue
View file @
9cffeb61
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
form
:
{
form
:
{
userId
:
""
,
userId
:
this
.
$userId
,
sms
:
""
,
sms
:
""
,
beInvitedCode
:
""
beInvitedCode
:
""
},
},
...
...
H5/src/views/rewards/fastest-progress.vue
View file @
9cffeb61
<
template
>
<
template
>
<div
class=
"fastest-progress"
>
<div
class=
"fastest-progress"
>
<div
class=
"bg"
>
<div
class=
"bg"
>
<van-icon
name=
"arrow-left"
@
click=
"
$router.go(-1)
"
/>
<van-icon
name=
"arrow-left"
@
click=
"
handlerBack
"
/>
<span
class=
"title"
>
本月进步最大奖励池
</span>
<span
class=
"title"
>
本月进步最大奖励池
</span>
<span
class=
"award"
>
¥
{{
growthTotal
}}
</span>
<span
class=
"award"
>
¥
{{
growthTotal
}}
</span>
</div>
</div>
...
@@ -45,10 +45,36 @@ export default {
...
@@ -45,10 +45,36 @@ export default {
prizeVos
:
[]
prizeVos
:
[]
};
};
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
console
.
log
(
"路由前"
);
try
{
this
.
$bridgeToAppFun
.
showBottomBar
(
false
);
}
catch
{
console
.
log
(
"无法请求App"
);
next
();
}
},
beforeRouteLeave
(
to
,
form
,
next
)
{
console
.
log
(
"离开"
);
try
{
this
.
$bridgeToAppFun
.
showBottomBar
(
true
);
}
catch
{
console
.
log
(
"未能和App交互"
);
next
();
}
},
mounted
()
{
mounted
()
{
this
.
getProgressPrizes
();
this
.
getProgressPrizes
();
},
},
methods
:
{
methods
:
{
handlerBack
()
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
}
catch
{
console
.
log
(
"不能和App交互"
);
this
.
$router
.
go
(
-
1
);
}
},
getProgressPrizes
()
{
getProgressPrizes
()
{
const
_this
=
this
;
const
_this
=
this
;
getProgressPrizes
().
then
(
res
=>
{
getProgressPrizes
().
then
(
res
=>
{
...
...
H5/src/views/rewards/month-award.vue
View file @
9cffeb61
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
:duration=
"3000"
:duration=
"3000"
style=
"font-weight: bold"
style=
"font-weight: bold"
></countTo>
></countTo>
<p
style=
"font-size: 14px;color:#333333"
>
<p
v-if=
"awardInfo"
style=
"font-size: 14px;color:#333333"
>
历史累计奖金:¥
{{
awardInfo
.
awardTotal
.
toFixed
(
2
)
||
0
}}
历史累计奖金:¥
{{
awardInfo
.
awardTotal
.
toFixed
(
2
)
||
0
}}
</p>
</p>
</div>
</div>
...
@@ -102,7 +102,7 @@ export default {
...
@@ -102,7 +102,7 @@ export default {
methods
:
{
methods
:
{
getData
()
{
getData
()
{
const
params
=
{
const
params
=
{
userId
:
"18757121665"
userId
:
this
.
$userId
};
};
monthRewards
(
params
).
then
(
res
=>
{
monthRewards
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/settings.vue
View file @
9cffeb61
<
template
>
<
template
>
<div
class=
"settings"
>
<div
class=
"settings"
>
<van-cell-group
class=
"group-1"
>
<van-cell-group
class=
"group-1"
>
<van-cell
title=
"用户名"
value=
"135****1234
"
/>
<van-cell
title=
"用户名"
:value=
"$userId
"
/>
<van-cell
is-link
center
title=
"头像"
@
click=
"onModefy"
>
<van-cell
is-link
center
title=
"头像"
@
click=
"onModefy"
>
<img
<img
class=
"avatar-img"
:src=
"imgBaseUrl + avatar"
alt=
"头像"
/>
class=
"avatar-img"
src=
"@/assets/images/no_avatar.png"
alt=
"头像"
/>
</van-cell>
</van-cell>
</van-cell-group>
</van-cell-group>
<van-cell-group>
<van-cell-group>
<van-cell
<van-cell
is-link
is-link
title=
"
邀请
人邀请码"
title=
"
推荐
人邀请码"
:value=
"inviteeCode"
:value=
"inviteeCode"
@
click=
"fillInviterCode"
@
click=
"fillInviterCode"
/>
/>
<van-cell
is-link
title=
"软件更新"
value=
"版本v1.2"
/>
<van-cell
is-link
title=
"软件更新"
value=
"版本v1.2"
/>
<van-cell
is-link
title=
"用户协议"
@
click=
"jumpToInstructions"
/>
<van-cell
is-link
title=
"用户协议"
@
click=
"jumpToInstructions"
/>
</van-cell-group>
</van-cell-group>
<van-button
size=
"large"
class=
"logout-btn"
@
click=
"logout"
>
退出登录
</van-button
<a
href=
"redirect://xts.com/login_activity?hideBack=true"
>
>
<van-button
size=
"large"
class=
"logout-btn"
@
click=
"logout"
>
退出登录
</van-button
>
</a>
<base-dialog
<base-dialog
base-dialog-title=
"推荐人邀请码"
base-dialog-title=
"推荐人邀请码"
...
@@ -46,6 +45,7 @@
...
@@ -46,6 +45,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getUserInfo2
}
from
"@/api/user"
;
import
{
logoutToApp
}
from
"@/utils/bridgeToAppFun"
;
import
{
logoutToApp
}
from
"@/utils/bridgeToAppFun"
;
import
{
logout
}
from
"@/api/user"
;
import
{
logout
}
from
"@/api/user"
;
import
{
fillInviteCode
}
from
"@/api/user"
;
import
{
fillInviteCode
}
from
"@/api/user"
;
...
@@ -55,25 +55,49 @@ export default {
...
@@ -55,25 +55,49 @@ export default {
name
:
"Settings"
,
name
:
"Settings"
,
data
()
{
data
()
{
return
{
return
{
imgBaseUrl
:
""
,
avatar
:
""
,
fileList
:
[],
fileList
:
[],
fillCode
:
""
,
fillCode
:
""
,
inviteeCode
:
"未填写"
,
inviteeCode
:
"未填写"
,
inviteeCodeDialog
:
false
inviteeCodeDialog
:
false
};
};
},
},
mounted
()
{
this
.
imgBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
},
methods
:
{
methods
:
{
logout
()
{
getUser
()
{
const
params
=
{
const
params
=
{
token
:
"qwedskdljlkjlklkjlkjlkjl"
userId
:
this
.
$userId
};
};
logout
(
params
).
then
();
console
.
log
(
"setting-userId"
,
params
);
getUserInfo2
(
params
).
then
(
res
=>
{
if
(
res
.
userId
)
{
localStorage
.
setItem
(
"user"
,
JSON
.
stringify
(
res
));
this
.
$nextTick
(()
=>
{
this
.
inviteeCode
=
res
.
inviteCode
;
this
.
avatar
=
res
.
headImage
;
});
}
});
},
logout
()
{
localStorage
.
removeItem
(
"token"
);
logout
().
then
();
logoutToApp
();
logoutToApp
();
},
},
jumpToInstructions
()
{
jumpToInstructions
()
{
this
.
$router
.
push
(
"/instructions"
);
this
.
$router
.
push
(
"/instructions"
);
},
},
onModefy
()
{
onModefy
()
{
this
.
$router
.
push
(
"/modefy-avatar"
);
this
.
$router
.
push
({
path
:
"/modefy-avatar"
,
query
:
{
headImage
:
this
.
avatar
}
});
},
},
onCloseDialog
()
{
onCloseDialog
()
{
this
.
inviteeCodeDialog
=
false
;
this
.
inviteeCodeDialog
=
false
;
...
@@ -83,7 +107,7 @@ export default {
...
@@ -83,7 +107,7 @@ export default {
this
.
inviteeCode
=
this
.
fillCode
;
this
.
inviteeCode
=
this
.
fillCode
;
const
params
=
{
const
params
=
{
inviteCode
:
this
.
fillCode
,
inviteCode
:
this
.
fillCode
,
userId
:
"18757121665"
userId
:
this
.
$userId
};
};
fillInviteCode
(
params
).
then
();
fillInviteCode
(
params
).
then
();
},
},
...
...
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