dever 5 лет назад
Родитель
Сommit
9430c8838d

+ 11 - 8
App.vue

@@ -2,13 +2,15 @@
 export default {
 	onLaunch: function() {
 		// #ifdef APP-PLUS
-		plus.screen.lockOrientation('portrait-primary'); //锁定屏幕
-		const dom = weex.requireModule('dom');
-		dom.addRule('fontFace', {
-			fontFamily: 'graceIconfont',
-			src: "url('https://at.alicdn.com/t/font_823462_1p2i18cul3t.ttf')"
-		});
-		// #endif
+		//plus.screen.lockOrientation('portrait-primary'); //锁定屏幕
+		// #endif
+		/*
+		const dom = weex.requireModule('dom');
+		dom.addRule('fontFace', {
+			fontFamily: 'graceIconfont',
+			src: "url('https://at.alicdn.com/t/font_823462_1p2i18cul3t.ttf')"
+		});
+		*/
 	},
 	onShow: function() {},
 	onHide: function() {}
@@ -25,7 +27,8 @@ export default {
 /* #ifdef APP-PLUS-NVUE */
 @import './lib/graceUI/graceWeex.css';
 /* #endif */
-@import './lib/dever/dever.css';
+@import './lib/dever/dever.css';
+/*body {font-family:"NSimSun"}*/
 page{background-color: #ECEEF7;}
 .grace-body {
 	width:100%;

+ 1 - 1
lib/dever/components/content.vue

@@ -48,5 +48,5 @@ export default {
 .grace-art-info-line-text{font-size:22rpx; line-height:50rpx; color:#888888;}
 .grace-art-contents{padding:20rpx 0;}
 .grace-art-img{width:100%; margin:10rpx 0;}
-.grace-art-content{line-height:52rpx; font-size:28rpx;}
+.grace-art-content{line-height:52rpx; font-size:26rpx;}
 </style>

+ 5 - 4
lib/dever/components/drawerWindow.vue

@@ -129,8 +129,8 @@ export default {
 }
 
 .DrawerWindow_down.show {
-	height: 84vh;
-	transform: scale(1, 1) translateY(20%);
+	height: 91vh;
+	transform: scale(1, 1) translateY(10%);
 	opacity: 1;
 	pointer-events: all;
 }
@@ -163,7 +163,7 @@ export default {
 
 .DrawerClose_down {
 	position: absolute;
-	width: 100vh;
+	width: 176vw;
 	height: 30vh;
 	left: 0;
 	top: 0;
@@ -184,9 +184,10 @@ export default {
 .DrawerClose_down.show {
 	opacity: 1;
 	pointer-events: all;
-	height: 18vh;
+	height: 10vh;
 	color: #fff;
 }
+
 .card-menu {
 	border-radius: 0px;
 }

+ 1 - 1
lib/dever/components/publish.vue

@@ -10,7 +10,7 @@
 			<view class="padding-xls">
 				<view class="publish-wrap bg-white">
 					<view class="input-box padding-sm">
-						<textarea class="area-top" placeholder="写点啥..." v-model="content"></textarea>
+						<textarea class="area-top" placeholder="写点啥..." maxlength="10000" v-model="content"></textarea>
 					</view>
 					<view class="cu-form-group img-box" v-if="is_upload">
 						<view class="next-title">上传图片(最多{{total}}张)</view>

+ 49 - 0
lib/dever/index.js

@@ -1286,6 +1286,55 @@ var dever = {
 			return 4;
 		}
 		return 
+	},
+	
+	//计算图片宽高比
+	getImage : function(imgWidth, imgHeight, containerWidth, containerHeight) {
+	  let [
+	    // 用于设定图片的宽和高
+	    tempWidth,
+	    tempHeight,
+	  ] = [
+	    undefined,
+	    undefined
+	  ]
+	  try {
+	    imgWidth = parseFloat(imgWidth)
+	    imgHeight = parseFloat(imgHeight)
+	    containerWidth = parseFloat(containerWidth)
+	    containerHeight = parseFloat(containerHeight)
+	  } catch (error) {
+	    throw new Error('抱歉,我只接收数值类型或者可以转成数值类型的参数')
+	  }
+	
+	  if (imgWidth > 0 && imgHeight > 0) {
+	    //原图片宽高比例 大于 指定的宽高比例,这就说明了原图片的宽度必然 > 高度
+	    if (imgWidth / imgHeight >= containerWidth / containerHeight) {
+	      if (imgWidth > containerWidth) {
+	        // alert('aaaaaaaa')
+	        tempWidth = containerWidth
+	        // 按原图片的比例进行缩放
+	        tempHeight = (imgHeight * containerWidth) / imgWidth
+	      } else {
+	        // 按照图片的大小进行缩放
+	        tempWidth = imgWidth
+	        tempHeight = imgHeight
+	      }
+	    } else {  // 原图片的高度必然 > 宽度
+	      if (imgHeight > containerHeight) {
+	
+	        tempHeight = containerHeight
+	        // 按原图片的比例进行缩放
+	        tempWidth = (imgWidth * containerHeight) / imgHeight
+	      } else {
+	        // 按原图片的大小进行缩放
+	        tempWidth = imgWidth
+	        tempHeight = imgHeight
+	      }
+	    }
+	  }
+	
+	  return [tempWidth,  tempHeight]
 	}
 }
 

+ 66 - 0
lib/our-loading/loaders/bounce.vue

@@ -0,0 +1,66 @@
+<template>
+  <view>
+    <view class="spinner-inside" :style="{
+      width: size + 110 + 'px',
+    }">
+      <view :style="{ backgroundColor:color }" class="bounce1"></view>
+      <view :style="{ backgroundColor:color }" class="bounce2"></view>
+      <view :style="{ backgroundColor:color }" class="bounce3"></view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'bounce',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+  text-align: center;
+}
+ 
+.spinner-inside > view {
+  width: 30px;
+  height: 30px;
+ 
+  border-radius: 100%;
+  display: inline-block;
+  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
+  animation: bouncedelay 1.4s infinite ease-in-out;
+  /* Prevent first frame from flickering when animation starts */
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+}
+ 
+.spinner-inside .bounce1 {
+  -webkit-animation-delay: -0.32s;
+  animation-delay: -0.32s;
+}
+ 
+.spinner-inside .bounce2 {
+  -webkit-animation-delay: -0.16s;
+  animation-delay: -0.16s;
+}
+ 
+@-webkit-keyframes bouncedelay {
+  0%, 80%, 100% { -webkit-transform: scale(0.0) }
+  40% { -webkit-transform: scale(1.0) }
+}
+ 
+@keyframes bouncedelay {
+  0%, 80%, 100% {
+    transform: scale(0.0);
+    -webkit-transform: scale(0.0);
+  } 40% {
+    transform: scale(1.0);
+    -webkit-transform: scale(1.0);
+  }
+}
+</style>

+ 61 - 0
lib/our-loading/loaders/double-bounce.vue

@@ -0,0 +1,61 @@
+<template>
+  <view>
+    <view class="spinner-inside" :style="{
+      width: size+20+'px',
+      height: size+20+'px'
+    }">
+      <view :style="{ backgroundColor:color }" class="double-bounce1"></view>
+      <view :style="{ backgroundColor:color }" class="double-bounce2"></view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'doubleBounce',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+  position: relative;
+}
+ 
+.double-bounce1, .double-bounce2 {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  opacity: 0.6;
+  position: absolute;
+  top: 0;
+  left: 0;
+   
+  -webkit-animation: bounce 2.0s infinite ease-in-out;
+  animation: bounce 2.0s infinite ease-in-out;
+}
+ 
+.double-bounce2 {
+  -webkit-animation-delay: -1.0s;
+  animation-delay: -1.0s;
+}
+ 
+@-webkit-keyframes bounce {
+  0%, 100% { -webkit-transform: scale(0.0) }
+  50% { -webkit-transform: scale(1.0) }
+}
+ 
+@keyframes bounce {
+  0%, 100% {
+    transform: scale(0.0);
+    -webkit-transform: scale(0.0);
+  } 50% {
+    transform: scale(1.0);
+    -webkit-transform: scale(1.0);
+  }
+}
+</style>

+ 69 - 0
lib/our-loading/loaders/double-cube.vue

@@ -0,0 +1,69 @@
+<template>
+  <view>
+    <view class="spinner-inside" :style="{
+      width: size+'px',
+      height: size+'px'
+    }">
+      <view :style="{ backgroundColor:color,width:size-10+'px',height:size-10+'px'}" class="cube1"></view>
+      <view :style="{ backgroundColor:color,width:size-10+'px',height:size-10+'px'}" class="cube2"></view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'doubleCube',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 50% auto;
+  position: relative;
+  transform: translate(-50%, -50%);
+}
+ 
+.cube1, .cube2 {
+  position: absolute;
+  top: 0;
+  left: 0;
+   
+  -webkit-animation: cubemove 1.8s infinite ease-in-out;
+  animation: cubemove 1.8s infinite ease-in-out;
+}
+ 
+.cube2 {
+  -webkit-animation-delay: -0.9s;
+  animation-delay: -0.9s;
+}
+ 
+@-webkit-keyframes cubemove {
+  25% { -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5) }
+  50% { -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg) }
+  75% { -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5) }
+  100% { -webkit-transform: rotate(-360deg) }
+}
+ 
+@keyframes cubemove {
+  25% {
+    transform: translateX(42px) rotate(-90deg) scale(0.5);
+    -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);
+  } 50% {
+    transform: translateX(42px) translateY(42px) rotate(-179deg);
+    -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
+  } 50.1% {
+    transform: translateX(42px) translateY(42px) rotate(-180deg);
+    -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);
+  } 75% {
+    transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
+    -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
+  } 100% {
+    transform: rotate(-360deg);
+    -webkit-transform: rotate(-360deg);
+  }
+}
+</style>

