Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/ec.uniapp-master

master
邓平艺 4 years ago
parent
commit
dd32b23ef4
  1. 1
      pages/address/add/add.vue
  2. 44
      pages/article/details.vue
  3. 32
      pages/index/index/index.vue
  4. 2
      pages/user/member/service.vue
  5. 2
      pages/user/my/myEventRegistrationList.vue

1
pages/address/add/add.vue

@ -44,6 +44,7 @@
</view>
</picker>
</view>
<text class="lf-iconfont icon-xiangyou lf-font-24"></text>
</view>
<!-- #endif -->

44
pages/article/details.vue

@ -1,22 +1,22 @@
<template>
<view>
<view v-if="$isRight(title_content)">
<lf-nav :spreadOut="true" :showIcon="true" bgColor="#F8F8F8" title="文章详情"></lf-nav>
<view style="height: 30rpx;"></view>
<view class="lf-m-l-32 lf-m-r-32">
<view>
<view class="lf-font-36 lf-color-222 lf-m-b-20 lf-font-bold">
苦等一年阳澄湖大闸蟹又肥了让你安心吃螃蟹的文章也来了
{{title_content.article.title}}
</view>
<view class="lf-flex lf-m-b-24">
<view class="lf-font-28" style="color: #2D6361;">
金诚优选线上商城
{{title_content.article.author}}
</view>
<view class="lf-color-777 lf-font-28 lf-m-l-25">
2021.09.01 16:28:22
{{title_content.article.created_at}}
</view>
</view>
</view>
<rich-text :nodes="content" v-if="content"></rich-text>
<rich-text :nodes="formatRichText(content)" v-if="content"></rich-text>
<!-- <lf-nocontent v-else></lf-nocontent> -->
<!-- 回到顶部 -->
<u-back-top :scroll-top="pageScrollTop" :custom-style="{background: 'rgba(51, 51 51, 0.3)'}"></u-back-top>
@ -36,15 +36,39 @@
onLoad(e){
this.notice_id = e.notice_id;
if(this.notice_id) {
// this.getData();
this.getData();
}
},
methods: {
//
formatRichText(richText){
if(richText != null){
let newRichText= richText.replace(/<img[^>]*>/gi, function(match, capture){
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
return match;
});
newRichText = newRichText.replace(/style="[^"]+"/gi,function(match, capture){
match = match.replace(/width:[^;]+;/gi, 'width:100%;').replace(/width:[^;]+;/gi, 'width:100%;');
return match;
});
newRichText = newRichText.replace(/<br[^>]*\/>/gi, '');
newRichText = newRichText.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;margin:10px 0;"');
return newRichText;
}else{
return null;
}
},
getData(){
this.$http(this.API.API_NOTICEDETAILS,{id:this.notice_id}).then(res => {
this.content = res.data?.content;
this.title_content = res.data
})
this.$http.get({
api: '/api/article/detail/'+this.notice_id
}).then(res => {
this.content = res.data.data?.article.article_detail;
this.title_content = res.data.data
console.log(res.data)
});
}
}
}

32
pages/index/index/index.vue

@ -74,7 +74,7 @@
</view>
<!-- 悬浮购物车入口 -->
<view class="fixed-right">
<view class="fixed-cart fixed-live" hover-class="lf-opacity" @click="goLive()">
<view class="fixed-cart fixed-live" hover-class="lf-opacity" @click="goLive()" v-if="live_roomid">
<text class="lf-iconfont icon-zhibo icon-text"></text>
<text class="tips">直播间</text>
</view>
@ -152,7 +152,8 @@
show_ad: false, // ad广
ad_modal_list: [], // ad广
nav_bg_color: 'rgba(255,255,255,0)' ,//
car_num: 0
car_num: 0,
live_roomid: 0
};
},
//
@ -189,14 +190,14 @@
}
},
onShow(e) {
this.getLiveRoom();
this.isLogin=!!this.$cookieStorage.get('user_token')
let toekn = this.$cookieStorage.get('user_token');
if (toekn) {
this.getUserInfo();
this.getcarNum()
this.getcarNum();
}
@ -266,15 +267,28 @@
onPullDownRefresh(){
wx.showLoading();
this.queryMicroData();
this.getLiveRoom();
},
//
methods: {
goLive() {
this.$msg('敬请期待!');
return
// wx.navigateTo({
// url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=1`
// })
// this.$msg('!');
// return
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=`+this.live_roomid
})
},
//
getLiveRoom(){
this.$http.get({
api: '/api/live'
}).then(res => {
console.log('=======',res.data.data)
if(res.data.data != null) {
this.live_roomid = res.data.data.number;
}
uni.stopPullDownRefresh();
});
},
getAlertAd(){
this.$http.get({

2
pages/user/member/service.vue

@ -106,7 +106,7 @@
.img{
width: 200rpx;
height: 200rpx;
background-color: #D8D8D8;
// background-color: #D8D8D8;
border-radius: 20rpx;
}
.title{

2
pages/user/my/myEventRegistrationList.vue

@ -13,7 +13,7 @@
<view class="cover">
<image class="img" :src="item.activity.image"></image>
<view class="label" :class="'theme-'+ (index+1)" v-if="item.activity.is_expired==false && item.state =='待使用'">待使用</view>
<view class="label" :class="'theme-'+ (index+1)" v-if="item.activity.is_expired==true">已过期</view>
<view class="label lf-bg-gray" :class="'theme-'+ (index+1)" v-if="item.activity.is_expired==true">已过期</view>
<view class="label" :class="'theme-'+ (index+1)" v-if="item.activity.is_expired==false">{{item.state}}</view>
</view>
<view class="info">

Loading…
Cancel
Save