Browse Source

拼团和秒杀商品增加规格选择

zyh
Gao xiaosong 4 years ago
parent
commit
c7d20dbf8e
  1. 2
      assets/css/style.css
  2. 2
      assets/css/style.css.map
  3. 93
      assets/css/style.less
  4. 2
      components/Menu.vue
  5. 8
      components/PromotionGood.vue
  6. 18
      components/UserEvaluation.vue
  7. 49
      components/sh-activity-goods.vue
  8. 18
      components/sh-adv.vue
  9. 6
      pages.json
  10. 7
      pages/activity/GoodsSeckill/index.vue
  11. 234
      pages/activity/GroupDetails/index.vue
  12. 211
      pages/activity/SeckillDetails/index.vue
  13. 217
      pages/home/components/FirstNewProduct.vue
  14. 216
      pages/home/components/HotCommodity.vue
  15. 216
      pages/home/components/ProductsRecommended.vue
  16. 217
      pages/home/components/PromoteProduct.vue
  17. 42
      pages/home/index.vue
  18. 108
      pages/shop/GoodsCon/index.vue

2
assets/css/style.css

File diff suppressed because one or more lines are too long

2
assets/css/style.css.map

File diff suppressed because one or more lines are too long

93
assets/css/style.less

@ -1,4 +1,3 @@
view, view,
scroll-view, scroll-view,
swiper, swiper,
@ -2738,12 +2737,24 @@ page {
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
} }
.product-con .footer .bnt .buy { .product-con .footer .bnt .buy {
border-radius: 0 0.5*100rpx 0.5*100rpx 0; border-radius: 0 0.5*100rpx 0.5*100rpx 0;
background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%); background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%); background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
} }
.product-con .footer .bnt.seckill-bnt {
flex: 1;
margin-left: 20rpx;
.buy {
width: 100%;
border-radius: 50rpx;
}
}
/*订单提交*/ /*订单提交*/
.order-submission .line { .order-submission .line {
width: 100%; width: 100%;
@ -7021,8 +7032,7 @@ page {
/*抢购详情页*/ /*抢购详情页*/
.product-con .nav { .product-con .nav {
box-sizing: border-box; box-sizing: border-box;
background-image: url('https://h5.yixiang.co/static/images/rushBuy.jpg'); background: url('https://h5.yixiang.co/static/images/rushBuy.jpg') #fc4141 no-repeat;
background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 1*100rpx; height: 1*100rpx;
@ -8635,6 +8645,7 @@ rich-text {
text-overflow: ellipsis; text-overflow: ellipsis;
transition: all linear 0.2s; transition: all linear 0.2s;
} }
/*多行文本溢出省略号*/ /*多行文本溢出省略号*/
.more-t { .more-t {
overflow: hidden; overflow: hidden;
@ -8653,58 +8664,68 @@ rich-text {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/*x两端且水平居中*/ /*x两端且水平居中*/
.x-bc { .x-bc {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
/*x平分且水平居中*/ /*x平分且水平居中*/
.x-ac { .x-ac {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
} }
/*x水平靠上对齐*/ /*x水平靠上对齐*/
.x-start { .x-start {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
} }
/*x水平靠下对齐*/ /*x水平靠下对齐*/
.x-end { .x-end {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
/*上下左右居中*/ /*上下左右居中*/
.x-c { .x-c {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
/*y竖直靠左*/ /*y竖直靠左*/
.y-start { .y-start {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
/*y竖直靠右*/ /*y竖直靠右*/
.y-end { .y-end {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
} }
/*y竖直居中*/ /*y竖直居中*/
.y-f { .y-f {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
// y竖直两端 // y竖直两端
.y-b { .y-b {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
/*y竖直两端居中*/ /*y竖直两端居中*/
.y-bc { .y-bc {
display: flex; display: flex;
@ -9197,3 +9218,69 @@ rich-text {
.pa30 { .pa30 {
padding: 30rpx; padding: 30rpx;
} }
.min-goods {
width: 152rpx;
background: #fff;
.img-box {
width: 152rpx;
height: 152rpx;
overflow: hidden;
position: relative;
.tag {
position: absolute;
left: 0;
bottom: 0rpx;
z-index: 2;
line-height: 35rpx;
background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
border-radius: 0px 18rpx 18rpx 0px;
padding: 0 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(120, 79, 6, 1);
}
.img {
width: 100%;
background-color: #ccc;
}
}
.price-box {
width: 100%;
margin-top: 10rpx;
.seckill-current {
font-size: 30rpx;
font-weight: 500;
color: rgba(225, 33, 43, 1);
}
.original {
font-size: 20rpx;
font-weight: 400;
text-decoration: line-through;
color: rgba(153, 153, 153, 1);
margin-left: 14rpx;
}
}
.title {
font-size: 26rpx;
}
}
.contacButton {
padding: 0;
background-color: #fff;
line-height: 25rpx;
}
.contacButton::after {
border: 0;
}

2
components/Menu.vue

@ -39,7 +39,7 @@ export default {
default: [] default: []
}, },
menu: { menu: {
default: 5 default: 4
}, },
imgW: { imgW: {
type: Number, type: Number,

8
components/PromotionGood.vue

@ -57,10 +57,10 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.sh-title-card { .sh-title-card {
width: 750rpx; width: 750rpx;
} }
.title-box { .title-box {
width: 710rpx; width: 710rpx;
height: 88rpx; height: 88rpx;
@ -72,6 +72,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.title-text { .title-text {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -80,6 +81,7 @@
font-weight: bold; font-weight: bold;
} }
} }
.goods-box { .goods-box {
width: 345rpx; width: 345rpx;
background: #fff; background: #fff;
@ -189,8 +191,8 @@ box-sizing: border-box;
// //
.hot-goods { .hot-goods {
background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6); // background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6);
border-radius: 20rpx; // border-radius: 20rpx;
.goods-list { .goods-list {
flex-wrap: wrap; flex-wrap: wrap;

18
components/UserEvaluation.vue

@ -1,10 +1,7 @@
<template> <template>
<view class="evaluateWtapper"> <view class="evaluateWtapper" v-if="reply&&reply.length>0">
<view <view v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex">
class="evaluateItem" <view class="evaluateItem" v-if="item">
v-for="(item, evaluateWtapperIndex) in reply"
:key="evaluateWtapperIndex"
>
<view class="pic-text acea-row row-middle"> <view class="pic-text acea-row row-middle">
<view class="pictrue"> <view class="pictrue">
<image :src="item.avatar" class="image" /> <image :src="item.avatar" class="image" />
@ -27,9 +24,12 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
import { dataFormat } from "@/utils"; import {
dataFormat
} from "@/utils";
export default { export default {
name: "UserEvaluation", name: "UserEvaluation",
@ -42,7 +42,9 @@ export default {
data: function () { data: function () {
return {}; return {};
}, },
mounted: function() {}, mounted: function () {
console.log(this)
},
methods: { methods: {
dataFormat dataFormat
} }

49
components/sh-activity-goods.vue

@ -7,7 +7,7 @@
<view class="price-box"> <view class="price-box">
<view class="y-f"> <view class="y-f">
<text class="seckill-current">{{ detail.price }}</text> <text class="seckill-current">{{ detail.price }}</text>
<text class="original">{{ detail.browse }}人浏览</text> <text class="original">销量{{ detail.sales }}{{detail.unitName}}</text>
</view> </view>
</view> </view>
<view class="title"><slot name="titleText"></slot></view> <view class="title"><slot name="titleText"></slot></view>
@ -37,51 +37,4 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.min-goods {
width: 152rpx;
background: #fff;
.img-box {
width: 152rpx;
height: 152rpx;
overflow: hidden;
position: relative;
.tag {
position: absolute;
left: 0;
bottom: 0rpx;
z-index: 2;
line-height: 35rpx;
background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
border-radius: 0px 18rpx 18rpx 0px;
padding: 0 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(120, 79, 6, 1);
}
.img {
width: 100%;
background-color: #ccc;
}
}
.price-box {
width: 100%;
margin-top: 10rpx;
.seckill-current {
font-size: 30rpx;
font-weight: 500;
color: rgba(225, 33, 43, 1);
}
.original {
font-size: 20rpx;
font-weight: 400;
text-decoration: line-through;
color: rgba(153, 153, 153, 1);
margin-left: 14rpx;
}
}
.title {
font-size: 26rpx;
}
}
</style> </style>

18
components/sh-adv.vue

@ -85,20 +85,20 @@
"list": [{ "list": [{
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.png", "image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.png",
"name": "", "name": "",
"path": "\/pages\/app\/coupon\/list", "path": "/pages/user/coupon/UserCoupon/index",
"path_name": "优惠券-优惠劵中心", "path_name": "优惠券",
"path_type": 1 "path_type": 1
}, { }, {
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.png", "image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.png",
"name": "", "name": "",
"path": "\/pages\/activity\/groupon\/list", "path": "/pages/shop/GoodsList/index",
"path_name": "活动-今日必拼", "path_name": "商品",
"path_type": 1 "path_type": 1
}, { }, {
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.png", "image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.png",
"name": "", "name": "",
"path": "\/pages\/app\/score\/list", "path": "/pages/user/signIn/Integral/index",
"path_name": "应用-积分商城", "path_name": "积分",
"path_type": 1 "path_type": 1
}], }],
"name": "", "name": "",
@ -113,12 +113,8 @@
// //
jump(path) { jump(path) {
this.$yrouter.push({ this.$yrouter.push({
path: '/pages/shop/GoodsCon/index', path
query: {
id: item.id
}
}); });
this.$tools.routerTo(path);
} }
} }
}; };

6
pages.json

@ -419,9 +419,9 @@
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#ffffff", "backgroundColor": "#ffffff",
"height": "50px", "height": "50px",
"fontSize": "10px", "fontSize": "8px",
"iconWidth": "24px", "iconWidth": "16px",
"spacing": "3px", "spacing": "-3px",
"list": [{ "list": [{
"pagePath": "pages/home/index", "pagePath": "pages/home/index",
"iconPath": "static/icon-home.png", "iconPath": "static/icon-home.png",

7
pages/activity/GoodsSeckill/index.vue

@ -38,7 +38,7 @@
<view class="line1" v-text="itemSeckill.title"></view> <view class="line1" v-text="itemSeckill.title"></view>
<view class="money"> <view class="money">
限时价 限时价
<text class="num font-color-red" v-text="'¥' + itemSeckill.price"></text> <text class="num font-color-red">{{itemSeckill.price||''}}</text>
</view> </view>
<view class="progress cart-color"> <view class="progress cart-color">
<view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view> <view class="bg-red" :style="{ width: loading ? itemSeckill.percent + '%' : '' }"></view>
@ -48,7 +48,7 @@
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0" <view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0"
@click="goDetail(itemSeckill.id)">马上抢</view> @click="goDetail(itemSeckill.id)">马上抢</view>
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view> <view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view> <view class="grab bg-color-red" @click="goDetail(itemSeckill.id)" v-if="item.status === 2">即将开始</view>
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view> <view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
</view> </view>
</view> </view>
@ -200,8 +200,10 @@
align-items: center; align-items: center;
flex-direction: row; flex-direction: row;
} }
.list { .list {
padding: 0 20rpx; padding: 0 20rpx;
.item { .item {
padding: .25*100rpx; padding: .25*100rpx;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
@ -212,6 +214,7 @@
border-radius: .2*100rpx; border-radius: .2*100rpx;
} }
} }
.logoPic { .logoPic {
width: 75rpx; width: 75rpx;
height: 70rpx; height: 70rpx;

234
pages/activity/GroupDetails/index.vue

@ -1,12 +1,15 @@
<template> <template>
<view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus"> <view :class="[posterImageStatus ? 'noscroll product-con' : 'product-con']" v-show="domStatus">
<!-- 商品轮播 -->
<product-con-swiper :imgUrls="imgUrls"></product-con-swiper> <product-con-swiper :imgUrls="imgUrls"></product-con-swiper>
<!-- 商品信息描述 -->
<view class="wrapper"> <view class="wrapper">
<view class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<view class="money font-color-red"> <view class="money font-color-red">
<text class="num" v-text="storeInfo.price"></text> <text class="num" v-text="storeInfo.price"></text>
<text class="y-money" v-text="'¥' + storeInfo.productPrice"></text> <!-- <text class="y-money" v-text="'¥' + storeInfo.productPrice"></text> -->
</view> </view>
</view> </view>
<view class="introduce" v-text="storeInfo.title"></view> <view class="introduce" v-text="storeInfo.title"></view>
@ -16,11 +19,22 @@
<view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view> <view v-text="'已拼:' + storeInfo.sales + storeInfo.unitName"></view>
</view> </view>
</view> </view>
<!-- 规格 -->
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<view>
<text>{{ attrTxt }}</text>
<text class="atterTxt">{{ attrValue }}</text>
</view>
<view class="iconfont icon-jiantou"></view>
</view>
<!-- 拼团信息 -->
<view class="notice acea-row row-middle"> <view class="notice acea-row row-middle">
<view class="num font-color-red"> <view class="num font-color-red">
<text class="iconfont icon-laba"></text> <text class="iconfont icon-laba"></text>
已拼{{ storeInfo.sales 已拼{{ storeInfo.sales }}{{ storeInfo.unitName }}
}}{{ storeInfo.unitName }}
<text class="line">|</text> <text class="line">|</text>
</view> </view>
<view class="swiper-no-swiping swiper"> <view class="swiper-no-swiping swiper">
@ -33,6 +47,8 @@
</swiper> </swiper>
</view> </view>
</view> </view>
<!-- 拼团人数头像 -->
<view class="assemble"> <view class="assemble">
<view v-for="(item, groupListindex) in groupList" :key="groupListindex"> <view v-for="(item, groupListindex) in groupList" :key="groupListindex">
<view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount"> <view class="item acea-row row-between-wrapper" v-if="groupListindex < groupListCount">
@ -49,15 +65,8 @@
<text class="font-color-red" v-text="item.count"></text> <text class="font-color-red" v-text="item.count"></text>
<text>人成团</text> <text>人成团</text>
</view> </view>
<count-down <count-down :isDay="false" :tipText="'剩余 '" :dayText="false" :hourText="':'" :minuteText="':'"
:isDay="false" :secondText="false" :datatime="item.stopTime/1000"></count-down>
:tipText="'剩余 '"
:dayText="false"
:hourText="':'"
:minuteText="':'"
:secondText="false"
:datatime="item.stopTime/1000"
></count-down>
</view> </view>
<view class="spellBnt" @click="groupRule(item.id)"> <view class="spellBnt" @click="groupRule(item.id)">
去拼单 去拼单
@ -71,6 +80,8 @@
<text class="iconfont icon-xiangxia"></text> <text class="iconfont icon-xiangxia"></text>
</view> </view>
</view> </view>
<!-- 拼团规则 -->
<view class="playWay"> <view class="playWay">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view>拼团玩法</view> <view>拼团玩法</view>
@ -91,6 +102,8 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 用户评价 -->
<view class="userEvaluation"> <view class="userEvaluation">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view v-text="'用户评价(' + replyCount + ')'"></view> <view v-text="'用户评价(' + replyCount + ')'"></view>
@ -101,30 +114,46 @@
</view> </view>
<UserEvaluation :reply="reply"></UserEvaluation> <UserEvaluation :reply="reply"></UserEvaluation>
</view> </view>
<!-- 产品介绍 -->
<view class="product-intro"> <view class="product-intro">
<view class="title">产品介绍</view> <view class="title">产品介绍</view>
<view class="conter" v-html="storeInfo.description"></view> <view class="conter" v-html="storeInfo.description"></view>
<!-- <view class="conter" v-html=""></view> --> <!-- <view class="conter" v-html=""></view> -->
</view> </view>
<!-- 操作栏 -->
<view style="height:100rpx;"></view> <view style="height:100rpx;"></view>
<view class="footer-group acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<!-- <view class="customerSer acea-row row-center-wrapper row-column"> <view class="item">
<button open-type="contact" class='contacButton'>
<view style="padding-bottom: 8rpx;" class="item">
<view class="iconfont icon-kefu"></view> <view class="iconfont icon-kefu"></view>
<view>客服</view> <text>客服</text>
</view>--> </view>
<view class="customerSer acea-row row-center-wrapper row-column" @click="setCollect"> </button>
<view class="iconfont" :class="userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view> </view>
<view class="item" @click="setCollect" v-if="userCollect">
<view class="iconfont icon-shoucang1"></view>
<text>收藏</text>
</view>
<view class="item" @click="setCollect" v-if="!userCollect">
<view class="iconfont icon-shoucang"></view>
<text>收藏</text> <text>收藏</text>
</view> </view>
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view> <view class="bnt acea-row">
<view class="bnt bg-color-red" @click="openTeam">立即开团</view> <view class="joinCart" @click="openAlone">
<text>单独购买</text>
</view>
<view class="buy" @click="openTeam">
<text>立即开团</text>
</view>
</view> </view>
</view>
<!-- 商品信息弹窗 -->
<ProductWindow v-if="cartNum" v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow> <ProductWindow v-if="cartNum" v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster <StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus"
v-on:setPosterImageStatus="setPosterImageStatus" :posterData="posterData"></StorePoster>
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</view> </view>
</template> </template>
@ -136,9 +165,15 @@ import CountDown from "@/components/CountDown";
import UserEvaluation from "@/components/UserEvaluation"; import UserEvaluation from "@/components/UserEvaluation";
import ProductWindow from "@/components/ProductWindow"; import ProductWindow from "@/components/ProductWindow";
import StorePoster from "@/components/StorePoster"; import StorePoster from "@/components/StorePoster";
import { getCombinationDetail } from "@/api/activity"; import {
import { postCartAdd } from "@/api/store"; getCombinationDetail
import { imageBase64 } from "@/api/public"; } from "@/api/activity";
import {
postCartAdd
} from "@/api/store";
import {
imageBase64
} from "@/api/public";
import { import {
getCoupon, getCoupon,
getCollectAdd, getCollectAdd,
@ -177,6 +212,9 @@ export default {
itemNew: {}, itemNew: {},
groupListCount: 2, groupListCount: 2,
groupList: {}, groupList: {},
attrTxt: "请选择",
productValue: [],
attrValue: "",
swiperTip: { swiperTip: {
direction: "vertical", direction: "vertical",
autoplay: { autoplay: {
@ -190,14 +228,8 @@ export default {
}, },
attr: { attr: {
cartAttr: false, cartAttr: false,
productSelect: { productAttr: [],
image: "", productSelect: {},
store_name: "",
price: "",
stock: "",
unique: "",
cart_num: 1
}
}, },
cartNum: 1, cartNum: 1,
userCollect: false userCollect: false
@ -218,7 +250,9 @@ export default {
openAlone: function () { openAlone: function () {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsCon/index", path: "/pages/shop/GoodsCon/index",
query: { id: this.storeInfo.productId } query: {
id: this.storeInfo.productId
}
}); });
// this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId }); // this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
}, },
@ -246,6 +280,8 @@ export default {
/\<img/gi, /\<img/gi,
'<img style="max-width:100%;height:auto;"' '<img style="max-width:100%;height:auto;"'
); );
that.$set(that.attr, "productAttr", res.data.productAttr);
that.$set(that, "productValue", res.data.productValue);
that.$set(that, "storeInfo", res.data.storeInfo); that.$set(that, "storeInfo", res.data.storeInfo);
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr); that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
that.$set(that, "itemNew", res.data.pinkOkList); that.$set(that, "itemNew", res.data.pinkOkList);
@ -253,7 +289,6 @@ export default {
that.$set(that, "reply", [res.data.reply]); that.$set(that, "reply", [res.data.reply]);
that.$set(that, "replyCount", res.data.replyCount); that.$set(that, "replyCount", res.data.replyCount);
that.$set(that, "replyChance", res.data.replyChance); that.$set(that, "replyChance", res.data.replyChance);
that.setProductSelect();
that.posterData.image = that.storeInfo.image; that.posterData.image = that.storeInfo.image;
if (that.storeInfo.title.length > 30) { if (that.storeInfo.title.length > 30) {
that.posterData.title = that.storeInfo.title.substring(0, 30) + "..."; that.posterData.title = that.storeInfo.title.substring(0, 30) + "...";
@ -264,9 +299,64 @@ export default {
that.posterData.code = that.storeInfo.code_base; that.posterData.code = that.storeInfo.code_base;
that.domStatus = true; that.domStatus = true;
console.log(this.storeInfo) console.log(this.storeInfo)
//that.getImageBase64(); that.DefaultSelect();
}); });
}, },
DefaultSelect: function () {
let productAttr = this.attr.productAttr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
this.$set(productAttr[i], "index", 0);
value.push(productAttr[i].attrValueArr[0]);
}
//sort();:--
let productSelect = this.productValue[value.sort().join(",")];
console.log(productSelect)
if (productSelect && productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", value.sort().join(","));
this.$set(this, "attrTxt", "已选择");
} else if (!productSelect && productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
} else if (!productSelect && !productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
this.$set(
this.attr.productSelect,
"unique",
this.storeInfo.unique || ""
);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
}
},
getImageBase64: function () { getImageBase64: function () {
let that = this; let that = this;
imageBase64(this.posterData.image, that.posterData.code).then(res => { imageBase64(this.posterData.image, that.posterData.code).then(res => {
@ -283,14 +373,18 @@ export default {
var that = this; var that = this;
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/activity/GroupRule/index", path: "/pages/activity/GroupRule/index",
query: { id } query: {
id
}
}); });
}, },
goReply: function () { goReply: function () {
var that = this; var that = this;
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/shop/EvaluateList/index", path: "/pages/shop/EvaluateList/index",
query: { id: that.storeInfo.product_id } query: {
id: that.storeInfo.product_id
}
}); });
}, },
setGroupListCount: function () { setGroupListCount: function () {
@ -317,18 +411,30 @@ export default {
duration: 2000 duration: 2000
}); });
}, },
setProductSelect: function() { //
var that = this; ChangeAttr: function (res) {
var attr = that.attr; //
attr.productSelect.image = that.storeInfo.image; let productSelect = this.productValue[res.value];
attr.productSelect.store_name = that.storeInfo.title; if (productSelect) {
attr.productSelect.price = that.storeInfo.price+''; this.attr.productAttr[res.indexw].index = res.indexn;
attr.productSelect.stock = that.storeInfo.stock; this.$set(this.attr.productSelect, "image", productSelect.image);
attr.cartAttr = false; this.$set(this.attr.productSelect, "price", productSelect.price);
console.log(that.storeInfo) this.$set(this.attr.productSelect, "stock", productSelect.stock);
that.$set(that, "attr", attr); this.$set(this.attr.productSelect, "unique", productSelect.unique);
console.log(this) this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res.value);
this.$set(this, "attrTxt", "已选择");
} else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
}
}, },
openTeam: function () { openTeam: function () {
var that = this; var that = this;
if (that.attr.cartAttr == false) { if (that.attr.cartAttr == false) {
@ -344,19 +450,25 @@ export default {
.then(res => { .then(res => {
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/order/OrderSubmission/index", path: "/pages/order/OrderSubmission/index",
query: { id: res.data.cartId } query: {
id: res.data.cartId
}
}); });
}) })
.catch(err => { .catch(err => {
uni.showToast({ uni.showToast({
title: title: err.msg || err.response.data.msg || err.response.data.message,
err.msg || err.response.data.msg || err.response.data.message,
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });
}); });
} }
} },
//
selecAttrTap: function () {
this.attr.cartAttr = true;
this.isOpen = true;
},
} }
}; };
</script> </script>
@ -364,14 +476,24 @@ export default {
.product-con .wrapper { .product-con .wrapper {
padding-bottom: 0.26 * 100rpx; padding-bottom: 0.26 * 100rpx;
} }
.noscroll { .noscroll {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.product-con .footer-group .bnt { .product-con .footer-group .bnt {
// flex:1; // flex:1;
width: 43%; width: 43%;
} }
.footer-group {
button {
border: 0;
background: none;
}
}
.product-con .footer-group .bnt.bg-color-violet { .product-con .footer-group .bnt.bg-color-violet {
background-color: #fa8013; background-color: #fa8013;
} }

211
pages/activity/SeckillDetails/index.vue

@ -10,19 +10,22 @@
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view class="times"> <view class="times">
<view>距秒杀结束仅剩</view> <view>距秒杀结束仅剩</view>
<count-down <count-down :isDay="false" :tipText="false" :dayText="false" :hourText="' : '" :minuteText="' : '"
:isDay="false" :secondText="false" :datatime="datatime"></count-down>
:tipText="false"
:dayText="false"
:hourText="' : '"
:minuteText="' : '"
:secondText="false"
:datatime="datatime"
></count-down>
</view> </view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
</view> </view>
<!-- 规格 -->
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<view>
<text>{{ attrTxt }}</text>
<text class="atterTxt">{{ attrValue }}</text>
</view>
<view class="iconfont icon-jiantou"></view>
</view>
<view class="wrapperRush"> <view class="wrapperRush">
<view class="introduce acea-row row-between"> <view class="introduce acea-row row-between">
<view class="infor" v-text="storeInfo.title"></view> <view class="infor" v-text="storeInfo.title"></view>
@ -39,21 +42,59 @@
</view> </view>
<view style="height:100rpx;"></view> <view style="height:100rpx;"></view>
<view class="footerRush acea-row row-between-wrapper"> <view class="footerRush acea-row row-between-wrapper">
<!-- <view <view class="item">
class="customerSer acea-row row-center-wrapper row-column" <button open-type="contact" class='contacButton'>
@click="routerGo()" <view style="padding-bottom: 8rpx;" class="item">
> <view class="iconfont icon-kefu"></view>
<text>客服</text>
</view>
</button>
</view>
</view>
<view style="height:100rpx;"></view>
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper">
<view class="item">
<button open-type="contact" class='contacButton'>
<view style="padding-bottom: 8rpx;" class="item">
<view class="iconfont icon-kefu"></view> <view class="iconfont icon-kefu"></view>
<view>客服</view> <text>客服</text>
</view> --> </view>
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view> </button>
</view>
<view class="bnt acea-row">
<view class="buy seckill-bnt" @click="tapBuy">
<text>立即购买</text>
</view>
</view>
</view>
<view style="height:100rpx;"></view>
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper">
<view class="item">
<button open-type="contact" class='contacButton'>
<view style="padding-bottom: 8rpx;" class="item">
<view class="iconfont icon-kefu"></view>
<text>客服</text>
</view>
</button>
</view> </view>
<view class="bnt seckill-bnt acea-row">
<view class="buy " @click="tapBuy">
<text>立即购买</text>
</view>
</view>
</view>
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow> <ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
<StorePoster <StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus"
v-on:setPosterImageStatus="setPosterImageStatus" :posterData="posterData"></StorePoster>
:posterImageStatus="posterImageStatus"
:posterData="posterData"
></StorePoster>
</view> </view>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
@ -67,9 +108,15 @@ import ProductConSwiper from "@/components/ProductConSwiper";
import CountDown from "@/components/CountDown"; import CountDown from "@/components/CountDown";
import ProductWindow from "@/components/ProductWindow"; import ProductWindow from "@/components/ProductWindow";
import StorePoster from "@/components/StorePoster"; import StorePoster from "@/components/StorePoster";
import { getSeckillDetail } from "@/api/activity"; import {
import { postCartAdd } from "@/api/store"; getSeckillDetail
import { imageBase64 } from "@/api/public"; } from "@/api/activity";
import {
postCartAdd
} from "@/api/store";
import {
imageBase64
} from "@/api/public";
const NAME = "SeckillDetails"; const NAME = "SeckillDetails";
export default { export default {
@ -97,16 +144,13 @@ export default {
replyCount: 0, replyCount: 0,
reply: [], reply: [],
cartNum: 1, cartNum: 1,
attrTxt: "请选择",
productValue: [],
attrValue: "",
attr: { attr: {
cartAttr: false, cartAttr: false,
productSelect: { productAttr: [],
image: "", productSelect: {},
store_name: "",
price: "",
stock: "",
unique: "",
cart_num: 1
}
}, },
datatime: 0 datatime: 0
}; };
@ -124,7 +168,9 @@ export default {
}, },
methods: { methods: {
routerGo(item) { routerGo(item) {
this.$yrouter.push({ path: '/pages/user/CustomerList/index' }) this.$yrouter.push({
path: '/pages/user/CustomerList/index'
})
}, },
mountedStart: function () { mountedStart: function () {
var that = this; var that = this;
@ -135,6 +181,8 @@ export default {
/\<img/gi, /\<img/gi,
'<img style="max-width:100%;height:auto;"' '<img style="max-width:100%;height:auto;"'
); );
that.$set(that.attr, "productAttr", res.data.productAttr);
that.$set(that, "productValue", res.data.productValue);
that.$set(that, "storeInfo", res.data.storeInfo); that.$set(that, "storeInfo", res.data.storeInfo);
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr); that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
that.$set(that, "replyCount", res.data.replyCount); that.$set(that, "replyCount", res.data.replyCount);
@ -148,8 +196,10 @@ export default {
} }
that.posterData.price = that.storeInfo.price; that.posterData.price = that.storeInfo.price;
that.posterData.code = that.storeInfo.code_base; that.posterData.code = that.storeInfo.code_base;
that.setProductSelect(); // that.setProductSelect();
that.domStatus = true; that.domStatus = true;
that.DefaultSelect();
}); });
}, },
updateTitle() { updateTitle() {
@ -160,6 +210,61 @@ export default {
// sTop.scrollTop = 0; // sTop.scrollTop = 0;
this.posterImageStatus = !this.posterImageStatus; this.posterImageStatus = !this.posterImageStatus;
}, },
DefaultSelect: function () {
let productAttr = this.attr.productAttr;
let value = [];
for (let i = 0; i < productAttr.length; i++) {
this.$set(productAttr[i], "index", 0);
value.push(productAttr[i].attrValueArr[0]);
}
//sort();:--
let productSelect = this.productValue[value.sort().join(",")];
console.log(productSelect)
if (productSelect && productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", value.sort().join(","));
this.$set(this, "attrTxt", "已选择");
} else if (!productSelect && productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
} else if (!productSelect && !productAttr.length) {
this.$set(
this.attr.productSelect,
"store_name",
this.storeInfo.storeName
);
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", this.storeInfo.stock);
this.$set(
this.attr.productSelect,
"unique",
this.storeInfo.unique || ""
);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
}
},
// //
changeFun: function (opt) { changeFun: function (opt) {
if (typeof opt !== "object") opt = {}; if (typeof opt !== "object") opt = {};
@ -185,18 +290,32 @@ export default {
} }
} }
}, },
setProductSelect: function() { //
var that = this; ChangeAttr: function (res) {
var attr = that.attr; //
attr.productSelect.image = that.storeInfo.image; let productSelect = this.productValue[res.value];
attr.productSelect.store_name = that.storeInfo.title; if (productSelect) {
attr.productSelect.price = that.storeInfo.price; this.attr.productAttr[res.indexw].index = res.indexn;
attr.productSelect.stock = that.storeInfo.stock; this.$set(this.attr.productSelect, "image", productSelect.image);
attr.cartAttr = false; this.$set(this.attr.productSelect, "price", productSelect.price);
that.$set(that, "attr", attr); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res.value);
this.$set(this, "attrTxt", "已选择");
} else {
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
this.$set(this.attr.productSelect, "price", this.storeInfo.price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
this.$set(this, "attrValue", "");
this.$set(this, "attrTxt", "请选择");
}
}, },
selecAttrTap: function () { selecAttrTap: function () {
this.cartAttr = true; this.attr.cartAttr = true;
this.isOpen = true;
}, },
tapBuy: function () { tapBuy: function () {
var that = this; var that = this;
@ -213,7 +332,9 @@ export default {
.then(res => { .then(res => {
that.$yrouter.push({ that.$yrouter.push({
path: "/pages/order/OrderSubmission/index", path: "/pages/order/OrderSubmission/index",
query: { id: res.data.cartId } query: {
id: res.data.cartId
}
}); });
}) })
.catch(err => { .catch(err => {

217
pages/home/components/FirstNewProduct.vue

@ -0,0 +1,217 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:3} })">
<text class="title">首发新品</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods"
@tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box">
<view class="tag">new</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "FirstNewProduct",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

216
pages/home/components/HotCommodity.vue

@ -0,0 +1,216 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:2} })">
<text class="title">热门榜单</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="jump('/pages/shop/GoodsCon/index',{id:mgoods.id})">
<view class="img-box">
<view class="tag">hot</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "HotCommodity",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

216
pages/home/components/ProductsRecommended.vue

@ -0,0 +1,216 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push({ path: '/pages/shop/HotNewGoods/index',query:{type:1} })">
<text class="title">精品推荐</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box">
<!-- <view class="tag">{{ mgoods.people}}人团</view> -->
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ mgoods.price }}</text>
<text class="original">销量{{ mgoods.sales }}{{mgoods.unitName}}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "ProductsRecommended",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

217
pages/home/components/PromoteProduct.vue

@ -0,0 +1,217 @@
<template>
<view class="group-goods pa20 mx20 mb10" v-if="detail.length>0">
<view class="title-box x-bc" @tap="$yrouter.push('/pages/shop/GoodsPromotion/index')">
<text class="title">促销单品</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods"
@tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } })">
<view class="img-box">
<view class="tag">促销</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">日常价{{ mgoods.price }}</text>
<text class="original">仅剩{{ mgoods.stock }}{{ mgoods.unitName }}</text>
</view>
</view>
<view class="title">
<slot name="titleText"></slot>
</view>
</view>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from '@/components/sh-activity-goods.vue';
export default {
name: "ProductsRecommended",
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
}
</script>
<style lang="scss" scoped>
.group-goods {
position: relative;
z-index: 9;
}
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

42
pages/home/index.vue

@ -3,8 +3,7 @@
<!-- 导航栏 --> <!-- 导航栏 -->
<view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }"> <view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">
<view class="cu-custom" :style="[{height:CustomBar+ 'px',}]"> <view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">
<view class="cu-bar fixed" :style="customStyle" <view class="cu-bar fixed" :style="customStyle" :class="[bgcolor]">
:class="[bgcolor]">
<view class="action"> <view class="action">
<text class="nav-title shopro-selector-rect">{{ 'yshop商城' }}</text> <text class="nav-title shopro-selector-rect">{{ 'yshop商城' }}</text>
</view> </view>
@ -24,7 +23,7 @@
</view> </view>
</view> </view>
<view class="banner-swiper-box mb10" v-if="banner.length>0"> <view class="banner-swiper-box" v-if="banner.length>0">
<canvas canvas-id="colorThief" class="hide-canvas"></canvas> <canvas canvas-id="colorThief" class="hide-canvas"></canvas>
<swiper class="banner-carousel shopro-selector-rect" circular @change="swiperChange" :autoplay="true"> <swiper class="banner-carousel shopro-selector-rect" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="carousel-item " <swiper-item v-for="(item, index) in banner" :key="index" class="carousel-item "
@ -38,10 +37,26 @@
v-for="(dot, index) in banner.length" :key="index"></text> v-for="(dot, index) in banner.length" :key="index"></text>
</view> </view>
</view> </view>
<view class="content_box"> <uni-notice-bar scrollable="true" @click="goRoll(singNew)" single="true" :speed="10" showIcon="true"
:text="singNew.info"></uni-notice-bar>
<view class="content_box home_content_box">
<!-- 菜单 -->
<Menu :list="menus"></Menu> <Menu :list="menus"></Menu>
<!-- 滚动新闻 -->
<!-- 广告 -->
<Adv /> <Adv />
<!-- 热门榜单 -->
<HotCommodity :detail="likeInfo"></HotCommodity>
<!-- 超值拼团 -->
<Groupon :detail="combinationList" /> <Groupon :detail="combinationList" />
<!-- 首发新品->秒杀 -->
<FirstNewProduct :detail="firstList"></FirstNewProduct>
<!-- 精品推荐 -->
<ProductsRecommended :detail="bastList"></ProductsRecommended>
<!-- 促销单品
<PromoteProduct :detail="benefit"></PromoteProduct> -->
<!-- 为您推荐 -->
<PromotionGood :benefit="benefit"></PromotionGood> <PromotionGood :benefit="benefit"></PromotionGood>
</view> </view>
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose"> <Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose">
@ -63,6 +78,11 @@
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar' import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import Adv from '@/components/sh-adv' import Adv from '@/components/sh-adv'
import Groupon from '@/components/sh-groupon.vue' import Groupon from '@/components/sh-groupon.vue'
import HotCommodity from './components/HotCommodity';
import FirstNewProduct from './components/FirstNewProduct';
import ProductsRecommended from './components/ProductsRecommended';
import { import {
getHomeData, getHomeData,
getShare getShare
@ -86,7 +106,10 @@
CouponWindow, CouponWindow,
Menu, Menu,
Adv, Adv,
Groupon Groupon,
HotCommodity,
FirstNewProduct,
ProductsRecommended
}, },
props: {}, props: {},
data: function () { data: function () {
@ -96,7 +119,7 @@
formatMenus: [], formatMenus: [],
bgcolorAry: [], bgcolorAry: [],
categoryCurrent: 0, categoryCurrent: 0,
menuNum: 5, menuNum: 4,
bgcolor: '', bgcolor: '',
bgColor: '', bgColor: '',
swiperCurrent: 0, // swiperCurrent: 0, //
@ -357,7 +380,7 @@
}, },
}, },
created: async function () { created: async function () {
await this.doColorThief(); // await this.doColorThief();
}, },
}; };
</script> </script>
@ -452,7 +475,7 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
bottom: 20rpx; bottom: 20rpx;
z-index: 66; z-index: 5;
.banner-dot { .banner-dot {
width: 14rpx; width: 14rpx;
@ -508,4 +531,7 @@
font-size: 15px; font-size: 15px;
} }
} }
.home_content_box{
margin-top: -10rpx;
}
</style> </style>

108
pages/shop/GoodsCon/index.vue

@ -1,21 +1,17 @@
<template> <template>
<view :class="productConClass"> <view :class="productConClass">
<view v-if="storeInfo.id"> <view v-if="storeInfo.id">
<!-- 轮播图 -->
<product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper> <product-con-swiper :img-urls="storeInfo.sliderImageArr"></product-con-swiper>
<!-- 商品信息描述 -->
<view class="wrapper"> <view class="wrapper">
<view class="share acea-row row-between row-bottom"> <view class="share acea-row row-between row-bottom">
<view class="money font-color-red"> <view class="money font-color-red">
<text></text> <text></text>
<text class="num">{{ storeInfo.price }}</text> <text class="num">{{ storeInfo.price }}</text>
<text <text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">{{ storeInfo.vipPrice }}</text>
class="vip-money" <image src="@/static/images/vip.png" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" />
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
>{{ storeInfo.vipPrice }}</text>
<image
src="@/static/images/vip.png"
class="image"
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
/>
</view> </view>
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view> <view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
</view> </view>
@ -25,22 +21,17 @@
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text> <text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text>
<text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text> <text>销量:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text>
</view> </view>
<view <view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
class="coupon acea-row row-between-wrapper"
@click="couponTap"
v-if="couponList.length"
>
<text class="hide line1 acea-row"> <text class="hide line1 acea-row">
<text>优惠券</text> <text>优惠券</text>
<text <text class="activity" v-for="(item, couponListEq) in couponList"
class="activity" :key="couponListEq">{{ item.use_min_price }}{{ item.coupon_price }}</text>
v-for="(item, couponListEq) in couponList"
:key="couponListEq"
>{{ item.use_min_price }}{{ item.coupon_price }}</text>
</text> </text>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
</view> </view>
<!-- 运费 -->
<div class="attribute acea-row row-between-wrapper"> <div class="attribute acea-row row-between-wrapper">
<div> <div>
运费 运费
@ -48,6 +39,7 @@
</div> </div>
</div> </div>
<!-- 规格 -->
<view class="attribute acea-row row-between-wrapper" @click="selecAttrTap"> <view class="attribute acea-row row-between-wrapper" @click="selecAttrTap">
<view> <view>
<text>{{ attrTxt }}</text> <text>{{ attrTxt }}</text>
@ -55,6 +47,8 @@
</view> </view>
<view class="iconfont icon-jiantou"></view> <view class="iconfont icon-jiantou"></view>
</view> </view>
<!-- 门店信息 -->
<view class="store-info"> <view class="store-info">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view>门店信息</view> <view>门店信息</view>
@ -76,15 +70,14 @@
</view> </view>
</view> </view>
<view class="addressBox"> <view class="addressBox">
<a <a :href="'tel:'+systemStore.phone" class="iconfont icon-dadianhua01 font-color-red phone"></a>
:href="'tel:'+systemStore.phone"
class="iconfont icon-dadianhua01 font-color-red phone"
></a>
<view class="addressTxt corlor-yshop">距离{{systemStore.distance}}千米</view> <view class="addressTxt corlor-yshop">距离{{systemStore.distance}}千米</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 用户评价 -->
<view class="userEvaluation" v-if="replyCount"> <view class="userEvaluation" v-if="replyCount">
<view class="title acea-row row-between-wrapper"> <view class="title acea-row row-between-wrapper">
<view>用户评价({{ replyCount }})</view> <view>用户评价({{ replyCount }})</view>
@ -95,6 +88,8 @@
</view> </view>
<user-evaluation :reply="reply"></user-evaluation> <user-evaluation :reply="reply"></user-evaluation>
</view> </view>
<!-- 商品推荐 -->
<view class="superior"> <view class="superior">
<view class="title acea-row row-center-wrapper"> <view class="title acea-row row-center-wrapper">
<image src="@/static/images/ling.png" /> <image src="@/static/images/ling.png" />
@ -120,12 +115,24 @@
</view> </view>
</template> </template>
</view> </view>
<!-- 商品详情 -->
<view class="product-intro"> <view class="product-intro">
<text class="title">产品介绍</text> <text class="title">产品介绍</text>
<view class="conter" v-html="storeInfo.description"></view> <view class="conter" v-html="storeInfo.description"></view>
</view> </view>
<view style="height:100rpx;"></view> <view style="height:100rpx;"></view>
<!-- 操作栏 -->
<view class="footer acea-row row-between-wrapper"> <view class="footer acea-row row-between-wrapper">
<view class="item">
<button open-type="contact" class='contacButton'>
<view style="padding-bottom: 8rpx;" class="item">
<view class="iconfont icon-kefu"></view>
<text>客服</text>
</view>
</button>
</view>
<view class="item" @click="setCollect" v-if="storeInfo.userCollect"> <view class="item" @click="setCollect" v-if="storeInfo.userCollect">
<view class="iconfont icon-shoucang1"></view> <view class="iconfont icon-shoucang1"></view>
<text>收藏</text> <text>收藏</text>
@ -155,15 +162,17 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 优惠券 -->
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop> <CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
<!-- 商品规格弹窗 -->
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow> <ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
<StorePoster <!-- 分享海报 -->
v-on:setPosterImageStatus="setPosterImageStatus" <StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus"
:posterImageStatus="posterImageStatus" :posterData="posterData" :goodId="id"></StorePoster>
:posterData="posterData" <!-- 分享弹窗 -->
:goodId="id"
></StorePoster>
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo> <ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
<view class="generate-posters acea-row row-middle on" v-if="posters"> <view class="generate-posters acea-row row-middle on" v-if="posters">
<view class="item" @click="setPosterImageStatus"> <view class="item" @click="setPosterImageStatus">
<view class="iconfont icon-haibao"></view> <view class="iconfont icon-haibao"></view>
@ -205,10 +214,20 @@ import {
getCollectDel, getCollectDel,
getUserInfo, getUserInfo,
} from "@/api/user"; } from "@/api/user";
import { isWeixin, PosterCanvas, handleQrCode } from "@/utils"; import {
import { wechatEvevt } from "@/libs/wechat"; isWeixin,
import { imageBase64 } from "@/api/public"; PosterCanvas,
import { mapGetters } from "vuex"; handleQrCode
} from "@/utils";
import {
wechatEvevt
} from "@/libs/wechat";
import {
imageBase64
} from "@/api/public";
import {
mapGetters
} from "vuex";
export default { export default {
name: "GoodsCon", name: "GoodsCon",
@ -352,7 +371,10 @@ export default {
if (this.$deviceType == "app") { if (this.$deviceType == "app") {
from.from = "app"; from.from = "app";
} }
uni.showLoading({ title: "加载中", mask: true }); uni.showLoading({
title: "加载中",
mask: true
});
getProductDetail(that.id, from) getProductDetail(that.id, from)
.then((res) => { .then((res) => {
res.data.storeInfo.description = res.data.storeInfo.description.replace( res.data.storeInfo.description = res.data.storeInfo.description.replace(
@ -397,8 +419,7 @@ export default {
}) })
.catch((err) => { .catch((err) => {
uni.showToast({ uni.showToast({
title: title: err.msg || err.response.data.msg || err.response.data.message,
err.msg || err.response.data.msg || err.response.data.message,
icon: "none", icon: "none",
duration: 2000, duration: 2000,
}); });
@ -616,10 +637,8 @@ export default {
productId: that.id, productId: that.id,
cartNum: that.attr.productSelect.cart_num, cartNum: that.attr.productSelect.cart_num,
new: news, new: news,
uniqueId: uniqueId: that.attr.productSelect !== undefined ?
that.attr.productSelect !== undefined that.attr.productSelect.unique : "",
? that.attr.productSelect.unique
: "",
}; };
postCartAdd(q) postCartAdd(q)
.then(function (res) { .then(function (res) {
@ -692,9 +711,9 @@ export default {
if (this.isLogin) { if (this.isLogin) {
getUserInfo().then((res) => { getUserInfo().then((res) => {
href = href =
href.indexOf("?") === -1 href.indexOf("?") === -1 ?
? href + "?spread=" + res.data.uid href + "?spread=" + res.data.uid :
: href + "&spread=" + res.data.uid; href + "&spread=" + res.data.uid;
var configAppMessage = { var configAppMessage = {
desc: data.storeInfo, desc: data.storeInfo,
title: data.storeName, title: data.storeName,
@ -817,9 +836,11 @@ export default {
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
} }
.product-con .store-info .info .picTxt .addressBox .iconfont { .product-con .store-info .info .picTxt .addressBox .iconfont {
font-size: 0.4 * 100rpx; font-size: 0.4 * 100rpx;
} }
.product-con .store-info .info .picTxt .addressBox .addressTxt { .product-con .store-info .info .picTxt .addressBox .addressTxt {
font-size: 0.24 * 100rpx; font-size: 0.24 * 100rpx;
color: #eb3729; color: #eb3729;
@ -829,6 +850,7 @@ export default {
font-size: 0.28 * 100rpx; font-size: 0.28 * 100rpx;
color: #808080; color: #808080;
} }
.product-con .store-info .praise .iconfont { .product-con .store-info .praise .iconfont {
font-size: 0.28 * 100rpx; font-size: 0.28 * 100rpx;
} }

Loading…
Cancel
Save