Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
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
Administrator
jd-vx-app
Commits
7d20cf58
Commit
7d20cf58
authored
Apr 24, 2022
by
fwz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单
parent
f11d622a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
469 additions
and
168 deletions
+469
-168
active-form.vue
common/active-form/active-form.vue
+28
-20
index.vue
pages/binding/index.vue
+22
-0
getCarCode.vue
pagesA/pages/index/getCarCode.vue
+1
-1
getPrice.vue
pagesA/pages/index/getPrice.vue
+0
-2
oneMoveCar.vue
pagesB/pages/move-car/oneMoveCar.vue
+17
-5
scan.vue
pagesB/pages/move-car/scan.vue
+57
-36
carTime.vue
pagesD/pages/personal/carTime.vue
+37
-16
help.vue
pagesD/pages/personal/help.vue
+109
-0
index.vue
pagesD/pages/personal/index.vue
+4
-4
myOrder.vue
pagesD/pages/personal/myOrder.vue
+111
-54
orderDetail.vue
pagesD/pages/personal/orderDetail.vue
+49
-25
pull.vue
pagesD/pages/personal/pull.vue
+34
-5
No files found.
common/active-form/active-form.vue
View file @
7d20cf58
...
...
@@ -425,26 +425,34 @@ export default {
this
.
selectBox
[
index
].
flag
=
true
;
},
// 发送验证码
sendCode
()
{
var
that
=
this
;
var
setTime
=
0
;
if
(
!
that
.
isSend
)
{
that
.
isSend
=
true
;
setTime
=
setInterval
(
function
()
{
that
.
wait
--
;
that
.
sendColor
=
"color:#999"
;
that
.
codeFont
=
"已发送("
+
that
.
wait
+
's)'
if
(
that
.
wait
==
0
)
{
clearInterval
(
setTime
);
that
.
codeFont
=
"发送验证码"
;
that
.
isSend
=
false
;
that
.
wait
=
60
;
that
.
sendColor
=
"color:#ff5b01"
;
}
},
1000
);
}
},
},
sendCode
()
{
var
that
=
this
;
var
setTime
=
0
;
if
(
!
that
.
isSend
)
{
that
.
isSend
=
true
;
setTime
=
setInterval
(
function
()
{
that
.
wait
--
;
that
.
sendColor
=
"color:#999"
;
that
.
codeFont
=
"已发送("
+
that
.
wait
+
's)'
if
(
that
.
wait
==
0
)
{
clearInterval
(
setTime
);
that
.
codeFont
=
"发送验证码"
;
that
.
isSend
=
false
;
that
.
wait
=
60
;
that
.
sendColor
=
"color:#ff5b01"
;
}
},
1000
);
}
else
{
///app/smsCode/binding/{{phone}}
let
opts
=
{
url
:
'/app/smsCode/binding/'
+
this
.
phone
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
model1
.
carInfo
=
res
.
data
.
data
}
})
}
},
},
};
</
script
>
...
...
pages/binding/index.vue
View file @
7d20cf58
...
...
@@ -48,7 +48,10 @@ export default {
isCanUse2
:
false
,
//默认为true
openid
:
''
,
nc_protocol
:
false
,
//扫描二维码参数
scene
:
""
,
//检查绑定挪车码
checkCode
:
{},
};
},
methods
:
{
...
...
@@ -59,6 +62,25 @@ export default {
title
:
'登录中...'
})
},
//检查挪车码存在、是否绑定
getCheckMoveCode
(){
let
opts
=
{
url
:
'/app/index/check/move/code'
,
method
:
'post'
};
this
.
http
.
httpTokenRequest
(
opts
,
{
code
:
this
.
scene
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
checkCode
=
res
.
data
.
data
//未绑定了的情况
if
(
!
this
.
checkCode
.
bindFlag
){
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/scan?moveCode='
+
this
.
checkCode
.
code
})
}
else
if
(
this
.
checkCode
.
selfFlag
){
}
else
{
}
}
})
},
async
wechatLogin
()
{
wx
.
login
({
success
:
(
res
)
=>
{
...
...
pagesA/pages/index/getCarCode.vue
View file @
7d20cf58
...
...
@@ -140,7 +140,7 @@ export default {
this
.
createOrder
=
{
addressId
:
this
.
addressId
,
commodityList
:
[{
id
:
this
.
id
,
id
:
'2022042214065100000000'
,
nums
:
1
,
}],
}
...
...
pagesA/pages/index/getPrice.vue
View file @
7d20cf58
...
...
@@ -138,8 +138,6 @@ export default {
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
model1
.
carInfo
=
res
.
data
.
data
}
else
{
//展示删除失败
}
})
}
...
...
pagesB/pages/move-car/oneMoveCar.vue
View file @
7d20cf58
...
...
@@ -120,11 +120,11 @@ export default {
}
else
if
(
index
.
name
==
"呼叫"
){
//请求拨打电话路径
let
opts
=
{
url
:
'/app/contact/
'
,
method
:
'ge
t'
};
let
opts
=
{
url
:
'/app/contact/
dialPhone'
,
method
:
'pos
t'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
//请求成功逻辑,修改
}
})
//记录修改
...
...
@@ -162,8 +162,17 @@ export default {
icon
:
"error"
,
});
}
})
},
})
},
getMoveLogInit
(){
let
opts
=
{
url
:
'/app/moveLog/init'
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
//添加逻辑判断
this
.
appBo
.
logCode
=
res
.
data
.
data
}
})
},
// 用户授权
getAuthorize
()
{
...
...
@@ -270,7 +279,10 @@ export default {
this
.
moveCode
=
scene
console
.
log
(
'scene: '
+
scene
);
}
}
},
created
()
{
},
}
...
...
pagesB/pages/move-car/scan.vue
View file @
7d20cf58
...
...
@@ -8,7 +8,7 @@
<div
class=
"contentMoveCar"
>
<div
class=
"car_item__one"
>
<div
class=
"item__content"
>
京A123G63
{{
moveCode
}}
</div>
</div>
<div
class=
"car_item__three"
>
...
...
@@ -19,7 +19,7 @@
<div
class=
"scan__tips"
>
<div>
请填写以下信息
</div>
<div
@
click=
"goLoveCar"
>
从爱车选择
<span>
<image
src=
"@/static/move-car/scan_right.png"
/></span></div>
<image
src=
"@/static/move-car/scan_right.png"
/></span></div>
</div>
<active-form
:formDate
.
sync=
"formData"
></active-form>
</div>
...
...
@@ -83,7 +83,7 @@ export default {
label
:
"手机号"
,
// 提示输入名
type
:
"text"
,
//类型
rules
:
{
name
:
"
userMobile"
,
//字段名 即提交给后端的字段
name
:
"
phone"
,
//字段名 即提交给后端的字段userMobile
value
:
""
,
verify
:
false
,
//是否开启校验
errMess
:
"手机号未填写"
,
//校验不通过的错误提示
...
...
@@ -96,50 +96,71 @@ export default {
type
:
"text"
,
// oneKeyPhone:true,
rules
:
{
name
:
"
verificationCode
"
,
name
:
"
yzm
"
,
value
:
""
,
//字段值
verify
:
false
,
errMess
:
"验证码未填写"
,
},
},
],
moveCode
:
''
,
moveCodeInfo
:
{},
//挪车码
moveCode
:
''
,
//绑定挪车码信息
moveCodeInfo
:
{},
//选择车辆id
carId
:
''
,
}
},
methods
:
{
goLoveCar
()
{
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/loveCar'
});
},
confirmBinding
(){
for
(
let
i
in
this
.
formData
){
let
name
=
this
.
formData
[
i
].
rules
.
name
this
.
moveCodeInfo
[
name
]
=
this
.
formData
[
i
].
rules
.
value
}
console
.
log
(
this
.
moveCodeInfo
)
let
opts
=
{
url
:
'/app/moveCode/binding/'
,
method
:
'put'
};
this
.
http
.
httpTokenRequest
(
opts
,
this
.
moveCodeInfo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
//展示绑定成功
uni
.
showToast
({
title
:
"绑定成功"
,
icon
:
"success"
,
});
this
.
goBack
()
}
else
{
//绑定失败,展示失败信息
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
});
}
})
},
goLoveCar
()
{
uni
.
navigateTo
({
url
:
'/pagesB/pages/move-car/loveCar?price=1'
});
},
confirmBinding
(){
for
(
let
i
in
this
.
formData
){
let
name
=
this
.
formData
[
i
].
rules
.
name
if
(
name
==
'yzm'
){
this
.
moveCodeInfo
.
verificationCode
=
this
.
formData
[
i
].
rules
.
value
}
else
if
(
name
==
'phone'
){
this
.
moveCodeInfo
.
userMobile
=
this
.
formData
[
i
].
rules
.
value
}
else
{
this
.
moveCodeInfo
[
name
]
=
this
.
formData
[
i
].
rules
.
value
}
}
console
.
log
(
this
.
moveCodeInfo
)
let
opts
=
{
url
:
'/app/moveCode/binding/'
,
method
:
'put'
};
this
.
http
.
httpTokenRequest
(
opts
,
this
.
moveCodeInfo
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
//展示绑定成功
uni
.
showToast
({
title
:
"绑定成功"
,
icon
:
"success"
,
});
this
.
goBack
()
}
else
{
//绑定失败,展示失败信息
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"error"
,
});
}
})
},
getCarInfo
(){
if
(
this
.
carId
){
let
opts
=
{
url
:
'/app/vehicleAdmin/'
+
this
.
carId
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
model1
.
carInfo
=
res
.
data
.
data
}
})
}
},
},
onLoad
(
option
)
{
this
.
moveCode
=
option
.
moveCode
this
.
moveCode
=
option
.
moveCode
},
}
</
script
>
...
...
pagesD/pages/personal/carTime.vue
View file @
7d20cf58
...
...
@@ -12,10 +12,10 @@
</div>
<div>
<div>
运输中
运输中
{{
waybillInfo
.
waybillStatus
}}
物流最新状态
{{
waybillInfo
.
waybillNewDetail
}}
</div>
<div>
物流单号:
3543859111977240
物流单号:
{{
waybillInfo
.
waybillNo
}}
</div>
<div
class=
"time__btn btn__one"
>
<span>
复制
</span>
...
...
@@ -25,24 +25,25 @@
<div
class=
"get__car"
>
<div
class=
"car__img"
>
<image
src=
"@/static/my/git.png"
alt=
""
/>
</div>
<div
class=
"one__text"
>
【收货地址】北京市朝阳区梨园小区2收货地址北京市朝阳区梨园小区2
</div>
</div>
<div
class=
"time__list"
>
<div
class=
"item"
>
<div
class=
"item__img"
>
<image
src=
"@/static/my/car-time1.png"
alt=
""
/>
</div>
<div
class=
"one__text item__title"
>
到达广东深圳公司,快件将很快进行派送
<div
class=
"time"
>
2020-06-01 12:00:00
</div>
</div>
</div>
</div>
<div
v-for=
"(item,index) in waybillInfo.details"
>
<div
class=
"time__list"
>
<div
class=
"item"
>
<div
class=
"item__img"
>
<image
src=
"@/static/my/car-time1.png"
alt=
""
/>
</div>
<div
class=
"one__text item__title"
>
{{
item
.
remark
}}
<div
class=
"time"
>
2020-06-01 12:00:00
</div>
</div>
</div>
</div>
</div>
<div
class=
"time__list"
>
<div
class=
"item"
>
<div
class=
"item__img"
>
...
...
@@ -88,9 +89,29 @@
export
default
{
data
()
{
return
{
//订单id
orderId
:
''
,
//运单详细信息
waybillInfo
:
{},
}
},
methods
:
{
//获得订单详情
getWaybillInfo
(){
let
opts
=
{
url
:
'/app/user/order/waybill/'
+
this
.
orderId
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
waybillInfo
=
res
.
data
.
data
}
})
},
},
onLoad
(
e
)
{
this
.
orderId
=
e
.
orderId
},
onShow
()
{
this
.
getWaybillInfo
()
},
}
</
script
>
...
...
pagesD/pages/personal/help.vue
View file @
7d20cf58
...
...
@@ -5,6 +5,9 @@
<
template
>
<view
class=
"appCotent"
>
<div
class=
"hlep"
>
<u-cell-group>
<u-cell
title=
"设置消息订阅"
:isLink=
"true"
@
click=
"changeMessages()"
></u-cell>
</u-cell-group>
<image
v-if=
"image"
:src=
"image"
/>
<image
v-else
src=
"@/static/my/help.png"
/>
</div>
...
...
@@ -16,6 +19,8 @@
data
()
{
return
{
image
:
''
,
//是否订阅消息
is_authorization
:
uni
.
getStorageSync
(
'is_authorization'
),
}
},
methods
:
{
...
...
@@ -29,9 +34,113 @@
}
})
},
//获取消息订阅
openMsg
()
{
var
that
=
this
;
let
nc_templateid
=
that
.
nc_templateid
;
// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
wx
.
getSetting
({
withSubscriptions
:
true
,
//是否获取用户订阅消息的订阅状态,默认false不返回
success
(
res
)
{
if
(
that
.
is_authorization
)
{
}
else
{
if
(
res
.
subscriptionsSetting
[
nc_templateid
]
==
"reject"
)
{
//用户点击了“总是保持以上,不再询问”
wx
.
showModal
({
title
:
"温馨提示"
,
content
:
"检测到您没有开启订阅消息的权限,是否去设置?"
,
success
:
function
(
modal
)
{
if
(
modal
.
confirm
)
{
// 点击肯定
wx
.
openSetting
({
withSubscriptions
:
true
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您已拒绝订阅消息授权,无法预约领取"
,
icon
:
"error"
,
});
that
.
is_authorization
=
false
;
}
},
});
}
else
{
// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
// var templateid = that.setting.templateid.map(item => item.tempid);
let
tmpid
=
[
nc_templateid
];
uni
.
requestSubscribeMessage
({
tmplIds
:
tmpid
,
success
(
res
)
{
if
(
res
[
tmpid
[
0
]]
==
"accept"
)
{
uni
.
showToast
({
title
:
"订阅成功"
,
icon
:
"none"
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您拒绝订阅消息授权,无法预约领取"
,
icon
:
"none"
,
});
that
.
is_authorization
=
false
;
}
},
fail
:
(
res
)
=>
{
wx
.
showModal
({
title
:
"温馨提示"
,
content
:
"检测到您没有开启订阅消息的权限,是否去设置?"
,
success
:
function
(
modal
)
{
if
(
modal
.
confirm
)
{
// 点击肯定
wx
.
openSetting
({
withSubscriptions
:
true
,
});
that
.
is_authorization
=
true
;
uni
.
setStorageSync
(
"is_authorization"
,
true
);
}
else
{
uni
.
showToast
({
title
:
"您已拒绝订阅消息授权,无法预约领取"
,
icon
:
"error"
,
});
that
.
is_authorization
=
false
;
}
},
});
},
});
}
}
},
});
},
//改变消息订阅
changeMessages
(){
wx
.
openSetting
({
withSubscriptions
:
true
,
});
// if(!this.is_authorization){
// wx.openSetting({
// withSubscriptions: true,
// });
// this.is_authorization = false;
// uni.setStorageSync("is_authorization", false);
// }else{
// wx.openSetting({
// withSubscriptions: true,
// });
// this.is_authorization = false;
// uni.setStorageSync("is_authorization", false);
// }
},
},
onShow
()
{
this
.
getHelpInfo
()
//this.openMsg()
},
}
...
...
pagesD/pages/personal/index.vue
View file @
7d20cf58
...
...
@@ -35,7 +35,7 @@
</div>
</div>
<div
class=
"tab__bottom"
>
<div
class=
"tab__item"
v-for=
"(vo,inx) in items"
:key=
"inx"
@
click=
"goOrder(
vo.page
)"
>
<div
class=
"tab__item"
v-for=
"(vo,inx) in items"
:key=
"inx"
@
click=
"goOrder(
inx+1
)"
>
<image
:src=
"vo.icon"
/>
<div>
{{
vo
.
title
}}
</div>
</div>
...
...
@@ -91,7 +91,7 @@ export default {
}
],
items
:
[{
title
:
'待
付款
'
,
title
:
'待
发货
'
,
icon
:
require
(
'@/static/my/my2.png'
),
page
:
0
},
...
...
@@ -121,9 +121,9 @@ export default {
url
:
'/pages/binding/index'
});
},
goOrder
(
page
=
0
)
{
goOrder
(
current
)
{
uni
.
navigateTo
({
url
:
'/pagesD/pages/personal/myOrder?
page='
+
page
url
:
'/pagesD/pages/personal/myOrder?
current='
+
current
});
},
goUrl
(
vo
)
{
...
...
pagesD/pages/personal/myOrder.vue
View file @
7d20cf58
This diff is collapsed.
Click to expand it.
pagesD/pages/personal/orderDetail.vue
View file @
7d20cf58
...
...
@@ -16,7 +16,7 @@
<div>
到达【北京邮区邮件处理中心】
</div>
<div
class=
"order__btn btn__one"
@
click=
"viewCar"
>
<div
class=
"order__btn btn__one"
@
click=
"viewCar"
>
<span>
查看物流
</span>
</div>
</div>
...
...
@@ -24,10 +24,12 @@
<div
class=
"address"
>
<div
class=
"address__left"
>
<div
class=
"right__title"
>
北京市朝阳区李家董镇太阳宫社区大唐公寓 2号楼3单元303
{{
orderInfo
.
address
}}
 
{{
orderInfo
.
detailInfo
}}
</div>
<div
class=
"right__phone"
>
<span>
默认
</span>
<span>
我是收货人
</span><span>
19963353323
</span>
<!--
<span>
默认
</span>
-->
<span>
{{
orderInfo
.
userName
}}
</span>
<span>
{{
orderInfo
.
telNumber
}}
</span>
</div>
</div>
...
...
@@ -40,31 +42,31 @@
</div>
<div
class=
"top__right"
>
<div
class=
"right__one one__text"
>
<span>
强力清洗剂 大容量 标
</span>
<span>
¥
25.5
</span>
<span>
{{
orderInfo
.
title
}}
</span>
<span>
¥
{{
orderInfo
.
amount
/
100
}}
</span>
</div>
<div
class=
"right__two"
>
<span>
强力清洗剂 大容量 标120 ml*3瓶装
</span>
<span>
×
4
</span>
<span>
{{
orderInfo
.
spec
}}
</span>
<span>
×
{{
orderInfo
.
nums
}}
</span>
</div>
</div>
</div>
<div
class=
"item__bottom"
>
<div
class=
"bottom__item"
>
<div>
订单编号::
</div>
<div>
3543859111977240
</div>
<div>
{{
orderInfo
.
orderNo
}}
</div>
</div>
<div
class=
"bottom__item"
>
<div>
付款时间:
</div>
<div>
2022-01-20 12:12:03
</div>
<div>
{{
orderInfo
.
successTime
}}
</div>
</div>
<div
class=
"bottom__item"
>
<div>
商品总价:
</div>
<div>
¥
48.00
</div>
<div>
¥
{{
orderInfo
.
amount
/
100
}}
</div>
</div>
<div
class=
"bottom__item"
>
<div>
实付款:
</div>
<div
class=
"bottom__price"
>
¥
48.00
</div>
<div
class=
"bottom__price"
>
¥
{{
orderInfo
.
amount
/
100
}}
</div>
</div>
</div>
<div
class=
"order__btn"
@
click=
"pull"
>
...
...
@@ -78,18 +80,40 @@
<
script
>
export
default
{
data
(){
return
{
//订单id
orderId
:
''
,
//订单详情
orderInfo
:
{},
}
},
methods
:
{
viewCar
()
{
uni
.
navigateTo
({
url
:
'/pagesD/pages/personal/carTime
'
url
:
'/pagesD/pages/personal/carTime
?orderId='
+
this
.
orderId
})
}
,
pull
()
{
}
,
pull
()
{
uni
.
navigateTo
({
url
:
'/pagesD/pages/personal/pull'
})
}
},
//获得订单详情
getOrderInfo
(){
let
opts
=
{
url
:
'/app/user/order/info/'
+
this
.
orderId
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
orderInfo
=
res
.
data
.
data
}
})
},
},
onLoad
(
e
)
{
this
.
orderId
=
e
.
orderId
},
onShow
()
{
this
.
getOrderInfo
()
},
}
</
script
>
...
...
@@ -160,16 +184,16 @@ export default {
display
:
flex
;
align-items
:
center
;
span
:nth-of-type
(
1
)
{
font-size
:
24rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#F88D28
;
padding
:
2rpx
4rpx
;
border
:
1rpx
solid
#F88D28
;
}
//
span:nth-of-type(1) {
//
font-size: 24rpx;
//
font-family: PingFang SC;
//
font-weight: bold;
//
color: #F88D28;
//
padding: 2rpx 4rpx;
//
border: 1rpx solid #F88D28;
//
}
span
:nth-of-type
(
2
)
{
span
:nth-of-type
(
1
)
{
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
...
...
@@ -177,7 +201,7 @@ export default {
padding
:
0
14rpx
;
}
span
:nth-of-type
(
3
)
{
span
:nth-of-type
(
2
)
{
font-size
:
28rpx
;
font-family
:
DIN
;
font-weight
:
500
;
...
...
pagesD/pages/personal/pull.vue
View file @
7d20cf58
...
...
@@ -17,7 +17,7 @@
<div
class=
"why"
>
<u--textarea
v-model=
"value1"
placeholder=
"地址输入错误,需重新拍下。地址输入错误,需重新拍下。地址输入错误,需重新拍下。"
></u--textarea>
</div>
<div
class=
"view__btn view__no__bind"
>
<div
class=
"view__btn view__no__bind"
@
click=
"orderRefund"
>
提交申请
</div>
</div>
...
...
@@ -33,19 +33,48 @@ export default {
value1
:
''
,
items
:
[{
title
:
"退款金额:"
,
value
:
"¥
48
.00"
value
:
"¥
0
.00"
},
{
title
:
"退款原因:"
,
value
:
""
},
]
],
//订单id
orderId
:
''
,
//订单详情
orderInfo
:
{},
};
},
methods
:
{
getOrderInfo
(){
let
opts
=
{
url
:
'/app/user/order/info/'
+
this
.
orderId
,
method
:
'get'
};
this
.
http
.
httpTokenRequest
(
opts
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
orderInfo
=
res
.
data
.
data
this
.
items
[
0
].
value
=
"¥"
+
(
res
.
data
.
data
.
amount
/
100
)
}
})
},
orderRefund
(){
let
opts
=
{
url
:
'/app/user/order/refund'
,
method
:
'post'
};
let
orderRefund
=
{
orderId
:
this
.
orderInfo
.
id
,
reason
:
this
.
items
[
1
].
value
}
this
.
http
.
httpTokenRequest
(
opts
,
orderRefund
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
}
})
}
},
onLoad
(
e
)
{
this
.
orderId
=
e
.
orderId
},
onShow
()
{
this
.
getOrderInfo
()
}
}
</
script
>
...
...
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