This commit is contained in:
陈浩 2025-04-22 10:01:19 +08:00
parent 61e9c38a43
commit bd9f1c41df
6 changed files with 79 additions and 81 deletions

View File

@ -26,7 +26,7 @@
<!-- 商城 -->
<tpl ref="tpl" v-if="currentTabIndex == 1" :ste="1" />
<!-- 本地生活 -->
<tpl ref="childComp" v-if="currentTabIndex == 0" :loadMore="loadMore" :ste="0" />
<tpl ref="childComp" v-if="currentTabIndex == 0" :ste="0" />
</div>
</template>
<script>
@ -59,7 +59,6 @@ export default {
currentTabIndex: 0,
current: 0, // tabscurrenttab
swiperCurrent: 0, // swipercurrentswiper-item
loadMore: false, //
};
},
@ -68,7 +67,7 @@ export default {
},
onReachBottom() {
console.log("触底了");
this.loadMore = !this.loadMore;
this.$refs.childComp.loadMon();
},
methods: {
change(index) {

View File

@ -7,17 +7,12 @@
@click="handleClick(item)"
>
<div class="pl_img">
<img :src="imgfun(item.thumbnail)" alt="" />
<div class="price" style="font-size: 20px">
<div>价格:{{ item.price }}</div>
<div>限量:{{ item.geQuantity }}</div>
</div>
<img :src="imgfun(item.thumbnail)" alt="" width="100" />
</div>
<div style="font-size: 15px">
<div style="padding: 5px">{{ item.sellingPoint }}</div>
<div style="padding: 5px">
{{ item.district }} {{ item.storeAddressDetail }}
</div>
<div class="right">
<div>{{ item.goodsName }}</div>
<div>价格:{{ item.price }}</div>
<div>地址:{{ item.storeAddressPath }}</div>
</div>
</div>
<uni-load-more :status="loadMoreStatus" :showIcon="true"></uni-load-more>
@ -26,7 +21,7 @@
<script>
import * as API_home from "@/api/home";
export default {
props: ["res","loadMore"],
props: ["res", "isload"],
data() {
return {
list: [],
@ -39,14 +34,7 @@ export default {
onReachBottom() {
console.log("触底了");
},
watch: {
loadMore: {
handler(val) {
// this.loadMon()
},
deep: true
},
},
mounted() {
this.getlist();
//
@ -56,6 +44,13 @@ export default {
//
// window.removeEventListener('scroll', this.handleScroll);
},
watch: {
isload(val) {
console.log(val);
this.loadMon();
// this.getlist();
},
},
methods: {
getlist() {
const param = {
@ -93,13 +88,26 @@ export default {
}
},
loadMon() {
if (this.loadMoreStatus === "noMore") return;
if (this.total == this.list.length) {
this.loadMoreStatus = "noMore";
return;
}
this.loadMoreStatus = "loading";
this.pageNumber++;
this.getlist();
const param = {
pageSize: this.pageSize,
pageNumber: this.pageNumber,
};
API_home.getbendi(param).then((res) => {
const newRecords = res.data.result.records;
this.list = this.list.concat(newRecords);
if (newRecords.length < this.pageSize) {
this.loadMoreStatus = "noMore";
} else {
this.loadMoreStatus = "more";
}
});
},
},
};
@ -110,33 +118,22 @@ export default {
.layout {
height: 100%;
background: #fff;
// display: flex;
// justify-content: space-between;
}
.shop {
border: 1px solid #eee;
}
.pl_img {
position: relative;
height: 180px;
width: calc(100% - 10px);
padding: 10px;
img {
width: 100%;
height: 100%;
display: flex;
.pl_img{
// width: 100px;
// height: 100px;
padding: 10px;
// &>img{
// width: 100%;
// height: 100%;
// }
}
.price {
width: calc(100% - 30px);
position: absolute;
bottom: 10px;
left: 10px;
background-color: rgba(217, 217, 217, 0.4);
color: red;
display: flex;
justify-content: space-between;
padding: 5px;
// margin: 0 10px
// opacity: 1;
.right{
// flex: 1;
padding: 10px;
}
}
</style>

View File

@ -46,7 +46,7 @@
<activity v-if="item.type == 'activity'" :res="item.options" />
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
<goods v-if="item.type == 'goods'" :res="item.options" />
<shop v-if="item.type == 'shop'" :loadMore="loadMore" :res="item.options" />
<shop v-if="item.type == 'shop'" :isload="isload" :res="item.options" />
<group v-if="item.type == 'group'" :res="item.options" />
<!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> -->
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
@ -93,6 +93,7 @@ export default {
config,
pageData: "", //
isIos: "",
isload:false
};
},
components: {
@ -124,15 +125,12 @@ export default {
type: Number,
default: 0,
},
loadMore: {
type: Boolean,
},
},
watch: {
ste(val) {
this.init();
}
},
},
mounted() {
this.init();
@ -149,6 +147,10 @@ export default {
// },
methods: {
loadMon() {
this.isload=!this.isload
// this.$refs.loadMonfn.loadMon();
},
/**
* 实例化首页数据楼层
*/

View File

@ -109,6 +109,10 @@ import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue";
import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core";
import storage from "@/utils/storage.js";
// push
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
import * as Push from '@/uni_modules/TencentCloud-Push';
import {
getUserimInfo,
getMember,

View File

@ -1,29 +1,27 @@
{
"minSdkVersion": "21",
"dependencies": [
"com.google.android.material:material:1.3.0",
"com.google.code.gson:gson:2.9.1",
"commons-codec:commons-codec:1.15",
"com.github.bumptech.glide:glide:4.12.0",
"com.tencent.timpush:timpush:8.5.6864",
"com.tencent.liteav.tuikit:tuicore:8.5.6864",
"com.tencent.timpush:huawei:8.5.6864",
"com.tencent.timpush:xiaomi:8.5.6864",
"com.tencent.timpush:oppo:8.5.6864",
"com.tencent.timpush:meizu:8.5.6864",
"com.tencent.timpush:fcm:8.5.6864",
"com.tencent.timpush:honor:8.5.6864",
"com.tencent.timpush:vivo:8.5.6864"
],
"project": {
"plugins": [
"com.huawei.agconnect",
"com.hihonor.mcs.asplugin"
],
"dependencies": [
"com.huawei.agconnect:agcp:1.9.1.301",
"com.google.gms:google-services:4.3.15",
"com.hihonor.mcs:asplugin:2.0.1.300"
]
}
{
"minSdkVersion": "21",
"dependencies": [
"com.google.android.material:material:1.3.0",
"com.google.code.gson:gson:2.9.1",
"commons-codec:commons-codec:1.15",
"com.github.bumptech.glide:glide:4.12.0",
"com.tencent.timpush:timpush:8.5.6864",
"com.tencent.liteav.tuikit:tuicore:8.5.6864",
"com.tencent.timpush:huawei:8.5.6864",
"com.tencent.timpush:xiaomi:8.5.6864",
"com.tencent.timpush:oppo:8.5.6864",
"com.tencent.timpush:meizu:8.5.6864",
"com.tencent.timpush:fcm:8.5.6864"
],
"project": {
"plugins": [
"com.huawei.agconnect",
"com.hihonor.mcs.asplugin"
],
"dependencies": [
"com.huawei.agconnect:agcp:1.9.1.301",
"com.google.gms:google-services:4.3.15",
"com.hihonor.mcs:asplugin:2.0.1.300"
]
}
}

View File

@ -29,8 +29,6 @@ function cleanStorage() {
// 清除初始化数据内容
storage.setRefreshVlogIndex('0') //不需要刷新
// 防抖处理跳转
// #ifdef MP-WEIXIN
// 防抖处理跳转
// #ifdef MP-WEIXIN