422
This commit is contained in:
parent
61e9c38a43
commit
bd9f1c41df
@ -26,7 +26,7 @@
|
|||||||
<!-- 商城 -->
|
<!-- 商城 -->
|
||||||
<tpl ref="tpl" v-if="currentTabIndex == 1" :ste="1" />
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -59,7 +59,6 @@ export default {
|
|||||||
currentTabIndex: 0,
|
currentTabIndex: 0,
|
||||||
current: 0, // tabs组件的current值,表示当前活动的tab选项
|
current: 0, // tabs组件的current值,表示当前活动的tab选项
|
||||||
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
|
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
|
||||||
loadMore: false, // 本地触底加载更多
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -68,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log("触底了");
|
console.log("触底了");
|
||||||
this.loadMore = !this.loadMore;
|
this.$refs.childComp.loadMon();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
change(index) {
|
change(index) {
|
||||||
|
@ -7,17 +7,12 @@
|
|||||||
@click="handleClick(item)"
|
@click="handleClick(item)"
|
||||||
>
|
>
|
||||||
<div class="pl_img">
|
<div class="pl_img">
|
||||||
<img :src="imgfun(item.thumbnail)" alt="" />
|
<img :src="imgfun(item.thumbnail)" alt="" width="100" />
|
||||||
<div class="price" style="font-size: 20px">
|
|
||||||
<div>价格:{{ item.price }}¥</div>
|
|
||||||
<div>限量:{{ item.geQuantity }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 15px">
|
|
||||||
<div style="padding: 5px">{{ item.sellingPoint }}</div>
|
|
||||||
<div style="padding: 5px">
|
|
||||||
{{ item.district }} {{ item.storeAddressDetail }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div>{{ item.goodsName }}</div>
|
||||||
|
<div>价格:¥{{ item.price }}</div>
|
||||||
|
<div>地址:{{ item.storeAddressPath }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<uni-load-more :status="loadMoreStatus" :showIcon="true"></uni-load-more>
|
<uni-load-more :status="loadMoreStatus" :showIcon="true"></uni-load-more>
|
||||||
@ -26,7 +21,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import * as API_home from "@/api/home";
|
import * as API_home from "@/api/home";
|
||||||
export default {
|
export default {
|
||||||
props: ["res","loadMore"],
|
props: ["res", "isload"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
@ -39,14 +34,7 @@ export default {
|
|||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
console.log("触底了");
|
console.log("触底了");
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
loadMore: {
|
|
||||||
handler(val) {
|
|
||||||
// this.loadMon()
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getlist();
|
this.getlist();
|
||||||
// 移除原有的滚动监听
|
// 移除原有的滚动监听
|
||||||
@ -56,6 +44,13 @@ export default {
|
|||||||
// 移除原有的滚动监听
|
// 移除原有的滚动监听
|
||||||
// window.removeEventListener('scroll', this.handleScroll);
|
// window.removeEventListener('scroll', this.handleScroll);
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
isload(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.loadMon();
|
||||||
|
// this.getlist();
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getlist() {
|
getlist() {
|
||||||
const param = {
|
const param = {
|
||||||
@ -93,13 +88,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadMon() {
|
loadMon() {
|
||||||
|
if (this.loadMoreStatus === "noMore") return;
|
||||||
if (this.total == this.list.length) {
|
if (this.total == this.list.length) {
|
||||||
this.loadMoreStatus = "noMore";
|
this.loadMoreStatus = "noMore";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loadMoreStatus = "loading";
|
this.loadMoreStatus = "loading";
|
||||||
this.pageNumber++;
|
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 {
|
.layout {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
// display: flex;
|
|
||||||
// justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
.shop {
|
.shop {
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
}
|
|
||||||
.pl_img {
|
|
||||||
position: relative;
|
|
||||||
height: 180px;
|
|
||||||
width: calc(100% - 10px);
|
|
||||||
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;
|
display: flex;
|
||||||
justify-content: space-between;
|
.pl_img{
|
||||||
padding: 5px;
|
// width: 100px;
|
||||||
// margin: 0 10px
|
// height: 100px;
|
||||||
// opacity: 1;
|
padding: 10px;
|
||||||
|
// &>img{
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
// flex: 1;
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<activity v-if="item.type == 'activity'" :res="item.options" />
|
<activity v-if="item.type == 'activity'" :res="item.options" />
|
||||||
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
|
<Talent v-if="item.type == 'talent'" :res="item.options" :model="item" />
|
||||||
<goods v-if="item.type == 'goods'" :res="item.options" />
|
<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" />
|
<group v-if="item.type == 'group'" :res="item.options" />
|
||||||
<!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> -->
|
<!-- <joinGroup v-if="item.type == 'joinGroup'" :res="item.options" /> -->
|
||||||
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
|
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
|
||||||
@ -93,6 +93,7 @@ export default {
|
|||||||
config,
|
config,
|
||||||
pageData: "", //楼层页面数据
|
pageData: "", //楼层页面数据
|
||||||
isIos: "",
|
isIos: "",
|
||||||
|
isload:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -124,15 +125,12 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
loadMore: {
|
|
||||||
type: Boolean,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
ste(val) {
|
ste(val) {
|
||||||
this.init();
|
this.init();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
@ -149,6 +147,10 @@ export default {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
loadMon() {
|
||||||
|
this.isload=!this.isload
|
||||||
|
// this.$refs.loadMonfn.loadMon();
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 实例化首页数据楼层
|
* 实例化首页数据楼层
|
||||||
*/
|
*/
|
||||||
|
@ -109,6 +109,10 @@ import SelectFriendqlioa from "@/TUIKit/components/TUIGroup/index.vue";
|
|||||||
|
|
||||||
import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core";
|
import TUICore, { ExtensionInfo, TUIConstants } from "@tencentcloud/tui-core";
|
||||||
import storage from "@/utils/storage.js";
|
import storage from "@/utils/storage.js";
|
||||||
|
// push
|
||||||
|
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
||||||
|
import * as Push from '@/uni_modules/TencentCloud-Push';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getUserimInfo,
|
getUserimInfo,
|
||||||
getMember,
|
getMember,
|
||||||
|
@ -11,9 +11,7 @@
|
|||||||
"com.tencent.timpush:xiaomi:8.5.6864",
|
"com.tencent.timpush:xiaomi:8.5.6864",
|
||||||
"com.tencent.timpush:oppo:8.5.6864",
|
"com.tencent.timpush:oppo:8.5.6864",
|
||||||
"com.tencent.timpush:meizu:8.5.6864",
|
"com.tencent.timpush:meizu:8.5.6864",
|
||||||
"com.tencent.timpush:fcm: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": {
|
"project": {
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
@ -29,8 +29,6 @@ function cleanStorage() {
|
|||||||
// 清除初始化数据内容
|
// 清除初始化数据内容
|
||||||
storage.setRefreshVlogIndex('0') //不需要刷新
|
storage.setRefreshVlogIndex('0') //不需要刷新
|
||||||
|
|
||||||
// 防抖处理跳转
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
|
|
||||||
// 防抖处理跳转
|
// 防抖处理跳转
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user