From 6851680b996e64c1d66c035245b2f0f6eb3425c6 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期六, 07 九月 2024 15:33:42 +0800 Subject: [PATCH] 1 --- packagePersonal/pages/aboutUs/index.js | 46 +++++++++++++--------------------------------- 1 files changed, 13 insertions(+), 33 deletions(-) diff --git a/packagePersonal/pages/aboutUs/index.js b/packagePersonal/pages/aboutUs/index.js index bb9c51c..e5af99e 100644 --- a/packagePersonal/pages/aboutUs/index.js +++ b/packagePersonal/pages/aboutUs/index.js @@ -7,13 +7,17 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + loading: true, + hidden: true, aboutText: null, swiperList: null, - current: 1,//杞挱鍥惧弬鏁� + current: 1, //杞挱鍥惧弬鏁� autoplay: true, //杞挱鍥惧弬鏁� - duration: '500',//杞挱鍥惧弬鏁� - interval: 5000,//杞挱鍥惧弬鏁� - navigation: { type: 'dots' },//杞挱鍥惧弬鏁� + duration: '500', //杞挱鍥惧弬鏁� + interval: 5000, //杞挱鍥惧弬鏁� + navigation: { + type: 'dots' + }, //杞挱鍥惧弬鏁� bannerList: [], //杞挱鍥惧垪琛� navBarHeight: '', barHeight: '', @@ -24,22 +28,14 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - - const systInfo = wx.getSystemInfoSync(); const menu = wx.getMenuButtonBoundingClientRect(); // 鑳跺泭淇℃伅 const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 瀵艰埅鏍忛珮搴� - this.setData({ navBarHeight: navBarHeight, barHeight: systInfo.statusBarHeight, types: options.types }) - - console.log(this.data.types); - - - // this.getBanner() this.getAboutText() }, @@ -91,22 +87,6 @@ onShareAppMessage() { }, - //杞挱鍥� - getBanner() { - app.MG.resource.getItem({ - path: 'jsek_banner\\jsek_aboutUsBanner', - paging: { start: 0, size: 9 }, - fields: { - jsek_link: [] - } - }).then(res => { - this.setData({ - bannerList: res.datas[0].icon, - swiperList: res.datas[0].icon - }) - }) - }, - //鏂囧瓧 jsek_aboutUs 鍏充簬鎴戜滑 //jsek_contactUs 鑱旂郴鎴戜滑 getAboutText() { @@ -119,13 +99,13 @@ width: 750 }, }).then(res => { - console.log(res); - + let modifiedContent = res.datas[0].content + modifiedContent = modifiedContent.replace(/<table/g, '<table class="table"').replace(/<tr/g, '<tr class="tr"').replace(/<td/g, '<td class="td"') this.setData({ - aboutText: res.datas[0].content + aboutText: modifiedContent, + loading: false, + hidden: false, }) - - }) }, goBack() { -- Gitblit v1.9.1