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
2dcadab0
authored
Jun 01, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
8fcfa98e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
270 deletions
assets/css/mine/activity.scss
manifest.json
pages.json
pages/mine/activity.vue
pages/mine/user.vue
router/index.js
util/api.js
assets/css/mine/activity.scss
View file @
2dcadab0
.page-activity
{
padding-top
:
202rpx
;
padding-bottom
:
100rpx
;
.tab
{
position
:
fixed
;
top
:
88rpx
;
width
:
100%
;
background
:
#ffffff
;
height
:
88rpx
;
z-index
:
99
;
.box
{
position
:
relative
;
height
:
100%
;
transition
:
all
0
.4s
ease
;
&
.curr
{
font-weight
:
bold
;
&
:
:
after
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
right
:
0
;
width
:
53rpx
;
height
:
7rpx
;
margin
:
0
auto
;
background
:
#1969f9
;
border-radius
:
4rpx
;
content
:
''
;
}
}
}
}
.list
{
padding
:
0
24rpx
;
.box
{
margin-bottom
:
16rpx
;
.pic
{
width
:
100%
;
height
:
144rpx
;
border-radius
:
10rpx
10rpx
0
0
;
image
{
width
:
100%
;
height
:
144rpx
;
border-radius
:
10rpx
10rpx
0
0
;
}
}
.text
{
border-radius
:
0
0
10rpx
10rpx
;
background-color
:
#fff
;
padding
:
16rpx
0
16rpx
24rpx
;
.p1
{
font-size
:
28rpx
;
color
:
#484b59
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
margin-bottom
:
16rpx
;
width
:
95%
;
}
.p2
{
font-size
:
22rpx
;
color
:
#919399
;
}
}
}
}
.coupon-list
{
padding
:
0
24rpx
;
.box
{
position
:
relative
;
height
:
176rpx
;
background
:
#ffffff
;
border-radius
:
0px
10rpx
10rpx
0px
;
margin-bottom
:
16rpx
;
.left
{
width
:
230rpx
;
height
:
176rpx
;
background
:
url('https://img.ichunt.com/images/ichunt/202305/19/e8f03900544551d09436a542ee7d0ea0.png')
no-repeat
center
;
background-size
:
cover
;
.p1
{
margin-bottom
:
8rpx
;
.t1
{
font-size
:
22rpx
;
color
:
#ffffff
;
}
.t2
{
margin-left
:
10rpx
;
font-size
:
60rpx
;
color
:
#ffffff
;
font-family
:
Impact
;
}
}
.p2
{
font-size
:
20rpx
;
color
:
#ffffff
;
}
}
.right
{
padding-left
:
24rpx
;
.p1
{
margin-bottom
:
16rpx
;
.t1
{
font-size
:
22rpx
;
color
:
#484b59
;
}
.t2
{
font-size
:
22rpx
;
color
:
#1969f9
;
}
}
.p2
{
margin-bottom
:
16rpx
;
}
.p3
{
width
:
142rpx
;
height
:
40rpx
;
border-radius
:
6rpx
;
border
:
1px
solid
#1969f9
;
font-size
:
22rpx
;
color
:
#1969f9
;
}
}
.type
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
82rpx
;
height
:
68rpx
;
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
{
background
:
url('https://img.ichunt.com/images/ichunt/202305/19/ebf691eb49a2a3dffe612baea352a7b6.png')
no-repeat
center
;
background-size
:
cover
;
}
}
}
}
}
.no-data
{
image
{
width
:
356rpx
;
height
:
356rpx
;
}
.tt
{
margin-top
:
32rpx
;
font-size
:
28rpx
;
color
:
#292b33
;
}
.activity-box
{
}
manifest.json
View file @
2dcadab0
...
...
@@ -23,7 +23,7 @@
"changeOrigin"
:
true
,
"secure"
:
true
,
"pathRewrite"
:
{
"/esapi"
:
""
"
^
/esapi"
:
""
}
},
"/v3"
:
{
...
...
@@ -33,6 +33,14 @@
"pathRewrite"
:
{
"^/v3"
:
"/v3/"
}
},
"/cube"
:
{
"target"
:
"http://cube.jianming.liexinlocal.com"
,
"changeOrigin"
:
true
,
"secure"
:
true
,
"pathRewrite"
:
{
"^/cube"
:
""
}
}
}
},
...
...
pages.json
View file @
2dcadab0
...
...
@@ -65,12 +65,12 @@
"navigationBarTitleText"
:
"转账支付"
}
},
{
"path"
:
"pages/confirm/map"
,
"style"
:
{
"navigationBarTitleText"
:
"自提地址"
}
},
{
"path"
:
"pages/confirm/map"
,
"style"
:
{
"navigationBarTitleText"
:
"自提地址"
}
},
{
"path"
:
"pages/confirm/confirmSuccess"
,
"style"
:
{
...
...
@@ -198,12 +198,18 @@
}
},
{
"path"
:
"pages/mine/activity"
,
"path"
:
"pages/mine/activity
Center
"
,
"style"
:
{
"navigationBarTitleText"
:
"活动中心"
}
},
{
"path"
:
"pages/mine/activity"
,
"style"
:
{
"navigationBarTitleText"
:
"活动"
}
},
{
"path"
:
"pages/mine/feedback"
,
"style"
:
{
"navigationBarTitleText"
:
"投诉反馈"
...
...
pages/mine/activity.vue
View file @
2dcadab0
<
template
>
<view
class=
"page-activity"
>
<navElement
title=
"活动中心"
></navElement>
<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>
<!-- 活动中心 -->
<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"
>
{{
item
.
web_description
}}
</view>
<view
class=
"p2"
>
{{
item
.
create_time
}}
</view>
</view>
</view>
</view>
<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"
>
{{
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"
>
{{ 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"
>
{{
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=
"type"
>
<view
class=
"tt"
>
{{ item.coupon_mall_type == 1 ? '全站' : item.coupon_mall_type == 2 ? '自营' : '联营' }}
</view>
</view>
</view>
</view>
<view
class=
"no-data column rowCenter verCenter"
v-else
>
<image
src=
"../../static/nodate.png"
></image>
<text
class=
"tt"
>
暂无优惠券
</text>
</view>
</template>
</view>
<view
class=
"activity-box"
>
活动页面
</view>
</
template
>
<
script
>
import
{
Api
_Url
}
from
'@/util/api.js'
;
import
{
Cube
_Url
}
from
'@/util/api.js'
;
import
navElement
from
'@/components/nav.vue'
;
export
default
{
...
...
@@ -75,37 +11,15 @@ export default {
navElement
},
data
()
{
return
{
curr
:
0
,
text_arr
:
[
'活动中心'
,
'领券中心'
],
activity_list
:
[],
coupon_list
:
[]
};
},
onLoad
(
options
)
{
this
.
curr
=
options
.
curr
||
0
;
return
{};
},
onShow
()
{
this
.
getData
();
},
methods
:
{
tab
(
index
)
{
this
.
curr
=
index
;
this
.
getData
();
},
getData
()
{
this
.
request
(
Api_Url
+
'/Activity/Cube/getActivityCenterData'
,
'GET'
,
{
},
true
,
true
).
then
(
res
=>
{
this
.
request
(
Cube_Url
+
'/activity/getInfo'
,
'GET'
,
{
id
:
58
},
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'
});
}
});
}
...
...
@@ -114,5 +28,5 @@ export default {
</
script
>
<
style
lang=
"scss"
>
@import
'@/assets/css/mine/activity.scss'
;
@import
'@/assets/css/mine/activity
Center
.scss'
;
</
style
>
pages/mine/user.vue
View file @
2dcadab0
...
...
@@ -95,7 +95,7 @@
</view>
</view>
<view
class=
"activity"
v-if=
"activity_list.length > 0"
>
<navigator
class=
"title row bothSide verCenter"
url=
"/user/activity"
hover-class=
"none"
>
<navigator
class=
"title row bothSide verCenter"
url=
"/user/activity
Center
"
hover-class=
"none"
>
<text
class=
"tt"
>
活动中心
</text>
<view
class=
"right-bar row verCenter"
>
<text
class=
"bar-tt"
>
更多活动
</text>
...
...
router/index.js
View file @
2dcadab0
...
...
@@ -104,14 +104,14 @@ const router = new Router({
auth
:
true
}
},
{
path
:
'/pages/confirm/map'
,
aliasPath
:
'/ztmap'
,
meta
:
{
title
:
'自提地址'
,
auth
:
true
}
},
{
path
:
'/pages/confirm/map'
,
aliasPath
:
'/ztmap'
,
meta
:
{
title
:
'自提地址'
,
auth
:
true
}
},
{
path
:
'/pages/confirm/confirmSuccess'
,
aliasPath
:
'/order/success'
,
...
...
@@ -257,14 +257,22 @@ const router = new Router({
}
},
{
path
:
'/pages/mine/activity'
,
aliasPath
:
'/user/activity'
,
path
:
'/pages/mine/activity
Center
'
,
aliasPath
:
'/user/activity
Center
'
,
meta
:
{
title
:
'活动中心'
,
auth
:
true
}
},
{
path
:
'/pages/mine/activity'
,
aliasPath
:
'/activity'
,
meta
:
{
title
:
'活动页面'
,
auth
:
true
}
},
{
path
:
'/pages/mine/feedback'
,
aliasPath
:
'/user/feedback'
,
meta
:
{
...
...
util/api.js
View file @
2dcadab0
...
...
@@ -4,7 +4,7 @@ var Api_Es = ''; //api项目url
var
Api_ES_Go
=
''
;
//型号联想
var
Code_Url
=
''
;
//图形验证码
var
Oss_Url
=
''
;
//oss系统
var
Cube_Url
=
''
;
//魔方系统
switch
(
window
.
location
.
hostname
)
{
...
...
@@ -15,6 +15,7 @@ switch (window.location.hostname) {
Api_ES_Go
=
"https://s.ichunt.com"
Code_Url
=
"https://www.ichunt.com/v3/public/verify"
;
Oss_Url
=
"https://file.ichunt.net"
;
Cube_Url
=
"http://cube.jianming.liexinlocal.com"
;
break
;
default
:
Ichunt_Api
=
'/v3'
...
...
@@ -23,6 +24,7 @@ switch (window.location.hostname) {
Api_ES_Go
=
"http://192.168.1.237:9008"
;
Code_Url
=
"http://www.liexin.com/v3/public/verify"
;
Oss_Url
=
"http://file.liexindev.net"
;
Cube_Url
=
"/cube"
;
}
...
...
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