Browse Source

Merge remote-tracking branch 'remotes/origin/developerX' into developerB

# Conflicts:
#	components/thorui/tui-modal/tui-modal.vue
zhengjinyi 2 years ago
parent
commit
34ce562f48

+ 385 - 354
components/thorui/tui-modal/tui-modal.vue

@@ -1,376 +1,407 @@
 <template>
-	<view @touchmove.stop.prevent>
-		<view class="tui-modal-box" :style="{width:width,padding:padding,borderRadius:radius}" :class="[(fadeIn || show)?'tui-modal-normal':'tui-modal-scale',show?'tui-modal-show':'']">
+	<view class="tui-modal__container" :class="[show ? 'tui-modal-show' : '']" :style="{zIndex:zIndex}" @touchmove.stop.prevent>
+		<view
+			class="tui-modal-box"
+			:style="{ width: width, padding: padding, borderRadius: radius, backgroundColor: backgroundColor,zIndex:zIndex+1 }"
+			:class="[fadeIn || show ? 'tui-modal-normal' : 'tui-modal-scale', show ? 'tui-modal-show' : '']"
+		>
 			<view v-if="!custom">
-				<view class="tui-modal-title" v-if="title">{{title}}</view>
-				<view class="tui-modal-content" :class="[title?'':'tui-mtop']" :style="{color:color,fontSize:size+'rpx'}">{{content}}</view>
-				<view class="tui-modalBtn-box" :class="[button.length!=2?'tui-flex-column':'']">
-					<block v-for="(item,index) in button" :key="index">
-                        <!-- :style="{background: item.customStyle.bgColor ? item.customStyle.bgColor : '',color: item.customStyle.color ? item.customStyle.color : ''}" -->
-						<button class="tui-modal-btn" :class="[(!item.customStyle && ('tui-'+(item.type || 'primary')+(item.plain?'-outline':''))),button.length!=2?'tui-btn-width':'',button.length>2?'tui-mbtm':'',shape=='circle'?'tui-circle-btn':'']"
-                         :style="{background: item.customStyle.bgColor ? item.customStyle.bgColor : '',color: item.customStyle.color ? item.customStyle.color : '',fontSize: item.customStyle.fontSize ? item.customStyle.fontSize : ''}"
-						 :hover-class="!item.customStyle && ('tui-'+(item.plain?'outline':(item.type || 'primary'))+'-hover')"  :data-index="index" @tap="handleClick">{{item.text || "确定"}}</button>
+				<view class="tui-modal-title" v-if="title">{{ title }}</view>
+				<view class="tui-modal-content" :class="[title ? '' : 'tui-mtop']" :style="{ color: color, fontSize: size + 'rpx' }">{{ content }}</view>
+				<view class="tui-modalBtn-box" :class="[button.length != 2 ? 'tui-flex-column' : '']">
+					<block v-for="(item, index) in button" :key="index">
+						<button
+							class="tui-modal-btn"
+							:class="[
+								'tui-' + (item.type || 'primary') + (item.plain ? '-outline' : ''),
+								button.length != 2 ? 'tui-btn-width' : '',
+								button.length > 2 ? 'tui-mbtm' : '',
+								shape == 'circle' ? 'tui-circle-btn' : ''
+							]"
+							:hover-class="'tui-' + (item.plain ? 'outline' : item.type || 'primary') + '-hover'"
+							:data-index="index"
+							@tap="handleClick"
+						>
+							{{ item.text || '确定' }}
+						</button>
 					</block>
-				</view> 
-			</view>
-			<view v-else>
-				<slot></slot>
+				</view>
 			</view>
+			<view v-else><slot></slot></view>
 		</view>
-		<view class="tui-modal-mask" :class="[show?'tui-mask-show':'']" @tap="handleClickCancel"></view>
-
+		<view class="tui-modal-mask" :class="[show ? 'tui-mask-show' : '']" :style="{zIndex:maskZIndex}" @tap="handleClickCancel"></view>
 	</view>
 </template>
 
 <script>
