From 1ebf13fcff1d64f0ab9f1981cd60ad3194a2d29c Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期五, 27 九月 2024 11:10:00 +0800 Subject: [PATCH] zf --- pages/home/home.js | 22 ++++++++-------------- 1 files changed, 8 insertions(+), 14 deletions(-) diff --git a/pages/home/home.js b/pages/home/home.js index f85bf4e..b94578d 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -45,8 +45,12 @@ this.setData({ searchVal: "", }); - console.log(this.data.searchVal) this.loadHomePage(); + const token = wx.getStorageSync(app.config.tokenKey) + if (token) { + this.getShoppingCartList() + } + this.init(); }, onLoad() { @@ -72,11 +76,7 @@ this.init(); } }) - } else { - this.init(); - this.registe() } - }, onReachBottom() {}, onPullDownRefresh() { @@ -203,8 +203,8 @@ } app.MG.store.getProductList(obj).then((res) => { res.datas.forEach((item) => { - item.liveTime = item.liveTime ? moment(item.liveTime).format("MM-DD HH:mm:ss") : ''; - item.startTime = item.startTime ? moment(item.startTime).format("MM-DD HH:mm:ss") : ''; + item.liveTime = item.liveTime ? item.liveTime.substring(5) : ''; + item.startTime = item.startTime ? item.startTime.substring(5) : ''; item.price = item.price ? item.price.toFixed(2) : item.price; }); this.setData({ @@ -453,7 +453,6 @@ // duration: 1000 // }) const item = e.currentTarget.dataset.book - console.log(item); // 缃戦〉绫诲瀷璺宠浆鍒扮綉鍧�澶嶅埗椤碉紝鍥犱负url浼犲弬涓嶈兘浼� 甯﹀弬鏁扮殑缃戠粶鍦板潃锛屾墍浠ユ澶勮鎶婄綉缁滃湴鍧�閲岀殑浼犲弬鎽樺嚭鏉ワ紝鏀惧埌url閲� let urlData = '' const flags = item.jsek_link.indexOf("?") @@ -464,11 +463,6 @@ wx.navigateTo({ url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}` }) - // wx.navigateTo({ - // url: '/pages/specialDiscussion/webView/index?link=' + item.jsek_link - // }); - - }, goCourseDetail(e) { @@ -539,7 +533,7 @@ ) ) { wx.showToast({ - title: "璇ヤ功宸插湪璐墿杞︼紝璇峰嬁閲嶅娣诲姞绌�", + title: "璇ュ晢鍝佸凡鍦ㄨ喘鐗╄溅锛岃鍕块噸澶嶆坊鍔�", icon: 'none', duration: 1000 }) -- Gitblit v1.9.1