+ 70 - 0
lib/our-loading/loaders/double-dot.vue

@@ -0,0 +1,70 @@
+<template>
+  <view>
+    <view class="spinner-inside" :style="{
+      width: size+40+'px',
+      height: size+40+'px'
+    }">
+      <view :style="{ backgroundColor:color }" class="dot1"></view>
+      <view :style="{ backgroundColor:color }" class="dot2"></view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'doubleDot',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+  position: relative;
+  text-align: center;
+   
+  -webkit-animation: rotate 2.0s infinite linear;
+  animation: rotate 2.0s infinite linear;
+}
+ 
+.dot1, .dot2 {
+  width: 60%;
+  height: 60%;
+  display: inline-block;
+  position: absolute;
+  top: 0;
+  background-color: #67CF22;
+  border-radius: 100%;
+   
+  -webkit-animation: bounce 2.0s infinite ease-in-out;
+  animation: bounce 2.0s infinite ease-in-out;
+}
+ 
+.dot2 {
+  top: auto;
+  bottom: 0px;
+  -webkit-animation-delay: -1.0s;
+  animation-delay: -1.0s;
+}
+ 
+@-webkit-keyframes rotate { 100% { -webkit-transform: rotate(360deg) }}
+@keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg) }}
+ 
+@-webkit-keyframes bounce {
+  0%, 100% { -webkit-transform: scale(0.0) }
+  50% { -webkit-transform: scale(1.0) }
+}
+ 
+@keyframes bounce {
+  0%, 100% {
+    transform: scale(0.0);
+    -webkit-transform: scale(0.0);
+  } 50% {
+    transform: scale(1.0);
+    -webkit-transform: scale(1.0);
+  }
+}
+</style>

+ 147 - 0
lib/our-loading/loaders/loop.vue

