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
76b833dc
Commit
76b833dc
authored
Apr 04, 2023
by
honghong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券列表接口对接详情接口修改
parent
2b28a6b6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
325 additions
and
244 deletions
+325
-244
api/my/index.js
+13
-1
api/system/index.js
+14
-2
api/user.js
+4
-4
config/index.js
+4
-3
demand/index/index.vue
+0
-0
home/index/index.vue
+13
-8
my/coupon/index.vue
+55
-18
my/login/login.vue
+21
-19
pages/demand/components/index.vue
+7
-4
pages/demand/index.vue
+191
-160
pages/home/index.vue
+1
-1
store/modules/login.js
+2
-24
No files found.
api/my/index.js
View file @
76b833dc
...
...
@@ -11,6 +11,15 @@ const addUserFeedback = (params) => {
const
couponListGet
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/coupon/list'
,
params
,
'GET'
)
}
// 用户优惠卷有效查询接口
const
userCouponList
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/userCoupon/list'
,
params
,
'GET'
)
}
// 用户优惠卷无效查询接口
const
userCouponListLose
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/userCoupon/listLose'
,
params
,
'GET'
)
}
// 查询邀请列表
const
queryInviteListGet
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/Inviter/list'
,
params
,
'GET'
)
...
...
@@ -23,5 +32,7 @@ export {
addUserFeedback
,
couponListGet
,
queryInviteListGet
,
addInviterGet
addInviterGet
,
userCouponList
,
userCouponListLose
}
\ No newline at end of file
api/system/index.js
View file @
76b833dc
...
...
@@ -10,6 +10,10 @@ const userNeedSquare = (params) => {
const
orderDetailMsg
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/'
,
params
,
'GET'
)
}
// 获取订单详细信息(最新首页详情)
const
orderDetailMsgNew
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/particulars'
,
params
,
'GET'
)
}
//我的需求
const
myNeedList
=
(
params
)
=>
{
...
...
@@ -23,13 +27,20 @@ const addOrderFunction = (params) =>{
// 修改订单(发布)
const
updateOrderFunction
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order'
,
params
,
'PUT'
)
return
ApiHttp
(
'/xinrenli/order/edit'
,
params
,
'POST'
)
}
//取消订单
const
removeOrderFunction
=
(
params
)
=>
{
return
ApiHttp
(
'/xinrenli/order/remove'
,
params
,
'GET'
)
}
export
{
userNeedSquare
,
orderDetailMsg
,
orderDetailMsgNew
,
myNeedList
,
addOrderFunction
,
updateOrderFunction
updateOrderFunction
,
removeOrderFunction
}
\ No newline at end of file
api/user.js
View file @
76b833dc
import
{
ApiHttp
}
from
'@/utils/request.js'
// 程序静默登录
const
login
=
(
params
)
=>
{
return
ApiHttp
(
'/
system/xcxLogin'
,
params
,
'POS
T'
)
return
ApiHttp
(
'/
xcxLogin'
,
params
,
'GE
T'
)
}
// 获取手机号
const
loginPhone
=
(
params
)
=>
{
return
ApiHttp
(
'/
system/getPhone
'
,
params
,
'POST'
)
return
ApiHttp
(
'/
xcxPhoneLogin
'
,
params
,
'POST'
)
}
const
loginOut
=
(
params
)
=>
{
...
...
config/index.js
View file @
76b833dc
let
hostUrl
=
'http://xinrenli.nyinhong.com'
,
// 测试
// let hostUrl = 'http://192.168.0.109
:7001', // UAT
//
let hostUrl = 'http://xinrenli.nyinhong.com', // 测试
let
hostUrl
=
'http://192.168.0.175
:7001'
,
// UAT
// // let hostUrl = 'https://pepsibdp.masterkong.com.cn', // prd
api
=
'/api'
,
api
=
''
,
// api = '/api',
imgApi
=
'/admimage/'
;
// let hostUrl = '',
...
...
demand/index/index.vue
View file @
76b833dc
This diff is collapsed.
Click to expand it.
home/index/index.vue
View file @
76b833dc
...
...
@@ -61,7 +61,8 @@
<
script
>
import
{
orderDetailMsg
orderDetailMsg
,
orderDetailMsgNew
}
from
'../../api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
import
freeAudio
from
'../../components/chengpeng-audio/free-audio.vue'
...
...
@@ -102,14 +103,18 @@
})
},
methods
:
{
getDetailData
(
id
){
async
getDetailData
(
id
){
let
that
=
this
orderDetailMsg
({
id
:
id
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
'详情'
)
if
(
res
.
code
==
200
){
that
.
orderDetail
=
res
.
data
}
})
const
data_back
=
await
orderDetailMsgNew
({
id
:
id
})
console
.
log
(
data_back
,
'返沪'
)
const
{
code
,
data
}
=
data_back
that
.
orderDetail
=
data
// orderDetailMsgNew({id:id}).then(res=>{
// console.log(res.data,'详情')
// if(res.code == 200){
// that.orderDetail = res.data
// }
// })
},
// 播放
doPlay
()
{
...
...
my/coupon/index.vue
View file @
76b833dc
...
...
@@ -2,10 +2,10 @@
<view
class=
"index"
>
<com-navbar
:title=
"title"
:titleStyle=
"
{ color: '#000000', fontSize: '32rpx' }" />
<view
class=
"index-content"
>
<view
class=
"index-content-item"
>
<view
class=
"index-content-item"
v-for=
"(item,index) in useCouponList"
>
<view
class=
"index-content-item-nav baiyin-flex baiyin-flex-c-b"
>
<text></text>
<view>
可用优惠券
(2)
</view>
<view>
可用优惠券
{{
cantotal
}}
</view>
</view>
<view
class=
"index-content-item-qu"
@
click=
"optionData.type === 'pay'?jump():null"
>
<image
class=
"index-content-item-qu-bg"
src=
"@/static/icon/xy01.png"
mode=
""
></image>
...
...
@@ -14,15 +14,15 @@
<view
class=
"index-content-item-qu-bl-lk"
>
<view
class=
"index-content-item-qu-bl-lk-t"
>
<text>
¥
</text>
<text>
200
</text>
<text>
{{
item
.
fullSubtraction
}}
</text>
优惠券
</view>
<view
class=
"index-content-item-qu-bl-lk-b"
>
有效期:
2022.3.1-2022.12.31
</view>
<view
class=
"index-content-item-qu-bl-lk-b"
>
有效期:
{{
item
.
effectiveTime
|
formatDate
}}
-
{{
item
.
failureTime
|
formatDate
}}
</view>
</view>
<template
v-if=
"optionData.type === 'pay'"
>
<view
class=
"index-content-item-qu-bl-rk"
>
<view
class=
"index-content-item-qu-bl-rk-a"
>
订单金额满
</view>
<view
class=
"index-content-item-qu-bl-rk-b"
>
9999
元
</view>
<view
class=
"index-content-item-qu-bl-rk-b"
>
{{
item
.
minUsed
}}
元
</view>
<view
class=
"index-content-item-qu-bl-rk-c"
>
可使用
</view>
<view
class=
"index-content-item-qu-bl-rk-d"
>
当前可使用
</view>
</view>
...
...
@@ -30,7 +30,7 @@
<
template
v-if=
"optionData.type === 'coupon'"
>
<view
class=
"index-content-item-qu-bl-rk"
>
<view
class=
"index-content-item-qu-bl-rk-a index-content-item-qu-bl-rk-axl"
>
订单金额满
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bxl"
>
9999
元
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bxl"
>
{{
item
.
minUsed
}}
元
</view>
<view
class=
"index-content-item-qu-bl-rk-c index-content-item-qu-bl-rk-cxl"
>
可使用
</view>
<view
class=
"index-content-item-qu-bl-rk-d index-content-item-qu-bl-rk-dxl"
>
去使用
</view>
</view>
...
...
@@ -43,22 +43,22 @@
<text></text>
<view>
不可用优惠券(2)
</view>
</view>
<view
class=
"index-content-item-qu"
>
<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>
<view
class=
"index-content-item-qu-bl"
>
<text
class=
"index-content-item-qu-bl-tl index-content-item-qu-bl-tlx"
>
满减优惠券
</text>
<view
class=
"index-content-item-qu-bl-lk"
>
<view
class=
"index-content-item-qu-bl-lk-t index-content-item-qu-bl-lk-tx"
>
<text>
¥
</text>
<text>
200
</text>
<text>
{{info.fullSubtraction}}
</text>
优惠券
</view>
<view
class=
"index-content-item-qu-bl-lk-b index-content-item-qu-bl-lk-bx"
>
有效期:
2022.3.1-2022.12.31
</view>
有效期:
{{info.effectiveTime | formatDate}}-{{info.failureTime | formatDate}}
</view>
</view>
<view
class=
"index-content-item-qu-bl-rk"
>
<view
class=
"index-content-item-qu-bl-rk-a index-content-item-qu-bl-rk-ax"
>
订单金额满
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bx"
>
200
元
</view>
<view
class=
"index-content-item-qu-bl-rk-b index-content-item-qu-bl-rk-bx"
>
{{info.minUsed}}
元
</view>
<view
class=
"index-content-item-qu-bl-rk-c index-content-item-qu-bl-rk-cx"
>
可使用
</view>
<view
class=
"index-content-item-qu-bl-rk-d index-content-item-qu-bl-rk-dx"
>
不可用
</view>
</view>
...
...
@@ -70,13 +70,29 @@
</template>
<
script
>
import
{
couponListGet
}
from
'../../api/my/index.js'
import
{
couponListGet
,
userCouponList
,
userCouponListLose
}
from
'../../api/my/index.js'
export
default
{
data
()
{
return
{
scrollTopHeader
:
0
,
optionData
:
{},
title
:
''
title
:
''
,
queryParams
:{
pageNum
:
1
,
pageSize
:
10
,
deleteStatus
:
0
,
useStatus
:
0
},
//优惠券有效参数
useCouponList
:[],
//可使用的优惠券列表
cantotal
:
0
,
loseParams
:{
pageNum
:
1
,
pageSize
:
10
,
deleteStatus
:
1
,
useStatus
:
1
},
couponLoseList
:[],
loseTotal
:
0
};
},
onLoad
(
option
)
{
...
...
@@ -84,14 +100,35 @@
self
.
optionData
=
option
;
console
.
log
(
option
)
self
.
initial
();
self
.
getCoupon
()
self
.
getCoupon
()
self
.
getLoseCoupon
()
},
methods
:
{
getCoupon
(){
couponListGet
().
then
(
res
=>
{
console
.
log
(
'优惠券'
,
res
)
})
},
async
getCoupon
(){
let
that
=
this
const
back_data
=
await
userCouponList
(
that
.
queryParams
)
console
.
log
(
back_data
,
'优惠券'
)
const
{
code
,
rows
,
total
}
=
back_data
that
.
cantotal
=
total
if
(
total
>
0
){
that
.
useCouponList
=
rows
}
},
async
getLoseCoupon
()
{
let
that
=
this
const
back_data
=
await
userCouponListLose
(
that
.
loseParams
)
console
.
log
(
back_data
,
'失效优惠券'
)
const
{
code
,
rows
,
total
}
=
back_data
that
.
loseTotal
=
total
if
(
total
>
0
)
{
that
.
couponLoseList
=
rows
}
},
initial
()
{
let
self
=
this
;
switch
(
self
.
optionData
.
type
)
{
...
...
my/login/login.vue
View file @
76b833dc
...
...
@@ -14,11 +14,15 @@
</
template
>
<
script
>
import
{
login
}
from
'@/api/user.js'
export
default
{
data
()
{
return
{
height
:
0
height
:
0
,
loginParams
:{
xcxCode
:
''
}
}
},
onLoad
()
{
...
...
@@ -29,7 +33,7 @@
that
.
height
=
res
.
windowHeight
}
})
//
this.getUserInfo()
this
.
getUserInfo
()
},
methods
:
{
// 1.调用微信自带登录方法获取code
...
...
@@ -37,29 +41,27 @@
let
that
=
this
uni
.
login
({
success
(
res
)
{
that
.
loginParams
.
code
=
res
.
code
that
.
getSessionkeyAndOpenId
()
}
})
uni
.
getUserInfo
({
success
(
info
)
{
that
.
signature
=
info
.
signature
that
.
rawData
=
info
.
rawData
console
.
log
(
res
,
'获取code'
)
that
.
getSessionkeyAndOpenId
(
res
.
code
)
}
})
},
// 2.获取sessionKey,openId
async
getSessionkeyAndOpenId
()
{
const
res
=
await
this
.
$myRequest
({
url
:
`/xcxLogin?appid=
${
this
.
loginParams
.
appid
}
&code=
${
this
.
loginParams
.
code
}
`
,
})
if
(
res
.
data
.
code
==
200
){
let
dataObj
=
JSON
.
parse
(
res
.
data
.
data
)
this
.
sessionKey
=
dataObj
.
sessionKey
this
.
openid
=
dataObj
.
openid
}
async
getSessionkeyAndOpenId
(
code
)
{
const
back_data
=
await
login
({
xcxCode
:
code
})
console
.
log
(
back_data
,
'静默登录'
)
},
// async getSessionkeyAndOpenId() {
// const res = await this.$myRequest({
// url:`/xcxLogin?appid=${this.loginParams.appid}&code=${this.loginParams.code}`,
// })
// if(res.data.code == 200){
// let dataObj = JSON.parse(res.data.data)
// this.sessionKey = dataObj.sessionKey
// this.openid = dataObj.openid
// }
// },
// 3.授权手机号登录拿到encryptedData和iv
getPhoneNumber
(
e
)
{
// 同意登录
...
...
pages/demand/components/index.vue
View file @
76b833dc
...
...
@@ -20,7 +20,7 @@
<!-- // 已发布 -->
<view
class=
"buttoncolor"
v-if=
"subscript == '0'"
>
<button
class=
"buttoncl"
@
click
.
stop=
"handleAgainAdd(item)"
>
修改
</button>
<button
class=
"buttonclde"
@
click
.
stop=
"abolish(1)"
>
取消订单
</button>
<button
class=
"buttonclde"
@
click
.
stop=
"abolish(1
,item
)"
>
取消订单
</button>
</view>
<!-- // 已驳回 -->
<view
class=
"d-flex a-end j-sb"
v-if=
"subscript == '1'"
>
...
...
@@ -81,7 +81,8 @@
globalData
:
getApp
().
globalData
,
show
:
false
,
title
:
'确认取消订单吗'
,
titbut
:
'取消订单'
titbut
:
'取消订单'
,
currentId
:
''
,
//当前的id
}
},
...
...
@@ -119,7 +120,9 @@
});
},
// 取消订单1 立即退款2
abolish
(
val
)
{
abolish
(
val
,
data
)
{
console
.
log
(
data
.
id
,
'数控'
)
this
.
currentId
=
data
.
id
if
(
val
==
1
)
{
this
.
title
=
'确认取消订单吗'
this
.
titbut
=
'1'
...
...
@@ -151,7 +154,7 @@
},
// 取消订单2 立即退款3
aindexst
(
val
)
{
// console.log(val
)
this
.
$emit
(
'getVal'
,
val
,
this
.
currentId
)
this
.
show
=
false
}
}
...
...
pages/demand/index.vue
View file @
76b833dc
<
template
>
<view
class=
"content"
>
<com-navbar
:leftIcon=
"false"
bgColor=
"#fff"
title=
"需求"
:titleStyle=
"
{ color: '#000000', fontSize: '34rpx' }" />
<view
></view>
<view
class=
"content-tabs"
:style=
"
{ top: `calc(${globalData.statusBarHeight}rpx + 122rpx)` }">
<view
class=
"content-tabs-text"
v-for=
"(v,index) in list"
@
click=
"jump(index)"
:key=
"index"
>
<view
class=
""
:style=
"subscript == index?'color: #000000;' : 'color: #444444;'"
>
{{
v
.
name
}}
</view>
<view
v-show=
"subscript == index"
class=
"content-tabs-text-area"
></view>
</view>
</view>
<template
v-if=
"statusNeedList && statusNeedList.length"
>
<comindex
:list=
"statusNeedList"
class=
"content-mindex"
:subscript=
'subscript'
></comindex>
</
template
>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无数据
</view>
</view>
<com-tabbar
:list=
" [{
name: '首页',
icon: '/static/tabbar/tb1.png',
selectIcon:'/static/tabbar/td1.png',
url: '/pages/home/index',
type: 'type'
}, {
name: '我的需求',
icon: '/static/tabbar/tb2.png',
selectIcon: '/static/tabbar/td2.png',
url: '/pages/demand/index',
type: 'demand'
}, {
name: '发布',
icon: '/static/tabbar/fb.png',
selectIcon:'/static/tabbar/fb.png',
url: '/pages/release/index',
type: 'type'
}, {
name: '动态',
icon: '/static/tabbar/tb3.png',
selectIcon: '/static/tabbar/td3.png',
url: '/pages/order/index',
type: 'type'
}, {
name:'我的' ,
icon:'/static/tabbar/tb4.png' ,
selectIcon:'/static/tabbar/td4.png',
url: '/pages/my/index',
type: 'type'
}]"
></com-tabbar>
</view>
</template>
<
template
>
<view
class=
"content"
>
<com-navbar
:leftIcon=
"false"
bgColor=
"#fff"
title=
"需求"
:titleStyle=
"
{ color: '#000000', fontSize: '34rpx' }" />
<view
></view>
<view
class=
"content-tabs"
:style=
"
{ top: `calc(${globalData.statusBarHeight}rpx + 122rpx)` }">
<view
class=
"content-tabs-text"
v-for=
"(v,index) in list"
@
click=
"jump(index)"
:key=
"index"
>
<view
class=
""
:style=
"subscript == index?'color: #000000;' : 'color: #444444;'"
>
{{
v
.
name
}}
</view>
<view
v-show=
"subscript == index"
class=
"content-tabs-text-area"
></view>
</view>
</view>
<template
v-if=
"statusNeedList && statusNeedList.length"
>
<comindex
:list=
"statusNeedList"
class=
"content-mindex"
:subscript=
'subscript'
@
getVal=
"handleStatus"
></comindex>
</
template
>
<view
v-else
class=
"diagram"
>
<image
src=
"@/static/icon/qst.png"
mode=
""
></image>
<view
class=
""
>
暂无数据
</view>
</view>
<com-tabbar
:list=
" [{
name: '首页',
icon: '/static/tabbar/tb1.png',
selectIcon:'/static/tabbar/td1.png',
url: '/pages/home/index',
type: 'type'
}, {
name: '我的需求',
icon: '/static/tabbar/tb2.png',
selectIcon: '/static/tabbar/td2.png',
url: '/pages/demand/index',
type: 'demand'
}, {
name: '发布',
icon: '/static/tabbar/fb.png',
selectIcon:'/static/tabbar/fb.png',
url: '/pages/release/index',
type: 'type'
}, {
name: '动态',
icon: '/static/tabbar/tb3.png',
selectIcon: '/static/tabbar/td3.png',
url: '/pages/order/index',
type: 'type'
}, {
name:'我的' ,
icon:'/static/tabbar/tb4.png' ,
selectIcon:'/static/tabbar/td4.png',
url: '/pages/my/index',
type: 'type'
}]"
></com-tabbar>
</view>
</template>
<
script
>
import
{
myNeedList
}
from
'../../api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
import
uniGo
from
'@/utils/unIGO.js'
;
import
comindex
from
'@/pages/demand/components/index.vue'
export
default
{
data
()
{
return
{
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
title
:
'Hello'
,
arr
:[],
list
:
[{
name
:
'已发布'
},
{
name
:
'已驳回'
},
{
name
:
'待支付'
},
{
name
:
'已接单'
}],
subscript
:
'0'
,
needInfo
:{
pageSize
:
1
,
pageNum
:
10
,
status
:
0
import
{
myNeedList
,
removeOrderFunction
}
from
'../../api/system/index.js'
import
apiBaseConfig
from
'@/config/index.js'
;
import
uniGo
from
'@/utils/unIGO.js'
;
import
comindex
from
'@/pages/demand/components/index.vue'
export
default
{
data
()
{
return
{
imgBgUrl
:
apiBaseConfig
.
imgBgUrl
,
globalData
:
getApp
().
globalData
,
title
:
'Hello'
,
arr
:
[],
list
:
[{
name
:
'已发布'
},
{
name
:
'已驳回'
},
{
name
:
'待支付'
},
{
name
:
'已接单'
}],
subscript
:
'0'
,
//状态
needInfo
:
{
pageSize
:
1
,
pageNum
:
10
,
status
:
0
,
deleteStatus
:
0
},
statusNeedList
:[]
}
},
components
:
{
comindex
},
onLoad
(
option
)
{
// console.log(option, 'pppppp')
if
(
option
.
id
){
this
.
subscript
=
option
.
id
statusNeedList
:
[]
}
this
.
getMyNeedList
()
},
},
components
:
{
comindex
},
onLoad
(
option
)
{
// console.log(option, 'pppppp')
if
(
option
.
id
)
{
this
.
subscript
=
option
.
id
}
this
.
getMyNeedList
()
},
methods
:
{
getMyNeedList
(){
getMyNeedList
()
{
let
that
=
this
that
.
needInfo
.
status
=
that
.
subscript
myNeedList
(
that
.
needInfo
).
then
(
res
=>
{
console
.
log
(
res
,
'我的需求'
)
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
myNeedList
(
that
.
needInfo
).
then
(
res
=>
{
console
.
log
(
res
,
'我的需求'
)
if
(
res
.
code
==
200
)
{
if
(
res
.
total
>
0
)
{
that
.
statusNeedList
=
res
.
rows
}
else
{
}
else
{
that
.
statusNeedList
=
[]
}
}
})
},
},
jump
(
ind
)
{
let
that
=
this
let
that
=
this
this
.
subscript
=
ind
that
.
getMyNeedList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
&-tabs
{
display
:
flex
;
justify-content
:
space-around
;
width
:
100%
;
position
:
fixed
;
padding-top
:
20
rpx
;
padding-bottom
:
20
rpx
;
top
:
-1
rpx
;
z-index
:
999
;
background-color
:
#f3f4f6
;
&-text
{
>
view
:
nth-child
(
1
)
{
font-size
:
24
rpx
;
}
&
-area
{
width
:
75
rpx
;
height
:
6
rpx
;
background
:
#2C66FF
;
}
}
}
&
-mindex
{
margin-top
:
60
rpx
;
width
:
100%
;
margin-bottom
:
150
rpx
;
}
}
.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
;
}
}
that
.
getMyNeedList
()
},
// 取消订单接口
async
handleCancle
(
id
){
let
that
=
this
const
back_data
=
await
removeOrderFunction
({
id
:
id
})
console
.
log
(
back_data
,
'取消'
)
const
{
code
}
=
back_data
if
(
code
==
200
){
uni
.
showToast
({
title
:
'取消成功!'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
setTimeout
(()
=>
{
that
.
getMyNeedList
()
},
1000
)
}
})
}
},
// 取消订单2 立即退款3
handleStatus
(
val
,
id
){
console
.
log
(
val
,
id
,
'装订好'
)
let
that
=
this
if
(
val
==
2
){
that
.
handleCancle
(
id
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
&-tabs
{
display
:
flex
;
justify-content
:
space-around
;
width
:
100%
;
position
:
fixed
;
padding-top
:
20
rpx
;
padding-bottom
:
20
rpx
;
top
:
-1
rpx
;
z-index
:
999
;
background-color
:
#f3f4f6
;
&-text
{
>
view
:
nth-child
(
1
)
{
font-size
:
24
rpx
;
}
&
-area
{
width
:
75
rpx
;
height
:
6
rpx
;
background
:
#2C66FF
;
}
}
}
&
-mindex
{
margin-top
:
60
rpx
;
width
:
100%
;
margin-bottom
:
150
rpx
;
}
}
.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
>
pages/home/index.vue
View file @
76b833dc
...
...
@@ -39,7 +39,7 @@
暂无数据
</view>
</view>
<u-loadmore
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
<u-loadmore
v-if=
"userNeedList && userNeedList.length"
iconSize=
"50px"
@
loadmore=
"loadMore"
color=
"#6A6C6F"
fontSize=
"24rpx"
:nomore-text=
"nomoreText"
:loading-text=
"loadingText"
line
:status=
"loadStatus"
/>
</view>
<com-navbar
:leftIcon=
"false"
:homeShow=
"false"
bgColor=
"transparent"
title=
"首页"
:titleStyle=
"
{ color: '#FFFFFF', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
...
...
store/modules/login.js
View file @
76b833dc
...
...
@@ -84,7 +84,8 @@ export default {
})
}
},
actions
:
{
actions
:
{
async
phoneLogin
({
commit
},
userInfo
)
{
...
...
@@ -172,29 +173,6 @@ export default {
}
}
commit
(
'upDateLoginUserMount'
,
obj
.
userInfo
)
// login(params).then(back => {
// const {
// data: dataFrom
// } = back
// // headOrNot 1团长 2消费
// const {
// headOrNot
// } = dataFrom
// let role;
// headOrNot == 1 ? role = 'head' : role = 'consumer'
// let objForm = {
// token: dataFrom.token,
// userInfo: dataFrom,
// role,
// }
// commit("login", objForm);
// })
// console.log({
// code: rev.code,
// encryptedData: obj.encryptedData,
// iv: obj.iv,
// })
// return
dealerPhoneLogin
({
code
:
rev
.
code
,
encryptedData
:
obj
.
encryptedData
,
...
...
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