1.新版本2.0开发 优惠券

yj-dev
杨杰 2 years ago
parent fc1c7ef2a1
commit a2c977b64e
  1. 16
      App.vue
  2. 24
      pages.json
  3. 123
      pages/goods/goods-list/goods-list.vue
  4. 71
      pages/goods/goods.vue
  5. 78
      pages/user/coupon/coupon.vue
  6. 19
      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',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl: 'https://hsg.dctpay.com/brest',
imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl: 'https://hsg.dctpay.com/brest',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
//
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl: 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
url: 'https://hsgcs.dctpay.com/crest',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo: '',
bresthighAgent: '',

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

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

@ -29,14 +29,18 @@
</swiper>
<view class="indicator">{{currentSwiper+1}}/{{swiperList.length}}</view>
</view>
<view class="width100 height60 backcorlr">
<view class="flleft width70 fcorfff" v-if="goodsData[0].payType == 1">
<view class="font13 mart10 margle20"><text
class="font20 paddleft5">{{goodsData[0].discountPrice}}</text></view>
<view class="font15 margle20">门市参考价: <text class="paddleft5"
<view class="width100 height60 backcorltop alijusstart">
<view class=" width70 fcorfff alijusstart font13 margle20 ">
<!-- <view class=""> -->
<view class="font14">
<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>
<!-- </view> -->
</view>
<view class="flleft width70 fcorfff" v-else>
<!-- <view class="flleft width70 fcorfff" v-else>
<view class="font13 mart10 margle20">
<image style="width: 20px;height: 20px;vertical-align: sub;" src="../../static/img/jfx.png">
</image><text class="font20 paddleft5">{{goodsData[0].discountPrice *100}}</text>
@ -45,22 +49,31 @@
src="../../static/img/jfh.png">
</image><text class="paddleft5"
style="text-decoration: line-through;">{{goodsData[0].salesPrice *100}}</text></view>
</view>
<view class="flright width30">
</view> -->
<view class=" width30">
<view class="xgnum">限购{{goodsData[0].limitNumber}}</view>
</view>
</view>
<!-- 标题 价格 -->
<view class="info-box goods-info">
<view class="font16 fcor333 fontwig6">
<view class="backcorfff border-r paddtop10 paddbotm10 mart10 width94">
<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}}
</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="width30 flright fotrt" v-if="goodsData[0].couponSource != 4">库存 :
{{goodsData[0].stockCount}}
</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>
<!-- 服务-规则选择 -->
@ -69,17 +82,17 @@
<view class="text" style="color: #689bc0; font-size: 14px !important;">点击去选择门店</view>
<view class="arrow font14" style="color: #689bc0;" v-if="storeName">
{{storeName}}
</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>
<view class="width15 flright fotct">
<image class="jtcs" src="../../static/img/jt.png"></image>
</view>
</view>
</view> -->
<!-- 详情 -->
<view class="description">
<view class="title"> 商品详情 </view>
@ -97,7 +110,8 @@
<image mode="widthFix" class="flleft" src="../../static/img/logo.png"></image>
<view class="tcrig">
<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="price">{{ product.highCouponModel.discountPrice}}</view>
<view class="slogan"
@ -181,9 +195,9 @@
onLoad(option) {
this.desid = option.id;
this.user = app.globalData.userInfo;
this.getCouponById();
app.globalData.storeid = '';
app.globalData.storename = '';
this.getCouponById();
app.globalData.storeid = '';
app.globalData.storename = '';
// #ifdef MP
//
this.showBack = false;
@ -193,8 +207,8 @@
onShow() {
this.storeId = app.globalData.storeid;
this.storeName = app.globalData.storename;
},
},
onReady() {
// this.calcAnchor(); //ajax
},
@ -312,13 +326,13 @@
icon: "none"
});
return;
}
if(this.goodsData[0].reserveStatus && this.storeName == ''){
uni.showToast({
title: '请选择门店',
icon: "none"
});
return;
}
if (this.goodsData[0].reserveStatus && this.storeName == '') {
uni.showToast({
title: '请选择门店',
icon: "none"
});
return;
}
uni.showToast({
title: '提交订单...',
@ -395,7 +409,7 @@
.xgnum {
background-color: #FFFFFF;
color: #ff722e;
color: #6fbdee;
height: 30px;
line-height: 30px;
font-size: 13px;
@ -403,7 +417,6 @@
padding-left: 5%;
padding-right: 5%;
border-radius: 15px;
margin-top: 15px;
text-align: center;
font-weight: 600;
}

@ -1,11 +1,16 @@
<template>
<view>
<view class="tabr" :style="{top:headerTop}">
<view class="tabr" :style="{top:headerTop}">
<!-- ({{couponcout}}) -->
<view :class="{on:typeClass=='valid'}" @tap="switchType('valid')">待使用</view>
<view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid')">已使用</view>
<view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</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="list">
<!-- 优惠券列表 -->
@ -17,11 +22,21 @@
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
<view class="alijusstart">
<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 class="term">
截止时间:{{row.useEndTime | formatDate('-')}}
有效期:{{row.useEndTime | formatDate('-')}}
</view>
</view>
<view class="right">
@ -148,7 +163,9 @@
pageSize: 10,
isNoMoreData: false,
loadingText: '',
couponcout: 0
couponcout: 0,
orderTyplist: ['全部订单', '在线加油', '肯德基', '星巴克', '话费充值', '卡券订单'], //
ordertypeid: 1 //id
}
},
onPageScroll(e) {
@ -248,21 +265,21 @@
uni.navigateTo({
url: '../../../subPages/recharge/recharge'
})
} else if (e.highDiscount.useScope == 4) {
} else if (e.highDiscount.useScope == 4) {
app.globalData.distinguishid = 1;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 5) {
} else if (e.highDiscount.useScope == 5) {
app.globalData.distinguishid = 2;
uni.navigateTo({
url: '/qianzhu-KFC/buffet-order/buffet-order'
url: '/qianzhu-KFC/buffet-order/buffet-order'
})
} else if (e.highDiscount.useScope == 6) {
uni.navigateTo({
url: '/member-Recharge/choicepage/choicepage'
})
} else{
} else {
uni.navigateTo({
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 {
position: relative;
background-color: #f5f5f5;
@ -322,7 +377,7 @@
.place {
width: 100%;
height: 95upx;
height: 110px;
}
.tabr {
@ -423,7 +478,7 @@
.row {
width: 92%;
height: 24vw;
height: 27vw;
margin: 20upx auto 10upx auto;
border-radius: 8upx;
// box-shadow: 0upx 0 10upx rgba(0,0,0,0.1);
@ -491,7 +546,6 @@
width: 100%;
.title {
padding-top: 3vw;
width: 90%;
margin: 0 5%;
font-size: 36upx;

@ -5,9 +5,9 @@
<view class="conent" :class="[newstypeid == index ? 'activeconent' : 'frontconent']"
v-for="(item,index) in newsTyplist" :key="index">{{item}}</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">
<image src="../../../static/img/cusservice.png" mode="widthFix" class="icon30"></image>
<text class="font18 margle" style="color: #0B1D83;">服务通知</text>
@ -76,8 +76,10 @@
background-color: #f3f3f3;
}
.srollview {
height: 70px;
.srollview {
position: fixed;
top: 0px;
height: 70px;
background-color: #ffffff;
display: flex;
flex-direction: row;
@ -89,9 +91,9 @@
line-height: 24px;
margin-top: 15px;
padding-left: 10px;
font-size: 12px;
padding-right: 10px;
margin-left: 10px;
font-size: 11px;
padding-right: 10px;
margin-left: 15px;
display: inline-flex;
flex-direction: column;
text-align: center;
@ -99,9 +101,8 @@
}
}
.frontconent {
background-color: #ffffff;
background-color: #eeeeee;
color: #333333;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

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

Loading…
Cancel
Save