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/"
\ No newline at end of file
VUE_APP_BASE_URL = "http://8.131.244.76:81"
\ No newline at end of file
H5/src/App.vue
View file @
9cffeb61
...
...
@@ -6,8 +6,8 @@
</
template
>
<
script
>
import
{
getAuthToken
}
from
"@/utils/bridgeToAppFun"
;
import
BaseNavBar
from
"./components/BaseNavBar.vue"
;
import
{
getUserInfo
}
from
"@/api/user"
;
export
default
{
components
:
{
BaseNavBar
...
...
@@ -22,15 +22,31 @@ export default {
this
.
currentTitle
=
val
.
meta
.
title
;
}
},
mounted
()
{
getAuthToken
()
created
()
{
console
.
log
(
"和App开始交互"
);
this
.
$bridgeToAppFun
.
getAuthToken
()
.
then
(
res
=>
{
// const token = res
;
console
.
log
(
res
);
console
.
log
(
"获取token成功"
,
res
)
;
this
.
saveUser
(
res
);
})
.
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
>
...
...
H5/src/api/bank.js
View file @
9cffeb61
...
...
@@ -55,7 +55,7 @@ export function cashOut(params) {
/**
* 获取用户银行卡信息
* @param {*} params
* @param {*} params
userId
* @returns
*/
export
function
getUserBankInfo
(
params
)
{
...
...
@@ -65,3 +65,14 @@ export function getUserBankInfo(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) {
});
}
/**
* 根据token获取userId
* @param {*} params token
*/
export
function
getUserInfo
()
{
export
function
getUserInfo
()
{
return
request
({
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 {
},
methods
:
{
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
()
{
console
.
log
(
"right"
);
...
...
H5/src/main.js
View file @
9cffeb61
...
...
@@ -8,9 +8,14 @@ import "amfe-flexible";
import
"@/plugins/vant-ui.js"
;
import
"@/plugins/echarts-plugins.js"
;
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
.
config
.
productionTip
=
false
;
...
...
H5/src/plugins/vant-ui.js
View file @
9cffeb61
import
Vue
from
"vue"
;
import
{
ActionSheet
,
Button
,
Cell
,
CellGroup
,
...
...
@@ -24,7 +25,8 @@ import {
Loading
}
from
"vant"
;
Vue
.
use
(
Button
)
Vue
.
use
(
ActionSheet
)
.
use
(
Button
)
.
use
(
Cell
)
.
use
(
CellGroup
)
.
use
(
Dialog
)
...
...
H5/src/utils/bridgeToAppFun.js
View file @
9cffeb61
// H5 去调用App的方法
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
(
"--------------"
);
if
(
data
)
{
getUserInfo
().
then
(
res
=>
{
})
alert
(
"获取到的token"
+
data
);
resolve
(
data
);
}
else
{
reject
(
"调用失败,未返回data"
);
class
bridgeToAppFun
{
constructor
()
{
this
.
userAgent
=
null
;
console
.
log
(
navigator
.
userAgent
);
if
(
navigator
.
userAgent
.
indexOf
(
"Android"
)
>
-
1
||
navigator
.
userAgent
.
indexOf
(
"Adr"
)
>
-
1
)
{
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
function
logoutToApp
()
{
jsBridge
.
callhandler
(
"logout"
);
}
export
default
bridgeToAppFun
;
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;
const
service
=
axios
.
create
({
baseURL
:
"/shop-mall"
,
// baseURL: "http://192.168.204.152:8997/shop-mall",
timeout
:
5000
});
service
.
interceptors
.
request
.
use
(
config
=>
{
const
token
=
localStorage
.
getItem
(
"token"
);
config
.
headers
[
"
Authorization"
]
=
"Bearer "
+
token
;
config
.
headers
[
"
token"
]
=
token
;
if
(
!
config
.
loading
)
{
loading
=
Toast
.
loading
({
forbidClick
:
true
,
...
...
@@ -23,8 +22,6 @@ service.interceptors.request.use(
},
error
=>
{
if
(
loading
)
Toast
.
clear
();
console
.
log
(
"rqquest====错误"
,
error
);
console
.
log
(
error
);
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
);
}
);
...
...
H5/src/views/airDropPool.vue
View file @
9cffeb61
...
...
@@ -44,7 +44,7 @@ export default {
data
()
{
return
{
total
:
0
,
userPoolVos
:
[{
userId
:
""
}],
userPoolVos
:
[{
userId
:
this
.
$userId
}],
timer
:
null
};
},
...
...
@@ -55,7 +55,7 @@ export default {
queryData
()
{
const
_this
=
this
;
queryAerialDelivery
().
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
'空投池'
,
res
);
if
(
res
.
code
===
0
)
{
_this
.
total
=
res
.
data
.
total
;
_this
.
userPoolVos
=
res
.
data
.
userPoolVos
;
...
...
H5/src/views/bank.vue
View file @
9cffeb61
<
template
>
<div
class=
"bank"
>
<van-cell-group>
<van-
field
v-model=
"form.bankName"
label=
"所属银行
"
right-icon=
"arrow
"
<van-
cell
is-link
:value=
"form.bankName
"
title=
"所属银行
"
placeholder=
"请选择"
size=
"large"
readonly
@
click=
"sheetShow = true"
/>
<van-field
v-model=
"form.cardNumber"
...
...
@@ -31,15 +31,33 @@
@
click=
"addAndEditBankInfo"
>
编辑
</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>
</
template
>
<
script
>
import
{
getUserBankInfo
,
addUserBankInfo
,
editUserBankInfo
}
from
"@/api/bank"
;
import
{
getUserBankInfo
,
addUserBankInfo
,
editUserBankInfo
,
getBankList
}
from
"@/api/bank"
;
export
default
{
name
:
"Bank"
,
data
()
{
return
{
sheetShow
:
false
,
actions
:
[],
form
:
{
bankName
:
""
,
cardNumber
:
""
,
...
...
@@ -49,9 +67,21 @@ export default {
};
},
mounted
()
{
this
.
getBank
();
this
.
getBankInfo
();
},
methods
:
{
onSelect
(
item
)
{
this
.
form
.
bankName
=
item
;
this
.
sheetShow
=
false
;
},
getBank
()
{
getBankList
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
actions
=
res
.
data
;
}
});
},
addAndEditBankInfo
()
{
const
params
=
this
.
form
;
if
(
this
.
form
.
id
)
{
...
...
@@ -86,10 +116,10 @@ export default {
},
getBankInfo
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
getUserBankInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
&&
res
.
data
)
{
this
.
form
=
res
.
data
;
}
});
...
...
H5/src/views/canCashOut.vue
View file @
9cffeb61
...
...
@@ -48,7 +48,7 @@ export default {
methods
:
{
getWithdrawal
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
getWithdrawalAmount
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/cashOut/cash-out-record.vue
View file @
9cffeb61
...
...
@@ -71,7 +71,7 @@ export default {
},
getRecordList
(
yearMonth
)
{
const
params
=
{
userId
:
"13100911369"
,
userId
:
this
.
$userId
,
yearMonth
:
yearMonth
};
getWithdrawalRecord
(
params
).
then
(
res
=>
{
...
...
H5/src/views/cashOut/cash-out.vue
View file @
9cffeb61
...
...
@@ -5,12 +5,18 @@
</van-cell-group>
<div
class=
"detail"
>
<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"
>
<span
style=
"color: #666666"
>
可提现金额
{{
remainMoney
.
toFixed
(
2
)
}}
元
</span
>
<span
class=
"all"
@
click=
"allIn"
>
全部提现
</span>
<span
v-if=
"remainMoney > 0"
class=
"all"
@
click=
"allIn"
>
全部提现
</span>
</div>
<div
class=
"real"
>
<p
class=
"real-item"
>
...
...
@@ -76,6 +82,7 @@
</
template
>
<
script
>
import
{
getWithdrawalAmount
}
from
"@/api/wallet"
;
import
{
getUserBankInfo
,
sendSms
,
cashOut
}
from
"@/api/bank"
;
import
BaseDialog
from
"@/components/BaseDialog.vue"
;
export
default
{
...
...
@@ -83,7 +90,7 @@ export default {
name
:
"CashOut"
,
data
()
{
return
{
userPhone
:
"13100911369"
,
userPhone
:
this
.
$userId
,
bank
:
""
,
money
:
null
,
remainMoney
:
100
,
...
...
@@ -97,8 +104,28 @@ export default {
},
created
()
{
this
.
getUserInfo
();
this
.
canCashOut
();
},
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
()
{
console
.
log
(
"1"
);
this
.
$router
.
push
(
"/bank"
);
...
...
@@ -113,9 +140,12 @@ export default {
this
.
$toast
.
fail
(
"未输入提现金额"
);
return
;
}
if
(
this
.
money
>
this
.
remainMoney
)
{
this
.
$toast
.
fail
(
"输入超过可提现金额,请重新输入"
);
return
;
}
const
params
=
{
userId
:
this
.
userPhone
userId
:
this
.
$userId
};
sendSms
(
params
).
then
();
this
.
validCode
=
null
;
...
...
@@ -123,11 +153,15 @@ export default {
},
getUserInfo
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
getUserBankInfo
(
params
).
then
(
res
=>
{
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 @@
<div
class=
"save-code"
>
<p>
保存二维码
</p>
<p>
打开微信扫一扫添加客服
</p>
<p>
请截图保存!
</p>
</div>
<
van-button>
保存
</van-button
>
<
!--
<van-button>
保存
</van-button>
--
>
</div>
</div>
</div>
...
...
@@ -42,7 +43,10 @@ export default {
this
.
$router
.
push
({
name
:
urlName
});
},
getCustomerData
()
{
getCustomer
().
then
(
res
=>
{
let
params
=
{
userId
:
this
.
$userId
};
getCustomer
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
imageUrl
=
process
.
env
.
VUE_APP_BASE_URL
+
res
.
data
;
}
...
...
H5/src/views/grade.vue
View file @
9cffeb61
...
...
@@ -107,7 +107,8 @@ export default {
this
.
$router
.
push
({
name
:
urlName
});
},
getstatus
()
{
const
userId
=
13933770749
;
const
userId
=
this
.
$userId
;
console
.
log
(
userId
);
const
_this
=
this
;
getForestStatus
(
userId
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/allIncome.vue
View file @
9cffeb61
...
...
@@ -23,7 +23,7 @@ export default {
methods
:
{
getAllRecord
()
{
const
params
=
{
userId
:
"5"
userId
:
this
.
$userId
};
showIncomeRecord
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/income-detail.vue
View file @
9cffeb61
...
...
@@ -231,7 +231,7 @@ export default {
},
getDetail
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
queryIncomeDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/income/wallet.vue
View file @
9cffeb61
...
...
@@ -2,21 +2,12 @@
<div
class=
"wallet"
>
<div
class=
"content"
>
<img
class=
"balance-img"
src=
"@/assets/images/余额.png"
alt
/>
<p
style=
"position:absolute;top:136px;width:100%;font-size:18px;color:#333333"
>
<p
class=
"currentprofitlabel"
>
当月收益
</p>
<div
style=
"position:absolute;top:178px;width:100%"
@
click=
"jumpToIncomeDetail"
>
<div
class=
"currentprofit"
@
click=
"jumpToIncomeDetail"
>
<span
class=
"month-income"
>
{{
walletInfo
.
moneyIncome
}}
</span>
<img
src=
"@/assets/images/右箭头.png"
alt
style=
"width:11px;height:18px"
/>
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"month-income-arrow"
/>
</div>
<div
class=
"bottom-box"
>
<div
class=
"income-item"
>
...
...
@@ -24,11 +15,7 @@
<p>
累计收益
</p>
<div
@
click=
"jumpToAll"
>
<span
class=
"money"
>
{{
walletInfo
.
totalIncome
}}
</span>
<img
src=
"@/assets/images/右箭头.png"
alt
style=
"width:8px;height:15px"
/>
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"arrow"
/>
</div>
</div>
<div
class=
"income-item"
>
...
...
@@ -36,11 +23,7 @@
<p>
未提余额
</p>
<div
@
click=
"jumpToCanCashOut"
>
<span
class=
"money"
>
{{
walletInfo
.
currentMoneyCan
}}
</span>
<img
src=
"@/assets/images/右箭头.png"
alt
style=
"width:8px;height:15px"
/>
<img
src=
"@/assets/images/右箭头.png"
alt
class=
"arrow"
/>
</div>
</div>
</div>
...
...
@@ -55,9 +38,7 @@
</
template
>
<
script
>
import
{
getAuthToken
}
from
"@/utils/bridgeToAppFun"
;
import
{
getMoneyPackage
}
from
"@/api/wallet"
;
export
default
{
name
:
"Wallet"
,
data
()
{
...
...
@@ -71,13 +52,6 @@ export default {
},
mounted
()
{
this
.
getWalletInfo
();
getAuthToken
()
.
then
(
res
=>
{
console
.
log
(
"success"
,
res
);
})
.
catch
(
err
=>
{
console
.
log
(
"error"
,
err
);
});
},
methods
:
{
// 跳转到可提现界面
...
...
@@ -101,7 +75,7 @@ export default {
// 获取用户钱包展示信息
getWalletInfo
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
getMoneyPackage
(
params
)
.
then
(
res
=>
{
...
...
@@ -122,17 +96,31 @@ export default {
<
style
lang=
"scss"
scoped
>
.wallet
{
box-sizing
:
border-box
;
height
:
100vh
;
padding
:
10px
16px
;
height
:
calc
(
100vh
-
48px
);
overflow
:
hidden
;
padding
:
15px
;
box-sizing
:
border-box
;
p
{
margin
:
0
;
}
.content
{
position
:
relative
;
width
:
345px
;
height
:
9
0%
;
height
:
10
0%
;
text-align
:
center
;
background-color
:
#ffffff
;
.currentprofitlabel
{
position
:
absolute
;
top
:
136px
;
width
:
100%
;
font-size
:
18px
;
color
:
#333333
;
}
.currentprofit
{
position
:
absolute
;
width
:
100%
;
top
:
178px
;
}
.balance-img
{
position
:
absolute
;
top
:
72px
;
...
...
@@ -146,6 +134,10 @@ export default {
font-size
:
28px
;
color
:
#333333
;
}
.month-income-arrow
{
width
:
11px
;
height
:
18px
;
}
.bottom-box
{
position
:
absolute
;
...
...
@@ -159,6 +151,10 @@ export default {
img
{
width
:
30px
;
height
:
29px
;
&
.arrow
{
width
:
12px
;
height
:
18px
;
}
}
.income-item
{
display
:
flex
;
...
...
H5/src/views/invite.vue
View file @
9cffeb61
...
...
@@ -5,7 +5,6 @@
</
template
>
<
script
>
import
{
inviteCode
}
from
"@/api/invite"
;
var
userId
=
"13933770749"
;
export
default
{
data
()
{
return
{
...
...
@@ -22,7 +21,7 @@ export default {
forbidClick
:
true
,
message
:
"加载中..."
});
inviteCode
(
userId
).
then
(
res
=>
{
inviteCode
(
this
.
$
userId
).
then
(
res
=>
{
if
(
loading
)
_this
.
$toast
.
clear
();
_this
.
imgSrc
=
_this
.
getUserPhoto
(
res
);
});
...
...
H5/src/views/leagueNums.vue
View file @
9cffeb61
...
...
@@ -21,7 +21,6 @@
</
template
>
<
script
>
var
userId
=
13100911369
;
import
{
getMyTeam
}
from
"@/api/grade"
;
export
default
{
name
:
"leagueNums"
,
...
...
@@ -76,7 +75,7 @@ export default {
},
methods
:
{
getMyTeam
()
{
getMyTeam
(
userId
).
then
(
res
=>
{
getMyTeam
(
this
.
$
userId
).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
list
.
forEach
(
v
=>
{
v
.
num
=
res
.
data
[
v
[
"field"
]];
...
...
H5/src/views/modefyAvatar.vue
View file @
9cffeb61
...
...
@@ -2,9 +2,6 @@
<div
class=
"modefy-avatar"
>
<img
class=
"avatar"
:src=
"avatar"
alt
/>
<div
class=
"btn"
>
<van-button
type=
"primary"
plain
style=
"height:44px;top:11px"
@
click=
"checkBtn"
>
确定
</van-button
>
<van-uploader
:max-count=
"1"
:before-delete=
"onDeleteAvatar"
...
...
@@ -12,6 +9,13 @@
>
<van-button
type=
"primary"
>
上传新头像
</van-button>
</van-uploader>
<van-button
type=
"primary"
:class=
"!canSubmit && 'deactive-btn'"
plain
@
click=
"checkBtn"
>
确定
</van-button
>
</div>
</div>
</
template
>
...
...
@@ -23,21 +27,29 @@ export default {
name
:
"ModefyAvatar"
,
data
()
{
return
{
canSubmit
:
false
,
avatar
:
""
,
imageUrl
:
""
};
},
mounted
()
{
console
.
log
(
"123"
);
if
(
!
this
.
avatar
)
{
console
.
log
(
this
.
$route
.
query
);
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"
);
}
},
methods
:
{
checkBtn
()
{
if
(
!
this
.
canSubmit
)
{
return
;
}
this
.
canSubmit
=
false
;
const
params
=
{
headImage
:
this
.
imageUrl
,
userId
:
"18757121665"
userId
:
this
.
$userId
};
setAvatar
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -57,6 +69,7 @@ export default {
uploadImage
(
params
,
fd
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
imageUrl
=
res
.
zxUrl
;
this
.
canSubmit
=
true
;
});
},
onDeleteAvatar
(
file
,
detail
)
{
...
...
@@ -84,7 +97,7 @@ export default {
.modefy-avatar
{
box-sizing
:
border-box
;
text-align
:
center
;
padding-top
:
11
5px
;
padding-top
:
2
5px
;
}
.avatar
{
width
:
345px
;
...
...
@@ -92,11 +105,33 @@ export default {
margin-bottom
:
52px
;
border-radius
:
4px
;
}
.btn
{
box-sizing
:
border-box
;
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
{
width
:
165px
;
}
.deactive-btn
{
color
:
#969595
e9
;
background-color
:
#dcd6d6
;
border-color
:
#dcd6d6
;
}
}
</
style
>
H5/src/views/moments/moments.vue
View file @
9cffeb61
...
...
@@ -20,7 +20,7 @@ export default {
methods
:
{
getMoment
()
{
const
params
=
{
userId
:
"13100911369"
userId
:
this
.
$userId
};
findByUserId
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
...
...
H5/src/views/moments/publish.vue
View file @
9cffeb61
...
...
@@ -51,7 +51,7 @@ export default {
fd
.
append
(
"files"
,
file
.
file
);
});
fd
.
append
(
"zxField"
,
this
.
message
);
fd
.
append
(
"userId"
,
"13100911369"
);
fd
.
append
(
"userId"
,
this
.
$userId
);
uploadImage
(
fd
).
then
();
},
openPopup
()
{
...
...
H5/src/views/my/myStatus.vue
View file @
9cffeb61
...
...
@@ -9,7 +9,7 @@
>
<div
class=
"userAvatar"
>
<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
/>
<span
class=
"avatar-level"
>
Lv.
{{
userRecommendInfo
.
userlevel
}}
</span>
</div>
...
...
@@ -88,6 +88,7 @@ export default {
},
data
()
{
return
{
avatar
:
process
.
env
.
VUE_APP_BASE_URL
+
this
.
$userAvatar
,
inviteeArr
:
[],
userRecommendInfo
:
{},
activeTab
:
""
,
...
...
@@ -159,7 +160,7 @@ export default {
},
getRecommendInfo
()
{
const
params
=
{
userId
:
"13933770749"
userId
:
this
.
$userId
};
recomendInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -177,7 +178,7 @@ export default {
},
getRecommendDetail
(
level
)
{
const
params
=
{
user
id
:
"13933770749"
,
user
Id
:
this
.
$userId
,
userlevel
:
level
};
recommendDetail
(
params
).
then
(
res
=>
{
...
...
H5/src/views/register.vue
View file @
9cffeb61
...
...
@@ -78,7 +78,7 @@ export default {
data
()
{
return
{
form
:
{
userId
:
""
,
userId
:
this
.
$userId
,
sms
:
""
,
beInvitedCode
:
""
},
...
...
H5/src/views/rewards/fastest-progress.vue
View file @
9cffeb61
<
template
>
<div
class=
"fastest-progress"
>
<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=
"award"
>
¥
{{
growthTotal
}}
</span>
</div>
...
...
@@ -45,10 +45,36 @@ export default {
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
()
{
this
.
getProgressPrizes
();
},
methods
:
{
handlerBack
()
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
}
catch
{
console
.
log
(
"不能和App交互"
);
this
.
$router
.
go
(
-
1
);
}
},
getProgressPrizes
()
{
const
_this
=
this
;
getProgressPrizes
().
then
(
res
=>
{
...
...
H5/src/views/rewards/month-award.vue
View file @
9cffeb61
...
...
@@ -38,7 +38,7 @@
:duration=
"3000"
style=
"font-weight: bold"
></countTo>
<p
style=
"font-size: 14px;color:#333333"
>
<p
v-if=
"awardInfo"
style=
"font-size: 14px;color:#333333"
>
历史累计奖金:¥
{{
awardInfo
.
awardTotal
.
toFixed
(
2
)
||
0
}}
</p>
</div>
...
...
@@ -102,7 +102,7 @@ export default {
methods
:
{
getData
()
{
const
params
=
{
userId
:
"18757121665"
userId
:
this
.
$userId
};
monthRewards
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
H5/src/views/settings.vue
View file @
9cffeb61
<
template
>
<div
class=
"settings"
>
<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"
>
<img
class=
"avatar-img"
src=
"@/assets/images/no_avatar.png"
alt=
"头像"
/>
<img
class=
"avatar-img"
:src=
"imgBaseUrl + avatar"
alt=
"头像"
/>
</van-cell>
</van-cell-group>
<van-cell-group>
<van-cell
is-link
title=
"
邀请
人邀请码"
title=
"
推荐
人邀请码"
:value=
"inviteeCode"
@
click=
"fillInviterCode"
/>
<van-cell
is-link
title=
"软件更新"
value=
"版本v1.2"
/>
<van-cell
is-link
title=
"用户协议"
@
click=
"jumpToInstructions"
/>
</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-title=
"推荐人邀请码"
...
...
@@ -46,6 +45,7 @@
</
template
>
<
script
>
import
{
getUserInfo2
}
from
"@/api/user"
;
import
{
logoutToApp
}
from
"@/utils/bridgeToAppFun"
;
import
{
logout
}
from
"@/api/user"
;
import
{
fillInviteCode
}
from
"@/api/user"
;
...
...
@@ -55,25 +55,49 @@ export default {
name
:
"Settings"
,
data
()
{
return
{
imgBaseUrl
:
""
,
avatar
:
""
,
fileList
:
[],
fillCode
:
""
,
inviteeCode
:
"未填写"
,
inviteeCodeDialog
:
false
};
},
mounted
()
{
this
.
imgBaseUrl
=
process
.
env
.
VUE_APP_BASE_URL
;
this
.
getUser
();
},
methods
:
{
logout
()
{
getUser
()
{
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
();
},
jumpToInstructions
()
{
this
.
$router
.
push
(
"/instructions"
);
},
onModefy
()
{
this
.
$router
.
push
(
"/modefy-avatar"
);
this
.
$router
.
push
({
path
:
"/modefy-avatar"
,
query
:
{
headImage
:
this
.
avatar
}
});
},
onCloseDialog
()
{
this
.
inviteeCodeDialog
=
false
;
...
...
@@ -83,7 +107,7 @@ export default {
this
.
inviteeCode
=
this
.
fillCode
;
const
params
=
{
inviteCode
:
this
.
fillCode
,
userId
:
"18757121665"
userId
:
this
.
$userId
};
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