xiebaomin hai 1 ano
pai
achega
d56d6e58f0

+ 2 - 2
pages/notice/club/components/notice-cell.vue

@@ -83,7 +83,7 @@
             			<img :src="cell.mainImage" alt="">
             		</view>
             		<view class="cell-content">
-            			{{ cell.articleContent }}
+            			{{ cell.content }}
             		</view> 
             	</view> 
             </view>
@@ -100,7 +100,7 @@
                 		<img :src="cell.mainImage" alt="">
                 	</view>
                     <view class="cell-content"> 
-                        {{ cell.activityContent }}
+                        {{ cell.content }}
                     </view> 
                 </view> 
         	</view>

+ 20 - 12
pages/notice/club/notice-activity.vue

@@ -83,8 +83,10 @@ export default {
 			this.getUserAuthClubMessageList()
 		},
 		handleOrderClick(cell) {
-            console.log(cell)
-			this.$api.navigateTo()
+            const link = `${process.env.NODE_ENV === 'development' ? 'http://120.79.25.27:8009/' : 'https://www.caimei365.com/'}page-${cell.thisId}.html`
+            uni.navigateTo({
+                url: `/pages/h5/article/path?link=${link}`
+            })
 		},
 	},
 	onReachBottom() {
@@ -164,16 +166,22 @@ page {
 				border-radius: 8rpx;
 			}
 		}
