|
@@ -10,19 +10,17 @@
|
|
|
cancelButton="none"
|
|
|
:focus="false"
|
|
|
bgColor="#fff"
|
|
|
- @confirm="getData($event.value)"
|
|
|
+ @confirm="getEntList($event.value)"
|
|
|
@clear="query.content = ''"
|
|
|
>
|
|
|
</uni-search-bar>
|
|
|
- <button class="search-btn" @click.stop="getData" :loading="loading">搜索</button>
|
|
|
+ <button class="search-btn" @click.stop="getEntList" :loading="loading">搜索</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-popup ref="popup" type="bottom" background-color="#fff">
|
|
|
- <uni-card v-for="(item, index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
|
|
|
+ <uni-card v-for="item in entList" :key="item.id" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
|
|
|
<view class="d-flex align-center">
|
|
|
- <view @click="preview(item.url)" style="flex: 1;">
|
|
|
- <view class="font-size-14" style="font-weight: bold; margin: 15rpx 0; color: #777;">{{ item.title }}</view>
|
|
|
- </view>
|
|
|
+ 123
|
|
|
</view>
|
|
|
</uni-card>
|
|
|
</uni-popup>
|
|
@@ -40,12 +38,21 @@ import {
|
|
|
const popup = ref()
|
|
|
const loading = ref(false)
|
|
|
const name = ref('')
|
|
|
-const list = ref()
|
|
|
-const getData = async () => {
|
|
|
+const entList = ref([])
|
|
|
+// 获取企业列表
|
|
|
+const getEntList = async (name) => {
|
|
|
+ // if (name) name.value = name
|
|
|
+ // if (!name) {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: '请输入公司关键字',
|
|
|
+ // icon: 'none'
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
try {
|
|
|
loading.value = true
|
|
|
const res = await getBlockEnterpriseList()
|
|
|
- list.value = res?.data || []
|
|
|
+ entList.value = res?.data?.list || []
|
|
|
popup.value.open()
|
|
|
} catch (error) {
|
|
|
uni.showToast({
|
|
@@ -56,6 +63,21 @@ const getData = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const dataList = ref([])
|
|
|
+const getData = async () => {
|
|
|
+ try {
|
|
|
+ const res = await getBlockEnterpriseList()
|
|
|
+ dataList.value = res?.data?.list || []
|
|
|
+ popup.value.open()
|
|
|
+ } catch (error) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '查询数据失败,请重试',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+getData()
|
|
|
+
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.stick {
|