修改小程序bug

This commit is contained in:
邓洁
2023-03-15 17:46:39 +08:00
parent 960e8848f9
commit 050739652d
2 changed files with 17 additions and 10 deletions

View File

@@ -67,7 +67,10 @@
//获取头像昵称和普通会员和VIP会员 //获取头像昵称和普通会员和VIP会员
getUser() { getUser() {
this.$apiServe.getUser().then(res => { this.$apiServe.getUser().then(res => {
if (res.data.msg === "登录超时,请重新登录") { // if (res.data.msg === "登录超时,请重新登录") {
// this.isLoad = false
// }
if (res.data.code === -1) {
this.isLoad = false this.isLoad = false
} }
var data = res.data.data var data = res.data.data

View File

@@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<view :key="index"> <view style="position: relative;padding-bottom: 100rpx;">
<u-image :src="imgUrl+detailList.cover" width="750rpx" height="530rpx"> <u-image :src="imgUrl+detailList.cover" width="750rpx" height="530rpx">
</u-image> </u-image>
<view class="collect" v-if="detailList.is_fav==0||!detailList.is_fav" @click="starTap"> <view class="collect" v-if="detailList.is_fav==0||!detailList.is_fav" @click="starTap">
@@ -71,11 +71,9 @@
<text class="release">发布日期</text> <text class="release">发布日期</text>
<text>{{detailList.pub_time}}</text> <text>{{detailList.pub_time}}</text>
</view> </view>
<u-parse :content="detailList.desc" @preview="preview" @navigate="navigate"></u-parse> <u-parse :content="detailList.desc" @preview="preview" @navigate="navigate"></u-parse>
<view class="footer" @click="showContact()">
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text>
</view>
<u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否" <u-modal :show="showCall" showCancelButton closeOnClickOverlay="false" confirmText="是" cancelText="否"
@confirm="confirmCall" @cancel="cancelCall"> @confirm="confirmCall" @cancel="cancelCall">
<view> <view>
@@ -96,6 +94,10 @@
<rich-text :nodes="updatingContent"></rich-text> <rich-text :nodes="updatingContent"></rich-text>
</u-modal> </u-modal>
</view> </view>
<view class="footer" @click="showContact()">
<u-icon name="kefu-ermai" color="#fff" size="30rpx"></u-icon>
<text>联系客服</text>
</view>
</view> </view>
</template> </template>
@@ -120,7 +122,7 @@
showCall: false, showCall: false,
mobile: '', mobile: '',
updateContent: '您暂无权限访问请升级VIP访问', updateContent: '您暂无权限访问请升级VIP访问',
updatingContent: '升级VIP正在审核中' updatingContent: '升级VIP正在审核中',
} }
}, },
onLoad(option) { onLoad(option) {
@@ -139,9 +141,12 @@
//获取详情信息 //获取详情信息
getProductDetail() { getProductDetail() {
this.$apiServe.getProductDetail(this.id).then(res => { this.$apiServe.getProductDetail(this.id).then(res => {
console.log('产品详情', res.data); console.log('产品详情', res);
let detail = res.data.data let detail = res.data.data
let dataCode = res.data.code let dataCode = res.data.code
if (!detail) {
this.isLoad = false
}
//授权登录拦截 //授权登录拦截
if (dataCode == 0 && detail.mytpe == 1) { if (dataCode == 0 && detail.mytpe == 1) {
this.isLoad = false this.isLoad = false
@@ -160,7 +165,6 @@
if (detail.tags) { if (detail.tags) {
detail.tags = detail.tags.split(',') detail.tags = detail.tags.split(',')
} }
//点赞数
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount) detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
this.detailList = detail this.detailList = detail
} }
@@ -395,7 +399,7 @@
.footer { .footer {
position: absolute; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;