dever 5 yıl önce
ebeveyn
işleme
21edda8551
2 değiştirilmiş dosya ile 16 ekleme ve 6 silme
  1. 13 5
      pages/dream/func/share.vue
  2. 3 1
      pages/dream/view.vue

+ 13 - 5
pages/dream/func/share.vue

@@ -77,12 +77,13 @@
 			</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>
+		<graceDialog :isTitle="true" :title="`图片素材`" :isCloseBtn="false" :show="res" v-on:closeDialog="closeRes">
+			<scroll-view :scroll-y="true" class="content3" slot="content">
+				<view class="grid flex-sub padding-lr col-3 grid-square">
+					<view @tap.stop @tap="Dever.viewPic(fetch.pic, child)" class="bg-img" :style="{backgroundImage: 'url('+child+')'}"
+					 v-for="(child, idx) in fetch.pic" :key="idx">
 					</view>
+					
 				</view>
 			</scroll-view>
 			<view slot="btns" class="grace-space-between">
@@ -580,6 +581,13 @@ function drawtext(text, maxWidth) {
 </script>
 
 <style lang="scss" scoped>
+.content3 {
+	padding:30rpx;
+	line-height:50rpx;
+	font-size:26rpx;
+	height:675rpx;
+	color:#000000;
+}
 .content2 {
 	padding:30rpx; 
 	line-height:50rpx;

+ 3 - 1
pages/dream/view.vue

@@ -191,7 +191,8 @@ export default{
 		view : function() {
 			this.Dever.location('dream/view?id=1');
 		},
-		initDrawer : function() {
+		initDrawer : function() {
+			this.getContentId();
 			var i = '';
 			this.drawer.button = [];
 			for (i in this.drawer.item) {
@@ -205,6 +206,7 @@ export default{
 			var self = this;
 			self.drawer.item = {};
 			this.Dever.get(this, 'app/collection/?l=api.getContent', {code:this.Dever.config.code}, function(t) {
+				self.swiper.index = parseInt(t.index);
 				self.record();
 				if (t && t['func']) {
 					self.drawer.item = t['func'];