Merge pull request '修改小程序bug' (#96) from dengjie into dev

Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/96
This commit is contained in:
odjbin
2023-02-25 08:32:56 +00:00
7 changed files with 36 additions and 31 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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