Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
3c605ad5
Commit
3c605ad5
authored
Mar 09, 2021
by
xulili
Browse files
Options
Browse Files
Download
Plain Diff
pull code
parents
8886bd0d
1cbe1160
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
260 additions
and
115 deletions
+260
-115
bank.js
H5/src/api/bank.js
+53
-15
base.js
H5/src/api/base.js
+10
-8
grade.js
H5/src/api/grade.js
+1
-1
infomation.js
H5/src/api/infomation.js
+14
-2
request.js
H5/src/utils/request.js
+3
-1
bank.vue
H5/src/views/bank.vue
+62
-6
canCashOut.vue
H5/src/views/canCashOut.vue
+3
-3
cash-out.vue
H5/src/views/cashOut/cash-out.vue
+47
-26
customer-service.vue
H5/src/views/customer-service.vue
+1
-3
income-detail.vue
H5/src/views/income/income-detail.vue
+9
-9
wallet.vue
H5/src/views/income/wallet.vue
+17
-12
leagueNums.vue
H5/src/views/leagueNums.vue
+22
-22
moments.vue
H5/src/views/moments/moments.vue
+15
-1
publish.vue
H5/src/views/moments/publish.vue
+3
-6
No files found.
H5/src/api/bank.js
View file @
3c605ad5
...
...
@@ -9,9 +9,34 @@ import request from "@/utils/request";
export
function
addUserBankInfo
(
params
)
{
return
request
({
url
:
"/bank/add"
,
methods
:
"post"
,
method
:
"post"
,
data
:
params
})
});
}
/**
* 编辑银行卡信息
* @param {*} params
* @returns
*/
export
function
editUserBankInfo
(
params
)
{
return
request
({
url
:
"/bank/edit"
,
method
:
"post"
,
data
:
params
});
}
/**
* 提现发送验证码
* @param {*} params userId
* @returns
*/
export
function
sendSms
(
params
)
{
return
request
({
url
:
"/bank/sendSmsCode"
,
method
:
"get"
,
params
});
}
/**
...
...
@@ -25,5 +50,18 @@ export function cashOut(params) {
url
:
"/bank/userWithdrawBank"
,
methods
:
"post"
,
data
:
params
})
});
}
/**
* 获取用户银行卡信息
* @param {*} params
* @returns
*/
export
function
getUserBankInfo
(
params
)
{
return
request
({
url
:
"/bank/getByUserId"
,
method
:
"get"
,
params
});
}
H5/src/api/base.js
View file @
3c605ad5
import
request
from
"@/utils/request"
;
import
qs
from
"qs"
;
/**
* 发送验证码
* @param {*} params codeType 0注册/登录验证 1修改密码 2订单通知信息
...
...
@@ -7,9 +7,11 @@ import request from "@/utils/request";
* @returns
*/
export
function
smsCode
(
params
)
{
const
final_params
=
qs
.
stringify
(
params
);
return
request
({
url
:
"/api/sms/verifyCode"
,
url
:
`/api/sms/verifyCode`
,
method
:
"post"
,
params
})
// headers: { 'Content-Type': 'application/x-www-form-urlencoded;' },
data
:
final_params
});
}
H5/src/api/grade.js
View file @
3c605ad5
H5/src/api/infomation.js
View file @
3c605ad5
...
...
@@ -5,12 +5,24 @@ import request from "@/utils/request";
* @param {*} params
* @param {*} file 图片文件
*/
export
function
uploadImage
(
params
,
file
)
{
export
function
uploadImage
(
file
)
{
return
request
({
url
:
"/ZX/multipleImageUpload"
,
method
:
"post"
,
headers
:
{
"Content-Type"
:
"multipart/form-data"
},
params
,
data
:
file
});
}
/**
* 根据Id查找资讯
* @param {*} params userId
* @returns
*/
export
function
findByUserId
(
params
)
{
return
request
({
url
:
"/ZX/findByUserId"
,
method
:
"get"
,
params
});
}
H5/src/utils/request.js
View file @
3c605ad5
...
...
@@ -5,12 +5,14 @@ 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
=>
{
// config.headers["Authorization"] = "b6cd4e221fdc4e46a6825c236c912fa6";
config
.
headers
[
"Authorization"
]
=
"Bearer "
+
"b6cd4e221fdc4e46a6825c236c912fa6"
;
if
(
!
config
.
loading
)
{
loading
=
Toast
.
loading
({
forbidClick
:
true
,
...
...
H5/src/views/bank.vue
View file @
3c605ad5
...
...
@@ -2,7 +2,7 @@
<div
class=
"bank"
>
<van-cell-group>
<van-field
v-model=
"form.bank"
v-model=
"form.bank
Name
"
label=
"所属银行"
right-icon=
"arrow"
placeholder=
"请选择"
...
...
@@ -10,7 +10,7 @@
readonly
/>
<van-field
v-model=
"form.
bankCardId
"
v-model=
"form.
cardNumber
"
type=
"number"
label=
"银行卡卡号"
placeholder=
"请输入"
...
...
@@ -23,21 +23,77 @@
size=
"large"
/>
</van-cell-group>
<van-button
type=
"primary"
block
class=
"btn"
size=
"large"
>
编辑
</van-button>
<van-button
type=
"primary"
block
class=
"btn"
size=
"large"
@
click=
"addAndEditBankInfo"
>
编辑
</van-button
>
</div>
</
template
>
<
script
>
import
{
getUserBankInfo
,
addUserBankInfo
,
editUserBankInfo
}
from
"@/api/bank"
;
export
default
{
name
:
"Bank"
,
data
()
{
return
{
form
:
{
bank
:
""
,
bankCardId
:
""
,
name
:
""
bankName
:
""
,
cardNumber
:
""
,
name
:
""
,
id
:
""
}
};
},
mounted
()
{
this
.
getBankInfo
();
},
methods
:
{
addAndEditBankInfo
()
{
const
params
=
this
.
form
;
if
(
this
.
form
.
id
)
{
editUserBankInfo
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$toast
.
success
(
"编辑成功"
);
}
else
{
this
.
$toast
.
fail
(
"编辑失败"
);
}
})
.
catch
(
error
=>
{
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
+
error
.
response
.
data
.
message
);
});
}
else
{
addUserBankInfo
()
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$toast
.
success
(
"添加成功"
);
}
else
{
this
.
$toast
.
fail
(
"添加失败"
);
}
})
.
catch
(
error
=>
{
this
.
$toast
.
fail
(
error
.
response
.
data
.
error
+
error
.
response
.
data
.
message
);
});
}
},
getBankInfo
()
{
const
params
=
{
userId
:
"13100911369"
};
getUserBankInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
form
=
res
.
data
;
}
});
}
}
};
</
script
>
...
...
H5/src/views/canCashOut.vue
View file @
3c605ad5
...
...
@@ -49,14 +49,14 @@ export default {
getWithdrawal
()
{
const
params
=
{
userId
:
"13100911369"
}
}
;
getWithdrawalAmount
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
preNum
=
res
.
data
.
lastMoneyNot
;
this
.
currentNum
=
res
.
data
.
currentMoneyCan
this
.
currentNum
=
res
.
data
.
currentMoneyCan
;
this
.
rules
=
res
.
data
.
withdrawRule
;
}
})
})
;
}
}
};
...
...
H5/src/views/cashOut/cash-out.vue
View file @
3c605ad5
<
template
>
<div
class=
"cash-out"
>
<van-cell-group
style=
"margin-bottom: 10px"
>
<van-field
v-model=
"bank"
label=
"所属银行"
right-icon=
"arrow"
placeholder=
"请选择"
size=
"large"
class=
"bank"
readonly
/>
<van-cell
is-link
title=
"所属银行"
:value=
"bank"
@
click=
"jumpToBank"
/>
</van-cell-group>
<div
class=
"detail"
>
<p
style=
"font-size: 24px"
>
提现金额
</p>
...
...
@@ -52,7 +44,7 @@
@
onClick=
"onSubmit"
>
<div
slot=
"content"
>
<p
class=
"content-text"
>
请输入手机号
135****1548
的动态验证码
</p>
<p
class=
"content-text"
>
请输入手机号
{{
userPhone
}}
的动态验证码
</p>
<van-field
v-model=
"validCode"
type=
"number"
...
...
@@ -84,13 +76,14 @@
</
template
>
<
script
>
import
{
smsCode
}
from
"@/api/base
"
;
import
{
getUserBankInfo
,
sendSms
,
cashOut
}
from
"@/api/bank
"
;
import
BaseDialog
from
"@/components/BaseDialog.vue"
;
export
default
{
components
:
{
BaseDialog
},
name
:
"CashOut"
,
data
()
{
return
{
userPhone
:
"13100911369"
,
bank
:
""
,
money
:
null
,
remainMoney
:
100
,
...
...
@@ -102,36 +95,64 @@ export default {
validCode
:
null
};
},
created
()
{
this
.
getUserInfo
();
},
methods
:
{
jumpToBank
()
{
console
.
log
(
"1"
);
this
.
$router
.
push
(
"/bank"
);
},
// 全部提现
allIn
()
{
this
.
money
=
this
.
remainMoney
;
},
// 点击提现
onCashOut
()
{
if
(
!
this
.
money
)
{
this
.
$toast
.
fail
(
"未输入提现金额"
);
return
;
}
const
params
=
{
codeType
:
0
,
phone
:
"13100911369"
}
smsCode
(
params
).
then
(
res
=>
{
console
.
log
(
"验证码"
,
res
);
})
userId
:
this
.
userPhone
};
sendSms
(
params
).
then
();
this
.
validCode
=
null
;
this
.
validCodeDialogShow
=
true
;
},
getUserInfo
()
{
const
params
=
{
userId
:
"13100911369"
};
getUserBankInfo
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
bank
=
res
.
data
.
bankName
;
}
});
},
onSubmit
()
{
this
.
validCodeDialogShow
=
false
;
const
params
=
{
code
:
this
.
validCode
,
money
:
this
.
money
};
cashOut
(
params
)
.
then
(
res
=>
{
this
.
resultDialog
=
true
;
const
res
=
"error"
;
this
.
resultDialogTitle
=
res
===
"success"
?
"提现成功"
:
"提现失败"
;
this
.
resultDialogTip
=
res
===
"success"
?
"提现成功,请及时查收"
:
"提现失败,验证码错误"
;
this
.
resultDialogImg
=
res
===
"success"
?
require
(
"@/assets/images/成功.png"
)
:
require
(
"@/assets/images/叉号.png"
);
if
(
res
.
code
===
0
)
{
this
.
resultDialogTitle
=
"提现成功"
;
this
.
resultDialogTip
=
"提现成功,请及时查收"
;
this
.
resultDialogImg
=
require
(
"@/assets/images/成功.png"
);
}
else
{
this
.
resultDialogTitle
=
"提现失败"
;
this
.
resultDialogTip
=
"提现失败,验证码错误"
;
this
.
resultDialogImg
=
require
(
"@/assets/images/叉号.png"
);
}
})
.
catch
(
err
=>
{
this
.
$toast
.
fail
(
err
.
response
.
data
.
error
);
});
},
onSuccess
()
{
this
.
resultDialog
=
false
;
...
...
H5/src/views/customer-service.vue
View file @
3c605ad5
...
...
@@ -31,9 +31,7 @@ export default {
data
()
{
return
{};
},
mounted
(){
},
mounted
()
{},
methods
:
{
handleUrl
(
urlName
)
{
this
.
$router
.
push
({
name
:
urlName
});
...
...
H5/src/views/income/income-detail.vue
View file @
3c605ad5
...
...
@@ -232,34 +232,34 @@ export default {
getDetail
()
{
const
params
=
{
userId
:
"13100911369"
}
}
;
queryIncomeDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
pieOption
.
graphic
.
children
[
0
].
style
.
text
=
res
.
data
.
totalIncome
this
.
pieOption
.
graphic
.
children
[
0
].
style
.
text
=
res
.
data
.
totalIncome
;
this
.
detailList
=
res
.
data
.
list
.
map
(
item
=>
{
return
{
name
:
item
.
typeName
,
money
:
item
.
money
,
incomeTime
:
item
.
incomeTime
.
substr
(
0
,
16
).
replaceAll
(
'-'
,
'.'
),
}
incomeTime
:
item
.
incomeTime
.
substr
(
0
,
16
).
replaceAll
(
"-"
,
"."
)
}
;
});
this
.
pieOption
.
series
[
0
].
data
=
this
.
detailList
.
map
(
item
=>
{
return
{
value
:
item
.
money
,
name
:
item
.
name
};
})
const
legend
=
this
.
detailList
.
map
((
item
,
index
)
=>
{
})
;
const
legend
=
this
.
detailList
.
map
((
item
,
index
)
=>
{
return
{
selectedMode
:
false
,
...
this
.
legendPos
[
index
],
itemWidth
:
12
,
data
:
[
item
.
name
]
}
}
;
});
this
.
pieOption
.
legend
=
legend
;
}
})
})
;
}
}
};
...
...
H5/src/views/income/wallet.vue
View file @
3c605ad5
...
...
@@ -7,7 +7,10 @@
>
当月收益
</p>
<div
style=
"position:absolute;top:178px;width:100%"
@
click=
"jumpToIncomeDetail"
>
<div
style=
"position:absolute;top:178px;width:100%"
@
click=
"jumpToIncomeDetail"
>
<span
class=
"month-income"
>
{{
walletInfo
.
moneyIncome
}}
</span>
<img
src=
"@/assets/images/右箭头.png"
...
...
@@ -92,14 +95,16 @@ export default {
const
params
=
{
userId
:
"13100911369"
};
getMoneyPackage
(
params
).
then
(
res
=>
{
getMoneyPackage
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
console
.
log
(
"res"
,
res
);
this
.
walletInfo
=
res
.
data
;
}
else
{
this
.
$toast
.
fail
(
res
.
message
);
}
}).
catch
(
error
=>
{
})
.
catch
(
error
=>
{
console
.
log
(
error
);
});
}
...
...
H5/src/views/leagueNums.vue
View file @
3c605ad5
...
...
@@ -21,8 +21,8 @@
</
template
>
<
script
>
var
userId
=
13100911369
import
{
getMyTeam
}
from
'@/api/grade'
var
userId
=
13100911369
;
import
{
getMyTeam
}
from
"@/api/grade"
;
export
default
{
name
:
"leagueNums"
,
data
()
{
...
...
@@ -31,58 +31,58 @@ export default {
{
num
:
""
,
label
:
"普通用户"
,
field
:
"normalUserNum"
field
:
"normalUserNum"
},
{
num
:
""
,
label
:
"幼苗"
,
field
:
"seedlingNum"
field
:
"seedlingNum"
},
{
num
:
""
,
label
:
"青铜树"
,
field
:
"bronzeTreeNum"
field
:
"bronzeTreeNum"
},
{
num
:
""
,
label
:
"白银树"
,
field
:
"silverTreeNum"
field
:
"silverTreeNum"
},
{
num
:
""
,
label
:
"黄金树"
,
field
:
"goldTreeNum"
field
:
"goldTreeNum"
},
{
num
:
""
,
label
:
"农场主"
,
field
:
"farmerNum"
field
:
"farmerNum"
},
{
num
:
""
,
label
:
"森林之星"
,
field
:
"forestStartNum"
field
:
"forestStartNum"
},
{
num
:
""
,
label
:
"西田森合伙人"
,
field
:
"partnerNum"
field
:
"partnerNum"
}
]
};
},
mounted
(){
this
.
getMyTeam
()
mounted
()
{
this
.
getMyTeam
()
;
},
methods
:
{
getMyTeam
()
{
getMyTeam
(
userId
).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
list
.
forEach
(
v
=>
{
v
.
num
=
res
.
data
[
v
[
"field"
]]
})
getMyTeam
()
{
getMyTeam
(
userId
).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
list
.
forEach
(
v
=>
{
v
.
num
=
res
.
data
[
v
[
"field"
]];
});
}
})
});
}
}
};
...
...
H5/src/views/moments/moments.vue
View file @
3c605ad5
...
...
@@ -8,11 +8,25 @@
</
template
>
<
script
>
import
{
findByUserId
}
from
"@/api/infomation"
;
import
MomentItem
from
"./components/momentItem.vue"
;
export
default
{
name
:
"Moments"
,
components
:
{
MomentItem
}
components
:
{
MomentItem
},
created
()
{
this
.
getMoment
();
},
methods
:
{
getMoment
()
{
const
params
=
{
userId
:
"13100911369"
};
findByUserId
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
});
}
}
};
</
script
>
...
...
H5/src/views/moments/publish.vue
View file @
3c605ad5
...
...
@@ -46,16 +46,13 @@ export default {
onPublish
()
{
console
.
log
(
"发布===文字"
,
this
.
message
);
console
.
log
(
"发布===文件"
,
this
.
fileList
);
const
params
=
{
userId
:
"1"
,
zxField
:
this
.
message
,
zxAddress
:
"北京海淀"
};
const
fd
=
new
FormData
();
this
.
fileList
.
forEach
(
file
=>
{
fd
.
append
(
"files"
,
file
.
file
);
});
uploadImage
(
params
,
fd
).
then
();
fd
.
append
(
"zxField"
,
this
.
message
);
fd
.
append
(
"userId"
,
"13100911369"
);
uploadImage
(
fd
).
then
();
},
openPopup
()
{
this
.
fileShow
=
true
;
...
...
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