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. 9
      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. 122
      pages/activity/activity/index.vue
  17. 282
      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) {
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
*/
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() {
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) {
console.log(11111);
return request.post("/order/comment", data, {
login: true
});

7
api/user.js

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

11
assets/css/style.less

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

3
components/CountDown.vue

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

27
components/CouponListWindow.vue

@ -17,11 +17,15 @@
<view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<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="line"></view>
<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-else>到期时间{{ coupon.endTime }}</view>
</view>
@ -29,7 +33,7 @@
</view>
<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> -->
<view class="type">{{'满减券' || '折扣券'}}</view>
<view class="type">{{coupon.image.length>0? (coupon.couponPrice+'元'):'满减券' || '折扣券'}}</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-weixuanzhong" v-else></view>
@ -80,9 +84,24 @@
left: 16rpx;
}
.text-box {
padding-top: 28rpx;
// padding-top: 28rpx;
padding-left: 32rpx;
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 {

12
components/ProductWindow.vue

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

9
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.113:48080/bxgApp'
export const VUE_APP_API_URL = 'https://farm.lotus-wallet.com/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://app.moo-mou.com/admin-api/bxgApp'
// 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 BXG_TENANT_ID = 129
// export const BXG_TENANT_ID = 138
// export const BXG_TENANT_ID = 129
export const BXG_TENANT_ID = 138
// export const BXG_TENANT_ID = 128

6
manifest.json

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

5
pages/activity/DargainDetails/index.vue

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

64
pages/activity/DargainGoodsDetails/index.vue

@ -107,16 +107,19 @@
<view class="tui-operation-right acea-row">
<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 class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry">
{{entryInfo.entryInfo}}
</view>
</scroll-view>
</view>
</view>
</view>
@ -153,7 +156,8 @@
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;'
}
},
subType:true
};
},
onLoad() {
@ -176,6 +180,7 @@
this.getBargainDetail();
},
methods: {
//
getBargainDetail() {
uni.showLoading({
@ -213,10 +218,30 @@
})
},
goDargain() {
this.$yrouter.push({
path: "/pages/activity/DargainDetails/index",
query: { id: this.bargainId, partake: 0 }
});
let isParticipation=JSON.parse(this.$yroute.query.isParticipation)
if(this.subType && !isParticipation) {
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) {
// console.log('description', e.innerText);
@ -234,6 +259,33 @@
closeEntry() {
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>

68
pages/activity/GroupDetails/index.vue

@ -235,7 +235,8 @@
<view class="tui-operation-right acea-row">
<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">
<tui-button height="100rpx" :size="26" type="warning" shape="rightAngle" @click="openAlone">
<view class="tui-btn__box">
@ -266,9 +267,11 @@
<!-- 词条弹框 -->
<view class="entry-mask" v-show="showEntry" @touchmove.stop.prevent @click="closeEntry">
<view class="entry-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry">
{{entryInfo.entryInfo}}
</view>
</scroll-view>
</view>
</view>
<!-- 商品信息弹窗 -->
@ -350,7 +353,8 @@ export default {
tagStyle: {
a: 'color:#0A59F7;text-decoration:underline;',
img: 'padding:0;margin:0;font-size:0;display:block;'
}
},
subType:true
}
},
computed: {},
@ -373,24 +377,7 @@ export default {
}
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() {
uni.setStorageSync('pathToCart', '/pages/activity/GroupDetails/index?id='+ this.$yroute.query.id);
this.$yrouter.switchTab('/pages/shop/ShoppingCart/index');
@ -436,7 +423,6 @@ export default {
that.posterData.price = that.storeInfo.pinkPrice
that.posterData.code = that.storeInfo.code_base
that.domStatus = true
console.log(this.storeInfo)
that.DefaultSelect()
for(let i in that.productValue) {
that.attrImages.push(that.productValue[i]);
@ -580,10 +566,24 @@ export default {
})
// 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() {
var that = this
console.log(this.attr)
if(this.subType && this.$yroute.query.tabType==0) this.subscribeMessage()
if (that.attr.cartAttr == false) { //
console.log(this.attr.cartAttr)
that.attr.cartAttr = !this.attr.cartAttr
@ -638,6 +638,32 @@ export default {
closeEntry() {
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>

125
pages/activity/SeckillDetails/index.vue

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

122
pages/activity/activity/index.vue

@ -26,7 +26,8 @@
</view>
<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="item" @click="setActivityType(0)">
<view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view>
@ -38,12 +39,14 @@
<view :class="'title ' + (activityType === 2 ? 'active' : '')">砍价专区</view>
</view>
</view>
<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 ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">下期预告</view>
<!-- <view class="tab-box acea-row row-between" v-if="activityType === 0"> -->
<view class="tab-box acea-row row-between" >
<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 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="acea-row row-middle">
<view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view>
@ -77,7 +80,8 @@
</view>
<view class="otPrice" v-if="activityType === 0">¥{{item.otPrice}}</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>
@ -89,7 +93,7 @@
<!-- 提示弹窗 -->
<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="rule-content" v-html="timeList.rule"></view>
<view class="rule-content" v-html="timeList[0].rule"></view>
</view>
</view>
</view>
@ -97,8 +101,9 @@
<script>
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 cookie from '@/utils/store/cookie'
export default {
components: {
CountDown,
@ -134,6 +139,7 @@
limit: 10, //
},
bargainList: [],
participationList:[],//
bargainLoaded: false,
isShowRule: false, //
active: false,
@ -145,6 +151,21 @@
this.getBargainList();
},
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(
res => {
this.$set(this,'banner',res.data.banner)
@ -196,24 +217,46 @@
setActivityType(i) {
if(this.activityType == i) return;
this.activityType = i;
this.goodsList=[]
// this.tabType = 0;
if(i === 0) {
this.setTime(0);
// this.goodsList = this.seckillList;
} else if (i === 1) {
this.goodsList = this.grouponList;
} else if(i === 1) {
this.getGrouponList()
// this.goodsList = this.grouponList;
} else {
this.goodsList = this.bargainList;
this.getBargainList()
// this.goodsList = this.bargainList;
}
},
setTabType(i) {
if(this.tabType == i) return;
this.goodsList=[]
this.tabType = i;
if(this.activityType == 0) {
this.setTime(i);
}else if(this.activityType == 1){
this.getGrouponList()
}else{
this.getBargainList()
}
},
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;
if(this.activityType === 0) {
let time = this.timeList[this.seckillActive].stop
@ -228,12 +271,13 @@
} else if (this.activityType === 1) {
this.$yrouter.push({
path: '/pages/activity/GroupDetails/index',
query: { id }
query: { id,tabType:this.tabType }
})
} else {
let isParticipation=item.isParticipation
this.$yrouter.push({
path: "/pages/activity/DargainGoodsDetails/index",
query: { id, partake: 0 }
query: { id, partake: 0 ,isParticipation}
});
// this.$yrouter.push({
// path: "/pages/activity/DargainDetails/index",
@ -261,11 +305,13 @@
})
},
setTime(i) {
if(i == 0) {
this.seckillList=[]
this.seckillForm.page=1
if(i == 0 && this.tabType==0) {
this.seckillActive = this.seckillTimeIndex;
} else {
if(this.seckillTimeIndex == this.timeList.length-1) {
this.seckillActive = 0;
return
} else {
this.seckillActive = this.seckillTimeIndex+1;
}
@ -281,6 +327,9 @@
},
getSeckillList() {
if (this.seckillLoaded) return;
uni.showLoading({
title: "",
});
let time = this.timeList[this.seckillActive].id;
getSeckillList(time, this.seckillForm).then(res => {
this.seckillLoaded = res.data.length < this.seckillForm.limit;
@ -293,25 +342,50 @@
})
},
getGrouponList() {
this.groupForm.page=1
this.grouponList=[]
this.groupLoaded=false
if (this.groupLoaded) return
getCombinationList(this.groupForm).then(res => {
this.grouponList = this.grouponList.concat(res.data.storeCombinationQueryVos)
this.groupForm.page++;
this.groupLoaded = res.data.storeCombinationQueryVos.length < this.groupForm.limit;
if(this.activityType === 1) {
this.goodsList = this.grouponList;
}
})
uni.showLoading({
title: "",
});
if(this.activityType === 1 && this.tabType===0){
getCombinationList(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;
})
}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() {
if (this.bargainLoaded) return;
this.bargainList=[]
this.bargainForm.page=1
uni.showLoading({
title: "",
});
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.bargainLoaded = res.data.length < this.bargainForm.limit;
if(this.activityType === 2) {
this.goodsList = this.bargainList;
}
uni.hideLoading();
});
},
}

282
pages/home/index.vue

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

2
pages/order/OrderSubmission/index.vue

@ -74,7 +74,7 @@
<view class="item acea-row row-between-wrapper" @click="couponTap">
<view class="coupon-info acea-row row-between-wrapper">
<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>
<image src="../../../static/images/right.png" mode=""></image>
</view>

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

@ -155,6 +155,13 @@
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: {
getCollection: function() {
let param={}

42
pages/shop/GoodsCon/index.vue

@ -252,10 +252,10 @@
<text>{{storeInfo.userCollect?'已收藏':'收藏'}}</text>
</view>
<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>
</view>
<view class="buy" @click="tapBuy">
<view class="buy" :class="{'isOn':attr.productSelect.stock==0}" @click="tapBuy">
<text>立即购买</text>
</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() {
this.$yrouter.switchTab('/pages/home/index')
},
@ -577,6 +597,13 @@
})
getProductDetail(that.id, from)
.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,
'<img style="max-width:100%;height:auto;"')
// res.data.storeInfo.description = res.data.storeInfo.description.replace(/&nbsp;/gi,'')
@ -585,6 +612,7 @@
// attr attr
that.$set(that.attr, 'productAttr', res.data.productAttr)
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, 'replyChance', res.data.replyChance)
that.reply = res.data.reply ? [res.data.reply] : []
@ -757,7 +785,6 @@
//
ChangeAttr: function(res) {
//
let productSelect = this.productValue[res.value]
console.log(productSelect)
if (productSelect) {
@ -808,6 +835,7 @@
//
joinCart: function() {
//0=
if(this.attr.productSelect.stock==0) return
this.goCat(0)
},
//
@ -903,6 +931,7 @@
//
tapBuy: function() {
// 1=
if(this.attr.productSelect.stock==0) return
this.goCat(1)
},
linktap(e) {
@ -979,6 +1008,10 @@
</script>
<style scoped lang="less">
.isOn{
background-color: #a0d2d0 !important;
// color: #3A3A3C;
}
// .geoPage {
// position: fixed;
// width: 100%;
@ -986,6 +1019,9 @@
// top: 0;
// z-index: 10000;
// }
.entry-box{
}
.header {
.backImg {
width: 88rpx;

59
pages/shop/HotNewGoods/index.vue

@ -38,7 +38,7 @@
<scroll-view class="nav-scroll" scroll-x="true">
<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">
<view class="nav-name">{{form.mouth}}</view>
<view class="jiantou-down"></view>
@ -122,7 +122,7 @@ export default {
data: function() {
return {
banner: [],
classifyType: 0,
classifyType: -1,
classifyList: [],
mouthList: [],
mouthIndex: 0,
@ -157,6 +157,8 @@ export default {
// observer: true,
// observeParents: true
// }
// isShow:false,
// isShowBind:false
};
},
computed: {
@ -175,6 +177,7 @@ export default {
}
},
mounted: function() {
// this.titleInfo();
// this.getIndexGroomList();
getBanner(4).then(res => {
@ -195,19 +198,44 @@ export default {
getHotListData().then(res => {
this.hotListData = res.data;
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.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
this.form.hotListId = this.classifyList[this.classifyType].id;
this.subclassList = this.classifyList[this.classifyType].cateDtos;
this.subclass = this.subclassList[0];
this.form.cateId = this.subclass.cateId;
this.getHotList();
if(this.$yroute.query.hotName){
this.classifyList.forEach((hot,hotIndex)=>{
if(hot.listName===this.$yroute.query.hotName) {
this.subclassList = this.classifyList[hotIndex].cateDtos;
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) {
if(this.mouthIndex == e.detail.value) return;
this.mouthIndex = e.detail.value;
this.subclassIndex=0
this.form.mouth = this.mouthList[this.mouthIndex];
this.goodsList = [];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
@ -221,6 +249,7 @@ export default {
},
//
changeClassify(i) {
if(this.classifyType == i) return
this.classifyType = i;
this.form.hotListId = this.classifyList[this.classifyType].id;
@ -229,10 +258,22 @@ export default {
},
//
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.subclass = this.subclassList[this.subclassIndex];
this.form.cateId = this.subclass.cateId;
// this.form.cateId = this.subclass.cateId;
this.goodsList = [];
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-box">
<scroll-view scroll-y="true" style="height: 310rpx;">
<view class="entry">
{{entryInfo.entryInfo}}
</view>
</scroll-view>
</view>
</view>
<!-- 商品规格弹窗 -->

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

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

2
pages/user/AboutUs/index.vue

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

1
pages/user/PersonalData/index.vue

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

16
pages/user/UserVip/index.vue

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

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

@ -35,12 +35,16 @@
<view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<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="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="">全部商品可用</view>
<view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view>
<view v-else>{{ item.startTime }}-{{ item.endTime }}</view>
</view>
@ -48,7 +52,7 @@
</view>
<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>
<view class="type">{{'满减券' || '折扣券'}}</view>
<view class="type">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view class="tip">{{ item.useMinPrice }}可用</view>
<!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> -->
<view v-if="item.isUse === true" class="btn btn-white" @click="goBrands">去使用</view>
@ -201,6 +205,24 @@ export default {
</script>
<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 {
.tab-title {
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-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<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="line"></view>
<view class="tip acea-row row-between">
<view class="">全部商品可用</view>
<view class="">{{item.cname}}</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>
@ -51,7 +54,7 @@
<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>
<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 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>
@ -113,7 +116,7 @@
data: function() {
return {
CustomBar: this.CustomBar,
navType: 0,
navType: 1,
couponsList: [],
loading: false,
page: 1,
@ -129,10 +132,13 @@
},
},
mounted: function() {
this.getUseCoupons(0)
this.getUseCoupons(1)
},
methods: {
setType(i) {
uni.showLoading({
title:''
})
if (this.navType == i) return;
this.navType = i;
this.couponsList=[];
@ -216,6 +222,7 @@
this.loading = false
})
}
uni.hideLoading();
},
// getUseCoupons: function(i) {
// if (this.loading) return //false
@ -252,6 +259,24 @@
</script>
<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 {
.tab-title {
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') || '',
},
mutations: {
login(state, token, expires_time) {
console.log('设置token')
login(state, [token, expires_time]) {
console.log(expires_time,'设置token')
state.token = token
cookie.set(loginKey, token, expires_time)
},

2
utils/index.js

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

Loading…
Cancel
Save