roose 4 년 전
부모
커밋
151a9329b0
6개의 변경된 파일41개의 추가작업 그리고 24개의 파일을 삭제
  1. 1 1
      pages/finishInfo/finishInfo.js
  2. 23 16
      pages/love/love.js
  3. 2 1
      pages/love/love.wxml
  4. 2 0
      pages/visitandinfo/visitandinfo.js
  5. 7 6
      pages/visitandinfo/visitandinfo.wxml
  6. 6 0
      pages/visitandinfo/visitandinfo.wxss

+ 1 - 1
pages/finishInfo/finishInfo.js

@@ -102,7 +102,7 @@ Page({
             wx.chooseImage({
               count: 1, // 默认9
               sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
-              sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+              sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
               success: function (res) {
                 // console.log('拍照获取图片路径',res);
                 // 读取本地文件内容

+ 23 - 16
pages/love/love.js

@@ -9,7 +9,11 @@ Page({
     lat: '', // 纬度
     visitLocation: '',
     info: '', //老人锕
-    imgPath: [],
+    imgPath: [{
+
+    }, {
+
+    }],
     isTrue: true,
     index: 0,
     visitPhoto: '',
@@ -87,6 +91,8 @@ Page({
                 that.setData({
                   imgPath: that.data.imgPath
                 })
+                console.log(that.data.imgPath, "打印下招聘的路径锕");
+
                 that.data.visitPhoto = that.data.imgPath.join(',')
                 if (that.data.imgPath.length == 2) {
                   that.setData({
@@ -110,7 +116,7 @@ Page({
     this.setData({
       visitPhoto: aa,
     })
-    if (this.data.imgPath.length == 0) {
+    if (this.data.imgPath.length == 0 || this.data.imgPath.length == 1) {
       this.setData({
         isTrue: true
       })
@@ -146,21 +152,22 @@ Page({
         visitLocation: this.data.visitLocation
       }
 
-      wx.request({
-        url: app.globalData.publicUrl + '/visit/doFace3',
-        method: "POST",
-        header: {
-          appletsId: wx.getStorageSync('openId')
-        },
-        data: {
-          infoId: this.data.infoId,
-          visitPhoto: this.data.visitPhoto,
-        },
-        success: (res) => {
-          console.log(res);
-        }
-      })
+      // wx.request({
+      //   url: app.globalData.publicUrl + '/visit/doFace3',
+      //   method: "POST",
+      //   header: {
+      //     appletsId: wx.getStorageSync('openId')
+      //   },
+      //   data: {
+      //     infoId: this.data.infoId,
+      //     visitPhoto: this.data.visitPhoto,
+      //   },
+      //   success: (res) => {
+      //     console.log(res);
+      //   }
+      // })
 
+      // 提交的接口 
 
       // wx.request({
       //   url: app.globalData.publicUrl + '/visit/add',

+ 2 - 1
pages/love/love.wxml

@@ -1,3 +1,4 @@
+<wxs module="urls" src="../../utils/photoUrl.wxs"></wxs>
 <view class="home">
 	<view class="title">探访日期:<text>{{time}}</text></view>
 	<view class="title">探访位置</view>
@@ -57,7 +58,7 @@
 		<view  style=" border: 1rpx solid #5398C8; color: #fff;  padding-left: 10rpx;background-color: #429EFF; font-size: 26rpx;width: 220rpx;margin-top: 40rpx; margin-bottom: 40rpx;" bindtap="zhaopian" wx:if='{{isTrue}}'>请上传含面部照片</view>
 		<view style="  display: flex;">
 			<view wx:for='{{imgPath}}' class="img-box">
-			<image class="image"  src="http://info.windd.cn:8080/test{{imgPath}}"  mode='scaleToFill' bindtap="previewImg"></image>
+			<image class="image"  src="	{{urls.url(item)}}"  mode='scaleToFill' bindtap="previewImg"></image>
 			<van-icon size='23' name="clear" class="close" data-index="{{index}}" bindtap="closeImage"/>
 		</view>
 		</view>

+ 2 - 0
pages/visitandinfo/visitandinfo.js

@@ -94,6 +94,8 @@ Page({
   visitJilu(e) {
     console.log(e.currentTarget.dataset.infos, "000");
     let photos = e.currentTarget.dataset.infos.visitPhoto.split(",");
+    console.log(photos,"打印下锕");
+    
     this.setData({
       show: true,
       infos: e.currentTarget.dataset.infos,

+ 7 - 6
pages/visitandinfo/visitandinfo.wxml

@@ -1,6 +1,7 @@
 	<wxs module="time" src="../../utils/time.wxs"></wxs>
 	<wxs module="subqian" src="../../utils/subqian.wxs"></wxs>
 	<wxs module="subhou" src="../../utils/subhou.wxs"></wxs>
+	<wxs module="urls" src="../../utils/photoUrl.wxs"></wxs>
 	<view>
 		<view id='tabs'>
 			<view class='tabs-box'>
@@ -99,18 +100,18 @@
 								<view class="tanfang">
 									{{infos.visitMessage}}
 								</view>
-								<view wx:for='{{photos}}'>
-									<view class="tanfang">
-										照片{{index+1}}
+								<view class="pop-boxs">
+									<view wx:for='{{photos}}'>
+										<view class="tanfang">
+											照片{{index+1}}
+										</view>
+										<image src="{{urls.url(item)}}" style="width: 200rpx; height: 200rpx;margin-top: 4%" />
 									</view>
-									<image :src="'https://info.windd.cn/collection/'+{{item}}" style="width: 150px; height: 150px;margin-top: 4%" />
 								</view>
 
 							</view>
 						</view>
 					</van-overlay>
-
-
 				</view>
 				<view wx:if='{{currentTabIndex != 1}}' class="delete-box" bindtap="deletes">删除</view>
 			</view>

+ 6 - 0
pages/visitandinfo/visitandinfo.wxss

@@ -191,3 +191,9 @@ checkbox .wx-checkbox-input {
   text-align: center;
   height: 100%;
 }
+.pop-boxs {
+  display: flex;
+}
+.pop-boxs >view:last-child {
+  margin-left: 40rpx;
+}