Compare commits

...

15 Commits

  1. 10
      api/activity.js
  2. 7
      api/public.js
  3. 1
      api/store.js
  4. 7
      api/user.js
  5. 11
      assets/css/style.css
  6. 11
      assets/css/style.less
  7. 3
      components/CountDown.vue
  8. 27
      components/CouponListWindow.vue
  9. 12
      components/ProductWindow.vue
  10. 11
      config/index.js
  11. 6
      manifest.json
  12. 5
      pages/activity/DargainDetails/index.vue
  13. 64
      pages/activity/DargainGoodsDetails/index.vue
  14. 68
      pages/activity/GroupDetails/index.vue
  15. 125
      pages/activity/SeckillDetails/index.vue
  16. 124
      pages/activity/activity/index.vue
  17. 286
      pages/home/index.vue
  18. 2
      pages/order/OrderSubmission/index.vue
  19. 7
      pages/shop/Evaluations/EvaluationDetail/index.vue
  20. 42
      pages/shop/GoodsCon/index.vue
  21. 59
      pages/shop/HotNewGoods/index.vue
  22. 2
      pages/shop/IntegralGoodsCon/index.vue
  23. 2
      pages/shop/brands/brandAll/index.vue
  24. 2
      pages/user/AboutUs/index.vue
  25. 1
      pages/user/PersonalData/index.vue
  26. 16
      pages/user/UserVip/index.vue
  27. 30
      pages/user/coupon/GetCoupon/index.vue
  28. 35
      pages/user/coupon/UserCoupon/index.vue
  29. BIN
      static/images/vip-rights3.png
  30. BIN
      static/images/vip-rights33.png
  31. BIN
      static/images/welfare.png
  32. 4
      store/index.js
  33. 2
      utils/index.js

10
api/activity.js

