Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shop_mobile_uni
Project
Project
Details
Activity
Releases
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
郑秀明
shop_mobile_uni
Commits
695bc85e
Commit
695bc85e
authored
Aug 28, 2020
by
zhengxiuming
Browse files
Options
Browse Files
Download
Plain Diff
设备分期
parents
2877b5b2
40404785
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
96 deletions
+111
-96
package.json
package.json
+1
-1
applypage1.vue
pages/apply/applypage1.vue
+2
-3
applypage2.vue
pages/apply/applypage2.vue
+16
-25
applypage3.vue
pages/apply/applypage3.vue
+4
-18
choosetype.vue
pages/apply/choosetype.vue
+2
-1
checkstand.vue
pages/checkstand/checkstand.vue
+11
-9
installmentinfo.vue
pages/installment/installmentinfo.vue
+4
-3
refuse.vue
pages/refuse/refuse.vue
+1
-1
signcontract.vue
pages/signcontract/signcontract.vue
+70
-35
No files found.
package.json
View file @
695bc85e
{
"name"
:
"shop_mobile_uni"
,
"version"
:
"1.0.2
3
"
,
"version"
:
"1.0.2
4
"
,
"description"
:
"谛宝多多商城"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
...
...
pages/apply/applypage1.vue
View file @
695bc85e
...
...
@@ -116,9 +116,9 @@
}
},
onLoad
(
option
)
{
this
.
contract_no
=
option
.
contract_no
;
this
.
contract_no
=
option
.
contract_no
||
''
;
uni
.
request
({
url
:
`/uni/api/userqualification/GetUserQualification/
${
option
.
contract_no
}
`
,
url
:
`/uni/api/userqualification/GetUserQualification/
${
option
.
property_id
}
`
,
method
:
'GET'
,
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
...
...
@@ -128,7 +128,6 @@
});
this
.
qualification_id
=
d
.
qualification_id
;
this
.
data
=
{
contract_no
:
d
.
contract_no
,
equipment_id
:
d
.
equipment_id
,
property_id
:
d
.
property_id
}
...
...
pages/apply/applypage2.vue
View file @
695bc85e
...
...
@@ -92,32 +92,23 @@
}
},
onLoad
(
option
)
{
if
(
option
.
contract_no
)
{
this
.
contract_no
=
option
.
contract_no
;
uni
.
request
({
url
:
`/uni/api/userqualification/GetUserQualification/
${
option
.
contract_no
}
`
,
method
:
'GET'
,
success
:
(
res
)
=>
{
const
d
=
res
.
data
.
data
;
Object
.
keys
(
this
.
params
).
forEach
((
item
,
index
)
=>
{
this
.
params
[
item
]
=
d
[
item
]
});
this
.
data
=
{
contract_no
:
d
.
contract_no
,
equipment_id
:
d
.
equipment_id
,
property_id
:
d
.
property_id
}
this
.
qualification_id
=
d
.
qualification_id
;
}
});
}
else
{
uni
.
getStorage
({
key
:
'installment'
,
success
:
(
res
)
=>
{
this
.
data
=
res
.
data
;
this
.
contract_no
=
option
.
contract_no
||
''
;
const
d
=
uni
.
getStorageSync
(
'installment'
);
uni
.
request
({
url
:
`/uni/api/userqualification/GetUserQualification/
${
d
.
property_id
}
`
,
method
:
'GET'
,
success
:
(
res
)
=>
{
const
d
=
res
.
data
.
data
;
Object
.
keys
(
this
.
params
).
forEach
((
item
,
index
)
=>
{
this
.
params
[
item
]
=
d
[
item
]
});
this
.
data
=
{
equipment_id
:
d
.
equipment_id
,
property_id
:
d
.
property_id
}
});
}
this
.
qualification_id
=
d
.
qualification_id
;
}
});
},
mounted
()
{
// #ifdef H5
...
...
pages/apply/applypage3.vue
View file @
695bc85e
...
...
@@ -80,10 +80,9 @@
}
},
onLoad
(
option
)
{
if
(
option
.
contract_no
)
{
this
.
contract_no
=
option
.
contract_no
;
const
d
=
uni
.
getStorageSync
(
'installment'
);
uni
.
request
({
url
:
`/uni/api/userqualification/GetUserQualification/
${
option
.
contract_no
}
`
,
url
:
`/uni/api/userqualification/GetUserQualification/
${
d
.
property_id
}
`
,
method
:
'GET'
,
success
:
(
res
)
=>
{
const
d
=
res
.
data
.
data
;
...
...
@@ -91,30 +90,17 @@
this
.
params
[
item
]
=
d
[
item
]
});
this
.
data
=
{
contract_no
:
d
.
contract_no
,
contract_no
:
option
.
contract_no
,
equipment_id
:
d
.
equipment_id
,
property_id
:
d
.
property_id
},
this
.
qualification_id
=
d
.
qualification_id
uni
.
setStorage
({
key
:
'installment'
,
data
:
{
contract_no
:
d
.
contract_no
,
equipment_id
:
d
.
equipment_id
,
property_id
:
d
.
property_id
}
data
:
this
.
data
});
}
});
}
else
{
uni
.
getStorage
({
key
:
'installment'
,
success
:
(
res
)
=>
{
this
.
data
=
res
.
data
;
}
});
}
},
methods
:
{
uploadImage
(
key
)
{
...
...
pages/apply/choosetype.vue
View file @
695bc85e
...
...
@@ -27,11 +27,12 @@
},
nextStep
()
{
if
(
this
.
type
===
1
)
{
const
d
=
uni
.
getStorageSync
(
'installment'
);
uni
.
getStorage
({
key
:
'installment'
,
success
:
(
res
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/apply/applypage1?
contract_no=
${
res
.
data
.
contract_no
}
`
url
:
`/pages/apply/applypage1?
property_id=
${
d
.
property_id
}
`
});
}
});
...
...
pages/checkstand/checkstand.vue
View file @
695bc85e
...
...
@@ -82,19 +82,21 @@
type
:
1
,
order_price
:
''
,
money
:
''
,
isWx
:
false
isWx
:
false
,
contract_no
:
''
}
},
onLoad
(){
onLoad
(
options
){
this
.
contract_no
=
options
.
contract_no
;
this
.
loadData
();
this
.
isWx
=
isWeixin
();
},
methods
:
{
loadData
(){
const
install
=
uni
.
getStorageSync
(
'installment'
);
const
{
contract_no
,
equipment_id
,
property_id
}
=
install
;
const
{
equipment_id
,
property_id
}
=
install
;
uni
.
request
({
url
:
`/uni/api/repayment/PayDetails?contract_no=
${
contract_no
}
`
,
url
:
`/uni/api/repayment/PayDetails?contract_no=
${
this
.
contract_no
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
...
...
@@ -117,8 +119,8 @@
const
install
=
uni
.
getStorageSync
(
'installment'
);
// 清除存储合同信息
// uni.removeStorageSync('temporary');
const
{
contract_no
,
equipment_id
,
property_id
}
=
install
;
if
(
!
this
.
order_price
||
!
contract_no
){
const
{
equipment_id
,
property_id
}
=
install
;
if
(
!
this
.
order_price
||
!
this
.
contract_no
){
uni
.
showToast
({
title
:
'参数错误,无法发起支付'
,
icon
:
'none'
...
...
@@ -127,12 +129,12 @@
// 余额支付
if
(
this
.
type
===
1
){
uni
.
navigateTo
({
url
:
`/pages/yuepay/yuepay?amount=
${
this
.
order_price
}
&money=
${
this
.
money
}
&order_id=
${
contract_no
}
`
url
:
`/pages/yuepay/yuepay?amount=
${
this
.
order_price
}
&money=
${
this
.
money
}
&order_id=
${
this
.
contract_no
}
`
})
}
// 微信支付
if
(
this
.
type
===
2
){
this
.
$jump
(
`
${
origin
}
/uni/api/repayment/RedirectAuth?amount=
${
this
.
order_price
}
&order_id=
${
contract_no
}
`
);
this
.
$jump
(
`
${
origin
}
/uni/api/repayment/RedirectAuth?amount=
${
this
.
order_price
}
&order_id=
${
this
.
contract_no
}
`
);
}
// 支付宝支付
if
(
this
.
type
===
3
){
...
...
@@ -145,7 +147,7 @@
dataType
:
'json'
,
data
:
{
amount
:
parseFloat
(
this
.
order_price
),
order_id
:
contract_no
,
order_id
:
this
.
contract_no
,
payment_code
:
"epayalipaywap"
,
payment_name
:
"手机支付宝支付"
},
...
...
pages/installment/installmentinfo.vue
View file @
695bc85e
...
...
@@ -180,7 +180,6 @@
equipment_detail
:
''
,
periodTab
:
0
,
isLogin
:
0
,
contract_no
:
''
,
equipment_id
:
''
,
is_auth
:
'0'
,
type
:
2
...
...
@@ -242,7 +241,6 @@
});
this
.
equipment_detail
=
res
.
data
.
data
.
EquipmentInfo
.
equipment_details
?
res
.
data
.
data
.
EquipmentInfo
.
equipment_details
.
replace
(
/\<img/g
,
`<image style="max-width: 100%;width: auto !important;height: auto !important"`
)
:
''
;
this
.
isLogin
=
res
.
data
.
login_flg
;
this
.
contract_no
=
res
.
data
.
data
.
contract_no
;
this
.
is_auth
=
res
.
data
.
data
.
is_auth
;
this
.
type
=
res
.
data
.
data
.
EquipmentInfo
.
type
;
}
...
...
@@ -261,10 +259,13 @@
},
buy_now
()
{
const
data
=
{
contract_no
:
this
.
contract_no
,
equipment_id
:
this
.
equipment_id
,
property_id
:
this
.
e_info
.
property_id
}
uni
.
setStorage
({
key
:
'advance_payment'
,
data
:
this
.
e_info
.
advance_payment
})
if
(
this
.
is_auth
===
'1'
)
{
if
(
this
.
type
===
'1'
)
{
uni
.
setStorage
({
...
...
pages/refuse/refuse.vue
View file @
695bc85e
...
...
@@ -52,7 +52,7 @@
methods
:
{
reupload
()
{
uni
.
navigateTo
({
url
:
`/pages/apply/applypage1?contract_no=
${
this
.
data
.
contract_no
}
`
url
:
`/pages/apply/applypage1?contract_no=
${
this
.
data
.
contract_no
}
&property_id=
${
this
.
data
.
property_id
}
`
})
}
},
...
...
pages/signcontract/signcontract.vue
View file @
695bc85e
...
...
@@ -31,7 +31,8 @@
</view>
-->
<view
class=
"sign_btn_box"
>
<text
class=
"prev_step"
@
click=
"goBack"
>
上一步
</text>
<text
class=
"confirm_pay"
@
click=
"handleSubmit"
>
缴纳定金
<text
class=
"confirm_pay"
v-if=
"advance_payment === 0"
@
click=
"handleSubmit"
>
签署合同
</text>
<text
class=
"confirm_pay"
v-else
@
click=
"handleSubmit"
>
缴纳定金
<i
class=
"arrow_icon"
></i>
</text>
</view>
...
...
@@ -51,7 +52,8 @@
is_agree
:
false
,
title
:
'签署合同'
,
sub_title
:
'请填写合同内详细信息'
,
third_title
:
'企业信息'
third_title
:
'企业信息'
,
advance_payment
:
''
// 定金金额
}
},
components
:
{
...
...
@@ -66,6 +68,8 @@
this
.
sub_title
=
'请填写收货地址信息'
;
this
.
third_title
=
'收货信息'
;
}
// 获取定金金额
this
.
advance_payment
=
Number
(
uni
.
getStorageSync
(
'advance_payment'
));
this
.
loadData
();
},
methods
:{
...
...
@@ -74,40 +78,42 @@
const
install
=
uni
.
getStorageSync
(
'installment'
);
const
{
contract_no
,
equipment_id
,
property_id
}
=
install
;
// 获取合同已填的信息
if
(
contract_no
)
{
uni
.
request
({
url
:
`/uni/api/signcontract/GetContract?contract_no=
${
contract_no
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
if
(
data
.
code
==
0
){
if
(
data
.
data
){
const
{
contract_content
}
=
data
.
data
;
if
(
contract_content
){
this
.
data
=
JSON
.
parse
(
contract_content
);
this
.
is_eidt
=
true
;
}
}
else
{
// const temporary = uni.getStorageSync('temporary');
// if (temporary) {
// this.data = JSON.parse(temporary);
// }
}
}
}
})
}
uni
.
request
({
url
:
`/uni/api/signcontract/GetContract
?contract_no=
${
contract_no
}
`
,
url
:
`/uni/api/signcontract/GetContract
Field?equipment_id=
${
equipment_id
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
if
(
data
.
code
==
0
){
if
(
data
.
data
){
const
{
contract_content
}
=
data
.
data
;
if
(
contract_content
){
this
.
data
=
JSON
.
parse
(
contract_content
);
this
.
is_eidt
=
true
;
}
}
else
{
// const temporary = uni.getStorageSync('temporary');
// if (temporary) {
// this.data = JSON.parse(temporary);
// }
this
.
list
=
data
.
data
||
[];
for
(
var
i
=
0
;
i
<
this
.
list
.
length
;
i
++
){
let
key
=
this
.
list
[
i
].
key
;
this
.
list
[
i
].
value
=
this
.
data
[
key
]
||
''
;
}
uni
.
request
({
url
:
`/uni/api/signcontract/GetContractField?equipment_id=
${
equipment_id
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
if
(
data
.
code
==
0
){
this
.
list
=
data
.
data
||
[];
for
(
var
i
=
0
;
i
<
this
.
list
.
length
;
i
++
){
let
key
=
this
.
list
[
i
].
key
;
this
.
list
[
i
].
value
=
this
.
data
[
key
]
||
''
;
}
}
}
})
}
}
})
...
...
@@ -117,7 +123,6 @@
const
data
=
this
.
getData
();
const
checkData
=
this
.
checkData
(
data
);
console
.
log
(
checkData
,
'checkData'
);
if
(
checkData
>
0
){
uni
.
showToast
({
title
:
'请填写签署合同信息'
,
...
...
@@ -154,12 +159,42 @@
dataType
:
'json'
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
uni
.
hideLoading
();
if
(
data
.
code
==
0
){
this
.
is_eidt
=
true
;
uni
.
navigateTo
({
url
:
'/pages/checkstand/checkstand'
});
if
(
this
.
advance_payment
===
0
)
{
uni
.
request
({
url
:
'/uni/api/repayment/GoPay'
,
method
:
'post'
,
dataType
:
'json'
,
data
:
{
amount
:
0
,
order_id
:
data
.
data
.
contract_no
,
payment_code
:
"freepay"
,
payment_name
:
"免支付"
,
password
:
''
,
},
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
uni
.
hideLoading
();
this
.
loading
=
false
;
if
(
data
.
code
===
0
){
uni
.
removeStorageSync
(
'advance_payment'
);
uni
.
navigateTo
({
url
:
'/pages/payresult/payresult'
})
}
else
{
uni
.
showToast
({
title
:
data
.
message
,
icon
:
'none'
})
}
}
})
}
else
{
this
.
is_eidt
=
true
;
uni
.
navigateTo
({
url
:
`/pages/checkstand/checkstand?contract_no=
${
data
.
data
.
contract_no
}
`
});
}
}
else
{
uni
.
showToast
({
icon
:
'none'
,
...
...
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