From c12d36d83d333af7f6a5946e32980893ab3b015b Mon Sep 17 00:00:00 2001 From: zhengshuiqi Date: Thu, 1 Dec 2022 09:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 22 +- common/common.scss | 44 ++-- manifest.json | 2 +- package-lock.json | 38 +++- pages/account/addAddress.vue | 21 ++ pages/account/address.vue | 21 ++ pages/account/changeImg.vue | 23 +- pages/account/deleteCount.vue | 23 ++ pages/account/deleteOk.vue | 23 ++ pages/account/demo1.vue | 21 ++ pages/account/favorites.vue | 21 ++ pages/account/index.vue | 21 ++ pages/account/message.vue | 21 ++ pages/account/myCoupons.vue | 23 ++ pages/account/myOrders.vue | 21 ++ pages/account/myProfile.vue | 311 +++++++++++++++++++-------- pages/account/myReview.vue | 21 ++ pages/account/pointsDetails.vue | 21 ++ pages/account/settings.vue | 226 ++++++++++++------- pages/account/wishlist.vue | 21 ++ pages/category/index.vue | 21 ++ pages/category/productList.vue | 22 +- pages/index/address.vue | 21 ++ pages/index/first.vue | 21 ++ pages/index/flashSale.vue | 21 ++ pages/index/index.vue | 2 +- pages/index/index2.vue | 21 ++ pages/index/pickUpCentre.vue | 20 ++ pages/index/search.vue | 21 ++ pages/login/changePwd.vue | 21 ++ pages/login/index.vue | 29 ++- pages/login/verifyEmail.vue | 21 ++ pages/order/additems.vue | 25 +++ pages/order/confirmation.vue | 21 ++ pages/order/details.vue | 21 ++ pages/order/logisticsDetails.vue | 21 ++ pages/order/paySuccess.vue | 21 ++ pages/order/paypalWebview.vue | 21 ++ pages/order/refund.vue | 21 ++ pages/order/refundDetails.vue | 23 ++ pages/productDetails/goodsReview.vue | 25 +++ pages/productDetails/index.vue | 35 ++- pages/productDetails/review.vue | 26 ++- pages/shippingCart/index.vue | 26 ++- pages/specialTitle/index.vue | 103 ++++++--- pages/specialTitle/index2.vue | 25 +++ uni.scss | 18 +- 47 files changed, 1370 insertions(+), 248 deletions(-) diff --git a/App.vue b/App.vue index 3bafe0c..0dd7d34 100644 --- a/App.vue +++ b/App.vue @@ -8,13 +8,15 @@ data() { return { globalData:{ - + error:'',//登录状态 + userinfo:'', }, backButtonPress: 0, } }, onLaunch: function() { uni.hideTabBar() + setTimeout(() => { }, 2400); @@ -74,27 +76,25 @@ onShow: function() { - console.log('App Show') console.log('App Show') console.log('11111') - console.log(this.$store.state.hasNEt); - let that = this; + console.log(this.$store.state.hasNet); + const that = this; uni.onNetworkStatusChange(function(res) { console.log(res); if (res.isConnected) { that.$store.commit("changeNetStatus", true); - uni.showToast({ - title: "有网络", - icon: "none", - duration: 200000 - }) + // uni.showToast({ + // title: "Please connect to the network", + // icon: "none", + // }) console.log('有网络'); } else { that.$store.commit("changeNetStatus", false); uni.showToast({ - title:"无网络", + title:"Please connect to the network", icon: "none", - duration: 200000 + duration: 2000 }) console.log('无网络'); } diff --git a/common/common.scss b/common/common.scss index 828123a..9282b9b 100644 --- a/common/common.scss +++ b/common/common.scss @@ -1167,26 +1167,26 @@ } } } -.uni-page-refresh { - background: #000 !important; - color: #630102 !important; -} -.uni-page-refresh__spinner { - color: #630102 !important; -} -.uni-page-refresh__path { - color: #630102 !important; - stroke: rgb(99, 1, 2); -} -.uni-toast .uni-sample-toast { - color: #630102 !important; -} -/deep/ .uni-toast .uni-simple-toast__text { - background-color: #000 !important; - color: #630102 !important; -} +// .uni-page-refresh { +// background: #000 !important; +// color: #630102 !important; +// } +// .uni-page-refresh__spinner { +// color: #630102 !important; +// } +// .uni-page-refresh__path { +// color: #630102 !important; +// stroke: rgb(99, 1, 2); +// } +// .uni-toast .uni-sample-toast { +// color: #630102 !important; +// } +// /deep/ .uni-toast .uni-simple-toast__text { +// background-color: #000 !important; +// color: #630102 !important; +// } -uni-toast .uni-simple-toast__text { - background-color: #000 !important; - color: #630102 !important; -} \ No newline at end of file +// uni-toast .uni-simple-toast__text { +// background-color: #000 !important; +// color: #630102 !important; +// } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 80874cb..d4775dd 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__9088064", // "appid" : "__UNI__7D4CA0F", "description" : "", - "versionName" : "1.0.0", + "versionName" : "1.1.0", "versionCode" : 100, "transformPx" : false, // "targetSdkVersion" : 31, diff --git a/package-lock.json b/package-lock.json index 4405839..8c787a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,42 @@ { + "name": "PLUS", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "dependencies": { + "base-64": "^1.0.0", + "crypto-js": "^4.1.1", + "vuex": "^4.0.2" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.2.1.tgz", + "integrity": "sha512-OEgAMeQXvCoJ+1x8WyQuVZzFo0wcyCmUR3baRVLmKBo1LmYZWMlRiXlux5jd0fqVJu6PfDbOrZItVqUEzLobeQ==" + }, + "node_modules/base-64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", + "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" + }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "node_modules/vuex": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz", + "integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==", + "dependencies": { + "@vue/devtools-api": "^6.0.0-beta.11" + }, + "peerDependencies": { + "vue": "^3.0.2" + } + } + }, "dependencies": { "@vue/devtools-api": { "version": "6.2.1", diff --git a/pages/account/addAddress.vue b/pages/account/addAddress.vue index e521bd6..76da872 100644 --- a/pages/account/addAddress.vue +++ b/pages/account/addAddress.vue @@ -475,6 +475,27 @@ } }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getCountry() if(e.type==1){ diff --git a/pages/account/address.vue b/pages/account/address.vue index 11b2f80..6b93241 100644 --- a/pages/account/address.vue +++ b/pages/account/address.vue @@ -113,6 +113,27 @@ this.getList() }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); if(e.type==1){ this.type=1 } diff --git a/pages/account/changeImg.vue b/pages/account/changeImg.vue index 72de6c4..0b60920 100644 --- a/pages/account/changeImg.vue +++ b/pages/account/changeImg.vue @@ -57,7 +57,28 @@ } }, onLoad() { - this.getimglist() + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); + this.getimglist() }, onShow() { diff --git a/pages/account/deleteCount.vue b/pages/account/deleteCount.vue index 1b41b57..7fbb624 100644 --- a/pages/account/deleteCount.vue +++ b/pages/account/deleteCount.vue @@ -36,6 +36,29 @@ } } }, + onLaunch() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); + }, methods:{ getuserinfo(){ let data={_action:'getinfo'} diff --git a/pages/account/deleteOk.vue b/pages/account/deleteOk.vue index dc76151..2a7ada7 100644 --- a/pages/account/deleteOk.vue +++ b/pages/account/deleteOk.vue @@ -20,6 +20,29 @@ } }, + onLaunch() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); + }, methods:{ back(){ diff --git a/pages/account/demo1.vue b/pages/account/demo1.vue index c6a2b02..1e32ef1 100644 --- a/pages/account/demo1.vue +++ b/pages/account/demo1.vue @@ -120,6 +120,27 @@ uni.showTabBar() }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getList() }, diff --git a/pages/account/favorites.vue b/pages/account/favorites.vue index 117b18b..2b033b7 100644 --- a/pages/account/favorites.vue +++ b/pages/account/favorites.vue @@ -212,6 +212,27 @@ } }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getList() } } diff --git a/pages/account/index.vue b/pages/account/index.vue index 322fb9c..f54f793 100644 --- a/pages/account/index.vue +++ b/pages/account/index.vue @@ -452,6 +452,27 @@ }, }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); uni.hideTabBar() this.isLogin = uni.getStorageSync('isLogin') // this.tarbar[2].src = uni.getStorageSync('midButton') diff --git a/pages/account/message.vue b/pages/account/message.vue index ae3b421..71b6947 100644 --- a/pages/account/message.vue +++ b/pages/account/message.vue @@ -219,6 +219,27 @@ } }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); // this.getList() this.getMes() } diff --git a/pages/account/myCoupons.vue b/pages/account/myCoupons.vue index 280aeeb..0110ea3 100644 --- a/pages/account/myCoupons.vue +++ b/pages/account/myCoupons.vue @@ -39,6 +39,29 @@ list:[] } }, + onLaunch() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); + }, methods:{ getList(){ let data={_action:'getuserbonus'} diff --git a/pages/account/myOrders.vue b/pages/account/myOrders.vue index 52cec95..8524b20 100644 --- a/pages/account/myOrders.vue +++ b/pages/account/myOrders.vue @@ -793,6 +793,27 @@ this.getList() }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.scrollChange(0) this.scroll_active = e.scroll_active this.scrollChange(e.index) diff --git a/pages/account/myProfile.vue b/pages/account/myProfile.vue index 06002e6..b65c63f 100644 --- a/pages/account/myProfile.vue +++ b/pages/account/myProfile.vue @@ -1,16 +1,16 @@ \ No newline at end of file + diff --git a/pages/account/myReview.vue b/pages/account/myReview.vue index 4dc05bc..60b7b04 100644 --- a/pages/account/myReview.vue +++ b/pages/account/myReview.vue @@ -116,6 +116,27 @@ }, }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.query.goods_id=e.goods_id this.getList() }, diff --git a/pages/account/pointsDetails.vue b/pages/account/pointsDetails.vue index 6eb2ce0..29a1dc1 100644 --- a/pages/account/pointsDetails.vue +++ b/pages/account/pointsDetails.vue @@ -65,6 +65,27 @@ } }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getUserinfo() defaultRequest(this.query).then( res => { console.log(res,'p') diff --git a/pages/account/settings.vue b/pages/account/settings.vue index a8174de..c62f2a6 100644 --- a/pages/account/settings.vue +++ b/pages/account/settings.vue @@ -8,15 +8,15 @@ Language --> - + My account - + Privacy policy - + Legal @@ -25,23 +25,57 @@ DOPE PLUS - Version {{appver}} + Version {{appver}} + + + + + {{titleDow}} + + + + + \ No newline at end of file + diff --git a/pages/account/wishlist.vue b/pages/account/wishlist.vue index 18842c8..38969d4 100644 --- a/pages/account/wishlist.vue +++ b/pages/account/wishlist.vue @@ -597,6 +597,27 @@ }, }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getList() // uni.startPullDownRefresh() // uni.clearStorage() diff --git a/pages/category/index.vue b/pages/category/index.vue index e2096ed..3267b1a 100644 --- a/pages/category/index.vue +++ b/pages/category/index.vue @@ -124,6 +124,27 @@ }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getList() this.getCartNum() uni.hideTabBar() diff --git a/pages/category/productList.vue b/pages/category/productList.vue index 4a392f0..1a74510 100644 --- a/pages/category/productList.vue +++ b/pages/category/productList.vue @@ -514,7 +514,27 @@ } }, onLoad(e) { - + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); console.log(e) if (e.first) { this.first = e.first diff --git a/pages/index/address.vue b/pages/index/address.vue index b7582d7..e0a4a33 100644 --- a/pages/index/address.vue +++ b/pages/index/address.vue @@ -55,6 +55,27 @@ } }, async onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); await this.getaddress() }, diff --git a/pages/index/first.vue b/pages/index/first.vue index dbd11cb..cf5a67f 100644 --- a/pages/index/first.vue +++ b/pages/index/first.vue @@ -35,6 +35,27 @@ }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getMes() // this.getCountdownTime() // #ifdef APP-PLUS diff --git a/pages/index/flashSale.vue b/pages/index/flashSale.vue index f26d43b..e363659 100644 --- a/pages/index/flashSale.vue +++ b/pages/index/flashSale.vue @@ -356,6 +356,27 @@ }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getList() this.isLogin = uni.getStorageSync('isLogin') diff --git a/pages/index/index.vue b/pages/index/index.vue index ed751fa..c2761c3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -241,7 +241,7 @@ } }) s++; - }, 5000); + }, 4000); }, mounted() { diff --git a/pages/index/index2.vue b/pages/index/index2.vue index 5809707..b2a2356 100644 --- a/pages/index/index2.vue +++ b/pages/index/index2.vue @@ -316,6 +316,27 @@ }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getIndex() // console.info(this.curEndTime) this.getList() diff --git a/pages/index/pickUpCentre.vue b/pages/index/pickUpCentre.vue index 9ab5796..8a954fc 100644 --- a/pages/index/pickUpCentre.vue +++ b/pages/index/pickUpCentre.vue @@ -96,6 +96,26 @@ } }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + } + } + }) + s++; + }, 1000); this.getList() } } diff --git a/pages/index/search.vue b/pages/index/search.vue index d3e8bec..28b48b6 100644 --- a/pages/index/search.vue +++ b/pages/index/search.vue @@ -161,6 +161,27 @@ }, async onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); this.getIndex() // this.getCatList() let list = await uni.getStorage({ diff --git a/pages/login/changePwd.vue b/pages/login/changePwd.vue index 7184110..7e43800 100644 --- a/pages/login/changePwd.vue +++ b/pages/login/changePwd.vue @@ -58,6 +58,27 @@ }, }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + + } + } + }) + s++; + }, 1000); console.info(e) this.query.username=e.username this.query.resetcode=e.resetcode diff --git a/pages/login/index.vue b/pages/login/index.vue index 6230997..74f7a84 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -68,6 +68,7 @@ diff --git a/pages/productDetails/goodsReview.vue b/pages/productDetails/goodsReview.vue index 471394f..895c540 100644 --- a/pages/productDetails/goodsReview.vue +++ b/pages/productDetails/goodsReview.vue @@ -107,6 +107,31 @@ } }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + // uni.showToast({ + // icon: 'none', + // title: 'Please connect to the network', + // duration: 3000, + // }) + } + } + }) + s++; + }, 1000); plus.screen.lockOrientation('portrait') //锁定竖屏 this.query.goods_id=e.goods_id this.getList() diff --git a/pages/productDetails/index.vue b/pages/productDetails/index.vue index d75ab31..2b4b2e1 100644 --- a/pages/productDetails/index.vue +++ b/pages/productDetails/index.vue @@ -466,6 +466,7 @@ defaultRequest2, defaultRequest4 } from '../../api/index.js' + const app = getApp() export default { data() { return { @@ -521,7 +522,7 @@ }, Is_attr: 0, //是否有规格 listtext: [], - isLogin: -1, + isLogin: 1, isAttr: false, Attr_list: '', video: false, @@ -555,7 +556,6 @@ } }, - computed: { //当天结束时间 curEndTime() { @@ -1119,8 +1119,34 @@ } }, onLoad(e) { + let that = this; + let s = 0; + // this.isLogin = app.globalData.error + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + // uni.showToast({ + // icon: 'none', + // title: 'Please connect to the network', + // duration: 3000, + // }) + } + } + }) + s++; + }, 1000); // let goods = JSON.parse(e) - this.isLogin = uni.getStorageSync('isLogin') + if (e.first) { this.first = e.first } @@ -1151,6 +1177,9 @@ }, onShow() { this.getCartNum(); + this.isLogin = uni.getStorageSync('isLogin') + let aaa = uni.getStorageSync('isLogin') + console.log('aaa',aaa) }, // 上拉加载 onReachBottom() { diff --git a/pages/productDetails/review.vue b/pages/productDetails/review.vue index 15195b5..aff081f 100644 --- a/pages/productDetails/review.vue +++ b/pages/productDetails/review.vue @@ -446,7 +446,31 @@ } }, onLoad(e) { - + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + // uni.showToast({ + // icon: 'none', + // title: 'Please connect to the network', + // duration: 3000, + // }) + } + } + }) + s++; + }, 1000); let datas=JSON.parse(e.data) console.log(datas) // let orderDate = uni.getStorageSync('orderDate') diff --git a/pages/shippingCart/index.vue b/pages/shippingCart/index.vue index b679d60..e61605f 100644 --- a/pages/shippingCart/index.vue +++ b/pages/shippingCart/index.vue @@ -1109,6 +1109,31 @@ }, onLoad() { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + // uni.showToast({ + // icon: 'none', + // title: 'Please connect to the network', + // duration: 3000, + // }) + } + } + }) + s++; + }, 1000); this.isLogin = uni.getStorageSync('isLogin') console.log(this.isLogin) let user = uni.getStorageSync('user_info') @@ -1122,7 +1147,6 @@ this.getCatList(0) this.getAddress() this.getorder() - this.lib() }, async onShow() { diff --git a/pages/specialTitle/index.vue b/pages/specialTitle/index.vue index 8180f3c..0c08533 100644 --- a/pages/specialTitle/index.vue +++ b/pages/specialTitle/index.vue @@ -8,12 +8,13 @@ color="#fff" :title="title" :fixed="true" :border="false" :top="100 +rpx"/> --> - - - + + + @@ -86,13 +87,38 @@ } }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + // uni.showToast({ + // icon: 'none', + // title: 'Please connect to the network', + // duration: 3000, + // }) + } + } + }) + s++; + }, 1000); console.log(e) this.title = e.title this.data.pagecode = e.id this.getpage() }, methods: { - + getpage() { let imglist defaultRequest(this.data).then(res => { @@ -113,37 +139,44 @@ }) }, imgTo(item) { - console.log(item, 'item数据?') - // console.log(item.block_link) + + // console.log(item.blocks[0].block_link); + console.log(item.block_link); + console.log(item, 'item数据?') + if (item.block_title3 = 1) { + plus.runtime.openURL(item.block_link) + } + + // console.log(item.block_link.includes('dope.youhui')) - let goodid - if (item.goodid) { - uni.navigateTo({ - // url: '../productDetails/index?goodid=' + item.goodid - url: './paypalWebview?src' + item.goodid - }) - } else if (item.block_link) { - const i = item.block_link.indexOf('?') - goodid = item.block_link.substring(i); - ////console.log(item.block_link) - if (item.block_link.includes('goodslist')) { - uni.navigateTo({ - url: '../category/productList' + goodid + '&tag=1' - }) - } else if (item.block_link.includes('goodid')) { - uni.navigateTo({ - url: '../productDetails/index' + goodid + '&img=1' - }) - } else if (item.block_link.includes('dope.youhui')) { - uni.navigateTo({ - url: './pickUpCentre' - }) - } else if (item.block_link.includes('dope.adspecial')) { - uni.navigateTo({ - url: '../specialTitle/index2' + goodid - }) - } - } + // let goodid + // if (item.goodid) { + // uni.navigateTo({ + // // url: '../productDetails/index?goodid=' + item.goodid + // url: './paypalWebview?src' + item.goodid + // }) + // } else if (item.block_link) { + // const i = item.block_link.indexOf('?') + // goodid = item.block_link.substring(i); + // ////console.log(item.block_link) + // if (item.block_link.includes('goodslist')) { + // uni.navigateTo({ + // url: '../category/productList' + goodid + '&tag=1' + // }) + // } else if (item.block_link.includes('goodid')) { + // uni.navigateTo({ + // url: '../productDetails/index' + goodid + '&img=1' + // }) + // } else if (item.block_link.includes('dope.youhui')) { + // uni.navigateTo({ + // url: './pickUpCentre' + // }) + // } else if (item.block_link.includes('dope.adspecial')) { + // uni.navigateTo({ + // url: '../specialTitle/index2' + goodid + // }) + // } + // } }, } diff --git a/pages/specialTitle/index2.vue b/pages/specialTitle/index2.vue index f89b424..4b389be 100644 --- a/pages/specialTitle/index2.vue +++ b/pages/specialTitle/index2.vue @@ -50,6 +50,31 @@ } }, onLoad(e) { + let that = this; + let s = 0; + let time = setInterval(() => { + uni.getNetworkType({ + success: (res) => { + console.log(res.networkType, s); + if (res.networkType == 'none') { + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } else if (res.networkType !== 'none') { + that.typee = 2; + clearInterval(time); + uni.showToast({ + icon: 'none', + title: 'Please connect to the network', + duration: 3000, + }) + } + } + }) + s++; + }, 1000); console.log(e) this.title = e.title this.data.pagecode = e.id diff --git a/uni.scss b/uni.scss index da8edd4..2532371 100644 --- a/uni.scss +++ b/uni.scss @@ -74,12 +74,12 @@ $uni-color-subtitle: #555555; // 二级标题颜色 $uni-font-size-subtitle:26px; $uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-font-size-paragraph:15px; -uni-toast .uni-simple-toast__text { - background-color: #000 !important; - color: #630102 !important; -} -uni-toast .uni-sample-toast { - background-color: #000 !important; - color: #630102 !important; - border-radius: 5px; -} \ No newline at end of file +// uni-toast .uni-simple-toast__text { +// background-color: #000 !important; +// color: #630102 !important; +// } +// uni-toast .uni-sample-toast { +// background-color: #000 !important; +// color: #630102 !important; +// border-radius: 5px; +// } \ No newline at end of file