### 0.1.5 会员专业版:

【修复】服务商品列表图片组件从image调整为u--image组件。#I4RUC6
【优化】规范coreshop-goods.vue组件for循环未定义key的问题。
【修复】修复因升级uview版本导致goodTabBar组件切换失效的问题。
This commit is contained in:
jianweie code
2022-01-31 01:58:43 +08:00
parent 88fdbce2e8
commit 8e3adda57b
3 changed files with 24 additions and 14 deletions

View File

@@ -11,12 +11,12 @@
<u-grid :col="child.column" :border="false" align="left"> <u-grid :col="child.column" :border="false" align="left">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="(item, index) in child.list" :key="index" @click="goGoodsDetail(item.id)"> <u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="(item, index) in child.list" :key="index" @click="goGoodsDetail(item.id)">
<view class="good_box"> <view class="good_box">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image> <u--image :src="item.image" mode="widthFix" width="100%" :height="child.column==2?'164px':'104px'" radius="10"></u--image>
<view class="good_title u-line-2"> <view class="good_title u-line-2">
{{item.name}} {{item.name}}
</view> </view>
<view class="good-price"> <view class="good-price coreshop-display-block">
{{item.price}} <span class="u-font-xs coreshop-text-through u-margin-left-15 coreshop-text-gray">{{item.mktprice}}</span> {{item.price}} <span class="coreshop-font-xs coreshop-text-through coreshop-margin-left-5 coreshop-text-gray">{{item.mktprice}}</span>
</view> </view>
<view class="good-tag-recommend" v-if="item.isRecommend"> <view class="good-tag-recommend" v-if="item.isRecommend">
推荐 推荐
@@ -30,9 +30,9 @@
</view> </view>
<view v-else-if="!count && !child.listAjax"> <view v-else-if="!count && !child.listAjax">
<u-grid col="3" border="false" align="center"> <u-grid col="3" border="false" align="center">
<u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="item in 3" :key="item"> <u-grid-item bg-color="transparent" :custom-style="{padding: '0rpx'}" v-for="item in 3" :key="item" @click="goGoodsDetail(item.id)">
<view class="good_box"> <view class="good_box">
<u--image src="/static/images/common/empty.png" mode="widthFix" width="100%" radius="10" @click="goGoodsDetail(item.id)"></u--image> <u--image src="/static/images/common/empty.png" mode="widthFix" width="100%" radius="10"></u--image>
<view class="good_title u-line-2"> <view class="good_title u-line-2">
</view> </view>
@@ -59,7 +59,7 @@
<view class="good_box"> <view class="good_box">
<u-row gutter="5" justify="space-between"> <u-row gutter="5" justify="space-between">
<u-col span="4"> <u-col span="4">
<u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image> <u--image :src="item.image" mode="widthFix" width="100%" radius="10"></u--image>
<view class="good-tag-recommend2" v-if="item.isRecommend"> <view class="good-tag-recommend2" v-if="item.isRecommend">
推荐 推荐
</view> </view>
@@ -106,25 +106,33 @@
} }
}, },
mounted() { mounted() {
var _this = this;
this.newData = this.coreshopdata; this.newData = this.coreshopdata;
for (var i = 0; i < this.newData.parameters.list.length; i++) { for (var i = 0; i < this.newData.parameters.list.length; i++) {
let item = { let item = {
name: this.newData.parameters.list[i].title name: this.newData.parameters.list[i].title
} }
this.nameList.push(item); this.nameList.push(item);
if (_this.current == i) {
_this.newData.parameters.list[i].isShow = true;
} else {
_this.newData.parameters.list[i].isShow = false;
}
} }
}, },
computed: { computed: {
}, },
methods: { methods: {
change(index) { change(item) {
var _this = this; var _this = this;
this.current = index; this.current = item.index;
for (var i = 0; i < this.newData.parameters.list.length; i++) { for (var i = 0; i < _this.newData.parameters.list.length; i++) {
if (this.current == i) { if (_this.current == i) {
this.newData.parameters.list[i].isShow = true; _this.newData.parameters.list[i].isShow = true;
} else { } else {
this.newData.parameters.list[i].isShow = false; _this.newData.parameters.list[i].isShow = false;
} }
} }
} }

View File

@@ -112,7 +112,7 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indicator-dots"> <view class="indicator-dots">
<view class="indicator-dots-item" v-for="no of pageCount" :class="[current == no ? 'indicator-dots-active' : '']"> <view class="indicator-dots-item" v-for="no of pageCount" :key="no" :class="[current == no ? 'indicator-dots-active' : '']">
</view> </view>
</view> </view>
</block> </block>

View File

@@ -21,7 +21,9 @@
<view>{{ item.statusStr }}</view> <view>{{ item.statusStr }}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="left"><image :src="item.service.thumbnail && item.service.thumbnail!='null' ? item.service.thumbnail : '/static/images/common/empty-banner.png'" mode="aspectFill"></image></view> <view class="left">
<u--image :showLoading="true" :src="item.thumbnail && item.thumbnail!='null' ? item.thumbnail : '/static/images/common/empty-banner.png'" width="80px" height="80px"></u--image>
</view>
<view class="content"> <view class="content">
<view class="title u-line-2">{{item.service.title}}</view> <view class="title u-line-2">{{item.service.title}}</view>
<view class="type">{{item.service.description}}</view> <view class="type">{{item.service.description}}</view>