From 1340ce90ce3405315ed18954d1c581e053b63ac5 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 30 十月 2023 16:09:49 +0800
Subject: [PATCH] #
---
pages/tzsk/pakin/locPick.vue | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/pages/tzsk/pakin/locPick.vue b/pages/tzsk/pakin/locPick.vue
index 7dfa4da..21c858a 100644
--- a/pages/tzsk/pakin/locPick.vue
+++ b/pages/tzsk/pakin/locPick.vue
@@ -26,15 +26,15 @@
</view>
<view class="sub2" v-for="it in sub.children" style="margin-left: 1em;" v-show="sub.switch">
- <view :class="it.key" class="title sub-title" >{{it.title}}</view>
- <view :class="it.key" class="name" v-show="it.key == 'user_id'" @click="back()">
+ <!-- <view :class="it.key" class="title sub-title" >{{it.title}}</view> -->
+ <view :class="it.key" class="locarea name" @click="chose(it)">
<view>{{it.title}}</view>
</view>
</view>
</view>
</view>
</view>
-
+ <view style="height: 100rpx;"></view>
</view>
</template>
@@ -63,18 +63,18 @@
// console.log(res.data[0].children);
if (res.data[0].children[0]) {
for (let k of res.data[0].children) {
- console.log(k);
+ // console.log(k);
if (k.children && k.children.length > 0) {
for (let i of k.children) {
i['switch'] = true
- console.log(i);
+ // console.log(i);
}
}
// console.log(k);
k['switch'] = true
_this.tree.push(k)
}
- console.log(_this.tree);
+ // console.log(_this.tree);
} else {
this.tree.push(res.data[0])
}
@@ -85,14 +85,14 @@
let res = await user.getUserTree()
if (res.code === 200) {
this.tree = []
- console.log(res.data[0]);
+ // console.log(res.data[0]);
if (res.data[0].children) {
for (let k of res.data[0].children) {
if (k.children && k.children.length > 0) {
for (let i of k.children) {
i['switch'] = true
- console.log(i);
+ // console.log(i);
}
}
// console.log(k);
@@ -108,7 +108,7 @@
console.log(this.tree);
},
switchbtn(item) {
- console.log(item);
+ // console.log(item);
item.switch = item.switch ? false : true
},
open(e) {
@@ -133,7 +133,12 @@
uni.navigateBack({
})
+ },
+ chose(data) {
+ console.log(data);
+ this.tree = []
}
+
}
}
</script>
@@ -167,5 +172,7 @@
justify-content: space-between;
align-items: center;
}
-
+ .locarea:active {
+ background-color: #55aa7f;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1