From 786dc15053c3f4ea9552ccd8878f8bb2bd0e377c Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Thu, 19 Nov 2020 12:23:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=AE=B6=E5=BA=AD=E6=88=90?=
=?UTF-8?q?=E5=91=98=E5=A4=B4=E5=83=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/family/family.vue | 58 +++++++++++++++++++++++++++++++--
pages/familyList/familyList.vue | 2 +-
2 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/pages/family/family.vue b/pages/family/family.vue
index 2e51a1f..4fffbaa 100644
--- a/pages/family/family.vue
+++ b/pages/family/family.vue
@@ -31,6 +31,31 @@
+
+ 相关图片
+
+
+
+ 图片上传
+
+
+ {{imgList.length}}/1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -45,6 +70,7 @@
// pages/enterCommunity/enterCommunity.js
const context = require("../../context/Java110Context.js");
const constant = context.constant;
+ const factory = context.factory;
export default {
data() {
@@ -66,7 +92,9 @@
"second": 60,
"btnDisabled":false,
"btnValue": "验证码",
- "msgCode":''
+ "msgCode":'',
+ imgList: [],
+ photos:[]
};
},
@@ -123,6 +151,9 @@
"idCard": this.idCard,
"msgCode":this.msgCode,
}
+ if(this.photos.length> 0){
+ obj.ownerPhoto = this.photos[0];
+ }
let msg = "";
if (obj.ownerId == "") {
msg = "请填写业主";
@@ -259,7 +290,30 @@
promise.then((setTimer) => {
clearInterval(setTimer)
})
- }
+ },
+ deleteImage: function(e) {
+ console.log(e);
+ let imageArr = this.$data.imgList;
+ imageArr.splice(e, 1);
+ },
+ ChooseImage: function(e) {
+ let that = this;
+ wx.chooseImage({
+ count: 4, //默认9
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album','camera'], //从相册选择
+ success: (res) => {
+ console.log(res);
+ that.$data.imgList.push(res.tempFilePaths[0]);
+ let _base64Photo = '';
+ factory.base64.urlTobase64(res.tempFilePaths[0]).then(function(_res) {
+ _base64Photo = _res;
+ console.log('base64', _base64Photo);
+ that.photos.push(_base64Photo);
+ });
+ }
+ });
+ },
}
};
diff --git a/pages/familyList/familyList.vue b/pages/familyList/familyList.vue
index 5ef62d5..cc28e0a 100644
--- a/pages/familyList/familyList.vue
+++ b/pages/familyList/familyList.vue
@@ -60,7 +60,7 @@
components: {
noDataPage
},
- onLoad: function() {
+ onLoad: function(options) {
context.onLoad(options);
},
onShow: function() {