@ -4,7 +4,13 @@ import request from "@/utils/request";
* 拼团列表 * 拼团列表
*/ */
export function getCombinationList(data) { export function getCombinationList(data) {
return request.get("/combination/list", data, { login: false }); return request.get("/combination/list", data, { login: true });
}
/**
* 已发起拼团列表
*/
export function getUserCombinationList(data) {
return request.get("/userCombination/list", data, { login: true });
} }
/** /**
@ -64,7 +70,7 @@ export function getSeckillDetail(id) {
* @param {*} data * @param {*} data
*/ */
export function getBargainList(data) { export function getBargainList(data) {
return request.get("/bargain/list", data, { login: false }); return request.get("/bargain/list", data, { login: true });
} }
/** /**

7
api/public.js

@ -26,6 +26,13 @@ export function getCanvas() {
export function getHotList() { export function getHotList() {
return request.get("/hotList", {}, { login: false }); return request.get("/hotList", {}, { login: false });
} }
/**
* 首页热门榜单
* @returns {*}
*/
export function getIndexHotList() {
return request.get("/indexHotList", {}, { login: false });
}
/** /**
* 文章 轮播列表 * 文章 轮播列表

1
api/store.js

@ -181,6 +181,7 @@ export function postOrderProduct(unique) {
* 提交评价页面 * 提交评价页面
*/ */
export function postOrderComment(data) { export function postOrderComment(data) {
console.log(11111);
return request.post("/order/comment", data, { return request.post("/order/comment", data, {
login: true login: true
}); });

7
api/user.js

@ -347,6 +347,13 @@ export function postCashInfo(cash) {
export function getVipInfo() { export function getVipInfo() {
return request.get('/user/level/grade') return request.get('/user/level/grade')
} }
/*
* 会员信息
* */
export function getVipInformation() {
return request.get('/userinfo')
}
/* /*
* 会员等级任务 * 会员等级任务

11
assets/css/style.css

@ -301,13 +301,14 @@ page {
z-index: 1; z-index: 1;
} }
.coupon-list .item .coupon-left .text-box { .coupon-list .item .coupon-left .text-box {
padding-top: 46rpx; /* padding-top: 46rpx; */
padding-left: 46rpx; padding-left: 46rpx;
padding-right: 22rpx; padding-right: 22rpx;
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.coupon-list .item .coupon-left .text-box .money { .coupon-list .item .coupon-left .text-box .money {
padding-top: 46rpx;
font-size: 92rpx; font-size: 92rpx;
font-family: Futura; font-family: Futura;
font-weight: 600; font-weight: 600;
@ -554,6 +555,10 @@ page {
color: #fff; color: #fff;
background: #2DB5AE; background: #2DB5AE;
} }
.product-window .productWinList .item .listn .itemn.isNo {
color: #fff;
background: #a0d2d0;
}
.product-window .cart { .product-window .cart {
border-top: 2rpx solid #979797; border-top: 2rpx solid #979797;
margin: 0 32rpx; margin: 0 32rpx;
@ -1595,8 +1600,8 @@ page {
padding: 32rpx; padding: 32rpx;
} }
.product-con .entry-mask .entry-box .entry { .product-con .entry-mask .entry-box .entry {
height: 100%; /* height: 100%; */
overflow: scroll; /* overflow: scroll; */
font-size: 26rpx; font-size: 26rpx;
font-family: SourceHanSansSCVF; font-family: SourceHanSansSCVF;
font-weight: 500; font-weight: 500;

11
assets/css/style.less

@ -478,12 +478,13 @@ page {
} }
.coupon-list .item .coupon-left .text-box { .coupon-list .item .coupon-left .text-box {
padding-top: 46rpx; // padding-top: 46rpx;
padding-left: 46rpx; padding-left: 46rpx;
padding-right: 22rpx; padding-right: 22rpx;
position: relative; position: relative;
z-index: 2; z-index: 2;
.money { .money {
padding-top: 46rpx;
font-size: 92rpx; font-size: 92rpx;
font-family: Futura; font-family: Futura;
font-weight: 600; font-weight: 600;
@ -840,6 +841,10 @@ page {
color: #fff; color: #fff;
background: #2DB5AE; background: #2DB5AE;
} }
.product-window .productWinList .item .listn .itemn.isNo {
color: #fff;
background: #a0d2d0;
}
.product-window .cart { .product-window .cart {
border-top: 2rpx solid #979797; border-top: 2rpx solid #979797;
@ -3136,8 +3141,8 @@ page {
padding: 32rpx; padding: 32rpx;
.entry { .entry {
height: 100%; // height: 100%;
overflow: scroll; // overflow: scroll;
font-size: 26rpx; font-size: 26rpx;
font-family: SourceHanSansSCVF; font-family: SourceHanSansSCVF;
font-weight: 500; font-weight: 500;

3
components/CountDown.vue

@ -155,7 +155,8 @@ export default {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 600; font-weight: 600;
color: #3A3A3C; color: #3A3A3C;
line-height: 38rpx; line-height: 60rpx;
height: 60rpx;
} }
} }
</style> </style>

27
components/CouponListWindow.vue

@ -17,11 +17,15 @@
<view class="coupon-left"> <view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image> <image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box"> <view class="text-box">
<view class="money">¥{{ coupon.couponPrice }}</view> <view v-if="coupon.image.length>0" class="wrappers acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in coupon.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money" style="padding-top: 28rpx;">¥{{ coupon.couponPrice }}</view>
<!-- <view class="money">7<text></text></view> --> <!-- <view class="money">7<text></text></view> -->
<view class="line"></view> <view class="line"></view>
<view class="tip acea-row row-between"> <view class="tip acea-row row-between">
<view class="">{{coupon.ctype?'仅限定品牌可用':'全部商品可用'}}</view> <!-- <view class="">{{coupon.ctype?'仅限定品牌可用':'全部商品可用'}}</view> -->
<view class="">{{coupon.cname}}</view>
<view v-if="coupon.endTime === 0">不限时</view> <view v-if="coupon.endTime === 0">不限时</view>
<view v-else>到期时间{{ coupon.endTime }}</view> <view v-else>到期时间{{ coupon.endTime }}</view>
</view> </view>
@ -29,7 +33,7 @@
</view> </view>
<view class="coupon-right acea-row row-center-column"> <view class="coupon-right acea-row row-center-column">
<!-- <image v-if="item.isUse === true" class="tag" src="@/static/images/gotCoupon-icon.png" mode=""></image> --> <!-- <image v-if="item.isUse === true" class="tag" src="@/static/images/gotCoupon-icon.png" mode=""></image> -->
<view class="type">{{'满减券' || '折扣券'}}</view> <view class="type">{{coupon.image.length>0? (coupon.couponPrice+'元'):'满减券' || '折扣券'}}</view>
<view class="tip">{{ coupon.useMinPrice }}可用</view> <view class="tip">{{ coupon.useMinPrice }}可用</view>
<view class="iconfont icon-xuanzhong1 font-color-red" v-if="checked === coupon.id"></view> <view class="iconfont icon-xuanzhong1 font-color-red" v-if="checked === coupon.id"></view>
<view class="iconfont icon-weixuanzhong" v-else></view> <view class="iconfont icon-weixuanzhong" v-else></view>
@ -80,9 +84,24 @@
left: 16rpx; left: 16rpx;
} }
.text-box { .text-box {
padding-top: 28rpx; // padding-top: 28rpx;
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 30rpx; padding-right: 30rpx;
.wrappers{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:12rpx 37rpx 12rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
} }
} }
.icon-weixuanzhong { .icon-weixuanzhong {

12
components/ProductWindow.vue

@ -35,13 +35,15 @@
> >
<view class="title">{{ item.attrName }}</view> <view class="title">{{ item.attrName }}</view>
<view class="listn acea-row row-middle"> <view class="listn acea-row row-middle">
<view <view
class="itemn" class="itemn"
:class="item.index == indexn ? 'on' : ''" :class="item.index == indexn? (attr.productSelect.stock!==0?'on':'isNo') : ''"
v-for="(itemn, indexn) in item.attrValue" v-for="(itemn, indexn) in item.attrValue"
@click="tapAttr(indexw, indexn)" @click="tapAttr(indexw, indexn)"
:key="indexn" :key="indexn"
>{{ itemn.attr }}</view >
{{ itemn.attr }}
</view
> >
</view> </view>
</view> </view>
@ -103,8 +105,9 @@ export default {
return {}; return {};
}, },
mounted: function () { mounted: function () {
console.log(this.attr) console.log(this.attr)
console.log(this); console.log(this);
// this.tapAttr(0,0)
}, },
watch: { watch: {
attr(nextAttr) { attr(nextAttr) {
@ -159,3 +162,4 @@ export default {
}, },
}; };
</script> </script>

11
config/index.js

@ -1,8 +1,9 @@
// export const VUE_APP_API_URL = 'http://192.168.10.129:48080/bxgApp' // export const VUE_APP_API_URL = 'http://192.168.10.129:48080/bxgApp'
// export const VUE_APP_API_URL = 'http://192.168.10.113:48080/bxgApp' export const VUE_APP_API_URL = 'http://192.168.10.113:48080/bxgApp'
export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp' // export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/bxgApp'
// export const VUE_APP_API_URL = 'https://app.moo-mou.com/admin-api/bxgApp'
// export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp' // export const VUE_APP_API_URL = 'https://xiaohui.shop.cyjyyjy.com/xiaohuiapp'
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'
export const BXG_TENANT_ID = 129 // export const BXG_TENANT_ID = 129
// export const BXG_TENANT_ID = 138 export const BXG_TENANT_ID = 138
// export const BXG_TENANT_ID = 128 // export const BXG_TENANT_ID = 128

6
manifest.json

@ -255,11 +255,7 @@
"minified" : true "minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"permission" : { "permission" : {},
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"plugins" : {} "plugins" : {}
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN

5
pages/activity/DargainDetails/index.vue

@ -636,6 +636,11 @@ export default {
// 4. ==> && && <=0 // 4. ==> && && <=0
if (this.bargainUid === this.userInfo.uid && this.bargainHelpCount.status == 1 && this.bargainHelpCount.price <= 0) { if (this.bargainUid === this.userInfo.uid && this.bargainHelpCount.status == 1 && this.bargainHelpCount.price <= 0) {
this.pay = true this.pay = true
uni.showModal({
title:'砍价成功!',
showCancel: false,
confirmColor: '#2DB5AE',
})
} else { } else {
this.pay = false this.pay = false
} }

64
pages/activity/DargainGoodsDetails/index.vue

@ -107,16 +107,19 @@
<view class="tui-operation-right acea-row"> <view class="tui-operation-right acea-row">
<view class="btn other-col" @click="openAlone">原价购买</view> <view class="btn other-col" @click="openAlone">原价购买</view>
<view class="btn" @click="goDargain">发起砍价</view> <view v-if="goodsDetail.stock>0" class="btn" @click="goDargain">发起砍价</view>
<view v-else class="btn" style="background: #a0d2d0">已售罄</view>
</view> </view>
</view> </view>
<!-- 词条弹框 --> <!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry"> <view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box"> <view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry"> <view class="entry">
{{entryInfo.entryInfo}} {{entryInfo.entryInfo}}
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
</view> </view>
@ -153,7 +156,8 @@
tagStyle: { tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;', a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;' img: 'padding:0;margin:0;font-size:0;display:block;'
} },
subType:true
}; };
}, },
onLoad() { onLoad() {
@ -176,6 +180,7 @@
this.getBargainDetail(); this.getBargainDetail();
}, },
methods: { methods: {
// //
getBargainDetail() { getBargainDetail() {
uni.showLoading({ uni.showLoading({
@ -213,10 +218,30 @@
}) })
}, },
goDargain() { goDargain() {
this.$yrouter.push({ let isParticipation=JSON.parse(this.$yroute.query.isParticipation)
path: "/pages/activity/DargainDetails/index", if(this.subType && !isParticipation) {
query: { id: this.bargainId, partake: 0 } let tmplIds = ['iUviwf1eQoQ2BGXdCQx7ki_EAj_4e4v1eLI5IeUbT_0'];
}); uni.requestSubscribeMessage({
tmplIds,
success:res=> {
this.subType=false
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
},
fail(err) {
console.log("requestSubscribeMessage err", err)
}
})
}else{
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
}
}, },
linktap(e) { linktap(e) {
// console.log('description', e.innerText); // console.log('description', e.innerText);
@ -234,6 +259,33 @@
closeEntry() { closeEntry() {
this.showEntry = false; this.showEntry = false;
}, },
onShareAppMessage: function() {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/DargainGoodsDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
//
onShareTimeline(res) {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/DargainGoodsDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
}
},
} }
} }
</script> </script>

68
pages/activity/GroupDetails/index.vue

@ -235,7 +235,8 @@
<view class="tui-operation-right acea-row"> <view class="tui-operation-right acea-row">
<view class="btn other-col" @click="openAlone">单独购买</view> <view class="btn other-col" @click="openAlone">单独购买</view>
<view class="btn" @click="openTeam">发起拼团</view> <view v-if="storeInfo.stock>0" class="btn" @click="openTeam">发起拼团</view>
<view v-else class="btn" style="background: #a0d2d0">已售罄</view>
<!-- <view class="tui-flex-1"> <!-- <view class="tui-flex-1">
<tui-button height="100rpx" :size="26" type="warning" shape="rightAngle" @click="openAlone"> <tui-button height="100rpx" :size="26" type="warning" shape="rightAngle" @click="openAlone">
<view class="tui-btn__box"> <view class="tui-btn__box">
@ -266,9 +267,11 @@
<!-- 词条弹框 --> <!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry"> <view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box"> <view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry"> <view class="entry">
{{entryInfo.entryInfo}} {{entryInfo.entryInfo}}
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
<!-- 商品信息弹窗 --> <!-- 商品信息弹窗 -->
@ -350,7 +353,8 @@ export default {
tagStyle: { tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;', a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;' img: 'padding:0;margin:0;font-size:0;display:block;'
} },
subType:true
} }
}, },
computed: {}, computed: {},
@ -373,24 +377,7 @@ export default {
} }
return '' return ''
}, },
onShareAppMessage: function() {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/GroupDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
goShoppingCart() { goShoppingCart() {
uni.setStorageSync('pathToCart', '/pages/activity/GroupDetails/index?id='+ this.$yroute.query.id); uni.setStorageSync('pathToCart', '/pages/activity/GroupDetails/index?id='+ this.$yroute.query.id);
this.$yrouter.switchTab('/pages/shop/ShoppingCart/index'); this.$yrouter.switchTab('/pages/shop/ShoppingCart/index');
@ -436,7 +423,6 @@ export default {
that.posterData.price = that.storeInfo.pinkPrice that.posterData.price = that.storeInfo.pinkPrice
that.posterData.code = that.storeInfo.code_base that.posterData.code = that.storeInfo.code_base
that.domStatus = true that.domStatus = true
console.log(this.storeInfo)
that.DefaultSelect() that.DefaultSelect()
for(let i in that.productValue) { for(let i in that.productValue) {
that.attrImages.push(that.productValue[i]); that.attrImages.push(that.productValue[i]);
@ -580,10 +566,24 @@ export default {
}) })
// this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId }); // this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
}, },
subscribeMessage(){
let tmplIds = ['kNUN676-t1H3mQplI3iG8_aztf6c1TStnAADF104e4M'];
uni.requestSubscribeMessage({
tmplIds,
success:res=> {
this.subType=false
},
fail(err) {
console.log("requestSubscribeMessage err", err)
}
})
},
// //
openTeam: function() { openTeam: function() {
var that = this var that = this
console.log(this.attr) console.log(this.attr)
if(this.subType && this.$yroute.query.tabType==0) this.subscribeMessage()
if (that.attr.cartAttr == false) { // if (that.attr.cartAttr == false) { //
console.log(this.attr.cartAttr) console.log(this.attr.cartAttr)
that.attr.cartAttr = !this.attr.cartAttr that.attr.cartAttr = !this.attr.cartAttr
@ -638,6 +638,32 @@ export default {
closeEntry() { closeEntry() {
this.showEntry = false; this.showEntry = false;
}, },
onShareAppMessage: function() {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/GroupDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
//
onShareTimeline(res) {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/GroupDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
}
},
}, },
} }
</script> </script>

125
pages/activity/SeckillDetails/index.vue

@ -166,8 +166,9 @@
</view> --> </view> -->
</view> </view>
<view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.num <= 0 && storeInfo.stock <= 0"> <!-- <view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.num <= 0 && storeInfo.stock <= 0"> -->
<view class="btn">已售罄</view> <view class="tui-operation-right" v-if="seckillStatus == 1 && storeInfo.stock <= 0">
<view class="btn" style="background: #a0d2d0">已售罄</view>
<!-- <view class="tui-flex-1"> <!-- <view class="tui-flex-1">
<tui-button height="68rpx" :size="26" type="warning" shape="circle" disabled>已售罄</tui-button> <tui-button height="68rpx" :size="26" type="warning" shape="circle" disabled>已售罄</tui-button>
</view> </view>
@ -200,9 +201,11 @@
<!-- 词条弹框 --> <!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry"> <view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box"> <view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry"> <view class="entry">
{{entryInfo.entryInfo}} {{entryInfo.entryInfo}}
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
@ -281,8 +284,21 @@ export default {
}, },
onLoad: function() { onLoad: function() {
this.mountedStart() this.mountedStart()
uni.showShareMenu({
withShareTicket:true,
//Menus
menus:["shareAppMessage","shareTimeline"]
})
}, },
methods: { methods: {
goEvaluateList(val){
this.$yrouter.push({
path: '/pages/shop/EvaluateList/index',
query: {
id: val,
},
})
},
formatPrice(price, index) { formatPrice(price, index) {
console.log(price) console.log(price)
if (price) { if (price) {
@ -290,24 +306,93 @@ export default {
} }
return '' return ''
}, },
onShareAppMessage: function() {
return { //
title: this.storeInfo.title, // onShareAppMessage(res) {
imageUrl: this.storeInfo.image, // // distSource
path: 'pages/activity/GoodsSeckill/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine', // let distSource = uni.getStorageSync('distSource');
success(res) { // if (distSource) {
uni.showToast({ // return {
title: '分享成功', // title: '使xxx',
}) // type: 0,
}, // path: '/pages/index/index?id=' + distSource,
fail(res) { // summary: "",
uni.showToast({ // imageUrl: "https://58d.oss-cn-hangzhou.aliyuncs.com/goods/ttg_1596073788000.png"
title: '分享失败', // }
icon: 'none', // }
}) // },
}, onShareAppMessage: function() {
} return {
}, title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/GoodsSeckill/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
//
onShareTimeline(res) {
return {
title: this.storeInfo.title,
imageUrl: this.storeInfo.image,
path: 'pages/activity/SeckillDetails/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync(
'uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
// onShareAppMessage: function() {
// return {
// title: this.storeInfo.title,
// imageUrl: this.storeInfo.image,
// path: 'pages/activity/GoodsSeckill/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
// success(res) {
// uni.showToast({
// title: '',
// })
// },
// fail(res) {
// uni.showToast({
// title: '',
// icon: 'none',
// })
// },
// }
// },
openAlone: function() { openAlone: function() {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/shop/GoodsCon/index', path: '/pages/shop/GoodsCon/index',

124
pages/activity/activity/index.vue

@ -26,7 +26,8 @@
</view> </view>
<view class="activity-content"> <view class="activity-content">
<view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')"> <!-- <view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')"> -->
<view class="top-nav-box" :style="(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')">
<view class="activity-type-box acea-row row-center"> <view class="activity-type-box acea-row row-center">
<view class="item" @click="setActivityType(0)"> <view class="item" @click="setActivityType(0)">
<view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view> <view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view>
@ -38,12 +39,14 @@
<view :class="'title ' + (activityType === 2 ? 'active' : '')">砍价专区</view> <view :class="'title ' + (activityType === 2 ? 'active' : '')">砍价专区</view>
</view> </view>
</view> </view>
<view class="tab-box acea-row row-between" v-if="activityType === 0"> <!-- <view class="tab-box acea-row row-between" v-if="activityType === 0"> -->
<view :class="'tab ' + (tabType === 0 ? 'active' : '')" @click="setTabType(0)">{{timeList[seckillActive].status == 2 ? '活动即将开始' : '活动抢购中'}}</view> <view class="tab-box acea-row row-between" >
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">下期预告</view> <view :class="'tab ' + (tabType === 0 ? 'active' : '')" @click="setTabType(0)">{{activityType==0?(timeList[seckillActive].status == 2 ? '活动即将开始' : '活动抢购中'):'活动中' }}</view>
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">{{activityType==0?'下期预告':'已参与'}}</view>
</view> </view>
</view> </view>
<view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''"> <view class="list-box" :style="navStyle?'padding-top:186rpx':''">
<!-- <view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''"> -->
<view class="countdown-box acea-row row-between-wrapper" v-if="activityType === 0 && tabType === 0 && timeList[seckillActive].stop"> <view class="countdown-box acea-row row-between-wrapper" v-if="activityType === 0 && tabType === 0 && timeList[seckillActive].stop">
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view> <view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view>
@ -77,7 +80,8 @@
</view> </view>
<view class="otPrice" v-if="activityType === 0">¥{{item.otPrice}}</view> <view class="otPrice" v-if="activityType === 0">¥{{item.otPrice}}</view>
</view> </view>
<view class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':'立即秒杀'):'发起' + (activityType == 1?'拼团':'砍价')}}</view> <!-- <view class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':'立即秒杀'):'发起' + (activityType == 1?'拼团':'砍价')}}</view> -->
<view :style="[{backgroundColor:tabType==1 && activityType!==0 ? '#EC3A5B':''},{backgroundColor:item.stock==0 &&tabType==0?'#a0d2d0':''}]" class="btn" @click="goDetail(item)">{{activityType == 0?(timeList[seckillActive].status == 2?'即将开始':(item.stock==0?'已售罄':'立即秒杀')):(tabType==0?(item.stock==0?'已售罄':('发起'+(activityType == 1?'拼团':'砍价'))):'参与中')}}</view>
</view> </view>
</view> </view>
@ -89,7 +93,7 @@
<!-- 提示弹窗 --> <!-- 提示弹窗 -->
<view class="mask" @touchmove.stop.prevent :hidden="active === false && isShowRule === false" @click="close"> <view class="mask" @touchmove.stop.prevent :hidden="active === false && isShowRule === false" @click="close">
<view class="bargainTip" style="padding-bottom: 0;" :class="isShowRule === true ? 'on' : ''"> <view class="bargainTip" style="padding-bottom: 0;" :class="isShowRule === true ? 'on' : ''">
<view class="rule-content" v-html="timeList.rule"></view> <view class="rule-content" v-html="timeList[0].rule"></view>
</view> </view>
</view> </view>
</view> </view>
@ -97,8 +101,9 @@
<script> <script>
import { getBanner} from '@/api/store'; import { getBanner} from '@/api/store';
import { getSeckillConfig, getSeckillList, getCombinationList, getBargainList } from '@/api/activity'; import { getSeckillConfig, getSeckillList, getCombinationList, getBargainList,getUserCombinationList} from '@/api/activity';
import CountDown from '@/components/CountDown'; import CountDown from '@/components/CountDown';
import cookie from '@/utils/store/cookie'
export default { export default {
components: { components: {
CountDown, CountDown,
@ -134,6 +139,7 @@
limit: 10, // limit: 10, //
}, },
bargainList: [], bargainList: [],
participationList:[],//
bargainLoaded: false, bargainLoaded: false,
isShowRule: false, // isShowRule: false, //
active: false, active: false,
@ -145,6 +151,21 @@
this.getBargainList(); this.getBargainList();
}, },
onLoad() { onLoad() {
switch (this.$yroute.query.isType){
case '0':
this.tabType=0
this.activityType=2
break;
case '1':
this.tabType=1
this.activityType=2
break;
case '2':
this.tabType=0
this.activityType=1
break;
}
getBanner(3).then( getBanner(3).then(
res => { res => {
this.$set(this,'banner',res.data.banner) this.$set(this,'banner',res.data.banner)
@ -196,24 +217,46 @@
setActivityType(i) { setActivityType(i) {
if(this.activityType == i) return; if(this.activityType == i) return;
this.activityType = i; this.activityType = i;
this.goodsList=[]
// this.tabType = 0; // this.tabType = 0;
if(i === 0) { if(i === 0) {
this.setTime(0); this.setTime(0);
// this.goodsList = this.seckillList; // this.goodsList = this.seckillList;
} else if (i === 1) { } else if(i === 1) {
this.goodsList = this.grouponList; this.getGrouponList()
// this.goodsList = this.grouponList;
} else { } else {
this.goodsList = this.bargainList; this.getBargainList()
// this.goodsList = this.bargainList;
} }
}, },
setTabType(i) { setTabType(i) {
if(this.tabType == i) return; if(this.tabType == i) return;
this.goodsList=[]
this.tabType = i; this.tabType = i;
if(this.activityType == 0) { if(this.activityType == 0) {
this.setTime(i); this.setTime(i);
}else if(this.activityType == 1){
this.getGrouponList()
}else{
this.getBargainList()
} }
}, },
goDetail(item) { goDetail(item) {
const token = cookie.get('login_status')
console.log(token,1111111111);
if(!token){
uni.showToast({
title: '请登录',
icon: "none",
duration: 2000
});
// this.$yrouter.reLaunch({
// path: '/pages/user/User/index',
// })
return
}
let id = item.id; let id = item.id;
if(this.activityType === 0) { if(this.activityType === 0) {
let time = this.timeList[this.seckillActive].stop let time = this.timeList[this.seckillActive].stop
@ -228,12 +271,13 @@
} else if (this.activityType === 1) { } else if (this.activityType === 1) {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/activity/GroupDetails/index', path: '/pages/activity/GroupDetails/index',
query: { id } query: { id,tabType:this.tabType }
}) })
} else { } else {
let isParticipation=item.isParticipation
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/activity/DargainGoodsDetails/index", path: "/pages/activity/DargainGoodsDetails/index",
query: { id, partake: 0 } query: { id, partake: 0 ,isParticipation}
}); });
// this.$yrouter.push({ // this.$yrouter.push({
// path: "/pages/activity/DargainDetails/index", // path: "/pages/activity/DargainDetails/index",
@ -261,11 +305,13 @@
}) })
}, },
setTime(i) { setTime(i) {
if(i == 0) { this.seckillList=[]
this.seckillForm.page=1
if(i == 0 && this.tabType==0) {
this.seckillActive = this.seckillTimeIndex; this.seckillActive = this.seckillTimeIndex;
} else { } else {
if(this.seckillTimeIndex == this.timeList.length-1) { if(this.seckillTimeIndex == this.timeList.length-1) {
this.seckillActive = 0; return
} else { } else {
this.seckillActive = this.seckillTimeIndex+1; this.seckillActive = this.seckillTimeIndex+1;
} }
@ -281,6 +327,9 @@
}, },
getSeckillList() { getSeckillList() {
if (this.seckillLoaded) return; if (this.seckillLoaded) return;
uni.showLoading({
title: "",
});
let time = this.timeList[this.seckillActive].id; let time = this.timeList[this.seckillActive].id;
getSeckillList(time, this.seckillForm).then(res => { getSeckillList(time, this.seckillForm).then(res => {
this.seckillLoaded = res.data.length < this.seckillForm.limit; this.seckillLoaded = res.data.length < this.seckillForm.limit;
@ -293,25 +342,50 @@
}) })
}, },
getGrouponList() { getGrouponList() {
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
if (this.groupLoaded) return if (this.groupLoaded) return
getCombinationList(this.groupForm).then(res => { uni.showLoading({
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos) title: "",
this.groupForm.page++; });
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit; if(this.activityType === 1 && this.tabType===0){
if(this.activityType === 1) { getCombinationList(this.groupForm).then(res => {
this.goodsList = this.grouponList; this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
} this.groupForm.page++;
}) this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
this.goodsList = this.grouponList;
})
}else{
getUserCombinationList(this.groupForm).then(res => {
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
this.groupForm.page++;
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
this.goodsList = this.grouponList;
})
}
uni.hideLoading();
}, },
getBargainList() { getBargainList() {
if (this.bargainLoaded) return; if (this.bargainLoaded) return;
this.bargainList=[]
this.bargainForm.page=1
uni.showLoading({
title: "",
});
getBargainList(this.bargainForm).then(res => { getBargainList(this.bargainForm).then(res => {
this.bargainList.push.apply(this.bargainList, res.data); if(this.tabType===0){
this.bargainList.push.apply(this.bargainList, res.data.yxStoreBargainQueryVos);
}else{
this.bargainList.push.apply(this.bargainList, res.data.isParticipation);
}
this.bargainForm.page++; this.bargainForm.page++;
this.bargainLoaded = res.data.length < this.bargainForm.limit; this.bargainLoaded = res.data.length < this.bargainForm.limit;
if(this.activityType === 2) { if(this.activityType === 2) {
this.goodsList = this.bargainList; this.goodsList = this.bargainList;
} }
uni.hideLoading();
}); });
}, },
} }

