|
@@ -5,8 +5,7 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="one_1">
|
|
|
- <swiper class="swiper" circular :indicator-dots="true" indicator-color="#ffffff"
|
|
|
- indicator-active-color="#FB1438" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
+ <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 info.goods.file" :key="index">
|
|
|
<image class="image" :src="item.url" mode="aspectFit">
|
|
|
</image>
|
|
@@ -14,15 +13,12 @@
|
|
|
</swiper>
|
|
|
<!-- 是否关注商品 -->
|
|
|
<view class="goodsColect">
|
|
|
- <text @tap="toGoodscolect"
|
|
|
- :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
|
|
|
+ <text @tap="toGoodscolect" :class="['iconfont',goodsColect?'icon-yduishoucangshixin-copy':'icon-yduishoucangkongxin']"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="one_2">
|
|
|
- <text
|
|
|
- class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
|
|
|
- <text
|
|
|
- class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].flow_money:0}}</text>
|
|
|
+ <text class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].sell_money:0}}</text>
|
|
|
+ <text class="money"><text>¥</text>{{info.specs&&info.specs.length>0?info.specs[0].flow_money:0}}</text>
|
|
|
</view>
|
|
|
<view class="one_3">
|
|
|
<view class="name">
|
|
@@ -55,9 +51,7 @@
|
|
|
<view class="one_6">
|
|
|
<view class="one_6_1">
|
|
|
<view class="shop_1">
|
|
|
- <image class="image"
|
|
|
- :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''"
|
|
|
- mode="aspectFit"></image>
|
|
|
+ <image class="image" :src="info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
<view class="shop_2">
|
|
|
<view class="name">{{info.shop.name}}</view>
|
|
@@ -92,8 +86,7 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
- <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft"
|
|
|
- @buttonClick="toNavright" />
|
|
|
+ <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft" @buttonClick="toNavright" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 跳转菜单 -->
|
|
@@ -101,8 +94,7 @@
|
|
|
<text @tap="toMenubar" class="iconfont icon-gengduo"></text>
|
|
|
</view>
|
|
|
<view class="bar_2" v-if="is_menu">
|
|
|
- <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'"
|
|
|
- @click="toPath(item)">
|
|
|
+ <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'" @click="toPath(item)">
|
|
|
<image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
|
|
|
<text class="name"> {{item.name}}</text>
|
|
|
</view>
|
|
@@ -120,9 +112,7 @@
|
|
|
<view class="one">
|
|
|
<view class="one_1">
|
|
|
<view class="l">
|
|
|
- <image class="image"
|
|
|
- :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url"
|
|
|
- mode="aspectFill" @tap="imageView(specsInfo.file)"></image>
|
|
|
+ <image class="image" :src="specsInfo.file.length>0?specsInfo.file[0].url:info.goods.file[0].url" mode="aspectFill" @tap="imageView(specsInfo.file)"></image>
|
|
|
</view>
|
|
|
<view class="r">
|
|
|
<view class="money">
|
|
@@ -140,9 +130,7 @@
|
|
|
规格
|
|
|
</view>
|
|
|
<view class="one_2_2">
|
|
|
- <view
|
|
|
- :class="['list',`${item.num==0?'zero_list':''}`,`${is_specs==index?'one_list':''}`]"
|
|
|
- v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
|
|
|
+ <view :class="['list',`${item.num==0?'zero_list':''}`,`${is_specs==index?'one_list':''}`]" v-for="(item,index) in info.specs" :key="index" @tap="toSpecs(item)">
|
|
|
<text>{{item.name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -152,8 +140,7 @@
|
|
|
<text>数量</text>
|
|
|
</view>
|
|
|
<view class="one_3_1">
|
|
|
- <uni-number-box v-model="buy_num" @change="toCount" :min="1"
|
|
|
- :max="specsInfo.num">
|
|
|
+ <uni-number-box v-model="buy_num" @change="toCount" :min="1" :max="specsInfo.num">
|
|
|
</uni-number-box>
|
|
|
</view>
|
|
|
<view class="one_3_1">
|
|
@@ -179,6 +166,8 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 系统设置
|
|
|
+ config: {},
|
|
|
// 商品id
|
|
|
id: '',
|
|
|
// 分享人id
|
|
@@ -247,6 +236,18 @@
|
|
|
await that.watchLogin();
|
|
|
that.configShare();
|
|
|
},
|
|
|
+ onUnload: function() {
|
|
|
+ // 页面卸载,重新部署分享内容
|
|
|
+ const that = this;
|
|
|
+ if (that.config) {
|
|
|
+ // 赋值默认值
|
|
|
+ that.$config.share = {
|
|
|
+ title: that.config.title,
|
|
|
+ path: '/pages/index/index',
|
|
|
+ imageUrl: that.config.config.share[0].url
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 查询系统设置
|
|
|
searchConfig() {
|
|
@@ -255,6 +256,7 @@
|
|
|
key: 'config',
|
|
|
success: function(res) {
|
|
|
let data = res.data;
|
|
|
+ that.$set(that, `config`, data);
|
|
|
if (data.bottom_menu && data.bottom_menu.list.length > 0) {
|
|
|
let list = data.bottom_menu.list.sort((a, b) => {
|
|
|
return a.sort - b.sort
|