-		.cell-content {
-			width: 490rpx;
-			height: 100%;
-			box-sizing: border-box;
-			padding: 0 20rpx;
-			line-height: 40rpx;
-			font-size: 28rpx;
-			color: #666666;
-			text-align: justify;
-			float: left;
+		.cell-content {
+		    width: 490rpx;
+		    height: 100%;
+		    box-sizing: border-box;
+		    padding: 0 20rpx;
+		    line-height: 42rpx;
+		    font-size: 28rpx;
+		    color: #666666;
+		    text-align: justify;
+		    float: left;
+		    text-overflow: ellipsis;
+		    display: -webkit-box;
+		    word-break: break-all;
+		    -webkit-box-orient: vertical;
+		    -webkit-line-clamp: 3;
+		    overflow: hidden;
 		}
 	}
 	.tui-cell-bot {

+ 237 - 226
pages/notice/club/notice-article.vue

@@ -1,236 +1,247 @@
-<template>
-	<view class="container cart clearfix">
-		<tui-skeleton
-			v-if="skeletonShow"
-			backgroundColor="#fafafa"
-			borderRadius="10rpx"
-			:isLoading="true"
-			:loadingType="5"
-		></tui-skeleton>
-		<view class="container-main" v-else>
-			<view class="clearfix">
-				<!-- 空白页 -->
-				<view class="empty-container" v-if="isEmpty">
-					<image class="empty-container-image" :src="StaticUrl + '/icon/icon-notice-empty@2x.png'"></image>
-					<text class="error-text">暂无任何消息~</text>
-				</view>
-				<!-- 列表 -->
-				<view
-					class="tui-notice"
-					v-else
-					v-for="(cell, index) in list"
-					:key="index"
-					@click.stop="handleOrderClick(cell)"
-				>
-					<tui-swipe-action :operateWidth="80" :backgroundColor="'#F7F7F7'">
-						<template v-slot:content>
-							<notice-cell :cellType="5" :cell="cell"></notice-cell>
-						</template>
-						<template v-slot:button>
-							<view class="tui-custom-btn_box">
-								<view class="tui-custom-btn" @click.stop="deleteBtn(cell.id, index)">
-									<text class="iconfont icon-shanchu3"></text>
-								</view>
-							</view>
-						</template>
-					</tui-swipe-action>
-				</view>
-				<!--加载loadding-->
-				<tui-loadmore :visible="loadding" :index="3" type="black" />
-				<tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText" />
-				<!--加载loadding-->
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-import { mapState, mapMutations } from 'vuex'
-import noticeMixins from './mixins/notice.mixins.js'
-import noticeCell from './components/notice-cell.vue'
-export default {
-	mixins: [noticeMixins],
-	components: {
-		noticeCell
-	},
-	data() {
-		return {
-			skeletonShow: true,
-			StaticUrl: this.$Static,
-			listQuery: {
-				source: 2,
-				commonId: 0,
-				messageType: 0,
-				pageNum: 1,
-				pageSize: 10
-			},
-			list: [
+<template>
+    <view class="container cart clearfix">
+        <tui-skeleton
+            v-if="skeletonShow"
+            backgroundColor="#fafafa"
+            borderRadius="10rpx"
+            :isLoading="true"
+            :loadingType="5"
+        ></tui-skeleton>
+        <view class="container-main" v-else>
+            <view class="clearfix">
+                <!-- 空白页 -->
+                <view class="empty-container" v-if="isEmpty">
+                    <image class="empty-container-image" :src="StaticUrl + '/icon/icon-notice-empty@2x.png'"></image>
+                    <text class="error-text">暂无任何消息~</text>
+                </view>
+                <!-- 列表 -->
+                <view
+                    class="tui-notice"
+                    v-else
+                    v-for="(cell, index) in list"
+                    :key="index"
+                    @click.stop="handleOrderClick(cell)"
+                >
+                    <tui-swipe-action :operateWidth="80" :backgroundColor="'#F7F7F7'">
+                        <template v-slot:content>
+                            <notice-cell :cellType="5" :cell="cell"></notice-cell>
+                        </template>
+                        <template v-slot:button>
+                            <view class="tui-custom-btn_box">
+                                <view class="tui-custom-btn" @click.stop="deleteBtn(cell.id, index)">
+                                    <text class="iconfont icon-shanchu3"></text>
+                                </view>
+                            </view>
+                        </template>
+                    </tui-swipe-action>
+                </view>
+                <!--加载loadding-->
+                <tui-loadmore :visible="loadding" :index="3" type="black" />
+                <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText" />
+                <!--加载loadding-->
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+import { mapState, mapMutations } from 'vuex'
+import noticeMixins from './mixins/notice.mixins.js'
+import noticeCell from './components/notice-cell.vue'
+export default {
+    mixins: [noticeMixins],
+    components: {
+        noticeCell
+    },
+    data() {
+        return {
+            skeletonShow: true,
+            StaticUrl: this.$Static,
+            listQuery: {
+                source: 2,
+                commonId: 0,
+                messageType: 0,
+                pageNum: 1,
+                pageSize: 10
+            },
+            list: [
                 {
                     id: 1,
                     time: '16546464',
-                    articleContent: 'abnwahdowadjhwadojw',
+                    content: 'abnwahdowadjhwadojw',
                     link: 'https://www.caimei365.com/info/detail-7880-1.html'
                 },
                 {
                     id: 1,
                     time: '16546464',
-                    articleContent: 'abnwahdowadjhwadojw'
+                    content: 'abnwahdowadjhwadojw'
                 }
-            ],
-			isEmpty: false,
-			loadding: false,
-			pullUpOn: true,
-			pullFlag: true,
-			hasNextPage: false,
-			nomoreText: '上拉显示更多'
-		}
-	},
-	onLoad(option) {
-		this.initData(option)
-	},
-	methods: {
-		async initData(option) {
-            console.log(123324234)
-			const userInfo = await this.$api.getStorage()
-			this.listQuery.messageType = option.messageType
-			this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
-			this.getUserAuthClubMessageList()
-		},
-		handleOrderClick(cell) {
-            this.$api.navigateTo(`/pages/h5/article/path?link=${cell.link}`)
-		},
-	},
-	onReachBottom() {
-		if (this.hasNextPage) {
-			this.loadding = true
-			this.pullUpOn = true
-			this.getReachBottomData()
-		}
-	},
-	onPullDownRefresh() {
-		//下拉刷新
-		this.listQuery.pageNum = 1
-		this.getUserAuthClubMessageList()
-		uni.stopPullDownRefresh()
-	},
-	onShow() {}
-}
-</script>
-
-<style lang="scss">
-page {
-	background-color: #f7f7f7;
-}
-.container-main {
-	width: 100%;
-	box-sizing: border-box;
-	padding: 24rpx 0;
-	.empty-container-image {
-		width: 260rpx;
-		height: 260rpx;
-		margin-top: -300rpx;
-	}
-}
-.tui-notice {
-	margin-bottom: 24rpx;
-}
-.tui-notice-cell {
-	width: 702rpx;
-	height: auto;
-	background-color: #ffffff;
-	border-radius: 16rpx;
-	box-sizing: border-box;
-	padding: 16rpx 24rpx;
-	margin: 0 auto;
-	.tui-cell-top {
-		width: 100%;
-		height: 88rpx;
-		line-height: 88rpx;
-		.cell-title {
-			font-size: 32rpx;
-			color: #333333;
-			float: left;
-			font-weight: bold;
-		}
-		.cell-time {
-			font-size: 24rpx;
-			color: #999999;
-			float: right;
-		}
-	}
-	.tui-cell-content {
-		width: 100%;
-		height: 160rpx;
-		box-sizing: border-box;
-		padding: 16rpx;
-		border-radius: 8rpx;
-		background-color: #f7f7f7;
-		.cell-image {
-			width: 128rpx;
-			height: 128rpx;
-			border-radius: 8rpx;
-			float: left;
-			image {
-				width: 128rpx;
-				height: 128rpx;
-				display: block;
-				border-radius: 8rpx;
-			}
-		}
-		.cell-content {
-			width: 490rpx;
-			height: 100%;
-			box-sizing: border-box;
-			padding: 0 20rpx;
-			line-height: 40rpx;
-			font-size: 28rpx;
-			color: #666666;
-			text-align: justify;
-			float: left;
-		}
-	}
-	.tui-cell-bot {
-		width: 100%;
-		height: 80rpx;
-		box-sizing: border-box;
-		padding: 16rpx 0 0 0;
-		.tui-cell-btn {
-			width: 160rpx;
-			height: 64rpx;
-			border-radius: 35rpx;
-			box-sizing: border-box;
-			border: 1px solid #999999;
-			text-align: center;
-			line-height: 64rpx;
-			font-size: 26rpx;
-			color: #333333;
-			float: right;
-			margin-left: 24rpx;
-		}
-	}
-}
-.tui-custom-btn_box {
-	width: 80px;
-	height: 100%;
-	padding: 0 20rpx;
-	box-sizing: border-box;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	background-color: #f7f7f7;
-}
-
-.tui-custom-btn {
-	width: 56rpx;
-	height: 56rpx;
-	border-radius: 50%;
-	background-color: #f94b4b;
-	color: #ffffff;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	flex-shrink: 0;
-	.icon-shanchu3 {
-		font-size: 32rpx;
-	}
-}
+            ],
+            isEmpty: false,
+            loadding: false,
+            pullUpOn: true,
+            pullFlag: true,
+            hasNextPage: false,
+            nomoreText: '上拉显示更多'
+        }
+    },
+    onLoad(option) {
+        this.initData(option)
+    },
+    methods: {
+        async initData(option) {
+            console.log(123324234)
+            const userInfo = await this.$api.getStorage()
+            this.listQuery.messageType = option.messageType
+            this.listQuery.commonId = userInfo.clubId ? userInfo.clubId : 0
+            this.getUserAuthClubMessageList()
+        },
+        handleOrderClick(cell) {
+            const link = `${
+                process.env.NODE_ENV === 'development' ? 'http://120.79.25.27:8009/' : 'https://www.caimei365.com/'
+            }/info/detail-${cell.thisId}-1.html`
+            uni.navigateTo({
+                url: `/pages/h5/article/path?link=${link}`
+            })
+        }
+    },
+    onReachBottom() {
+        if (this.hasNextPage) {
+            this.loadding = true
+            this.pullUpOn = true
+            this.getReachBottomData()
+        }
+    },
+    onPullDownRefresh() {
+        //下拉刷新
+        this.listQuery.pageNum = 1
+        this.getUserAuthClubMessageList()
+        uni.stopPullDownRefresh()
+    },
+    onShow() {}
+}
+</script>
+
+<style lang="scss">
+page {
+    background-color: #f7f7f7;
+}
+.container-main {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 24rpx 0;
+    .empty-container-image {
+        width: 260rpx;
+        height: 260rpx;
+        margin-top: -300rpx;
+    }
+}
+.tui-notice {
+    margin-bottom: 24rpx;
+}
+.tui-notice-cell {
+    width: 702rpx;
+    height: auto;
+    background-color: #ffffff;
+    border-radius: 16rpx;
+    box-sizing: border-box;
+    padding: 16rpx 24rpx;
+    margin: 0 auto;
+    .tui-cell-top {
+        width: 100%;
+        height: 88rpx;
+        line-height: 88rpx;
+        .cell-title {
+            font-size: 32rpx;
+            color: #333333;
+            float: left;
+            font-weight: bold;
+        }
+        .cell-time {
+            font-size: 24rpx;
+            color: #999999;
+            float: right;
+        }
+    }
+    .tui-cell-content {
+        width: 100%;
+        height: 160rpx;
+        box-sizing: border-box;
+        padding: 16rpx;
+        border-radius: 8rpx;
+        background-color: #f7f7f7;
+        .cell-image {
+            width: 128rpx;
+            height: 128rpx;
+            border-radius: 8rpx;
+            float: left;
+            image {
+                width: 128rpx;
+                height: 128rpx;
+                display: block;
+                border-radius: 8rpx;
+            }
+        }
+        .cell-content {
+            width: 490rpx;
+            height: 100%;
+            box-sizing: border-box;
+            padding: 0 20rpx;
+            line-height: 42rpx;
+            font-size: 28rpx;
+            color: #666666;
+            text-align: justify;
+            float: left;
+            text-overflow: ellipsis;
+            display: -webkit-box;
+            word-break: break-all;
+            -webkit-box-orient: vertical;
+            -webkit-line-clamp: 3;
+            overflow: hidden;
+        }
+    }
+    .tui-cell-bot {
+        width: 100%;
+        height: 80rpx;
+        box-sizing: border-box;
+        padding: 16rpx 0 0 0;
+        .tui-cell-btn {
+            width: 160rpx;
+            height: 64rpx;
+            border-radius: 35rpx;
+            box-sizing: border-box;
+            border: 1px solid #999999;
+            text-align: center;
+            line-height: 64rpx;
+            font-size: 26rpx;
+            color: #333333;
+            float: right;
+            margin-left: 24rpx;
+        }
+    }
+}
+.tui-custom-btn_box {
+    width: 80px;
+    height: 100%;
+    padding: 0 20rpx;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    background-color: #f7f7f7;
+}
+
+.tui-custom-btn {
+    width: 56rpx;
+    height: 56rpx;
+    border-radius: 50%;
+    background-color: #f94b4b;
+    color: #ffffff;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-shrink: 0;
+    .icon-shanchu3 {
+        font-size: 32rpx;
+    }
+}
 </style>

+ 4 - 2
pages/tabBar/notice/index.vue

@@ -66,7 +66,7 @@
                 		<image class="icon-image" :src="StaticUrl + 'icon/icon-notice-text@2x.png'" mode=""></image>
                 	</view>
                 	<view class="notice-cell-text"> 最新文章 <text class="cell-text">官方</text> </view>
-                	<view class="notice-cell-badge" v-if="promotionCount > 0">
+                	<view class="notice-cell-badge" v-if="articleCount > 0">
                 		<text class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
                 			{{ articleCount | BadgeType }}
                 		</text>
@@ -77,7 +77,7 @@
                 		<image class="icon-image" :src="StaticUrl + 'icon/icon-notice-active@2x.png'" mode=""></image>
                 	</view>
                 	<view class="notice-cell-text"> 最新活动 <text class="cell-text">官方</text> </view>
-                	<view class="notice-cell-badge" v-if="promotionCount > 0">
+                	<view class="notice-cell-badge" v-if="activityCount > 0">
                 		<text class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
                 			{{ activityCount | BadgeType }}
                 		</text>
@@ -155,6 +155,8 @@ export default {
 					this.accountCount = response.data.account // 账户通知
 					this.notificationCount = response.data.notificationCount // 服务通知
 					this.promotionCount = response.data.promotionCount // 优惠促销
+                    this.activityCount = response.data.activityCount // 活动通知
+                    this.articleCount = response.data.infoCount // 文章通知
 					this.skeletonShow = false //预加载圆圈隐藏
 				})
 				.catch(error => {

+ 1 - 1
services/config.env.js

@@ -6,7 +6,7 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.102:18002' //志国联调地址
     // URL_CONFIG = 'http://192.168.2.103:18002'    //陈凯联调地址
     // URL_CONFIG = 'https://core-b.caimei365.com'
-    URL_CONFIG = 'https://core.caimei365.com'    
+    URL_CONFIG = 'https://core-b.caimei365.com'
 }else{
     // 生产环境
     // URL_CONFIG = 'https://core-b.caimei365.com'