286
pages/home/index.vue

@ -58,16 +58,17 @@
</view> </view>
</view> --> </view> -->
<view class="selection-box acea-row row-between"> <view class="selection-box acea-row row-between">
<view class="left"> <view class="left" hover-class="none">
<navigator url="/pages/user/coupon/GetCoupon/index"> <navigator url="/pages/user/coupon/GetCoupon/index">
<view class="title">福利领券</view> <!-- <view class="title">福利领券</view>
<view class="subtitle">大额优惠券领不停</view> <view class="subtitle">大额优惠券领不停</view> -->
<!-- <image class="img" src="@/static/images/welfare.png" mode=""></image> -->
<image class="img" src="@/static/images/welfare.png" mode=""></image> <image class="img" src="@/static/images/welfare.png" mode=""></image>
</navigator> </navigator>
</view> </view>
<view class="right acea-row row-between row-column"> <view class="right acea-row row-between row-column">
<view class="swiper-box"> <view class="swiper-box">
<swiper style="width: 100%; height: 168rpx;"> <swiper style="width: 100%; height: 168rpx;" autoplay="true" circular="true">
<swiper-item style="border-radius: 16rpx;" v-for="(bar,bargainListIndex) in bargainList" :key="bargainListIndex"> <swiper-item style="border-radius: 16rpx;" v-for="(bar,bargainListIndex) in bargainList" :key="bargainListIndex">
<view class="top acea-row"> <view class="top acea-row">
<image class="img" :src="bar.image" mode="aspectFill"></image> <image class="img" :src="bar.image" mode="aspectFill"></image>
@ -78,7 +79,7 @@
</view> </view>
<view class="text3 acea-row row-between row-middle"> <view class="text3 acea-row row-between row-middle">
<text>原价{{bar.price}}</text> <text>原价{{bar.price}}</text>
<text class="btn" @click="goBarDetail(bar)">发起砍价</text> <text class="btn" :style="bar.isParticipation? 'background-color:#EC3A5B':''" @click="goBarDetail(bar)">{{bar.isParticipation?'参与中':'发起砍价'}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -86,7 +87,7 @@
</swiper> </swiper>
</view> </view>
<view class="swiper-box"> <view class="swiper-box">
<swiper style="width: 100%; height: 168rpx;"> <swiper style="width: 100%; height: 168rpx;" autoplay="true" circular="true">
<swiper-item style="border-radius: 16rpx;" v-for="(item,combinationListIndex) in combinationList" :key="combinationListIndex"> <swiper-item style="border-radius: 16rpx;" v-for="(item,combinationListIndex) in combinationList" :key="combinationListIndex">
<view class="top acea-row"> <view class="top acea-row">
<image class="img" :src="item.image" mode="aspectFill"></image> <image class="img" :src="item.image" mode="aspectFill"></image>
@ -97,6 +98,7 @@
</view> </view>
<view class="text3 acea-row row-between row-middle"> <view class="text3 acea-row row-between row-middle">
<text>原价{{item.productPrice}}</text> <text>原价{{item.productPrice}}</text>
<!-- <text class="btn" :style="item.isShop? 'background-color:#EC3A5B':''" @click="goComDetail(item)">{{item.isShop?'参与中':'发起拼团'}}</text> -->
<text class="btn" @click="goComDetail(item)">发起拼团</text> <text class="btn" @click="goComDetail(item)">发起拼团</text>
</view> </view>
</view> </view>
@ -111,14 +113,14 @@
<view class="text">秒杀专区</view> <view class="text">秒杀专区</view>
<CountDown :isDay="true" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="timeList[seckillActive].stop"></CountDown> <CountDown :isDay="true" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '" :secondText="' 秒'" :datatime="timeList[seckillActive].stop"></CountDown>
</view> </view>
<view class=""> <view class="" hover-class="none">
<navigator url="/pages/activity/activity/index"> <view class="hoverClass acea-row row-middle" hover-class="none" @click="goActivity">
<text>更多</text> 更多活动
</navigator> </view>
<view class="jiantou-right"></view> <!-- <view class="jiantou-right"></view> -->
</view> </view>
</view> </view>
<view class="seconds-list acea-row"> <view class="seconds-list acea-row" v-if="seckillList.length>0">
<view class="seconds-item acea-row row-column row-middle row-left" v-for="(sec,secIndex) in seckillList" :key="secIndex" @click="goSeckillDetail(sec)"> <view class="seconds-item acea-row row-column row-middle row-left" v-for="(sec,secIndex) in seckillList" :key="secIndex" @click="goSeckillDetail(sec)">
<image :src="sec.image" mode="aspectFill"></image> <image :src="sec.image" mode="aspectFill"></image>
<view class="pic-top">{{sec.price}}</view> <view class="pic-top">{{sec.price}}</view>
@ -132,13 +134,13 @@
<view class="title">热门榜单</view> <view class="title">热门榜单</view>
</view> </view>
</view> </view>
<swiper previous-margin="32rpx" class="scroll-hot" :style="'height:'+heightSwiper+'rpx;'" @change="changeNum($event)"> <swiper previous-margin="32rpx" class="scroll-hot" :style="'height:'+heightSwiper+'rpx;'" @change="hotNum">
<swiper-item class="scroll-box" v-for="(item,index) in hotList" :key="index"> <swiper-item class="scroll-box" v-for="(item,index) in hotList" :key="index">
<view class="hot-item acea-row row-column"> <view class="hot-item acea-row row-column">
<view class="title-box acea-row row-middle"> <view class="title-box acea-row row-middle" @click="goHot(item)">
<image src="@/static/images/icon-list.png" mode="aspectFill"></image> <image src="@/static/images/icon-list.png" mode="aspectFill"></image>
<text>{{item.listName}}</text> <text>{{item.listName}}</text>
</view> </view>
<view class="goods-list acea-row row-column"> <view class="goods-list acea-row row-column">
<view class="goods-item acea-row" v-for="(item,index) in topList" :key="index" @tap="goGoodsCon(item)"> <view class="goods-item acea-row" v-for="(item,index) in topList" :key="index" @tap="goGoodsCon(item)">
<view class="hot-left"> <view class="hot-left">
@ -337,7 +339,7 @@
mapActions mapActions
} from 'vuex' } from 'vuex'
import CountDown from '@/components/CountDown'; import CountDown from '@/components/CountDown';
import { getBargainList,getSeckillConfig,getSeckillList } from '@/api/activity'; import { getBargainList,getSeckillConfig,getSeckillList,getUserCombinationList } from '@/api/activity';
// import GoodList from '@/components/GoodList' // import GoodList from '@/components/GoodList'
import PromotionGood from '@/components/PromotionGood' import PromotionGood from '@/components/PromotionGood'
// import CouponWindow from '@/components/CouponWindow' // import CouponWindow from '@/components/CouponWindow'
@ -357,7 +359,8 @@
getHomeData, getHomeData,
getShare, getShare,
getCanvas, getCanvas,
getHotList getHotList,
getIndexHotList
} from '@/api/public' } from '@/api/public'
import cookie from '@/utils/store/cookie' import cookie from '@/utils/store/cookie'
import { import {
@ -506,6 +509,11 @@
limit: 4, // limit: 4, //
}, },
heightSwiper:0, heightSwiper:0,
bargain:[],
groupForm: {
page: 1, //
limit: 10, //
},
} }
}, },
computed: { computed: {
@ -558,27 +566,40 @@
this.$set(this, 'benefit', res.data.benefit) this.$set(this, 'benefit', res.data.benefit)
this.$set(this, 'couponList', res.data.couponList) this.$set(this, 'couponList', res.data.couponList)
this.$set(this, 'combinationList', res.data.combinationList) this.$set(this, 'combinationList', res.data.combinationList)
this.$set(this,'timeList',res.data.seckillConfigVo.seckillTime)
this.$set(this,'seckillActive',res.data.seckillConfigVo.seckillTimeIndex)
this.datatime = this.timeList[this.seckillActive].stop;
this.$set(this,'seckillList',res.data.seckillList)
this.$set(this,'bargainList', res.data.bargainList.yxStoreBargainQueryVos)
this.$set(this,'hotList',res.data.hotListDTOS)
this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4);
// this.combinationList=this.combinationList.map(item=>{
// return {...item,
// isShop:false
// }
// })
uni.hideLoading() uni.hideLoading()
this.setOpenShare(); this.setOpenShare();
// this.getUserCombinationList() //
// this.doColorThief() // this.doColorThief()
}).then(() => { }).then(() => {
let query = uni.createSelectorQuery(); let query = uni.createSelectorQuery();
query.select('.goods-list').boundingClientRect(rect => { query.select('.goods-list').boundingClientRect(rect => {
// console.log('rectrectrect239',rect) // console.log('rectrectrect239',rect)
this.swiperHeight = rect.height; // this.swiperHeight = rect.height;
}).exec(); }).exec();
}) })
getHotList().then(res => { // getIndexHotList().then(res => {
this.hotList = res.data; // this.hotList = res.data;
this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4); // this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4);
}) // })
// //
this.getBargainList(); // this.getBargainList();
// //
this.seckillInfo(); // this.seckillInfo();
}, },
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 80) { if (e.scrollTop > 80) {
@ -589,51 +610,83 @@
}, },
methods: { methods: {
...mapActions(['getLocation']), ...mapActions(['getLocation']),
// //
getBargainList() { hotNum(e){
if (this.bargainLoaded) return; this.classifyType = e.detail.current
getBargainList(this.bargainForm).then(res => { this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4);
this.bargainLoaded = res.data.length < this.bargainForm.limit;
this.bargainList.push.apply(this.bargainList, res.data);
});
}, },
//
// getBargainList() {
// if (this.bargainLoaded) return;
// getBargainList(this.bargainForm).then(res => {
// this.bargainLoaded = res.data.length < this.bargainForm.limit;
// this.bargainList.push.apply(this.bargainList, res.data.yxStoreBargainQueryVos);
// });
// },
//
// getUserCombinationList(){
// getUserCombinationList(this.groupForm).then(res => {
// this.combinationList=this.combinationList.map(item=>{
// res.data.storeCombinationQueryVos.forEach(val=>{
// if(item.id===val.id){
// item.isShop=true
// }
// })
// return {...item}
// })
// })
// },
// //
seckillInfo() { // seckillInfo() {
uni.showLoading({ // uni.showLoading({
title: "", // title: "",
}); // });
getSeckillConfig().then(res => { // getSeckillConfig().then(res => {
this.timeList = res.data.seckillTime; // this.timeList = res.data.seckillTime;
this.seckillTimeIndex = res.data.seckillTimeIndex; // this.seckillTimeIndex = res.data.seckillTimeIndex;
this.seckillActive = res.data.seckillTimeIndex; // this.seckillActive = res.data.seckillTimeIndex;
this.datatime = this.timeList[this.seckillActive].stop; // this.datatime = this.timeList[this.seckillActive].stop;
this.getSeckillList(); // this.getSeckillList();
uni.hideLoading(); // uni.hideLoading();
}) // })
}, // },
// // //
getSeckillList() { // getSeckillList() {
// if (this.seckillLoaded) return; // // if (this.seckillLoaded) return;
let time = this.timeList[this.seckillActive].id; // let time = this.timeList[this.seckillActive].id;
getSeckillList(time, this.seckillForm).then(res => { // getSeckillList(time, this.seckillForm).then(res => {
// this.seckillLoaded = res.data.length < this.seckillForm.limit; // // this.seckillLoaded = res.data.length < this.seckillForm.limit;
this.seckillList.push.apply(this.seckillList, res.data); // this.seckillList.push.apply(this.seckillList, res.data);
// this.seckillForm.page++; // // this.seckillForm.page++;
}) // })
}, // },
goBarDetail(bar){ goBarDetail(bar){
let id=bar.id if(bar.isParticipation){
this.$yrouter.push({
path: "/pages/activity/activity/index",
query: { isType:1 }
});
}else{
this.$yrouter.push({
path: "/pages/activity/activity/index",
query: { isType:0 }
});
}
},
goActivity(){
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/activity/DargainGoodsDetails/index", path: "/pages/activity/activity/index",
query: { id, partake: 0 }
}); });
}, },
goComDetail(item){ goComDetail(item){
let id=item.id let id=item.id
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/activity/GroupDetails/index', path: "/pages/activity/activity/index",
query: { id } query: { isType:2 }
}) });
}, },
goSeckillDetail(sec){ goSeckillDetail(sec){
let id=sec.id let id=sec.id
@ -648,12 +701,6 @@
}) })
}, },
changeNum(e){
let num=e.detail.current
this.changeClassify(num)
},
onShareTimeline: function() { onShareTimeline: function() {
return { return {
title: this.miniHomeRemark, title: this.miniHomeRemark,
@ -676,19 +723,19 @@
changeCurrent(e) { changeCurrent(e) {
this.tabType = e.detail.current; this.tabType = e.detail.current;
}, },
changeListCurrent(e) { // changeListCurrent(e) {
this.tabType = e.detail.current; // this.tabType = e.detail.current;
if (this.tabType == 1) { // if (this.tabType == 1) {
let query = uni.createSelectorQuery(); // let query = uni.createSelectorQuery();
query.select('.hot-list').boundingClientRect(rect => { // query.select('.hot-list').boundingClientRect(rect => {
// console.log('rectrectrect239',rect) // // console.log('rectrectrect239',rect)
if (this.swiperHeight >= rect.height) return; // if (this.swiperHeight >= rect.height) return;
if (this.swiperHeight != 0 && rect.height > this.swiperHeight) { // if (this.swiperHeight != 0 && rect.height > this.swiperHeight) {
this.swiperHeight = rect.height; // this.swiperHeight = rect.height;
} // }
}).exec(); // }).exec();
} // }
}, // },
changeTab(i) { changeTab(i) {
if (this.tabType == i) return; if (this.tabType == i) return;
this.tabType = i; this.tabType = i;
@ -728,6 +775,14 @@
// }, // },
// }) // })
// }, // },
goHot(item){
this.$yrouter.push({
path: '/pages/shop/HotNewGoods/index',
query: {
hotName: item.listName,
},
})
},
goGoodsCon(item) { goGoodsCon(item) {
if(item.isIntegral === 1) { if(item.isIntegral === 1) {
this.$yrouter.push({ this.$yrouter.push({
@ -744,24 +799,24 @@
}, },
}) })
} }
}, },
// goGoodsPromotion() { // goGoodsPromotion() {
// this.$yrouter.push('/pages/shop/GoodsPromotion/index') // this.$yrouter.push('/pages/shop/GoodsPromotion/index')
// }, // },
changeClassify(i) { // changeClassify(i) {
if (this.classifyType == i) return; // if (this.classifyType == i) return;
this.classifyType = i; // this.classifyType = i;
this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4); // this.goodsList = this.sortData(this.hotList[this.classifyType].productInfo, 4);
setTimeout(() => { // setTimeout(() => {
let query = uni.createSelectorQuery(); // let query = uni.createSelectorQuery();
query.select('.hot-list').boundingClientRect(rect => { // query.select('.hot-list').boundingClientRect(rect => {
// console.log('rectrectrect',rect) // // console.log('rectrectrect',rect)
if (this.swiperHeight >= rect.height) return; // if (this.swiperHeight >= rect.height) return;
this.swiperHeight = rect.height; // this.swiperHeight = rect.height;
}).exec(); // }).exec();
}, 160) // }, 160)
}, // },
// //
sortData(oArr, length) { sortData(oArr, length) {
let arr = []; let arr = [];
@ -973,7 +1028,7 @@
.title { .title {
padding-top: 16rpx; padding-top: 16rpx;
font-size: 22rpx; font-size: 22rpx;
color: #2DB5AE; color: #3A3A3C;
line-height: 30rpx; line-height: 30rpx;
text-align: center; text-align: center;
} }
@ -1049,26 +1104,26 @@
width: 230rpx; width: 230rpx;
height: 350rpx; height: 350rpx;
background-color: #F5F6F8; background-color: #F5F6F8;
padding-top: 24rpx; // padding-top: 24rpx;
color: #3A3A3C; color: #3A3A3C;
border-radius: 16rpx; border-radius: 16rpx;
margin-right: 20rpx; margin-right: 20rpx;
box-shadow: 0px 10px 16px 0px rgba(0,0,0,0.06); box-shadow: 0px 10px 16px 0px rgba(0,0,0,0.06);
.title{ overflow: hidden;
margin-left: 26rpx; // .title{
font-size: 36rpx; // margin-left: 26rpx;
font-weight: 600; // font-size: 36rpx;
} // font-weight: 600;
.subtitle{ // }
margin-left: 26rpx; // .subtitle{
font-size: 20rpx; // margin-left: 26rpx;
font-weight: 600; // font-size: 20rpx;
} // font-weight: 600;
// }
.img{ .img{
width: 213rpx; width: 230rpx;
height: 242rpx; height: 350rpx;
margin-left: 18rpx; border-radius: 16rpx;
margin-top: 15rpx;
} }
} }
.right{ .right{
@ -1110,6 +1165,7 @@
width: 250rpx; width: 250rpx;
.btn{ .btn{
height: 40rpx; height: 40rpx;
width: 90rpx;
padding: 0 12rpx; padding: 0 12rpx;
background: #2DB5AE; background: #2DB5AE;
border-radius: 16rpx; border-radius: 16rpx;
@ -1141,7 +1197,7 @@
text-align: center; text-align: center;
margin-right: 18rpx; margin-right: 18rpx;
} }
text::after { .hoverClass::after {
content: ''; content: '';
display: inline-block; display: inline-block;
width: 0; width: 0;
@ -1150,9 +1206,9 @@
border-left: 10rpx solid #2DB5AE; border-left: 10rpx solid #2DB5AE;
border-bottom: 6rpx solid transparent; border-bottom: 6rpx solid transparent;
border-right: 0rpx solid transparent; border-right: 0rpx solid transparent;
margin: 0 20rpx 4rpx 8rpx; margin: 0 20rpx 0 8rpx;
} }
text{ .hoverClass{
font-size: 24rpx; font-size: 24rpx;
color: #2DB5AE; color: #2DB5AE;
} }
@ -1249,7 +1305,7 @@
font-size: 34rpx; font-size: 34rpx;
position: absolute; position: absolute;
top: 90rpx; top: 90rpx;
left: 21rpx; left: 24rpx;
} }
} }
.hot-right{ .hot-right{
@ -1399,7 +1455,7 @@
.tab-line-box { .tab-line-box {
padding-left: 32rpx; padding-left: 32rpx;
.tab-line { .tab-line {
width: 92rpx; width: 92rpx;
height: 4rpx; height: 4rpx;

2
pages/order/OrderSubmission/index.vue

@ -74,7 +74,7 @@
<view class="item acea-row row-between-wrapper" @click="couponTap"> <view class="item acea-row row-between-wrapper" @click="couponTap">
<view class="coupon-info acea-row row-between-wrapper"> <view class="coupon-info acea-row row-between-wrapper">
<view>{{ usableCoupon.couponTitle || '选择优惠券' }}</view> <view>{{ usableCoupon.couponTitle || '选择优惠券' }}</view>
<view class="coupon-value" v-if="usableCoupon.couponTitle">-¥{{usableCoupon.couponPrice}}</view> <view class="coupon-value" v-if="usableCoupon.cname">-¥{{usableCoupon.couponPrice}}</view>
</view> </view>
<image src="../../../static/images/right.png" mode=""></image> <image src="../../../static/images/right.png" mode=""></image>
</view> </view>

7
pages/shop/Evaluations/EvaluationDetail/index.vue

@ -155,6 +155,13 @@
path: '/pages/shop/Evaluations/EvaluationDetail/index?id='+this.id path: '/pages/shop/Evaluations/EvaluationDetail/index?id='+this.id
} }
}, },
//
onShareTimeline(res) {
return {
title: '甄选测评',
path: '/pages/shop/Evaluations/EvaluationDetail/index?id=' + this.id + '&spread=' + uni.getStorageSync('uid') + '&pageType=good&codeType=routine',
}
},
methods: { methods: {
getCollection: function() { getCollection: function() {
let param={} let param={}

42
pages/shop/GoodsCon/index.vue

@ -252,10 +252,10 @@
<text>{{storeInfo.userCollect?'已收藏':'收藏'}}</text> <text>{{storeInfo.userCollect?'已收藏':'收藏'}}</text>
</view> </view>
<view class="bnt acea-row row-between"> <view class="bnt acea-row row-between">
<view class="joinCart" @click="joinCart"> <view class="joinCart" :class="{'isOn':attr.productSelect.stock==0}" @click="joinCart">
<text>加入购物车</text> <text>加入购物车</text>
</view> </view>
<view class="buy" @click="tapBuy"> <view class="buy" :class="{'isOn':attr.productSelect.stock==0}" @click="tapBuy">
<text>立即购买</text> <text>立即购买</text>
</view> </view>
</view> </view>
@ -496,6 +496,26 @@
}, },
} }
}, },
//
onShareTimeline() {
return {
title: this.storeInfo.storeName,
imageUrl: this.storeInfo.image,
path: 'pages/shop/GoodsCon/index?id=' + this.storeInfo.id + '&spread=' + uni.getStorageSync(
'uid') + '&pageType=good&codeType=routine',
success(res) {
uni.showToast({
title: '分享成功',
})
},
fail(res) {
uni.showToast({
title: '分享失败',
icon: 'none',
})
},
}
},
goHome() { goHome() {
this.$yrouter.switchTab('/pages/home/index') this.$yrouter.switchTab('/pages/home/index')
}, },
@ -577,6 +597,13 @@
}) })
getProductDetail(that.id, from) getProductDetail(that.id, from)
.then(res => { .then(res => {
// for(let key in res.data.productValue){
// if(res.data.productValue[key].stock==0){
// res.data.productValue[key].isNo=false
// }else{
// res.data.productValue[key].isNo=true
// }
// }
res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi, res.data.storeInfo.description = res.data.storeInfo.description.replace(/\<img/gi,
'<img style="max-width:100%;height:auto;"') '<img style="max-width:100%;height:auto;"')
// res.data.storeInfo.description = res.data.storeInfo.description.replace(/&nbsp;/gi,'') // res.data.storeInfo.description = res.data.storeInfo.description.replace(/&nbsp;/gi,'')
@ -585,6 +612,7 @@
// attr attr // attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr) that.$set(that.attr, 'productAttr', res.data.productAttr)
that.$set(that, 'productValue', res.data.productValue) that.$set(that, 'productValue', res.data.productValue)
that.$set(that.attr, 'productValues', res.data.productValue)
that.$set(that, 'replyCount', res.data.replyCount) that.$set(that, 'replyCount', res.data.replyCount)
that.$set(that, 'replyChance', res.data.replyChance) that.$set(that, 'replyChance', res.data.replyChance)
that.reply = res.data.reply ? [res.data.reply] : [] that.reply = res.data.reply ? [res.data.reply] : []
@ -757,7 +785,6 @@
// //
ChangeAttr: function(res) { ChangeAttr: function(res) {
// //
let productSelect = this.productValue[res.value] let productSelect = this.productValue[res.value]
console.log(productSelect) console.log(productSelect)
if (productSelect) { if (productSelect) {
@ -808,6 +835,7 @@
// //
joinCart: function() { joinCart: function() {
//0= //0=
if(this.attr.productSelect.stock==0) return
this.goCat(0) this.goCat(0)
}, },
// //
@ -903,6 +931,7 @@
// //
tapBuy: function() { tapBuy: function() {
// 1= // 1=
if(this.attr.productSelect.stock==0) return
this.goCat(1) this.goCat(1)
}, },
linktap(e) { linktap(e) {
@ -979,6 +1008,10 @@
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.isOn{
background-color: #a0d2d0 !important;
// color: #3A3A3C;
}
// .geoPage { // .geoPage {
// position: fixed; // position: fixed;
// width: 100%; // width: 100%;
@ -986,6 +1019,9 @@
// top: 0; // top: 0;
// z-index: 10000; // z-index: 10000;
// } // }
.entry-box{
}
.header { .header {
.backImg { .backImg {
width: 88rpx; width: 88rpx;

59
pages/shop/HotNewGoods/index.vue

@ -38,7 +38,7 @@
<scroll-view class="nav-scroll" scroll-x="true"> <scroll-view class="nav-scroll" scroll-x="true">
<view class="nav-box"> <view class="nav-box">
<view class="item on">全部</view> <!-- <view class="item on">全部</view> -->
<picker class="item" @change="bindPickerChange" :value="mouthIndex" :range="mouthList" v-if="mouthList.length"> <picker class="item" @change="bindPickerChange" :value="mouthIndex" :range="mouthList" v-if="mouthList.length">
<view class="nav-name">{{form.mouth}}</view> <view class="nav-name">{{form.mouth}}</view>
<view class="jiantou-down"></view> <view class="jiantou-down"></view>
@ -122,7 +122,7 @@ export default {
data: function() { data: function() {
return { return {
banner: [], banner: [],
classifyType: 0, classifyType: -1,
classifyList: [], classifyList: [],
mouthList: [], mouthList: [],
mouthIndex: 0, mouthIndex: 0,
@ -157,6 +157,8 @@ export default {
// observer: true, // observer: true,
// observeParents: true // observeParents: true
// } // }
// isShow:false,
// isShowBind:false
}; };
}, },
computed: { computed: {
@ -175,6 +177,7 @@ export default {
} }
}, },
mounted: function() { mounted: function() {
// this.titleInfo(); // this.titleInfo();
// this.getIndexGroomList(); // this.getIndexGroomList();
getBanner(4).then(res => { getBanner(4).then(res => {
@ -195,19 +198,44 @@ export default {
getHotListData().then(res => { getHotListData().then(res => {
this.hotListData = res.data; this.hotListData = res.data;
this.mouthList = res.data.mouthList; this.mouthList = res.data.mouthList;
this.mouthList.map(item=>{
this.hotListData.hotListDTOS=this.hotListData[item].hotListDTOS.forEach(res=>{
res.cateDtos.unshift({
cateId:'',
cateName:'全部',
})
})
return this.hotListData.hotListDTOS
})
this.form.mouth = this.mouthList[0]; this.form.mouth = this.mouthList[0];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS; this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
this.form.hotListId = this.classifyList[this.classifyType].id; if(this.$yroute.query.hotName){
this.subclassList = this.classifyList[this.classifyType].cateDtos; this.classifyList.forEach((hot,hotIndex)=>{
this.subclass = this.subclassList[0]; if(hot.listName===this.$yroute.query.hotName) {
this.form.cateId = this.subclass.cateId; this.subclassList = this.classifyList[hotIndex].cateDtos;
this.getHotList(); this.subclass = this.subclassList[0];
this.form.cateId = this.subclass.cateId;
this.changeClassify(hotIndex)
}
})
}else{
// this.form.hotListId = this.classifyList[this.classifyType].id;
this.form.hotListId = '';
this.subclassList = this.classifyList[0].cateDtos;
this.subclass = this.subclassList[0];
// this.form.cateId = this.subclass.cateId;
this.form.cateId = ' ';
this.classifyType=0
this.getHotList();
}
}) })
}, },
// //
bindPickerChange(e) { bindPickerChange(e) {
if(this.mouthIndex == e.detail.value) return; if(this.mouthIndex == e.detail.value) return;
this.mouthIndex = e.detail.value; this.mouthIndex = e.detail.value;
this.subclassIndex=0
this.form.mouth = this.mouthList[this.mouthIndex]; this.form.mouth = this.mouthList[this.mouthIndex];
this.goodsList = []; this.goodsList = [];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS; this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
@ -221,6 +249,7 @@ export default {
}, },
// //
changeClassify(i) { changeClassify(i) {
if(this.classifyType == i) return if(this.classifyType == i) return
this.classifyType = i; this.classifyType = i;
this.form.hotListId = this.classifyList[this.classifyType].id; this.form.hotListId = this.classifyList[this.classifyType].id;
@ -229,10 +258,22 @@ export default {
}, },
// //
bindPickerSubclassChange(e) { bindPickerSubclassChange(e) {
if(this.subclassIndex == e.detail.value) return; // if(this.subclassIndex == e.detail.value) return;
if(e.detail.value!=0 && this.subclassIndex == e.detail.value) {
return;
}else{
if(e.detail.value=="0"){
this.form.hotListId=''
this.form.cateId=''
}else{
this.subclass = this.subclassList[e.detail.value];
this.form.cateId = this.subclass.cateId;
}
}
this.isShowBind=true
this.subclassIndex = e.detail.value; this.subclassIndex = e.detail.value;
this.subclass = this.subclassList[this.subclassIndex]; this.subclass = this.subclassList[this.subclassIndex];
this.form.cateId = this.subclass.cateId; // this.form.cateId = this.subclass.cateId;
this.goodsList = []; this.goodsList = [];
this.getHotList(); this.getHotList();
}, },

2
pages/shop/IntegralGoodsCon/index.vue

@ -101,9 +101,11 @@
<!-- 词条弹框 --> <!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry"> <view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box"> <view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry"> <view class="entry">
{{entryInfo.entryInfo}} {{entryInfo.entryInfo}}
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
<!-- 商品规格弹窗 --> <!-- 商品规格弹窗 -->

2
pages/shop/brands/brandAll/index.vue

@ -184,7 +184,7 @@
.scoll-left { .scoll-left {
width: 100%; width: 100%;
.scroll-box { .scroll-box {
height: 1180rpx; height: 1450rpx;
} }
.item-box{ .item-box{
flex: 1; flex: 1;

2
pages/user/AboutUs/index.vue

@ -86,7 +86,7 @@
font-weight: 500; font-weight: 500;
color: #3A3A3C; color: #3A3A3C;
// line-height: 32rpx; // line-height: 32rpx;
padding: 0rpx 30rpx; // padding: 0rpx 30rpx;
} }
</style> </style>

1
pages/user/PersonalData/index.vue

@ -149,7 +149,6 @@
this.$yrouter.push("/pages/user/ChangePassword/index"); this.$yrouter.push("/pages/user/ChangePassword/index");
}, },
switchAccounts: function(index) { switchAccounts: function(index) {
console.log(index, '1111111111111111188');
let that = this; let that = this;
this.userIndex = index; this.userIndex = index;
let userInfo = this.switchUserInfo[this.userIndex]; let userInfo = this.switchUserInfo[this.userIndex];

16
pages/user/UserVip/index.vue

@ -94,7 +94,7 @@
</view> </view>
<view class="rights-item"> <view class="rights-item">
<image src="../../../static/images/vip-rights3.png" mode=""></image> <image src="../../../static/images/vip-rights3.png" mode=""></image>
<view class="text">生日福利</view> <view class="text">专属管家</view>
</view> </view>
<view class="rights-item"> <view class="rights-item">
<image src="../../../static/images/vip-rights4.png" mode=""></image> <image src="../../../static/images/vip-rights4.png" mode=""></image>
@ -152,7 +152,7 @@ import {
// import { swiper, swiperSlide } from "vue-awesome-swiper"; // import { swiper, swiperSlide } from "vue-awesome-swiper";
// import Recommend from "@/components/Recommend"; // import Recommend from "@/components/Recommend";
import { getVipInfo, getVipTask, setDetection } from "@/api/user"; import { getVipInfo, getVipTask, setDetection,getVipInformation} from "@/api/user";
export default { export default {
name: "Poster", name: "Poster",
components: { components: {
@ -191,6 +191,8 @@ export default {
illustrate: "", illustrate: "",
activeIndex: 0, activeIndex: 0,
growthPercent: 0, growthPercent: 0,
userLevel:0,//
userGrowth:0//
}; };
}, },
watch: { watch: {
@ -214,6 +216,7 @@ export default {
// } // }
}, },
mounted: function() { mounted: function() {
this.getVipMation()
this.topHeight = this.CustomBar + 188; this.topHeight = this.CustomBar + 188;
let that = this; let that = this;
setDetection(); setDetection();
@ -225,6 +228,7 @@ export default {
}, },
methods: { methods: {
swiperChange: function(e) { swiperChange: function(e) {
let that = this; let that = this;
that.activeIndex = e.mp.detail.current; that.activeIndex = e.mp.detail.current;
@ -245,7 +249,7 @@ export default {
val.benefit = val.benefit.replace(/\n/g,"<br/>"); // /\r/g val.benefit = val.benefit.replace(/\n/g,"<br/>"); // /\r/g
val.explain = val.explain.replace(/\n/g,"<br/>"); // /\r/g val.explain = val.explain.replace(/\n/g,"<br/>"); // /\r/g
if (val.isClear === false) { if (val.isClear === false) {
this.growthPercent = mul(div(this.userInfo.growth, this.vipList[index+1].growthValue), 100); this.growthPercent = mul(div(this.userGrowth, this.vipList[index+1].growthValue), 100);
} }
}) })
}, },
@ -259,6 +263,12 @@ export default {
} }
); );
}, },
getVipMation(){
getVipInformation().then(res=>{
this.userLevel=res.data.level
this.userGrowth=res.data.growth
})
},
getTask: function() { getTask: function() {
let that = this; let that = this;
getVipTask(that.vipList[that.activeIndex].id).then( getVipTask(that.vipList[that.activeIndex].id).then(

30
pages/user/coupon/GetCoupon/index.vue

@ -35,12 +35,16 @@
<view class="coupon-left"> <view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image> <image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box"> <view class="text-box">
<view class="money">¥{{ item.couponPrice }}</view> <view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">¥{{ item.couponPrice }}</view> -->
<!-- <view class="money">7<text></text></view> --> <!-- <view class="money">7<text></text></view> -->
<view class="line"></view> <view class="line"></view>
<view class="tip acea-row row-between"> <view class="tip acea-row row-middle row-between">
<!-- <view class="">{{item.ctype?'仅限定品牌可用':'全部商品可用'}}</view> --> <!-- <view class="">{{item.ctype?'仅限定品牌可用':'全部商品可用'}}</view> -->
<view class="">全部商品可用</view> <view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view> <view v-if="item.endTime === 0">不限时</view>
<view v-else>{{ item.startTime }}-{{ item.endTime }}</view> <view v-else>{{ item.startTime }}-{{ item.endTime }}</view>
</view> </view>
@ -48,7 +52,7 @@
</view> </view>
<view class="coupon-right acea-row row-center-column"> <view class="coupon-right acea-row row-center-column">
<image v-if="item.isUse === true" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""></image> <image v-if="item.isUse === true" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""></image>
<view class="type">{{'满减券' || '折扣券'}}</view> <view class="type">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view class="tip">{{ item.useMinPrice }}可用</view> <view class="tip">{{ item.useMinPrice }}可用</view>
<!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> --> <!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> -->
<view v-if="item.isUse === true" class="btn btn-white" @click="goBrands">去使用</view> <view v-if="item.isUse === true" class="btn btn-white" @click="goBrands">去使用</view>
@ -201,6 +205,24 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header { .header {
.tab-title { .tab-title {
font-size: 32rpx; font-size: 32rpx;

35
pages/user/coupon/UserCoupon/index.vue

@ -35,11 +35,14 @@
<image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image> <image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image>
<image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image> <image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box"> <view class="text-box">
<view class="money">¥{{ item.couponPrice }}</view> <view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">7<text></text></view> --> <!-- <view class="money">7<text></text></view> -->
<view class="line"></view> <view class="line"></view>
<view class="tip acea-row row-between"> <view class="tip acea-row row-between">
<view class="">全部商品可用</view> <view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view> <view v-if="item.endTime === 0">不限时</view>
<view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view> <view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view>
</view> </view>
@ -51,7 +54,7 @@
<image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> <image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
<image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> <image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
</image> </image>
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{'满减券' || '折扣券'}}</view> <view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">{{ item.useMinPrice }}可用</view> <view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">{{ item.useMinPrice }}可用</view>
<view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view>
<view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view> <view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view>
@ -113,7 +116,7 @@
data: function() { data: function() {
return { return {
CustomBar: this.CustomBar, CustomBar: this.CustomBar,
navType: 0, navType: 1,
couponsList: [], couponsList: [],
loading: false, loading: false,
page: 1, page: 1,
@ -129,10 +132,13 @@
}, },
}, },
mounted: function() { mounted: function() {
this.getUseCoupons(0) this.getUseCoupons(1)
}, },
methods: { methods: {
setType(i) { setType(i) {
uni.showLoading({
title:''
})
if (this.navType == i) return; if (this.navType == i) return;
this.navType = i; this.navType = i;
this.couponsList=[]; this.couponsList=[];
@ -216,6 +222,7 @@
this.loading = false this.loading = false
}) })
} }
uni.hideLoading();
}, },
// getUseCoupons: function(i) { // getUseCoupons: function(i) {
// if (this.loading) return //false // if (this.loading) return //false
@ -252,6 +259,24 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header { .header {
.tab-title { .tab-title {
font-size: 32rpx; font-size: 32rpx;

BIN
static/images/vip-rights3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
static/images/vip-rights33.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
static/images/welfare.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 182 KiB

4
store/index.js

@ -28,8 +28,8 @@ const vuexStore = new Vuex.Store({
goName: cookie.get('goName') || '', goName: cookie.get('goName') || '',
}, },
mutations: { mutations: {
login(state, token, expires_time) { login(state, [token, expires_time]) {
console.log('设置token') console.log(expires_time,'设置token')
state.token = token state.token = token
cookie.set(loginKey, token, expires_time) cookie.set(loginKey, token, expires_time)
}, },

2
utils/index.js

@ -303,7 +303,7 @@ export const login = loginInfo => {
console.log('auth登录接口调用成功') console.log('auth登录接口调用成功')
console.log('开始处理登录信息保存,并获取用户详情') console.log('开始处理登录信息保存,并获取用户详情')
uni.hideLoading() uni.hideLoading()
store.commit('login', data.token, dayjs(data.expires_time)) store.commit('login', [data.token, dayjs(data.expires_time)])
// store.dispatch('userInfo', true) // store.dispatch('userInfo', true)
console.log('获取用户token成功'); console.log('获取用户token成功');
getUserInfo().then(user => { getUserInfo().then(user => {

Loading…
Cancel
Save