"vscode:/vscode.git/clone" did not exist on "4e73947f50d92102652cf5b126faa7da97a8c350"
Commit bd41479a authored by Junling Bu's avatar Junling Bu
Browse files

feat[litemall-wx]: 小商场前端支持优惠券

parent 80ffb92f
<view class="container">
<scroll-view class="coupon-list" scroll-y="true" scroll-top="{{scrollTop}}">
<view class="unselect" bindtap='unselectCoupon'>不选择优惠券</view>
<view class="item" wx:for="{{couponList}}" wx:for-index="index" wx:for-item="item" wx:key="id" bindtap="selectCoupon" data-id="{{item.id}}">
<view class="tag">{{item.tag}}</view>
<view class="content">
<view class="left">
<view class="discount">{{item.discount}}元</view>
<view class="min"> 满{{item.min}}元使用</view>
</view>
<view class="right">
<view class="name">{{item.name}}</view>
<view class="time"> 有效期:{{item.startTime}} - {{item.endTime}}</view>
</view>
</view>
<view class="condition">
<text class="txt">{{item.desc}}</text>
<image src="{{item.pic}}" class="icon"></image>
</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
page {
background: #f4f4f4;
min-height: 100%;
}
.container {
background: #f4f4f4;
min-height: 100%;
padding-top: 30rpx;
}
.coupon-list {
width: 750rpx;
height: 100%;
overflow: hidden;
}
.unselect {
height: 80rpx;
border: none;
width: 700rpx;
background: #28b43b;
color: #fff;
font-size: 40rpx;
text-align: center;
margin-bottom: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
}
.item {
position: relative;
height: 290rpx;
width: 700rpx;
background: linear-gradient(to right, #cfa568, #e3bf79);
margin-bottom: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
padding-top: 52rpx;
}
.tag {
height: 32rpx;
background: #a48143;
padding-left: 16rpx;
padding-right: 16rpx;
position: absolute;
left: 20rpx;
color: #fff;
top: 20rpx;
font-size: 20rpx;
text-align: center;
line-height: 32rpx;
}
.content {
margin-top: 24rpx;
margin-left: 40rpx;
display: flex;
margin-right: 40rpx;
flex-direction: row;
}
.content .left {
flex: 1;
}
.discount {
font-size: 50rpx;
color: #b4282d;
}
.min {
color: #fff;
}
.content .right {
width: 400rpx;
}
.name {
font-size: 44rpx;
color: #fff;
margin-bottom: 14rpx;
}
.time {
font-size: 24rpx;
color: #fff;
line-height: 30rpx;
}
.condition {
position: absolute;
width: 100%;
bottom: 0;
left: 0;
height: 78rpx;
background: rgba(0, 0, 0, 0.08);
padding: 24rpx 40rpx;
display: flex;
flex-direction: row;
}
.condition .txt {
display: block;
height: 30rpx;
flex: 1;
overflow: hidden;
font-size: 24rpx;
line-height: 30rpx;
color: #fff;
}
.condition .icon {
margin-left: 30rpx;
width: 24rpx;
height: 24rpx;
}
\ No newline at end of file
...@@ -91,20 +91,15 @@ Page({ ...@@ -91,20 +91,15 @@ Page({
}; };
}, },
goCoupon() { goCoupon() {
wx.showToast({ if (this.data.hasLogin) {
title: '目前不支持', wx.navigateTo({
icon: 'none', url: "/pages/ucenter/couponList/couponList"
duration: 2000 });
}); } else {
// if (this.data.hasLogin) { wx.navigateTo({
// wx.navigateTo({ url: "/pages/auth/login/login"
// url: "/pages/ucenter/coupon/coupon" });
// }); };
// } else {
// wx.navigateTo({
// url: "/pages/auth/login/login"
// });
// };
}, },
goGroupon() { goGroupon() {
if (this.data.hasLogin) { if (this.data.hasLogin) {
......
{ {
"description": "项目配置文件。", "description": "项目配置文件。",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
"postcss": true, "postcss": true,
"minified": true, "minified": true,
"newFeature": true, "newFeature": true,
"uglifyFileName": true "uglifyFileName": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.4.0", "libVersion": "2.4.0",
"appid": "wxa5b486c6b918ecfb", "appid": "wxa5b486c6b918ecfb",
"projectname": "litemall-wx", "projectname": "litemall-wx",
"condition": { "condition": {
"search": { "search": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"conversation": { "conversation": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": { "plugin": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"game": { "game": {
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 34, "current": 37,
"list": [ "list": [
{ {
"id": -1, "id": -1,
"name": "首页", "name": "首页",
"pathName": "pages/index/index", "pathName": "pages/index/index",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "专题", "name": "专题",
"pathName": "pages/topic/topic", "pathName": "pages/topic/topic",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "专题详情", "name": "专题详情",
"pathName": "pages/topicDetail/topicDetail", "pathName": "pages/topicDetail/topicDetail",
"query": "id=314" "query": "id=314"
}, },
{ {
"id": -1, "id": -1,
"name": "专题评论列表", "name": "专题评论列表",
"pathName": "pages/topicComment/topicComment", "pathName": "pages/topicComment/topicComment",
"query": "valueId=314&type=1" "query": "valueId=314&type=1"
}, },
{ {
"id": -1, "id": -1,
"name": "专题评论添加", "name": "专题评论添加",
"pathName": "pages/topicCommentPost/topicCommentPost", "pathName": "pages/topicCommentPost/topicCommentPost",
"query": "valueId=314&type=1" "query": "valueId=314&type=1"
}, },
{ {
"id": -1, "id": -1,
"name": "品牌", "name": "品牌",
"pathName": "pages/brand/brand", "pathName": "pages/brand/brand",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "品牌详情", "name": "品牌详情",
"pathName": "pages/brandDetail/brandDetail", "pathName": "pages/brandDetail/brandDetail",
"query": "id=1001000" "query": "id=1001000"
}, },
{ {
"id": -1, "id": -1,
"name": "人气推荐", "name": "人气推荐",
"pathName": "pages/hotGoods/hotGoods", "pathName": "pages/hotGoods/hotGoods",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "新品首发", "name": "新品首发",
"pathName": "pages/newGoods/newGoods", "pathName": "pages/newGoods/newGoods",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "分类", "name": "分类",
"pathName": "pages/catalog/catalog", "pathName": "pages/catalog/catalog",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "分类详情", "name": "分类详情",
"pathName": "pages/category/category", "pathName": "pages/category/category",
"query": "id=1008002" "query": "id=1008002"
}, },
{ {
"id": -1, "id": -1,
"name": "查找", "name": "查找",
"pathName": "pages/search/search", "pathName": "pages/search/search",
"query": "" "query": ""
}, },
{ {
"id": 12, "id": 12,
"name": "商品", "name": "商品",
"pathName": "pages/goods/goods", "pathName": "pages/goods/goods",
"query": "id=1181003" "query": "id=1181003"
}, },
{ {
"id": -1, "id": -1,
"name": "商品评论列表", "name": "商品评论列表",
"pathName": "pages/comment/comment", "pathName": "pages/comment/comment",
"query": "valueId=1181000&type=0" "query": "valueId=1181000&type=0"
}, },
{ {
"id": -1, "id": -1,
"name": "购物车", "name": "购物车",
"pathName": "pages/cart/cart", "pathName": "pages/cart/cart",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "下单", "name": "下单",
"pathName": "pages/checkout/checkout", "pathName": "pages/checkout/checkout",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "支付结果", "name": "支付结果",
"pathName": "pages/payResult/payResult", "pathName": "pages/payResult/payResult",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的", "name": "我的",
"pathName": "pages/ucenter/index/index", "pathName": "pages/ucenter/index/index",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的订单列表", "name": "我的订单列表",
"pathName": "pages/ucenter/order/order", "pathName": "pages/ucenter/order/order",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的订单详情", "name": "我的订单详情",
"pathName": "pages/ucenter/orderDetail/orderDetail", "pathName": "pages/ucenter/orderDetail/orderDetail",
"query": "id=1" "query": "id=1"
}, },
{ {
"id": 22, "id": 22,
"name": "待评价的订单详情", "name": "待评价的订单详情",
"pathName": "pages/ucenter/orderDetail/orderDetail", "pathName": "pages/ucenter/orderDetail/orderDetail",
"query": "id=1" "query": "id=1"
}, },
{ {
"id": -1, "id": -1,
"name": "购买商品评价", "name": "购买商品评价",
"pathName": "pages/commentPost/commentPost", "pathName": "pages/commentPost/commentPost",
"query": "orderId=2&type=0&valueId=1116011" "query": "orderId=2&type=0&valueId=1116011"
}, },
{ {
"id": -1, "id": -1,
"name": "我的优惠券", "name": "我的优惠券",
"pathName": "pages/ucenter/coupon/coupon", "pathName": "pages/ucenter/coupon/coupon",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的收藏", "name": "我的收藏",
"pathName": "pages/ucenter/collect/collect", "pathName": "pages/ucenter/collect/collect",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的足迹", "name": "我的足迹",
"pathName": "pages/ucenter/footprint/footprint", "pathName": "pages/ucenter/footprint/footprint",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的地址", "name": "我的地址",
"pathName": "pages/ucenter/address/address", "pathName": "pages/ucenter/address/address",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "我的地址添加", "name": "我的地址添加",
"pathName": "pages/ucenter/addressAdd/addressAdd", "pathName": "pages/ucenter/addressAdd/addressAdd",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "登录", "name": "登录",
"pathName": "pages/auth/login/login", "pathName": "pages/auth/login/login",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "账号登录", "name": "账号登录",
"pathName": "pages/auth/accountLogin/accountLogin", "pathName": "pages/auth/accountLogin/accountLogin",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "注册", "name": "注册",
"pathName": "pages/auth/register/register", "pathName": "pages/auth/register/register",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "找回密码", "name": "找回密码",
"pathName": "pages/auth/reset/reset", "pathName": "pages/auth/reset/reset",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "关于", "name": "关于",
"pathName": "pages/about/about", "pathName": "pages/about/about",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "测试更新", "name": "测试更新",
"pathName": "pages/index/index", "pathName": "pages/index/index",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "意见反馈", "name": "意见反馈",
"pathName": "pages/ucenter/feedback/feedback", "pathName": "pages/ucenter/feedback/feedback",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "团购专区", "name": "团购专区",
"pathName": "pages/groupon/grouponList/grouponList", "pathName": "pages/groupon/grouponList/grouponList",
"query": "" "query": ""
} },
] {
} "id": -1,
} "name": "选择优惠券",
"pathName": "pages/ucenter/couponSelect/couponSelect",
"query": ""
},
{
"id": -1,
"name": "我的优惠券列表",
"pathName": "pages/ucenter/couponList/couponList",
"query": ""
},
{
"id": -1,
"name": "优惠券列表",
"pathName": "pages/coupon/coupon"
}
]
}
}
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment