From 0825dc152afc02fac9ff70b315227a9ecfa7342a Mon Sep 17 00:00:00 2001 From: zhengshuiqi Date: Fri, 25 Nov 2022 10:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E9=95=BF=20showToast=20=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=BA=202=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/base.js | 0 common/common.scss | 8 + pages.json | 13 +- pages/account/addAddress.vue | 30 +- pages/account/address.vue | 3 +- pages/account/changeImg.vue | 3 +- pages/account/deleteCount.vue | 3 +- pages/account/favorites.vue | 9 +- pages/account/message.vue | 3 +- pages/account/myOrders.vue | 3 +- pages/account/wishlist.vue | 15 +- pages/category/productList.vue | 16 +- pages/index/flashSale.vue | 6 +- pages/index/index.vue | 8 +- pages/index/pickUpCentre.vue | 3 +- pages/index/search.vue | 4 +- pages/login/changePwd.vue | 6 +- pages/login/index.vue | 9 +- pages/login/verifyEmail.vue | 6 +- pages/order/confirmation.vue | 21 +- pages/order/details.vue | 6 +- pages/order/logisticsDetails.vue | 3 +- pages/order/paySuccess.vue | 3 +- pages/productDetails/index.vue | 2086 +++++++++-------- pages/productDetails/review.vue | 6 +- pages/shippingCart/index.vue | 27 +- .../uni-file-picker/uni-file-picker.vue | 3 +- .../uni-forms-item/uni-forms-item.vue | 6 +- 28 files changed, 1286 insertions(+), 1023 deletions(-) delete mode 100644 common/base.js diff --git a/common/base.js b/common/base.js deleted file mode 100644 index e69de29..0000000 diff --git a/common/common.scss b/common/common.scss index c0abbf8..8399eac 100644 --- a/common/common.scss +++ b/common/common.scss @@ -1169,4 +1169,12 @@ } .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); } \ No newline at end of file diff --git a/pages.json b/pages.json index 10d78d4..850327e 100644 --- a/pages.json +++ b/pages.json @@ -9,12 +9,8 @@ "app-plus":{ "titleNView":false, - "bounce": "none", - "pullToRefresh": { - "style": "circle", - "backgroundColor": "#000000", - "color": "#aa0000" - } + "bounce": "none" + // "renderer": "native" }, "navigationBarTextStyle":"white" @@ -385,10 +381,7 @@ "optimization": { "subPackages": true }, - "pullToRefresh": { - "style": "circle", - "color": "#aa0000" - }, + "runmode" : "liberate" // 开启分包优化后,必须配置资源释放模式 } }, diff --git a/pages/account/addAddress.vue b/pages/account/addAddress.vue index c2c650e..6d77673 100644 --- a/pages/account/addAddress.vue +++ b/pages/account/addAddress.vue @@ -180,28 +180,32 @@ if(this.query.consignee.consignee==''){ uni.showToast({ icon:'none', - title:'Please fill Fall name' + title:'Please fill Fall name', + duration: 2000 }) return } if(this.query.consignee.mobile==''){ uni.showToast({ icon:'none', - title:'Please fill Phone Number' + title:'Please fill Phone Number', + duration: 2000 }) return } if(this.address==''){ uni.showToast({ icon:'none', - title:'Please fill Stree adderss or P.O.Box' + title:'Please fill Stree adderss or P.O.Box', + duration: 2000 }) return } if(this.query.consignee.sign_building==''){ uni.showToast({ icon:'none', - title:'Please fill Appartment,suite,unit,etc.' + title:'Please fill Appartment,suite,unit,etc.', + duration: 2000 }) return } @@ -209,7 +213,8 @@ if(this.city==''){ uni.showToast({ icon:'none', - title:'Please fill in City/Town' + title:'Please fill in City/Town', + duration: 2000 }) return } @@ -222,7 +227,8 @@ if(this.query.consignee.city==0){ uni.showToast({ icon:'none', - title:'Please Select City/Town' + title:'Please Select City/Town', + duration: 2000 }) return @@ -232,7 +238,8 @@ if(this.province==''){ uni.showToast({ icon:'none', - title:'Please fill in State/Province' + title:'Please fill in State/Province', + duration: 2000 }) return } @@ -242,7 +249,8 @@ if(this.query.consignee.province==0){ uni.showToast({ icon:'none', - title:'Please Select State/Province' + title:'Please Select State/Province', + duration: 2000 }) return } @@ -250,7 +258,8 @@ if(this.query.consignee.zipcode==''){ uni.showToast({ icon:'none', - title:'Please fill Zip code/Postcode/PLZ/Eircode' + title:'Please fill Zip code/Postcode/PLZ/Eircode', + duration: 2000 }) return } @@ -262,7 +271,8 @@ if(res.error==0){ uni.showToast({ icon:'none', - title:res.message + title:res.message, + duration: 2000 }) uni.navigateBack() } diff --git a/pages/account/address.vue b/pages/account/address.vue index 3c98f9e..11b2f80 100644 --- a/pages/account/address.vue +++ b/pages/account/address.vue @@ -82,7 +82,8 @@ if(res.error==0){ uni.showToast({ icon:'none', - title:res.message + title:res.message, + duration: 2000 }) this.getList() } diff --git a/pages/account/changeImg.vue b/pages/account/changeImg.vue index d5aab73..72de6c4 100644 --- a/pages/account/changeImg.vue +++ b/pages/account/changeImg.vue @@ -90,7 +90,8 @@ setTimeout(() =>{ uni.showToast({ title:'ok!', - icon:'none' + icon:'none', + duration: 2000 }) },500) diff --git a/pages/account/deleteCount.vue b/pages/account/deleteCount.vue index 09ebdcd..1b41b57 100644 --- a/pages/account/deleteCount.vue +++ b/pages/account/deleteCount.vue @@ -60,7 +60,8 @@ setTimeout(() =>{ uni.showToast({ icon:'none', - title:'ok to delete!' + title:'ok to delete!', + duration: 2000 }) },500) uni.navigateTo({ diff --git a/pages/account/favorites.vue b/pages/account/favorites.vue index 757a8a0..1acd2cf 100644 --- a/pages/account/favorites.vue +++ b/pages/account/favorites.vue @@ -81,7 +81,8 @@ if(res.error==0){ uni.showToast({ title:'ok', - icon:'none' + icon:'none', + duration: 2000 }) this.getList() } @@ -97,7 +98,8 @@ if(res.error==0){ uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) this.changeImage(id,0) } @@ -111,7 +113,8 @@ if(res.error==0){ uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) this.changeImage(id,1) } diff --git a/pages/account/message.vue b/pages/account/message.vue index 1ed5ce6..28041b4 100644 --- a/pages/account/message.vue +++ b/pages/account/message.vue @@ -177,7 +177,8 @@ if (res.error == 0) { uni.showToast({ title: 'Read', - icon: 'none' + icon: 'none', + duration: 2000 }) console.log(res) this.getMes() diff --git a/pages/account/myOrders.vue b/pages/account/myOrders.vue index b064aef..52cec95 100644 --- a/pages/account/myOrders.vue +++ b/pages/account/myOrders.vue @@ -716,7 +716,8 @@ console.log('fail:' + JSON.stringify(err)); uni.showToast({ title: 'Payment failed', - icon: 'none' + icon: 'none', + duration: 2000 }) } }); diff --git a/pages/account/wishlist.vue b/pages/account/wishlist.vue index 3224d47..18842c8 100644 --- a/pages/account/wishlist.vue +++ b/pages/account/wishlist.vue @@ -269,7 +269,8 @@ if(res.error==0){ uni.showToast({ title:'ok!', - icon:'none' + icon:'none', + duration: 2000 }) this.getList() @@ -306,7 +307,8 @@ if(res.error==0){ uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) } }) @@ -341,7 +343,8 @@ uni.showToast({ title:'ok!', - icon:'none' + icon:'none', + duration: 2000 }) },1000) this.getList() @@ -522,7 +525,8 @@ if(isall == 0){ uni.showToast({ title:'Please select the product specification', - icon:'none' + icon:'none', + duration: 2000 }) return } @@ -540,7 +544,8 @@ setTimeout( ()=>{ uni.showToast({ title:'Successfully added', - icon:'none' + icon:'none', + duration: 2000 }) },500) diff --git a/pages/category/productList.vue b/pages/category/productList.vue index 4a32fff..377fc90 100644 --- a/pages/category/productList.vue +++ b/pages/category/productList.vue @@ -221,7 +221,8 @@ if (res.error == 0) { uni.showToast({ title: res.message, - icon: 'none' + icon: 'none', + duration: 2000 }) this.changeImage(id, 0) } @@ -244,7 +245,8 @@ if (res.error == 0) { uni.showToast({ title: 'ok', - icon: 'none' + icon: 'none', + duration: 2000 }) this.changeImage(id, 1) } @@ -282,7 +284,8 @@ if (isall == 0) { uni.showToast({ title: 'Please select the product specification', - icon: 'none' + icon: 'none', + duration: 2000 }) return } @@ -299,9 +302,10 @@ setTimeout(() => { uni.showToast({ title: 'Successfully added', - icon: 'none' + icon: 'none', + duration: 2000 }) - }, 500) + }, 2000) this.isCart = false } else { @@ -500,7 +504,7 @@ icon: 'none', duration: 3000 }) - }, 1000) + }, 2000) this.query.page_index-- } } diff --git a/pages/index/flashSale.vue b/pages/index/flashSale.vue index f102931..f26d43b 100644 --- a/pages/index/flashSale.vue +++ b/pages/index/flashSale.vue @@ -288,7 +288,8 @@ if(isall==0){ uni.showToast({ title:'Please select the product specification', - icon:'none' + icon:'none', + duration: 2000 }) return } @@ -305,7 +306,8 @@ this.cartQuery.goods_attr_id = '' uni.showToast({ title:'Successfully added', - icon:'none' + icon:'none', + duration: 2000 }) } this.isCart = false diff --git a/pages/index/index.vue b/pages/index/index.vue index 0a75ed2..86d975a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -817,7 +817,8 @@ if (isall == 0) { uni.showToast({ title: 'Please select the product specification', - icon: 'none' + icon: 'none', + duration: 2000 }) return } @@ -835,9 +836,10 @@ setTimeout(() => { uni.showToast({ title: 'Successfully added', - icon: 'none' + icon: 'none', + duration: 2000 }) - }, 500) + }, 2000) } //uni.showTabBar() diff --git a/pages/index/pickUpCentre.vue b/pages/index/pickUpCentre.vue index ec9b4bf..9ab5796 100644 --- a/pages/index/pickUpCentre.vue +++ b/pages/index/pickUpCentre.vue @@ -51,7 +51,8 @@ if(res.error==0){ uni.showToast({ icon:'none', - title:'ok!' + title:'ok!', + duration: 2000 }) } this.getList() diff --git a/pages/index/search.vue b/pages/index/search.vue index b82b216..d3e8bec 100644 --- a/pages/index/search.vue +++ b/pages/index/search.vue @@ -143,8 +143,8 @@ // 清空搜索记录 empty() { uni.showToast({ - title: 'emptied' - + title: 'emptied', + duration: 2000 }); uni.removeStorage({ key: 'searchList' diff --git a/pages/login/changePwd.vue b/pages/login/changePwd.vue index 9985ba2..7184110 100644 --- a/pages/login/changePwd.vue +++ b/pages/login/changePwd.vue @@ -30,12 +30,14 @@ console.info(res) uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) if(res.error==0){ uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) setTimeout(function() { uni.navigateBack({ diff --git a/pages/login/index.vue b/pages/login/index.vue index aeb8e50..b5f76a7 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -137,6 +137,7 @@ uni.showToast({ title:'Please fill in the user email first', icon:'none', + duration: 2000 }) return } @@ -192,7 +193,8 @@ uni.hideLoading() uni.showToast({ title:'Login successful', - icon:'none' + icon:'none', + duration: 2000 }) },1000) let list ={ @@ -227,6 +229,7 @@ uni.showToast({ title:res.message, icon:'none', + duration: 2000 }) } }) @@ -238,6 +241,7 @@ uni.showToast({ title:'please agree to and tick the User Agreement first', icon:'none', + duration: 2000 }) return } @@ -258,7 +262,8 @@ // Successful registration, please verify your email address! uni.showToast({ title:'logining in~', - icon:'none' + icon:'none', + duration: 2000 }) },1000) }else{ diff --git a/pages/login/verifyEmail.vue b/pages/login/verifyEmail.vue index 2f5ea68..a55e28d 100644 --- a/pages/login/verifyEmail.vue +++ b/pages/login/verifyEmail.vue @@ -47,7 +47,8 @@ if(!this.resetcode){ uni.showToast({ icon:'none', - title:'Please fill in the verification code' + title:'Please fill in the verification code', + duration: 2000 }) } else{ @@ -65,7 +66,8 @@ uni.showToast({ title:res.message, - icon:'none' + icon:'none', + duration: 2000 }) diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue index 5fc45d3..d1d3d4a 100644 --- a/pages/order/confirmation.vue +++ b/pages/order/confirmation.vue @@ -339,7 +339,8 @@ if (!this.address) { uni.showToast({ icon: 'none', - title: 'please add address' + title: 'please add address', + duration: 2000 }) this.isShow = false } else if (this.total.amount != 0 && this.address) { @@ -350,7 +351,8 @@ setTimeout(() => { uni.showToast({ icon: 'none', - title: 'ok!' + title: 'ok!', + duration: 2000 }) }, 1000) uni.navigateTo({ @@ -703,7 +705,8 @@ if (!this.list) { uni.showToast({ icon: 'none', - title: 'No coupon available' + title: 'No coupon available', + duration: 2000 }) return } else { @@ -712,7 +715,8 @@ if (this.orderDate.allow_use_bonus == 0) { uni.showToast({ icon: 'none', - title: 'Coupon cannot be used for this product' + title: 'Coupon cannot be used for this product', + duration: 2000 }) return } @@ -723,7 +727,8 @@ } else { uni.showToast({ icon: 'none', - title: 'Points cannot be used for this product' + title: 'Points cannot be used for this product', + duration: 2000 }) } // if(this.orderDate.allow_use_integral==0){ @@ -737,12 +742,14 @@ if (!this.address) { uni.showToast({ icon: 'none', - title: 'please add address' + title: 'please add address', + duration: 2000 }) } else if (!this.orderId || this.tag == 0) { uni.showToast({ icon: 'none', - title: 'please select shipping method' + title: 'please select shipping method', + duration: 2000 }) } // else{ diff --git a/pages/order/details.vue b/pages/order/details.vue index b8d247a..5d4108a 100644 --- a/pages/order/details.vue +++ b/pages/order/details.vue @@ -399,7 +399,8 @@ console.log('fail:' + JSON.stringify(err)); uni.showToast({ title: 'Payment failed', - icon: 'none' + icon: 'none', + duration: 2000 }) } }); @@ -444,7 +445,8 @@ success: () => { uni.showToast({ title: 'ok!', - icon: 'none' + icon: 'none', + duration: 2000 }) } diff --git a/pages/order/logisticsDetails.vue b/pages/order/logisticsDetails.vue index 0371af1..35d02ad 100644 --- a/pages/order/logisticsDetails.vue +++ b/pages/order/logisticsDetails.vue @@ -54,7 +54,8 @@ success:()=>{//复制成功的回调函数 uni.showToast({//提示 title:'succeeded', - icon:'none' + icon:'none', + duration: 2000 }) } }); diff --git a/pages/order/paySuccess.vue b/pages/order/paySuccess.vue index 81befe5..b26995c 100644 --- a/pages/order/paySuccess.vue +++ b/pages/order/paySuccess.vue @@ -64,7 +64,8 @@ this.isReachBottom=false uni.showToast({ title: 'No more data yet', - icon:'none' + icon:'none', + duration: 2000 }) this.catQuery.page_index-- } diff --git a/pages/productDetails/index.vue b/pages/productDetails/index.vue index 2ad8de3..b244d34 100644 --- a/pages/productDetails/index.vue +++ b/pages/productDetails/index.vue @@ -1,28 +1,33 @@