修改小程序bug

This commit is contained in:
邓洁
2023-02-25 16:32:35 +08:00
parent 8bdb156ec2
commit b439c3dd7a
7 changed files with 36 additions and 31 deletions

View File

@@ -41,8 +41,8 @@
pageSize: 3,
pageNum: 1
}).then(res => {
// console.log('行业新闻', res.data.data)
let newsData = res.data.data
console.log('新闻', newsData);
for (const item of newsData) {
item.pub_time_str = dateFormat(item.pub_time_str)
}

View File

@@ -74,14 +74,17 @@
getHistoryOrCollection() {
this.$apiServe.getHistoryOrCollection(this.type).then(res => {
let data = res.data.data
console.log('历史记录或收藏', data);
if (data) {
for (const item of data) {
let tag = item.tags
if (tag) {
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
}
item.create_time = dateFormatHistory(item.create_time)
}
this.productList = data
}
}).finally(_ => {
})

View File

@@ -61,11 +61,11 @@
this.id = option.id
this.getCertifiedCjDetail()
this.getCsTel()
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
return
}
this.isLoad = true
// if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
// this.isLoad = false
// return
// }
// this.isLoad = true
},
methods: {
//获取客服电话
@@ -77,10 +77,15 @@
//获取认证厂家详情
getCertifiedCjDetail() {
this.$apiServe.getCertifiedCjDetail(this.id).then(res => {
// console.log('认证厂家详情页', res.data)
if (res.data.code === -1) {
this.isLoad = false
}
console.log('认证厂家详情页', res.data)
if (res.data.data) {
let data = res.data.data
if (data.images) {
data.images = data.images.split(';')
}
this.detailList = data
} else {
this.$toast.warn('没有更多详情了')

View File

@@ -36,7 +36,6 @@
//获取行业新闻详情
getNewsDetail() {
this.$apiServe.getNewsDetail(this.id).then(res => {
// console.log('新闻详情页', res.data.data)
if (res.data.data) {
let detail = res.data.data
detail.pub_time = dateFormatXwDetail(detail.pub_time)

View File

@@ -16,7 +16,7 @@
<image :src="item.icon" mode="aspectFit" class="icon"
:style="{border: item.active?'2rpx #14CA65 solid':'0',}" />
</view>
<view class="name" :style="{width: item.active?'156rpx':'126rpx'}">
<view class="name" :style="{width: item.active?'74px':'126rpx'}">
<u-tag v-if="item.active" :text="item.name" bg-color="#14CA65" color="#fff"
borderColor="#14CA65" shape="circle" />
<text v-else class="no-active">{{item.name}}</text>
@@ -87,7 +87,7 @@
<view class="publish-date-box">
<view
style="width: fit-content; display: inline-block;margin-right:6rpx;">
<u-icon size="16" name="clock" color="#A3A3A3" />
<u-icon size="14" name="clock" color="#A3A3A3" />
</view>
<text style="margin-right: 6rpx;">发布日期</text>
<text>{{item1.pub_time_str}}</text>
@@ -444,11 +444,11 @@
}
.name {
width: 126px;
// width: 126px;
text-align: center;
.no-active {
font-size: 28rpx;
font-size: 24rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #616161;
@@ -500,7 +500,7 @@
line-height: 1;
.title {
font-size: 32rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #343434;
@@ -518,7 +518,7 @@
border-radius: 25% 0 0 0;
.title {
font-size: 32rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #14CA65;
@@ -669,6 +669,7 @@
.publish-date-box {
display: flex;
align-items: center;
font-size: 22rpx;
}
}

View File

@@ -280,11 +280,6 @@
</script>
<style lang="scss">
// .u-modal__content {
// padding: 43rpx 104rpx !important;
// text-indent: 25rpx;
// }
.collect {
display: flex;
position: absolute;
@@ -398,15 +393,16 @@
display: flex;
align-items: center;
padding: 24rpx 20rpx;
margin-top: 20rpx;
margin: 20rpx 0;
background-color: #fff;
.release {
padding: 0 10rpx 0 6rpx;
}
}
.footer {
position: absolute;
bottom: 0;

View File

@@ -141,6 +141,7 @@
getBanner() {
this.$apiServe.getBanner().then(res => {
let banner = res.data.data
console.log('轮播图', banner);
if (banner) {
for (const item of banner) {
item.img = this.imgUrl + item.img