@@ -0,0 +1,147 @@
+<template>
+  <view>
+   <view class="spinner-inside" :style="{
+      width: size+'px',
+      height: size+'px'
+    }">
+      <view class="spinner-inside-container container1">
+        <view :style="{ backgroundColor:color }" class="circle1"></view>
+        <view :style="{ backgroundColor:color }" class="circle2"></view>
+        <view :style="{ backgroundColor:color }" class="circle3"></view>
+        <view :style="{ backgroundColor:color }" class="circle4"></view>
+      </view>
+      <view class="spinner-inside-container container2">
+        <view :style="{ backgroundColor:color }" class="circle1"></view>
+        <view :style="{ backgroundColor:color }" class="circle2"></view>
+        <view :style="{ backgroundColor:color }" class="circle3"></view>
+        <view :style="{ backgroundColor:color }" class="circle4"></view>
+      </view>
+      <view class="spinner-inside-container container3">
+        <view :style="{ backgroundColor:color }" class="circle1"></view>
+        <view :style="{ backgroundColor:color }" class="circle2"></view>
+        <view :style="{ backgroundColor:color }" class="circle3"></view>
+        <view :style="{ backgroundColor:color }" class="circle4"></view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'loop',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+  position: relative;
+}
+ 
+.container1 > view, .container2 > view, .container3 > view {
+  width: 12px;
+  height: 12px;
+ 
+  border-radius: 100%;
+  position: absolute;
+  -webkit-animation: bouncedelay 1.2s infinite ease-in-out;
+  animation: bouncedelay 1.2s infinite ease-in-out;
+  -webkit-animation-fill-mode: both;
+  animation-fill-mode: both;
+}
+ 
+.spinner-inside .spinner-inside-container {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+}
+ 
+.container2 {
+  -webkit-transform: rotateZ(45deg);
+  transform: rotateZ(45deg);
+}
+ 
+.container3 {
+  -webkit-transform: rotateZ(90deg);
+  transform: rotateZ(90deg);
+}
+ 
+.circle1 { top: 0; left: 0; }
+.circle2 { top: 0; right: 0; }
+.circle3 { right: 0; bottom: 0; }
+.circle4 { left: 0; bottom: 0; }
+ 
+.container2 .circle1 {
+  -webkit-animation-delay: -1.1s;
+  animation-delay: -1.1s;
+}
+ 
+.container3 .circle1 {
+  -webkit-animation-delay: -1.0s;
+  animation-delay: -1.0s;
+}
+ 
+.container1 .circle2 {
+  -webkit-animation-delay: -0.9s;
+  animation-delay: -0.9s;
+}
+ 
+.container2 .circle2 {
+  -webkit-animation-delay: -0.8s;
+  animation-delay: -0.8s;
+}
+ 
+.container3 .circle2 {
+  -webkit-animation-delay: -0.7s;
+  animation-delay: -0.7s;
+}
+ 
+.container1 .circle3 {
+  -webkit-animation-delay: -0.6s;
+  animation-delay: -0.6s;
+}
+ 
+.container2 .circle3 {
+  -webkit-animation-delay: -0.5s;
+  animation-delay: -0.5s;
+}
+ 
+.container3 .circle3 {
+  -webkit-animation-delay: -0.4s;
+  animation-delay: -0.4s;
+}
+ 
+.container1 .circle4 {
+  -webkit-animation-delay: -0.3s;
+  animation-delay: -0.3s;
+}
+ 
+.container2 .circle4 {
+  -webkit-animation-delay: -0.2s;
+  animation-delay: -0.2s;
+}
+ 
+.container3 .circle4 {
+  -webkit-animation-delay: -0.1s;
+  animation-delay: -0.1s;
+}
+ 
+@-webkit-keyframes bouncedelay {
+  0%, 80%, 100% { -webkit-transform: scale(0.0) }
+  40% { -webkit-transform: scale(1.0) }
+}
+ 
+@keyframes bouncedelay {
+  0%, 80%, 100% {
+    transform: scale(0.0);
+    -webkit-transform: scale(0.0);
+  } 40% {
+    transform: scale(1.0);
+    -webkit-transform: scale(1.0);
+  }
+}
+</style>

+ 46 - 0
lib/our-loading/loaders/rotate-plane.vue

@@ -0,0 +1,46 @@
+<template>
+  <view>
+    <view :style="{
+      backgroundColor: color,
+      width: size+20+'px',
+      height: size+20+'px' }" class="spinner-inside"></view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'rotatePlane',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+ 
+  -webkit-animation: rotateplane 1.2s infinite ease-in-out;
+  animation: rotateplane 1.2s infinite ease-in-out;
+}
+ 
+@-webkit-keyframes rotateplane {
+  0% { -webkit-transform: perspective(120px) }
+  50% { -webkit-transform: perspective(120px) rotateY(180deg) }
+  100% { -webkit-transform: perspective(120px) rotateY(180deg)  rotateX(180deg) }
+}
+ 
+@keyframes rotateplane {
+  0% {
+    transform: perspective(120px) rotateX(0deg) rotateY(0deg);
+    -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg)
+  } 50% {
+    transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
+    -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg)
+  } 100% {
+    transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
+    -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
+  }
+}
+</style>

+ 47 - 0
lib/our-loading/loaders/scale-out.vue

@@ -0,0 +1,47 @@
+<template>
+  <view>
+    <view :style="{
+      backgroundColor: color,
+      width: size+40+'px',
+      height: size+40+'px' }" class="spinner-inside"></view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'scaleOut',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+ 
+  border-radius: 100%; 
+  -webkit-animation: scaleout 1.0s infinite ease-in-out;
+  animation: scaleout 1.0s infinite ease-in-out;
+}
+ 
+@-webkit-keyframes scaleout {
+  0% { -webkit-transform: scale(0.0) }
+  100% {
+    -webkit-transform: scale(1.0);
+    opacity: 0;
+  }
+}
+ 
+@keyframes scaleout {
+  0% {
+    transform: scale(0.0);
+    -webkit-transform: scale(0.0);
+  } 100% {
+    transform: scale(1.0);
+    -webkit-transform: scale(1.0);
+    opacity: 0;
+  }
+}
+</style>

+ 76 - 0
lib/our-loading/loaders/shrink-rect.vue

@@ -0,0 +1,76 @@
+<template>
+  <view>
+    <view class="spinner-inside" :style="{
+      width: size+20+'px',
+      height: size+20+'px'
+    }">
+      <view :style="{ backgroundColor:color }" class="rect1"></view>
+      <view :style="{ backgroundColor:color }" class="rect2"></view>
+      <view :style="{ backgroundColor:color }" class="rect3"></view>
+      <view :style="{ backgroundColor:color }" class="rect4"></view>
+      <view :style="{ backgroundColor:color }" class="rect5"></view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'shrinkRect',
+  props: {
+    color: String,
+    size: Number
+  }
+}
+</script>
+
+<style scoped>
+.spinner-inside {
+  margin: 25px auto;
+  text-align: center;
+  font-size: 10px;
+}
+
+.spinner-inside > view {
+  height: 100%;
+  width: 12%;
+	margin: 0 2px;
+  display: inline-block;
+  -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
+  animation: stretchdelay 1.2s infinite ease-in-out;
+}
+ 
+.spinner-inside .rect2 {
+  -webkit-animation-delay: -1.1s;
+  animation-delay: -1.1s;
+}
+ 
+.spinner-inside .rect3 {
+  -webkit-animation-delay: -1.0s;
+  animation-delay: -1.0s;
+}
+ 
+.spinner-inside .rect4 {
+  -webkit-animation-delay: -0.9s;
+  animation-delay: -0.9s;
+}
+ 
+.spinner-inside .rect5 {
+  -webkit-animation-delay: -0.8s;
+  animation-delay: -0.8s;
+}
+ 
+@-webkit-keyframes stretchdelay {
+  0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 
+  20% { -webkit-transform: scaleY(1.0) }
+}
+ 
+@keyframes stretchdelay {
+  0%, 40%, 100% {
+    transform: scaleY(0.4);
+    -webkit-transform: scaleY(0.4);
+  }  20% {
+    transform: scaleY(1.0);
+    -webkit-transform: scaleY(1.0);
+  }
+}
+</style>

