From a8ce5699c9fd116b0600565ecfc78e67b0ce3bc9 Mon Sep 17 00:00:00 2001 From: Devil Date: Mon, 15 Mar 2021 18:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=8F=96=E8=B4=A7=E5=9C=B0=E5=9D=80=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/shopxo.php | 2 +- sourcecode/alipay/default/app.json | 1 + .../extraction-address/extraction-address.js | 2 +- .../extraction-apply/extraction-apply.js | 2 +- .../extraction-switch/extraction-switch.acss | 28 ++ .../extraction-switch/extraction-switch.axml | 42 +++ .../extraction-switch/extraction-switch.js | 225 ++++++++++++++++ .../extraction-switch/extraction-switch.json | 3 + .../user-address-save/user-address-save.js | 3 + sourcecode/baidu/default/app.json | 1 + .../extraction-apply/extraction-apply.js | 2 +- .../extraction-switch/extraction-switch.css | 28 ++ .../extraction-switch/extraction-switch.js | 244 ++++++++++++++++++ .../extraction-switch/extraction-switch.json | 3 + .../extraction-switch/extraction-switch.swan | 42 +++ .../user-address-save/user-address-save.js | 5 +- .../user-address-save/user-address-save.js | 3 + sourcecode/toutiao/default/app.json | 2 + .../open-setting-location.js | 72 ++++++ .../open-setting-location.json | 4 + .../open-setting-location.ttml | 10 + .../open-setting-location.ttss | 39 +++ .../extraction-apply/extraction-apply.js | 114 ++++---- .../extraction-apply/extraction-apply.ttml | 23 +- .../extraction-switch/extraction-switch.js | 225 ++++++++++++++++ .../extraction-switch/extraction-switch.json | 3 + .../extraction-switch/extraction-switch.ttml | 42 +++ .../extraction-switch/extraction-switch.ttss | 28 ++ .../user-address-save/user-address-save.js | 45 ++-- .../user-address-save/user-address-save.ttml | 4 +- sourcecode/weixin/default/app.js | 4 +- .../extraction-apply/extraction-apply.js | 2 +- .../extraction-switch/extraction-switch.wxml | 8 +- .../extraction-switch/extraction-switch.wxss | 4 +- 34 files changed, 1154 insertions(+), 111 deletions(-) create mode 100644 sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.acss create mode 100644 sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.axml create mode 100644 sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.js create mode 100644 sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.json create mode 100644 sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.css create mode 100644 sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.js create mode 100644 sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.json create mode 100644 sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.swan create mode 100644 sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.js create mode 100644 sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.json create mode 100644 sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttml create mode 100644 sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttss create mode 100644 sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.js create mode 100644 sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.json create mode 100644 sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttml create mode 100644 sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttss diff --git a/config/shopxo.php b/config/shopxo.php index cf17c6a9e..99bb56383 100755 --- a/config/shopxo.php +++ b/config/shopxo.php @@ -28,7 +28,7 @@ if(substr($cdn_public_host, -1) != DS) // 配置信息 return [ // 开发模式 - 'is_develop' => true, + 'is_develop' => false, // 默认编码 'default_charset' => 'utf-8', diff --git a/sourcecode/alipay/default/app.json b/sourcecode/alipay/default/app.json index bd7ccdfd7..ceb587231 100644 --- a/sourcecode/alipay/default/app.json +++ b/sourcecode/alipay/default/app.json @@ -50,6 +50,7 @@ "pages/plugins/distribution/extraction/extraction", "pages/plugins/distribution/extraction-apply/extraction-apply", "pages/plugins/distribution/extraction-order/extraction-order", + "pages/plugins/distribution/extraction-switch/extraction-switch", "pages/plugins/distribution/introduce/introduce", "pages/plugins/wallet/user/user", "pages/plugins/wallet/recharge/recharge", diff --git a/sourcecode/alipay/default/pages/extraction-address/extraction-address.js b/sourcecode/alipay/default/pages/extraction-address/extraction-address.js index baf157a85..f37902bc9 100644 --- a/sourcecode/alipay/default/pages/extraction-address/extraction-address.js +++ b/sourcecode/alipay/default/pages/extraction-address/extraction-address.js @@ -76,7 +76,7 @@ Page({ // 地址信息初始化 user_location_init() { - var result = my.getStorageSync(this.data.user_location_cache_key) || null; + var result = my.getStorageSync({key: this.data.user_location_cache_key}) || null; var data = null; if (result != null && (result.data || null) != null) { diff --git a/sourcecode/alipay/default/pages/plugins/distribution/extraction-apply/extraction-apply.js b/sourcecode/alipay/default/pages/plugins/distribution/extraction-apply/extraction-apply.js index 849b3d5dd..30d30eedb 100644 --- a/sourcecode/alipay/default/pages/plugins/distribution/extraction-apply/extraction-apply.js +++ b/sourcecode/alipay/default/pages/plugins/distribution/extraction-apply/extraction-apply.js @@ -328,7 +328,7 @@ Page({ ]; // logo - form_data['logo'] = this.data.extraction_data.logo || ''; + form_data['logo'] = (this.data.extraction_data || null) != null ? (this.data.extraction_data.logo || '') : ''; // 地区 form_data["province"] = self.data.province_id; diff --git a/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.acss b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.acss new file mode 100644 index 000000000..fbb77e04e --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.acss @@ -0,0 +1,28 @@ +.item { + padding: 10rpx 10rpx 0 10rpx; +} +.address-logo { + width: 140rpx; + height: 140rpx !important; +} +.base, .address, .operation { + padding: 20rpx 0; +} +.address .item-icon { + width: 30rpx; + height: 35rpx !important; +} +.address-alias { + border: 1px solid #d2364c; + color: #d2364c; + padding: 2rpx 10rpx; + border-radius: 6rpx; + margin-right: 10rpx; +} +.address .text { + line-height: 44rpx; + width: calc(100% - 40rpx); +} +.operation .button-list button:not(:last-child) { + margin-right: 20rpx; +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.axml b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.axml new file mode 100644 index 000000000..fa15697f0 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.axml @@ -0,0 +1,42 @@ + + + + + + + + + + {{item.alias}} + {{item.name}} + {{item.tel}} + + + + {{item.province_name || ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''}} + + + + + + 距离 + {{item.distance_value}} + {{item.distance_unit}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.js b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.js new file mode 100644 index 000000000..d313677d4 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.js @@ -0,0 +1,225 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_bottom_line_status: false, + data_list: [], + params: null, + + user_location_cache_key: app.data.cache_userlocation_key, + user_location: null, + is_first: 1, + home_extraction_address_position: 0, + }, + + onLoad(params) { + this.setData({ + params: params, + home_extraction_address_position: app.get_config('config.home_extraction_address_position', 0), + }); + }, + + onReady: function () { + // 清除位置缓存信息 + my.removeStorage({key: this.data.user_location_cache_key}); + + // 是否获取位置 + if(this.data.home_extraction_address_position == 1) + { + my.navigateTo({ + url: '/pages/common/open-setting-location/open-setting-location' + }); + } + }, + + onShow() { + my.setNavigationBar({ title: app.data.common_pages_title.extraction_address }); + + // 是否需要选择地理位置 + if(this.data.home_extraction_address_position == 1) + { + // 首次不请求数据 + if(this.data.is_first == 0) + { + this.user_location_init(); + this.init(); + } + } else { + this.init(); + } + + this.setData({ is_first: 0 }); + }, + + // 初始化 + init() { + var user = app.get_user_info(this, "init"); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + my.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 地址信息初始化 + user_location_init() { + var result = my.getStorageSync({key: this.data.user_location_cache_key}) || null; + var data = null; + if (result != null && (result.data || null) != null) + { + data = { + name: result.data.name || null, + address: result.data.address || null, + lat: result.data.latitude || null, + lng: result.data.longitude || null + } + } + this.setData({user_location: data}); + }, + + // 获取数据列表 + get_data_list() { + // 加载loding + my.showLoading({ content: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 获取数据 + var data = {}; + + // 是否有坐标 + if((this.data.user_location || null) != null) + { + data['lng'] = this.data.user_location.lng; + data['lat'] = this.data.user_location.lat; + } + + // 请求接口 + my.request({ + url: app.get_request_url("switchinfo", "extraction", "distribution"), + method: "POST", + data: data, + dataType: "json", + success: res => { + my.hideLoading(); + my.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + if (data.extraction_address.length > 0) { + this.setData({ + data_list: data.extraction_address, + data_list_loding_status: 3, + data_bottom_line_status: true, + }); + } else { + this.setData({ + data_list_loding_status: 0 + }); + } + } else { + this.setData({ + data_list_loding_status: 0 + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + my.hideLoading(); + my.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data_list(); + }, + + // 地图查看 + address_map_event(e) { + var index = e.currentTarget.dataset.index || 0; + var data = this.data.data_list[index] || null; + if (data == null) + { + app.showToast("地址有误"); + return false; + } + + // 打开地图 + var name = data.alias || data.name || ''; + var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || ''); + app.open_location(data.lng, data.lat, name, address); + }, + + // 地址内容事件 + address_conent_event(e) { + var index = e.currentTarget.dataset.index || 0; + var is_back = this.data.params.is_back || 0; + if (is_back == 1) { + my.setStorage({ + key: app.data.cache_buy_user_address_select_key, + data: this.data.data_list[index] + }); + my.navigateBack(); + } + }, + + // 切换选择事件 + address_switch_event(e) { + var index = e.currentTarget.dataset.index || 0; + var temp_data = this.data.data_list; + if((temp_data[index] || null) == null) + { + app.showToast('数据有误'); + return false; + } + + // 请求切换 + var self = this; + my.showLoading({ content: "处理中..." }); + my.request({ + url: app.get_request_url("switchsave", "extraction", "distribution"), + method: "POST", + data: {"id":temp_data[index]['id'], "value":temp_data[index]['id_old'] || 0}, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + my.hideLoading(); + if (res.data.code == 0) { + app.showToast(res.data.msg, "success"); + self.get_data_list(); + } else { + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + my.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + }, +}); diff --git a/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.json b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.json new file mode 100644 index 000000000..ed3a57db1 --- /dev/null +++ b/sourcecode/alipay/default/pages/plugins/distribution/extraction-switch/extraction-switch.json @@ -0,0 +1,3 @@ +{ + "pullRefresh": true +} \ No newline at end of file diff --git a/sourcecode/alipay/default/pages/user-address-save/user-address-save.js b/sourcecode/alipay/default/pages/user-address-save/user-address-save.js index 7f2183ff6..2f8454d0e 100644 --- a/sourcecode/alipay/default/pages/user-address-save/user-address-save.js +++ b/sourcecode/alipay/default/pages/user-address-save/user-address-save.js @@ -45,6 +45,9 @@ Page({ } my.setNavigationBar({title: title}); + // 初始化配置 + this.init_config(); + // 清除位置缓存信息 my.removeStorage({key: this.data.user_location_cache_key}); this.init(); diff --git a/sourcecode/baidu/default/app.json b/sourcecode/baidu/default/app.json index 7df74f719..bb7f8ec6c 100755 --- a/sourcecode/baidu/default/app.json +++ b/sourcecode/baidu/default/app.json @@ -40,6 +40,7 @@ "pages/plugins/distribution/extraction/extraction", "pages/plugins/distribution/extraction-apply/extraction-apply", "pages/plugins/distribution/extraction-order/extraction-order", + "pages/plugins/distribution/extraction-switch/extraction-switch", "pages/plugins/distribution/introduce/introduce", "pages/plugins/exchangerate/currency/currency", "pages/plugins/invoice/user/user", diff --git a/sourcecode/baidu/default/pages/plugins/distribution/extraction-apply/extraction-apply.js b/sourcecode/baidu/default/pages/plugins/distribution/extraction-apply/extraction-apply.js index 82e327947..d7c9f8149 100644 --- a/sourcecode/baidu/default/pages/plugins/distribution/extraction-apply/extraction-apply.js +++ b/sourcecode/baidu/default/pages/plugins/distribution/extraction-apply/extraction-apply.js @@ -326,7 +326,7 @@ Page({ ]; // logo - form_data['logo'] = this.data.extraction_data.logo || ''; + form_data['logo'] = (this.data.extraction_data || null) != null ? (this.data.extraction_data.logo || '') : ''; // 地区 form_data["province"] = self.data.province_id; diff --git a/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.css b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.css new file mode 100644 index 000000000..fbb77e04e --- /dev/null +++ b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.css @@ -0,0 +1,28 @@ +.item { + padding: 10rpx 10rpx 0 10rpx; +} +.address-logo { + width: 140rpx; + height: 140rpx !important; +} +.base, .address, .operation { + padding: 20rpx 0; +} +.address .item-icon { + width: 30rpx; + height: 35rpx !important; +} +.address-alias { + border: 1px solid #d2364c; + color: #d2364c; + padding: 2rpx 10rpx; + border-radius: 6rpx; + margin-right: 10rpx; +} +.address .text { + line-height: 44rpx; + width: calc(100% - 40rpx); +} +.operation .button-list button:not(:last-child) { + margin-right: 20rpx; +} \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.js b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.js new file mode 100644 index 000000000..143189cc4 --- /dev/null +++ b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.js @@ -0,0 +1,244 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_bottom_line_status: false, + data_list: [], + params: null, + user_location_cache_key: app.data.cache_userlocation_key, + user_location: null, + is_first: 1, + home_extraction_address_position: 0 + }, + + onLoad(params) { + this.setData({ + params: params, + home_extraction_address_position: app.get_config('config.home_extraction_address_position', 0) + }); + }, + + onReady: function () { + // 清除位置缓存信息 + swan.removeStorage({ + key: this.data.user_location_cache_key + }); + + // 是否获取位置 + if (this.data.home_extraction_address_position == 1) { + swan.navigateTo({ + url: '/pages/common/open-setting-location/open-setting-location' + }); + } + }, + + onShow() { + swan.setNavigationBarTitle({ + title: app.data.common_pages_title.extraction_address + }); + + // 是否需要选择地理位置 + if (this.data.home_extraction_address_position == 1) { + // 首次不请求数据 + if (this.data.is_first == 0) { + this.user_location_init(); + this.init(); + } + } else { + this.init(); + } + + this.setData({ + is_first: 0 + }); + }, + + // 初始化 + init() { + var user = app.get_user_info(this, "init"); + + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + swan.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false + }); + } + }, + + // 地址信息初始化 + user_location_init() { + var result = swan.getStorageSync(this.data.user_location_cache_key) || null; + var data = null; + + if (result != null) { + data = { + name: result.name || null, + address: result.address || null, + lat: result.latitude || null, + lng: result.longitude || null + }; + } + + this.setData({ + user_location: data + }); + }, + + // 获取数据列表 + get_data_list() { + // 加载loding + swan.showLoading({ + title: "加载中..." + }); + this.setData({ + data_list_loding_status: 1 + }); + + // 获取数据 + var data = {}; + + // 是否有坐标 + if ((this.data.user_location || null) != null) { + data['lng'] = this.data.user_location.lng; + data['lat'] = this.data.user_location.lat; + } + + // 请求接口 + swan.request({ + url: app.get_request_url("switchinfo", "extraction", "distribution"), + method: "POST", + data: data, + dataType: "json", + success: res => { + swan.hideLoading(); + swan.stopPullDownRefresh(); + + if (res.data.code == 0) { + var data = res.data.data; + + if (data.extraction_address.length > 0) { + this.setData({ + data_list: data.extraction_address, + data_list_loding_status: 3, + data_bottom_line_status: true + }); + } else { + this.setData({ + data_list_loding_status: 0 + }); + } + } else { + this.setData({ + data_list_loding_status: 0 + }); + + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + swan.hideLoading(); + swan.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data_list(); + }, + + // 地图查看 + address_map_event(e) { + var index = e.currentTarget.dataset.index || 0; + var data = this.data.data_list[index] || null; + + if (data == null) { + app.showToast("地址有误"); + return false; + } + + // 打开地图 + var name = data.alias || data.name || ''; + var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || ''); + app.open_location(data.lng, data.lat, name, address); + }, + + // 地址内容事件 + address_conent_event(e) { + var index = e.currentTarget.dataset.index || 0; + var is_back = this.data.params.is_back || 0; + + if (is_back == 1) { + swan.setStorage({ + key: app.data.cache_buy_user_address_select_key, + data: this.data.data_list[index] + }); + swan.navigateBack(); + } + }, + + // 切换选择事件 + address_switch_event(e) { + var index = e.currentTarget.dataset.index || 0; + var temp_data = this.data.data_list; + + if ((temp_data[index] || null) == null) { + app.showToast('数据有误'); + return false; + } + + // 请求切换 + var self = this; + swan.showLoading({ + title: "处理中..." + }); + swan.request({ + url: app.get_request_url("switchsave", "extraction", "distribution"), + method: "POST", + data: { + "id": temp_data[index]['id'], + "value": temp_data[index]['id_old'] || 0 + }, + dataType: "json", + header: { + 'content-type': 'application/x-www-form-urlencoded' + }, + success: res => { + swan.hideLoading(); + + if (res.data.code == 0) { + app.showToast(res.data.msg, "success"); + self.get_data_list(); + } else { + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + swan.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + } + +}); \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.json b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.json new file mode 100644 index 000000000..3bd5ed8a4 --- /dev/null +++ b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.json @@ -0,0 +1,3 @@ +{ + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.swan b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.swan new file mode 100644 index 000000000..012d83c73 --- /dev/null +++ b/sourcecode/baidu/default/pages/plugins/distribution/extraction-switch/extraction-switch.swan @@ -0,0 +1,42 @@ + + + + + + + + + + {{item.alias}} + {{item.name}} + {{item.tel}} + + + + {{item.province_name || ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''}} + + + + + + 距离 + {{item.distance_value}} + {{item.distance_unit}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/baidu/default/pages/user-address-save/user-address-save.js b/sourcecode/baidu/default/pages/user-address-save/user-address-save.js index d3fd3cda5..ccc0527de 100755 --- a/sourcecode/baidu/default/pages/user-address-save/user-address-save.js +++ b/sourcecode/baidu/default/pages/user-address-save/user-address-save.js @@ -45,6 +45,9 @@ Page({ } swan.setNavigationBarTitle({title: title}); + // 初始化配置 + this.init_config(); + // 清除位置缓存信息 swan.removeStorage({key: this.data.user_location_cache_key}); this.init(); @@ -136,7 +139,7 @@ Page({ }}); } } - + // 获取城市、区县 self.get_city_list(); self.get_county_list(); diff --git a/sourcecode/qq/default/pages/user-address-save/user-address-save.js b/sourcecode/qq/default/pages/user-address-save/user-address-save.js index 8f62b2dc4..bf8d7b563 100755 --- a/sourcecode/qq/default/pages/user-address-save/user-address-save.js +++ b/sourcecode/qq/default/pages/user-address-save/user-address-save.js @@ -45,6 +45,9 @@ Page({ } qq.setNavigationBarTitle({title: title}); + // 初始化配置 + this.init_config(); + // 清除位置缓存信息 qq.removeStorage({key: this.data.user_location_cache_key}); this.init(); diff --git a/sourcecode/toutiao/default/app.json b/sourcecode/toutiao/default/app.json index 50a6f42b8..4dd424773 100755 --- a/sourcecode/toutiao/default/app.json +++ b/sourcecode/toutiao/default/app.json @@ -26,6 +26,7 @@ "pages/user-orderaftersale/user-orderaftersale", "pages/user-orderaftersale-detail/user-orderaftersale-detail", "pages/extraction-address/extraction-address", + "pages/common/open-setting-location/open-setting-location", "pages/plugins/coupon/index/index", "pages/plugins/coupon/user/user", "pages/plugins/membershiplevelvip/index/index", @@ -49,6 +50,7 @@ "pages/plugins/distribution/extraction/extraction", "pages/plugins/distribution/extraction-apply/extraction-apply", "pages/plugins/distribution/extraction-order/extraction-order", + "pages/plugins/distribution/extraction-switch/extraction-switch", "pages/plugins/distribution/introduce/introduce", "pages/plugins/wallet/user/user", "pages/plugins/wallet/recharge/recharge", diff --git a/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.js b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.js new file mode 100644 index 000000000..1889a1d60 --- /dev/null +++ b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.js @@ -0,0 +1,72 @@ +const app = getApp(); +Page({ + data: { + params: null, + is_show_open_setting: false, + auth: 'scope.userLocation', + cache_key: app.data.cache_userlocation_key, + }, + + onLoad: function (params) { + this.setData({ params: params }); + }, + + onShow() { + this.init(); + }, + + // 获取权限 + init() { + var self = this; + tt.getSetting({ + success(res) { + console.log(res) + if (!res.authSetting[self.data.auth]) { + tt.authorize({ + scope: self.data.auth, + success(res) { + self.choose_location(); + }, + fail: (res) => { + self.setData({ is_show_open_setting: true }); + } + }) + } else { + self.choose_location(); + } + }, + fail: (res) => { + app.showToast("请先获取授权"); + } + }); + }, + + // 打开设置方法 + opne_setting_event(e) { + var self = this; + tt.openSetting({ + success: (res) => { + if (res.authSetting[self.data.auth]) { + self.setData({ is_show_open_setting: false }); + self.choose_location(); + } + } + }); + }, + + // 打开位置服务 + choose_location() { + tt.chooseLocation({ + success: res => { + var position = app.map_gcj_to_bd(res.longitude, res.latitude); + res.longitude = position.lng; + res.latitude = position.lat; + tt.setStorageSync(this.data.cache_key, res); + tt.navigateBack(); + }, + fail: (res) => { + tt.navigateBack(); + } + }); + }, +}); \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.json b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.json new file mode 100644 index 000000000..d5e9491fa --- /dev/null +++ b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.json @@ -0,0 +1,4 @@ +{ + "enablePullDownRefresh": false, + "navigationStyle": "custom" +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttml b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttml new file mode 100644 index 000000000..8e52949fd --- /dev/null +++ b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttml @@ -0,0 +1,10 @@ + + + 开启相应的权限服务 + 获取[ 位置信息 ]权限 + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttss b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttss new file mode 100644 index 000000000..c8808ed0a --- /dev/null +++ b/sourcecode/toutiao/default/pages/common/open-setting-location/open-setting-location.ttss @@ -0,0 +1,39 @@ +page { + background: #fbfbfb; +} +.open-setting-view { + background: hsla(0, 0%, 0%, 0.1); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + text-align: center; + z-index: 1000000; +} +.open-setting-view .content { + margin:0 auto; + width: 360rpx; + height: 160rpx; + padding: 50rpx; + border-radius: 12rpx; + margin-top: 70%; + position: relative; +} +.open-setting-view .content button { + margin-top: 15rpx; +} +.open-setting-view .content .value { + margin-top: 5rpx; +} +.open-setting-view .content .value text { + font-weight: 500; + color: #333; +} + +.open-setting-loding { + padding-top: 35%; +} +.open-setting-loding image { + margin: 0 auto; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.js b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.js index 4ebb5c0c1..4ccf939cd 100644 --- a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.js +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.js @@ -24,20 +24,16 @@ Page({ user_location_cache_key: app.data.cache_userlocation_key, user_location: null, - form_submit_disabled_status: false + form_submit_disabled_status: false, }, onLoad(params) { - this.setData({ - params: params - }); + this.setData({ params: params }); }, onReady: function () { // 清除位置缓存信息 - tt.removeStorage({ - key: this.data.user_location_cache_key - }); + tt.removeStorage({key: this.data.user_location_cache_key}); this.init(); }, @@ -47,7 +43,6 @@ Page({ init() { var user = app.get_user_info(this, "init"); - if (user != false) { // 用户未绑定用户则转到登录页面 if (app.user_is_need_login(user)) { @@ -56,7 +51,7 @@ Page({ }); this.setData({ data_list_loding_status: 2, - data_list_loding_msg: '请先绑定手机号码' + data_list_loding_msg: '请先绑定手机号码', }); return false; } else { @@ -66,7 +61,7 @@ Page({ } else { this.setData({ data_list_loding_status: 2, - data_list_loding_msg: '请先授权用户信息' + data_list_loding_msg: '请先授权用户信息', }); } }, @@ -79,9 +74,7 @@ Page({ method: "POST", data: {}, dataType: "json", - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, + header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { if (res.data.code == 0) { var data = res.data.data; @@ -135,10 +128,10 @@ Page({ // 地区数据初始化 init_region_value() { - this.setData({ + this.setData({ province_value: this.get_region_value("province_list", "province_id"), city_value: this.get_region_value("city_list", "city_id"), - county_value: this.get_region_value("county_list", "county_id") + county_value: this.get_region_value("county_list", "county_id"), }); }, @@ -164,9 +157,7 @@ Page({ method: "POST", data: {}, dataType: "json", - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, + header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { if (res.data.code == 0) { var data = res.data.data; @@ -194,9 +185,7 @@ Page({ pid: self.data.province_id }, dataType: "json", - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, + header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { if (res.data.code == 0) { var data = res.data.data; @@ -217,7 +206,6 @@ Page({ // 获取区/县 get_county_list() { var self = this; - if (self.data.city_id) { // 加载loding tt.request({ @@ -227,9 +215,7 @@ Page({ pid: self.data.city_id }, dataType: "json", - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, + header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { if (res.data.code == 0) { var data = res.data.data; @@ -250,7 +236,6 @@ Page({ // 省份事件 select_province_event(e) { var index = e.detail.value || 0; - if (index >= 0) { var data = this.data.province_list[index]; this.setData({ @@ -268,7 +253,6 @@ Page({ // 市事件 select_city_event(e) { var index = e.detail.value || 0; - if (index >= 0) { var data = this.data.city_list[index]; this.setData({ @@ -284,7 +268,6 @@ Page({ // 区/县事件 select_county_event(e) { var index = e.detail.value || 0; - if (index >= 0) { var data = this.data.county_list[index]; this.setData({ @@ -297,7 +280,6 @@ Page({ // 省市区未按照顺序选择提示 region_select_error_event(e) { var value = e.currentTarget.dataset.value || null; - if (value != null) { app.showToast(value); } @@ -310,33 +292,20 @@ Page({ }); }, - // 复制百度地图坐标拾取地址 - baidu_map_copy_event(e) { - tt.setClipboardData({ - data: 'https://lbs.amap.com/console/show/picker', - success(res) { - app.showToast('复制成功', 'success'); - } - }); - }, - // 地址信息初始化 user_location_init() { var result = tt.getStorageSync(this.data.user_location_cache_key) || null; var data = null; - - if (result != null) { + if (result != null) + { data = { name: result.name || null, address: result.address || null, lat: result.latitude || null, lng: result.longitude || null - }; + } } - - this.setData({ - user_location: data - }); + this.setData({user_location: data}); }, // 数据提交 @@ -358,26 +327,45 @@ Page({ ]; // logo - form_data['logo'] = this.data.extraction_data.logo || ''; + form_data['logo'] = (this.data.extraction_data || null) != null ? (this.data.extraction_data.logo || '') : ''; // 地区 form_data["province"] = self.data.province_id; form_data["city"] = self.data.city_id; - form_data["county"] = self.data.county_id; // 地理位置 + form_data["county"] = self.data.county_id; + + // 地理位置 + var lng = 0; + var lat = 0; + if((self.data.user_location || null) != null) { + lng = self.data.user_location.lng || 0; + lat = self.data.user_location.lat || 0; + } + if((self.data.extraction_data || null) != null) { + if((lng || null) == null) { + lng = self.data.extraction_data.lng || 0; + } + if((lat || null) == null) { + lat = self.data.extraction_data.lat || 0; + } + } + form_data["lng"] = lng; + form_data["lat"] = lat; // 验证提交表单 if (app.fields_check(form_data, validation)) { - if ((self.data.extraction_data || null) != null && (self.data.extraction_data.status || 0) == 1) { + if ((self.data.extraction_data || null) != null && (self.data.extraction_data.status || 0) == 1) + { tt.showModal({ title: '温馨提示', content: '数据需重新审核后方可生效', confirmText: '确认', cancelText: '暂不', - success: result => { + success: (result) => { if (result.confirm) { self.request_data_save(form_data); } - } + }, }); } else { self.request_data_save(form_data); @@ -388,33 +376,23 @@ Page({ // 数据保存 request_data_save(data) { var self = this; - self.setData({ - form_submit_disabled_status: true - }); - tt.showLoading({ - title: "处理中..." - }); + self.setData({ form_submit_disabled_status: true }); + tt.showLoading({ title: "处理中..." }); tt.request({ url: app.get_request_url("applysave", "extraction", "distribution"), method: "POST", data: data, dataType: "json", - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, + header: { 'content-type': 'application/x-www-form-urlencoded' }, success: res => { tt.hideLoading(); - if (res.data.code == 0) { app.showToast(res.data.msg, "success"); setTimeout(function () { tt.navigateBack(); }, 1000); } else { - self.setData({ - form_submit_disabled_status: false - }); - + self.setData({ form_submit_disabled_status: false }); if (app.is_login_check(res.data)) { app.showToast(res.data.msg); } else { @@ -423,9 +401,7 @@ Page({ } }, fail: () => { - self.setData({ - form_submit_disabled_status: false - }); + self.setData({ form_submit_disabled_status: false }); tt.hideLoading(); app.showToast("服务器请求出错"); } @@ -513,4 +489,4 @@ Page({ }); }, -}); \ No newline at end of file +}); diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.ttml b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.ttml index e728e7b84..9512cbdee 100644 --- a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.ttml +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-apply/extraction-apply.ttml @@ -1,4 +1,17 @@
+ + logo图片选传,建议300x300px + + + + x + + + + + + + 别名选填 @@ -43,12 +56,10 @@ - 地理位置必填 - - - - 由于当前系统不支持位置选择,您可以登录电脑端使用高德拾取坐标系统获取相应的经纬度填写对应输入框,地址:https://lbs.amap.com/console/show/picker ,可复制地址去浏览器粘贴打开。 - + 地理位置必选 + + 请选择地理位置 + {{((user_location || null) != null && (user_location.name || null) != null) ? user_location.name+' ' : ''}}{{user_location.address || ''}} diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.js b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.js new file mode 100644 index 000000000..df4138fcd --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.js @@ -0,0 +1,225 @@ +const app = getApp(); +Page({ + data: { + data_list_loding_status: 1, + data_bottom_line_status: false, + data_list: [], + params: null, + + user_location_cache_key: app.data.cache_userlocation_key, + user_location: null, + is_first: 1, + home_extraction_address_position: 0, + }, + + onLoad(params) { + this.setData({ + params: params, + home_extraction_address_position: app.get_config('config.home_extraction_address_position', 0), + }); + }, + + onReady: function () { + // 清除位置缓存信息 + tt.removeStorage({key: this.data.user_location_cache_key}); + + // 是否获取位置 + if(this.data.home_extraction_address_position == 1) + { + tt.navigateTo({ + url: '/pages/common/open-setting-location/open-setting-location' + }); + } + }, + + onShow() { + tt.setNavigationBarTitle({ title: app.data.common_pages_title.extraction_address }); + + // 是否需要选择地理位置 + if(this.data.home_extraction_address_position == 1) + { + // 首次不请求数据 + if(this.data.is_first == 0) + { + this.user_location_init(); + this.init(); + } + } else { + this.init(); + } + + this.setData({ is_first: 0 }); + }, + + // 初始化 + init() { + var user = app.get_user_info(this, "init"); + if (user != false) { + // 用户未绑定用户则转到登录页面 + if (app.user_is_need_login(user)) { + tt.redirectTo({ + url: "/pages/login/login?event_callback=init" + }); + return false; + } else { + // 获取数据 + this.get_data_list(); + } + } else { + this.setData({ + data_list_loding_status: 0, + data_bottom_line_status: false, + }); + } + }, + + // 地址信息初始化 + user_location_init() { + var result = tt.getStorageSync(this.data.user_location_cache_key) || null; + var data = null; + if (result != null) + { + data = { + name: result.name || null, + address: result.address || null, + lat: result.latitude || null, + lng: result.longitude || null + } + } + this.setData({user_location: data}); + }, + + // 获取数据列表 + get_data_list() { + // 加载loding + tt.showLoading({ title: "加载中..." }); + this.setData({ + data_list_loding_status: 1 + }); + + // 获取数据 + var data = {}; + + // 是否有坐标 + if((this.data.user_location || null) != null) + { + data['lng'] = this.data.user_location.lng; + data['lat'] = this.data.user_location.lat; + } + + // 请求接口 + tt.request({ + url: app.get_request_url("switchinfo", "extraction", "distribution"), + method: "POST", + data: data, + dataType: "json", + success: res => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + if (data.extraction_address.length > 0) { + this.setData({ + data_list: data.extraction_address, + data_list_loding_status: 3, + data_bottom_line_status: true, + }); + } else { + this.setData({ + data_list_loding_status: 0 + }); + } + } else { + this.setData({ + data_list_loding_status: 0 + }); + if (app.is_login_check(res.data, this, 'get_data_list')) { + app.showToast(res.data.msg); + } + } + }, + fail: () => { + tt.hideLoading(); + tt.stopPullDownRefresh(); + + this.setData({ + data_list_loding_status: 2 + }); + app.showToast("服务器请求出错"); + } + }); + }, + + // 下拉刷新 + onPullDownRefresh() { + this.get_data_list(); + }, + + // 地图查看 + address_map_event(e) { + var index = e.currentTarget.dataset.index || 0; + var data = this.data.data_list[index] || null; + if (data == null) + { + app.showToast("地址有误"); + return false; + } + + // 打开地图 + var name = data.alias || data.name || ''; + var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || ''); + app.open_location(data.lng, data.lat, name, address); + }, + + // 地址内容事件 + address_conent_event(e) { + var index = e.currentTarget.dataset.index || 0; + var is_back = this.data.params.is_back || 0; + if (is_back == 1) { + tt.setStorage({ + key: app.data.cache_buy_user_address_select_key, + data: this.data.data_list[index] + }); + tt.navigateBack(); + } + }, + + // 切换选择事件 + address_switch_event(e) { + var index = e.currentTarget.dataset.index || 0; + var temp_data = this.data.data_list; + if((temp_data[index] || null) == null) + { + app.showToast('数据有误'); + return false; + } + + // 请求切换 + var self = this; + tt.showLoading({ title: "处理中..." }); + tt.request({ + url: app.get_request_url("switchsave", "extraction", "distribution"), + method: "POST", + data: {"id":temp_data[index]['id'], "value":temp_data[index]['id_old'] || 0}, + dataType: "json", + header: { 'content-type': 'application/x-www-form-urlencoded' }, + success: res => { + tt.hideLoading(); + if (res.data.code == 0) { + app.showToast(res.data.msg, "success"); + self.get_data_list(); + } else { + if (app.is_login_check(res.data)) { + app.showToast(res.data.msg); + } else { + app.showToast('提交失败,请重试!'); + } + } + }, + fail: () => { + tt.hideLoading(); + app.showToast("服务器请求出错"); + } + }); + }, +}); diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.json b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.json new file mode 100644 index 000000000..331ad4f3d --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.json @@ -0,0 +1,3 @@ +{ + "enablePullDownRefresh": true +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttml b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttml new file mode 100644 index 000000000..4fc4dab7a --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttml @@ -0,0 +1,42 @@ + + + + + + + + + + {{item.alias}} + {{item.name}} + {{item.tel}} + + + + {{item.province_name || ''}}{{item.city_name || ''}}{{item.county_name || ''}}{{item.address || ''}} + + + + + + 距离 + {{item.distance_value}} + {{item.distance_unit}} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttss b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttss new file mode 100644 index 000000000..fbb77e04e --- /dev/null +++ b/sourcecode/toutiao/default/pages/plugins/distribution/extraction-switch/extraction-switch.ttss @@ -0,0 +1,28 @@ +.item { + padding: 10rpx 10rpx 0 10rpx; +} +.address-logo { + width: 140rpx; + height: 140rpx !important; +} +.base, .address, .operation { + padding: 20rpx 0; +} +.address .item-icon { + width: 30rpx; + height: 35rpx !important; +} +.address-alias { + border: 1px solid #d2364c; + color: #d2364c; + padding: 2rpx 10rpx; + border-radius: 6rpx; + margin-right: 10rpx; +} +.address .text { + line-height: 44rpx; + width: calc(100% - 40rpx); +} +.operation .button-list button:not(:last-child) { + margin-right: 20rpx; +} \ No newline at end of file diff --git a/sourcecode/toutiao/default/pages/user-address-save/user-address-save.js b/sourcecode/toutiao/default/pages/user-address-save/user-address-save.js index 8086456d8..0f2f8353c 100755 --- a/sourcecode/toutiao/default/pages/user-address-save/user-address-save.js +++ b/sourcecode/toutiao/default/pages/user-address-save/user-address-save.js @@ -45,6 +45,9 @@ Page({ } tt.setNavigationBarTitle({title: title}); + // 初始化配置 + this.init_config(); + // 清除位置缓存信息 tt.removeStorage({key: this.data.user_location_cache_key}); this.init(); @@ -445,11 +448,11 @@ Page({ ]; // 是否开启了地理位置选择 - // if(self.data.home_user_address_map_status == 1) - // { - // validation.push({ fields: "lng", msg: "请选择地理位置" }); - // validation.push({ fields: "lat", msg: "请选择地理位置" }); - // } + if(self.data.home_user_address_map_status == 1) + { + validation.push({ fields: "lng", msg: "请选择地理位置" }); + validation.push({ fields: "lat", msg: "请选择地理位置" }); + } // 是否开启了用户身份证信息 if(self.data.home_user_address_idcard_status == 1) @@ -472,22 +475,22 @@ Page({ form_data['is_default'] = form_data.is_default == true ? 1 : 0; // 地理位置 - // var lng = 0; - // var lat = 0; - // if((self.data.user_location || null) != null) { - // lng = self.data.user_location.lng || 0; - // lat = self.data.user_location.lat || 0; - // } - // if((self.data.address_data || null) != null) { - // if((lng || null) == null) { - // lng = self.data.address_data.lng || 0; - // } - // if((lat || null) == null) { - // lat = self.data.address_data.lat || 0; - // } - // } - // form_data['lng'] = lng; - // form_data['lat'] = lat; + var lng = 0; + var lat = 0; + if((self.data.user_location || null) != null) { + lng = self.data.user_location.lng || 0; + lat = self.data.user_location.lat || 0; + } + if((self.data.address_data || null) != null) { + if((lng || null) == null) { + lng = self.data.address_data.lng || 0; + } + if((lat || null) == null) { + lat = self.data.address_data.lat || 0; + } + } + form_data['lng'] = lng; + form_data['lat'] = lat; // 验证提交表单 if (app.fields_check(form_data, validation)) { diff --git a/sourcecode/toutiao/default/pages/user-address-save/user-address-save.ttml b/sourcecode/toutiao/default/pages/user-address-save/user-address-save.ttml index 616cef223..1ccea036f 100755 --- a/sourcecode/toutiao/default/pages/user-address-save/user-address-save.ttml +++ b/sourcecode/toutiao/default/pages/user-address-save/user-address-save.ttml @@ -43,13 +43,13 @@ - + 是否默认选填 diff --git a/sourcecode/weixin/default/app.js b/sourcecode/weixin/default/app.js index b8ae1f5bb..bef1bd00c 100755 --- a/sourcecode/weixin/default/app.js +++ b/sourcecode/weixin/default/app.js @@ -73,8 +73,8 @@ App({ // 请求地址 request_url: "{{request_url}}", - request_url: 'http://shopxo.com/', - request_url: 'https://dev.shopxo.net/', + // request_url: 'http://shopxo.com/', + // request_url: 'https://dev.shopxo.net/', // 基础信息 application_title: "{{application_title}}", diff --git a/sourcecode/weixin/default/pages/plugins/distribution/extraction-apply/extraction-apply.js b/sourcecode/weixin/default/pages/plugins/distribution/extraction-apply/extraction-apply.js index 22f0a508d..280a24cd1 100644 --- a/sourcecode/weixin/default/pages/plugins/distribution/extraction-apply/extraction-apply.js +++ b/sourcecode/weixin/default/pages/plugins/distribution/extraction-apply/extraction-apply.js @@ -327,7 +327,7 @@ Page({ ]; // logo - form_data['logo'] = this.data.extraction_data.logo || ''; + form_data['logo'] = (this.data.extraction_data || null) != null ? (this.data.extraction_data.logo || '') : ''; // 地区 form_data["province"] = self.data.province_id; diff --git a/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxml b/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxml index 1fca11642..69ab5e00e 100644 --- a/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxml +++ b/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxml @@ -23,9 +23,11 @@ {{item.distance_value}} {{item.distance_unit}} - - - + + + + + diff --git a/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxss b/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxss index 02572878f..fbb77e04e 100644 --- a/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxss +++ b/sourcecode/weixin/default/pages/plugins/distribution/extraction-switch/extraction-switch.wxss @@ -23,6 +23,6 @@ line-height: 44rpx; width: calc(100% - 40rpx); } -.operation .map-submit { - margin-left: 20rpx; +.operation .button-list button:not(:last-child) { + margin-right: 20rpx; } \ No newline at end of file -- GitLab