1.修改商品图片放大

yj-dev
杨杰 4 years ago
parent fcb0bdebbf
commit fc33870811
  1. 12
      App.vue
  2. 15
      pages/goods/goods.vue

@ -5,13 +5,13 @@
// brestUrl: 'http://192.168.3.4:9302/brest', // brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest', // brestUrl : 'https://hsg.dctpay.com/brest',
// //
// url: 'https://hsgcs.dctpay.com/crest', url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest', brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
userInfo: "", userInfo: "",
brestUserInfo : '', brestUserInfo : '',

@ -12,8 +12,8 @@
<!-- 商品主图轮播 --> <!-- 商品主图轮播 -->
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange"> <swiper circular="true" autoplay="true" @change="swiperChange">
<swiper-item v-for="swiper in swiperList" :key="swiper.id"> <swiper-item v-for="(swiper,index) in swiperList" :key="index">
<image mode="widthFix" :src="imageUrl+swiper"></image> <image mode="widthFix" :src="imageUrl+swiper" @click="perImage(swiper)"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indicator">{{currentSwiper+1}}/{{swiperList.length}}</view> <view class="indicator">{{currentSwiper+1}}/{{swiperList.length}}</view>
@ -21,7 +21,7 @@
<!-- 标题 价格 --> <!-- 标题 价格 -->
<view class="info-box goods-info"> <view class="info-box goods-info">
<view class="price" v-if="goodsData[0].payType == 1">{{goodsData[0].discountPrice}} <text <view class="price" v-if="goodsData[0].payType == 1">{{goodsData[0].discountPrice}} <text
class="zprice font14 fcor666" class="zprice font14 fcor666" style="margin-left: 65px;"
v-if="goodsData[0].discountPrice !=goodsData[0].salesPrice">{{goodsData[0].salesPrice}}</text> v-if="goodsData[0].discountPrice !=goodsData[0].salesPrice">{{goodsData[0].salesPrice}}</text>
</view> </view>
<view style="width: 100%;height: 30px;" v-else> <view style="width: 100%;height: 30px;" v-else>
@ -86,7 +86,7 @@
<view class="description"> <view class="description">
<view class="title"> 商品详情 </view> <view class="title"> 商品详情 </view>
<view class="content marb65"> <view class="content marb65">
<image mode="widthFix" class="width100" v-for="codes in couponDesc" :key="codes" :src="imageUrl+codes"> <image mode="widthFix" class="width100" v-for="codes in couponDesc" :key="codes" :src="imageUrl+codes" @click="perImage(codes)">
</image> </image>
</view> </view>
</view> </view>
@ -189,6 +189,13 @@
} }
}) })
}, },
//
perImage(item) {
uni.previewImage({
current: 0, //
urls: [this.imageUrl+item] //
})
},
// //
// toGoods(e) { // toGoods(e) {
// console.log('=========='+e); // console.log('=========='+e);

Loading…
Cancel
Save