Merge branch 'main' of https://git.zdool.com/xs/yxdt/h5 into main

This commit is contained in:
liuyalei 2023-12-18 10:46:21 +08:00
commit 1bf4b4ce12
4 changed files with 125 additions and 84 deletions

View File

@ -39,42 +39,6 @@ const quanwen = () => {
min-height: 100%; min-height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.noDevelop {
display: inline-block;
width: 231px;
height: 44px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 15px;
font-weight: 500;
line-height: 22px;
position: relative;
}
a {
display: inline-block;
width: 35px;
position: absolute;
bottom: 0;
right: 0;
background-color: #fff;
color: #87ceeb;
font-size: 15px;
}
.noDevelop::after {
content: "...";
width: 16px;
position: absolute;
bottom: 0;
right: 35px;
background-color: #fff;
}
.yesDevelop { .yesDevelop {
display: inline-block; display: inline-block;
// width: 231px; // width: 231px;
@ -106,6 +70,7 @@ const quanwen = () => {
width: 12px; width: 12px;
height: 12px; height: 12px;
margin-right: 4px; margin-right: 4px;
margin-left: 8px;
} }
} }
} }

View File

@ -11,7 +11,7 @@
</div> </div>
</div> </div>
</div> </div>
<div style="display: flex"> <div>
<!-- <div v-for="(item, i) in data" :key="item"> <!-- <div v-for="(item, i) in data" :key="item">
<div class="tabsList"> <div class="tabsList">
<span <span
@ -46,15 +46,10 @@
<div :class="[chooseId == item.id ? 'numa' : '']"> <div :class="[chooseId == item.id ? 'numa' : '']">
{{ item.title }} {{ item.title }}
</div> </div>
<img <img src="@/assets/xia.png" v-if="chooseId == item.id" />
src="@/assets/xia.png"
alt=""
style="width: 48px; height: 5px; margin-bottom: 10px"
v-if="chooseId == item.id"
/>
</div> </div>
</div> </div>
<img src="@/assets/list.png" alt="" /> <img src="@/assets/list.png"/>
</div> </div>
<div class="titles"> <div class="titles">
<span <span
@ -83,7 +78,11 @@
<img :src="f2" v-for="it in 5" /> <img :src="f2" v-for="it in 5" />
</div> </div>
</span> </span>
<span class="linetoprate">{{ data.rate }}</span> <div>
<span v-if="data.rate" class="linetoprate">{{
data.rate
}}</span>
</div>
</div> </div>
</div> </div>
<div class="linebot"> <div class="linebot">
@ -287,11 +286,11 @@ const data = reactive({
{ {
id: 2, id: 2,
imgurl: b2, imgurl: b2,
title: "象山老年大学", title: "丹西街道老年大学",
address: "宁波市象山县广场路39号", address: "宁波市象山县新华路340号",
Scoring: 1, Scoring: 4,
rate: "职业学校", rate: "",
comment: "老师非常耐心,课程也很丰富!", comment: "学校环境很好,氛围浓厚。",
}, },
// { // {
// id: 2, // id: 2,
@ -388,7 +387,7 @@ const clickFun = (index, name) => {
const chooseId = ref("1"); const chooseId = ref("1");
const choose = (index, name) => { const choose = (index, name) => {
console.log(index, name); console.log(index, name);
// data.mainLists = []; // data.mainLists = [];
// data.list = []; // data.list = [];
switch (name) { switch (name) {
case "老有康养": case "老有康养":
@ -476,8 +475,8 @@ const choose = (index, name) => {
.mian { .mian {
min-height: 100vh; min-height: 100vh;
color: #000; color: #000;
margin: 0 16px; // margin: 0 16px;
margin: 0 0 0 16px; // margin: 0 0 0 16px;
.title { .title {
// width: 72px; // width: 72px;
// height: 16px; // height: 16px;
@ -487,12 +486,14 @@ const choose = (index, name) => {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 16px; line-height: 16px;
margin-left: 16px;
} }
.List { .List {
display: flex; display: flex;
overflow-x: auto; /* 允许横向滚动 */ overflow-x: auto; /* 允许横向滚动 */
white-space: nowrap; /* 防止换行 */ white-space: nowrap; /* 防止换行 */
padding-left: 16px;
.listbox { .listbox {
position: relative; position: relative;
.imgList { .imgList {
@ -585,30 +586,39 @@ const choose = (index, name) => {
.main { .main {
box-sizing: border-box; box-sizing: border-box;
padding-top: 0; padding-top: 0;
height: 68vh; // height: 68vh;
margin-right: 16px;
margin-left: 16px;
.main-t { .main-t {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-right: 16px; // padding-right: 16px;
.main-title { .main-title {
width: 85vw; // width: 85vw;
height: 50px; // height: 50px;
padding: 6px;
margin: 8px 0;
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
// border: 1px solid red; // border: 1px solid red;
align-items: center; align-items: center;
.main-list { .main-list {
flex-shrink: 0; flex-shrink: 0;
min-width: 56px; // min-width: 56px;
height: 14px; height: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 14px; line-height: 16px;
margin-right: 22px; margin-right: 22px;
// text-align: center; // text-align: center;
img {
width: 48px;
height: 5px;
margin-bottom: 10px;
}
} }
} }
img { img {
@ -620,7 +630,7 @@ const choose = (index, name) => {
display: flex; display: flex;
overflow-x: auto; /* 允许横向滚动 */ overflow-x: auto; /* 允许横向滚动 */
white-space: nowrap; /* 防止换行 */ white-space: nowrap; /* 防止换行 */
width: 89vw; // width: 90vw;
margin-bottom: 22px; margin-bottom: 22px;
margin-top: 8px; margin-top: 8px;
.tabtitle { .tabtitle {
@ -649,14 +659,16 @@ const choose = (index, name) => {
// height: 30vh; // height: 30vh;
// border: 1px solid red; // border: 1px solid red;
height: calc(100vh - 422px); height: calc(100vh - 422px);
width: 355px; // width: 355px;
box-sizing: border-box; box-sizing: border-box;
overflow-x: auto; /* 允许横向滚动 */ overflow-x: auto; /* 允许横向滚动 */
white-space: nowrap; /* 防止换行 */ white-space: nowrap; /* 防止换行 */
.line { .line {
margin-bottom: 20px; margin-bottom: 20px;
width: 355px; // width: 355px;
height: 132px; // height: 132px;
// width: 90vh;
// height: 12vh;
background: #ffffff; background: #ffffff;
box-shadow: 0px 2px 12px 0px #ebeef3; box-shadow: 0px 2px 12px 0px #ebeef3;
border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px;
@ -705,7 +717,7 @@ const choose = (index, name) => {
height: 16px; height: 16px;
border-radius: 2px 2px 2px 2px; border-radius: 2px 2px 2px 2px;
border: 1px solid #b8ccff; border: 1px solid #b8ccff;
padding: 1px 2px;
font-size: 10px; font-size: 10px;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
@ -742,12 +754,12 @@ const choose = (index, name) => {
} }
} }
.numa { .numa {
width: 72px !important; // width: 72px !important;
font-size: 18px !important; font-size: 18px !important;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 600 !important; font-weight: 600 !important;
color: #333333 !important; color: #333333 !important;
line-height: 16px !important; // line-height: 16px !important;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;

View File

@ -29,12 +29,15 @@
:overlay="false" :overlay="false"
round round
position="bottom" position="bottom"
:style="{ height: '45%' }" :style="{ height: dropdown.hinegh + 'px' }"
style="z-index: 10" style="z-index: 10"
> >
<div style="width: 100%" @touchmove="touchmove">
<div class="tzhz"></div>
</div>
<van-sticky style="background-color: #fff; z-index: 99"> <van-sticky style="background-color: #fff; z-index: 99">
<van-search <van-search
v-model="value" v-model="dropdown.sesh"
shape="round" shape="round"
background="#4fc08d00" background="#4fc08d00"
placeholder="" placeholder=""
@ -72,11 +75,11 @@
</div> </div>
<div class="bq"> <div class="bq">
<van-tag <van-tag
v-for="(item, index) in item.tag" v-for="(items, index) in item.tag"
:key="index" :key="index"
plain plain
type="primary" type="primary"
>{{ item }}</van-tag >{{ items }}</van-tag
> >
</div> </div>
</div> </div>
@ -112,6 +115,9 @@ var control = null;
var T = window.T; var T = window.T;
const dropdown = reactive({ const dropdown = reactive({
sesh: "",
value1: 0,
hinegh: 256,
value1: 0, value1: 0,
value2: 0, value2: 0,
value3: 0, value3: 0,
@ -269,7 +275,7 @@ const list = reactive({
const init = () => { const init = () => {
map = new T.Map("mapDiv"); map = new T.Map("mapDiv");
// map.setMapType(window.TMAP_SATELLITE_MAP); // map.setMapType(window.TMAP_SATELLITE_MAP);
map.centerAndZoom(new T.LngLat(121.88356, 29.45144), 13); map.centerAndZoom(new T.LngLat(121.89248, 29.47474), 12);
control = new T.Control.Zoom(); control = new T.Control.Zoom();
// //
map.addControl(control); map.addControl(control);
@ -287,7 +293,18 @@ const init = () => {
const yxfwxz = (e) => { const yxfwxz = (e) => {
list.index = e.id; list.index = e.id;
// map.clearOverLays();
}; };
const touchmove = (event) => {
if (
document.body.clientHeight - event.touches[0].clientY >= 256 &&
document.body.clientHeight - event.touches[0].clientY <=
document.body.clientHeight
) {
dropdown.hinegh = document.body.clientHeight - event.touches[0].clientY;
}
};
const yxf = () => { const yxf = () => {
dropdown.rmyy.forEach((item, index) => { dropdown.rmyy.forEach((item, index) => {
var icons = new T.Icon({ var icons = new T.Icon({
@ -301,6 +318,7 @@ const yxf = () => {
map.addOverLay(LngLats); map.addOverLay(LngLats);
}); });
}; };
onMounted(() => { onMounted(() => {
init(); init();
}); });
@ -313,7 +331,7 @@ onMounted(() => {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
width: 100%; width: 100%;
height: 100vh; height: 80vh;
z-index: 0; z-index: 0;
} }
.yxfw { .yxfw {
@ -394,7 +412,7 @@ onMounted(() => {
} }
.card { .card {
width: 100%; width: 100%;
height: calc(100% - 102px); height: calc(100% - 132px);
overflow: auto; overflow: auto;
padding-bottom: 80px; padding-bottom: 80px;
.cardlist { .cardlist {
@ -471,4 +489,19 @@ onMounted(() => {
box-shadow: 0 0px 0px rgba(100, 101, 102, 0.12); box-shadow: 0 0px 0px rgba(100, 101, 102, 0.12);
border-bottom: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1;
} }
.tzhz {
width: 100px;
height: 6px;
border-radius: 6px 6px 6px 6px;
opacity: 1;
border: 1px solid #eaeaea;
margin: 10px auto 10px;
background-color: #eaeaea;
}
:deep(.tdt-bar a, .tdt-bar a:hover) {
color: #cacaca;
}
:deep(.van-search) {
padding: 0px 12px 10px;
}
</style> </style>

View File

@ -39,25 +39,36 @@
<img src="@/assets/list.png" alt="" /> <img src="@/assets/list.png" alt="" />
</div> </div>
<div class="list"> <div class="list">
<div class="list-item"> <van-pull-refresh v-model="loadingSx" @refresh="onRefresh">
<div v-for="(data, index) in records.list" :key="data.id"> <van-list
<listNoImg v-if="data.display == 0" :newData="data" /> v-model:loading="loadings"
<listRightImg v-if="data.display == 1" :newData="data" /> :finished="finished"
<div class="container"> finished-text="没有更多了"
<div class="line"></div> @load="onLoad"
>
<div v-for="(data, index) in records.list" :key="data.id">
<listNoImg v-if="data.display == 0" :newData="data" />
<listRightImg v-if="data.display == 1" :newData="data" />
<div class="container">
<div class="line"></div>
</div>
</div> </div>
</div> </van-list>
</div> </van-pull-refresh>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, reactive } from "vue"; import { ref, reactive, onMounted,nextTick } from "vue";
import listRightImg from "@/components/list-right-img.vue"; import listRightImg from "@/components/list-right-img.vue";
import listNoImg from "@/components/list-no-img.vue"; import listNoImg from "@/components/list-no-img.vue";
import j1 from "../assets/cc4.png"; import j1 from "../assets/cc4.png";
import j2 from "../assets/cc3.png"; import j2 from "../assets/cc3.png";
import { showSuccessToast } from "vant";
const loadingSx = ref(false);
const loadings = ref(false);
const finished = ref(false);
const topContent = reactive([ const topContent = reactive([
{ {
content: "2024年养老金发放政策工龄30年内统一发放3200元可行吗", content: "2024年养老金发放政策工龄30年内统一发放3200元可行吗",
@ -99,7 +110,7 @@ const mainList = reactive([
const chooseId = ref("1"); const chooseId = ref("1");
const choose = (id) => { const choose = (id) => {
chooseId.value = id; chooseId.value = id;
// console.log()
}; };
const records = reactive({ const records = reactive({
list: [ list: [
@ -143,6 +154,26 @@ const records = reactive({
}, },
], ],
}); });
const onRefresh = () => {
setTimeout(() => {
showSuccessToast("刷新成功");
loadingSx.value = false;
}, 1000);
};
const onLoad = () => {
//
// setTimeout ajax
setTimeout(() => {
//
loadings.value = false;
//
finished.value = true;
}, 1000);
};
onMounted(() => {
// showToast("666")
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.body { .body {