Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
晓梦云飞
shopxo-uniapp
提交
0436f942
S
shopxo-uniapp
项目概览
晓梦云飞
/
shopxo-uniapp
与 Fork 源项目一致
Fork自
纵之格 / shopxo-uniapp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
shopxo-uniapp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0436f942
编写于
10月 22, 2021
作者:
X
xindan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
7a9607e3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
138 addition
and
138 deletion
+138
-138
App.vue
App.vue
+2
-2
common/css/plugins.css
common/css/plugins.css
+13
-13
pages.json
pages.json
+5
-5
pages/buy/buy.vue
pages/buy/buy.vue
+81
-81
pages/plugins/coupon/index/index.vue
pages/plugins/coupon/index/index.vue
+19
-19
pages/plugins/coupon/user/user.css
pages/plugins/coupon/user/user.css
+3
-3
pages/plugins/coupon/user/user.vue
pages/plugins/coupon/user/user.vue
+15
-15
未找到文件。
App.vue
浏览文件 @
0436f942
...
...
@@ -55,7 +55,7 @@
// 蓝色 blue #1677ff
// 棕色 brown #8B4513
// 紫色 purple #623cec
default_theme
:
"
blue
"
default_theme
:
"
yellow
"
},
/**
...
...
@@ -954,5 +954,5 @@
@import
'./common/css/business.css'
;
@import
'./common/css/plugins.css'
;
@import
'./common/css/lib.css'
;
@import
'./common/css/theme/
blue
.css'
;
@import
'./common/css/theme/
yellow
.css'
;
</
style
>
\ No newline at end of file
common/css/plugins.css
浏览文件 @
0436f942
/*
* 优惠劵
*/
.coupon-container
.item
{
.
plugins-
coupon-container
.item
{
overflow
:
hidden
;
height
:
180
rpx
;
}
.coupon-container
.v-left
{
.
plugins-
coupon-container
.v-left
{
width
:
calc
(
100%
-
140
rpx
);
padding
:
30
rpx
0
30
rpx
20
rpx
;
box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
-webkit-box-sizing
:
border-box
;
}
.coupon-container
.v-left
.base
{
.
plugins-
coupon-container
.v-left
.base
{
color
:
#D2364C
;
}
.coupon-container
.v-left
.base
.symbol
{
.
plugins-
coupon-container
.v-left
.base
.symbol
{
font-family
:
Verdana
,
Tahoma
;
font-weight
:
700
;
}
.coupon-container
.v-left
.base
.price
{
.
plugins-
coupon-container
.v-left
.base
.price
{
font-weight
:
700
;
font-family
:
arial
;
font-size
:
76
rpx
;
}
.coupon-container
.v-left
.base
.unit
{
.
plugins-
coupon-container
.v-left
.base
.unit
{
margin-left
:
5
rpx
;
}
.coupon-container
.v-left
.base
.desc
{
.
plugins-
coupon-container
.v-left
.base
.desc
{
margin-left
:
20
rpx
;
}
.coupon-container
.v-left
base-tips
,
.coupon-container
.v-left
.base-time
{
.
plugins-
coupon-container
.v-left
base-tips
,
.
plugins-
coupon-container
.v-left
.base-time
{
margin-top
:
10
rpx
;
}
.coupon-container
.v-right
{
.
plugins-
coupon-container
.v-right
{
background
:
#d2364c
;
width
:
140
rpx
;
height
:
180
rpx
;
...
...
@@ -43,13 +43,13 @@
position
:
relative
;
text-align
:
center
;
}
.coupon-container
.v-right
:before
{
.
plugins-
coupon-container
.v-right
:before
{
content
:
''
;
display
:
inline-block
;
height
:
100%
;
vertical-align
:
middle
;
}
.coupon-container
.v-right
.circle
{
.
plugins-
coupon-container
.v-right
.circle
{
display
:
block
;
position
:
absolute
;
left
:
-1px
;
...
...
@@ -58,7 +58,7 @@
height
:
180
rpx
;
background
:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAACpCAYAAADur4c3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3MjUzYzIwOS04ZWNlLTRlNTctODQ4OC01ZDExOTkwOGNkYmMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTM1QzgxREZGRDI5MTFFNTg3QjhGRUQ1MDY5OURERUQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTM1QzgxREVGRDI5MTFFNTg3QjhGRUQ1MDY5OURERUQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTJiNzVkOGUtZDc2Yi00MzEzLWFmNmYtYTJkNTRlYTI4YTY1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjcyNTNjMjA5LThlY2UtNGU1Ny04NDg4LTVkMTE5OTA4Y2RiYyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pvy+vnQAAAEqSURBVHjaYvz//z8DDDAxIAFyOVeBOAHEYfyPMDsLmXMfmfMT2YADDP8h4CEQq4A4aUDMA1LNSKZDXwJxGcg1yJaWIXOeInO+IxuwA+acK0AsA+IEADEbic7hhPOAer4DcQcQMyNb2oLMeYVsADcyZwPMObuBWBTEsQFpI9E54sjO+QvEc0F+YoHKJgHxJ2TnvEM2gBmZswrmnA1AzAXiaJPhHC1k58BNQ3bBTGTOR2QD/iJzFsH8Mw/kHxBHggzn2KA7BxzWyC5Yisz5imwACmc2LLY7QbEN4nCS4ZwAIGZFds5lUEpEdsF6nKn3PTJnAsiAV0BcBsSM5GamFCDmQXYOOJ8iu2Anzrz9HKU8ABlwDYgTKcnbo0XNaFEzWtQgipqOYVLUAAQYAKPWa4c8cIHnAAAAAElFTkSuQmCC)
no-repeat
;
}
.coupon-container
.item-disabled
.v-right
{
.
plugins-
coupon-container
.item-disabled
.v-right
{
background
:
#dfdfdf
!important
;
color
:
#c0c0c0
!important
;
cursor
:
no-drop
!important
;
...
...
pages.json
浏览文件 @
0436f942
...
...
@@ -630,31 +630,31 @@
"subPackages"
:
[],
"tabBar"
:
{
"color"
:
"#8a8a8a"
,
"selectedColor"
:
"#
3333
33"
,
"selectedColor"
:
"#
f6c1
33"
,
"backgroundColor"
:
"#fff"
,
"list"
:
[
{
"pagePath"
:
"pages/index/index"
,
"iconPath"
:
"/static/images/common/tabbar/home.png"
,
"selectedIconPath"
:
"/static/images/
black
/tabbar/home.png"
,
"selectedIconPath"
:
"/static/images/
yellow
/tabbar/home.png"
,
"text"
:
"首页"
},
{
"pagePath"
:
"pages/goods-category/goods-category"
,
"iconPath"
:
"/static/images/common/tabbar/category.png"
,
"selectedIconPath"
:
"/static/images/
black
/tabbar/category.png"
,
"selectedIconPath"
:
"/static/images/
yellow
/tabbar/category.png"
,
"text"
:
"分类"
},
{
"pagePath"
:
"pages/cart/cart"
,
"iconPath"
:
"/static/images/common/tabbar/cart.png"
,
"selectedIconPath"
:
"/static/images/
black
/tabbar/cart.png"
,
"selectedIconPath"
:
"/static/images/
yellow
/tabbar/cart.png"
,
"text"
:
"购物车"
},
{
"pagePath"
:
"pages/user/user"
,
"iconPath"
:
"/static/images/common/tabbar/user.png"
,
"selectedIconPath"
:
"/static/images/
black
/tabbar/user.png"
,
"selectedIconPath"
:
"/static/images/
yellow
/tabbar/user.png"
,
"text"
:
"我的"
}
]
...
...
pages/buy/buy.vue
浏览文件 @
0436f942
<
template
>
<view>
<block
v-if=
"common_site_type == 1"
>
<block
v-if=
"common_site_type == 1"
>
<component-no-data
prop-status=
"2"
prop-msg=
"展示型不允许提交订单"
></component-no-data>
</block>
<block
v-else
>
<view
v-if=
"goods_list.length > 0"
class=
"page"
>
<!-- 销售+自提 模式选择 -->
<view
v-if=
"common_site_type == 4"
class=
"buy-header-nav bg-white oh tc"
>
<block
v-for=
"(item, index) in buy_header_nav"
:key=
"index"
>
<view
:class=
"'item fl ' + (site_model == item.value ? 'cr-main' : 'cr-base')"
:data-value=
"item.value"
@
tap=
"buy_header_nav_event"
>
{{
item
.
name
}}
</view>
</block>
</view>
<view
v-if=
"goods_list.length > 0"
class=
"page"
>
<!-- 销售+自提 模式选择 -->
<view
v-if=
"common_site_type == 4"
class=
"buy-header-nav bg-white oh tc"
>
<block
v-for=
"(item, index) in buy_header_nav"
:key=
"index"
>
<view
:class=
"'item fl ' + (site_model == item.value ? 'cr-main' : 'cr-base')"
:data-value=
"item.value"
@
tap=
"buy_header_nav_event"
>
{{
item
.
name
}}
</view>
</block>
</view>
<view
class=
"padding-horizontal-main padding-top-main"
>
<!-- 地址 -->
<view
v-if=
"common_site_type == 0 || common_site_type == 2 || common_site_type == 4"
class=
"padding-horizontal-main padding-top-main border-radius-main bg-white spacing-mb"
>
...
...
@@ -55,7 +55,7 @@
<view
class=
"goods-base"
>
<view
class=
"goods-title multi-text"
>
{{
item
.
title
}}
</view>
<view
v-if=
"item.spec != null"
class=
"margin-top-xs cr-gray"
>
<block
v-for=
"(spec, si) in item.spec"
:key=
"si"
>
<block
v-for=
"(spec, si) in item.spec"
:key=
"si"
>
<text
v-if=
"si > 0"
>
;
</text>
<text>
{{
spec
.
value
}}
</text>
</block>
...
...
@@ -64,7 +64,7 @@
<text
class=
"fw-b"
>
{{
currency_symbol
}}{{
item
.
price
}}
</text>
<text
v-if=
"item.original_price > 0"
class=
"original-price margin-left-sm"
>
{{
currency_symbol
}}{{
item
.
original_price
}}
</text>
<text
class=
"buy-number pa cr-gray"
>
x
{{
item
.
stock
}}
</text>
</view>
</view>
</view>
</view>
<!-- 优惠劵 -->
...
...
@@ -117,7 +117,7 @@
</view>
</view>
</view>
</view>
</view>
<!-- 导航 -->
<view
class=
"buy-nav oh wh-auto bg-white br-t"
>
...
...
@@ -131,7 +131,7 @@
</view>
</view>
<view
v-if=
"goods_list.length == 0"
>
<view
v-if=
"goods_list.length == 0"
>
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
</view>
...
...
@@ -143,7 +143,7 @@
<icon
type=
"clear"
size=
"20"
></icon>
</view>
</view>
<view
v-if=
"plugins_coupon_list.length > 0"
class=
"coupon-container padding-horizontal-main padding-bottom-main oh"
>
<view
v-if=
"plugins_coupon_list.length > 0"
class=
"
plugins-
coupon-container padding-horizontal-main padding-bottom-main oh"
>
<view
class=
"not-use-tips tc"
>
<text
@
tap=
"plugins_coupon_not_use_event"
>
不使用优惠劵
</text>
</view>
...
...
@@ -177,13 +177,13 @@
<
script
>
const
app
=
getApp
();
import
componentQuickNav
from
"
../../components/quick-nav/quick-nav
"
;
import
componentPopup
from
"
../../components/popup/popup
"
;
import
componentPopup
from
"
../../components/popup/popup
"
;
import
componentNoData
from
"
../../components/no-data/no-data
"
;
var
common_static_url
=
app
.
globalData
.
get_static_url
(
'
common
'
);
export
default
{
data
()
{
return
{
return
{
common_static_url
:
common_static_url
,
data_list_loding_status
:
1
,
buy_submit_disabled_status
:
false
,
...
...
@@ -202,15 +202,15 @@
common_site_type
:
0
,
extraction_address
:
[],
site_model
:
0
,
buy_header_nav
:
[
{
name
:
"
快递邮寄
"
,
value
:
0
},
{
name
:
"
自提点取货
"
,
value
:
2
}
buy_header_nav
:
[
{
name
:
"
快递邮寄
"
,
value
:
0
},
{
name
:
"
自提点取货
"
,
value
:
2
}
],
// 基础配置
currency_symbol
:
app
.
globalData
.
data
.
currency_symbol
,
common_order_is_booking
:
0
,
// 优惠劵
plugins_coupon_data
:
null
,
plugins_coupon_data
:
null
,
plugins_coupon_list
:
[],
plugins_use_coupon_ids
:
[],
plugins_choice_coupon_value
:
[],
...
...
@@ -224,7 +224,7 @@
components
:
{
componentQuickNav
,
componentPopup
,
componentPopup
,
componentNoData
},
props
:
{},
...
...
@@ -235,19 +235,19 @@
this
.
setData
({
params
:
JSON
.
parse
(
decodeURIComponent
(
params
.
data
))
});
// 删除地址缓存
uni
.
removeStorageSync
(
app
.
globalData
.
data
.
cache_buy_user_address_select_key
);
}
},
onShow
()
{
onShow
()
{
// 数据加载
this
.
init
();
this
.
setData
({
is_first
:
0
});
// 初始化配置
this
.
init_config
();
},
...
...
@@ -330,7 +330,7 @@
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
plugins_points_data
:
data
.
plugins_points_data
||
null
});
// 优惠劵选择处理
if
((
data
.
plugins_coupon_data
||
null
)
!=
null
)
{
var
plugins_choice_coupon_value
=
[];
...
...
@@ -340,7 +340,7 @@
if
((
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_choice
'
]
||
null
)
!=
null
)
{
plugins_choice_coupon_value
[
cupk
]
=
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_choice
'
][
'
coupon
'
][
'
desc
'
];
}
else
{
var
coupon_count
=
(
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_list
'
]
||
null
)
!=
null
?
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
].
coupon_list
.
length
:
0
;
var
coupon_count
=
(
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
][
'
coupon_list
'
]
||
null
)
!=
null
?
data
.
plugins_coupon_data
[
i
][
'
coupon_data
'
].
coupon_list
.
length
:
0
;
plugins_choice_coupon_value
[
cupk
]
=
coupon_count
>
0
?
'
可选优惠劵
'
+
coupon_count
+
'
张
'
:
'
暂无可用优惠劵
'
;
}
}
...
...
@@ -359,7 +359,7 @@
key
:
app
.
globalData
.
data
.
cache_buy_user_address_select_key
,
data
:
data
.
base
.
address
||
null
});
// 支付方式
this
.
payment_list_data
(
data
.
payment_list
);
}
...
...
@@ -393,8 +393,8 @@
for
(
var
i
in
coupon_ids
)
{
data
[
'
coupon_id_
'
+
i
]
=
coupon_ids
[
i
];
}
}
}
// 积分
data
[
'
is_points
'
]
=
this
.
plugins_points_status
===
true
?
1
:
0
;
return
data
;
...
...
@@ -429,7 +429,7 @@
data
[
'
payment_id
'
]
=
this
.
payment_id
;
data
[
'
user_note
'
]
=
this
.
user_note_value
;
data
[
'
site_model
'
]
=
this
.
site_model
;
// 数据验证
var
validation
=
[];
if
(
this
.
common_site_type
==
0
||
this
.
common_site_type
==
2
||
this
.
common_site_type
==
4
)
{
...
...
@@ -503,7 +503,7 @@
// 支付方式数据处理
payment_list_data
(
data
)
{
if
(
this
.
payment_id
!=
0
)
{
for
(
var
i
in
data
)
{
for
(
var
i
in
data
)
{
data
[
i
][
'
selected
'
]
=
(
data
[
i
][
'
id
'
]
==
this
.
payment_id
)
?
'
cr-main br-main
'
:
''
;
}
}
...
...
@@ -513,17 +513,17 @@
},
// 优惠劵弹层开启
plugins_coupon_open_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
plugins_coupon_data
[
index
][
'
coupon_data
'
][
'
coupon_list
'
];
// 选中处理
if
(
temp_list
.
length
>
0
)
{
var
temp_ids
=
this
.
plugins_use_coupon_ids
;
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
(
temp_ids
.
indexOf
(
temp_list
[
i
][
'
id
'
])
!=
-
1
)
?
1
:
0
;
}
plugins_coupon_open_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
temp_list
=
this
.
plugins_coupon_data
[
index
][
'
coupon_data
'
][
'
coupon_list
'
];
// 选中处理
if
(
temp_list
.
length
>
0
)
{
var
temp_ids
=
this
.
plugins_use_coupon_ids
;
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
(
temp_ids
.
indexOf
(
temp_list
[
i
][
'
id
'
])
!=
-
1
)
?
1
:
0
;
}
}
this
.
setData
({
this
.
setData
({
plugins_coupon_list
:
temp_list
,
popup_plugins_coupon_status
:
true
,
popup_plugins_coupon_index
:
index
...
...
@@ -538,48 +538,48 @@
},
// 优惠劵选择
plugins_coupon_use_event
(
e
)
{
plugins_coupon_use_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
var
temp_ids
=
this
.
plugins_use_coupon_ids
;
if
(
this
.
popup_plugins_coupon_index
!==
null
&&
temp_ids
.
indexOf
(
value
)
==
-
1
)
{
var
temp_data
=
this
.
plugins_coupon_data
[
this
.
popup_plugins_coupon_index
];
var
temp_list
=
this
.
plugins_coupon_list
;
// 选中处理
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
(
index
==
i
)
?
1
:
0
;
}
// 根据仓库id和优惠券id记录
temp_ids
[
temp_data
[
'
warehouse_id
'
]]
=
value
;
this
.
setData
({
plugins_use_coupon_ids
:
temp_ids
,
plugins_coupon_list
:
temp_list
,
popup_plugins_coupon_status
:
false
});
// 重新获取数据
this
.
init
();
var
temp_ids
=
this
.
plugins_use_coupon_ids
;
if
(
this
.
popup_plugins_coupon_index
!==
null
&&
temp_ids
.
indexOf
(
value
)
==
-
1
)
{
var
temp_data
=
this
.
plugins_coupon_data
[
this
.
popup_plugins_coupon_index
];
var
temp_list
=
this
.
plugins_coupon_list
;
// 选中处理
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
(
index
==
i
)
?
1
:
0
;
}
// 根据仓库id和优惠券id记录
temp_ids
[
temp_data
[
'
warehouse_id
'
]]
=
value
;
this
.
setData
({
plugins_use_coupon_ids
:
temp_ids
,
plugins_coupon_list
:
temp_list
,
popup_plugins_coupon_status
:
false
});
// 重新获取数据
this
.
init
();
}
},
// 不使用优惠劵
plugins_coupon_not_use_event
(
e
)
{
if
(
this
.
popup_plugins_coupon_index
!==
null
)
{
var
temp_data
=
this
.
plugins_coupon_data
[
this
.
popup_plugins_coupon_index
];
var
temp_list
=
this
.
plugins_coupon_list
;
var
temp
=
this
.
plugins_use_coupon_ids
;
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
0
;
}
temp
[
temp_data
[
'
warehouse_id
'
]]
=
0
;
this
.
setData
({
plugins_coupon_list
:
temp_list
,
plugins_use_coupon_ids
:
temp
,
popup_plugins_coupon_status
:
false
});
this
.
init
();
plugins_coupon_not_use_event
(
e
)
{
if
(
this
.
popup_plugins_coupon_index
!==
null
)
{
var
temp_data
=
this
.
plugins_coupon_data
[
this
.
popup_plugins_coupon_index
];
var
temp_list
=
this
.
plugins_coupon_list
;
var
temp
=
this
.
plugins_use_coupon_ids
;
for
(
var
i
in
temp_list
)
{
temp_list
[
i
][
'
is_active
'
]
=
0
;
}
temp
[
temp_data
[
'
warehouse_id
'
]]
=
0
;
this
.
setData
({
plugins_coupon_list
:
temp_list
,
plugins_use_coupon_ids
:
temp
,
popup_plugins_coupon_status
:
false
});
this
.
init
();
}
},
...
...
@@ -608,10 +608,10 @@
address_id
:
null
,
site_model
:
value
});
// 删除地址缓存
uni
.
removeStorageSync
(
app
.
globalData
.
data
.
cache_buy_user_address_select_key
);
uni
.
removeStorageSync
(
app
.
globalData
.
data
.
cache_buy_user_address_select_key
);
// 数据初始化
this
.
init
();
}
...
...
pages/plugins/coupon/index/index.vue
浏览文件 @
0436f942
<
template
>
<view>
<view>
<view
v-if=
"(data_base || null) != null && (data_base.banner_images || null) != null"
class=
"padding-horizontal-main padding-top-main"
>
<image
class=
"wh-auto dis-block border-radius-main"
:src=
"data_base.banner_images"
mode=
"widthFix"
></image>
<image
class=
"wh-auto dis-block border-radius-main"
:src=
"data_base.banner_images"
mode=
"widthFix"
></image>
</view>
<!-- 优惠劵列表 -->
<view
v-if=
"data_list.length > 0"
class=
"coupon-container padding-horizontal-main padding-top-main"
>
<view
v-if=
"data_list.length > 0"
class=
"
plugins-
coupon-container padding-horizontal-main padding-top-main"
>
<block
v-for=
"(item, index) in data_list"
:key=
"index"
>
<view
:class=
"'item border-radius-main bg-white spacing-mb ' + (item.is_operable == 0 ? 'item-disabled' : '')"
>
<view
class=
"v-left fl"
>
...
...
@@ -24,18 +24,18 @@
</view>
</block>
</view>
<view
v-else
>
<!-- 提示信息 -->
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
<view
v-else
>
<!-- 提示信息 -->
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
</view>
<!-- 结尾 -->
<!-- 结尾 -->
<component-bottom-line
:prop-status=
"data_bottom_line_status"
></component-bottom-line>
</view>
</
template
>
<
script
>
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
import
componentBottomLine
from
"
../../../../components/bottom-line/bottom-line
"
;
export
default
{
...
...
@@ -54,9 +54,9 @@
};
},
components
:
{
componentNoData
,
componentBottomLine
components
:
{
componentNoData
,
componentBottomLine
},
props
:
{},
...
...
@@ -67,8 +67,8 @@
onShow
()
{
// 数据加载
this
.
init
();
this
.
init
();
// 初始化配置
this
.
init_config
();
},
...
...
@@ -144,8 +144,8 @@
data_list_loding_msg
:
''
,
data_list_loding_status
:
status
?
3
:
0
,
data_bottom_line_status
:
status
});
});
// 导航名称
if
((
data
.
base
||
null
)
!=
null
&&
(
data
.
base
.
application_name
||
null
)
!=
null
)
{
uni
.
setNavigationBarTitle
({
...
...
@@ -187,8 +187,8 @@
temp_coupon_receive_index
:
index
,
temp_coupon_receive_value
:
value
});
}
}
// 登录校验
var
user
=
app
.
globalData
.
get_user_info
(
this
,
'
coupon_receive_event
'
);
if
(
user
!=
false
)
{
...
...
@@ -240,6 +240,6 @@
}
}
};
</
script
>
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/plugins/coupon/user/user.css
浏览文件 @
0436f942
...
...
@@ -15,8 +15,8 @@
.scroll-box
{
height
:
calc
(
100vh
-
80
rpx
);
}
.coupon-container
.item
,
.coupon-container
.v-right
,
.coupon-container
.v-right
.circle
{
.
plugins-
coupon-container
.item
,
.
plugins-
coupon-container
.v-right
,
.
plugins-
coupon-container
.v-right
.circle
{
height
:
230
rpx
;
}
\ No newline at end of file
pages/plugins/coupon/user/user.vue
浏览文件 @
0436f942
...
...
@@ -8,7 +8,7 @@
</view>
<scroll-view
:scroll-y=
"true"
class=
"scroll-box"
lower-threshold=
"30"
>
<!-- 优惠劵列表 -->
<view
v-if=
"data_list != null"
class=
"coupon-container padding-horizontal-main padding-top-main"
>
<view
v-if=
"data_list != null"
class=
"
plugins-
coupon-container padding-horizontal-main padding-top-main"
>
<!-- 未使用 -->
<block
v-if=
"(data_list.not_use || null) != null && data_list.not_use.length > 0 && nav_tabs_value == 'not_use'"
>
<block
v-for=
"(item, index) in data_list.not_use"
:key=
"index"
>
...
...
@@ -77,18 +77,18 @@
</block>
</block>
</view>
<!-- 提示信息 -->
<!-- 提示信息 -->
<component-no-data
:prop-status=
"data_list_loding_status"
:prop-msg=
"data_list_loding_msg"
></component-no-data>
<!-- 结尾 -->
<!-- 结尾 -->
<component-bottom-line
:prop-status=
"data_bottom_line_status"
></component-bottom-line>
</scroll-view>
</view>
</
template
>
<
script
>
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
const
app
=
getApp
();
import
componentNoData
from
"
../../../../components/no-data/no-data
"
;
import
componentBottomLine
from
"
../../../../components/bottom-line/bottom-line
"
;
export
default
{
...
...
@@ -98,10 +98,10 @@
data_list_loding_status
:
1
,
data_list_loding_msg
:
''
,
data_list
:
null
,
nav_tabs_list
:
[
{
name
:
"
未使用
"
,
value
:
"
not_use
"
},
{
name
:
"
已使用
"
,
value
:
"
already_use
"
},
{
name
:
"
已过期
"
,
value
:
"
already_expire
"
},
nav_tabs_list
:
[
{
name
:
"
未使用
"
,
value
:
"
not_use
"
},
{
name
:
"
已使用
"
,
value
:
"
already_use
"
},
{
name
:
"
已过期
"
,
value
:
"
already_expire
"
},
],
nav_tabs_value
:
'
not_use
'
,
// 基础配置
...
...
@@ -109,16 +109,16 @@
};
},
components
:
{
componentNoData
,
componentBottomLine
components
:
{
componentNoData
,
componentBottomLine
},
props
:
{},
onShow
()
{
// 数据加载
this
.
init
();
this
.
init
();
// 初始化配置
this
.
init_config
();
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录