|
@@ -6,7 +6,7 @@
|
|
<van-search
|
|
<van-search
|
|
:background="background"
|
|
:background="background"
|
|
clearable
|
|
clearable
|
|
- @update:model-value="upsearch"
|
|
|
|
|
|
+ v-model="search"
|
|
shape="round"
|
|
shape="round"
|
|
placeholder="请输入搜索关键词"
|
|
placeholder="请输入搜索关键词"
|
|
/>
|
|
/>
|
|
@@ -182,7 +182,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, reactive } from 'vue';
|
|
|
|
|
|
+import { ref, reactive, watch } from 'vue';
|
|
import { showDialog, showConfirmDialog, showToast } from 'vant';
|
|
import { showDialog, showConfirmDialog, showToast } from 'vant';
|
|
import {
|
|
import {
|
|
getEnrollList,
|
|
getEnrollList,
|
|
@@ -196,16 +196,6 @@ import {
|
|
import Shanshipin from '@/components/shanshipin.vue';
|
|
import Shanshipin from '@/components/shanshipin.vue';
|
|
const theme = '#38379f';
|
|
const theme = '#38379f';
|
|
const background = '#e0f2fa';
|
|
const background = '#e0f2fa';
|
|
-// import {
|
|
|
|
-// isIpad,
|
|
|
|
-// isIpod,
|
|
|
|
-// isIphone,
|
|
|
|
-// } from '../../utils/isTerminal';
|
|
|
|
-/**
|
|
|
|
- * window.$originData.orginParames.title 页面标题
|
|
|
|
- * window.$originData.orginParames.parameters 固定参数值
|
|
|
|
- * window.$originData.urlParames url参数
|
|
|
|
- */
|
|
|
|
const w = window.$originData.orginParames.availWidth || 0;
|
|
const w = window.$originData.orginParames.availWidth || 0;
|
|
const operateId = window.$originData.orginParames.operateId;
|
|
const operateId = window.$originData.orginParames.operateId;
|
|
const width = (w - 16) / 2;
|
|
const width = (w - 16) / 2;
|
|
@@ -222,6 +212,7 @@ const config = reactive({
|
|
times: -1,
|
|
times: -1,
|
|
isShanShiPin: window.$shanshipin.UserId,
|
|
isShanShiPin: window.$shanshipin.UserId,
|
|
});
|
|
});
|
|
|
|
+const search = ref('');
|
|
const t = config.isShanShiPin ? 5 : 1;
|
|
const t = config.isShanShiPin ? 5 : 1;
|
|
const phone =
|
|
const phone =
|
|
window.$shanshipin.Phone && window.$shanshipin.Phone != 0
|
|
window.$shanshipin.Phone && window.$shanshipin.Phone != 0
|
|
@@ -278,10 +269,11 @@ const getRankList = Call => {
|
|
};
|
|
};
|
|
|
|
|
|
let time = null;
|
|
let time = null;
|
|
-const upsearch = res => {
|
|
|
|
|
|
+watch(search, res => {
|
|
|
|
+ console.log(res);
|
|
if (time) clearTimeout(time);
|
|
if (time) clearTimeout(time);
|
|
time = setTimeout(() => {
|
|
time = setTimeout(() => {
|
|
- const rex = new RegExp(res);
|
|
|
|
|
|
+ const rex = res ? new RegExp(res) : /[.\n]*/;
|
|
for (let i = 0; i < list.value.length; i++) {
|
|
for (let i = 0; i < list.value.length; i++) {
|
|
const v = list.value[i];
|
|
const v = list.value[i];
|
|
list.value[i].noShow = !rex.test(v.name);
|
|
list.value[i].noShow = !rex.test(v.name);
|
|
@@ -293,7 +285,7 @@ const upsearch = res => {
|
|
clearTimeout(time);
|
|
clearTimeout(time);
|
|
time = null;
|
|
time = null;
|
|
}, 200);
|
|
}, 200);
|
|
-};
|
|
|
|
|
|
+});
|
|
|
|
|
|
const getCode = () => {
|
|
const getCode = () => {
|
|
// 获取验证码
|
|
// 获取验证码
|