|
@@ -1,86 +1,90 @@
|
|
<template>
|
|
<template>
|
|
<mobile-frame>
|
|
<mobile-frame>
|
|
- <scroll-view class="scrollView" scroll-with-animation :scroll-into-view="topItem" scroll-y="true"
|
|
|
|
- @scroll="handleScroll">
|
|
|
|
- <view class="main" id="top">
|
|
|
|
- <view class="onemain">
|
|
|
|
- <scroll-view scroll-y="true" class="scroll-view">
|
|
|
|
- <view class="list-scroll-view">
|
|
|
|
- <view class="one">
|
|
|
|
- <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
|
|
- indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
|
- <swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
|
|
|
|
- <image class="image" :src="item.url" mode=""></image>
|
|
|
|
- </swiper-item>
|
|
|
|
- </swiper>
|
|
|
|
- </view>
|
|
|
|
- <view class="two">
|
|
|
|
- <view class="two_1">
|
|
|
|
- <view class="money_1">
|
|
|
|
- <text>¥</text>
|
|
|
|
- <text>{{info.sell_money}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="money_2">
|
|
|
|
- <text>¥</text>
|
|
|
|
- <text>{{info.flow_money}}</text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="main">
|
|
|
|
+ <view class="onemain">
|
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view" scroll-with-animation :scroll-into-view="topItem"
|
|
|
|
+ @scroll="handleScroll">
|
|
|
|
+ <view class="list-scroll-view" id="top">
|
|
|
|
+ <view class="one">
|
|
|
|
+ <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
|
|
+ indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
|
+ <swiper-item class="list" v-for="(item,index) in bannerList" :key="index">
|
|
|
|
+ <image class="image" :src="item.url" mode=""></image>
|
|
|
|
+ </swiper-item>
|
|
|
|
+ </swiper>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="two">
|
|
|
|
+ <view class="two_1">
|
|
|
|
+ <view class="money_1">
|
|
|
|
+ <text>¥</text>
|
|
|
|
+ <text>{{info.sell_money}}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="two_2">{{info.name}}</view>
|
|
|
|
- <view class="two_3">{{info.shot_brief}}</view>
|
|
|
|
- <view class="two_4">
|
|
|
|
- <text>运费{{info.freight}}元</text>
|
|
|
|
- <text>{{info.send_time}}内发货</text>
|
|
|
|
|
|
+ <view class="money_2">
|
|
|
|
+ <text>¥</text>
|
|
|
|
+ <text>{{info.flow_money}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="thr">
|
|
|
|
- <view class="thr_1" @click="toChoose">
|
|
|
|
- <view class="title">选择规格</view>
|
|
|
|
- <text class="iconfont icon-dayufuhao"></text>
|
|
|
|
- </view>
|
|
|
|
- <view class="thr_1">
|
|
|
|
- <view class="title">商品评价({{info.comment||0}})</view>
|
|
|
|
- <text class="iconfont icon-dayufuhao"></text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="two_2">{{info.name}}</view>
|
|
|
|
+ <view class="two_3">{{info.shot_brief}}</view>
|
|
|
|
+ <view class="two_4">
|
|
|
|
+ <text>运费{{info.freight}}元</text>
|
|
|
|
+ <text>{{info.send_time}}内发货</text>
|
|
</view>
|
|
</view>
|
|
- <view class="four">
|
|
|
|
- <view class="four_1">
|
|
|
|
- <image class="image" :src="shop.file"></image>
|
|
|
|
- <view class="other">
|
|
|
|
- <view class="name">{{shop.name}}</view>
|
|
|
|
- <view class="other_1"><text>宝贝数</text>{{shop.num}}</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="four_2">
|
|
|
|
- <view class="grade">商品:<text>{{shop.grade||'5.00'}}</text></view>|
|
|
|
|
- <view class="grade">发货:<text>{{shop.grade||'5.00'}}</text></view>|
|
|
|
|
- <view class="grade">服务:<text>{{shop.grade||'5.00'}}</text></view>
|
|
|
|
- </view>
|
|
|
|
- <view class="four_2">
|
|
|
|
- <view class="btn">进入店铺</view>
|
|
|
|
- <view class="btn">关注</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="thr">
|
|
|
|
+ <view class="thr_1" @click="toChoose">
|
|
|
|
+ <view class="title">选择规格</view>
|
|
|
|
+ <text class="iconfont icon-dayufuhao"></text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="thr_1">
|
|
|
|
+ <view class="title">商品评价({{info.comment||0}})</view>
|
|
|
|
+ <text class="iconfont icon-dayufuhao"></text>
|
|
</view>
|
|
</view>
|
|
- <view class="five">
|
|
|
|
- <view class="five_1">{{info.brief}}</view>
|
|
|
|
- <view class="five_2" v-for="(item,index) in bannerList" :key="index">
|
|
|
|
- <image class="image" :src="item.url"></image>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="four">
|
|
|
|
+ <view class="four_1">
|
|
|
|
+ <image class="image" :src="shop.file"></image>
|
|
|
|
+ <view class="other">
|
|
|
|
+ <view class="name">{{shop.name}}</view>
|
|
|
|
+ <view class="other_1"><text>宝贝数</text>{{shop.num}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="four_2">
|
|
|
|
+ <view class="grade">商品:<text>{{shop.grade||'5.00'}}</text></view>|
|
|
|
|
+ <view class="grade">发货:<text>{{shop.grade||'5.00'}}</text></view>|
|
|
|
|
+ <view class="grade">服务:<text>{{shop.grade||'5.00'}}</text></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="four_2">
|
|
|
|
+ <view class="btn">进入店铺</view>
|
|
|
|
+ <view class="btn">关注</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </scroll-view>
|
|
|
|
- </view>
|
|
|
|
- <view class="foot">
|
|
|
|
- <uni-goods-nav :options="options" :button-group="buttonGroup" @click="onClick"
|
|
|
|
- @buttonClick="buttonClick" />
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="five">
|
|
|
|
+ <view class="five_1">{{info.brief}}</view>
|
|
|
|
+ <view class="five_2" v-for="(item,index) in bannerList" :key="index">
|
|
|
|
+ <image class="image" :src="item.url"></image>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="foot">
|
|
|
|
+ <uni-goods-nav :options="options" :button-group="buttonGroup" @click="onClick"
|
|
|
|
+ @buttonClick="buttonClick" />
|
|
</view>
|
|
</view>
|
|
- </scroll-view>
|
|
|
|
|
|
+ </view>
|
|
<view class="collect">
|
|
<view class="collect">
|
|
- <text v-if="collection==false" @click="toCollect('true')" class="iconfont icon-kongxin"></text>
|
|
|
|
- <text v-if="collection==true" @click="toCollect('false')" class="iconfont icon-shixin"></text>
|
|
|
|
|
|
+ <text v-if="!collection" @click="toCollect('1')" class="iconfont icon-kongxin"></text>
|
|
|
|
+ <text v-else @click="toCollect('0')" class="iconfont icon-shixin"></text>
|
|
</view>
|
|
</view>
|
|
<view class="menu">
|
|
<view class="menu">
|
|
- <text @click="menu" class="iconfont icon-gengduo"></text>
|
|
|
|
|
|
+ <text @click="toMenu" class="iconfont icon-gengduo"></text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="menu_1" v-if="menu">
|
|
|
|
+ <view class="title" v-for="(item,index) in barList" :key="index">
|
|
|
|
+ <image class="image" :src="item.normal"></image>
|
|
|
|
+ <view class="name">{{item.name}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="backTop" v-if="isShow==true">
|
|
<view class="backTop" v-if="isShow==true">
|
|
<text @click="backTop" class="iconfont icon-fanhuidingbu"></text>
|
|
<text @click="backTop" class="iconfont icon-fanhuidingbu"></text>
|
|
@@ -109,8 +113,7 @@
|
|
<view class="thr">
|
|
<view class="thr">
|
|
<text>数量:</text>
|
|
<text>数量:</text>
|
|
<view class="count">
|
|
<view class="count">
|
|
- <lxc-count @handleCount="toCount" :value="info.specs.num" :delayed="100">
|
|
|
|
- </lxc-count>
|
|
|
|
|
|
+ <uni-number-box v-model="info.specs.num" @change="toCount"></uni-number-box>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view @click="toBuy" class="button">立即购买</view>
|
|
<view @click="toBuy" class="button">立即购买</view>
|
|
@@ -120,13 +123,40 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import lxcCount from '@/components/lxc-count/lxc-count.vue'
|
|
|
|
export default {
|
|
export default {
|
|
- components: {
|
|
|
|
- lxcCount
|
|
|
|
- },
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ barList: [{
|
|
|
|
+ name: '首页',
|
|
|
|
+ route: 'pages/home/index',
|
|
|
|
+ normal: require('@/static/shouye.png'),
|
|
|
|
+ active: require('@/static/shouye_1.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '微店',
|
|
|
|
+ route: 'pages/store/index',
|
|
|
|
+ normal: require('@/static/store.png'),
|
|
|
|
+ active: require('@/static/store_1.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '周边',
|
|
|
|
+ route: 'pages/week/index',
|
|
|
|
+ normal: require('@/static/week.png'),
|
|
|
|
+ active: require('@/static/week_1.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '购物车',
|
|
|
|
+ route: 'pages/market/index',
|
|
|
|
+ normal: require('@/static/market.png'),
|
|
|
|
+ active: require('@/static/market_1.png')
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '我的',
|
|
|
|
+ route: 'pages/my/index',
|
|
|
|
+ normal: require('@/static/my.png'),
|
|
|
|
+ active: require('@/static/my_1.png')
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
options: [{
|
|
options: [{
|
|
icon: 'shop',
|
|
icon: 'shop',
|
|
text: '店铺',
|
|
text: '店铺',
|
|
@@ -191,7 +221,9 @@
|
|
isShow: false,
|
|
isShow: false,
|
|
topItem: '',
|
|
topItem: '',
|
|
// 收藏
|
|
// 收藏
|
|
- collection: false
|
|
|
|
|
|
+ collection: false,
|
|
|
|
+ // 菜单显示
|
|
|
|
+ menu: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onShow: function() {},
|
|
onShow: function() {},
|
|
@@ -207,16 +239,39 @@
|
|
},
|
|
},
|
|
// 选择规格
|
|
// 选择规格
|
|
toChoose() {
|
|
toChoose() {
|
|
- this.$refs.popup.open();
|
|
|
|
|
|
+ const that = this;
|
|
|
|
+ that.$refs.popup.open();
|
|
},
|
|
},
|
|
// 关闭弹框
|
|
// 关闭弹框
|
|
toClose() {
|
|
toClose() {
|
|
- this.$refs.popup.close()
|
|
|
|
|
|
+ const that = this;
|
|
|
|
+ that.$refs.popup.close()
|
|
},
|
|
},
|
|
// 计数器
|
|
// 计数器
|
|
toCount(e) {
|
|
toCount(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
},
|
|
},
|
|
|
|
+ // 收藏
|
|
|
|
+ toCollect() {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.collection = !that.collection;
|
|
|
|
+ if (that.collection == true) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `收藏成功`,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `取消成功`,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 菜单展开
|
|
|
|
+ toMenu() {
|
|
|
|
+ const that = this;
|
|
|
|
+ that.menu = !that.menu
|
|
|
|
+ },
|
|
// 立即购买
|
|
// 立即购买
|
|
toBuy() {},
|
|
toBuy() {},
|
|
// 计算高度
|
|
// 计算高度
|
|
@@ -449,7 +504,7 @@
|
|
|
|
|
|
.menu {
|
|
.menu {
|
|
position: fixed;
|
|
position: fixed;
|
|
- bottom: 20vw;
|
|
|
|
|
|
+ bottom: 30vw;
|
|
right: 5vw;
|
|
right: 5vw;
|
|
|
|
|
|
text {
|
|
text {
|
|
@@ -459,9 +514,33 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .menu_1 {
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 40vw;
|
|
|
|
+ right: 5vw;
|
|
|
|
+ background-color: var(--mainColor);
|
|
|
|
+ padding: 2vw;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ display: flex;
|
|
|
|
+ padding: 2vw;
|
|
|
|
+ border-bottom: 0.1vw solid var(--fcColor);
|
|
|
|
+
|
|
|
|
+ .image {
|
|
|
|
+ width: 7vw;
|
|
|
|
+ height: 6vw;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .name {
|
|
|
|
+ margin: 0 0 0 1vw;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
.backTop {
|
|
.backTop {
|
|
position: fixed;
|
|
position: fixed;
|
|
- bottom: 10vw;
|
|
|
|
|
|
+ bottom: 20vw;
|
|
right: 5vw;
|
|
right: 5vw;
|
|
|
|
|
|
text {
|
|
text {
|