Merge pull request '修改小程序bug' (#98) from dengjie into dev
Reviewed-on: http://git.hchyun.com/feashow/pupil/pulls/98
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
this.isLoad = false
|
||||
}
|
||||
var data = res.data.data
|
||||
if (data) {
|
||||
this.avatar = uni.getStorageSync('img_url') + data.avatar
|
||||
this.nickname = data.nickname
|
||||
this.member = data.member
|
||||
@@ -78,6 +79,7 @@
|
||||
uni.setStorageSync('agreement', data.agreement)
|
||||
uni.setStorageSync('com_name', data.com_name)
|
||||
uni.setStorageSync('com_mobile', data.com_mobile)
|
||||
}
|
||||
}).finally(_ => {})
|
||||
},
|
||||
reOnLoad() {
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
console.log('产品列表2', res.data);
|
||||
let tags = res.data.data
|
||||
for (const item of tags) {
|
||||
let tag = item.tags
|
||||
|
||||
@@ -58,9 +58,11 @@
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum
|
||||
}).then(res => {
|
||||
console.log('产品列表1', res.data);
|
||||
let tags = res.data.data
|
||||
if (tags) {
|
||||
for (const item of tags) {
|
||||
console.log('item.cover', item.cover);
|
||||
let tag = item.tags
|
||||
this.tagsArray = tag.split(',')
|
||||
item.tags = this.tagsArray[0]
|
||||
|
||||
@@ -40,9 +40,12 @@
|
||||
getUser() {
|
||||
this.$apiServe.getUser().then(res => {
|
||||
var data = res.data.data
|
||||
console.log('头像昵称', res);
|
||||
if (data) {
|
||||
this.avatar = uni.getStorageSync('img_url') + data.avatar
|
||||
this.avatarUrl = '/' + data.avatar
|
||||
this.model.userInfo.name = data.nickname
|
||||
}
|
||||
}).finally(_ => {})
|
||||
},
|
||||
updatePromise(filePath) {
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<view class="xwD_content">
|
||||
<u-parse :content="detailList.content" @preview="preview" @navigate="navigate"></u-parse>
|
||||
</view>
|
||||
<!-- <u-modal :show="showM" closeOnClickOverlay="false" confirmText="确定" @confirm="confirm">
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
</u-modal> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +28,9 @@
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
detailList: []
|
||||
detailList: [],
|
||||
// showM: false,
|
||||
// content: `该新闻已下架!`,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -36,15 +41,24 @@
|
||||
//获取行业新闻详情
|
||||
getNewsDetail() {
|
||||
this.$apiServe.getNewsDetail(this.id).then(res => {
|
||||
console.log('新闻详情', res.data);
|
||||
if (res.data.code == 0 || res.data.msg == "该新闻已下架!") {
|
||||
this.$toast.warn('该新闻已下架!')
|
||||
// this.showM = true
|
||||
}
|
||||
if (res.data.data) {
|
||||
let detail = res.data.data
|
||||
detail.pub_time = dateFormatXwDetail(detail.pub_time)
|
||||
this.detailList = res.data.data
|
||||
} else {
|
||||
this.$toast.warn('没有更多详情了')
|
||||
}
|
||||
|
||||
}).finally(_ => {})
|
||||
}
|
||||
},
|
||||
// confirm() {
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index'
|
||||
// })
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<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==NaN?1:detailList.thumb}} 赞</text>
|
||||
<text class="thumb">{{detailList.thumb}} 赞</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -139,7 +139,7 @@
|
||||
//获取详情信息
|
||||
getProductDetail() {
|
||||
this.$apiServe.getProductDetail(this.id).then(res => {
|
||||
console.log('产品详情mtype', res.data.data);
|
||||
console.log('产品详情', res.data.data);
|
||||
let detail = res.data.data
|
||||
let dataCode = res.data.code
|
||||
//授权登录拦截
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
getBanner() {
|
||||
this.$apiServe.getBanner().then(res => {
|
||||
let banner = res.data.data
|
||||
console.log('轮播图', banner);
|
||||
console.log('轮播图', res.data);
|
||||
if (banner) {
|
||||
for (const item of banner) {
|
||||
item.img = this.imgUrl + item.img
|
||||
@@ -172,6 +172,9 @@
|
||||
//获取图片url
|
||||
getImgUrl() {
|
||||
this.$apiServe.getImgUrl().then(res => {
|
||||
console.log('图片url', res.data);
|
||||
res.data.data.img_url = res.data.data.img_url + '/'
|
||||
console.log('res.data.data.img_url', res.data.data.img_url);
|
||||
try {
|
||||
uni.setStorageSync('img_url', res.data.data.img_url);
|
||||
this.initStart = true
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
//获取客服电话
|
||||
getCsTel() {
|
||||
this.$apiServe.getCsTel().then(res => {
|
||||
if (res.data.data) {
|
||||
this.mobile = res.data.data.cs_tel
|
||||
}
|
||||
}).finally(_ => {})
|
||||
},
|
||||
//跳转到绑定公司页面
|
||||
|
||||
Reference in New Issue
Block a user