Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xinrenli-app
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑云飞
xinrenli-app
Commits
45d4f3a9
Commit
45d4f3a9
authored
Apr 08, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请退款
parent
7956d42d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
231 additions
and
129 deletions
+231
-129
api/system/index.js
+8
-1
demand/confirm/index.vue
+52
-8
demand/index/index.vue
+8
-15
demand/payment/index.vue
+23
-48
my/coupon/index.vue
+2
-2
my/invite/index.vue
+33
-16
my/login/login.vue
+15
-3
pages/demand/components/index.vue
+24
-17
pages/demand/index.vue
+40
-13
pages/my/index.vue
+2
-4
pages/order/index.vue
+24
-2
No files found.
api/system/index.js
View file @
45d4f3a9
...
...
@@ -53,9 +53,14 @@ const createPayOrder = (params) =>{
return
ApiHttp
(
'/xinrenli/order/orderPay'
,
params
,
'GET'
)
}
//申请退款
const
applyRefund
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/createPay'
,
params
,
'POST'
)
}
//退款
const
refundFunction
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/refund'
,
params
,
'
POS
T'
)
return
ApiHttp
(
'/xinrenli/order/refund'
,
params
,
'
GE
T'
)
}
//查询用户折扣列表
...
...
@@ -75,6 +80,7 @@ export {
updateOrderFunction
,
removeOrderFunction
,
createPayOrder
,
applyRefund
,
refundFunction
,
userDiscountList
}
\ No newline at end of file
demand/confirm/index.vue
View file @
45d4f3a9
<
template
>
<view
class=
"content"
>
<view
class=
"content-swiper"
>
灯泡灯芯坏了
{{
payInfo
.
title
}}
</view>
<view
class=
"content-price"
>
<text>
¥
</text>
255.00
<text>
¥
</text>
{{
payInfo
.
sumPrice
}}
</view>
<view
class=
"content-company"
>
<text>
收款方
</text>
<text>
XXXXXXXXXX
有限公司
</text>
<text>
上海印宏网络科技
有限公司
</text>
</view>
<button
@
click=
"jump"
>
立即支付
</button>
</view>
...
...
@@ -22,14 +22,58 @@
return
{
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
scrollTopHeader
:
0
,
orderQuery
:{},
payInfo
:{
sumPrice
:
0
,
title
:
''
}
};
},
onLoad
()
{},
methods
:
{
onLoad
(
option
)
{
if
(
option
.
orderQuery
){
let
info
=
JSON
.
parse
(
decodeURIComponent
(
option
.
orderQuery
))
console
.
log
(
info
,
'打算今年'
)
this
.
orderQuery
=
info
}
if
(
option
.
sumPrice
){
this
.
payInfo
.
sumPrice
=
option
.
sumPrice
this
.
payInfo
.
title
=
option
.
title
}
},
methods
:
{
// 支付接口
async
handlePay
(){
let
that
=
this
const
data_back
=
await
createPayOrder
(
that
.
orderQuery
)
const
{
code
,
data
}
=
data_back
if
(
code
===
200
){
uni
.
requestPayment
({
provider
:
'wxpay'
,
nonceStr
:
data
.
nonceStr
,
// 随机字符串
package
:
data
.
packageValue
,
// 固定值
timeStamp
:
data
.
timeStamp
,
// 时间戳(单位:秒)
signType
:
data
.
signType
,
paySign
:
data
.
paySign
,
success
:
(
res
)
=>
{
if
(
res
.
errMsg
==
'requestPayment:ok'
)
{
that
.
$uniGo
.
navigateTo
({
url
:
'/demand/prosperity/index'
})
}
},
fail
(
err
)
{
console
.
log
(
'失败'
)
if
(
err
.
errMsg
==
'requestPayment:fail cancel'
)
{
}
}
})
}
},
async
jump
(){
const
data_back
=
await
createPayOrder
()
console
.
log
(
data_back
,
'支付'
)
this
.
handlePay
()
// this.$uniGo.navigateTo({
// url: `/demand/prosperity/index`
// });
...
...
demand/index/index.vue
View file @
45d4f3a9
...
...
@@ -64,17 +64,20 @@
<view
class=
"paddding-x-two"
>
驳回理由:
{{
detailData
&&
detailData
.
reasonsForRejection
?
detailData
.
reasonsForRejection
:
'暂无'
}}
</view>
<!--
<u--textarea
v-model=
"detailData.value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
</view>
<view
class=
"content-reject"
v-if=
"subscript == 3 &&
subs== '1'
"
>
<view
class=
"content-reject"
v-if=
"subscript == 3 &&
detailData.status== 5
"
>
<view
class=
""
>
<text
style=
"background:#2C66FF"
></text>
该订单已提交退款,等待商家致电……
</view>
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
<view>
已支付金额:
{{
detailData
.
payAmount
}}
元
</view>
<!--
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
</view>
<view
class=
"content-reject"
v-if=
"subscript == 3 &&
subs== '2
'"
>
<view
class=
"content-reject"
v-if=
"subscript == 3 &&
detailData.status== '6
'"
>
<view
class=
""
>
<text></text>
该订单已退款
</view>
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
<!--
<u--textarea
v-model=
"value1"
placeholder=
"请输入内容"
disabled
></u--textarea>
-->
<view>
退款金额:
{{
detailData
.
refundAmount
}}
元
</view>
<view>
已扣除服务金额:
{{
detailData
.
payAmount
-
detailData
.
refundAmount
}}
元
</view>
</view>
</view>
</view>
...
...
@@ -93,18 +96,15 @@
scrollTopHeader
:
0
,
detailInfo
:
{},
//接收的参数
subscript
:
'0'
,
subs
:
'1'
,
detailData
:
{}
};
},
onLoad
(
option
)
{
if
(
option
.
detailInfo
)
{
this
.
detailInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
detailInfo
))
console
.
log
(
this
.
detailInfo
,
'结束'
)
this
.
getOrder
()
}
return
this
.
subs
=
option
.
subs
this
.
subscript
=
option
.
subscript
},
methods
:
{
...
...
@@ -114,7 +114,6 @@
const
data_back
=
await
orderDetailMsgNew
({
id
:
that
.
detailInfo
.
id
})
console
.
log
(
data_back
,
'订单详情'
)
const
{
code
,
data
...
...
@@ -122,12 +121,6 @@
if
(
code
===
200
)
{
that
.
detailData
=
data
}
// orderDetailMsgNew({id:that.detailInfo.id}).then(res=>{
// console.log('订单详情',res)
// if(res.code == 200){
// that.detailData = res.data
// }
// })
},
}
...
...
demand/payment/index.vue
View file @
45d4f3a9
...
...
@@ -52,7 +52,7 @@
</
template
>
<
script
>
import
{
createPayOrder
,
userDiscountList
}
from
'@/api/system/index.js'
import
{
userDiscountList
}
from
'@/api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
export
default
{
data
()
{
...
...
@@ -74,6 +74,7 @@
let
that
=
this
if
(
option
.
detailInfo
)
{
this
.
detailInfo
=
JSON
.
parse
(
decodeURIComponent
(
option
.
detailInfo
))
console
.
log
(
this
.
detailInfo
,
'读书'
)
}
uni
.
$on
(
'payInfo'
,
res
=>
{
console
.
log
(
res
,
'打算今年'
);
...
...
@@ -93,9 +94,12 @@
// 判断是否使用折扣(使用×折扣)
return
that
.
isUse
?
Number
((
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
)
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
):
Number
(
that
.
detailInfo
.
actualAmount
-
that
.
payInfo
.
fullSubtraction
).
toFixed
(
2
)
}
else
{
console
.
log
(
'物质'
)
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
// return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * 0.1).toFixed(2) : that.detailInfo.actualAmount
if
(
that
.
discountList
.
length
&&
that
.
discountList
[
0
].
discountRatio
){
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
}
else
{
that
.
isUse
=
false
return
that
.
detailInfo
.
actualAmount
&&
that
.
isUse
?
Number
(
that
.
detailInfo
.
actualAmount
*
that
.
discountList
[
0
].
discountRatio
).
toFixed
(
2
)
:
that
.
detailInfo
.
actualAmount
}
}
}
...
...
@@ -103,59 +107,30 @@
methods
:
{
async
getDisCountList
(){
const
data_back
=
await
userDiscountList
({
useStatus
:
0
})
console
.
log
(
data_back
,
'折扣列表'
)
const
{
code
,
rows
}
=
data_back
if
(
code
===
200
){
const
{
code
,
rows
,
total
}
=
data_back
if
(
code
===
200
&&
total
>
0
){
this
.
discountList
=
rows
this
.
isUse
=
true
}
else
{
this
.
isUse
=
false
}
},
// 支付接口
async
handlePay
(){
let
that
=
this
let
orderQuery
=
{
orderId
:
that
.
detailInfo
.
id
,
//订单的id
couponId
:
that
.
payInfo
.
id
?
that
.
payInfo
.
id
:
''
,
//优惠券的id
discountId
:
that
.
isUse
&&
that
.
discountList
.
length
?
that
.
discountList
[
0
].
id
:
''
,
//折扣的id
}
const
data_back
=
await
createPayOrder
(
orderQuery
)
console
.
log
(
data_back
,
'单靠'
)
const
{
code
,
data
}
=
data_back
if
(
code
===
200
){
uni
.
requestPayment
({
provider
:
'wxpay'
,
nonceStr
:
data
.
nonceStr
,
// 随机字符串
package
:
data
.
packageValue
,
// 固定值
timeStamp
:
data
.
timeStamp
,
// 时间戳(单位:秒)
signType
:
data
.
signType
,
paySign
:
data
.
paySign
,
success
:
(
res
)
=>
{
console
.
log
(
res
,
'成功'
)
if
(
res
.
errMsg
==
'requestPayment:ok'
)
{
that
.
$uniGo
.
navigateTo
({
url
:
'/demand/prosperity/index'
})
}
},
fail
(
err
)
{
console
.
log
(
'失败'
)
if
(
err
.
errMsg
==
'requestPayment:fail cancel'
)
{
}
}
})
}
},
jump
(
val
)
{
let
that
=
this
if
(
val
==
1
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/my/coupon/index?type=pay`
});
}
else
{
this
.
handlePay
()
// this.$uniGo.navigateTo({
// url: `/demand/confirm/index`
// });
let
orderQuery
=
{
orderId
:
that
.
detailInfo
.
id
,
//订单的id
couponId
:
that
.
payInfo
.
id
?
that
.
payInfo
.
id
:
''
,
//优惠券的id
discountId
:
that
.
isUse
&&
that
.
discountList
.
length
?
that
.
discountList
[
0
].
id
:
''
,
//折扣的id
}
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/confirm/index?orderQuery=
${
encodeURIComponent
(
JSON
.
stringify
(
orderQuery
))}
&sumPrice=
${
that
.
sumPrice
}
&title=
${
this
.
detailInfo
.
title
}
`
});
}
},
changeUse
(
e
)
{
...
...
my/coupon/index.vue
View file @
45d4f3a9
...
...
@@ -38,10 +38,10 @@
</view>
</view>
</view>
<view
class=
"index-content-item"
>
<view
class=
"index-content-item"
v-if=
"couponLoseList.length"
>
<view
class=
"index-content-item-nav index-content-item-navx baiyin-flex baiyin-flex-c-b"
>
<text></text>
<view>
不可用优惠券
(2)
</view>
<view>
不可用优惠券
{{couponLoseList.length}}
</view>
</view>
<view
class=
"index-content-item-qu"
v-for=
"(info,ix) in couponLoseList"
>
<image
class=
"index-content-item-qu-bg"
src=
"@/static/icon/xy02.png"
mode=
""
></image>
...
...
my/invite/index.vue
View file @
45d4f3a9
...
...
@@ -49,7 +49,6 @@
data
()
{
return
{
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
scrollTopHeader
:
0
,
inviteList
:
[],
total
:
0
...
...
@@ -57,21 +56,40 @@
},
onShareAppMessage
(
options
)
{
var
that
=
this
;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var
shareObj
=
{
title
:
"新人力小程序"
,
// 默认是小程序的名称(可以写slogan等)
path
:
'/my/login/login'
,
// 默认是当前页面,必须是以‘/'开头的完整路径
};
// 来自页面内的按钮的转发
if
(
options
.
from
==
'button'
)
{
var
eData
=
options
.
target
.
dataset
;
console
.
log
(
eData
.
name
);
// shareBtn
// 此处可以修改 shareObj 中的内容
shareObj
.
path
=
'/my/login/login'
;
let
token
=
uni
.
getStorageSync
(
'token'
)
if
(
token
){
var
shareObj
=
{
title
:
"新人力小程序"
,
// 默认是小程序的名称(可以写slogan等)
path
:
`/my/login/login?id=
${
that
.
$store
.
state
.
login
.
userInfo
.
user
.
id
}
`
,
// 默认是当前页面,必须是以‘/'开头的完整路径
};
// 来自页面内的按钮的转发
if
(
options
.
from
==
'button'
)
{
var
eData
=
options
.
target
.
dataset
;
console
.
log
(
eData
.
name
);
// shareBtn
// 此处可以修改 shareObj 中的内容
shareObj
.
path
=
'/my/login/login?id=${that.$store.state.login.userInfo.user.id}'
;
}
console
.
log
(
"shareObj"
,
shareObj
)
// 返回shareObj
return
shareObj
;
// 设置菜单中的转发按钮触发转发事件时的转发内容
}
else
{
uni
.
showModal
({
title
:
'请登录'
,
content
:
'您需要登录才能使用该功能'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
that
.
$uniGo
.
reLaunch
({
url
:
'/my/login/login'
})
}
else
if
(
res
.
cancel
)
{
uni
.
navigateBack
()
}
}
})
}
console
.
log
(
"shareObj"
,
shareObj
)
// 返回shareObj
return
shareObj
;
},
onLoad
()
{
...
...
@@ -82,7 +100,6 @@
// 获取邀请列表
async
getList
()
{
const
data_back
=
await
queryInviteListGet
()
console
.
log
(
data_back
,
'第三节'
)
const
{
code
,
rows
,
...
...
my/login/login.vue
View file @
45d4f3a9
...
...
@@ -23,10 +23,12 @@
loginParams
:{
xcxCode
:
''
},
token
:
''
token
:
''
,
InviterId
:
''
,
//邀请人的id
}
},
onLoad
()
{
onLoad
(
option
)
{
console
.
log
(
option
.
id
,
'第三节'
)
let
that
=
this
// 获取系统的高度
uni
.
getSystemInfo
({
...
...
@@ -35,6 +37,9 @@
}
})
this
.
getUserInfo
()
if
(
option
.
id
){
this
.
InviterId
=
option
.
id
}
},
methods
:
{
// 1.调用微信自带登录方法获取code
...
...
@@ -50,7 +55,14 @@
// 2.获取sessionKey,openId
async
getSessionkeyAndOpenId
(
xcxCode
)
{
let
that
=
this
const
back_data
=
await
login
({
xcxCode
:
xcxCode
})
let
codeParams
=
{}
if
(
that
.
InviterId
){
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
that
.
$set
(
codeParams
,
'InviterId'
,
that
.
InviterId
)
}
else
{
that
.
$set
(
codeParams
,
'xcxCode'
,
xcxCode
)
}
const
back_data
=
await
login
(
codeParams
)
const
{
code
,
data
}
=
back_data
if
(
code
===
200
){
uni
.
setStorageSync
(
'token'
,
data
.
token
)
...
...
pages/demand/components/index.vue
View file @
45d4f3a9
...
...
@@ -27,7 +27,8 @@
<view
class=
"reject flex-1 hiddenMore"
>
驳回理由:
{{
item
.
reasonsForRejection
?
item
.
reasonsForRejection
:
'暂无'
}}
</view>
<button
@
click
.
stop=
"handleAgainAdd(item)"
class=
"buttoncl"
style=
"margin-left: 20rpx;"
>
重新发布
</button>
<button
@
click
.
stop=
"handleAgainAdd(item)"
class=
"buttoncl"
style=
"margin-left: 20rpx;"
>
重新发布
</button>
</view>
<!-- // 待支付 -->
...
...
@@ -46,9 +47,10 @@
</view>
<!-- // 已接单 -->
<view
class=
"buttoncolor"
v-if=
"subscript == '3'"
>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
class=
"buttonclde"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
<button
class=
"buttonclde"
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
<button
v-if=
"item.status == 3"
style=
"background: red;"
class=
"buttoncl"
@
click
.
stop=
"abolish(2,item)"
>
退款
</button>
<button
v-else-if=
"item.status == 6"
class=
"buttonclde buttonGray"
@
click
.
stop=
"abolish(4,item)"
>
已退款
</button>
<button
class=
"buttoncl"
@
click
.
stop=
"abolish(3,item)"
>
详情
</button>
</view>
</view>
</view>
...
...
@@ -82,15 +84,15 @@
show
:
false
,
title
:
'确认取消订单吗'
,
titbut
:
'取消订单'
,
currentId
:
''
,
//当前的id
actualAmount
:
0
,
//实付金饿
currentId
:
''
,
//当前的id
actualAmount
:
0
,
//实付金饿
}
},
mounted
(){
this
.
timer
=
setInterval
(()
=>
{
mounted
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
countDown
()
},
1000
)
},
1000
)
},
methods
:
{
// 1小时倒计时
...
...
@@ -110,7 +112,7 @@
// 跳转详情页
jump
(
data
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/index/index?detailInfo=
${
encodeURIComponent
(
JSON
.
stringify
(
data
))}
`
url
:
`/demand/index/index?detailInfo=
${
encodeURIComponent
(
JSON
.
stringify
(
data
))}
&subscript=
${
this
.
subscript
}
`
// url: `/demand/index/index?subscript=${this.subscript}`
});
},
...
...
@@ -121,8 +123,8 @@
});
},
// 取消订单1 立即退款2
abolish
(
val
,
data
)
{
console
.
log
(
data
.
id
,
data
.
actualAmount
,
'数控'
)
abolish
(
val
,
data
)
{
console
.
log
(
data
.
id
,
data
.
actualAmount
,
'数控'
)
this
.
currentId
=
data
.
id
this
.
actualAmount
=
data
.
actualAmount
if
(
val
==
1
)
{
...
...
@@ -135,12 +137,13 @@
this
.
show
=
true
}
else
if
(
val
==
3
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/index/index?subscript=
${
this
.
subscript
}
&subs=
${
'1'
}
`
url
:
`/demand/index/index?detailInfo=
${
encodeURIComponent
(
JSON
.
stringify
(
data
))}
&subscript=
${
this
.
subscript
}
`
// url: `/demand/index/index?subscript=${this.subscript}`
});
}
else
if
(
val
==
4
)
{
this
.
$uniGo
.
navigateTo
({
url
:
`/demand/index/index?subscript=
${
this
.
subscript
}
&subs=
${
'2'
}
`
});
//
this.$uniGo.navigateTo({
//
url: `/demand/index/index?subscript=${this.subscript}&subs=${'2'}`
//
});
}
},
//重新发布按钮事件
...
...
@@ -156,7 +159,7 @@
},
// 取消订单2 立即退款3
aindexst
(
val
)
{
this
.
$emit
(
'getVal'
,
val
,
this
.
currentId
,
this
.
actualAmount
)
this
.
$emit
(
'getVal'
,
val
,
this
.
currentId
,
this
.
actualAmount
)
this
.
show
=
false
}
}
...
...
@@ -273,6 +276,10 @@
color
:
#FD0100
;
line-height
:
44
rpx
;
}
.buttonGray
{
border
:
1
rpx
solid
#666666
!important
;
color
:
#666666
!important
;
}
.reject
{
margin-top
:
20
rpx
;
...
...
pages/demand/index.vue
View file @
45d4f3a9
...
...
@@ -59,7 +59,8 @@
myNeedList
,
orderDetailList
,
removeOrderFunction
,
refundFunction
refundFunction
,
applyRefund
}
from
'../../api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
import
uniGo
from
'@/utils/unIGO.js'
;
...
...
@@ -86,8 +87,8 @@
pageNum
:
1
,
status
:
0
,
deleteStatus
:
0
,
orderByColumn
:
'modifyTime'
,
isAsc
:
'desc'
orderByColumn
:
'modifyTime'
,
isAsc
:
'desc'
},
statusNeedList
:
[]
}
...
...
@@ -108,6 +109,12 @@
let
that
=
this
that
.
needInfo
.
status
=
that
.
subscript
that
.
statusNeedList
=
[]
if
(
that
.
subscript
==
3
)
{
that
.
$delete
(
that
.
needInfo
,
"status"
)
that
.
$set
(
that
.
needInfo
,
'statusList'
,
'3,5,6'
)
}
else
{
that
.
$delete
(
that
.
needInfo
,
"statusList"
)
}
const
data_back
=
await
orderDetailList
(
that
.
needInfo
)
const
{
code
,
...
...
@@ -121,7 +128,7 @@
that
.
statusNeedList
=
[]
}
}
},
jump
(
ind
)
{
let
that
=
this
...
...
@@ -152,12 +159,15 @@
}
},
// 立即退款接口
async
handleRefund
(
id
,
price
){
const
data_back
=
await
refundFunction
({
refundeAmount
:
price
,
orderId
:
id
})
console
.
log
(
data_back
,
'退款'
)
async
handleRefund
(
id
,
price
)
{
const
data_back
=
await
refundFunction
({
refundeAmount
:
price
,
orderId
:
id
})
console
.
log
(
data_back
,
'退款'
)
const
{
code
}
=
back_data
}
=
data_back
if
(
code
==
200
)
{
uni
.
showToast
({
title
:
'退款成功!'
,
...
...
@@ -171,15 +181,32 @@
})
}
},
//申请退款接口
async
applyRefundFun
(
id
){
let
that
=
this
const
data_back
=
await
applyRefund
({
id
:
id
,
status
:
'4'
})
const
{
code
}
=
data_back
if
(
code
===
200
){
uni
.
showToast
({
title
:
'提交申请成功!'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
setTimeout
(()
=>
{
that
.
getMyNeedList
()
},
1000
)
}
})
}
},
// 取消订单2 立即退款3
handleStatus
(
val
,
id
,
price
)
{
console
.
log
(
val
,
id
,
price
,
'装订好'
)
handleStatus
(
val
,
id
,
price
)
{
let
that
=
this
if
(
val
==
2
)
{
that
.
handleCancle
(
id
)
}
else
if
(
val
==
3
)
{
that
.
handleRefund
(
id
,
price
)
}
else
if
(
val
==
3
)
{
// that.handleRefund(id,
price)
that
.
applyRefundFun
(
id
)
}
}
}
...
...
pages/my/index.vue
View file @
45d4f3a9
...
...
@@ -4,7 +4,7 @@
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }">
</view>
<view
class=
"content-in"
>
<view
class=
"content-in-info baiyin-flex baiyin-flex-c-b"
>
<button
class=
"content-in-info-l"
type=
"balanced"
open-type=
"chooseAvatar"
@
chooseavatar=
"onChooseavatar"
>
<button
class=
"content-in-info-l"
type=
"balanced"
open-type=
"chooseAvatar"
@
chooseavatar=
"onChooseavatar"
>
<image
src=
"@/static/icon/my03.png"
mode=
""
></image>
</button>
<view
class=
"content-in-info-r"
>
...
...
@@ -125,19 +125,17 @@ export default {
},
onLoad
()
{
this
.
nickname
=
this
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
console
.
log
(
this
.
$store
.
state
.
login
.
userInfo
.
user
.
nickname
,
'D撒'
)
let
mobile
=
uni
.
getStorageSync
(
'mobile'
)
this
.
mobile
=
mobile
},
methods
:
{
...
mapMutations
([
'upDateUserInfoMount'
]),
onChooseavatar
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
,
'1211'
);
return
;
let
self
=
this
;
const
{
avatarUrl
}
=
e
.
detail
;
this
.
fdsa
=
avatarUrl
;
console
.
log
(
avatarUrl
,
e
,
'fsdafdsa'
);
wx
.
getFileSystemManager
().
readFile
({
filePath
:
avatarUrl
,
//选择图片返回的相对路径
encoding
:
'base64'
,
//编码格式
...
...
pages/order/index.vue
View file @
45d4f3a9
...
...
@@ -2,9 +2,15 @@
<view
class=
"content"
>
<view
:style=
"
{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }">
</view>
<view
class=
"friends-list-box"
>
<view
v-if=
"articleList.length"
class=
"friends-list-box"
>
<evaluateList
:list=
"articleList"
@
getId=
"handleDetail"
></evaluateList>
</view>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无数据
</view>
</view>
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"#fff"
title=
"动态"
:titleStyle=
"
{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<com-tabbar
:list=
" [
{
...
...
@@ -137,7 +143,7 @@
}
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.friends-list-box
{
/* background-color: #FFFFFF;
padding: 30rpx 20rpx;
...
...
@@ -145,4 +151,20 @@
margin: 10px 20rpx 0 20rpx;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); */
}
.diagram
{
text-align
:
center
;
margin-top
:
335
rpx
;
>image
{
width
:
396
rpx
;
height
:
243
rpx
;
}
>
view
{
margin-top
:
20
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#444444
;
}
}
</
style
>
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