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 @@ - + diff --git a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js index 3091957d2..9ab678339 100644 --- a/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js +++ b/public/appmini/old/alipay/pages/user-orderaftersale-detail/user-orderaftersale-detail.js @@ -237,7 +237,7 @@ Page({ // 上传图片预览 upload_show_event(e) { my.previewImage({ - current: this.data.form_images_list[e.target.dataset.index], + current: e.target.dataset.index, urls: this.data.form_images_list, }); }, @@ -448,7 +448,7 @@ Page({ // 凭证图片预览 images_view_event(e) { my.previewImage({ - current: this.data.new_aftersale_data.images[e.target.dataset.index], + current: e.target.dataset.index, urls: this.data.new_aftersale_data.images, }); }, diff --git a/public/appmini/old/alipay/pages/user/user.js b/public/appmini/old/alipay/pages/user/user.js index 947ede423..e7f6b0727 100644 --- a/public/appmini/old/alipay/pages/user/user.js +++ b/public/appmini/old/alipay/pages/user/user.js @@ -111,18 +111,12 @@ Page({ navigation: data.navigation || [], }); } else { - my.showToast({ - type: "fail", - content: res.data.msg - }); + app.showToast(res.data.msg); } }, fail: () => { my.stopPullDownRefresh(); - my.showToast({ - type: "fail", - content: "服务器请求出错" - }); + app.showToast('服务器请求出错'); } }); }, @@ -130,20 +124,14 @@ Page({ // 清除缓存 clear_storage(e) { my.clearStorage() - my.showToast({ - type: "success", - content: "清除缓存成功" - }); + app.showToast('清除缓存成功', 'success'); }, // 客服电话 call_event() { if(this.data.customer_service_tel == null) { - my.showToast({ - type: "fail", - content: "客服电话有误" - }); + app.showToast('客服电话有误'); } else { my.makePhoneCall({ number: this.data.customer_service_tel }); } diff --git a/public/appmini/old/baidu/pages/login/login.js b/public/appmini/old/baidu/pages/login/login.js index f465651ac..6e3f862e3 100755 --- a/public/appmini/old/baidu/pages/login/login.js +++ b/public/appmini/old/baidu/pages/login/login.js @@ -59,7 +59,7 @@ Page({ var validation = [{ fields: 'mobile', msg: '请填写手机号码' }]; if (app.fields_check(this.data, validation)) { // 网络请求 - var $this = this; + var self = this; swan.showLoading({ title: '发送中...' }); this.setData({ verify_submit_text: '发送中', verify_loading: true, verify_disabled: true }); @@ -76,11 +76,11 @@ Page({ var temp_time = this.data.verify_time_total; this.data.temp_clear_time = setInterval(function () { 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 { diff --git a/public/appmini/old/baidu/pages/user-order/user-order.js b/public/appmini/old/baidu/pages/user-order/user-order.js index 7528be2ad..17bf1c21d 100755 --- a/public/appmini/old/baidu/pages/user-order/user-order.js +++ b/public/appmini/old/baidu/pages/user-order/user-order.js @@ -198,7 +198,7 @@ Page({ // 支付方法 pay_handle(order_id, index) { - var $this = this; + var self = this; // 加载loding swan.showLoading({ title: "请求中..." }); @@ -226,14 +226,14 @@ Page({ orderInfo: res.data.data.data, success: function (res) { // 数据设置 - var temp_data_list = $this.data.data_list; + var temp_data_list = self.data.data_list; temp_data_list[index]['status'] = 2; temp_data_list[index]['status_name'] = '待发货'; - $this.setData({ data_list: temp_data_list }); + self.setData({ data_list: temp_data_list }); // 跳转支付页面 swan.navigateTo({ - url: "/pages/paytips/paytips?code=9000&total_price=" + $this.data.data_list[index]['total_price'] + url: "/pages/paytips/paytips?code=9000&total_price=" + self.data.data_list[index]['total_price'] }); }, fail: function (res) { diff --git a/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.css b/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.css index bf9a2510b..0e6e14049 100644 --- a/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.css +++ b/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.css @@ -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/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.swan b/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.swan index ad27a9426..ffbceb240 100644 --- a/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.swan +++ b/public/appmini/old/baidu/pages/user-orderaftersale-detail/user-orderaftersale-detail.swan @@ -140,7 +140,7 @@ -