Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
scrm-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2dcce7ac
authored
Sep 18, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
模拟后台数据字段,对接页面显示
1 parent
48118a5f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
385 additions
and
92 deletions
src/api/api.js
src/assets/images/cardRoll.png
src/assets/images/equity/scrm_vip_package_icon.png
src/views/cardRoll/index.vue
src/views/commodity/business.vue
src/views/commodity/packageDetail.vue
src/views/commodity/storePackage.vue
src/views/common/phoneLogin.vue
src/views/equity/allEquity.vue
src/views/equity/index.vue
src/api/api.js
View file @
2dcce7a
This diff is collapsed.
Click to expand it.
src/assets/images/cardRoll.png
View file @
2dcce7a
1.9 KB
|
W:
|
H:
604 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/images/equity/scrm_vip_package_icon.png
View file @
2dcce7a
27.3 KB
|
W:
|
H:
15.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/views/cardRoll/index.vue
View file @
2dcce7a
...
...
@@ -73,6 +73,24 @@
</
template
>
</div>
</template>
<
template
v-if=
"item.orderType==2"
>
<div
class=
"card-img card-package-img"
></div>
<div
class=
"card-desc"
>
<div
class=
"card-num"
><span
style=
"font-size: 18px;"
>
¥
</span>
{{
item
.
orderPrices
}}
</div>
<div
class=
"card-name"
>
<span
class=
"card-name-span text-hide"
>
{{
item
.
productName
}}
</span>
</div>
<div
style=
"width:130px"
class=
"card-time text-hide"
>
{{
item
.
productNameDesc
}}
</div>
<div
class=
"card-operation"
>
<span
class=
"lookbg"
@
click=
"jumpDetail(item)"
>
查看卡券
</span>
</div>
</div>
<div
class=
"new-ver-card-status"
>
<span>
已完成
</span>
</div>
</
template
>
</div>
</div>
<div
class=
"van-empty"
v-if=
"cardList.length == 0"
>
...
...
@@ -190,6 +208,23 @@ export default {
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
this
.
cardList
=
data
?
data
:[];
this
.
cardList
.
push
({
orderStatus
:
6
,
openRefund
:
0
,
appearance
:
null
,
refundCode
:
null
,
orderType
:
2
,
goodsQuality
:
1
,
warrantyDate
:
null
,
productNameDesc
:
'炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1'
,
supplier
:
'HW'
,
officePrice
:
150
,
brandName
:
null
,
orderPrices
:
130
,
productName
:
'单人套餐1'
,
orderCode
:
'GL113213416465'
,
orderDate
:
'2021.9.18'
})
}
else
{
this
.
showToast
(
message
)
}
...
...
@@ -277,8 +312,13 @@ export default {
let
{
sessionId
}
=
this
.
$store
.
state
;
this
.
$store
.
commit
(
'setOrder'
,
val
)
let
[
href
]
=
window
.
location
.
href
.
split
(
'/#/'
);
let
url
=
`
${
href
}
/#/cardRoll/detail?sessionId=
${
sessionId
}
&orderCode=
${
val
.
orderCode
}
`
;
this
.
openWindows
(
url
,
'cardRoll.detail'
)
if
(
val
.
orderType
==
1
){
let
url
=
`
${
href
}
/#/cardRoll/detail?sessionId=
${
sessionId
}
&orderCode=
${
val
.
orderCode
}
`
;
this
.
openWindows
(
url
,
'cardRoll.detail'
)
}
else
{
let
url
=
`
${
href
}
/#/commodity/packageDetail?sessionId=
${
sessionId
}
&orderCode=
${
val
.
orderCode
}
`
;
this
.
openWindows
(
url
,
'commodity.packageDetail'
)
}
},
jumpSales
(
val
)
{
if
(
val
.
openRefund
)
{
...
...
@@ -345,24 +385,27 @@ export default {
//
min-height
:
calc
(
100vh
-
70px
);
&-item
{
margin-bottom
:
10px
;
height
:
10
0
px
;
height
:
10
1
px
;
box-sizing
:
border-box
;
padding
:
1
5
px
;
padding
:
1
0
px
;
background
:
#FFFFFF
;
border-radius
:
6
px
;
border-radius
:
4
px
;
display
:
flex
;
position
:
relative
;
>.card-img
{
width
:
70
px
;
height
:
70
px
;
width
:
81
px
;
height
:
81
px
;
background-image
:
url('~@a/images/cardRoll.png')
;
background-size
:
100%
100%
;
.card-l-panel
{
width
:
70px
;
height
:
70px
;
width
:
81px
;
height
:
81px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
text-align
:
center
;
color
:
#FFFFFF
;
padding
:
9px
0px
;
box-sizing
:
border-box
;
.card-l-title,card-l-num
{
font-size
:
12px
;
...
...
@@ -426,6 +469,8 @@ export default {
}
}
>
.card-operation
{
height
:
24.3px
;
margin-top
:
10px
;
span
{
margin-right
:
10px
;
display
:
inline-block
;
...
...
@@ -459,6 +504,10 @@ export default {
color
:
#FFFFFF
;
font-size
:
10px
;
}
>
.card-package-img
{
background-image
:
url('~@a/images/equity/scrm_vip_package_icon.png')
;
background-size
:
100%
100%
;
}
}
}
}
...
...
src/views/commodity/business.vue
View file @
2dcce7a
...
...
@@ -21,14 +21,14 @@
</div>
</div>
<div
class=
"business-item business-number-n"
v-if=
"!isHaveInventory"
>
已抢光
</div>
<!--
<div
class=
"business-item new-version"
>
<div
v-if=
"addressInfo"
class=
"business-item new-version"
>
<div
class=
"business-item-label"
>
附近门店
</div>
<div
class=
"business-item-quality new-version-quality"
>
南山区桃源街道塘朗城广场二楼..
</div>
<div
class=
"new-version-location"
>
<div
class=
"location_text"
>
5.5
km
</div>
<div
class=
"business-item-quality new-version-quality"
>
{{
addressInfo
.
gasAddress
}}
</div>
<div
class=
"new-version-location"
@
click=
"openlocation"
>
<div
class=
"location_text"
>
{{
addressInfo
.
localAddressDistance
}}
km
</div>
<div
class=
"localtion_icon"
></div>
</div>
</div>
-->
</div>
<div
class=
"business-item"
>
<div
class=
"business-item-label"
>
质保期至
</div>
<div
class=
"business-item-quality"
v-if=
"selectData.warrantyDate"
>
{{
new
Date
(
selectData
.
warrantyDate
).
format
(
'yyyy-MM-dd hh:mm:ss'
)
}}
</div>
...
...
@@ -104,6 +104,8 @@
import
{
pay
}
from
'@/mixins'
import
{
commodity
,
equity
}
from
"@r/api"
;
import
{
Dialog
}
from
'vant'
import
WxConfig
from
"@u/WxConfig"
;
const
WX
=
new
WxConfig
([
"openLocation"
,
"getLocation"
]);
export
default
{
mixins
:
[
pay
],
name
:
"business"
,
...
...
@@ -124,6 +126,7 @@ export default {
status
:
true
,
supplier
:
''
,
isHaveInventory
:
true
,
//是否有库存
addressInfo
:
null
}
},
mounted
()
{
...
...
@@ -159,6 +162,13 @@ export default {
commodity
.
getCouponDetail
(
para
).
then
(
res
=>
{
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
// 新版外包了一层经纬度,所以这里得处理一下
// this.addressInfo = {
// gasAddressLatitude:data.latitude,
// gasAddressLongitude:data.longitude,
// gasAddress:data.localAddress,
// localAddressDistance:data.localAddressDistance
// }
this
.
businessList
=
data
;
this
.
selectData
=
this
.
businessList
[
0
]
if
(
this
.
selectedId
){
//存在则是从精选处跳转进来的
...
...
@@ -272,6 +282,10 @@ export default {
}
}
},
// 打开导航
openlocation
(){
this
.
openNavigation
(
this
.
addressInfo
,
WX
)
}
}
}
</
script
>
...
...
src/views/commodity/packageDetail.vue
View file @
2dcce7a
<
template
>
<div
class=
"package_detail_page"
>
<div
class=
"content_wrapper"
>
<div
v-for=
"
count in 6"
:key=
"count
"
class=
"line_wrpper"
>
<div
v-for=
"
(item,index) in packageInfo.couponsDetails"
:key=
"index
"
class=
"line_wrpper"
>
<div
class=
"line_left"
>
<div
class=
"line_icon"
></div>
<div
class=
"line_text"
>
{{
count
}}
、全车镀金
</div>
<div
class=
"line_text"
>
{{
index
+
1
}}
、
{{
item
.
couponName
}}
</div>
</div>
<div
class=
"line_right"
>
去使用
</div>
</div>
<div
class=
"title_tip"
>
附:购买套餐后到店赠送餐具一套
</div>
<div
v-if=
"packageInfo.notes"
class=
"title_tip"
>
附:
{{
packageInfo
.
notes
}}
</div>
</div>
<div
class=
"store_wrapper"
>
<div
class=
"cell_wrap"
>
<span>
服务门店
</span>
<span
class=
"cell_val"
>
城中店
</span>
<span
class=
"cell_val"
>
{{
packageInfo
.
merchantName
}}
</span>
</div>
<div
class=
"cell_wrap"
>
<span>
付款金额
</span>
<span
class=
"cell_val"
>
299
元
</span>
<span
class=
"cell_val"
>
{{
packageInfo
.
orderPrice
}}
元
</span>
</div>
<div
class=
"cell_wrap"
>
<span>
订单编号
</span>
<span
class=
"cell_val"
>
465465456456
</span>
<span
class=
"cell_val"
>
{{
packageInfo
.
orderCode
}}
</span>
</div>
<div
class=
"cell_wrap"
>
<span>
下单时间
</span>
<span
class=
"cell_val"
>
2021-07-22 12:34:36
</span>
<span
class=
"cell_val"
>
{{
packageInfo
.
createDate
}}
</span>
</div>
<div
class=
"location_wrap"
>
<div
class=
"location_wrap"
@
click=
"toOpenLocation"
>
<div
class=
"icon_l"
></div>
<div
class=
"text_l"
>
导航
</div>
</div>
...
...
@@ -36,16 +36,54 @@
</
template
>
<
script
type=
'text/ecmascript-6'
>
import
WxConfig
from
"@u/WxConfig"
;
const
WX
=
new
WxConfig
([
"openLocation"
,
"getLocation"
]);
export
default
{
name
:
""
,
data
()
{
return
{};
return
{
packageInfo
:{}
};
},
beforeCreate
()
{
document
.
querySelector
(
"body"
).
setAttribute
(
"style"
,
"background:#F5F5F5"
);
},
mounted
()
{},
methods
:
{},
mounted
()
{
this
.
packageInfo
=
{
notes
:
'这是套餐的备注'
,
createDate
:
'2021-09-18'
,
latitude
:
22.536197
,
longitude
:
113.959296
,
merchantAddress
:
'湾科技生态园'
,
packageName
:
'单人套餐1'
,
merchantName
:
'广汇门店'
,
orderPrice
:
130
,
orderCode
:
'GL21321321321'
,
couponsDetails
:[
{
couponName
:
'炸鸡腿1'
,
userCouponsId
:
1
,
shortLink
:
'跳转小程序券详情短链'
},
{
couponName
:
'炸鸡腿2'
,
userCouponsId
:
2
,
shortLink
:
'跳转小程序券详情短链'
},
]
}
},
methods
:
{
toOpenLocation
(){
let
temp
=
this
.
packageInfo
let
val
=
{
gasAddressLatitude
:
temp
.
latitude
,
gasAddressLongitude
:
temp
.
longitude
,
gasAddress
:
temp
.
merchantAddress
}
this
.
openNavigation
(
val
,
WX
)
}
},
};
</
script
>
...
...
src/views/commodity/storePackage.vue
View file @
2dcce7a
<
template
>
<div
class=
"package_page_widget"
>
<div
class=
"top_wrapper"
>
高级会员套餐
</div>
<div
class=
"top_wrapper"
>
{{
packageInfo
.
packageName
}}
</div>
<div
class=
"title_widget"
>
现在购买尊享
<span
class=
"title_num"
>
13
项
</span>
超值权益
现在购买尊享
<span
class=
"title_num"
>
{{
packageInfo
.
count
}}
项
</span>
超值权益
</div>
<div
class=
"package_content_wrapper"
>
<div
v-for=
"count in 6"
:key=
"count"
class=
"package_element"
>
<div
class=
"ele_top"
>
{{
count
}}
、全车镀金
</div>
<div
class=
"ele_right"
>
数量:x3
</div>
<div
class=
"ele_left"
>
有效期:365天
</div>
<div
class=
"ele_bottom"
>
使用限制:有效期内可用1次
</div>
<div
v-for=
"(item,index) in packageInfo.couponsDetailList"
:key=
"index"
class=
"package_element"
>
<div
class=
"ele_top"
>
{{
index
+
1
}}
、
{{
item
.
couponName
}}
</div>
<div
class=
"ele_right"
>
数量:x
{{
item
.
serviceQuantity
}}
</div>
<div
v-if=
"item.useType!=0&&item.effectiveType==1"
class=
"ele_left"
>
有效期:
{{
item
.
effectiveDays
}}
天
</div>
<div
v-if=
"item.useType!=0&&item.effectiveType==2"
class=
"ele_left"
>
有效期:
{{
item
.
effectiveStarttime
}}
-
{{
item
.
effectiveEndTime
}}
</div>
<div
v-if=
"item.useType==0"
class=
"ele_left"
>
有效期:无有效期
</div>
<div
v-if=
"item.useType==1"
class=
"ele_bottom"
>
有效期内可用
{{
item
.
useAmount
}}
次
</div>
<div
v-if=
"item.useType==2"
class=
"ele_bottom"
>
有效期内每
{{
item
.
useLimitDays
}}
天可用
{{
item
.
useAmount
}}
次
</div>
<div
v-if=
"item.useType==0"
class=
"ele_bottom"
></div>
</div>
<div
class=
"content_tip"
>
附:购买套餐后到店赠送餐具一套
</div>
<div
v-if=
"packageInfo.notes"
class=
"content_tip"
>
附:
{{
packageInfo
.
notes
}}
</div>
</div>
<div
class=
"title_widget"
>
权益计价器
</div>
<div
class=
"price_content_wrapper"
>
<div
v-for=
"
count in 6"
:key=
"count
"
class=
"content_line_wrap"
>
<div
class=
"line_left"
>
全车镀金
</div>
<div
class=
"line_mid"
>
数量:x
3
</div>
<div
v-for=
"
(item,index) in packageInfo.couponsDetailList"
:key=
"index
"
class=
"content_line_wrap"
>
<div
class=
"line_left"
>
{{
item
.
couponName
}}
</div>
<div
class=
"line_mid"
>
数量:x
{{
item
.
serviceQuantity
}}
</div>
<div
class=
"line_right"
>
价值约:
<span
class=
"red_price"
>
127
</span>
元
价值约:
<span
class=
"red_price"
>
{{
item
.
shopTotalPrice
}}
</span>
元
</div>
</div>
<div
class=
"total_price"
>
套餐内权益实际价值总计约
<span
class=
"red_price"
>
720
</span>
元
套餐内权益实际价值总计约
<span
class=
"red_price"
>
{{
packageInfo
.
totalPrice
}}
</span>
元
</div>
</div>
<div
class=
"title_min_tip"
>
注意:套餐一经购买,不支持退款
</div>
<div
class=
"buy_btn"
@
click=
"jumpToPackageDetail"
>
限时特价仅需¥
299
,点击购买
限时特价仅需¥
{{
packageInfo
.
packagePrice
}}
,点击购买
</div>
<div
style=
"height: 28px"
></div>
</div>
</
template
>
<
script
type=
'text/ecmascript-6'
>
import
{
cardRoll
}
from
"@r/api"
;
export
default
{
name
:
""
,
data
()
{
return
{};
return
{
packageInfo
:{},
orderCode
:
''
,
paySource
:
1
,
};
},
beforeCreate
()
{
document
.
querySelector
(
"body"
).
setAttribute
(
"style"
,
"background:#F5F5F5"
);
},
mounted
()
{},
mounted
()
{
document
.
title
=
'广汇门店'
this
.
getDetailInfo
()
this
.
getPaySource
()
},
methods
:
{
// 判断当前环境获取支付环境
getPaySource
(){
let
num
=
this
.
getChannel
()
if
(
num
==
3
){
//H5
this
.
paySource
=
1
}
else
if
(
num
==
1
){
//小程序
this
.
paySource
=
3
}
else
if
(
num
==
2
){
//app
this
.
paySource
=
2
}
},
// 获取门店套餐详情
getDetailInfo
(){
let
data
=
{
id
:
1
,
packageName
:
'单人套餐1'
,
totalPrice
:
150
,
packagePrice
:
135
,
notes
:
'这是套餐的备注'
,
count
:
10
,
couponsDetailList
:[
{
serviceQuantity
:
3
,
useType
:
0
,
effectiveType
:
3
,
effectiveEndTime
:
'2022.9.10'
,
effectiveStarttime
:
'2021.9.18'
,
useLimitDays
:
6
,
couponName
:
'炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1炸鸡腿券1'
,
shopTotalPrice
:
50
,
effectiveDays
:
20
,
useAmount
:
3
},
{
serviceQuantity
:
4
,
useType
:
1
,
effectiveType
:
2
,
effectiveEndTime
:
'2022.9.10'
,
effectiveStarttime
:
'2021.9.18'
,
useLimitDays
:
6
,
couponName
:
'炸鸡腿券2'
,
shopTotalPrice
:
50
,
effectiveDays
:
20
,
useAmount
:
3
},
{
serviceQuantity
:
3
,
useType
:
2
,
effectiveType
:
1
,
effectiveEndTime
:
'2022.9.10'
,
effectiveStarttime
:
'2021.9.18'
,
useLimitDays
:
6
,
couponName
:
'炸鸡腿券3'
,
shopTotalPrice
:
50
,
effectiveDays
:
20
,
useAmount
:
3
},
]
}
this
.
packageInfo
=
data
},
// 购买套餐
toBuyPackage
(){
//先获取门店订单编号---在发起请求
let
{
sessionId
}
=
this
.
$store
.
state
;
let
para
=
{
orderCode
:
this
.
orderCode
,
packageId
:
this
.
packageInfo
.
id
,
paySource
:
this
.
paySource
,
sessionId
:
sessionId
}
console
.
log
(
para
);
},
// 获取门店单号
getOrderCode
(){
this
.
showLoading
();
cardRoll
.
getStoreOrderCode
().
then
(
res
=>
{
const
{
code
,
data
,
message
}
=
res
if
(
code
==
0
){
this
.
orderCode
=
data
.
data
}
else
{
this
.
showToast
(
message
);
}
this
.
hideLoading
();
})
},
// 跳转到套餐详情
jumpToPackageDetail
()
{
let
{
sessionId
}
=
this
.
$store
.
state
;
...
...
@@ -97,22 +196,27 @@ export default {
height
:
41px
;
margin-bottom
:
24px
;
.ele_top
{
width
:
70%
;
color
:
#282829
;
font-size
:
14px
;
font-weight
:
500
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.ele_right
{
color
:
#282829
;
font-size
:
12px
;
position
:
absolute
;
right
:
0
;
top
:
0px
;
top
:
2px
;
font-weight
:
500
;
}
.ele_left
{
color
:
#b1b1b3
;
font-size
:
12px
;
position
:
absolute
;
left
:
2
3
px
;
left
:
2
0
px
;
bottom
:
0
;
}
.ele_bottom
{
...
...
@@ -147,6 +251,9 @@ export default {
color
:
#282829
;
font-size
:
12px
;
font-weight
:
500
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.line_mid
{
width
:
50px
;
...
...
src/views/common/phoneLogin.vue
View file @
2dcce7a
...
...
@@ -292,8 +292,13 @@ export default {
sessionStorage
.
setItem
(
"GL_EQUITY_USER_INFO"
,
JSON
.
stringify
(
data
));
sessionStorage
.
setItem
(
"CODE_PAST_DUE"
,
false
);
this
.
$store
.
commit
(
"setUserInfo"
,
data
);
let
flag
=
window
.
location
.
href
.
indexOf
(
'/#/'
)
if
(
flag
!=-
1
){
window
.
location
.
href
=
`${window.location.href.split('/#/')[0]
}
/#/equity/index`
}
else
{
window
.
location
.
href
=
`${window.location.href.split('?')[0]
}
#/equity/index`
}
// window.vm.$router.replace(
{
name
:
'equity.index'
}
);
window
.
location
.
href
=
`${window.location.href.split('?')[0]
}
#/equity/index`
}
else
{
this
.
showToast
(
message
);
}
...
...
src/views/equity/allEquity.vue
View file @
2dcce7a
...
...
@@ -67,22 +67,32 @@ export default {
let
wheight
=
window
.
innerHeight
+
"px"
;
this
.
deviceH
=
wheight
;
this
.
showLoading
();
let
self
=
this
let
self
=
this
;
setTimeout
(()
=>
{
self
.
$nextTick
(()
=>
{
self
.
getTwoHeightArr
();
});
self
.
hideLoading
()
self
.
hideLoading
()
;
},
2000
);
},
methods
:
{
// 点击跳转商品详情
toNextPage
(
e
,
cate
)
{
let
temp
=
cate
.
goodsCategory
;
console
.
log
(
temp
);
if
(
temp
==
"汽车权益"
)
{
this
.
CarLink
(
e
);
}
else
{
this
.
jumpLink
(
e
);
let
{
sessionId
}
=
this
.
$store
.
state
;
if
(
e
.
appearance
==
1
)
{
let
[
href
]
=
window
.
location
.
href
.
split
(
"/#/"
);
let
url
=
`
${
href
}
/#/commodity/business?sessionId=
${
sessionId
}
&supplier=
${
e
.
supplier
}
&brandName=
${
e
.
brandName
}
`
;
this
.
openWindows
(
url
);
}
else
if
(
e
.
appearance
==
2
)
{
let
[
href
]
=
window
.
location
.
href
.
split
(
"/#/"
);
let
url
=
`
${
href
}
/#/commodity/recharge?sessionId=
${
sessionId
}
&supplier=
${
e
.
supplier
}
&brandName=
${
e
.
brandName
}
`
;
this
.
openWindows
(
url
);
}
}
},
// 获取所有权益商品
...
...
@@ -172,8 +182,8 @@ export default {
};
},
},
destroyed
(){
window
.
removeEventListener
(
'scroll'
,
this
.
bindScrollEvent
,
false
);
destroyed
()
{
window
.
removeEventListener
(
"scroll"
,
this
.
bindScrollEvent
,
false
);
},
};
</
script
>
...
...
@@ -192,7 +202,7 @@ export default {
.left_element
{
width
:
100%
;
height
:
60px
;
background
:
#
EFF0F
2
;
background
:
#
eff0f
2
;
font-size
:
13px
;
color
:
#656566
;
display
:
flex
;
...
...
@@ -200,18 +210,18 @@ export default {
justify-content
:
center
;
}
.left_active
{
background
:
#FFF
;
background
:
#fff
;
color
:
#282829
;
font-weight
:
bold
;
}
.left_active_line
{
.left_active_line
{
position
:
absolute
;
left
:
0
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
transform
:
translate
(
0
,
-50%
);
width
:
4px
;
height
:
30px
;
background
:
#
FC5B
32
;
background
:
#
fc5b
32
;
border-radius
:
1px
;
}
}
...
...
@@ -266,8 +276,8 @@ export default {
color
:
#282829
;
font-size
:
12px
;
}
.espc
{
color
:
#
FC5B
32
;
.espc
{
color
:
#
fc5b
32
;
font-size
:
10px
;
}
}
...
...
src/views/equity/index.vue
View file @
2dcce7a
...
...
@@ -75,6 +75,7 @@
v-for=
"(ele, i) in menuList[index]"
:key=
"i"
class=
"menu_elememt"
@
click=
"toNewPage(ele)"
>
<div
class=
"menu_icon"
>
<img
:src=
"ele.equityIcon"
alt=
""
/>
...
...
@@ -143,7 +144,9 @@
<template
v-for=
"(item, index) in siftList"
>
<div
:key=
"index"
class=
"high_widget"
>
<div
class=
"left_fixed_box"
>
<div
class=
"label_icon"
></div>
<div
class=
"label_icon"
>
<img
:src=
"item.icon"
>
</div>
<div
class=
"label_text"
>
{{
item
.
equityName
}}
</div>
</div>
<div
class=
"right_box"
>
...
...
@@ -172,43 +175,50 @@
{{
item
.
localAddress
}}
</div>
<div
class=
"line"
></div>
<div
class=
"sistence"
>
距您
{{
item
.
localAddressDistance
}}
km
</div>
<div
class=
"sistence"
@
click=
"jxOpenLocation(item)"
>
距您
{{
item
.
localAddressDistance
}}
km
</div>
</div>
</div>
</div>
</
template
>
</div>
<div
v-if=
"curTabIndex == 1"
class=
"oil_serve_widget"
>
<div
class=
"oil-list-box"
v-for=
"(item, index) in oilList"
:key=
"index"
>
<div
class=
"oil-list-h"
>
<div
class=
"oil-list-img"
>
<img
:src=
"item.gasLogoSmall"
alt=
""
/>
</div>
<div
class=
"oil-list-desc"
>
<div
class=
"oil-desc-t1 text-hide"
>
{{ item.gasName }}
</div>
<div
class=
"oil-desc-t2"
>
<span>
¥{{ item.priceYfq }}/升
</span>
<span>
国标价¥{{ item.priceOfficial }}/升
</span>
<van-list
v-if=
"curTabIndex == 1"
v-model=
"loading"
:finished=
"finished"
@
load=
"getMoreOilData"
@
offset=
"300"
>
<div
class=
"oil_serve_widget"
>
<div
class=
"oil-list-box"
v-for=
"(item, index) in oilList"
:key=
"index"
@
click=
"jumpDetail(item)"
>
<div
class=
"oil-list-h"
>
<div
class=
"oil-list-img"
>
<img
:src=
"item.gasLogoSmall"
alt=
""
/>
</div>
<div
class=
"oil-list-desc"
>
<div
class=
"oil-desc-t1 text-hide"
>
{{ item.gasName }}
</div>
<div
class=
"oil-desc-t2"
>
<span>
¥{{ item.priceYfq }}/升
</span>
<span>
国标价¥{{ item.priceOfficial }}/升
</span>
</div>
<div
class=
"oil-desc-t3"
>
每升优惠 {{ item.priceReduced }} 元
</div>
</div>
<div
class=
"oil-desc-t3"
>
每升优惠 {{ item.priceReduced }} 元
</div>
</div>
</div
>
<div
class=
"oil-list-f"
>
<span
class=
"text-hide"
><van-icon
color=
"#FC5B32"
name=
"location"
class=
"location-icon"
/>
{{
item.gasAddress
}}
</span
>
<div
class=
"list-f-distance-line"
></div
>
<div
class=
"list-f-distance"
>
{{ item.distance }}km
<div
@
click
.
stop=
"openLocation(item)"
class=
"navigation-btn"
>
<
img
src=
"@a/images/equity/scrm_location_icon.png"
alt=
""
/
>
<div
class=
"oil-list-f"
>
<span
class=
"text-hide"
><van-icon
color=
"#FC5B32"
name=
"location"
class=
"location-icon"
/>
{{
item.gasAddress
}}
</span
>
<div
class=
"list-f-distance-line"
></div
>
<div
class=
"list-f-distance"
>
{{ item.distance }}km
<div
@
click
.
stop=
"openLocation(item)"
class=
"navigation-btn"
>
<img
src=
"@a/images/equity/scrm_location_icon.png"
alt=
""
/
>
<
/div
>
</div>
</div>
</div>
</div>
</
div
>
</
van-list
>
</div>
</template>
...
...
@@ -245,6 +255,8 @@ export default {
oilList
:
[],
pageNum
:
1
,
pageSize
:
10
,
loading
:
false
,
finished
:
false
,
//卡包数量
packageNumber
:
0
,
//门店套餐
...
...
@@ -300,7 +312,6 @@ export default {
}
equity
.
getFissionInfo
(
URLParams
).
then
((
res
)
=>
{
let
{
code
,
data
}
=
res
;
// this.hideLoading();
if
(
code
==
0
)
{
if
(
data
)
{
this
.
inviteUrl
=
data
.
posterUrl
;
...
...
@@ -321,7 +332,6 @@ export default {
}
else
if
(
urlObj
.
fissionUser
===
"false"
)
{
equity
.
getFissionInfo
(
URLParams
).
then
((
res
)
=>
{
let
{
code
,
data
}
=
res
;
// this.hideLoading();
if
(
code
==
0
)
{
if
(
data
)
{
if
(
data
.
presentNumber
>
0
)
{
...
...
@@ -440,7 +450,6 @@ export default {
openCard
(
data
)
{
equity
.
openCardFission
({
...
data
}).
then
((
res
)
=>
{
let
{
code
,
message
}
=
res
;
// this.hideLoading()
if
(
code
==
0
)
{
//
}
else
{
...
...
@@ -643,10 +652,19 @@ export default {
});
});
},
// 打开导航
//
加油
打开导航
openLocation
(
val
)
{
this
.
openNavigation
(
val
,
WX
);
},
// 精选打开导航
jxOpenLocation
(
item
){
let
val
=
{
gasAddressLatitude
:
item
.
lat
,
gasAddressLongitude
:
item
.
lng
,
gasAddress
:
item
.
localAddress
}
this
.
openNavigation
(
val
,
WX
);
},
// 退出登录
toLoginOut
()
{
this
.
myDialog
(
...
...
@@ -674,6 +692,21 @@ export default {
let
url
=
`
${
href
}
/#/cardRoll/cardPage?sessionId=
${
sessionId
}
`
;
this
.
openWindows
(
url
,
"cardRoll.cardPage"
);
},
// 跳转到新的页面
toNewPage
(
item
){
let
{
sessionId
}
=
this
.
$store
.
state
;
if
(
item
.
appearance
==
1
){
let
[
href
]
=
window
.
location
.
href
.
split
(
'/#/'
);
let
url
=
`
${
href
}
/#/commodity/business?sessionId=
${
sessionId
}
&supplier=
${
item
.
supplier
}
&brandName=
${
item
.
brandName
}
`
;
this
.
openWindows
(
url
)
}
else
if
(
item
.
appearance
==
2
){
let
[
href
]
=
window
.
location
.
href
.
split
(
'/#/'
);
let
url
=
`
${
href
}
/#/commodity/recharge?sessionId=
${
sessionId
}
&supplier=
${
item
.
supplier
}
&brandName=
${
item
.
brandName
}
`
;
this
.
openWindows
(
url
)
}
else
{
this
.
CarLink
(
item
);
}
},
// 跳转到权益集合
toAllEquityPage
()
{
let
{
sessionId
}
=
this
.
$store
.
state
;
...
...
@@ -690,7 +723,6 @@ export default {
},
// 精选去购买
toBuyGoods
(
goods
,
item
){
// this.jumpLink(item,goods)
let
selectedId
=
goods
.
id
let
{
sessionId
}
=
this
.
$store
.
state
;
if
(
item
.
appearance
==
1
){
...
...
@@ -719,11 +751,39 @@ export default {
let
{
code
,
data
,
message
}
=
res
;
if
(
code
==
0
)
{
this
.
oilList
=
this
.
pageNum
==
1
?
data
:
this
.
oilList
.
concat
(
data
);
this
.
loading
=
false
;
if
(
this
.
oilList
.
length
%
this
.
pageSize
!=
0
||
(
data
.
length
==
0
&&
this
.
oilList
.
length
!=
0
))
this
.
finished
=
true
}
else
{
this
.
showToast
(
message
);
}
});
},
// 跳转加油站详情
jumpDetail
(
val
)
{
const
ua
=
navigator
.
userAgent
.
toLowerCase
()
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'micromessenger'
)
{
window
.
vm
.
$router
.
push
({
name
:
'oilStation.detail'
,
query
:{
oilId
:
val
.
id
,
oilNo
:
val
.
oilNo
,
longitude
:
val
.
gasAddressLongitude
,
latitude
:
val
.
gasAddressLatitude
,
distance
:
val
.
distance
}
})
}
else
{
let
{
sessionId
}
=
this
.
$store
.
state
;
let
[
href
]
=
window
.
location
.
href
.
split
(
'/#/'
);
let
url
=
`
${
href
}
/#/oilStation/detail?sessionId=
${
sessionId
}
&oilId=
${
val
.
id
}
&&oilNo=
${
val
.
oilNo
}
&longitude=
${
val
.
gasAddressLongitude
}
&latitude=
${
val
.
gasAddressLatitude
}
&distance=
${
val
.
distance
}
`
;
this
.
openWindows
(
url
,
'oilStation.detail'
)
}
},
// 加油列表分页
getMoreOilData
()
{
if
(
this
.
oilList
.
length
!=
0
&&
this
.
oilList
.
length
%
this
.
pageSize
==
0
)
{
this
.
pageNum
=
this
.
pageNum
+
1
this
.
getStationList
()
}
},
// 数组切割
splitArr
(
arr
,
num
)
{
let
newArr
=
[];
...
...
@@ -793,11 +853,14 @@ export default {
let
data
=
[
{
supplier
:
'HW'
,
icon
:
'http://qcimg01.glsx.net:7060/group1/M00/00/21/wKgD3mD5RSyAAnfDAADXLGDvl9k971.jpg'
,
appearance
:
1
,
brandName
:
'星巴克'
,
equityName
:
'星巴克'
,
localAddress
:
'
广东省深圳市南山区塘朗崇文花园附近
'
,
localAddress
:
'
湾科技生态园
'
,
localAddressDistance
:
0.2
,
lat
:
'22.536197'
,
lng
:
'113.959296'
,
couponsGoodsList
:[
{
id
:
160
,
...
...
@@ -817,11 +880,14 @@ export default {
},
{
supplier
:
'HW'
,
icon
:
'http://qcimg01.glsx.net:7060/group1/M00/00/21/wKgD3mD5RSyAAnfDAADXLGDvl9k971.jpg'
,
appearance
:
2
,
brandName
:
'芒果TV'
,
equityName
:
'1'
,
localAddress
:
'
广东省深圳市南山区塘朗崇文花园附近
'
,
localAddress
:
'
湾科技生态园
'
,
localAddressDistance
:
0.3
,
lat
:
'22.536197'
,
lng
:
'113.959296'
,
chargeGoddsList
:[
{
productName
:
'视频会员月卡'
,
...
...
@@ -1290,7 +1356,11 @@ body {
width
:
45.34px
;
height
:
45.34px
;
border-radius
:
50%
;
background
:
brown
;
>img{
width
:
45.34px
;
height
:
45.34px
;
border-radius
:
50%
;
}
}
.label_text
{
width
:
45.34px
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment