diff --git a/App.vue b/App.vue
index c3681c4..126fdcf 100644
--- a/App.vue
+++ b/App.vue
@@ -116,6 +116,8 @@
})
}
// #endif
+
+ uni.setStorageSync('DEBUG_DIY_RENDER', true)
},
methods: {
remoteRegister(remote_token) {
diff --git a/pages/annex/special/index.vue b/pages/annex/special/index.vue
index a6a4bdd..72db8d4 100644
--- a/pages/annex/special/index.vue
+++ b/pages/annex/special/index.vue
@@ -11,6 +11,7 @@
+
@@ -35,6 +36,8 @@
+
+
@@ -105,6 +108,7 @@
import userInfor from '@/pages/index/components/userInfor';
import homeComb from '@/pages/index/components/homeComb';
import newVip from '@/pages/index/components/newVip';
+ import pageTopbar from '@/pages/index/components/pageTopbar';
import headerSerch from '@/pages/index/components/headerSerch';
import swipers from '@/pages/index/components/swipers';
import coupon from '@/pages/index/components/coupon';
@@ -119,6 +123,7 @@
import menus from '@/pages/index/components/menus';
import news from '@/pages/index/components/news';
import pictureCube from '@/pages/index/components/pictureCube';
+ import images from '@/pages/index/components/images';
import promotionList from '@/pages/index/components/promotionList';
import richText from '@/pages/index/components/richText';
import seckill from '@/pages/index/components/seckill';
@@ -171,6 +176,7 @@
couponWindow,
homeComb,
newVip,
+ pageTopbar,
userInfor,
headerSerch,
swipers,
@@ -185,6 +191,7 @@
liveBroadcast,
menus,
pictureCube,
+ images,
news,
promotionList,
richText,
@@ -205,6 +212,7 @@
},
data() {
return {
+ __debugDiyRender: false,
styleConfig: [],
loading: false,
loadend: false,
@@ -246,6 +254,7 @@
},
onLoad(options) {
let that = this
+ this.__debugDiyRender = uni.getStorageSync('DEBUG_DIY_RENDER') === true
this.$nextTick(function() {
uni.getSystemInfo({
success: function(res) {
@@ -323,6 +332,11 @@
},
mounted() {},
methods: {
+ __logDiy(step, payload) {
+ if (!this.__debugDiyRender) return;
+ const safe = payload === undefined ? '' : payload
+ console.log('[DIY][special]', step, safe)
+ },
// 分类点击
changeSort(item, index) {
if (this.curSort == index) return;
@@ -355,6 +369,7 @@
*/
getMicroPage(id, type) {
let that = this;
+ that.__logDiy('micro_fetch_start', { id })
that.styleConfig = []
uni.showLoading({
title: '加载中...'
@@ -363,11 +378,15 @@
uni.hideLoading();
let data = res.data;
that.styleConfig = that.objToArr(res.data.value);
+ that.__logDiy('micro_fetch_ok', { title: data?.title, count: that.styleConfig.length, names: that.styleConfig.map(v => v?.name) })
that.styleConfig.forEach((item, index) => {
if (['headerSerch', 'homeComb'].includes(item.name)) {
that.styleConfig.splice(index, 1);
}
});
+ that.$nextTick(() => {
+ that.__logDiy('micro_render_nextTick', { count: that.styleConfig.length, names: that.styleConfig.map(v => v?.name) })
+ })
}).catch(err => {
return that.$util.Tips({
title: err
@@ -504,10 +523,12 @@
return m;
},
getDiyData() {
+ this.__logDiy('special_fetch_start', { id: this.pageId })
getDiy(this.pageId).then(res => {
// uni.setStorageSync('specialDiyData', JSON.stringify(res.data));
// this.setDiyData(res.data);
let data = res.data;
+ this.__logDiy('special_fetch_ok', { title: data?.title, keys: Object.keys(data?.value || {}).length })
if (data.is_bg_color) {
this.bgColor = data.color_picker
}
@@ -521,6 +542,7 @@
})
let temp = []
let lastArr = this.objToArr(data.value)
+ this.__logDiy('special_value_arr', { count: lastArr.length, names: lastArr.map(v => v?.name) })
lastArr.forEach((item, index, arr) => {
if (item.isHide !== '1') {
temp.push(item);
@@ -530,6 +552,10 @@
}
});
this.styleConfig = temp;
+ this.__logDiy('special_styleConfig_set', { count: this.styleConfig.length, names: this.styleConfig.map(v => v?.name) })
+ this.$nextTick(() => {
+ this.__logDiy('special_render_nextTick', { count: this.styleConfig.length, names: this.styleConfig.map(v => v?.name) })
+ })
});
},
changeBarg(item) {
@@ -730,4 +756,4 @@
.noRepeat {
background-repeat: no-repeat;
}
-
\ No newline at end of file
+
diff --git a/pages/index/components/homeComb.vue b/pages/index/components/homeComb.vue
index 92fd5ee..2e089d3 100644
--- a/pages/index/components/homeComb.vue
+++ b/pages/index/components/homeComb.vue
@@ -62,7 +62,7 @@
-
+
{
+ this.computedHeight();
+ })
+ }
+ }
+ },
methods: {
goDetail(url) {
let urls = url.info[1].value
@@ -839,4 +857,4 @@
/deep/.dot2 .uni-swiper-dots-horizontal {
left: 90%;
}
-
\ No newline at end of file
+
diff --git a/pages/index/components/images.vue b/pages/index/components/images.vue
new file mode 100644
index 0000000..802239c
--- /dev/null
+++ b/pages/index/components/images.vue
@@ -0,0 +1,250 @@
+
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+
+
+
+
+ 暂无图片
+
+
+
+
+
+
+
+
diff --git a/pages/index/components/pageTopbar.vue b/pages/index/components/pageTopbar.vue
new file mode 100644
index 0000000..accb1fb
--- /dev/null
+++ b/pages/index/components/pageTopbar.vue
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+ {{ titleText }}
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f426c55..55d3d08 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -19,6 +19,7 @@
@changeLogin="changeLogin">
+
@@ -46,6 +47,8 @@
+
+
@@ -146,6 +149,7 @@
import userInfor from './components/userInfor';
import homeComb from './components/homeComb';
import newVip from './components/newVip';
+ import pageTopbar from './components/pageTopbar';
// import shortVideo from './components/shortVideo';
import community from './components/community'
import headerSerch from './components/headerSerch';
@@ -161,8 +165,9 @@
import liveBroadcast from './components/liveBroadcast';
import menus from './components/menus';
import news from './components/news';
- import pictureCube from './components/pictureCube';
- import promotionList from './components/promotionList';
+import pictureCube from './components/pictureCube';
+import images from './components/images';
+import promotionList from './components/promotionList';
import richText from './components/richText';
import seckill from './components/seckill';
import swiperBg from './components/swiperBg';
@@ -221,6 +226,7 @@
couponWindow,
homeComb,
newVip,
+ pageTopbar,
userInfor,
community,
headerSerch,
@@ -235,6 +241,7 @@
guide,
menus,
pictureCube,
+ images,
news,
promotionList,
richText,
@@ -263,6 +270,7 @@
data() {
return {
+ __debugDiyRender: false,
styleConfig: [],
loading: false,
loadend: false,
@@ -309,11 +317,12 @@
confirm_video_status: false,
isFooter: false,
pullReset: 0,
- configData: Cache.get('BASIC_CONFIG'),
+ configData: Cache.get('BASIC_CONFIG') || {},
};
},
onLoad(options) {
let that = this;
+ this.__debugDiyRender = uni.getStorageSync('DEBUG_DIY_RENDER') === true
that.getOptions(options);
this.$nextTick(function() {
uni.getSystemInfo({
@@ -360,6 +369,11 @@
uni.removeStorageSync('form_type_cart')
},
methods: {
+ __logDiy(step, payload) {
+ if (!this.__debugDiyRender) return;
+ const safe = payload === undefined ? '' : payload
+ console.log('[DIY][home]', step, safe)
+ },
...mapMutations(['SET_AUTOPLAY']),
getOptions(options) {
let that = this;
@@ -431,6 +445,7 @@
*/
getMicroPage(id, type) {
let that = this;
+ that.__logDiy('micro_fetch_start', { id })
that.styleConfig = [];
that.goodList = [];
uni.showLoading({
@@ -440,6 +455,7 @@
uni.hideLoading();
let data = res.data;
let diyArr = that.objToArr(res.data.value);
+ that.__logDiy('micro_fetch_ok', { title: data?.title, count: diyArr.length, names: diyArr.map(v => v?.name) })
diyArr = diyArr.filter(item => item.isHide !== '1');
diyArr.forEach((item,index) => {
if(['headerSerch','homeComb'].includes(item.name)){
@@ -447,6 +463,9 @@
}
});
this.styleConfig = diyArr;
+ this.$nextTick(() => {
+ this.__logDiy('micro_render_nextTick', { count: this.styleConfig.length, names: this.styleConfig.map(v => v?.name) })
+ })
}).catch(err => {
return that.$util.Tips({
title: err
@@ -525,6 +544,7 @@
return m;
},
setDiyData(data) {
+ this.__logDiy('home_setDiyData_start', { title: data?.title })
this.errorNetwork = false
if (data.is_bg_color) {
this.bgColor = data.color_picker
@@ -563,9 +583,15 @@
}
temp.sort(sortNumber)
this.styleConfig = temp;
+ this.__logDiy('home_setDiyData_done', { count: this.styleConfig.length, names: this.styleConfig.map(v => v?.name) })
+ this.$nextTick(() => {
+ this.__logDiy('home_render_nextTick', { count: this.styleConfig.length, names: this.styleConfig.map(v => v?.name) })
+ })
},
getDiyData() {
+ this.__logDiy('home_fetch_start', { id: 0 })
getDiy(0).then(res => {
+ this.__logDiy('home_fetch_ok', { title: res?.data?.title, keys: Object.keys(res?.data?.value || {}).length })
uni.setStorageSync('diyData', JSON.stringify(res.data));
this.setDiyData(res.data);
}).catch(error => {