Browse Source

Merge branch 'sxx' into landong

home_hotList
ld0104 2 years ago
parent
commit
13b0fad4c6
  1. 40
      api/store.js
  2. 7
      components/uni-notice-bar/uni-notice-bar.vue
  3. 6
      pages.json
  4. 6
      pages/activity/DargainDetails/index.vue
  5. 38
      pages/activity/DargainGoodsDetails/index.vue
  6. 39
      pages/activity/GroupDetails/index.vue
  7. 37
      pages/activity/SeckillDetails/index.vue
  8. 68
      pages/activity/activity/index.vue
  9. 7
      pages/shop/Evaluations/EvaluationDetail/index.vue
  10. 198
      pages/shop/GoodsCollection/index.vue
  11. 41
      pages/shop/GoodsCon/index.vue
  12. 598
      pages/shop/HotNewGoods/index.vue
  13. 2
      pages/shop/brands/brandDetail/index.vue
  14. 24
      pages/shop/brands/index.vue
  15. 61
      pages/user/PersonalData/index.vue
  16. 4
      pages/user/User/index.vue
  17. 12
      pages/user/address/AddressManagement/index.vue
  18. 41
      pages/user/coupon/GetCoupon/index.vue
  19. 57
      pages/user/coupon/UserCoupon/index.vue

40
api/store.js

@ -226,24 +226,13 @@ export function getBrandByName() {
login: false
});
}
// <<<<<<< HEAD
// /**
// * 添加收藏
// *
// */
// export function getUserCollection(data) {
// console.log(9999999966);
// return request.post("/collectEvaluation/add", data, {
// login: true
// });
// =======
/**
* 添加收藏
*
*/
export function getUserCollection(data) {
return request.post("/collectEvaluation/add",data);
// >>>>>>> sxx
}
/**
*
@ -262,6 +251,15 @@ export function getBrandDetail(id) {
});
}
/**
* 品牌馆滚动条信息
*/
export function getBrandNoticeInfo() {
return request.get("/brandInfo", {}, {
login: false
});
}
/**
* 词条名查询
*/
@ -269,4 +267,22 @@ export function getEntry(data) {
return request.get("/entryByName", data, {
login: false
});
}
/**
* 热门榜单
*/
export function getHotList(data) {
return request.get("/hotList", data, {
login: false
});
}
/**
* 热门榜单信息
*/
export function getHotListData() {
return request.get("/hotListData", {}, {
login: false
});
}

7
components/uni-notice-bar/uni-notice-bar.vue