+ 127 - 0
lib/our-loading/our-loading.vue

@@ -0,0 +1,127 @@
+<template>
+  <transition name="fade">
+   <view
+			class="mask"
+      v-show="isActive"
+      :class="{ 'full-screen': isFullScreen }"
+      :style="{ backgroundColor }"
+    >
+      <view class="spinner" :style="{ transform:`translate(-50%, -${translateY}%)`}">
+        <slot>
+					<!--  ==========在这里改成选择的那一个========== -->
+					<shrinkRect :color="color" :size="size"/>
+					<!--  ==========在这里改成选择的那一个========== -->
+        </slot>
+        <view
+          v-if="text.length"
+          :style="{ color:textColor }">
+          {{ text }}
+        </view>
+      </view>
+    </view>
+  </transition>
+</template>
+
+<script>
+// ==========在这里选一个你要的其他去掉也行==========
+// import loop from './loaders/loop.vue'
+// import bounce from './loaders/bounce.vue'
+// import doubleBounce from './loaders/double-bounce.vue'
+// import doubleCube from './loaders/double-cube.vue'
+// import doubleDot from './loaders/double-dot.vue'
+// import rotatePlane from './loaders/rotate-plane.vue'
+// import scaleOut from './loaders/scale-out.vue'
+import shrinkRect from './loaders/shrink-rect.vue'
+// ==========在这里选一个你要的其他去掉也行==========
+
+export default {
+  name: 'ourLoading',
+  components: { 
+		// ==========在这里选择一个==========
+			// loop,
+			// bounce,
+			// doubleBounce,
+			// doubleCube,
+			// doubleDot,
+			// rotatePlane,
+			// scaleOut,
+			shrinkRect
+		// ==========在这里选择一个==========
+	},
+  props: {
+    active: Boolean,
+		translateY: {
+			type: Number,
+			default: 150
+		},
+    text: {
+      type: String,
+      default: ''
+    },
+    color: {
+      type: String,
+      default: '#333'
+    },
+		textColor: {
+			type: String,
+			default: '#333'
+		},
+    isFullScreen: {
+      type: Boolean,
+      default: false
+    },
+    backgroundColor: {
+      type: String,
+      default: 'rgba(255, 255, 255, .9)'
+    },
+    size: {
+      type: Number,
+      default: 40
+    }
+  },
+  data () {
+    return {
+      isActive: this.active || false
+    }
+  },
+  watch: {
+    active (value) {
+      this.isActive = value
+    }
+  }
+}
+</script>
+
+<style scoped>
+.mask {
+	position: absolute;
+	left: 0;
+	right: 0;
+	top: 0;
+	bottom: 0;
+	z-index: 3000;
+	transition: opacity .3s linear;
+}
+
+.full-screen {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+}
+
+.spinner {
+	position: absolute;
+	top: 50%;
+	left: 50%;
+	text-align: center;
+}
+
+.fade-enter-active, .fade-leave-active {
+  transition: opacity .3s;
+}
+.fade-enter, .fade-leave-to {
+  opacity: 0;
+}
+</style>

+ 0 - 45
lib/pageLoading.vue

