wzz преди 4 години
родител
ревизия
ce2be58fe3
променени са 3 файла, в които са добавени 24 реда и са изтрити 8 реда
  1. 14 3
      pages/index/index.vue
  2. 9 4
      pages/index/record/record.vue
  3. 1 1
      pages/index/upload/upload.vue

+ 14 - 3
pages/index/index.vue

@@ -62,9 +62,20 @@ export default {
   },
   methods: {
 	goUpload(){
-		uni.navigateTo({
-			url: "/pages/index/upload/upload",
-		})
+		let that = this;
+		if(!that.isAuth){
+			  uni.showToast({
+				title: "您还没有授权",
+				duration: 2500,
+				icon: "none",
+			  });
+			  return;
+		}else {
+			uni.navigateTo({
+				url: "/pages/index/upload/upload",
+			})
+		}
+	
 	},
 	getUserInfo() {
 	    let md5Sign = md5(

+ 9 - 4
pages/index/record/record.vue

@@ -13,7 +13,7 @@
         <!-- <span class="label">图片:</span> -->
         <view class="flex-box">
           <view v-if="item.attach_list.length == 0">-</view>
-          <image :src="globalUrl + item1" v-for="(item1,index) in item.attach_list" :key="index" mode="aspectFit" @click="showlarge(item1)"/>
+          <image :src="globalUrl + item1" v-for="(item1,index) in item.attach_list" :key="index" mode="aspectFit" @click="showlarge(item.attach_list,index)"/>
         </view>
       </view>
     </view>
@@ -57,10 +57,15 @@ export default {
     this.getRecordList();
   },
   methods: {
-	showlarge(src){
-		src = this.globalUrl + src
+	showlarge(list,index){
+		//src = this.globalUrl + src
+	   let photoList = list.map((item)=>{
+			return getApp().globalData.shareUrl + item
+		})
+		console.log(photoList)
 		uni.previewImage({
-		  urls: [src],
+		  current:index,
+		  urls: photoList,
 		  longPressActions: {
 		    itemList: ["发送给朋友", "保存图片"],
 		    success: function (data) {},

+ 1 - 1
pages/index/upload/upload.vue

@@ -3,7 +3,7 @@
     <view class="supplyInfo">
       <view class="flex">
         <label>输入文本:</label>
-        <textarea v-model="msg" class="area card"></textarea>
+        <textarea v-model="msg" class="area card" maxlength="-1"></textarea>
       </view>
       <view class="update_photo">
         <view class="title"></view>