【前端模版】修复diy首页分类下拉加载的问题

This commit is contained in:
evoxwht 2022-04-06 16:27:29 +08:00
parent 85483987b7
commit 65178f0e9e
2 changed files with 22 additions and 43 deletions

View File

@ -402,39 +402,6 @@
}
} catch (e) {}
// #endif
// const {
// state,
// scope
// } = options;
// #ifndef H5
uni.getLocation({
type: 'wgs84',
success: function(res) {
try {
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
} catch {}
}
});
// #endif
// #ifdef H5
if (this.$wechat.isWeixin()) {
this.$wechat.location().then(res => {
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
})
} else {
uni.getLocation({
type: 'wgs84',
success: function(res) {
try {
uni.setStorageSync('user_latitude', res.latitude);
uni.setStorageSync('user_longitude', res.longitude);
} catch {}
}
});
}
// #endif
this.diyData();
this.getIndexData();
// #ifdef MP
@ -799,7 +766,7 @@
uni.stopPullDownRefresh({
success: (e) => {},
});
}).catch(error => {
// #ifdef APP-PLUS
if (error.status) {
@ -888,14 +855,19 @@
});
});
},
},
onReachBottom: function() {
if (this.isSortType == 0) {
// this.getGroomList();
} else {
this.getGoodsList();
onsollBotton() {
console.log('????', this.isSortType)
if (this.isSortType == 0) {
// this.getGroomList();
} else {
this.getGoodsList();
}
}
},
onReachBottom: function() {
},
onPageScroll(e) {
// #ifdef H5
if (this.isHeaderSerch) {

View File

@ -1,17 +1,19 @@
<template>
<diy v-if="isDiy"></diy>
<diy ref="diy" v-if="isDiy"></diy>
<visualization v-else></visualization>
</template>
<script>
import diy from './diy'
import visualization from './visualization'
import {getShare} from "@/api/public.js";
import {
getShare
} from "@/api/public.js";
export default {
data() {
return {
isDiy: uni.getStorageSync('is_diy'),
shareInfo:{}
shareInfo: {}
}
},
components: {
@ -58,6 +60,11 @@
});
},
},
onReachBottom: function() {
if (this.isDiy) {
this.$refs.diy.onsollBotton()
}
},
// #ifdef MP
//发送给朋友
onShareAppMessage(res) {