Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
767e997a
authored
May 23, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
css
parent
05b68135
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
427 additions
and
96 deletions
assets/css/mine/activity.scss
assets/css/mine/company.scss
assets/css/mine/shoporder.scss
assets/css/mine/user.scss
pages/mine/activity.vue
pages/mine/company.vue
pages/mine/coupon.vue
pages/mine/forget.vue
pages/mine/inquery.vue
pages/mine/invoice.vue
pages/mine/setting.vue
pages/mine/user.vue
router/index.js
assets/css/mine/activity.scss
View file @
767e997a
...
...
@@ -54,6 +54,7 @@
text-overflow
:
ellipsis
;
overflow
:
hidden
;
margin-bottom
:
16rpx
;
width
:
95%
;
}
.p2
{
font-size
:
22rpx
;
...
...
@@ -85,6 +86,7 @@
margin-left
:
10rpx
;
font-size
:
60rpx
;
color
:
#ffffff
;
font-family
:
Impact
;
}
}
.p2
{
...
...
@@ -117,15 +119,23 @@
color
:
#1969f9
;
}
}
.type
-1
{
.type
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
82rpx
;
height
:
68rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202305/
19/f8fb5d9934fd1227ba807378939a5565
.png')
no-repeat
center
;
background
:
url('https://img.ichunt.com/images/ichunt/202305/
22/0aaf37437c984408376b330da3dbf323
.png')
no-repeat
center
;
background-size
:
cover
;
z-index
:
99
;
.tt
{
margin-left
:
22rpx
;
margin-top
:
6rpx
;
text-align
:
center
;
transform
:
rotate
(
45deg
);
color
:
#fff
;
font-size
:
22rpx
;
}
}
&
.disabled
{
.left
{
...
...
@@ -136,3 +146,15 @@
}
}
}
.no-data
{
image
{
width
:
356rpx
;
height
:
356rpx
;
}
.tt
{
margin-top
:
32rpx
;
font-size
:
28rpx
;
color
:
#292b33
;
}
}
assets/css/mine/company.scss
View file @
767e997a
...
...
@@ -173,6 +173,10 @@
height
:
32rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202305/19/53c6f67275c83a0f9ccaa565c018cfcd.png')
no-repeat
center
;
background-size
:
cover
;
&
.active
{
background
:
url('https://img.ichunt.com/images/ichunt/202305/19/e6d61a2c75f0185a207904679ec70273.png')
no-repeat
center
;
background-size
:
cover
;
}
}
.tt
{
max-width
:
80%
;
...
...
assets/css/mine/shoporder.scss
View file @
767e997a
...
...
@@ -161,7 +161,6 @@
margin-right
:
0
;
}
}
.btn0
{
background
:
#f98119
;
border-radius
:
6rpx
;
...
...
assets/css/mine/user.scss
View file @
767e997a
...
...
@@ -151,24 +151,59 @@
font-weight
:
bold
;
}
.right-bar
{
.btn
1
{
width
:
1
42
rpx
;
.btn
{
width
:
1
20
rpx
;
height
:
48rpx
;
margin-right
:
24rpx
;
&
:last-child
{
margin-right
:
0
;
}
}
.btn0
{
background
:
#f98119
;
border-radius
:
6rpx
;
font-size
:
22rpx
;
color
:
#fff
;
}
.btn1
{
border-radius
:
6rpx
;
border
:
1px
solid
#1969f9
;
font-size
:
22rpx
;
color
:
#1969f9
;
}
.btn2
{
border-radius
:
6rpx
;
border
:
1px
solid
#1969f9
;
font-size
:
22rpx
;
color
:
#1969f9
;
}
.btn3
{
background
:
#ffffff
;
border-radius
:
6rpx
;
opacity
:
0
.54
;
border
:
1px
solid
#c6c7cc
;
margin-right
:
24rpx
;
font-size
:
22rpx
;
color
:
#484b59
;
}
.btn2
{
width
:
142rpx
;
height
:
48rpx
;
background
:
#f98119
;
.btn4
{
background
:
#1969f9
;
border-radius
:
6rpx
;
font-size
:
22rpx
;
color
:
#ffffff
;
color
:
#fff
;
}
.btn5
{
background
:
#ffffff
;
border-radius
:
6rpx
;
opacity
:
0
.54
;
border
:
1px
solid
#c6c7cc
;
font-size
:
22rpx
;
color
:
#484b59
;
}
.btn6
{
background
:
#1969f9
;
border-radius
:
6rpx
;
font-size
:
22rpx
;
color
:
#fff
;
}
}
}
...
...
pages/mine/activity.vue
View file @
767e997a
...
...
@@ -4,36 +4,65 @@
<view
class=
"tab row verCenter avarage"
>
<view
class=
"box row verCenter"
@
click=
"tab(index)"
v-for=
"(item, index) in text_arr"
:key=
"index"
:class=
"
{ curr: index == curr }">
{{
item
}}
</view>
</view>
<view
class=
"list"
v-if=
"curr == 0"
>
<view
class=
"box"
v-for=
"(item, index) in 10"
:key=
"index"
>
<view
class=
"pic"
><image
mode=
"aspectFill"
src=
"https://img.ichunt.com/images/ichunt/202305/20/ffa1060a38803d5b436b33259fe142d0.jpg"
></image></view>
<!-- 活动中心 -->
<template
v-if=
"curr == 0"
>
<view
class=
"list"
v-if=
"activity_list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in activity_list"
:key=
"index"
>
<view
class=
"pic"
><image
mode=
"aspectFill"
:src=
"item.image_h5"
></image></view>
<view
class=
"text"
>
<view
class=
"p1"
>
新人注册享288大礼包,首单再送200元京东卡
</view>
<view
class=
"p2"
>
2023-03-16 18:23:17
</view>
<view
class=
"p1"
>
{{
item
.
web_description
}}
</view>
<view
class=
"p2"
>
{{
item
.
create_time
}}
</view>
</view>
</view>
</view>
<view
class=
"coupon-list"
v-else-if=
"curr == 1"
>
<view
class=
"box row verCenter"
v-for=
"(item, index) in 100"
:key=
"index"
>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无活动
</text>
</view>
</
template
>
<!-- 领券中心 -->
<
template
v-else-if=
"curr == 1"
>
<view
class=
"coupon-list"
v-if=
"coupon_list.length > 0"
>
<view
class=
"box row verCenter"
v-for=
"(item, index) in coupon_list"
:key=
"item.coupon_id"
>
<view
class=
"left column rowCenter verCenter"
>
<view
class=
"p1"
>
<template
v-if=
"item.coupon_type == 1"
>
<text
class=
"t1"
>
¥
</text>
<text
class=
"t2"
>
10
</text>
<text
class=
"t2"
>
{{
Number
(
item
.
sale_amount
).
toFixed
(
2
)
}}
</text>
</
template
>
<
template
v-else-if=
"item.coupon_type == 2"
>
<text
class=
"t2"
>
{{
(
Number
(
item
.
sale_amount
)
*
10
).
toFixed
(
2
)
}}
</text>
<text
class=
"t1"
>
折
</text>
</
template
>
</view>
<view
class=
"p2"
>
满¥200可用
</view>
<view
class=
"p2"
>
{{ item.require_desc }}
</view>
</view>
<view
class=
"right"
>
<view
class=
"p1"
>
<
template
v-if=
"item.coupon_goods_range == 1"
>
<text
class=
"t1"
>
适用于
</text>
<text
class=
"t2"
>
全站
</text>
<text
class=
"t2"
>
{{
item
.
coupon_mall_type
==
1
?
'全站'
:
item
.
coupon_mall_type
==
2
?
'全部自营'
:
'全部联营'
}}
</text>
<text
class=
"t1"
>
商品
</text>
</
template
>
<
template
v-else
>
<text
class=
"t1"
>
适用于
</text>
<text
class=
"t2"
>
{{
item
.
selected_supplier
?
'供应商'
+
item
.
selected_supplier
:
''
}}{{
item
.
selected_brand
?
'制造商'
+
item
.
selected_brand
:
''
}}
</text>
<text
class=
"t1"
>
所有商品
</text>
</
template
>
</view>
<view
class=
"p2"
>
{{ item.start_time }} - {{ item.end_time }}
</view>
<navigator
class=
"p3 row rowCenter verCenter"
v-if=
"item.status == -1"
url=
"/"
hover-class=
"none"
>
立即使用
</navigator>
</view>
<view
class=
"
p2"
>
2023.02.27-2023.04.01
</view
>
<view
class=
"p3 row rowCenter verCenter"
>
立即领取
</view>
<view
class=
"
type"
>
<view
class=
"tt"
>
{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '自营' : '联营' }}
</view>
</view>
<text
class=
"type-1"
></text>
</view>
</view>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无优惠券
</text>
</view>
</template>
</view>
</template>
...
...
@@ -48,13 +77,34 @@ export default {
data
()
{
return
{
curr
:
0
,
text_arr
:
[
'活动中心'
,
'领券中心'
]
text_arr
:
[
'活动中心'
,
'领券中心'
],
activity_list
:
[],
coupon_list
:
[]
};
},
onShow
()
{},
onShow
()
{
this
.
getData
();
},
methods
:
{
tab
(
index
)
{
this
.
curr
=
index
;
this
.
getData
();
},
getData
()
{
this
.
request
(
Api_Url
+
'/Activity/Cube/getActivityCenterData'
,
'GET'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
this
.
curr
==
0
)
{
this
.
activity_list
=
res
.
data
.
activity_list
;
}
if
(
this
.
curr
==
1
)
{
this
.
coupon_list
=
res
.
data
.
coupon_list
;
}
}
else
if
(
res
.
err_code
===
11012
)
{
uni
.
navigateTo
({
url
:
'/login'
});
}
});
}
}
};
...
...
pages/mine/company.vue
View file @
767e997a
...
...
@@ -114,6 +114,7 @@ export default {
brandList
:
[],
brand_name
:
''
,
brand_text
:
''
,
brand_id
:
[],
filter_list
:
[],
//筛选已选中的列表
filter_id
:
[],
//过滤处理的idsss
formParams
:
{
...
...
@@ -140,8 +141,11 @@ export default {
* @param {Object} event
*/
handleInput
:
debounce
(
function
(
event
)
{
this
.
getBrandList
();
},
800
),
if
(
this
.
brand_name
)
{
this
.
filter_id
=
[];
}
this
.
getBrandList
(
true
);
},
500
),
/**
* @param {Object} arr
* @param {Object} target
...
...
@@ -173,11 +177,23 @@ export default {
/**
* 获取品牌
*/
getBrandList
()
{
getBrandList
(
type
)
{
this
.
request
(
Api_Url
+
'/public/getBrandList'
,
'POST'
,
{
brand_name
:
this
.
brand_name
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
brandList
=
res
.
data
;
this
.
filter_list
=
createArray
(
res
.
data
.
length
,
false
);
if
(
!
type
)
{
this
.
filter_id
=
this
.
brand_id
;
}
var
id
=
this
.
brand_id
;
var
result
=
[];
this
.
brandList
.
forEach
(
function
(
item
,
index
)
{
if
(
id
.
indexOf
(
item
.
brand_id
)
!==
-
1
)
{
result
.
push
(
index
);
}
});
result
.
forEach
(
i
=>
(
this
.
filter_list
[
i
]
=
true
));
}
});
},
...
...
@@ -201,7 +217,12 @@ export default {
var
brand_name
=
res
.
data
.
company_info
.
brand_list
.
map
(
function
(
brand
)
{
return
brand
.
brand_name
;
});
var
brand_id
=
res
.
data
.
company_info
.
brand_list
.
map
(
function
(
brand
)
{
return
brand
.
brand_id
;
});
this
.
brand_text
=
brand_name
.
join
(
','
);
this
.
brand_id
=
brand_id
;
}
else
{
this
.
brand_text
=
''
;
}
...
...
pages/mine/coupon.vue
View file @
767e997a
...
...
@@ -17,10 +17,10 @@
<view
class=
"p1"
>
<
template
v-if=
"item.coupon_type == 1"
>
<text
class=
"t1"
>
¥
</text>
<text
class=
"t2"
>
{{
item
.
sale_amount
.
toFixed
(
2
)
}}
</text>
<text
class=
"t2"
>
{{
Number
(
item
.
sale_amount
)
.
toFixed
(
2
)
}}
</text>
</
template
>
<
template
v-else-if=
"item.coupon_type == 2"
>
<text
class=
"t2"
>
{{
(
item
.
sale_amount
*
10
).
toFixed
(
2
)
}}
</text>
<text
class=
"t2"
>
{{
(
Number
(
item
.
sale_amount
)
*
10
).
toFixed
(
2
)
}}
</text>
<text
class=
"t1"
>
折
</text>
</
template
>
</view>
...
...
pages/mine/forget.vue
View file @
767e997a
...
...
@@ -88,7 +88,9 @@ export default {
}
};
},
onLoad
()
{},
onLoad
(
options
)
{
this
.
formParams
.
account
=
options
.
account
;
},
methods
:
{
bindPickerChange
:
function
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
);
...
...
pages/mine/inquery.vue
View file @
767e997a
...
...
@@ -15,7 +15,10 @@
<view
class=
"box column"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"row bothSide verCenter"
>
<view
class=
"p1"
>
{{ item.model }}
</view>
<view
class=
"p2"
>
{{ item.status_name }}
</view>
<!-- 已答复 -->
<view
class=
"p2"
v-if=
"item.status == 1"
style=
"color:#919399;"
>
{{ item.status_name }}
</view>
<!-- 待处理 -->
<view
class=
"p2"
v-else
>
{{ item.status_name }}
</view>
</view>
<text
class=
"time"
>
询价时间:{{ item.create_time }}
</text>
</view>
...
...
@@ -38,7 +41,7 @@ export default {
data
()
{
return
{
curr
:
0
,
text_arr
:
[
'全部'
,
'待处理'
,
'已答复'
],
text_arr
:
[],
list
:
[],
count
:
[],
searchParams
:
{
...
...
@@ -70,6 +73,7 @@ export default {
this
.
count
[
0
]
=
res
.
data
[
-
1
];
this
.
count
[
1
]
=
res
.
data
[
1
];
this
.
count
[
2
]
=
res
.
data
[
-
2
];
this
.
text_arr
=
[
'全部'
,
'待处理'
,
'已答复'
];
}
});
this
.
request
(
Api_Url
+
'/help/help/feedback_list'
,
'POST'
,
this
.
searchParams
,
true
,
true
).
then
(
res
=>
{
...
...
pages/mine/invoice.vue
View file @
767e997a
...
...
@@ -4,22 +4,23 @@
<view
class=
"tip row verCenter"
>
<text
class=
"iconfont icon-ts"
></text>
<text
class=
"t1"
>
已创建
</text>
<text
class=
"t2"
>
2
</text>
<text
class=
"t2"
>
{{
list
.
length
}}
</text>
<text
class=
"t1"
>
个发票信息,最多
</text>
<text
class=
"t2"
>
20
</text>
<text
class=
"t1"
>
个有效发票信息
</text>
</view>
<view
class=
"list"
>
<view
class=
"box"
>
<view
class=
"list"
v-if=
"list.length > 0"
>
<view
class=
"box"
v-for=
"(item, index) in list"
:key=
"index"
>
<view
class=
"p1 row verCenter"
>
<text
class=
"t1"
>
深圳市猎芯科技有限公司
</text>
<text
class=
"label row rowCenter verCenter"
>
专票
</text>
<text
class=
"t1"
>
{{
item
.
tax_title
}}
</text>
<text
class=
"label row rowCenter verCenter"
v-if=
"item.inv_type == 3"
>
专用
</text>
<text
class=
"label row rowCenter verCenter"
v-else
>
普通
</text>
</view>
<view
class=
"p2 row verCenter"
>
<text
class=
"t1"
>
蔡先生
</text>
<text
class=
"t2"
>
13800138000
</text>
<text
class=
"t1"
>
{{
item
.
consignee
}}
</text>
<text
class=
"t2"
>
{{
item
.
consignee_phone
}}
</text>
</view>
<view
class=
"p3"
>
广东省深圳市龙岗区坂田清丽路1号宝能科技园南区12栋11楼
</view>
<view
class=
"p3"
>
{{
item
.
consignee_province_val
}}{{
item
.
consignee_city_val
}}{{
item
.
consignee_district_val
}}{{
item
.
consignee_address
}}
</view>
<view
class=
"operate row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<view
class=
"default"
></view>
...
...
@@ -37,35 +38,8 @@
</view>
</view>
</view>
<view
class=
"box"
>
<view
class=
"p1 row verCenter"
>
<text
class=
"t1"
>
深圳市猎芯科技有限公司
</text>
<text
class=
"label-t row rowCenter verCenter"
>
普票
</text>
</view>
<view
class=
"p2 row verCenter"
>
<text
class=
"t1"
>
蔡先生
</text>
<text
class=
"t2"
>
13800138000
</text>
</view>
<view
class=
"p3"
>
广东省深圳市龙岗区坂田清丽路1号宝能科技园南区12栋11楼
</view>
<view
class=
"operate row bothSide verCenter default-curr"
>
<view
class=
"row verCenter"
>
<view
class=
"default"
></view>
<text
class=
"default-text"
>
默认发票
</text>
</view>
<view
class=
"row verCenter"
>
<navigator
class=
"edit row verCenter"
url=
"/user/invoiceEdit"
hover-class=
"none"
>
<text
class=
"iconfont icon-bjt"
></text>
<text
class=
"tt"
>
编辑
</text>
</navigator>
<view
class=
"delete row verCenter"
>
<text
class=
"iconfont icon-del"
></text>
<text
class=
"tt"
>
删除
</text>
</view>
</view>
</view>
</view>
</view>
<view
class=
"no-data column rowCenter verCenter"
>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无发票信息
</text>
</view>
...
...
@@ -87,10 +61,26 @@ export default {
navElement
},
data
()
{
return
{};
return
{
list
:
[]
};
},
onShow
()
{
this
.
getData
();
},
onLoad
()
{},
methods
:
{}
methods
:
{
getData
()
{
this
.
request
(
Api_Url
+
'/invoice/lists'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
list
=
res
.
data
.
list
;
}
else
if
(
res
.
err_code
==
11012
)
{
uni
.
navigateTo
({
url
:
'/login?referer=/user/reciveaddress'
});
}
});
}
}
};
</
script
>
...
...
pages/mine/setting.vue
View file @
767e997a
...
...
@@ -2,7 +2,7 @@
<view
class=
"page-setting"
>
<navElement
title=
"账户设置"
></navElement>
<view
class=
"list"
v-if=
"userInfo.user_info"
>
<navigator
class=
"box row bothSide verCenter"
url=
"/forget
"
hover-class=
"none"
>
<navigator
class=
"box row bothSide verCenter"
:url=
"'/forget?account=' + userInfo.user_info.mobile
"
hover-class=
"none"
>
<view
class=
"text"
>
<text
class=
"t1"
>
手机号
</text>
<text
class=
"t2"
>
{{
userInfo
.
user_info
.
mobile
}}
</text>
...
...
@@ -71,7 +71,7 @@
</view>
<view
class=
"label-box row"
>
<text
class=
"t1"
>
主营品牌:
</text>
<text
class=
"t2"
style=
"color: #1969F9;"
>
--
</text>
<text
class=
"t2"
style=
"color: #1969F9;"
>
{{
brand_name
}}
</text>
</view>
<view
class=
"label-box row"
>
<text
class=
"t1"
>
公司简介:
</text>
...
...
@@ -94,7 +94,8 @@ export default {
},
data
()
{
return
{
userInfo
:
{}
userInfo
:
{},
brand_name
:
''
};
},
onShow
()
{
...
...
@@ -105,6 +106,15 @@ export default {
this
.
request
(
Api_Url
+
'/user/getUserType'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
userInfo
=
res
.
data
;
//品牌
if
(
res
.
data
.
company_info
.
brand_list
.
length
>
0
)
{
var
brand_name
=
res
.
data
.
company_info
.
brand_list
.
map
(
function
(
brand
)
{
return
brand
.
brand_name
;
});
this
.
brand_name
=
brand_name
.
join
(
','
);
}
else
{
this
.
brand_name
=
''
;
}
}
else
if
(
res
.
err_code
===
11012
)
{
uni
.
navigateTo
({
url
:
'/login'
...
...
pages/mine/user.vue
View file @
767e997a
...
...
@@ -3,7 +3,7 @@
<view
class=
"user-head row"
>
<navigator
class=
"msg"
url=
"/user/msg"
hover-class=
"none"
>
<text
class=
"iconfont icon-news"
></text>
<text
class=
"num row rowCenter verCenter"
>
28
</text>
<text
class=
"num row rowCenter verCenter"
>
{{
userInfo
.
sum_messsage
}}
</text>
</navigator>
<navigator
class=
"iconfont icon-juxing1"
url=
"/user/setting"
hover-class=
"none"
></navigator>
</view>
...
...
@@ -11,7 +11,7 @@
<text
class=
"t1"
>
欢迎您,
{{
userInfo
.
user_info
.
mobile
}}
</text>
<text
class=
"t2 row rowCenter verCenter"
>
个人
</text>
</view>
<view
class=
"company"
><image
src=
"https://img.ichunt.com/images/ichunt/202305/19/8645c77def093657ad5ae66b4af6cad4.png"
></image></view>
<view
class=
"company"
v-if=
"userInfo.user_info.user_type == 1"
><image
src=
"https://img.ichunt.com/images/ichunt/202305/19/8645c77def093657ad5ae66b4af6cad4.png"
></image></view>
<view
class=
"user-center"
>
<navigator
class=
"box column rowCenter verCenter"
url=
"/user/shoporder"
hover-class=
"none"
>
<image
src=
"../../static/order.png"
></image>
...
...
@@ -23,42 +23,47 @@
<text
class=
"tt"
>
我的优惠券
</text>
<text
class=
"tip"
></text>
</navigator>
<
view
class=
"box column rowCenter verCenter
"
>
<
a
class=
"box column rowCenter verCenter"
:href=
"userInfo.kefu_url
"
>
<image
src=
"../../static/qq.png"
></image>
<text
class=
"tt"
>
我的客服
</text>
</a>
</view>
</view>
<view
class=
"user-order"
>
<view
class=
"user-order"
v-if=
"userInfo.last_order"
>
<view
class=
"p1 row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"t1"
>
订单号:
</text>
<text
class=
"t2"
>
12022071810404SZ
</text>
<text
class=
"t3"
>
2023.04.24 11:40
</text>
<text
class=
"t2"
>
{{
userInfo
.
last_order
.
order_sn
}}
</text>
<text
class=
"t3"
>
{{
userInfo
.
last_order
.
create_time
}}
</text>
</view>
<text
class=
"t4"
>
待付款
</text>
<text
class=
"t4"
>
{{
userInfo
.
last_order
.
status_val
}}
</text>
</view>
<view
class=
"p2 row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"t1"
>
附加费:
</text>
<text
class=
"t2"
style=
"margin-right: 24rpx;"
>
¥15.00
</text>
<text
class=
"t2"
style=
"margin-right: 24rpx;"
>
{{
userInfo
.
last_order
.
extend_fee_format
}}
</text>
<text
class=
"t1"
>
运费:
</text>
<text
class=
"t2"
>
¥10.00
</text>
<text
class=
"t2"
>
{{
userInfo
.
last_order
.
shipping_price_format
}}
</text>
</view>
<
view
class=
"right-bar
"
>
<
navigator
class=
"right-bar"
:url=
"'/user/orderdetail?order_id=' + userInfo.last_order.order_id
"
>
<text
class=
"bar-t1"
>
共
</text>
<text
class=
"bar-t2"
>
4
</text>
<text
class=
"bar-t2"
>
{{
userInfo
.
last_order
.
count_item
}}
</text>
<text
class=
"bar-t1"
>
件商品
</text>
<text
class=
"iconfont icon-jt"
></text>
</
view
>
</
navigator
>
</view>
<view
class=
"p3 row bothSide verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"t1"
>
总金额:
</text>
<text
class=
"t2"
>
¥3580.23
</text>
<text
class=
"t2"
>
{{
userInfo
.
last_order
.
order_amount
}}
</text>
</view>
<view
class=
"right-bar row"
>
<view
class=
"btn1 row rowCenter verCenter"
>
下载合同
</view>
<view
class=
"btn2 row rowCenter verCenter"
>
立即支付
</view>
<view
class=
"btn btn0 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 2 || userInfo.last_order.status == 3"
@
click
.
stop=
"nowPay(userInfo.last_order.order_id)"
>
立即支付
</view>
<view
class=
"btn btn1 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 10 || userInfo.last_order.status == -1"
@
click
.
stop=
"rebuy(userInfo.last_order.order_id)"
>
再次购买
</view>
<view
class=
"btn btn2 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 4"
@
click
.
stop=
"sendTip(userInfo.last_order.order_sn, userInfo.last_order.user_id)"
>
提醒发货
</view>
<view
class=
"btn btn3 row rowCenter verCenter"
v-if=
"userInfo.last_order.status != 1"
@
click
.
stop=
"download(userInfo.last_order.order_id)"
>
下载合同
</view>
<view
class=
"btn btn4 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 7 || userInfo.last_order.status == 8 || userInfo.last_order.status == 10"
@
click
.
stop=
"ship(userInfo.last_order.order_id, userInfo.last_order.order_sn)"
>
查看物流
</view>
<view
class=
"btn btn5 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 2 || userInfo.last_order.status == 1"
@
click
.
stop=
"cancelOrder(userInfo.last_order.order_id)"
>
取消订单
</view>
<view
class=
"btn btn6 row rowCenter verCenter"
v-if=
"userInfo.last_order.status == 8"
@
click
.
stop=
"sureSend(userInfo.last_order.order_id)"
>
确认收货
</view>
</view>
</view>
</view>
...
...
@@ -87,7 +92,7 @@
</navigator>
</view>
</view>
<view
class=
"activity"
>
<view
class=
"activity"
v-if=
"activity_list.length > 0"
>
<navigator
class=
"title row bothSide verCenter"
url=
"/user/activity"
hover-class=
"none"
>
<text
class=
"tt"
>
活动中心
</text>
<view
class=
"right-bar row verCenter"
>
...
...
@@ -96,7 +101,7 @@
</view>
</navigator>
<view
class=
"list"
>
<view
class=
"box"
><image
src=
"https://img.ichunt.com/images/cms/202304/21/c2ca82b250ad4159d37f6a38eed88db8.jpg
"
mode=
"aspectFill"
></image></view>
<view
class=
"box"
><image
:src=
"activity_list[0].image_h5
"
mode=
"aspectFill"
></image></view>
</view>
</view>
<bottomNavFixed
actval=
"4"
/>
...
...
@@ -113,13 +118,197 @@ export default {
},
data
()
{
return
{
userInfo
:
{}
userInfo
:
{},
activity_list
:
[]
};
},
onShow
()
{
this
.
getData
();
},
methods
:
{
/**
* 立即支付
* @param {Object} order_id
*/
nowPay
(
order_id
)
{
uni
.
navigateTo
({
url
:
'/pay/online?order_id='
+
order_id
});
},
/**
* 再次购买
* @param {Object} order_id
*/
rebuy
(
order_id
)
{
this
.
request
(
Api_Url
+
'/cart/rebuy'
,
'POST'
,
{
order_id
:
order_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
var
count
=
Number
(
res
.
data
.
count
);
var
successCount
=
Number
(
res
.
data
.
success
);
if
(
count
==
successCount
)
{
//全部购买成功
this
.
tipType
=
1
;
this
.
$refs
.
popupCenter
.
open
(
'center'
);
}
if
(
successCount
==
0
)
{
//全部购买失败
this
.
tipType
=
2
;
this
.
$refs
.
popupCenter
.
open
(
'center'
);
}
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 提醒发货
* @param {Object} order_sn
* @param {Object} user_id
*/
sendTip
(
order_sn
,
user_id
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'你确定要提醒发货吗?'
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
this
.
request
(
Api_Url
+
'/crm/remindDelivery'
,
'POST'
,
{
order_sn
:
order_sn
,
user_id
:
user_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'提醒成功'
,
icon
:
'success'
});
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
/**
* 下载合同
*/
download
(
order_id
)
{
this
.
request
(
Api_Url
+
'/contract/checkPdf'
,
'POST'
,
{
id
:
order_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
var
url
=
Api_Url
+
'/contract/pdf?id='
+
order_id
+
'&pf='
+
2
;
uni
.
downloadFile
({
url
:
url
,
success
:
function
(
res
)
{
const
filePath
=
res
.
tempFilePath
;
uni
.
openDocument
({
filePath
:
filePath
,
showMenu
:
true
,
success
:
function
(
res
)
{
console
.
log
(
'打开文档成功'
);
},
fail
:
function
()
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'暂不支持该文件类型预览'
,
showCancel
:
false
});
console
.
log
(
'打开文档失败'
);
}
});
}
});
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
},
/**
* 取消订单
* @param {Object} order_id
*/
cancelOrder
(
order_id
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'你确定要取消该订单嘛?'
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
this
.
request
(
Api_Url
+
'/order/cancel'
,
'POST'
,
{
id
:
order_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'取消成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
getData
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
/**
* 查看物流
* @param {Object} order_id
* @param {Object} order_sn
* @param {Object} zy_delivery_type
* @param {Object} status
*/
ship
(
order_id
,
order_sn
,
zy_delivery_type
,
status
)
{
uni
.
navigateTo
({
url
:
'/user/orderdetail?order_id='
+
order_id
});
},
/**
*确认收货
* @param {Object} order_id
*/
sureSend
(
order_id
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'您要确认收货吗?'
,
success
:
res
=>
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
this
.
request
(
Api_Url
+
'/order/recive'
,
'POST'
,
{
order_id
:
order_id
},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'收货成功'
,
icon
:
'success'
});
setTimeout
(()
=>
{
this
.
getData
();
},
2000
);
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
getData
()
{
this
.
request
(
Api_Url
+
'/user/getUserType'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
...
...
@@ -130,6 +319,11 @@ export default {
});
}
});
this
.
request
(
Api_Url
+
'/Activity/Cube/getActivityCenterData'
,
'GET'
,
{},
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
activity_list
=
res
.
data
.
activity_list
;
}
});
}
}
};
...
...
router/index.js
View file @
767e997a
...
...
@@ -166,7 +166,7 @@ const router = new Router({
aliasPath
:
'/activity/zqsx'
,
meta
:
{
title
:
'账期服务'
,
auth
:
tru
e
auth
:
fals
e
}
},
{
...
...
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