修改小程序bug

This commit is contained in:
邓洁
2023-02-24 12:20:41 +08:00
parent e5c257ed2d
commit afccd4c183
9 changed files with 32 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
<view style="margin-top: 10rpx;margin-bottom: 4rpx;">
<u--image v-if="member=='2'" :src="normal" width="84rpx" height="30rpx">
</u--image>
<u--image v-if="member=='3'" :src="VIP" width="84rpx" height="30rpx">
<u--image v-if="member=='4'" :src="VIP" width="84rpx" height="30rpx">
</u--image>
</view>
<view style="display: flex;align-items: center;">

View File

@@ -18,7 +18,7 @@
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.desc}}
{{item.title}}
</view>
<view class="releaseDate">
<u-image src="/static/products/xp_icon_sjf.png" width="22rpx" height="22rpx"
@@ -66,7 +66,7 @@
styleIsolation: 'shared', // 解除样式隔离
},
created() {
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.getHistoryOrCollection()
},
methods: {

View File

@@ -53,7 +53,7 @@
// this.sortType = 2
// }
// })
this.imgUrl = uni.getStorageSync('img_url')
this.imgUrl = uni.getStorageSync('img_url')
this.getProductsByThumb()
},
methods: {

View File

@@ -36,15 +36,14 @@
}
},
onLoad(option) {
console.log('uni.getStorageSync', uni.getStorageSync('member'));
if (uni.getStorageSync('member') == 2) {
this.btnText = '升级VIP'
} else if (uni.getStorageSync('member') == 3) {
this.btnText = '升级VIP'
this.btnDisabled = true
} else if (uni.getStorageSync('member') == 99) {
this.btnText = '升级vip正在审核中'
this.btnDisabled = true
} else if (uni.getStorageSync('member') == 4) {
this.btnText = '升级VIP'
this.btnDisabled = true
}
this.commitment = uni.getStorageSync('agreement')
if (option.ask == 1) {

View File

@@ -14,7 +14,7 @@
<view style="padding: 14rpx 22rpx;">
<view class="title_box">
<text class="title">{{item.name}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.title}}
@@ -24,7 +24,7 @@
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.pub_time}}</text>
<text>{{item.pub_time_str}}</text>
</view>
</view>
</view>
@@ -44,7 +44,8 @@
},
queryTitle: null,
imgUrl: null,
productList: []
productList: [],
tagsArray: [],
}
},
onLoad(options) {
@@ -59,6 +60,12 @@
title: this.queryTitle
}
this.$apiServe.getProductList(data).then(res => {
let tags = res.data.data
for (const item of tags) {
let tag = item.tags
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
}
this.productList = res.data.data
}).finally(_ => {})
},

View File

@@ -48,18 +48,18 @@
</view>
<!-- thumb无值显示点赞二字 用户进行一次点赞之后显示1赞-->
<view v-else class="heart">
<view v-if="detailList.is_thumb==0">
<view v-if="detailList.is_thumb==0" style="display: flex;">
<u-image src="/static/detail/xp_icon_heart.png" width="34rpx" height="32rpx"
@click="heartTap">
</u-image>
<text class="thumb" @click="heartTap">点赞</text>
</view>
<view v-if="detailList.is_thumb==1">
<view v-if="detailList.is_thumb==1" style="display: flex;">
<!-- 用户是否点赞字段 showHeart -->
<u-image src="/static/detail/xp_icon_ysc.png" width="34rpx" height="32rpx"
@click="cancelHeartTap(detailList.thumb_id)">
</u-image>
<text class="thumb">{{detailList.thumb}} </text>
<text class="thumb">{{detailList.thumb==NaN?1:detailList.thumb}} </text>
</view>
</view>
</view>
@@ -151,12 +151,16 @@
this.showUpdate = true
}
//升级VIP正在审核中
if (dataCode == 0 && detail.mytpe == 99) {
if (dataCode == 0 && detail.mytpe == 3) {
this.showUpdating = true
}
if (detail) {
detail.pub_time = dateFormatDetail(detail.pub_time)
detail.tags = detail.tags.split(',')
if (detail.tags) {
detail.tags = detail.tags.split(',')
}
//点赞数
if (detail.thumbcount !== 0 && detail.is_thumb == 0) {
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)

View File

@@ -214,7 +214,6 @@
},
getFormData() {
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
console.log(res.data)
const formData = res.data.data
this.productPickerColumn[0] = formData.product
this.positionPickerColumn[0] = formData.loc

View File

@@ -141,10 +141,12 @@
getBanner() {
this.$apiServe.getBanner().then(res => {
let banner = res.data.data
for (const item of banner) {
item.img = this.imgUrl + item.img
if (banner) {
for (const item of banner) {
item.img = this.imgUrl + item.img
}
this.swiperList = res.data.data
}
this.swiperList = res.data.data
}).finally(_ => {})
},
//点击轮播图

View File

@@ -8,10 +8,7 @@
position: absolute;
right: 0;
top: 0;
.u-image__image {
margin-left: 6px;
}
width:356rpx;
.img_tag {
position: absolute;