@@ -1,45 +0,0 @@
-<template name="pageLoading">
-	<view class="pageLoading" v-if="pageLoading"  @tap.stop="stopFun" @touchmove.stop="stopFun">
-		<view class="loader">
-			<view class="loader-inner ball-scale-multiple">
-				<view></view>
-				<view></view>
-				<view></view>
-				<image src="http://static.youqianzhuan.vip/ll.png" mode="aspectFill"></image>
-			</view>
-		</view>
-		<view class="text-center text-hui" style="margin-top: -30rpx;">页面加载中</view>
-	</view>
-</template>
-<script>
-export default {
-	name: "pageLoading",
-	props: {
-		pageLoading: {
-			type    : Boolean,
-			default : false
-		},
-	},
-	methods:{
-		stopFun : function(){return false;}
-	}
-}
-</script>
-<style>
-
-	.pageLoading{width:100%; height:100%; background:#FFFFFF; position:fixed; z-index:99; left:0; top:0; bottom:0;}
-	.loader {display:flex;flex:0 1 auto;flex-direction:column;flex-grow:1;flex-shrink:0;flex-basis:60%;max-width:60%;height:500rpx;align-items:center;justify-content:center;}
-	.loader image {width:100rpx;height:100rpx;z-index:1000;position:absolute;left:100rpx;top:100rpx;opacity:1;margin:0;width:100rpx;}
-	@-webkit-keyframes ball-scale-multiple {0% {-webkit-transform:scale(0);transform:scale(0);opacity:0;}
-	5% {opacity:1;}
-	100% {-webkit-transform:scale(1);transform:scale(1);opacity:0;}
-	}
-	@keyframes ball-scale-multiple {0% {-webkit-transform:scale(0);transform:scale(0);opacity:0;}
-	5% {opacity:1;}
-	100% {-webkit-transform:scale(1);transform:scale(1);opacity:0;}
-	}
-	.ball-scale-multiple {position:relative;-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px);}
-	.ball-scale-multiple>view:nth-child(2) {-webkit-animation-delay:0.2s;animation-delay:0.2s;}
-	.ball-scale-multiple>view:nth-child(3) {-webkit-animation-delay:0.4s;animation-delay:0.4s;}
-	.ball-scale-multiple>view {background-color:#3c64c9;border-radius:100%;margin:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;left:60rpx;top:60rpx;opacity:0;margin:0;width:180rpx;height:180rpx;-webkit-animation:ball-scale-multiple 1s 0s linear infinite;animation:ball-scale-multiple 1s 0s linear infinite;}
-</style>

Разница между файлами не показана из-за своего большого размера
+ 0 - 21
lib/uni-load-more/uni-load-more.vue


+ 7 - 8
main.js

@@ -14,10 +14,11 @@ const app = new Vue({
 // 引入文件
 import Dever from './lib/dever'
 
-// 绑定全局的组件
-import pageLoading from "./lib/pageLoading.vue";
-Vue.component('pageLoading', pageLoading);
-Vue.prototype.pageLoading = true;
+// 绑定全局的组件
+import ourLoading from '@/lib/our-loading/our-loading.vue'
+Vue.component('ourLoading', ourLoading)
+Vue.prototype.pageLoading = true;
+Vue.prototype.pageLoadingText = '加载中...';
 
 // 绑定到 Vue 的实例上
 Vue.prototype.Dever = Dever;
@@ -33,8 +34,7 @@ var defaultConfig = {
 	'update_time' : false,
 };
 Vue.prototype.Dever.init('', Vue, defaultConfig);
-
-/*
+
 //自定义get的loading效果,设置全屏loading
 Vue.prototype.Dever.setGetLoading(function(self) {
 	self.vue.prototype.pageLoading = true;
@@ -49,8 +49,7 @@ Vue.prototype.Dever.setPostLoading(function(self) {
 }, function(self) {
 	self.btnFinish();
 	uni.hideLoading();
-});
-*/
+});
 
 //设置switchTab
 Vue.prototype.Dever.switchTab = ['index/index'];

+ 8 - 15
pages/dream/func/community.vue

@@ -9,7 +9,7 @@
 				<view class="margin-bottom" v-for="(v, k) in fetch.info" :key="k">
 					<y-DiaryItem :item="v" :cate_id="cate_id" :key="v.server_time"/>
 				</view>
-				<uni-load-more :status="more" @clickLoadMore="clickLoadMore" :contentText="contentText"></uni-load-more>
+				<graceLoading :loadingType="loadingType"></graceLoading>
 			</view>
 			<!-- 右下角按钮 -->
 			<y-Fab :bottom="20" :right="20" @click="showModal" v-if="button_show"/>
@@ -23,7 +23,6 @@
 
 <script>
 import publish from '@/lib/dever/components/publish.vue';
-import uniLoadMore from "@/lib/uni-load-more/uni-load-more.vue"
 export default {
 	name: "community",
 	props: {
@@ -53,8 +52,7 @@ export default {
 			},
 			cate_id : 0,
 			activeTab: 0,
-			contentText : {contentdown: "展开更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"},
-			more : 'more',
+			loadingType: 3,
 		};
 	},
 	mounted() {
@@ -79,16 +77,14 @@ export default {
 			if (!cate_id) {
 				cate_id = self.cate_id;
 			}
-			if (page != 1 && self.more == 'noMore') {
-				return;
-			}
+			if(page != 1 && self.loadingType != 3){return ;}
+			self.loadingType = 1;
 			self.cate_id = cate_id;
-			self.more = 'loading';
-			this.Dever.page([page, 'info'], this, 'app/community/?l=api.info', {cate_id:cate_id, type:this.type, type_id:this.type_id}, function(t) {
+			this.Dever.page([page, 'info'], this, 'app/community/?l=api.info', {cate_id:cate_id, type:this.type, type_id:this.type_id,noloading:1}, function(t) {
 				if (self.Dever.pageData.status == 1) {
-					self.more = 'more';
+					self.loadingType = 3;
 				} else {
-					self.more = 'noMore';
+					self.loadingType = 2;
 				}
 				if (page == 1 && !self.Dever.pageData.total) {
 					self.fetch.info = [];
@@ -111,12 +107,9 @@ export default {
 			this.show = false;
 			this.button_show = true;
 		},
-		clickLoadMore : function(e) {
-			this.getInfo(false, 2);
-		}
 	},
 	components:{
-		publish,uniLoadMore
+		publish
 	}
 }
 </script>

+ 176 - 127
pages/dream/func/share.vue

@@ -36,21 +36,30 @@
 			</button>
 			<!-- #endif -->
 			<button class="onSave" @click="showText">
-				<image src="@/static/demo/ic_pic.png" mode="aspectFit"></image>
-				<text>复制文案</text>
+				<view class="lg text-gray cuIcon-formfill" style="width:70rpx;height:70rpx"></view>
+				<text>文案</text>
+			</button>
+			
+			<button class="onSave" @click="showRes">
+				<view class="lg text-gray cuIcon-picfill" style="width:70rpx;height:70rpx"></view>
+				<text>素材</text>
 			</button>
 			
-			<button class="onSave" @click="onSaveImg">
-				<image src="@/static/demo/ic_weixin.png" mode="aspectFit"></image>
-				<text>生成海报</text>
+			<button class="onSave" @click="showPoster">
+				<view class="lg text-gray cuIcon-btn" style="width:70rpx;height:70rpx"></view>
+				<text>海报</text>
 			</button>
 		</view>
 		<!-- #ifdef H5 -->
 
 		
-		<graceDialog :isTitle="false" :show="image" closeBtnColor="#FFFFFF" v-on:closeDialog="closeImage">
-			<view slot="content" class="grace-img-in">
-				<image class="demo-img" :src="h5SaveImg" mode="widthFix"></image>
+		<graceDialog :isTitle="false" :title="`长按保存海报`" :isCloseBtn="false" :show="image" closeBtnColor="#FFFFFF" v-on:closeDialog="closeImage">
+			<view class="grace-img-in" slot="content">
+				<image class="demo-img" :src="poster" mode="widthFix"></image>
+			</view>
+			<view slot="btns" class="grace-space-between">
+				<text class="grace-dialog-buttons" @tap="closeImage">关闭</text>
+				<text class="grace-dialog-buttons grace-blue" @tap="closeImage">长按复制</text>
 			</view>
 		</graceDialog>
 		
@@ -67,6 +76,20 @@
 				<text class="grace-dialog-buttons grace-blue" @tap="textCopy">复制</text>
 			</view>
 		</graceDialog>
+		
+		<graceDialog :isTitle="true" :title="`素材大全`" :isCloseBtn="false" :show="res" v-on:closeDialog="closeRes">
+			<scroll-view :scroll-y="true" class="content2" slot="content">
+				<view v-for="(v, k) in fetch.pic" :key="k">
+					<view class="grace-img-in">
+						<image class="demo-img" :src="v" mode="widthFix"></image>
+					</view>
+				</view>
+			</scroll-view>
+			<view slot="btns" class="grace-space-between">
+				<text class="grace-dialog-buttons" @tap="closeRes">关闭</text>
+				<text class="grace-dialog-buttons grace-blue" @tap="closeRes">长按复制</text>
+			</view>
+		</graceDialog>
 
 		<!-- #endif -->
 	</view>
@@ -98,10 +121,12 @@ export default {
 		return {
 			swiperIndex: 0,
 			posterImgs: [],
-			h5SaveImg: "",
+			poster: "",
 			image : false,
 			text : false,
+			res : false,
 			text_index : 0,
+			text_top : 0,
 			fetch : {
 				info : {},
 				pic : [],
@@ -132,6 +157,12 @@ export default {
 		closeImage : function () {
 			this.image = false;
 		},
+		showRes : function () {
+			this.res = true;
+		},
+		closeRes : function () {
+			this.res = false;
+		},
 		showText : function () {
 			this.text = true;
 		},
@@ -183,131 +214,149 @@ export default {
 				ctx.fillRect(0, 0, 375, 673);
 				ctx.setFillStyle("#FFF");
 				ctx.fillRect(0, 0, 375, 673);
-				uni.downloadFile({
-					url: this.fetch.pic[this.swiperIndex],
+				
+				this.downPic(ctx, resolve, reject);
+			});
+		},
+		
+		//下载图片
+		downPic : function(ctx, resolve, reject) {
+			var self = this;
+			uni.downloadFile({
+				url: self.fetch.pic[self.swiperIndex],
+				success: (res) => {
+					if (res.statusCode === 200) {
+						uni.getImageInfo({
+							src: res.tempFilePath,
+							success: function (image) {
+								var img = self.Dever.getImage(image.width, image.height, 375, 375);
+								var x = (375 - img[0])/2;
+								var y = 0;
+								ctx.drawImage(res.tempFilePath, x, y, img[0], img[1]);
+								self.downQrcode(ctx, resolve, reject);
+							}
+						});
+					} else {
+						uni.hideLoading();
+						self.Dever.alert('海报制作失败,图片下载失败');
+					}
+				},
+				fail: (err) => {
+					uni.hideLoading();
+					self.Dever.alert('海报制作失败,图片下载失败');
+				}
+			});
+		},
+		
+		//下载二维码
+		downQrcode : function(ctx, resolve, reject) {
+			uni.downloadFile({
+				url: this.fetch.info.qrcode,
+				success: (res) => {
+					if (res.statusCode === 200) {
+						this.addPosterName(ctx);
+						this.addPosterPrice(ctx);
+						this.addPosterQrcode(ctx);
+						// 二维码
+						ctx.drawImage(res.tempFilePath, 238, this.text_top + 88, 120, 120);
+						
+						this.drawPoster(ctx, resolve, reject);
+					} else {
+						uni.hideLoading();
+						this.Dever.alert('海报制作失败,图片下载失败');
+					}
+				},
+				fail: (err) => {
+					uni.hideLoading();
+					this.Dever.alert('海报制作失败,图片下载失败');
+				}
+			});
+		},
+		
+		// 商品标题
+		addPosterName : function(ctx) {
+			ctx.setFontSize(21);
+			ctx.setFillStyle('#333');
+			let drawtextList = drawtext(this.fetch.info.name, 341);
+			this.text_top = 0;
+			drawtextList.forEach((item,index) => {
+				if(index < 2){
+					this.text_top = 380 + (index + 1) * 28;
+					ctx.fillText(item.content, 17, this.text_top);
+				}
+			});
+		},
+		
+		// 商品价格
+		addPosterPrice : function(ctx) {
+			if (this.fetch.info.price) {
+				ctx.setFontSize(26);
+				ctx.setFillStyle('#f00');
+				ctx.fillText(this.fetch.info.price, 17, this.text_top + 47);
+				// 商品门市价
+				ctx.setFontSize(18);
+				ctx.setFillStyle('#999');
+				let textLeft = 38 + (this.fetch.info.price.length * 13)
+				ctx.fillText(this.fetch.info.s_price, textLeft, this.text_top + 45);
+				// 商品门市价横线
+				ctx.beginPath();
+				ctx.setLineWidth(1);
+				ctx.moveTo(textLeft - 1, this.text_top + 38);
+				ctx.lineTo((textLeft + 5 + this.fetch.info.s_price.length * 9), this.text_top + 38);
+				ctx.setStrokeStyle('#999');
+				ctx.stroke();
+			}
+			
+			// 商品分割线
+			ctx.beginPath();
+			ctx.setLineWidth(1);
+			ctx.moveTo(17, this.text_top + 70);
+			ctx.lineTo(358, this.text_top + 70);
+			ctx.setStrokeStyle('#eee');
+			ctx.stroke();
+		},
+		
+		//二维码
+		addPosterQrcode : function(ctx) {
+			// 长按识别二维码访问
+			ctx.setFontSize(19);
+			ctx.setFillStyle('#333');
+			ctx.fillText("长按识别二维码访问", 17, this.text_top + 136);
+			// 平台名称
+			ctx.setFontSize(16);
+			ctx.setFillStyle('#999');
+			ctx.fillText(this.fetch.info.platform_name, 17, this.text_top + 170);
+		},
+		
+		// 绘制海报
+		drawPoster : function(ctx, resolve, reject) {
+			ctx.draw(true, () => {
+				// canvas画布转成图片并返回图片地址
+				uni.canvasToTempFilePath({
+					canvasId: 'poster',
+					width: 375,
+					height: 673,
+					quality : 1,
 					success: (res) => {
-						if (res.statusCode === 200) {
-							console.info(uni.getImageInfo({src:res.tempFilePath}));
-							uni.getImageInfo({
-								src: res.tempFilePath,
-								success: function (image) {
-									console.log(image.width);
-									console.log(image.height);
-								}
-							});
-							return;
-							ctx.drawImage(res.tempFilePath, 0, 0, 375, 375);
-							uni.downloadFile({
-								url: this.fetch.info.qrcode,
-								success: (res2) => {
-									if (res.statusCode === 200) {
-										// 商品标题
-										ctx.setFontSize(21);
-										ctx.setFillStyle('#333');
-										let drawtextList = drawtext(this.fetch.info.name, 341);
-										let textTop = 0;
-										drawtextList.forEach((item,index) => {
-											if(index < 2){
-												textTop = 380 + (index + 1) * 28;
-												ctx.fillText(item.content, 17, textTop);
-											}
-										});
-										// 商品价格
-										if (this.fetch.info.price) {
-											ctx.setFontSize(26);
-											ctx.setFillStyle('#f00');
-											ctx.fillText(this.fetch.info.price, 17, textTop + 47);
-											// 商品门市价
-											ctx.setFontSize(18);
-											ctx.setFillStyle('#999');
-											let textLeft = 38 + (this.fetch.info.price.length * 13)
-											ctx.fillText(this.fetch.info.s_price, textLeft, textTop + 45);
-											// 商品门市价横线
-											ctx.beginPath();
-											ctx.setLineWidth(1);
-											ctx.moveTo(textLeft - 1, textTop + 38);
-											ctx.lineTo((textLeft + 5 + this.fetch.info.s_price.length * 9), textTop + 38);
-											ctx.setStrokeStyle('#999');
-											ctx.stroke();
-											// 商品分割线
-											ctx.beginPath();
-											ctx.setLineWidth(1);
-											ctx.moveTo(17, textTop + 70);
-											ctx.lineTo(358, textTop + 70);
-											ctx.setStrokeStyle('#eee');
-											ctx.stroke();
-										}
-										
-										// 长按识别二维码访问
-										ctx.setFontSize(19);
-										ctx.setFillStyle('#333');
-										ctx.fillText("长按识别二维码访问", 17, textTop + 136);
-										// 平台名称
-										ctx.setFontSize(16);
-										ctx.setFillStyle('#999');
-										ctx.fillText(this.fetch.info.platform_name, 17, textTop + 170);
-										// 二维码
-										ctx.drawImage(res2.tempFilePath, 238, textTop + 88, 120, 120);
-										ctx.draw(true, () => {
-											// canvas画布转成图片并返回图片地址
-											uni.canvasToTempFilePath({
-												canvasId: 'poster',
-												width: 375,
-												height: 673,
-												quality : 1,
-												success: (res) => {
-													if(this.posterImgs[this.swiperIndex]){
-														this.posterImgs[this.swiperIndex].temporary = res.tempFilePath;
-													}else{
-														this.posterImgs[this.swiperIndex] = {
-															temporary: res.tempFilePath
-														};
-													}
-													console.log("海报制作成功!");
-													resolve(res.tempFilePath);
-												},
-												fail: () => {
-													uni.hideLoading();
-													reject();
-												}
-											})
-										});
-									} else {
-										uni.hideLoading();
-										uni.showToast({
-											title: '海报制作失败,图片下载失败',
-											icon: 'none'
-										});
-									}
-								},
-								fail: err => {
-									uni.hideLoading();
-									uni.showToast({
-										title: '海报制作失败,图片下载失败',
-										icon: 'none'
-									});
-								}
-							});
-						} else {
-							uni.hideLoading();
-							uni.showToast({
-								title: '海报制作失败,图片下载失败',
-								icon: 'none'
-							});
+						if(this.posterImgs[this.swiperIndex]){
+							this.posterImgs[this.swiperIndex].temporary = res.tempFilePath;
+						}else{
+							this.posterImgs[this.swiperIndex] = {
+								temporary: res.tempFilePath
+							};
 						}
+						resolve(res.tempFilePath);
 					},
-					fail: err => {
+					fail: () => {
 						uni.hideLoading();
-						uni.showToast({
-							title: '海报制作失败,图片下载失败',
-							icon: 'none'
-						});
+						reject();
 					}
-				});
+				})
 			});
 		},
+		
 		// 保存图片
-		async onSaveImg() {
+		async showPoster() {
 			let imgUrl = "";
 			if(this.posterImgs[this.swiperIndex] && this.posterImgs[this.swiperIndex].temporary){
 				imgUrl = await this.posterImgs[this.swiperIndex].temporary;
@@ -315,7 +364,7 @@ export default {
 				imgUrl = await this.createPoster();
 			}
 			// #ifdef H5
-			this.h5SaveImg = imgUrl;
+			this.poster = imgUrl;
 			this.showImage();
 			uni.hideLoading();
 			// #endif

+ 16 - 2
pages/dream/index.vue

@@ -1,6 +1,7 @@
 <template>
 	<gracePage :customHeader="false">
 		<view class="container" slot="gBody">
+			<ourLoading isFullScreen :active="pageLoading" :text="pageLoadingText" />
 			<view class="wrap2">
 				<graceBorderRadius :style="fetch.button.bgcolor" :radius="['20rpx','20rpx','20rpx','0rpx']">
 					<text class="demo2 grace-white" :style="fetch.button.color">{{fetch.info.name}}</text>
@@ -15,6 +16,9 @@
 			</swiper>
 			
 			<view class="btn-ctrls">
+				<view class="btn-title" v-if="fetch.info.uid > 0" style="display:none;">
+					<text class="grace-title-text">{{fetch.info.user.username}}创作</text>
+				</view>
 				
 				<view class="btn-wrapper space-between" v-if="fetch.button" :style="fetch.button.bgcolor">
 					<view class="button primary big" :style="fetch.button.color" v-if="fetch.button.name && fetch.button.name[0]" @click="goView">{{fetch.button.name[0]}}</view>
@@ -23,8 +27,8 @@
 						<view class="button primary big" :style="fetch.button.color" @click="goRanking">{{fetch.button.name[1]}}</view>
 					</block>
 				</view>
-				<view class='dots'>
-					<text :class="swiper.index == k ? 'cur' : ''" v-for="(v, k) in fetch.items" :key="k"></text>
+				<view class="dots">
+					<text :class="swiper.index == k ? 'cur' : ''" v-for="(v, k) in fetch.info.pic_bg" :key="k"></text>
 				</view>
 			</view>
 			<view v-if="buyState">
@@ -104,6 +108,16 @@ export default{
 }
 </script>
 <style>
+.btn-title {
+	text-align: center;
+	font-size: 24rpx;
+	font-weight: bold;
+	
+}
+.btn-title .grace-title-text {
+	border-bottom: 1px solid #bababa;
+	color:#F5F6F8;
+}
 .wrap2{
 	width:220rpx;
 	position: absolute;

+ 52 - 50
pages/dream/view.vue

@@ -1,54 +1,57 @@
 <template>
 	<gracePage :customHeader="false">
-		<view class="container" slot="gBody" v-if="fetch.items.length > 0">
-			<drawerPage :show="drawer.show ? 'left' : ''">
-				<view class="container_main" slot="links" @click="closeDrawer()">
-					<block v-if="login">
-						<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
-							<swiper-item v-for="(v, k) in fetch.items"  v-if="v.data" :key="k" >
-								<scroll-view scroll-y="true" scroll-x="true" class="scroll-height" @scrolltolower="bottomCall">
-									<dream ref="dream" @showDrawer="showDrawer" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
-								</scroll-view>
-							</swiper-item>
-						</swiper>
-					</block>
-					<block v-if="!login">
-						<dream ref="dream" @showDrawer="showDrawer" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
-					</block>
-				</view>
-			</drawerPage>
-			
-			
-			<drawerWindow v-for="(v, k) in drawer.item" :key="k" :type="k" :show="v.show" :zIndex="v.index" padding="v.padding" :top="v.top" :direction="v.direction" :width="v.width" v-on:closeDrawer="closeDrawer(k)" v-on:bottomFunc="bottomFunc">
-				<view slot="links">
-					<block v-if="k == 'cate'">
-						<cate ref="cate" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :page_id="fetch.page_id"  @getCate="getCate"></cate>
-					</block>
-					
-					<block v-if="k == 'community'">
-						<community ref="community" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></community>
-					</block>
-					
-					<block v-if="k == 'times'">
-						<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :times="fetch.times_id" @getTimes="getTimes"></times>
-					</block>
-					
-					<block v-if="k == 'shop'">
-						<shop ref="shop" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></shop>
-					</block>
-					
-					<block v-if="k == 'my'">
-						<my ref="my" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></my>
-					</block>
-					
-					<block v-if="k == 'share'">
-						<share ref="share" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :type="type"></share>
-					</block>
-				</view>
-			</drawerWindow>
-			
-			<y-Fab v-if="!drawer.show && fetch.user.avatar && login" :bottom="20" :right="20" :btnList="drawer.button" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
-			<y-Fab v-if="!login" :bottom="20" :right="20" @click="goHome" :text="`首页`"></y-Fab>
+		<view class="container" slot="gBody">
+			<ourLoading isFullScreen :active="pageLoading" :text="pageLoadingText" />
+			<view v-if="fetch.items.length > 0">
+				<drawerPage :show="drawer.show ? 'left' : ''">
+					<view class="container_main" slot="links" @click="closeDrawer()">
+						<block v-if="login">
+							<swiper class="swiper" @change="change" :circular="swiper.circular" :current="fetch.index">
+								<swiper-item v-for="(v, k) in fetch.items"  v-if="v.data" :key="k" >
+									<scroll-view scroll-y="true" scroll-x="true" class="scroll-height" @scrolltolower="bottomCall">
+										<dream ref="dream" @showDrawer="showDrawer" :index="k" :item="v" :control="control" :bottom="bottom" class="item"></dream>
+									</scroll-view>
+								</swiper-item>
+							</swiper>
+						</block>
+						<block v-if="!login">
+							<dream ref="dream" @showDrawer="showDrawer" :index="fetch.index" :item="fetch.items[fetch.index]" :control="control" :bottom="bottom" class="item"></dream>
+						</block>
+					</view>
+				</drawerPage>
+				
+				
+				<drawerWindow v-for="(v, k) in drawer.item" :key="k" :type="k" :show="v.show" :zIndex="v.index" padding="v.padding" :top="v.top" :direction="v.direction" :width="v.width" v-on:closeDrawer="closeDrawer(k)" v-on:bottomFunc="bottomFunc">
+					<view slot="links">
+						<block v-if="k == 'cate'">
+							<cate ref="cate" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :page_id="fetch.page_id"  @getCate="getCate"></cate>
+						</block>
+						
+						<block v-if="k == 'community'">
+							<community ref="community" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></community>
+						</block>
+						
+						<block v-if="k == 'times'">
+							<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :times="fetch.times_id" @getTimes="getTimes"></times>
+						</block>
+						
+						<block v-if="k == 'shop'">
+							<shop ref="shop" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></shop>
+						</block>
+						
+						<block v-if="k == 'my'">
+							<my ref="my" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param"></my>
+						</block>
+						
+						<block v-if="k == 'share'">
+							<share ref="share" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :code="code" :width="v.width" :param="v.param" :type="type"></share>
+						</block>
+					</view>
+				</drawerWindow>
+				
+				<y-Fab v-if="!drawer.show && fetch.user.avatar && login" :bottom="20" :right="20" :btnList="drawer.button" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
+				<y-Fab v-if="!login" :bottom="20" :right="20" @click="goHome" :text="`首页`"></y-Fab>
+			</view>
 		</view>
 	</gracePage>
 </template>
@@ -62,7 +65,6 @@ import share from "@/pages/dream/func/share.vue";
 import dream from "@/pages/dream/view/dream.vue";
 import drawerPage from "@/lib/dever/components/drawerPage.vue";
 import drawerWindow from "@/lib/dever/components/drawerWindow.vue";
-var graceRichText = require("@/lib/graceUI/jsTools/richText.js");
 export default{
 	data() {
 		return {

+ 14 - 1
pages/dream/view/cover.vue

@@ -1,6 +1,12 @@
 <template name="cover">
 	<view slot="gBody" class="grace-body">
 		
+		<view class="grace-title grace-margin-top">
+			<text class="grace-title-icon grace-icons icon-article grace-blue"></text>
+			<text class="grace-title-text grace-black">{{item.parent_name}}</text>
+			<text class="grace-gray grace-black">{{item.username}}创作</text>
+		</view>
+					
 		<view class="grace-line-title grace-margin-top">
 			<view class="grace-line-title-line"></view>
 			<text class="grace-line-title-text grace-blue">{{item.name}}</text>
@@ -19,7 +25,14 @@
 				<text class="grace-black" style="margin:0 20rpx;">{{item.times_parent}} {{item.times}}</text>
 				<text class="grace-icons icon-spliter"></text>
 			</view>
-			<view class="grace-text-small grace-text-center">{{item.desc}}</view>
+			<view class="grace-text grace-text-center">{{item.desc}}</view>
+		</view>
+		
+		<view class="grace-margin-top">
+			<view class="grace-flex-center grace-flex-vcenter">
+				<text class="grace-gray grace-text-small grace-text-center">{{item.copyright}}</text>
+				<text class="grace-icons grace-text-small icon-arrow-right grace-gray"></text>
+			</view>
 		</view>
 		
 		<y-Fab :bottom="20" :right="140" @click="showDrawer" bgColor="#e55d52" text="更多"></y-Fab>

+ 1 - 1
pages/dream/view/product.vue

@@ -129,7 +129,7 @@ export default {
 			api : 'app/community/?l=api.addComment',
 			key : 'content/product',
 			// 切换导航
-			navItems : ['商品详情', '全网评价'],
+			navItems : ['商品详情', '最新评价'],
 			active:0,
 			// 购买选择属性层展示
 			attrIsShow : false,

Некоторые файлы не были показаны из-за большого количества измененных файлов