huangmp 4 éve
szülő
commit
2ecc9ef759
2 módosított fájl, 26 hozzáadás és 22 törlés
  1. 23 20
      pages/demo/demo6.vue
  2. 3 2
      pages/guest/guest_form.vue

+ 23 - 20
pages/demo/demo6.vue

@@ -1,31 +1,34 @@
 <template>
 	<view class="">
 		<button @click="change">修改</button>
-		<view class="margin-left-50" v-for="(item,index) in list" :key="index">
-			<text>{{item.name}}</text>
-		</view>
+		<view>{{list}}</view>
 	</view>
 </template>
 
 <script>
-export default {
-	name: '',
-	data() {
-		return {
-			list:[{
-				id:1,
-				name:'a'
-			}]
-		};
-	},
-	methods:{
-		change(){
-			this.list[0].name='b'
+	export default {
+		name: '',
+		data() {
+			return {
+				list: [{
+						id: 1,
+						name: "用户中心"
+					},
+					{
+						id: 2,
+						name: "首页"
+					}
+				]
+			};
+		},
+		methods: {
+			change() {
+				this.obj.name.id = "2"
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-	
-</style>
+
+</style>

+ 3 - 2
pages/guest/guest_form.vue

@@ -262,6 +262,7 @@
 				this.loading = false
 				return
 			}
+			
 			this.id = options.id
 			this.doorNeedAudit = options.doorNeedAudit
 			this.memberId = options.memberId
@@ -383,7 +384,8 @@
 					return
 				}
 				//有记录,就判断审核状态
-				that.data = guestRes.data.data[0]
+				this.data=guestRes.data.data[0]
+				this.guestRecordId=this.data.id
 				this.data.guestPosition = that.data.residentialName + "," +
 					that.data.buildingName + "," + that.data.unitName + "," +
 					that.data.roomName
@@ -423,7 +425,6 @@
 					openId: this.openId
 				}
 				let guestRes = await this.$http.guestRecordsList(guestParams)
-				this.guestRecordId=guestRes.data.data[0].id
 				return guestRes
 			},
 			submit() {