@ -17,7 +17,7 @@
<view ref="textBox" class="uni-noticebar__content-wrapper" :class="{'uni-noticebar__content-wrapper--scrollable':scrollable, 'uni-noticebar__content-wrapper--single':!scrollable && (single || moreText)}">
<view :id="elIdBox" class="uni-noticebar__content" :class="{'uni-noticebar__content--scrollable':scrollable, 'uni-noticebar__content--single':!scrollable && (single || moreText)}">
<text :id="elId" ref="animationEle" class="uni-noticebar__content-text" :class="{'uni-noticebar__content-text--scrollable':scrollable,'uni-noticebar__content-text--single':!scrollable && (single || moreText)}"
:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay}">{{text}}</text>
:style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay, 'font-size':fontSize}">{{text}}</text>
</view>
</view>
<!-- <view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more" @click="clickMore">
@ -43,6 +43,7 @@
* @property {String} backgroundColor 背景颜色
* @property {String} color 文字颜色
* @property {String} moreColor 查看更多文字的颜色
* @property {String} fontSize 文字字号
* @property {String} moreText 设置查看更多的文本
* @property {Boolean} single = [true|false] 是否单行
* @property {Boolean} scrollable = [true|false] 是否滚动为true时NoticeBar为单行
@ -85,6 +86,10 @@
type: String,
default: '#999999'
},
fontSize: {
type: String,
default: '24rpx'
},
single: {
//
type: [Boolean, String],

6
pages.json

@ -142,7 +142,8 @@
{
"path": "pages/shop/HotNewGoods/index",
"style": {
"navigationBarTitleText": "热门商品"
"navigationBarTitleText": "热门榜单",
"navigationStyle": "custom"
}
},
{
@ -264,7 +265,8 @@
{
"path": "pages/user/PersonalData/index",
"style": {
"navigationBarTitleText": "个人资料"
"navigationBarTitleText": "个人资料",
"navigationStyle": "custom"
}
},
{

6
pages/activity/DargainDetails/index.vue

@ -259,7 +259,7 @@
</view>
<view class="cutOff on" v-else>
<view class="help font-color-red" v-text="'成功帮砍' + bargainHelpPrice + '元'"></view>
您也可以砍价低价拿哦快去挑选心仪的商品吧~
您也可以砍价低价拿哦快去挑选心仪的商品吧~
</view>
<button class="tipBnt" open-type="share" v-if="bargainUid === userInfo.uid" @click="close">邀请好友帮砍价</button>
<!-- <view class="tipBnt" @click="goPoster" v-if="bargainUid === userInfo.uid">邀请好友帮砍价</view> -->
@ -343,11 +343,11 @@ export default {
if (url) {
//
that.bargainId = url.bargainId
that.bargainUid = url.partake
that.bargainUid = Number(url.partake);
} else {
//
that.bargainId = that.$yroute.query.id
that.bargainUid = that.$yroute.query.partake
that.bargainUid = Number(that.$yroute.query.partake);
}
if (this.bargainUid == 0 || !this.bargainUid) {
// urluiduid

38
pages/activity/DargainGoodsDetails/index.vue

@ -41,13 +41,16 @@
</view>
</view>
<view class="safeguard-info acea-row row-between-wrapper">
<view class="safeguard-item">
<view class="safeguard-info acea-row" v-if="tempName || goodsDetail.config">
<view class="safeguard-item" v-if="tempName">
<image class="img" src="@/static/images/by.png" mode=""></image>
<view>{{199}}包邮</view>
<view class="line1">{{tempName}}</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<view class="safeguard-item" v-for="(item,index) in goodsDetail.config" :key="index">
<image class="img" :src="item.configuration" mode=""></image>
<view class="line1">{{item.content}}</view>
</view>
<!-- <view class="safeguard-item">
<image class="img" src="@/static/images/fxt.png" mode=""></image>
<view>7天无理由</view>
</view>
@ -55,7 +58,7 @@
<view class="safeguard-item">
<image class="img" src="@/static/images/bj.png" mode=""></image>
<view>30天保价</view>
</view>
</view> -->
</view>
<!-- 用户评价 -->
@ -71,7 +74,7 @@
</view> -->
<view class="product-intro">
<view class="title">商品展示</view>
<!-- <view class="title">商品展示</view> -->
<view class="conter">
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="goodsDetail.description" @linktap="linktap" />
@ -136,10 +139,13 @@
goodsDetail: {
minPrice: 0,
price: 0,
stock: '',
unitName: '',
},
bargainId: 0,
bargainUid: 0,
imgUrls: [],
tempName: '',
styleAllStyle: 'width:30rpx;height:24rpx;background:#F5F6F8;border-radius:8rpx;font-size:20rpx;color:#3A3A3C;line-height:24rpx;',
timeTxtStyle: 'font-size:20rpx;color:#F5F6F8;line-height:24rpx;padding:0rpx 4rpx;',
entryInfo: {},
@ -183,6 +189,7 @@
// console.log(this.goodsDetail);
this.goodsDetail.description = this.goodsDetail.description.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"');
this.goodsDetail.rule = this.goodsDetail.rule.replace(/\<img/gi, '<img style="max-width:100%;height:auto;"');
this.tempName = res.data.tempName;
}).catch(res => {
uni.hideLoading()
uni.showToast({
@ -388,7 +395,10 @@
padding: 18rpx 0rpx;
margin: 0rpx 32rpx 20rpx;
.safeguard-item {
width: 226rpx;
flex: 1;
// width: 226rpx;
height: 84rpx;
border-right: 2rpx solid #979797;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
@ -398,13 +408,17 @@
.img {
width: 46rpx;
height: 46rpx;
margin-top: 2rpx;
}
}
.line {
width: 2rpx;
height: 84rpx;
background-color: #979797;
.safeguard-item:last-child {
border-right: 0;
}
// .line {
// width: 2rpx;
// height: 84rpx;
// background-color: #979797;
// }
}
.tui-operation {

39
pages/activity/GroupDetails/index.vue

@ -86,13 +86,16 @@
<!-- <view class="iconfont icon-jiantou"></view> -->
</view>
<view class="safeguard-info acea-row row-between-wrapper">
<view class="safeguard-item">
<view class="safeguard-info acea-row" v-if="tempName || storeInfo.config">
<view class="safeguard-item" v-if="tempName">
<image class="img" src="@/static/images/by.png" mode=""></image>
<view>{{199}}包邮</view>
<view class="line1">{{tempName}}</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<view class="safeguard-item" v-for="(item,index) in storeInfo.config" :key="index">
<image class="img" :src="item.configuration" mode=""></image>
<view class="line1">{{item.content}}</view>
</view>
<!-- <view class="safeguard-item">
<image class="img" src="@/static/images/fxt.png" mode=""></image>
<view>7天无理由</view>
</view>
@ -100,7 +103,7 @@
<view class="safeguard-item">
<image class="img" src="@/static/images/bj.png" mode=""></image>
<view>30天保价</view>
</view>
</view> -->
</view>
<!-- 拼团信息 -->
@ -187,7 +190,7 @@
<!-- 产品介绍 -->
<view class="product-intro">
<view class="title">商品展示</view>
<!-- <view class="title">商品展示</view> -->
<view class="conter">
<mp-html id="article" :setTitle="false" :lazy-load="true" :copy-link="false" :tag-style="tagStyle"
:content="storeInfo.description" @linktap="linktap" />
@ -314,6 +317,7 @@ export default {
reply: [],
replyCount: 0,
replyChance: 0,
tempName: '',
imgUrls: [],
storeInfo: {},
itemNew: {},
@ -358,7 +362,7 @@ export default {
}
},
},
onShow: function() {
onLoad: function() {
this.mountedStart()
},
methods: {
@ -422,6 +426,7 @@ export default {
that.$set(that, 'reply', [res.data.reply])
that.$set(that, 'replyCount', res.data.replyCount)
that.$set(that, 'replyChance', res.data.replyChance)
that.$set(that, 'tempName', res.data.tempName);
that.posterData.image = that.storeInfo.image
if (that.storeInfo.title.length > 30) {
that.posterData.title = that.storeInfo.title.substring(0, 30) + '...'
@ -1669,7 +1674,10 @@ export default {
padding: 18rpx 0rpx;
margin: 0rpx 32rpx 20rpx;
.safeguard-item {
width: 226rpx;
flex: 1;
// width: 226rpx;
height: 84rpx;
border-right: 2rpx solid #979797;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
@ -1679,14 +1687,17 @@ export default {
.img {
width: 46rpx;
height: 46rpx;
// background-color: #FFFFFF;
margin-top: 2rpx;
}
}
.line {
width: 2rpx;
height: 84rpx;
background-color: #979797;
.safeguard-item:last-child {
border-right: 0;
}
// .line {
// width: 2rpx;
// height: 84rpx;
// background-color: #979797;
// }
}
.userEvaluation .title .replyCount {

37
pages/activity/SeckillDetails/index.vue

@ -87,13 +87,16 @@
<!-- <view class="iconfont icon-jiantou"></view> -->
</view>
<view class="safeguard-info acea-row row-between-wrapper">
<view class="safeguard-item">
<view class="safeguard-info acea-row" v-if="tempName || storeInfo.config">
<view class="safeguard-item" v-if="tempName">
<image class="img" src="@/static/images/by.png" mode=""></image>
<view>{{199}}包邮</view>
<view class="line1">{{tempName}}</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<view class="safeguard-item" v-for="(item,index) in storeInfo.config" :key="index">
<image class="img" :src="item.configuration" mode=""></image>
<view class="line1">{{item.content}}</view>
</view>
<!-- <view class="safeguard-item">
<image class="img" src="@/static/images/fxt.png" mode=""></image>
<view>7天无理由</view>
</view>
@ -101,7 +104,7 @@
<view class="safeguard-item">
<image class="img" src="@/static/images/bj.png" mode=""></image>
<view>30天保价</view>
</view>
</view> -->
</view>
<!-- 用户评价 -->
@ -253,6 +256,7 @@ export default {
replyCount: 0,
// replyChance: '',
reply: [],
tempName: '',
cartNum: 1,
attrTxt: '请选择',
productValue: [],
@ -275,7 +279,7 @@ export default {
}
}
},
onShow: function() {
onLoad: function() {
this.mountedStart()
},
methods: {
@ -348,6 +352,7 @@ export default {
that.$set(that, 'imgUrls', res.data.storeInfo.sliderImageArr)
that.$set(that, 'replyCount', res.data.replyCount)
that.$set(that, 'reply', res.data.reply)
that.$set(that, 'tempName', res.data.tempName)
that.posterData.image = that.storeInfo.image_base
that.updateTitle()
if (that.storeInfo.title.length > 30) {
@ -1160,7 +1165,10 @@ export default {
padding: 18rpx 0rpx;
margin: 0rpx 32rpx 20rpx;
.safeguard-item {
width: 226rpx;
flex: 1;
// width: 226rpx;
height: 84rpx;
border-right: 2rpx solid #979797;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
@ -1170,14 +1178,17 @@ export default {
.img {
width: 46rpx;
height: 46rpx;
// background-color: #FFFFFF;
margin-top: 2rpx;
}
}
.line {
width: 2rpx;
height: 84rpx;
background-color: #979797;
.safeguard-item:last-child {
border-right: 0;
}
// .line {
// width: 2rpx;
// height: 84rpx;
// background-color: #979797;
// }
}
.userEvaluation .title .replyCount {

68
pages/activity/activity/index.vue

@ -1,7 +1,7 @@
<template>
<view class="bargain on">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<cu-custom :isBack="true" :isCenter="true" :bgColor="bgColor">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
@ -26,7 +26,7 @@
</view>
<view class="activity-content">
<view class="top-nav-box" :style="activityType !== 0?'height: 104rpx;':''">
<view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(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>
@ -43,7 +43,7 @@
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">下期预告</view>
</view>
</view>
<view class="list-box" :style="activityType !== 0?'height: calc(100% - 104rpx);':''">
<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>
@ -105,10 +105,13 @@
},
data() {
return {
CustomBar: this.CustomBar,
bgColor: '',
banner: [],
swiperCurrent: 0,
activityType: 0,
tabType: 0,
navStyle: false,
goodsList: [],
timeList: [],
seckillList: [],
@ -133,15 +136,13 @@
bargainList: [],
bargainLoaded: false,
isShowRule: false, //
active: false,
active: false,
};
},
mounted() {
this.seckillInfo();
this.getGrouponList();
this.getBargainList();
},
onLoad() {
getBanner(3).then(
@ -149,6 +150,30 @@
this.$set(this,'banner',res.data.banner)
})
},
onPageScroll(e) {
if (e.scrollTop > 130) {
this.bgColor = '#F1F1F1';
this.navStyle = true;
} else {
this.bgColor = '',
this.navStyle = false;
};
},
onReachBottom() {
switch (this.activityType) {
case 0:
this.getSeckillList();
break;
case 1:
this.getGrouponList();
break;
case 2:
this.getBargainList();
break;
default:
break;
}
},
methods: {
//
close: function () {
@ -177,7 +202,6 @@
// this.goodsList = this.seckillList;
} else if (i === 1) {
this.goodsList = this.grouponList;
console.log('this.goodsList', this.goodsList)
} else {
this.goodsList = this.bargainList;
}
@ -274,14 +298,20 @@
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;
}
})
},
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);
this.bargainForm.page++;
this.bargainLoaded = res.data.length < this.bargainForm.limit;
if(this.activityType === 2) {
this.goodsList = this.bargainList;
}
});
},
}
@ -304,6 +334,11 @@
}
}
.header {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
@ -323,11 +358,9 @@
}
.banner-box {
position: relative;
width: 750rpx;
height: 488rpx;
position: absolute;
top: 0;
z-index: -1;
.swiper {
width: 100%;
height: 100%;
@ -361,15 +394,13 @@
}
.activity-content {
position: absolute;
bottom: 0;
position: relative;
top: -64rpx;
width: 750rpx;
height: calc(100vh - 424rpx);
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.top-nav-box {
height: 186rpx;
position: relative;
width: 750rpx;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.activity-type-box {
height: 104rpx;
padding: 34rpx 0rpx 26rpx;
@ -411,7 +442,6 @@
.tab-box {
width: 100%;
position: absolute;
bottom: 0;
height: 82rpx;
overflow: hidden;

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

@ -16,12 +16,7 @@
<view class="synopsis-box acea-row" v-if="info.synopsis">
<view class="left-circle"></view>
<view class="info">
<!-- <text>甄选评测介绍</text> -->{{' ' + info.synopsis}}
{{' ' + info.synopsis}}
<!-- <text>甄选评测介绍</text>{{' ' + info.synopsis}} -->
</view>
<image src="../../../../static/images/evaluation-icon.png" mode=""></image>
</view>
@ -232,7 +227,7 @@
margin: 20rpx 32rpx 0rpx 90rpx;
padding: 20rpx 0rpx 20rpx 50rpx;
width: 628rpx;
// height: 146rpx;
min-height: 146rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;

198
pages/shop/GoodsCollection/index.vue

@ -13,9 +13,9 @@
</cu-custom>
</view>
<view class="content-box" :style="'height:calc(100vh - '+CustomBar+'px);'">
<view class="content">
<view class="nav acea-row row-around" :style="'top:calc('+CustomBar+'px+2px)'">
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:'+CustomBar+'px;'">
<view class="nav acea-row row-around">
<view class="item" @click="changeType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">甄选商品</view>
</view>
@ -23,56 +23,50 @@
<view :class="'title ' + (navType === 1 ? 'active' : '')">甄选评测</view>
</view>
</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">
{{ item.productInfo.attrInfo.sku }}</view>
</view>
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
<view class="collectionGoods" v-if="collectProductList.length > 0">
<view class="item" v-for="(item, collectProductListIndex) in collectProductList"
:key="collectProductListIndex" :data-index="collectProductListIndex" @touchstart="drawStart"
@touchmove="drawMove" @touchend="drawEnd" :style="'right:' + item.right + 'rpx'">
<view v-if="navType==0" class="info-box acea-row row-between-wrapper" @click="goGoodsCon(item)">
<view class="pictrue">
<image :src="item.image" />
</view>
<!-- 评测 -->
<!-- <view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<view class="left acea-row row-column-between">
<view class="acea-row row-column-between">
<view class="title"></view>
<view class="title1"></view>
<view class="title2"></view>
</view>
<view @tap.stop="goMore" class="more">
MORE
</view>
</view>
<view class="right">
<image src="../../../static/images/earth-white.png" mode=""></image>
<view class="text">
<view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row sku-box">
<view class="sku" v-if="item.productInfo.attrInfo">
{{ item.productInfo.attrInfo.sku }}</view>
</view>
</view> -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<image class="img" :src="item.homeImage" mode="aspectFill"></image>
<!-- <view class="more">
MORE
</view> -->
<view class="money" v-if="isIntegral == 1">{{ item.costPrice }}积分</view>
<view class="money" v-else>{{ item.price }}</view>
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)"
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
<!-- 评测 -->
<view v-else class="review-box acea-row row-between" @click="goEvaluation(item)">
<image class="img" :src="item.homeImage" mode="aspectFill"></image>
<!-- <view class="more">MORE</view> -->
</view>
<view class="delete" @tap.stop="delCollection(collectProductListIndex)"
:style="item.right?'right: -122rpx;':''" :class="{'del-height':navType==1}">删除</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
</view>
<!--暂无收藏-->
<view v-else class="noCommodity" style="padding-top:208rpx;">
<view class="noPictrue">
<image src="@/static/images/no-more.png" class="image" />
</view>
<view class="text-big">
什么都没有大概被外星人带走了
</view>
<!-- <view class="text-small">
快去领取福利优惠券吧
</view> -->
</view>
</view>
@ -283,70 +277,7 @@
}
</script>
<style lang="less" scoped>
// .review-box{
// padding: 30rpx 30rpx 20rpx 30rpx;
// width: 687rpx;
// height: 250rpx;
// border-radius: 16rpx;
// background: #F5F6F8;
// box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
// .left{
// max-width: 460rpx;
// .title{
// font-size: 36rpx;
// font-weight: 500;
// text-transform: uppercase;
// }
// .title1{
// margin: 10rpx 0 5rpx 0;
// font-size: 24rpx;
// text-transform: uppercase;
// }
// .title2{
// font-size: 28rpx;
// }
// .more{
// font-size: 24rpx;
// position: relative;
// }
// .more::before{
// position: absolute;
// border-bottom: 1rpx solid black;
// bottom: -8rpx;
// left: -4rpx;
// content: '';
// width: 100rpx;
// background-color: black;
// height: 1rpx;
// }
// .more::after{
// margin-left: 10rpx;
// content: '';
// display: inline-block;
// width: 0;
// height: 0;
// border-top: 10rpx solid transparent;
// border-left: 10rpx solid black;
// border-bottom: 10rpx solid transparent;
// border-right: 10rpx solid transparent;
// }
// }
// .right{
// image{
// width: 200rpx;
// height: 100%;
// }
// }
// }
.review-box {
// padding: 30rpx 30rpx 20rpx 30rpx;
// width: 687rpx;
// height: 240rpx;
border-radius: 16rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
@ -417,10 +348,10 @@
}
}
.content-box {
padding-top: 4rpx;
width: 100vw;
position: relative;
// .content-box {
// padding-top: 4rpx;
// width: 100vw;
// position: relative;
.content {
width: 100%;
@ -428,15 +359,20 @@
overflow-y: scroll;
background: #FFFFFF;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.nav-box {
width: 100vw;
padding-top: 4rpx;
position: fixed;
left: 0;
z-index: 5;
background: #F1F1F1;
}
.nav {
width: 100vw;
background: #FFFFFF;
height: 92rpx;
padding: 34rpx 32rpx 16rpx;
position: fixed;
left: 0;
z-index: 5;
border-radius: 28rpx 28rpx 0rpx 0rpx;
.item {
@ -478,7 +414,7 @@
}
}
}
}
// }
.info-box {
width: 686rpx;
@ -505,7 +441,10 @@
line-height: 46rpx;
}
}
.collectionGoods {
padding-top: 114rpx;
}
.collectionGoods .item .delete {
position: absolute;
top: 0;
@ -528,4 +467,29 @@
height: 240rpx !important;
line-height: 240rpx !important;
}
.noCommodity{
.noPictrue{
width: 428rpx;
height: 526rpx;
}
.text-big{
padding: 0 30rpx;
text-align: center;
font-family: PingFangSC-Medium, PingFang SC;
font-style: 36rpx;
font-weight: 600;
color: #3A3A3C;
line-height: 50rpx;
}
.text-small{
padding: 0 80rpx;
font-family: PingFangSC-Medium, PingFang SC;
text-align: center;
font-style: 28rpx;
font-weight: 400;
color: #3A3A3C;
line-height: 40rpx;
}
}
</style>

41
pages/shop/GoodsCon/index.vue

@ -97,21 +97,22 @@
<!-- <view class="iconfont icon-jiantou"></view> -->
</view>
<view class="safeguard-info acea-row row-between-wrapper">
<view class="safeguard-item">
<view class="safeguard-info acea-row" v-if="tempName || storeInfo.config">
<view class="safeguard-item" v-if="tempName">
<image class="img" src="../../../static/images/by.png" mode=""></image>
<view>{{199}}包邮</view>
<view class="line1">{{tempName}}</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<view class="safeguard-item" v-for="(item,index) in storeInfo.config" :key="index">
<image class="img" :src="item.configuration" mode=""></image>
<view class="line1">{{item.content}}</view>
</view>
<!-- <view class="line"></view> -->
<!-- <view class="safeguard-item">
<image class="img" src="../../../static/images/fxt.png" mode=""></image>
<view>7天无理由</view>
</view>
<view class="line"></view>
<view class="safeguard-item">
<image class="img" src="../../../static/images/bj.png" mode=""></image>
<view>30天保价</view>
</view>
</view> -->
</view>
<!-- 门店信息 -->
@ -409,7 +410,7 @@
systemStore: {},
qqmapsdk: null,
productConClass: 'product-con',
tempName: '全国包邮',
tempName: '',
isIntegral: false,
isUnfold: false, //
entryInfo: {},
@ -1164,7 +1165,10 @@
margin: 0rpx 32rpx 20rpx;
.safeguard-item {
width: 226rpx;
flex: 1;
// width: 226rpx;
height: 84rpx;
border-right: 2rpx solid #979797;
font-size: 20rpx;
font-family: SourceHanSansSCVF;
font-weight: 600;
@ -1175,15 +1179,18 @@
.img {
width: 46rpx;
height: 46rpx;
// background-color: #FFFFFF;
margin-top: 2rpx;
}
}
.line {
width: 2rpx;
height: 84rpx;
background-color: #979797;
.safeguard-item:last-child {
border-right: 0;
}
// .line {
// width: 2rpx;
// height: 84rpx;
// background-color: #979797;
// }
}
.userEvaluation .title .replyCount {

598
pages/shop/HotNewGoods/index.vue

@ -1,53 +1,274 @@
<template>
<view class="quality-recommend">
<view class="title acea-row row-center-wrapper">
<view class="header">
<cu-custom :isBack="true" :isCenter="true" bgColor="''">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">热门榜单</view>
</block>
</cu-custom>
</view>
<view class="banner-box">
<swiper class="swiper" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="swiper-item" @click="goBannerDetail">
<image class="swiper-image " :src="item.pic" mode="aspectFill" lazy-load>
</image>
</swiper-item>
</swiper>
<!-- <view class="dots acea-row">
<view :class="'dot ' + (swiperCurrent === index ? 'dot-active' : '')" v-for="(dot, index) in banner.length" :key="index"></view>
</view> -->
</view>
<view class="content-box">
<scroll-view class="classify-scroll" scroll-x="true">
<view class="classify-box">
<view v-for="(item,index) in classifyList" :key="index" @click="changeClassify(index)">
<view :class="'classify-item acea-row row-middle ' + (classifyType == index?'on':'')">
<image :src="item.listImage" mode="aspectFill"></image>
</view>
</view>
</view>
</scroll-view>
<scroll-view class="nav-scroll" scroll-x="true">
<view class="nav-box">
<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>
</picker>
<view class="item" @click="setSort">
<view class="nav-name">价格</view>
<view class="jiantou-up" v-if="form.priceOrder == 'asc'"></view>
<view class="jiantou-down" v-else-if="form.priceOrder == 'desc'"></view>
</view>
<picker class="item" @change="bindPickerSubclassChange" :value="subclassIndex" :range="subclassList" range-key="cateName" v-if="subclassList.length">
<view class="nav-name">{{subclass.cateName}}</view>
<view class="jiantou-down"></view>
</picker>
<view><view class="nav-name" style="margin-right: 12rpx;"></view></view>
</view>
</scroll-view>
<view class="notice-box acea-row row-middle">
<image src="@/static/images/laba.png" mode="aspectFill"></image>
<view class="uni-notice-bar-box">
榜单每月30号统计下月1号左右更新
<!-- <uni-notice-bar color="#999999" backgroundColor="#F5F6F8" scrollable="true" single="true" :speed="50" fontSize="20rpx" text="榜单每月30号统计,下月1号左右更新"></uni-notice-bar> -->
</view>
</view>
<view class="list-box">
<view class="top-box">
<view class="top-item acea-row" v-for="(item,index) in goodsList" :key="index" @tap="goGoodsCon(item)">
<!-- <view class="top-item acea-row" v-for="(item,index) in topList" :key="index" @tap="goGoodsCon(item)"> -->
<view class="top-num-box">
<view class="">{{index+1}}</view>
<view class="tip">{{index===0?'ST':index===1?'ND':index===2?'RD':'TH'}}</view>
</view>
<image class="img" :src="item.image" mode="aspectFill"></image>
<view class="info-box">
<view class="title more-t">{{item.storeName}}</view>
<view class="price-box" v-if="item.isIntegral === 1">{{ item.integral }}积分</view>
<view class="price-box" v-else>¥{{ item.price }}<text>¥{{item.otPrice}}</text></view>
<view class="original">{{ item.sales }}+人购买</view>
</view>
</view>
</view>
<!-- <view class="goods-list acea-row row-between" v-if="goodsList.length">
<view class="goods-item" v-for="(item, promotionGoodIndex) in goodsList" :key="promotionGoodIndex" @tap="goGoodsCon(item)">
<view class="img-box">
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image>
</view>
<view class="name more-t">{{ item.storeName }}</view>
<view class="price-box">
<view class="current" v-if="item.isIntegral === 1">{{ item.integral }}积分</view>
<view class="current" v-else>¥{{ item.price }}<text>¥{{item.otPrice}}</text></view>
</view>
</view>
</view> -->
</view>
</view>
<!-- <view class="title acea-row row-center-wrapper">
<view class="line"></view>
<view class="name">
<text class="iconfont" :class="icon"></text>{{ name }}
</view>
<view class="line"></view>
</view>
<GoodList :good-list="goodsList" :is-sort="false"></GoodList>
<GoodList :good-list="goodsList" :is-sort="false"></GoodList> -->
</view>
</template>
<script>
// import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import GoodList from "@/components/GoodList";
import { getGroomList } from "@/api/store";
import { getBanner, getHotListData, getHotList, getGroomList } from "@/api/store";
export default {
name: "HotNewGoods",
components: {
// UniNoticeBar,
GoodList
},
props: {},
data: function() {
return {
imgUrls: [],
banner: [],
classifyType: 0,
classifyList: [],
mouthList: [],
mouthIndex: 0,
// mouth: '',
subclassList: [],
subclassIndex: 0,
subclass: {},
form: {
mouth: '', //
hotListId: null, // ID
cateId: null, // ID
page: 1,
limit: 30,
priceOrder: '', // desc/asc
salesOrder: '',
},
// topList: [],
goodsList: [],
name: "",
icon: "",
RecommendSwiper: {
pagination: {
el: ".swiper-pagination",
clickable: true
},
autoplay: {
disableOnInteraction: false,
delay: 2000
},
loop: true,
speed: 1000,
observer: true,
observeParents: true
}
// name: "",
// icon: "",
// RecommendSwiper: {
// pagination: {
// el: ".swiper-pagination",
// clickable: true
// },
// autoplay: {
// disableOnInteraction: false,
// delay: 2000
// },
// loop: true,
// speed: 1000,
// observer: true,
// observeParents: true
// }
};
},
mounted: function() {
this.titleInfo();
this.getIndexGroomList();
// this.titleInfo();
// this.getIndexGroomList();
getBanner(4).then(res => {
this.$set(this,'banner',res.data.banner)
})
this.getHotListData();
},
methods: {
titleInfo: function() {
goBannerDetail(item){
if (item.uniapp_url) {
this.$yrouter.push(item.uniapp_url)
}
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
getHotListData() {
getHotListData().then(res => {
this.hotListData = res.data;
this.mouthList = res.data.mouthList;
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();
})
},
//
bindPickerChange(e) {
if(this.mouthIndex == e.detail.value) return;
this.mouthIndex = e.detail.value;
this.form.mouth = this.mouthList[this.mouthIndex];
this.goodsList = [];
this.classifyList = this.hotListData[this.form.mouth].hotListDTOS;
if(this.classifyList[this.classifyType]) {
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();
}
},
//
changeClassify(i) {
if(this.classifyType == i) return
this.classifyType = i;
this.form.hotListId = this.classifyList[this.classifyType].id;
this.goodsList = [];
this.getHotList();
},
//
bindPickerSubclassChange(e) {
if(this.subclassIndex == e.detail.value) return;
this.subclassIndex = e.detail.value;
this.subclass = this.subclassList[this.subclassIndex];
this.form.cateId = this.subclass.cateId;
this.goodsList = [];
this.getHotList();
},
getHotList() {
uni.showLoading({
title: ''
})
getHotList(this.form).then(res => {
this.goodsList = res.data;
uni.hideLoading();
// this.goodsList = this.sortData(res.data, 5);
})
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
if (oArr.length > length) {
this.topList = oArr.slice(0, length);
arr = oArr.slice(length, oArr.length);
} else {
this.topList = oArr;
}
return arr;
},
setSort() {
if (this.form.priceOrder == '') this.form.priceOrder = 'asc'
else if (this.form.priceOrder == 'asc') this.form.priceOrder = 'desc'
else if (this.form.priceOrder == 'desc') this.form.priceOrder = ''
this.goodsList = [];
this.getHotList();
},
goGoodsCon(item) {
if(item.isIntegral === 1) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
}
},
/* titleInfo: function() {
let type = this.$yroute.query.type;
if (type === "1") {
this.name = "精品推荐";
@ -68,7 +289,7 @@ export default {
let type = this.$yroute.query.type;
getGroomList(type)
.then(res => {
that.imgUrls = res.data.banner;
// that.banner = res.data.banner;
that.goodsList = res.data.list;
})
.catch((err)=> {
@ -78,7 +299,332 @@ export default {
duration: 2000
});
});
}
} */
}
};
</script>
<style lang="less" scoped>
.header {
position: fixed;
top: 0;
left: 0;
z-index: 20;
width: 750rpx;
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.banner-box {
width: 750rpx;
height: 472rpx;
.swiper {
width: 100%;
height: 100%;
.swiper-item {
.swiper-image {
width: 100%;
height: 100%;
}
}
}
/* .dots {
position: absolute;
bottom: 82rpx;
left: 50%;
transform: translateX(-50%);
z-index: 1;
.dot {
width: 8rpx;
height: 8rpx;
background: #FFFFFF;
border-radius: 6rpx;
margin: 0rpx 8rpx;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
.dot-active {
width: 34rpx;
background: #3A3A3C;
transition: width .5s cubic-bezier(.18,.89,.17,.88);
}
} */
}
.content-box {
position: absolute;
left: 0;
bottom: 0;
width: 100vw;
height: calc(100vh - 412rpx);
background: #FFFFFF;
box-shadow: 0rpx -4rpx 38rpx 0rpx rgba(0,0,0,0.1);
border-radius: 28rpx 28rpx 0rpx 0rpx;
.classify-scroll {
position: relative;
top: -60rpx;
margin-bottom: -60rpx;
height: 120rpx;
overflow:hidden;
white-space:nowrap;
.classify-box {
padding-left: 32rpx;
padding-right: 12rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.classify-item {
width: 176rpx;
height: 96rpx;
text-align: center;
margin-right: 20rpx;
image {
width: 176rpx;
height: 96rpx;
border-radius: 16rpx;
transition: all .3s linear;
// background: linear-gradient(135deg, #39D396 0%, #2DB7AD 43%, #1B8DCC 100%);
}
transition: width .3s linear;
}
.classify-item.on {
width: 220rpx;
height: 120rpx;
transition: width .3s linear;
image {
width: 220rpx;
height: 120rpx;
transition: all .3s linear;
}
}
}
}
}
.content-box .nav-scroll {
overflow:hidden;
white-space:nowrap;
}
.content-box .nav-box {
display: flex;
flex-wrap: nowrap;
padding: 20rpx 32rpx;
margin-right: 32rpx;
.item {
height: 40rpx;
border-radius: 16rpx;
border: 2rpx solid #2EB5AE;
padding: 0rpx 18rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 36rpx;
margin-right: 20rpx;
.nav-name,.jiantou-down,.jiantou-up {
display: inline-block;
}
.jiantou-down,.jiantou-up {
margin-bottom: 4rpx;
}
}
.item.on {
width: 124rpx;
background: #2DB5AE;
color: #FFFFFF;
text-align: center;
}
}
.jiantou-down {
width: 0;
height: 0;
border-top: 10rpx solid #2EB5AE;
border-bottom: 0rpx;
border-left: 6rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 2rpx;
}
.jiantou-up {
width: 0;
height: 0;
border-bottom: 10rpx solid #2EB5AE;
border-top: 0rpx;
border-left: 6rpx solid transparent;
border-right: 6rpx solid transparent;
margin-left: 2rpx;
}
.notice-box {
margin: 0rpx 32rpx 18rpx;
padding: 0rpx 16rpx;
height: 38rpx;
background: #F5F6F8;
border-radius: 16rpx;
image {
width: 26rpx;
height: 26rpx;
}
.uni-notice-bar-box {
width: 628rpx;
padding-left: 8rpx;
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 600;
color: #999999;
line-height: 26rpx;
}
}
.list-box {
height: calc(100% - 200rpx);
overflow-y: scroll;
.top-box {
padding: 0rpx 32rpx 12rpx;
.top-item {
width: 686rpx;
height: 174rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
.top-num-box {
width: 146rpx;
height: 174rpx;
padding: 24rpx 0rpx 24rpx 12rpx;
font-size: 80rpx;
font-family: Futura;
font-weight: 700;
color: #2DB5AE;
line-height: 106rpx;
text-align: center;
.tip {
font-size: 32rpx;
line-height: 42rpx;
position: relative;
top: -22rpx;
}
}
.img {
width: 168rpx;
height: 162rpx;
border-radius: 8rpx;
margin: 6rpx 0rpx;
}
.info-box {
width: 370rpx;
height: 174rpx;
padding: 16rpx 18rpx 16rpx 10rpx;
.title {
height: 76rpx;
font-size: 26rpx;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
}
.price-box {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
text {
font-size: 20rpx;
font-weight: 500;
color: #999999;
line-height: 26rpx;
text-decoration: line-through;
padding-left: 10rpx;
}
}
.original {
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
}
}
}
}
}
.list-box .goods-list {
padding: 0rpx 32rpx 8rpx;
.goods-item {
width: 332rpx;
background: #F5F6F8;
box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(0, 0, 0, 0.06);
border-radius: 16rpx;
margin-bottom: 20rpx;
.img-box {
width: 332rpx;
height: 316rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
overflow: hidden;
.img {
width: 100%;
height: 100%;
background-color: #fff;
}
}
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #3A3A3C;
line-height: 38rpx;
height: 76rpx;
margin: 10rpx 16rpx;
}
.price-box {
padding: 0rpx 16rpx 26rpx;
width: 100%;
box-sizing: border-box;
text-align: center;
.current {
font-size: 30rpx;
font-family: Futura;
font-weight: 600;
color: #3A3A3C;
line-height: 40rpx;
text {
padding-left: 10rpx;
font-size: 20rpx;
color: #999999;
line-height: 26rpx;
font-weight: 500;
text-decoration: line-through;
}
}
}
}
}
</style>

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

@ -259,9 +259,9 @@
}
}
.info {
// height: 56rpx;
min-height: 58rpx;
max-height: 124rpx;
// padding-top: 6rpx;
padding-top: 14rpx;
font-size: 16rpx;
font-family: PingFang SC;

24
pages/shop/brands/index.vue

@ -30,16 +30,16 @@
</view>
</view>
<view class="notice-box acea-row row-middle">
<view class="notice-box acea-row row-middle" v-if="noticeInfo.info">
<view class="title">
<image src="../../../static/images/yanjie-logo.png" mode=""></image>
</view>
<view class="min-title acea-row row-between-wrapper">
<view class="">选品标准</view>
<view class="">{{noticeInfo.title}}</view>
<image src="../../../static/images/laba.png" mode="aspectFill"></image>
</view>
<view class="uni-notice-bar-box">
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="60" text="热花今将机支物极十争才线来理始"></uni-notice-bar>
<uni-notice-bar color="#2DB5AE" backgroundColor="#F1F1F1" scrollable="true" single="true" :speed="50" :text="noticeInfo.info"></uni-notice-bar>
</view>
</view>
@ -97,7 +97,7 @@
<script>
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import { getBrands, getProducts ,getBanner} from '@/api/store';
import { getBrands, getProducts ,getBanner, getBrandNoticeInfo} from '@/api/store';
import Loading from '@/components/Loading';
export default {
components: {
@ -108,6 +108,10 @@
return {
currents: 0,
imgUrls: [],
noticeInfo: {
title: '',
info: ''
},
brandList: [],
where: {
page: 1,
@ -125,11 +129,13 @@
onLoad() {
this.getBrandList();
this.getNewProducts();
getBanner(1).then(
res => {
this.$set(this,'imgUrls',res.data.banner)
})
getBanner(1).then(res => {
this.$set(this,'imgUrls',res.data.banner)
})
getBrandNoticeInfo().then(res => {
this.noticeInfo.title = res.data.title;
this.noticeInfo.info = res.data.info;
})
},
onReachBottom() {
!this.loading && this.getNewProducts();

61
pages/user/PersonalData/index.vue

@ -1,5 +1,17 @@
<template>
<view class="personal-data">
<view class="header">
<cu-custom :isBack="true" :isCenter="true">
<block slot="backText">
<view class="backImg">
<image src="@/static/images/back-btn.png" mode=""></image>
</view>
</block>
<block slot="content">
<view class="tab-title">个人资料</view>
</block>
</cu-custom>
</view>
<!-- <view class="wrapper"> -->
<view class="wrapList acea-row row-between-wrapper">
<!-- <view class="item acea-row row-between-wrapper on"> -->
@ -42,12 +54,11 @@
<view class="item acea-row row-between-wrapper">
<view>生日</view>
<view class="input">
<picker mode="date" :value="birth" @change="bindDateChange">
<view v-if="!birth" class="empty">点击完善生日</view>
<view v-else>
{{birth}}
</view>
<picker v-if="!userInfo.birthday" mode="date" :value="birthday" @change="bindDateChange">
<view v-if="!birthday" class="empty">点击完善生日</view>
<view v-else>{{birthday}}</view>
</picker>
<view v-else>{{birthday}}</view>
</view>
</view>
<view class="item acea-row row-between-wrapper">
@ -109,12 +120,13 @@
currentAccounts: 0,
switchUserInfo: [],
userIndex: 0,
birth: '',
birthday: '',
};
},
computed: mapGetters(["userInfo"]),
mounted: function() {
this.avatar = this.userInfo.avatar;
this.birthday = this.userInfo.birthday;
this.isWeixin = isWeixin();
// this.getUserInfo();
},
@ -239,7 +251,7 @@
},
bindDateChange(e) {
console.log(e)
this.birth = e.detail.value;
this.birthday = e.detail.value;
},
//
phoneLogin(e) {
@ -248,7 +260,6 @@
uni.showLoading({
title: '绑定中',
})
// this.wxappBindPhone(e, e.mp.detail.code)
uni.login({
success: (loginRes) => {
wxappBindingPhone({
@ -288,14 +299,10 @@
})
}
},
wxappBindPhone(e, code) {
},
submit: function() {
let userInfo = this.userInfo;
console.log(userInfo, '==============');
// console.log(userInfo, '==============');
let data = {
nickname: '',
avatar: ''
@ -306,6 +313,10 @@
if (this.avatar) {
data.avatar = this.avatar;
}
if(this.birthday) {
data.birthday = this.birthday;
}
if (!this.userInfo.nickname && !this.avatar && !this.birthday) return
postUserEdit(data).then(
(res) => {
this.$store.dispatch("userInfo", true);
@ -353,6 +364,25 @@
};
</script>
<style lang="less" scoped>
.header {
.tab-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 600;
color: #2DB5AE;
line-height: 42rpx;
}
.backImg {
width: 88rpx;
height: 62rpx;
padding-left: 26rpx;
image {
width: 100%;
height: 100%;
}
}
}
.wrapList {
padding: 20rpx 32rpx 32rpx;
@ -426,7 +456,10 @@
border-radius: 8rpx;
margin: 0;
padding: 0;
&::after{
border:none;
}
}
}
}
</style>
</style>

4
pages/user/User/index.vue

@ -71,7 +71,7 @@
<view class="user-info acea-row row-between">
<view class="coupon-box acea-row row-between-wrapper" @click="goUserCoupon">
<view class="title">我的券包</view>
<view class="acea-row row-right">
<view class="acea-row row-right" v-if="userInfo.couponCount !== undefined">
<view v-if="String(userInfo.couponCount).length == 1" class="item acea-row row-column-between">
<view class="top"></view>
<view class="bottom"></view>
@ -86,7 +86,7 @@
</view>
<view class="coupon-box integral-box acea-row row-between-wrapper" @click="goIntegral()">
<view class="title">我的积分</view>
<view class="acea-row row-right">
<view class="acea-row row-right" v-if="userInfo.integral !== undefined">
<view v-if="5-String(userInfo.integral).length > 0" class="item acea-row row-column-between" v-for="(item,index) in 5-String(userInfo.integral).length" :key="index">
<view class="top"></view>
<view class="bottom"></view>

12
pages/user/address/AddressManagement/index.vue

@ -65,16 +65,14 @@
</view>
</view>
<Loading :loaded="loadend" :loading="loading"></Loading>
<Loading :loaded="loadend" :loading="loading" v-if="addressList.length > 0"></Loading>
<view class="no-address" v-if="addressList.length < 1 && page > 1">
<!-- <view class="noCommodity"> -->
<view class="no-address">
<image class="image" src="../../../../static/images/no-address.png" mode="widthFix"></image>
<view class="">等我们也造火箭或许能寄到火星</view>
<view class="tip">赶快添加收货地址吧</view>
<view class="add-icon" @click="addAddress"></view>
<image class="image" src="../../../../static/images/no-address.png" mode="widthFix"></image>
<view class="">等我们也造火箭或许能寄到火星</view>
<view class="tip">赶快添加收货地址吧</view>
<view class="add-icon" @click="addAddress"></view>
<!-- <image :src="`${$VUE_APP_RESOURCES_URL}/images/noAddress.png`" class="image" /> -->
</view>
</view>
<!-- <view style="height:100rpx;"></view> -->

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

@ -158,23 +158,30 @@ export default {
},
getCoupon: function(id, index) {
let that = this
let list = that.couponsList
getCouponReceive(id)
.then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
})
.catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons() {
if (this.loading) return //false

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

@ -14,7 +14,7 @@
</view>
<view class="content" :style="'min-height:calc(100vh - '+CustomBar+'px);'">
<view class="nav-box" :style="'top:calc('+CustomBar+'px)'">
<view class="nav-box" :style="'top:'+CustomBar+'px'">
<view class="nav acea-row row-around">
<view class="item" @click="setType(0)">
<view :class="'title ' + (navType == 0? 'active' : '')">待领取</view>
@ -150,23 +150,30 @@
})
return
}
let list = that.couponsList
getCouponReceive(id)
.then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
})
.catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons: function(i) {
@ -191,14 +198,14 @@
})
}else if(i===0){
getCanReceive(q).then(res => {
res.data.forEach(item=>{
if(!item.isUse){
this.couponsList.push(item)
}
res.data.forEach(item=>{
if(!item.isUse){
this.couponsList.push(item)
}
})
this.loading = false
this.page = this.page + 1
})
this.loading = false
this.page = this.page + 1
})
}else{
getUserFailure(type).then(res=>{
res.data.forEach(item=>{

Loading…
Cancel
Save