From 9ea422ec8a64da9ff77d462cfb6e3d945b37ec27 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Tue, 8 Oct 2019 16:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/appmini/old/alipay/app.js | 77 ++++++------------- public/appmini/old/alipay/app.json | 2 +- .../alipay/pages/answer-form/answer-form.js | 17 +--- .../alipay/pages/answer-list/answer-list.js | 11 +-- public/appmini/old/alipay/pages/buy/buy.js | 22 +----- public/appmini/old/alipay/pages/cart/cart.js | 58 ++++---------- .../pages/goods-category/goods-category.js | 12 +-- .../alipay/pages/goods-detail/goods-detail.js | 74 ++++-------------- .../alipay/pages/goods-search/goods-search.js | 11 +-- .../appmini/old/alipay/pages/index/index.acss | 1 + .../appmini/old/alipay/pages/index/index.js | 14 +--- .../appmini/old/alipay/pages/login/login.js | 37 +++------ .../old/alipay/pages/message/message.js | 11 +-- .../user-address-save/user-address-save.js | 55 +++---------- .../alipay/pages/user-address/user-address.js | 59 +++----------- .../user-answer-list/user-answer-list.js | 11 +-- .../old/alipay/pages/user-faovr/user-faovr.js | 27 ++----- .../user-goods-browse/user-goods-browse.js | 27 ++----- .../pages/user-integral/user-integral.js | 11 +-- .../user-order-detail/user-order-detail.js | 11 +-- .../old/alipay/pages/user-order/user-order.js | 74 ++++-------------- .../user-orderaftersale-detail.acss | 10 +++ .../user-orderaftersale-detail.axml | 2 +- .../user-orderaftersale-detail.js | 4 +- public/appmini/old/alipay/pages/user/user.js | 20 +---- public/appmini/old/baidu/pages/login/login.js | 8 +- .../old/baidu/pages/user-order/user-order.js | 8 +- .../user-orderaftersale-detail.css | 10 +++ .../user-orderaftersale-detail.swan | 2 +- public/appmini/old/weixin/app.js | 36 ++++----- .../appmini/old/weixin/pages/login/login.js | 14 ++-- .../old/weixin/pages/user-order/user-order.js | 8 +- .../user-orderaftersale-detail.wxml | 2 +- .../user-orderaftersale-detail.wxss | 10 +++ 34 files changed, 209 insertions(+), 547 deletions(-) diff --git a/public/appmini/old/alipay/app.js b/public/appmini/old/alipay/app.js index eba27bd88..1d9f055ea 100644 --- a/public/appmini/old/alipay/app.js +++ b/public/appmini/old/alipay/app.js @@ -63,8 +63,8 @@ App({ // 请求地址 request_url: "{{request_url}}", - request_url: 'http://tp5-dev.com/', - request_url: 'http://test.shopxo.net/', + // request_url: 'http://tp5-dev.com/', + // request_url: 'http://test.shopxo.net/', // 基础信息 application_title: "{{application_title}}", @@ -225,7 +225,7 @@ App({ var openid = my.getStorageSync({key: this.data.cache_user_login_key}); if ((openid.data || null) == null) { - var $this = this; + var self = this; // 加载loding my.showLoading({ content: "授权中..." }); @@ -235,7 +235,7 @@ App({ success: res => { if (res.authCode) { my.request({ - url: $this.get_request_url("alipayuserauth", "user"), + url: self.get_request_url("alipayuserauth", "user"), method: "POST", data: {authcode: res.authCode}, dataType: "json", @@ -247,7 +247,7 @@ App({ if((data.is_alipay_user_exist || 0) == 1) { my.setStorage({ - key: $this.data.cache_user_info_key, + key: self.data.cache_user_info_key, data: data, success: (res) => { if (typeof object === 'object' && (method || null) != null) { @@ -255,46 +255,30 @@ App({ } }, fail: () => { - my.showToast({ - type: "fail", - content: "用户信息缓存失败", - duration: 3000 - }); + self.showToast('用户信息缓存失败'); } }); } else { my.setStorageSync({ - key: $this.data.cache_user_login_key, + key: self.data.cache_user_login_key, data: res.data.data.openid }); - $this.login_to_auth(); + self.login_to_auth(); } } else { - my.showToast({ - type: "fail", - content: res.data.msg, - duration: 3000 - }); + self.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错", - duration: 3000 - }); + self.showToast('服务器请求出错'); } }); } }, fail: e => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "授权失败", - duration: 3000 - }); + self.showToast('授权失败'); } }); } else { @@ -350,11 +334,11 @@ App({ // 请求数据 my.showLoading({ content: "授权中..." }); - var $this = this; + var self = this; userinfo['openid'] = openid; userinfo['referrer'] = (params.data == null) ? 0 : (params.data.referrer || 0); my.request({ - url: $this.get_request_url('alipayuserinfo', 'user'), + url: self.get_request_url('alipayuserinfo', 'user'), method: 'POST', data: userinfo, dataType: 'json', @@ -363,7 +347,7 @@ App({ my.hideLoading(); if (res.data.code == 0) { my.setStorage({ - key: $this.data.cache_user_info_key, + key: self.data.cache_user_info_key, data: res.data.data, success: (res) => { if (typeof object === 'object' && (method || null) != null) { @@ -371,28 +355,16 @@ App({ } }, fail: () => { - my.showToast({ - type: "fail", - content: "用户信息缓存失败", - duration: 3000 - }); + self.showToast('用户信息缓存失败'); } }); } else { - my.showToast({ - type: "fail", - content: res.data.msg, - duration: 3000 - }); + self.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错", - duration: 3000 - }); + self.showToast('服务器请求出错'); }, }); }, @@ -404,7 +376,7 @@ App({ */ use_location(object, method) { my.showLoading({ content: "定位中..." }); - + var self = this; my.getLocation({ success(res) { my.hideLoading(); @@ -432,15 +404,15 @@ App({ break; case 12: - my.showToast({ content: "网络异常,请重试[" + e.error + "]" }); + self.showToast("网络异常,请重试[" + e.error + "]"); break; case 13: - my.showToast({ content: "定位失败,请重试[" + e.error + "]" }); + self.showToast("定位失败,请重试[" + e.error + "]"); break; default: - my.showToast({ content: "定位超时,请重试[" + e.error + "]" }); + self.showToast("定位超时,请重试[" + e.error + "]"); } } }); @@ -458,10 +430,7 @@ App({ if ((temp_value == undefined || temp_value.length == 0 || temp_value == -1) || (temp_is_can_zero == null && temp_value == 0) ) { - my.showToast({ - type: "fail", - content: validation[i]["msg"] - }); + this.showToast(validation[i]["msg"]); return false; } } @@ -610,7 +579,7 @@ App({ case 3 : var values = value.split('|'); if (values.length != 4) { - my.showToast({content: '事件值格式有误'}); + this.showToast('事件值格式有误'); return false; } diff --git a/public/appmini/old/alipay/app.json b/public/appmini/old/alipay/app.json index 8bda1bea0..39578bdef 100644 --- a/public/appmini/old/alipay/app.json +++ b/public/appmini/old/alipay/app.json @@ -27,7 +27,7 @@ "pages/user-orderaftersale-detail/user-orderaftersale-detail" ], "window": { - "defaultTitle": "test", + "defaultTitle": "{{application_title}}", "titleBarColor": "#d2364c" }, "tabBar": { diff --git a/public/appmini/old/alipay/pages/answer-form/answer-form.js b/public/appmini/old/alipay/pages/answer-form/answer-form.js index 953853ee4..cde7a2276 100755 --- a/public/appmini/old/alipay/pages/answer-form/answer-form.js +++ b/public/appmini/old/alipay/pages/answer-form/answer-form.js @@ -71,10 +71,7 @@ Page({ if(res.data.code == 0) { - my.showToast({ - type: 'success', - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); setTimeout(function() { my.redirectTo({ @@ -83,21 +80,13 @@ Page({ }, 2000); } else { this.setData({form_submit_loading: false}); - - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); this.setData({form_submit_loading: false}); - - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/answer-list/answer-list.js b/public/appmini/old/alipay/pages/answer-list/answer-list.js index 15ea29758..729c1cd46 100755 --- a/public/appmini/old/alipay/pages/answer-list/answer-list.js +++ b/public/appmini/old/alipay/pages/answer-list/answer-list.js @@ -76,11 +76,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -89,10 +85,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/buy/buy.js b/public/appmini/old/alipay/pages/buy/buy.js index 88fc50b7e..074c2a7e2 100755 --- a/public/appmini/old/alipay/pages/buy/buy.js +++ b/public/appmini/old/alipay/pages/buy/buy.js @@ -116,10 +116,7 @@ Page({ data_list_loding_status: 2, data_list_loding_msg: res.data.msg, }); - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -128,11 +125,7 @@ Page({ data_list_loding_status: 2, data_list_loding_msg: '服务器请求出错', }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -179,21 +172,14 @@ Page({ my.redirectTo({url: '/pages/user-order/user-order'}); } } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); this.setData({ buy_submit_disabled_status: false }); } }, fail: () => { my.hideLoading(); this.setData({buy_submit_disabled_status: false}); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/cart/cart.js b/public/appmini/old/alipay/pages/cart/cart.js index 1f8b6971b..8d000b20e 100644 --- a/public/appmini/old/alipay/pages/cart/cart.js +++ b/public/appmini/old/alipay/pages/cart/cart.js @@ -90,10 +90,7 @@ Page({ data_bottom_line_status: false, data_list_loding_msg: res.data.msg, }); - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -103,11 +100,7 @@ Page({ data_bottom_line_status: false, data_list_loding_msg: '服务器请求出错', }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -147,18 +140,18 @@ Page({ if (buy_number < buy_min_number) { buy_number = buy_min_number; if (buy_min_number > 1) { - my.showToast({ content: '起购' + buy_min_number + inventory_unit }); + app.showToast('起购' + buy_min_number + inventory_unit ); return false; } } if (buy_max_number > 0 && buy_number > buy_max_number) { buy_number = buy_max_number; - my.showToast({ content: '限购' + buy_max_number + inventory_unit }); + app.showToast('限购' + buy_max_number + inventory_unit ); return false; } if (buy_number > inventory) { buy_number = inventory; - my.showToast({ content: '库存数量' + inventory + inventory_unit }); + app.showToast('库存数量' + inventory + inventory_unit ); return false; } @@ -183,17 +176,11 @@ Page({ // 选择处理 this.selected_calculate(); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -242,17 +229,11 @@ Page({ if (res.data.code == 0) { this.cart_delete(id, type); } else { - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); }, @@ -274,23 +255,13 @@ Page({ swipe_index: null, data_list_loding_status: temp_data_list.length == 0 ? 0 : this.data.data_list_loding_status, }); - - my.showToast({ - type: 'success', - content: (type == 'delete') ? '删除成功' : '收藏成功' - }); + app.showToast(((type == 'delete') ? '删除成功' : '收藏成功'), 'success'); } else { - my.showToast({ - type: 'fail', - content: (type == 'delete') ? '删除失败' : '收藏失败' - }); + app.showToast((type == 'delete') ? '删除失败' : '收藏失败'); } }, fail: () => { - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); }, @@ -360,10 +331,7 @@ Page({ } if (selected_count <= 0) { - my.showToast({ - type: "fail", - content: '请选择商品' - }); + app.showToast('请选择商品'); return false } diff --git a/public/appmini/old/alipay/pages/goods-category/goods-category.js b/public/appmini/old/alipay/pages/goods-category/goods-category.js index b2d18ec98..444732325 100755 --- a/public/appmini/old/alipay/pages/goods-category/goods-category.js +++ b/public/appmini/old/alipay/pages/goods-category/goods-category.js @@ -49,11 +49,7 @@ Page({ data_list_loding_status: 0, data_bottom_line_status: true, }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -62,11 +58,7 @@ Page({ data_list_loding_status: 2, data_bottom_line_status: true, }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/goods-detail/goods-detail.js b/public/appmini/old/alipay/pages/goods-detail/goods-detail.js index d10f41348..b839348a8 100644 --- a/public/appmini/old/alipay/pages/goods-detail/goods-detail.js +++ b/public/appmini/old/alipay/pages/goods-detail/goods-detail.js @@ -165,11 +165,7 @@ Page({ data_list_loding_status: 2, data_list_loding_msg: '服务器请求出错', }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -271,24 +267,14 @@ Page({ goods_favor_text: (status == 1) ? '已收藏' : '收藏', goods_favor_icon: '/images/goods-detail-favor-icon-'+status+'.png' }); - my.showToast({ - type: 'success', - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); } @@ -317,24 +303,14 @@ Page({ my.hideLoading(); if (res.data.code == 0) { this.popup_close_event(); - my.showToast({ - type: 'success', - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); } @@ -458,17 +434,11 @@ Page({ this.setData({goods_specifications_choose: temp_data}); } } else { - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); }, @@ -519,17 +489,11 @@ Page({ goods_spec_base_inventory: res.data.data.inventory, }); } else { - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); }, @@ -565,18 +529,18 @@ Page({ buy_number = buy_min_number; if(buy_min_number > 1) { - my.showToast({content: '起购'+buy_min_number+inventory_unit}); + app.showToast('起购'+buy_min_number+inventory_unit); } } if(buy_max_number > 0 && buy_number > buy_max_number) { buy_number = buy_max_number; - my.showToast({content: '限购'+buy_max_number+inventory_unit}); + app.showToast('限购'+buy_max_number+inventory_unit); } if(buy_number > inventory) { buy_number = inventory; - my.showToast({content: '库存数量'+inventory+inventory_unit}); + app.showToast('库存数量'+inventory+inventory_unit); } this.setData({temp_buy_number: buy_number}); }, @@ -612,10 +576,7 @@ Page({ } if(active_count < sku_count) { - my.showToast({ - type: 'fail', - content: '请选择属性' - }); + app.showToast('请选择属性'); return false; } } @@ -641,10 +602,7 @@ Page({ break; default : - my.showToast({ - type: "fail", - content: "操作事件类型有误" - }); + app.showToast('操作事件类型有误'); } } } diff --git a/public/appmini/old/alipay/pages/goods-search/goods-search.js b/public/appmini/old/alipay/pages/goods-search/goods-search.js index 83eda3ee9..d122b5333 100755 --- a/public/appmini/old/alipay/pages/goods-search/goods-search.js +++ b/public/appmini/old/alipay/pages/goods-search/goods-search.js @@ -113,11 +113,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -127,10 +123,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/index/index.acss b/public/appmini/old/alipay/pages/index/index.acss index 251a63233..c17ef10c6 100644 --- a/public/appmini/old/alipay/pages/index/index.acss +++ b/public/appmini/old/alipay/pages/index/index.acss @@ -197,6 +197,7 @@ border: 0; color: #fff; padding: 0 30rpx; + height: 65rpx; line-height: 65rpx; font-size: 30rpx; border-radius: 6rpx; diff --git a/public/appmini/old/alipay/pages/index/index.js b/public/appmini/old/alipay/pages/index/index.js index a283ce4ae..2b3291ae2 100644 --- a/public/appmini/old/alipay/pages/index/index.js +++ b/public/appmini/old/alipay/pages/index/index.js @@ -69,11 +69,7 @@ Page({ data_list_loding_status: 0, data_bottom_line_status: true, }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -83,11 +79,7 @@ Page({ data_bottom_line_status: true, load_status: 1, }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -96,7 +88,7 @@ Page({ search_input_event(e) { var keywords = e.detail.value || null; if (keywords == null) { - my.showToast({content: '请输入搜索关键字'}); + app.showToast('请输入搜索关键字'); return false; } diff --git a/public/appmini/old/alipay/pages/login/login.js b/public/appmini/old/alipay/pages/login/login.js index 464b15a6a..07672e456 100644 --- a/public/appmini/old/alipay/pages/login/login.js +++ b/public/appmini/old/alipay/pages/login/login.js @@ -80,7 +80,7 @@ Page({ if(app.fields_check(this.data, validation)) { // 网络请求 - var $this = this; + var self = this; my.showLoading({content: '发送中...'}); this.setData({verify_submit_text: '发送中', verify_loading: true, verify_disabled: true}); @@ -100,30 +100,22 @@ Page({ { if(temp_time <= 1) { - clearInterval($this.data.temp_clear_time); - $this.setData({verify_submit_text: '获取验证码', verify_disabled: false}); + clearInterval(self.data.temp_clear_time); + self.setData({verify_submit_text: '获取验证码', verify_disabled: false}); } else { temp_time--; - $this.setData({verify_submit_text: '剩余 '+temp_time+' 秒'}); + self.setData({verify_submit_text: '剩余 '+temp_time+' 秒'}); } }, 1000); } else { this.setData({verify_submit_text: '获取验证码', verify_loading: false, verify_disabled: false}); - - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); this.setData({verify_submit_text: '获取验证码', verify_loading: false, verify_disabled: false}); - - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); } @@ -169,10 +161,7 @@ Page({ if(res.data.code == 0 && (res.data.data || null) != null) { clearInterval(this.data.temp_clear_time); - my.showToast({ - type: 'success', - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); my.setStorage({ key: app.data.cache_user_info_key, @@ -191,21 +180,13 @@ Page({ }, 1000); } else { this.setData({form_submit_loading: false}); - - my.showToast({ - type: 'fail', - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); this.setData({form_submit_loading: false}); - - my.showToast({ - type: 'fail', - content: '服务器请求出错' - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/message/message.js b/public/appmini/old/alipay/pages/message/message.js index 78f19470c..df403a388 100755 --- a/public/appmini/old/alipay/pages/message/message.js +++ b/public/appmini/old/alipay/pages/message/message.js @@ -98,11 +98,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -112,10 +108,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/user-address-save/user-address-save.js b/public/appmini/old/alipay/pages/user-address-save/user-address-save.js index 33910290e..15255c508 100755 --- a/public/appmini/old/alipay/pages/user-address-save/user-address-save.js +++ b/public/appmini/old/alipay/pages/user-address-save/user-address-save.js @@ -104,18 +104,12 @@ Page({ self.init_value(); }, 500); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -136,17 +130,11 @@ Page({ province_list: data }); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -169,17 +157,11 @@ Page({ city_list: data }); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -204,17 +186,11 @@ Page({ county_list: data }); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -314,26 +290,17 @@ Page({ success: res => { my.hideLoading(); if (res.data.code == 0) { - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); setTimeout(function() { my.navigateBack(); }, 1000); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/user-address/user-address.js b/public/appmini/old/alipay/pages/user-address/user-address.js index a68c81ba4..e4424891c 100755 --- a/public/appmini/old/alipay/pages/user-address/user-address.js +++ b/public/appmini/old/alipay/pages/user-address/user-address.js @@ -86,10 +86,7 @@ Page({ data_list_loding_status: 0 }); - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } }, fail: () => { @@ -99,10 +96,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -118,10 +112,7 @@ Page({ var value = e.currentTarget.dataset.value || null; if(value == null) { - my.showToast({ - type: "fail", - content: '地址ID有误' - }); + app.showToast('地址ID有误'); return false; } @@ -154,11 +145,7 @@ Page({ data_list_loding_status: temp_data.length == 0 ? 0 : 3, data_bottom_line_status: temp_data.length == 0 ? false : true, }); - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); // 当前删除是否存在缓存中,存在则删除 var cache_address = my.getStorageSync({ @@ -172,19 +159,12 @@ Page({ } } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -197,20 +177,14 @@ Page({ var value = e.currentTarget.dataset.value || null; if(value == null) { - my.showToast({ - type: "fail", - content: '地址ID有误' - }); + app.showToast('地址ID有误'); return false; } var self = this; if(value == self.data.is_default) { - my.showToast({ - type: "success", - content: '设置成功' - }); + app.showToast('设置成功', 'success'); return false; } @@ -229,25 +203,14 @@ Page({ if (res.data.code == 0) { self.setData({is_default: value}); - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/user-answer-list/user-answer-list.js b/public/appmini/old/alipay/pages/user-answer-list/user-answer-list.js index 1c5207e7a..b412f1540 100755 --- a/public/appmini/old/alipay/pages/user-answer-list/user-answer-list.js +++ b/public/appmini/old/alipay/pages/user-answer-list/user-answer-list.js @@ -98,11 +98,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -112,10 +108,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/user-faovr/user-faovr.js b/public/appmini/old/alipay/pages/user-faovr/user-faovr.js index 281102e36..5b946df26 100755 --- a/public/appmini/old/alipay/pages/user-faovr/user-faovr.js +++ b/public/appmini/old/alipay/pages/user-faovr/user-faovr.js @@ -96,11 +96,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -110,10 +106,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -166,24 +159,14 @@ Page({ data_bottom_line_status: false, }); } - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/user-goods-browse/user-goods-browse.js b/public/appmini/old/alipay/pages/user-goods-browse/user-goods-browse.js index 7cda1e97a..ac3af7034 100755 --- a/public/appmini/old/alipay/pages/user-goods-browse/user-goods-browse.js +++ b/public/appmini/old/alipay/pages/user-goods-browse/user-goods-browse.js @@ -95,11 +95,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -109,10 +105,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -164,24 +157,14 @@ Page({ data_bottom_line_status: false, }); } - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } diff --git a/public/appmini/old/alipay/pages/user-integral/user-integral.js b/public/appmini/old/alipay/pages/user-integral/user-integral.js index 74df7e1d3..cf96d362f 100755 --- a/public/appmini/old/alipay/pages/user-integral/user-integral.js +++ b/public/appmini/old/alipay/pages/user-integral/user-integral.js @@ -98,11 +98,7 @@ Page({ this.setData({ data_list_loding_status: 0 }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -112,10 +108,7 @@ Page({ this.setData({ data_list_loding_status: 2 }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/user-order-detail/user-order-detail.js b/public/appmini/old/alipay/pages/user-order-detail/user-order-detail.js index aa06a3d52..ae89b389a 100755 --- a/public/appmini/old/alipay/pages/user-order-detail/user-order-detail.js +++ b/public/appmini/old/alipay/pages/user-order-detail/user-order-detail.js @@ -70,10 +70,7 @@ Page({ data_bottom_line_status: false, data_list_loding_msg: res.data.msg, }); - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -84,11 +81,7 @@ Page({ data_bottom_line_status: false, data_list_loding_msg: '服务器请求出错', }); - - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, diff --git a/public/appmini/old/alipay/pages/user-order/user-order.js b/public/appmini/old/alipay/pages/user-order/user-order.js index 23715cf55..3916f3ea0 100755 --- a/public/appmini/old/alipay/pages/user-order/user-order.js +++ b/public/appmini/old/alipay/pages/user-order/user-order.js @@ -164,11 +164,7 @@ Page({ data_list_loding_status: 0, load_status: 1, }); - - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { @@ -179,10 +175,7 @@ Page({ data_list_loding_status: 2, load_status: 1, }); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -245,11 +238,7 @@ Page({ temp_data_list[index]['status'] = 2; temp_data_list[index]['status_name'] = '待发货'; this.setData({ data_list: temp_data_list }); - - my.showToast({ - type: "success", - content: '支付成功' - }); + app.showToast('支付成功', 'success'); } else { my.tradePay({ tradeNO: res.data.data.data, @@ -272,26 +261,17 @@ Page({ }); }, fail: res => { - my.showToast({ - type: "fail", - content: "唤起支付模块失败" - }); + app.showToast('唤起支付模块失败'); } }); } } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -325,24 +305,14 @@ Page({ temp_data_list[index]['status'] = 5; temp_data_list[index]['status_name'] = '已取消'; this.setData({data_list: temp_data_list}); - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -379,24 +349,14 @@ Page({ temp_data_list[index]['status'] = 4; temp_data_list[index]['status_name'] = '已完成'; this.setData({data_list: temp_data_list}); - - my.showToast({ - type: "success", - content: res.data.msg - }); + app.showToast(res.data.msg, 'success'); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.hideLoading(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); } @@ -406,10 +366,7 @@ Page({ // 催催 rush_event(e) { - my.showToast({ - type: "success", - content: "催促成功" - }); + app.showToast('催促成功', 'success'); }, // 导航事件 @@ -427,10 +384,7 @@ Page({ var did = e.target.dataset.did || 0; if(oid == 0 || did == 0) { - my.showToast({ - type: "fail", - content: "参数有误" - }); + app.showToast('参数有误'); return false; } diff --git a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.acss b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.acss index bf9a2510b..0e6e14049 100644 --- a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.acss +++ b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.acss @@ -147,4 +147,14 @@ width: 200rpx; height: 200rpx; display: block; +} + +/* + * 退货弹层 + */ +.delivery-popup { + padding-top: 20rpx; +} +.delivery-popup .close { + margin-right: 20rpx; } \ No newline at end of file diff --git a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.axml b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.axml index 7a42a81ae..66a077622 100644 --- a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.axml +++ b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.axml @@ -140,7 +140,7 @@ -