-	export default {
-		name: 'tuiModal',
-		props: {
-			//是否显示
-			show: {
-				type: Boolean,
-				default: false
-			},
-			width: {
-				type: String,
-				default: '84%'
-			},
-			padding: {
-				type: String,
-				default: '40rpx 64rpx'
-			},
-			radius: {
-				type: String,
-				default: '24rpx'
-			},
-			//标题
-			title: {
-				type: String,
-				default: ''
-			},
-			//内容
-			content: {
-				type: String,
-				default: ''
-			},
-			//内容字体颜色
-			color: {
-				type: String,
-				default: '#999'
-			},
-			//内容字体大小 rpx
-			size: {
-				type: Number,
-				default: 28
-			},
-			//形状 circle, square
-			shape: {
-				type: String,
-				default: 'square'
-			},
-			button: {
-				type: Array,
-				default: function() {
-					return [{
+export default {
+	name: 'tuiModal',
+	props: {
+		//是否显示
+		show: {
+			type: Boolean,
+			default: false
+		},
+		width: {
+			type: String,
+			default: '84%'
+		},
+		backgroundColor: {
+			type: String,
+			default: '#fff'
+		},
+		padding: {
+			type: String,
+			default: '40rpx 64rpx'
+		},
+		radius: {
+			type: String,
+			default: '24rpx'
+		},
+		//标题
+		title: {
+			type: String,
+			default: ''
+		},
+		//内容
+		content: {
+			type: String,
+			default: ''
+		},
+		//内容字体颜色
+		color: {
+			type: String,
+			default: '#999'
+		},
+		//内容字体大小 rpx
+		size: {
+			type: Number,
+			default: 28
+		},
+		//形状 circle, square
+		shape: {
+			type: String,
+			default: 'square'
+		},
+		button: {
+			type: Array,
+			default: function() {
+				return [
+					{
 						text: '取消',
-						type: 'danger',
+						type: 'red',
 						plain: true //是否空心
-					}, {
+					},
+					{
 						text: '确定',
-						type: 'danger',
+						type: 'red',
 						plain: false
-					}]
-				}
-			},
-			//点击遮罩 是否可关闭
-			maskClosable: {
-				type: Boolean,
-				default: true
-			},
-			//淡入效果,自定义弹框插入input输入框时传true
-			fadeIn: {
-				type: Boolean,
-				default: false
-			},
-			//自定义弹窗内容
-			custom: {
-				type: Boolean,
-				default: false
+					}
+				];
 			}
 		},
-		data() {
-			return {
-
-			}
+		//点击遮罩 是否可关闭
+		maskClosable: {
+			type: Boolean,
+			default: true
 		},
-		methods: {
-			handleClick(e) {
-				if (!this.show) return
-				const dataset = e.currentTarget.dataset
-				this.$emit('click', {
-					index: Number(dataset.index)
-				})
-			},
-			handleClickCancel() {
-				if (!this.maskClosable) return
-				this.$emit('cancel')
-			}
+		//淡入效果,自定义弹框插入input输入框时传true
+		fadeIn: {
+			type: Boolean,
+			default: false
+		},
+		//自定义弹窗内容
+		custom: {
+			type: Boolean,
+			default: false
+		},
+		//容器z-index
+		zIndex:{
+			type: Number,
+			default: 9997
+		},
+		//mask z-index
+		maskZIndex:{
+			type: Number,
+			default: 9990
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		handleClick(e) {
+			if (!this.show) return;
+			const dataset = e.currentTarget.dataset;
+			this.$emit('click', {
+				index: Number(dataset.index)
+			});
+		},
+		handleClickCancel() {
+			if (!this.maskClosable) return;
+			this.$emit('cancel');
 		}
 	}
+};
 </script>
 
 <style scoped>
-	.tui-modal-box {
-		position: fixed;
-		left: 50%;
-		top: 50%;
-		margin: auto;
-		background-color: #fff;
-		z-index: 9999998;
-		transition: all 0.3s ease-in-out;
-		opacity: 0;
-		box-sizing: border-box;
-		visibility: hidden;
-	}
-
-	.tui-modal-scale {
-		transform: translate(-50%, -50%) scale(0);
-	}
-
-	.tui-modal-normal {
-		transform: translate(-50%, -50%) scale(1);
-	}
-
-	.tui-modal-show {
-		opacity: 1;
-		visibility: visible;
-	}
-
-	.tui-modal-mask {
-		position: fixed;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-		background-color: rgba(0, 0, 0, 0.6);
-		z-index: 9999996;
-		transition: all 0.3s ease-in-out;
-		opacity: 0;
-		visibility: hidden;
-	}
-
-	.tui-mask-show {
-		visibility: visible;
-		opacity: 1;
-	}
-
-	.tui-modal-title {
-		text-align: center;
-		font-size: 34rpx;
-		color: #333;
-		padding-top: 20rpx;
-		font-weight: bold;
-	}
-
-	.tui-modal-content {
-		text-align: center;
-		color: #999;
-		font-size: 28rpx;
-		padding-top: 20rpx;
-		padding-bottom: 60rpx;
-	}
-
-	.tui-mtop {
-		margin-top: 30rpx;
-	}
-
-	.tui-mbtm {
-		margin-bottom: 30rpx;
-	}
-
-	.tui-modalBtn-box {
-		width: 100%;
-		display: flex;
-		align-items: center;
-		justify-content: space-between
-	}
-
-	.tui-flex-column {
-		flex-direction: column;
-	}
-
-	.tui-modal-btn {
-		width: 46%;
-		height: 68rpx;
-		line-height: 68rpx;
-		position: relative;
-		border-radius: 10rpx;
-		font-size: 26rpx;
-		overflow: visible;
-		margin-left: 0;
-		margin-right: 0;
-	}
-
-	.tui-modal-btn::after {
-		content: " ";
-		position: absolute;
-		width: 200%;
-		height: 200%;
-		-webkit-transform-origin: 0 0;
-		transform-origin: 0 0;
-		-webkit-transform: scale(0.5, 0.5);
-		transform: scale(0.5, 0.5);
-		left: 0;
-		top: 0;
-		border-radius: 20rpx;
-	}
-
-	.tui-btn-width {
-		width: 80% !important;
-	}
-
-	.tui-primary {
-		background: #5677fc;
-		color: #fff;
-	}
-
-	.tui-primary-hover {
-		background: #4a67d6;
-		color: #e5e5e5;
-	}
-
-	.tui-primary-outline {
-		color: #5677fc;
-		background: transparent;
-	}
-
-	.tui-primary-outline::after {
-		border: 1px solid #5677fc;
-	}
-
-	.tui-danger {
-		background: #FF5B00;
-		color: #fff;
-	}
-
-	.tui-danger-hover {
-		background: #d53912;
-		color: #e5e5e5;
-	}
-
-	.tui-danger-outline {
-		color: #FF5B00;
-		background: transparent;
-	}
-
-	.tui-danger-outline::after {
-		border: 1px solid #FF5B00;
-	}
-
-	.tui-red {
-		background: #e41f19;
-		color: #fff;
-	}
-
-	.tui-red-hover {
-		background: #c51a15;
-		color: #e5e5e5;
-	}
-
-	.tui-red-outline {
-		color: #e41f19;
-		background: transparent;
-	}
-
-	.tui-red-outline::after {
-		border: 1px solid #e41f19;
-	}
-
-	.tui-warning {
-		background: #ff7900;
-		color: #fff;
-	}
-
-	.tui-warning-hover {
-		background: #e56d00;
-		color: #e5e5e5;
-	}
-
-	.tui-warning-outline {
-		color: #ff7900;
-		background: transparent;
-	}
-
-	.tui-warning-outline::after {
-		border: 1px solid #ff7900;
-	}
-
-	.tui-green {
-		background: #19be6b;
-		color: #fff;
-	}
-
-	.tui-green-hover {
-		background: #16ab60;
-		color: #e5e5e5;
-	}
-
-	.tui-green-outline {
-		color: #19be6b;
-		background: transparent;
-	}
-
-	.tui-green-outline::after {
-		border: 1px solid #19be6b;
-	}
-
-	.tui-white {
-		background: #fff;
-		color: #333;
-	}
-
-	.tui-white-hover {
-		background: #f7f7f9;
-		color: #666;
-	}
-
-	.tui-white-outline {
-		color: #333;
-		background: transparent;
-	}
-
-	.tui-white-outline::after {
-		border: 1px solid #333;
-	}
-
-	.tui-gray {
-		background: #ededed;
-		color: #999;
-	}
-
-	.tui-gray-hover {
-		background: #d5d5d5;
-		color: #898989;
-	}
-
-	.tui-gray-outline {
-		color: #999;
-		background: transparent;
-	}
-
-	.tui-gray-outline::after {
-		border: 1px solid #999;
-	}
-
-	.tui-outline-hover {
-		opacity: 0.6;
-	}
-
-	.tui-circle-btn {
-		border-radius: 40rpx !important;
-	}
-
-	.tui-circle-btn::after {
-		border-radius: 80rpx !important;
-	}
+.tui-modal__container {
+	width: 100%;
+	height: 100%;
+	position: fixed;
+	left: 0;
+	top: 0;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	visibility: hidden;
+}
+.tui-modal-box {
+	position: relative;
+	opacity: 0;
+	visibility: hidden;
+	box-sizing: border-box;
+	transition: all 0.3s ease-in-out;
+}
+
+.tui-modal-scale {
+	transform: scale(0);
+}
+
+.tui-modal-normal {
+	transform: scale(1);
+}
+
+.tui-modal-show {
+	opacity: 1;
+	visibility: visible;
+}
+
+.tui-modal-mask {
+	position: fixed;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	background-color: rgba(0, 0, 0, 0.6);
+	transition: all 0.3s ease-in-out;
+	opacity: 0;
+	visibility: hidden;
+}
+
+.tui-mask-show {
+	visibility: visible;
+	opacity: 1;
+}
+
+.tui-modal-title {
+	text-align: center;
+	font-size: 34rpx;
+	color: #333;
+	padding-top: 20rpx;
+	font-weight: bold;
+}
+
+.tui-modal-content {
+	text-align: center;
+	color: #999;
+	font-size: 28rpx;
+	padding-top: 20rpx;
+	padding-bottom: 60rpx;
+}
+
+.tui-mtop {
+	margin-top: 30rpx;
+}
+
+.tui-mbtm {
+	margin-bottom: 30rpx;
+}
+
+.tui-modalBtn-box {
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.tui-flex-column {
+	flex-direction: column;
+}
+
+.tui-modal-btn {
+	width: 46%;
+	height: 68rpx;
+	line-height: 68rpx;
+	position: relative;
+	border-radius: 10rpx;
+	font-size: 26rpx;
+	overflow: visible;
+	margin-left: 0;
+	margin-right: 0;
+}
+
+.tui-modal-btn::after {
+	content: ' ';
+	position: absolute;
+	width: 200%;
+	height: 200%;
+	-webkit-transform-origin: 0 0;
+	transform-origin: 0 0;
+	transform: scale(0.5, 0.5) translateZ(0);
+	left: 0;
+	top: 0;
+	border-radius: 20rpx;
+	z-index: 2;
+}
+
+.tui-btn-width {
+	width: 80% !important;
+}
+
+.tui-primary {
+	background: #5677fc;
+	color: #fff;
+}
+
+.tui-primary-hover {
+	background: #4a67d6;
+	color: #e5e5e5;
+}
+
+.tui-primary-outline {
+	color: #5677fc;
+	background: transparent;
+}
+
+.tui-primary-outline::after {
+	border: 1px solid #5677fc;
+}
+
+.tui-danger {
+	background: #ed3f14;
+	color: #fff;
+}
+
+.tui-danger-hover {
+	background: #d53912;
+	color: #e5e5e5;
+}
+
+.tui-danger-outline {
+	color: #ed3f14;
+	background: transparent;
+}
+
+.tui-danger-outline::after {
+	border: 1px solid #ed3f14;
+}
+
+.tui-red {
+	background: #e41f19;
+	color: #fff;
+}
+
+.tui-red-hover {
+	background: #c51a15;
+	color: #e5e5e5;
+}
+
+.tui-red-outline {
+	color: #e41f19;
+	background: transparent;
+}
+
+.tui-red-outline::after {
+	border: 1px solid #e41f19;
+}
+
+.tui-warning {
+	background: #ff7900;
+	color: #fff;
+}
+
+.tui-warning-hover {
+	background: #e56d00;
+	color: #e5e5e5;
+}
+
+.tui-warning-outline {
+	color: #ff7900;
+	background: transparent;
+}
+
+.tui-warning-outline::after {
+	border: 1px solid #ff7900;
+}
+
+.tui-green {
+	background: #19be6b;
+	color: #fff;
+}
+
+.tui-green-hover {
+	background: #16ab60;
+	color: #e5e5e5;
+}
+
+.tui-green-outline {
+	color: #19be6b;
+	background: transparent;
+}
+
+.tui-green-outline::after {
+	border: 1px solid #19be6b;
+}
+
+.tui-white {
+	background: #fff;
+	color: #333;
+}
+
+.tui-white-hover {
+	background: #f7f7f9;
+	color: #666;
+}
+
+.tui-white-outline {
+	color: #333;
+	background: transparent;
+}
+
+.tui-white-outline::after {
+	border: 1px solid #333;
+}
+
+.tui-gray {
+	background: #ededed;
+	color: #999;
+}
+
+.tui-gray-hover {
+	background: #d5d5d5;
+	color: #898989;
+}
+
+.tui-gray-outline {
+	color: #999;
+	background: transparent;
+}
+
+.tui-gray-outline::after {
+	border: 1px solid #999;
+}
+
+.tui-outline-hover {
+	opacity: 0.6;
+}
+
+.tui-circle-btn {
+	border-radius: 40rpx !important;
+}
+
+.tui-circle-btn::after {
+	border-radius: 80rpx !important;
+}
 </style>

+ 141 - 26
pages/goods/components/cm-product-doc.vue

@@ -18,7 +18,7 @@
                                     :src="image.url"
                                     @click="previewImage(i, item.imageList)"
                                     mode="aspectFill"
-                                    v-for="(image, i) in imageFormat(item.imageList)"
+                                    v-for="(image, i) in imageFormat(item.imageList, index)"
                                     :key="i"
                                     :style="image.style"
                                 ></image>
@@ -48,6 +48,7 @@
                         <view class="cm-video-list">
                             <video
                                 class="cm-video"
+                                ref="myVideo"
                                 :id="'myVideo' + index"
                                 :src="item.fileUrl"
                                 :style="videoStyle['myVideo' + index]"
@@ -55,6 +56,7 @@
                                 show-fullscreen-btn
                                 show-mute-btn
                                 play-btn-position="center"
+                                @timeupdate="onPlayVideo($event)"
                                 @play="handlePlayer('myVideo' + index)"
                                 v-if="item.fileUrl"
                                 @loadedmetadata="loadedmetadata"
@@ -98,7 +100,7 @@
             class="cm-login"
             :class="{ maxBottom: !bottom && isIphoneX }"
             :style="{ bottom: bottom }"
-            v-if="TipStatus"
+            v-if="TipStatus && tipStatus"
         >
             <text>{{ TipStatus.text }}</text>
             <view class="cm-btn" @click="nextAction(TipStatus.redirect)">{{ TipStatus.btn }}</view>
@@ -109,7 +111,7 @@
             :content="TipStatus.text"
             shape="circle"
             :button="modalButton"
-            fadeIn
+            :fadeIn="true"
             @click="handleModalClick"
         ></tui-modal>
     </view>
@@ -156,13 +158,17 @@ export default {
             ],
             showModal: false,
             //用户信息相关
-            permission: 5, //用户权限  0可查看,1未登录,2需升级资质机构,3需升级医美资质机构,4需要抵扣采美豆,5无权限查看
+            permission: 5, //用户权限  0可查看,1未登录,2需升级会员机构,3需升级医美会员机构,4需要抵扣采美豆,5无权限查看
             imageArchiveList: [], // 图片资料列表
             videoArchiveList: [], // 视频资料列表
             fileArchiveList: [], // 文件资料列表
             defaultImage: 'https://static.caimei365.com/app/img/icon2/PC-default.png', // 默认图片
             videoCover: 'https://static.caimei365.com/app/img/icon2/video-cover.png', //默认视频封面
-            videoStyle: {}
+            videoStyle: {},
+            timer: null,
+            tipStatus: true, // 状态
+            userInfo: {}, // 用户信息
+            num: 0,
         }
     },
     computed: {
@@ -173,23 +179,31 @@ export default {
             const statusText = [
                 false, // 正常访问
                 { text: '请登录后查看!', btn: '去登录', redirect: '/pages/login/login' },
-                { text: '请升级成为资质机构后方可查看!', btn: '去升级', redirect: '/pages/login/apply' },
-                { text: '请升级成为医美资质机构后方可查看!', btn: '去升级', redirect: '/pages/login/apply' },
+                { text: '请升级成为会员机构后方可查看!', btn: '去升级', redirect: '/pages/login/apply' },
+                { text: '请升级成为医美会员机构后方可查看!', btn: '去升级', redirect: '/pages/login/apply' },
                 { text: '需抵扣100采美豆方可查看!', btn: '去查看', redirect: 10 },
                 { text: '无权限查看!', btn: '确认' }
             ]
-            // 0可查看,1未登录,2需升级资质机构,3需升级医美资质机构,4需要抵扣采美豆,5无权限查看
+            // 0可查看,1未登录,2需升级会员机构,3需升级医美会员机构,4需要抵扣采美豆,5无权限查看
             return statusText[this.permission]
         }
     },
     watch: {
         TipStatus(val) {
+            if(this.TipStatus) {
+                this.timer = setTimeout(()=>{
+                    this.tipStatus = false
+                    clearTimeout(this.timer)
+                }, 10000)
+            }
             this.$emit('tipStatus', this.TipStatus)
         }
     },
     created() {
         this.userId = uni.getStorageSync('userInfo').userId || -1
         this.getDetail()
+        this.userInfo = uni.getStorageSync('userInfo')
+        console.log(uni.getStorageSync('userInfo'))
     },
     methods: {
         // 获取商品资料详情
@@ -202,6 +216,18 @@ export default {
                 this.videoArchiveList = res.data.videoArchiveList
                 this.fileArchiveList = res.data.fileArchiveList
                 this.permission = res.data.permission
+                this.imageArchiveList.forEach((item, index) => {
+                    if (item.imageNum !== item.imageList.length) {
+                        this.num = item.imageNum - item.imageList.length
+                        for (let i = 0; i < this.num; i++) {
+                            item.imageList.push(this.defaultImage)
+                        }
+                    }
+                })
+                this.videoArchiveList.forEach(item => {
+                    item.fileUrl = decodeURIComponent(item.fileUrl)
+                })
+                // console.log(res.data.videoArchiveList)
             })
         },
         //采美豆抵扣
@@ -248,10 +274,11 @@ export default {
         },
         // 视频播放
         handlePlayer(id) {
-            if (this.checkPermission()) {
-                this.handleStop(id)
-                return
-            }
+            // if (this.checkPermission()) {
+            //     this.handleStop(id)
+            //     return
+            // }
+            console.log('视频播放id', id)
             // 如果点击同一个播放器,就
             if (this.prevVideoId === id) return
             // this.handleFullScreen(id) // 点击播放时全屏
@@ -260,6 +287,22 @@ export default {
             // 保存当前播放器id
             this.prevVideoId = id
         },
+        // 监听video时长
+        onPlayVideo(e) {
+            console.log(e)
+            const allTime = parseInt(((e.detail.duration)% 3600) / 60) // 获取分钟
+            const inPlay = parseInt(((e.detail.duration)% 3600) / 60)
+            if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
+                if(allTime >= 10 && (3 < inPlay)) {
+                    this.handleStop(e.target.id)
+                    this.checkPermission()
+                }
+                if (allTime < 10) {
+                    this.handleStop(e.target.id)
+                    this.checkPermission()
+                }
+            }
+        },
         // 开始播放
         handelPlay(id) {
             if (!id) return
@@ -286,21 +329,79 @@ export default {
         },
         // 预览图片
         previewImage(index, previewImageList) {
-            if (this.checkPermission()) return
-            const that = this
-            uni.previewImage({
-                current: index,
-                indicator: 'number',
-                urls: previewImageList,
-                loop: true,
-                success() {
-                    that.$emit('previewImage', true)
+            // if (this.permission === 1) {
+            //     if(previewImageList.length >= 5) {
+            //         if (index < 3) {
+            //             uni.previewImage({
+            //                 current: index,
+            //                 indicator: 'number',
+            //                 urls: previewImageList,
+            //                 loop: true,
+            //                 success() {
+            //                     that.$emit('previewImage', true)
+            //                 }
+            //             })
+            //         }else {
+            //             this.checkPermission()
+            //         }
+            //     } else {
+            //         this.checkPermission()
+            //     }
+            // }else if (this.permission === 2) {
+            if (this.permission === 2 || this.permission === 4 || this.permission === 1) {
+                if(previewImageList.length >= 5) {
+                    if(index < 2) {
+                        uni.previewImage({
+                            current: index,
+                            indicator: 'number',
+                            urls: previewImageList,
+                            loop: true,
+                            success() {
+                                that.$emit('previewImage', true)
+                            }
+                        })
+                    } else {
+                        if (this.checkPermission()) return
+                    }
+                }else {
+                    if (this.checkPermission()) return
                 }
-            })
+            }
+            // } else if (this.permission === 3) {
+            //     if(previewImageList.length >= 5) {
+            //         if (index < 3) {
+            //             uni.previewImage({
+            //                 current: index,
+            //                 indicator: 'number',
+            //                 urls: previewImageList,
+            //                 loop: true,
+            //                 success() {
+            //                     that.$emit('previewImage', true)
+            //                 }
+            //             })
+            //         } else {
+            //             if (this.checkPermission()) return
+            //         }
+            //     } else {
+            //         if (this.checkPermission()) return
+            //     }
+            else {
+               if (this.checkPermission()) return
+               const that = this
+               uni.previewImage({
+                   current: index,
+                   indicator: 'number',
+                   urls: previewImageList,
+                   loop: true,
+                   success() {
+                       that.$emit('previewImage', true)
+                   }
+               })
+            }
         },
         //用户权限校验拦截
         checkPermission() {
-            //permission:查看权限:0可查看,1未登录,2需升级资质机构,3需升级医美资质机构,4需要抵扣采美豆,5无权限查看
+            //permission:查看权限:0可查看,1未登录,2需升级会员机构,3需升级医美会员机构,4需要抵扣采美豆,5无权限查看
             const _self = this
             // 如果 TipStatus 返回false 就放行
             if (!_self.TipStatus) return 0
@@ -319,7 +420,7 @@ export default {
             }
         },
         //图片列表处理
-        imageFormat(list) {
+        imageFormat(list, index) {
             const imageList = []
             if (list.length > 2) {
                 list.forEach((item, index) => {
@@ -368,7 +469,7 @@ export default {
         },
         // 文件预览
         previewFile(file) {
-            if (this.checkPermission()) return
+            // if (this.checkPermission()) return
             // 获取文件后缀
             // const index = file.fileName.lastIndexOf('.')
             // const suffix = file.fileName.substring(index)
@@ -405,11 +506,13 @@ export default {
                 success(res) {
                     const filePath = res.tempFilePath
                     console.log(filePath) 
+                    console.log(file, res, '文件数据')
                     // 打开文件
                     uni.openDocument({
                         filePath: filePath,
                         fileType: suffix,
                         success(res) {
+                            console.log(res)
                             uni.showToast({
                                 icon:'success',
                                 title:'打开成功',
@@ -465,7 +568,10 @@ export default {
     box-sizing: border-box;
     z-index: 9;
     &.maxBottom {
-        bottom: 175rpx;
+        bottom: -100rpx;
+        z-index: 999;
+        animation: permiMove .3s ease-in-out;
+        animation-fill-mode: forwards;
     }
     text {
         font-size: 26rpx;
@@ -626,4 +732,13 @@ export default {
         }
     }
 }
+
+@keyframes permiMove {
+    0% {
+        bottom: -100rpx;
+    }
+    100% {
+        bottom: 180rpx;
+    }
+}
 </style>

+ 1 - 1
pages/goods/product.vue

@@ -337,7 +337,7 @@
 					</view>
 				</view>
 				<!-- 相关资料 -->
-				<view class="product-details recommend product-details4" v-show="tabCurrentIndex === 4">
+				<view class="product-details recommend product-details4" v-if="tabCurrentIndex === 4">
 					<cm-product-doc
 						@previewImage="changePreViewImageStatus"
 						:archiveId="product.archiveId"

+ 21 - 2
pages/notice/shop/components/notice-cell.vue

@@ -3,7 +3,7 @@
 	<view>
 		<!-- 供应商账户通知 -->
 		<template v-if="cellType === 1">
-			<view class="tui-notice-cell clearfix">
+			<view class="tui-notice-cell clearfix" v-if="cell.shopMessType < 6">
 				<view class="tui-cell-top">
 					<view class="cell-title"> {{ cell.shopMessType | noticeUsersFilters }} </view>
 					<view class="cell-time"> {{ cell.time }} </view>
@@ -18,6 +18,23 @@
 					<view class="tui-cell-content"> {{ noticeUsersText(cell) }} </view>
 				</template>
 			</view>
+            <view class="" v-if="cell.shopMessType >= 6">
+                <view class="tui-notice-cell clearfix">
+                	<view class="tui-cell-top">
+                		<view class="cell-title"> {{ cell.content }} </view>
+                		<view class="cell-time"> {{ cell.time }} </view>
+                	</view>
+                	<template v-if="cell.shopMessType === 3 || cell.shopMessType === 4 || cell.shopMessType === 6">
+                		<view class="tui-cell-content">
+                			<view class="cell-image"> <img :src="cell.mainImage" alt="" /> </view>
+                			<view class="cell-content"> {{ noticeUsersText(cell) }} </view>
+                		</view>
+                	</template>
+                	<template v-else>
+                		<view class="tui-cell-content"> {{ noticeUsersText(cell) }} </view>
+                	</template>
+                </view>
+            </view>
 		</template>
 		<!-- 供应商服务通知 -->
 		<template v-if="cellType === 2">
@@ -49,7 +66,9 @@ export default {
 	data() {
 		return {}
 	},
-	created() {},
+	created() {
+        console.log(this.cellType, this.cell, 1111)
+    },
 	methods: {}
 }
 </script>

+ 5 - 1
pages/notice/shop/mixins/notice.mixins.js

@@ -104,7 +104,11 @@ const noticeMixins = {
                 2: `恭喜您(微信昵称:${cell.content})成功成为【${cell.shopName}】的运营人员。`,
                 3: '该商品上架审核未通过,暂时不能上架采美商城。请登录采美网站修改商品资料重新提交。',
                 4: '该商品新品展示审核未通过,未能展示在采美商城新品橱窗。',
-                5: `该商品的资质证书将于${cell.content}后失效,请及时登录采美网站上传新证书。` 
+                5: `该商品的资质证书将于${cell.content}后失效,请及时登录采美网站上传新证书。` ,
+                6: `恭喜您发布的采美百科词条“${cell.content}”审核已通过。`,
+                7: `很遗憾!您发布的采美百科词条“${cell.content}”审核未通过,原因是“${cell.reasonContent}”,可前往电脑端“我的词条”进行修改后,重新提交审核。`,
+                8: `恭喜您发布的采美文章“${cell.content}”审核已通过。`,
+                9: `很遗憾!您发布的采美文章“${cell.content}”审核未通过,原因是“${cell.reasonContent}”,可前往电脑端“文章管理”进行修改后,重新提交审核。`
             }
             return map[cell.shopMessType]
         },