1.新版本2.0开发 优惠券

yj-dev
杨杰 2 years ago
parent fc1c7ef2a1
commit a2c977b64e
  1. 16
      App.vue
  2. 20
      pages.json
  3. 85
      pages/goods/goods-list/goods-list.vue
  4. 47
      pages/goods/goods.vue
  5. 72
      pages/user/coupon/coupon.vue
  6. 13
      pages/user/news/news.vue
  7. BIN
      static/img/user/user15.png
  8. BIN
      static/img/user/user16.png
  9. 4
      uni.scss

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest', // brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl: 'https://hsg.dctpay.com/brest', // brestUrl: 'https://hsg.dctpay.com/brest',
imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
// //
// url: 'https://hsgcs.dctpay.com/crest', url: 'https://hsgcs.dctpay.com/crest',
// brestUrl: 'https://hsgcs.dctpay.com/brest', brestUrl: 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "", userInfo: "",
brestUserInfo: '', brestUserInfo: '',
bresthighAgent: '', bresthighAgent: '',

@ -1,20 +1,20 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/user/news/news", "path": "pages/welcome/welcome",
"style": { "style": {
"navigationBarTitleText": "消息", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },{
"path": "pages/welcome/welcome", "path": "pages/user/news/news",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "消息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, { },{
"path": "pages/tabBar/home/home", "path": "pages/tabBar/home/home",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
@ -234,9 +234,9 @@
"path": "pages/user/coupon/coupon", "path": "pages/user/coupon/coupon",
"style": { "style": {
"navigationBarTitleText": "优惠券", "navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#ffffff",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#f3f3f3",
"navigationBarTextStyle": "white", "backgroundColorBottom": "#ffffff",
"app-plus": { "app-plus": {
"bounce": "none" "bounce": "none"
} }

@ -20,34 +20,35 @@
</view> </view>
<view class="width90 mart20 marb20 alijus"> <view class="width90 mart20 marb20 alijus">
<view class="font16 fcor333 paddtop5 paddbotm5 margle20 marRight20" v-for="(item,index) in cateTypeList" @click="switchid(item)" <view class="font16 fcor333 paddtop5 paddbotm5 margle20 marRight20" v-for="(item,index) in cateTypeList"
:class="[goodtyid == item.id ? 'fcor089 borbtom fontwig6' : '']" :key="index">{{item.title}}</view> @click="switchid(item)" :class="[goodtyid == item.id ? 'fcor089 borbtom fontwig6' : '']" :key="index">
{{item.title}}</view>
</view> </view>
<view v-if="goodsList == '' " class="mart60 fotct font14 fcor666"> <view v-if="goodsList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="width90 height110 mart5" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)"> <view class="width90 height110 mart10 backcorfff border-8r alijusstart" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)">
<image class="goodsimg flleft mart5" mode="widthFix" :src="imageUrl+row.couponImg"></image> <image class="goodsimg mart5" mode="widthFix" :src="imageUrl+row.couponImg"></image>
<view class="goodsli "> <view class="goodsli width65">
<view class="text2 fcor333 font14 fontwig6">{{row.couponName}}</view> <view class="text1 fcor333 font16 fontwig6">{{row.couponName}}</view>
<view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view> <view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view>
<view class="info mart10"> <view class="alijusstart mart10">
<view class="price" v-if="typeId == 2"> <!-- <view class="price" v-if="typeId == 2">
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png"> <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png">
</image> {{ row.discountPrice*100}} </image> {{ row.discountPrice*100}}
</view> </view> -->
<view class="price" v-if="typeId == 1 || typeId == 3 || typeId == 5"> <view class="price">
{{ row.discountPrice}} {{ row.discountPrice}}
</view> </view>
<!-- v-if="product.discountPrice !== product.salesPrice" --> <!-- v-if="product.discountPrice !== product.salesPrice" -->
<view class="slogan" v-if="row.discountPrice !== row.salesPrice"> <view class="slogan margle10" v-if="row.discountPrice !== row.salesPrice">
<view v-if="typeId == 2"> <!-- <view v-if="typeId == 2">
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;"
src="../../../static/img/jfh.png"> src="../../../static/img/jfh.png">
</image>{{ row.salesPrice*100}} </image>{{ row.salesPrice*100}}
</view> </view> -->
<view v-if="typeId == 1 || typeId == 3 || typeId == 5">{{ row.salesPrice}}</view> <view>{{ row.salesPrice}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -99,7 +100,7 @@
this.typeId = option.id; this.typeId = option.id;
this.brandid = option.brandId; this.brandid = option.brandId;
this.goodtyid = option.goodsId; this.goodtyid = option.goodsId;
if(this.goodtyid == undefined){ if (this.goodtyid == undefined) {
this.goodtyid = ''; this.goodtyid = '';
} }
if (option.id == 1) { if (option.id == 1) {
@ -115,7 +116,7 @@
}); });
if (app.globalData.cityName == '贵州省') { if (app.globalData.cityName == '贵州省') {
this.getListGoodsType(); this.getListGoodsType();
}else{ } else {
this.getCouponListArea(); this.getCouponListArea();
} }
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
@ -126,7 +127,7 @@
}); });
if (app.globalData.cityName == '贵州省') { if (app.globalData.cityName == '贵州省') {
this.getListGoodsType(); this.getListGoodsType();
}else{ } else {
this.getCouponListArea(); this.getCouponListArea();
} }
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST'); this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
@ -175,7 +176,7 @@
}) })
}, },
//id //id
switchid(item){ switchid(item) {
this.goodtyid = item.id; this.goodtyid = item.id;
this.pageNum = 1; this.pageNum = 1;
this.pageSize = 10; this.pageSize = 10;
@ -286,6 +287,9 @@
</script> </script>
<style lang="scss"> <style lang="scss">
page {
background-color: #f3f3f3;
}
.input-box { .input-box {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
@ -376,40 +380,41 @@
} }
.goodsli { .goodsli {
margin-left: 100px; margin-left: 10px;
padding-top: 5px; padding-top: 5px;
} }
.goodsxg { .goodsxg {
margin-top: 5px; margin-top: 5px;
border: 1px solid #eb5823; border: 1px solid #3da7e7;
border-radius: 5px; border-radius: 5px;
color: #eb5823; color: #3da7e7;
width: 55px; width: 55px;
padding: 3px; padding: 3px;
} }
.info { // .info {
display: flex; // display: flex;
justify-content: space-between; // justify-content: space-between;
align-items: flex-end; // align-items: flex-end;
width: 100%; // width: 100%;
.price { .price {
color: #e65339; color: #e65339;
font-size: 30upx; font-size: 40upx;
font-weight: 600; font-weight: 600;
width: 50%; // width: 50%;
} }
.slogan { .slogan {
width: 50%; width: 50%;
color: #807c87; color: #807c87;
font-size: 24upx; font-size: 24upx;
text-decoration: line-through; text-decoration: line-through;
}
} }
.borbtom{
// }
.borbtom {
border-bottom: 2px solid #089bf5; border-bottom: 2px solid #089bf5;
} }
</style> </style>

@ -29,14 +29,18 @@
</swiper> </swiper>
<view class="indicator">{{currentSwiper+1}}/{{swiperList.length}}</view> <view class="indicator">{{currentSwiper+1}}/{{swiperList.length}}</view>
</view> </view>
<view class="width100 height60 backcorlr"> <view class="width100 height60 backcorltop alijusstart">
<view class="flleft width70 fcorfff" v-if="goodsData[0].payType == 1"> <view class=" width70 fcorfff alijusstart font13 margle20 ">
<view class="font13 mart10 margle20"><text <!-- <view class=""> -->
class="font20 paddleft5">{{goodsData[0].discountPrice}}</text></view> <view class="font14">
<view class="font15 margle20">门市参考价: <text class="paddleft5" <text class="font20 paddleft5">{{goodsData[0].discountPrice}}</text>
</view>
<view class="font14 width50 margle">价格: <text class="paddleft5"
style="text-decoration: line-through;">{{goodsData[0].salesPrice}}</text></view> style="text-decoration: line-through;">{{goodsData[0].salesPrice}}</text></view>
<!-- </view> -->
</view> </view>
<view class="flleft width70 fcorfff" v-else> <!-- <view class="flleft width70 fcorfff" v-else>
<view class="font13 mart10 margle20"> <view class="font13 mart10 margle20">
<image style="width: 20px;height: 20px;vertical-align: sub;" src="../../static/img/jfx.png"> <image style="width: 20px;height: 20px;vertical-align: sub;" src="../../static/img/jfx.png">
</image><text class="font20 paddleft5">{{goodsData[0].discountPrice *100}}</text> </image><text class="font20 paddleft5">{{goodsData[0].discountPrice *100}}</text>
@ -45,22 +49,31 @@
src="../../static/img/jfh.png"> src="../../static/img/jfh.png">
</image><text class="paddleft5" </image><text class="paddleft5"
style="text-decoration: line-through;">{{goodsData[0].salesPrice *100}}</text></view> style="text-decoration: line-through;">{{goodsData[0].salesPrice *100}}</text></view>
</view> </view> -->
<view class="flright width30"> <view class=" width30">
<view class="xgnum">限购{{goodsData[0].limitNumber}}</view> <view class="xgnum">限购{{goodsData[0].limitNumber}}</view>
</view> </view>
</view> </view>
<!-- 标题 价格 --> <!-- 标题 价格 -->
<view class="info-box goods-info"> <view class="backcorfff border-r paddtop10 paddbotm10 mart10 width94">
<view class="font16 fcor333 fontwig6"> <view class="width96">
<view class="font12 height20 fotct" style="width: 75px;border: 1px solid #3da7e7;color: #3da7e7;">购买返积分
</view>
</view>
<view class="font16 fcor333 fontwig6 mart10 width96">
{{goodsData[0].couponName}} {{goodsData[0].couponName}}
</view> </view>
<view class="mart10 width100 font14 fcor999 height20"> <!-- <view class="mart10 width100 font14 fcor999 height20">
<view class="width70 flleft">有效期至: {{goodsData[0].salesEndTime | formatDate('-')}}</view> <view class="width70 flleft">有效期至: {{goodsData[0].salesEndTime | formatDate('-')}}</view>
<view class="width30 flright fotrt" v-if="goodsData[0].couponSource != 4">库存 : <view class="width30 flright fotrt" v-if="goodsData[0].couponSource != 4">库存 :
{{goodsData[0].stockCount}} {{goodsData[0].stockCount}}
</view> </view>
</view> -->
<view class="width96 mart10 alijusstart">
<view class="fcorfff font12 height20" style="background-color: #3da7e7;border-radius: 20px;padding: 0px 5px;">嗨森逛
</view>
<view class="width70 fotrt font14 fcor666">月销 500</view>
</view> </view>
</view> </view>
<!-- 服务-规则选择 --> <!-- 服务-规则选择 -->
@ -72,14 +85,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="height60 width100 backcorfff" v-if="goodsData[0].handselCouponList != '' " @click="showPopup()"> <!-- <view class="height60 width100 backcorfff" v-if="goodsData[0].handselCouponList != '' " @click="showPopup()">
<view class="width80p flleft" style="padding-left: 4%;line-height: 60px; "> <view class="width80p flleft" style="padding-left: 4%;line-height: 60px; ">
赠送卡券 赠送卡券
</view> </view>
<view class="width15 flright fotct"> <view class="width15 flright fotct">
<image class="jtcs" src="../../static/img/jt.png"></image> <image class="jtcs" src="../../static/img/jt.png"></image>
</view> </view>
</view> </view> -->
<!-- 详情 --> <!-- 详情 -->
<view class="description"> <view class="description">
<view class="title"> 商品详情 </view> <view class="title"> 商品详情 </view>
@ -97,7 +110,8 @@
<image mode="widthFix" class="flleft" src="../../static/img/logo.png"></image> <image mode="widthFix" class="flleft" src="../../static/img/logo.png"></image>
<view class="tcrig"> <view class="tcrig">
<view class="font16 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }}</view> <view class="font16 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }}</view>
<view class="font13 fcor999 mart5">有效期至{{product.highCouponModel.salesEndTime | formatDate('-')}}</view> <view class="font13 fcor999 mart5">有效期至{{product.highCouponModel.salesEndTime | formatDate('-')}}
</view>
<view class="info mart5" v-if="product.highCouponModel.payType == 1"> <view class="info mart5" v-if="product.highCouponModel.payType == 1">
<view class="price">{{ product.highCouponModel.discountPrice}}</view> <view class="price">{{ product.highCouponModel.discountPrice}}</view>
<view class="slogan" <view class="slogan"
@ -313,7 +327,7 @@
}); });
return; return;
} }
if(this.goodsData[0].reserveStatus && this.storeName == ''){ if (this.goodsData[0].reserveStatus && this.storeName == '') {
uni.showToast({ uni.showToast({
title: '请选择门店', title: '请选择门店',
icon: "none" icon: "none"
@ -395,7 +409,7 @@
.xgnum { .xgnum {
background-color: #FFFFFF; background-color: #FFFFFF;
color: #ff722e; color: #6fbdee;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
font-size: 13px; font-size: 13px;
@ -403,7 +417,6 @@
padding-left: 5%; padding-left: 5%;
padding-right: 5%; padding-right: 5%;
border-radius: 15px; border-radius: 15px;
margin-top: 15px;
text-align: center; text-align: center;
font-weight: 600; font-weight: 600;
} }

@ -6,6 +6,11 @@
<view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid')">已使用</view> <view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid')">已使用</view>
<view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</view> <view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</view>
</view> </view>
<scroll-view scroll-x='true' class="srollview width100" scroll-with-animation>
<view class="conent" :class="[ordertypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in orderTyplist" :key="index">{{item}}</view>
</scroll-view>
<view class="place"></view> <view class="place"></view>
<view class="list"> <view class="list">
<!-- 优惠券列表 --> <!-- 优惠券列表 -->
@ -17,11 +22,21 @@
<!-- content --> <!-- content -->
<view class="carrier"> <view class="carrier">
<view class="left"> <view class="left">
<view class="title"> <view class="alijusstart">
{{row.highDiscount.discountName}} <view class="alijus width50 font12 fotct fcorfff"
style="width: 70px;height: 20px;background-color: #3ecbb0;margin-right: 2px;">
<image src="../../../static/img/user/user15.png" mode="widthFix" class="icon12">
</image>
折扣券
</view>
</view>
<view class="title alijusstart">
<text class="height20 fotct fcorfff font11"
style="width: 50px;background-color: #347edd;border-radius: 20px;">话费券</text>
<view class="text1 width70">{{row.highDiscount.discountName}}</view>
</view> </view>
<view class="term"> <view class="term">
截止时间:{{row.useEndTime | formatDate('-')}} 有效期:{{row.useEndTime | formatDate('-')}}
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -148,7 +163,9 @@
pageSize: 10, pageSize: 10,
isNoMoreData: false, isNoMoreData: false,
loadingText: '', loadingText: '',
couponcout: 0 couponcout: 0,
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1 //id
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -256,13 +273,13 @@
} else if (e.highDiscount.useScope == 5) { } else if (e.highDiscount.useScope == 5) {
app.globalData.distinguishid = 2; app.globalData.distinguishid = 2;
uni.navigateTo({ uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order' url: '/qianzhu-KFC/buffet-order/buffet-order'
}) })
} else if (e.highDiscount.useScope == 6) { } else if (e.highDiscount.useScope == 6) {
uni.navigateTo({ uni.navigateTo({
url: '/member-Recharge/choicepage/choicepage' url: '/member-Recharge/choicepage/choicepage'
}) })
} else{ } else {
uni.navigateTo({ uni.navigateTo({
url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
}) })
@ -311,6 +328,44 @@
} }
.srollview {
position: fixed;
z-index: 9999;
top: 45px;
height: 60px;
background-color: #ffffff;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
white-space: nowrap;
.conent {
height: 24px;
line-height: 24px;
margin-top: 15px;
padding-left: 10px;
font-size: 10px;
padding-right: 10px;
border-radius: 20px;
margin-left: 15px;
display: inline-flex;
flex-direction: column;
text-align: center;
position: relative;
}
}
.frontconent {
background-color: #eeeeee;
color: #333333;
}
.activeconent {
background-color: #e8eff4;
color: #009DFF;
}
page { page {
position: relative; position: relative;
background-color: #f5f5f5; background-color: #f5f5f5;
@ -322,7 +377,7 @@
.place { .place {
width: 100%; width: 100%;
height: 95upx; height: 110px;
} }
.tabr { .tabr {
@ -423,7 +478,7 @@
.row { .row {
width: 92%; width: 92%;
height: 24vw; height: 27vw;
margin: 20upx auto 10upx auto; margin: 20upx auto 10upx auto;
border-radius: 8upx; border-radius: 8upx;
// box-shadow: 0upx 0 10upx rgba(0,0,0,0.1); // box-shadow: 0upx 0 10upx rgba(0,0,0,0.1);
@ -491,7 +546,6 @@
width: 100%; width: 100%;
.title { .title {
padding-top: 3vw;
width: 90%; width: 90%;
margin: 0 5%; margin: 0 5%;
font-size: 36upx; font-size: 36upx;

@ -5,9 +5,9 @@
<view class="conent" :class="[newstypeid == index ? 'activeconent' : 'frontconent']" <view class="conent" :class="[newstypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in newsTyplist" :key="index">{{item}}</view> v-for="(item,index) in newsTyplist" :key="index">{{item}}</view>
</scroll-view> </scroll-view>
<view class="mart10 height70"></view>
<!-- 内容 --> <!-- 内容 -->
<view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsTyplist"> <view class="newscont width90 border-8r backcorfff mart20" v-for="(item,index) in newsTyplist" :key="index">
<view class="alijusstart mart10 margle10"> <view class="alijusstart mart10 margle10">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image> <image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">服务通知</text> <text class="font18 margle" style="color: #0B1D83;">服务通知</text>
@ -77,6 +77,8 @@
} }
.srollview { .srollview {
position: fixed;
top: 0px;
height: 70px; height: 70px;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
@ -89,9 +91,9 @@
line-height: 24px; line-height: 24px;
margin-top: 15px; margin-top: 15px;
padding-left: 10px; padding-left: 10px;
font-size: 12px; font-size: 11px;
padding-right: 10px; padding-right: 10px;
margin-left: 10px; margin-left: 15px;
display: inline-flex; display: inline-flex;
flex-direction: column; flex-direction: column;
text-align: center; text-align: center;
@ -99,9 +101,8 @@
} }
} }
.frontconent { .frontconent {
background-color: #ffffff; background-color: #eeeeee;
color: #333333; color: #333333;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

@ -386,6 +386,10 @@ $uni-font-size-paragraph:30upx;
width: 60% width: 60%
} }
.width65 {
width: 65%
}
.width60w { .width60w {
width: 60%; width: 60%;
margin-left: 20%; margin-left: 20%;

Loading…
Cancel
Save