diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php
index 6231a9755..688900888 100755
--- a/application/admin/controller/Config.php
+++ b/application/admin/controller/Config.php
@@ -52,12 +52,6 @@ class Config extends Common
// csv
$this->assign('common_excel_charset_list', lang('common_excel_charset_list'));
- // 扣除库存规则
- $this->assign('common_deduction_inventory_rules_list', lang('common_deduction_inventory_rules_list'));
-
- // 是否
- $this->assign('common_is_text_list', lang('common_is_text_list'));
-
// 配置信息
$this->assign('data', ConfigService::ConfigList());
diff --git a/application/admin/controller/Site.php b/application/admin/controller/Site.php
index 42b2ffc26..a66f30dff 100755
--- a/application/admin/controller/Site.php
+++ b/application/admin/controller/Site.php
@@ -80,6 +80,9 @@ class Site extends Common
// 站点类型
$this->assign('common_site_type_list', lang('common_site_type_list'));
+ // 扣除库存规则
+ $this->assign('common_deduction_inventory_rules_list', lang('common_deduction_inventory_rules_list'));
+
// 配置信息
$data = ConfigService::ConfigList();
$this->assign('data', $data);
diff --git a/application/admin/view/default/config/index.html b/application/admin/view/default/config/index.html
index f6e6fd054..7e8a4f82f 100755
--- a/application/admin/view/default/config/index.html
+++ b/application/admin/view/default/config/index.html
@@ -17,31 +17,6 @@
-
-
diff --git a/application/admin/view/default/order/index.html b/application/admin/view/default/order/index.html
index debef528f..a36a0bf05 100755
--- a/application/admin/view/default/order/index.html
+++ b/application/admin/view/default/order/index.html
@@ -128,7 +128,7 @@
{{$v.order_no}}
- {{$v.order_model_name}}
+ {{$v.order_model_name}}
{{$v.client_type_name}}
{{foreach $v.items as $vs}}
@@ -238,7 +238,7 @@
{{if empty($v['order_model_name'])}}
未知
{{else /}}
- {{$v.order_model_name}}
+ {{$v.order_model_name}}
{{/if}}
diff --git a/application/admin/view/default/payment/index.html b/application/admin/view/default/payment/index.html
index d5596a35f..c9f125889 100755
--- a/application/admin/view/default/payment/index.html
+++ b/application/admin/view/default/payment/index.html
@@ -6,6 +6,7 @@
diff --git a/application/admin/view/default/site/sitetype.html b/application/admin/view/default/site/sitetype.html
index ba3ccdb96..1bfca2e3c 100644
--- a/application/admin/view/default/site/sitetype.html
+++ b/application/admin/view/default/site/sitetype.html
@@ -33,6 +33,34 @@
{{/foreach}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/application/api/controller/Buy.php b/application/api/controller/Buy.php
index 91f952281..40ee55fc9 100755
--- a/application/api/controller/Buy.php
+++ b/application/api/controller/Buy.php
@@ -70,6 +70,7 @@ class Buy extends Common
'base' => $ret['data']['base'],
'extension_data' => $ret['data']['extension_data'],
'common_order_is_booking' => (int) MyC('common_order_is_booking', 0),
+ 'common_site_type' => (int) MyC('common_site_type', 0, true),
// 优惠劵
'plugins_coupon_data' => CallPluginsServiceMethod('coupon', 'BaseService', 'BuyUserCouponData', ['order_goods'=>$ret['data']['goods'], 'coupon_id'=>$coupon_id]),
diff --git a/application/api/controller/Goods.php b/application/api/controller/Goods.php
index 82213dd22..b82332d2a 100755
--- a/application/api/controller/Goods.php
+++ b/application/api/controller/Goods.php
@@ -129,8 +129,10 @@ class Goods extends Common
'common_app_is_poster_share' => (int) MyC('common_app_is_poster_share'),
'common_cart_total' => BuyService::UserCartTotal(['user'=>$this->user]),
'customer_service_tel' => MyC('common_app_customer_service_tel', null, true),
- 'common_is_exhibition_mode_btn_text'=> MyC('common_is_exhibition_mode_btn_text', null, true),
- 'common_is_exhibition_mode' => (int) MyC('common_is_exhibition_mode', 0),
+
+ // 站点模式
+ 'common_site_type' => (int) MyC('common_site_type', 0, true),
+ 'common_is_exhibition_mode_btn_text'=> MyC('common_is_exhibition_mode_btn_text', '立即咨询', true),
// 优惠劵
'plugins_coupon_data' => $this->PluginsCouponGoods($goods_id),
diff --git a/application/api/controller/Order.php b/application/api/controller/Order.php
index d97f3621c..a29ac7606 100755
--- a/application/api/controller/Order.php
+++ b/application/api/controller/Order.php
@@ -13,6 +13,7 @@ namespace app\api\controller;
use app\service\PaymentService;
use app\service\OrderService;
use app\service\GoodsCommentsService;
+use app\service\ConfigService;
/**
* 我的订单
@@ -117,7 +118,15 @@ class Order extends Common
$data = OrderService::OrderList($data_params);
if(!empty($data['data'][0]))
{
- return DataReturn('success', 0, $data['data'][0]);
+ // 虚拟销售配置
+ $site_fictitious = ConfigService::SiteFictitiousConfig();
+
+ // 返回信息
+ $result = [
+ 'data' => $data['data'][0],
+ 'site_fictitious' => $site_fictitious['data'],
+ ];
+ return DataReturn('success', 0, $result);
}
return DataReturn('数据不存在或已删除', -100);
}
diff --git a/application/api/controller/Useraddress.php b/application/api/controller/Useraddress.php
index 32b42a676..d3452f44d 100755
--- a/application/api/controller/Useraddress.php
+++ b/application/api/controller/Useraddress.php
@@ -11,6 +11,7 @@
namespace app\api\controller;
use app\service\UserService;
+use app\service\ConfigService;
/**
* 用户地址
@@ -111,5 +112,18 @@ class UserAddress extends Common
return UserService::UserAddressDefault($params);
}
+ /**
+ * 自提点地址列表
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2019-11-25
+ * @desc description
+ */
+ public function Extraction()
+ {
+ return ConfigService::SiteTypeExtractionAddressList();
+ }
+
}
?>
\ No newline at end of file
diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html
index 5e956bbb8..0e82804b0 100755
--- a/application/index/view/default/goods/index.html
+++ b/application/index/view/default/goods/index.html
@@ -345,7 +345,7 @@
{{else /}}
-
+
diff --git a/application/service/BuyService.php b/application/service/BuyService.php
index 2db8cb36b..19eb33dc6 100755
--- a/application/service/BuyService.php
+++ b/application/service/BuyService.php
@@ -1516,7 +1516,7 @@ class BuyService
// 选中地址处理
$default = null;
- if(isset($params['address_id']) && !empty($address['data']) && is_array($address['data']))
+ if(isset($params['address_id']) && $params['address_id'] != null && !empty($address['data']) && is_array($address['data']))
{
if(isset($address['data'][$params['address_id']]))
{
diff --git a/application/service/ConfigService.php b/application/service/ConfigService.php
index ee774f42e..01cfa5a98 100755
--- a/application/service/ConfigService.php
+++ b/application/service/ConfigService.php
@@ -305,10 +305,29 @@ class ConfigService
'data' => &$data,
]);
+ // 坐标处理
+ if(!empty($data) && is_array($data) && in_array(APPLICATION_CLIENT_TYPE, ['weixin', 'alipay']))
+ {
+ foreach($data as &$v)
+ {
+ // 坐标转换 百度转火星(高德,谷歌,腾讯坐标)
+ if(isset($v['lng']) && isset($v['lat']) && $v['lng'] > 0 && $v['lat'] > 0)
+ {
+ $map = \base\GeoTransUtil::BdToGcj($v['lng'], $v['lat']);
+ if(isset($map['lng']) && isset($map['lat']))
+ {
+ $v['lng_gcj'] = $map['lng'];
+ $v['lat_gcj'] = $map['lat'];
+ }
+ }
+ }
+ }
+
return DataReturn('操作成功', 0, $data);
}
/**
+ * 站点虚拟模式 - 虚拟销售信息
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
diff --git a/extend/base/GeoTransUtil.php b/extend/base/GeoTransUtil.php
index a7202ca51..4fab4d1cd 100755
--- a/extend/base/GeoTransUtil.php
+++ b/extend/base/GeoTransUtil.php
@@ -32,7 +32,7 @@ class GeoTransUtil
*/
/**
- * [get_distance 获取两个坐标之间的距离]
+ * [GetDistance 获取两个坐标之间的距离]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@@ -45,7 +45,7 @@ class GeoTransUtil
* @param [int] $decimal [保留小数位数(默认2)]
* @return [int|float] [返回千米或公里值]
*/
- public static function get_distance($lng1, $lat1, $lng2, $lat2, $len_type = 1, $decimal = 2)
+ public static function GetDistance($lng1, $lat1, $lng2, $lat2, $len_type = 1, $decimal = 2)
{
$radLat1 = $lat1 * self::$pi / 180.0;
$radLat2 = $lat2 * self::$pi / 180.0;
@@ -61,7 +61,7 @@ class GeoTransUtil
}
/**
- * [gcj_to_bd 火星坐标(GCJ02坐标,高德,谷歌,腾讯坐标)到百度坐标BD-09]
+ * [GcjToBd 火星坐标(GCJ02坐标,高德,谷歌,腾讯坐标)到百度坐标BD-09]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@@ -70,7 +70,7 @@ class GeoTransUtil
* @param [float] $lat [纬度]
* @return [array] [转换后的进维度]
*/
- public static function gcj_to_bd($lng, $lat)
+ public static function GcjToBd($lng, $lat)
{
$result = ['lng'=>0, 'lat'=>0];
if(empty($lng) || empty($lat))
@@ -88,7 +88,7 @@ class GeoTransUtil
}
/**
- * [bd_to_gcj 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)]
+ * [BdToGcj 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@@ -97,7 +97,7 @@ class GeoTransUtil
* @param [float] $lat [纬度]
* @return [array] [转换后的进维度]
*/
- public static function bd_to_gcj($lng, $lat)
+ public static function BdToGcj($lng, $lat)
{
$result = ['lng'=>0, 'lat'=>0];
if(empty($lng) || empty($lat))
@@ -115,7 +115,7 @@ class GeoTransUtil
}
/**
- * [wgs_to_gcj WGS-84(GPS坐标,谷歌地球坐标) 到 GCJ-02(火星坐标) 的转换]
+ * [WgsToGcj WGS-84(GPS坐标,谷歌地球坐标) 到 GCJ-02(火星坐标) 的转换]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@@ -124,7 +124,7 @@ class GeoTransUtil
* @param [float] $lat [纬度]
* @return [array] [转换后的进维度]
*/
- public static function wgs_to_gcj($lng, $lat)
+ public static function WgsToGcj($lng, $lat)
{
$result = ['lng'=>0, 'lat'=>0];
if(empty($lng) || empty($lat))
@@ -155,7 +155,7 @@ class GeoTransUtil
}
/**
- * [gcj_to_wgs GCJ-02 到 WGS-84 的转换]
+ * [GcjToWgs GCJ-02 到 WGS-84 的转换]
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
@@ -164,7 +164,7 @@ class GeoTransUtil
* @param [float] $lat [纬度]
* @return [array] [转换后的进维度]
*/
- public static function gcj_to_wgs($lng, $lat)
+ public static function GcjToWgs($lng, $lat)
{
$result = ['lng'=>0, 'lat'=>0];
if(empty($lng) || empty($lat))
@@ -172,7 +172,7 @@ class GeoTransUtil
return $result;
}
- $to = self::wgs_to_gcj($lng, $lat);
+ $to = self::WgsToGcj($lng, $lat);
$lat = $from->x;
$lon = $from->y;
$g_lat = $to->x;
@@ -218,10 +218,10 @@ class GeoTransUtil
require './GeoTransUtil.class.php';
// 高德转百度
-//$ret = GeoTransUtil::gcj_to_bd(106.504943,29.53319);
+//$ret = GeoTransUtil::GcjToBd(106.504943,29.53319);
// 百度转高德
-$ret = GeoTransUtil::bd_to_gcj(106.518492,29.540528);
+$ret = GeoTransUtil::BdToGcj(106.518492,29.540528);
echo '';
echo $ret['lng'].','.$ret['lat'];*/
diff --git a/public/appmini/old/alipay/app.js b/public/appmini/old/alipay/app.js
index 10e55d07f..066468b84 100644
--- a/public/appmini/old/alipay/app.js
+++ b/public/appmini/old/alipay/app.js
@@ -424,7 +424,7 @@ App({
/**
* 字段数据校验
* data 待校验的数据, 一维json对象
- * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码'}, ...]
+ * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码', is_can_zero: 1(是否可以为0)}, ...]
*/
fields_check(data, validation) {
for (var i in validation) {
diff --git a/public/appmini/old/alipay/images/error.png b/public/appmini/old/alipay/images/error.png
old mode 100755
new mode 100644
index db1478bb2..0683aa68b
Binary files a/public/appmini/old/alipay/images/error.png and b/public/appmini/old/alipay/images/error.png differ
diff --git a/public/appmini/old/alipay/pages/buy/buy.axml b/public/appmini/old/alipay/pages/buy/buy.axml
index 194f01e12..e6a5762d4 100644
--- a/public/appmini/old/alipay/pages/buy/buy.axml
+++ b/public/appmini/old/alipay/pages/buy/buy.axml
@@ -86,7 +86,7 @@
-
+
diff --git a/public/appmini/old/baidu/app.js b/public/appmini/old/baidu/app.js
index 4df48a48d..13f29fc49 100755
--- a/public/appmini/old/baidu/app.js
+++ b/public/appmini/old/baidu/app.js
@@ -275,7 +275,7 @@ App({
/**
* 字段数据校验
* data 待校验的数据, 一维json对象
- * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码'}, ...]
+ * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码', is_can_zero: 1(是否可以为0)}, ...]
*/
fields_check(data, validation) {
for (var i in validation) {
diff --git a/public/appmini/old/baidu/images/error.png b/public/appmini/old/baidu/images/error.png
old mode 100755
new mode 100644
index db1478bb2..0683aa68b
Binary files a/public/appmini/old/baidu/images/error.png and b/public/appmini/old/baidu/images/error.png differ
diff --git a/public/appmini/old/baidu/pages/buy/buy.swan b/public/appmini/old/baidu/pages/buy/buy.swan
index f8d63ad2b..6bd6b59a3 100755
--- a/public/appmini/old/baidu/pages/buy/buy.swan
+++ b/public/appmini/old/baidu/pages/buy/buy.swan
@@ -85,7 +85,7 @@
-
+
diff --git a/public/appmini/old/qq/app.js b/public/appmini/old/qq/app.js
index ff80bfbd5..7cd487376 100755
--- a/public/appmini/old/qq/app.js
+++ b/public/appmini/old/qq/app.js
@@ -290,7 +290,7 @@ App({
/**
* 字段数据校验
* data 待校验的数据, 一维json对象
- * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码'}, ...]
+ * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码', is_can_zero: 1(是否可以为0)}, ...]
*/
fields_check(data, validation) {
for (var i in validation) {
diff --git a/public/appmini/old/qq/images/error.png b/public/appmini/old/qq/images/error.png
old mode 100755
new mode 100644
index db1478bb2..0683aa68b
Binary files a/public/appmini/old/qq/images/error.png and b/public/appmini/old/qq/images/error.png differ
diff --git a/public/appmini/old/qq/pages/buy/buy.qml b/public/appmini/old/qq/pages/buy/buy.qml
index 41f40365d..bc0f8ff88 100755
--- a/public/appmini/old/qq/pages/buy/buy.qml
+++ b/public/appmini/old/qq/pages/buy/buy.qml
@@ -85,7 +85,7 @@
-
+
diff --git a/public/appmini/old/toutiao/app.js b/public/appmini/old/toutiao/app.js
index dedf3901a..969291d0a 100755
--- a/public/appmini/old/toutiao/app.js
+++ b/public/appmini/old/toutiao/app.js
@@ -289,7 +289,7 @@ App({
/**
* 字段数据校验
* data 待校验的数据, 一维json对象
- * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码'}, ...]
+ * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码', is_can_zero: 1(是否可以为0)}, ...]
*/
fields_check(data, validation) {
for (var i in validation) {
diff --git a/public/appmini/old/toutiao/images/error.png b/public/appmini/old/toutiao/images/error.png
old mode 100755
new mode 100644
index db1478bb2..0683aa68b
Binary files a/public/appmini/old/toutiao/images/error.png and b/public/appmini/old/toutiao/images/error.png differ
diff --git a/public/appmini/old/toutiao/pages/buy/buy.ttml b/public/appmini/old/toutiao/pages/buy/buy.ttml
index e3f1c5067..3a91e5bbb 100755
--- a/public/appmini/old/toutiao/pages/buy/buy.ttml
+++ b/public/appmini/old/toutiao/pages/buy/buy.ttml
@@ -85,7 +85,7 @@
-
+
diff --git a/public/appmini/old/weixin/app.js b/public/appmini/old/weixin/app.js
index 32db15464..218d79cbb 100755
--- a/public/appmini/old/weixin/app.js
+++ b/public/appmini/old/weixin/app.js
@@ -62,11 +62,12 @@ App({
"user_order_comments": "订单评论",
"coupon": "领劵中心",
"user_coupon": "优惠劵",
+ "extraction_address": "自提地址",
},
// 请求地址
request_url: "{{request_url}}",
- // request_url: 'http://tp5-dev.com/',
+ request_url: 'http://tp5-dev.com/',
// request_url: 'https://test.shopxo.net/',
// 基础信息
@@ -286,7 +287,7 @@ App({
/**
* 字段数据校验
* data 待校验的数据, 一维json对象
- * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码'}, ...]
+ * validation 待校验的字段, 格式 [{fields: 'mobile', msg: '请填写手机号码', is_can_zero: 1(是否可以为0)}, ...]
*/
fields_check(data, validation) {
for (var i in validation) {
diff --git a/public/appmini/old/weixin/app.json b/public/appmini/old/weixin/app.json
index a48234485..c925d87bd 100755
--- a/public/appmini/old/weixin/app.json
+++ b/public/appmini/old/weixin/app.json
@@ -1,9 +1,10 @@
{
- "pages": [
+ "pages": ["pages/user-order-detail/user-order-detail",
"pages/index/index",
"pages/goods-category/goods-category",
"pages/cart/cart",
"pages/user/user",
+ "pages/buy/buy",
"pages/web-view/web-view",
"pages/login/login",
"pages/paytips/paytips",
@@ -11,11 +12,10 @@
"pages/goods-detail/goods-detail",
"pages/goods-comment/goods-comment",
"pages/goods-attribute/goods-attribute",
- "pages/buy/buy",
"pages/user-address/user-address",
"pages/user-address-save/user-address-save",
"pages/user-order/user-order",
- "pages/user-order-detail/user-order-detail",
+
"pages/user-order-comments/user-order-comments",
"pages/user-faovr/user-faovr",
"pages/user-answer-list/user-answer-list",
@@ -27,7 +27,8 @@
"pages/user-orderaftersale/user-orderaftersale",
"pages/user-orderaftersale-detail/user-orderaftersale-detail",
"pages/coupon/coupon",
- "pages/user-coupon/user-coupon"
+ "pages/user-coupon/user-coupon",
+ "pages/extraction-address/extraction-address"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
diff --git a/public/appmini/old/weixin/images/error.png b/public/appmini/old/weixin/images/error.png
old mode 100755
new mode 100644
index db1478bb2..0683aa68b
Binary files a/public/appmini/old/weixin/images/error.png and b/public/appmini/old/weixin/images/error.png differ
diff --git a/public/appmini/old/weixin/pages/buy/buy.js b/public/appmini/old/weixin/pages/buy/buy.js
index 2a527cb41..42b6ffcd5 100755
--- a/public/appmini/old/weixin/pages/buy/buy.js
+++ b/public/appmini/old/weixin/pages/buy/buy.js
@@ -8,13 +8,15 @@ Page({
payment_list: [],
goods_list: [],
address: null,
- address_id: 0,
+ address_id: null,
total_price: 0,
user_note_value: '',
is_first: 1,
extension_data: [],
payment_id: 0,
common_order_is_booking: 0,
+ common_site_type: 0,
+ extraction_address: [],
// 优惠劵
plugins_coupon_data: null,
@@ -23,17 +25,9 @@ Page({
popup_plugins_coupon_status: false,
},
onLoad(params) {
- if((params.data || null) == null || app.get_length(JSON.parse(params.data)) == 0)
+ //params['data'] = '{"buy_type":"goods","goods_id":"1","stock":"1","spec":"[]"}';
+ if((params.data || null) != null && app.get_length(JSON.parse(params.data)) > 0)
{
- wx.alert({
- title: '温馨提示',
- content: '订单信息有误',
- buttonText: '确认',
- success: () => {
- wx.navigateBack();
- },
- });
- } else {
this.setData({ params: JSON.parse(params.data)});
// 删除地址缓存
@@ -42,13 +36,22 @@ Page({
},
onShow() {
- wx.setNavigationBarTitle({title: app.data.common_pages_title.buy});
this.init();
- this.setData({is_first: 0});
+ this.setData({ is_first: 0 });
},
// 获取数据列表
init() {
+ // 订单参数信息是否正确
+ if (this.data.params == null) {
+ this.setData({
+ data_list_loding_status: 2,
+ data_list_loding_msg: '订单信息有误',
+ });
+ wx.stopPullDownRefresh();
+ return false;
+ }
+
// 本地缓存地址
if(this.data.is_first == 0)
{
@@ -57,12 +60,7 @@ Page({
{
this.setData({
address: cache_address,
- address_id: cache_address.id
- });
- } else {
- this.setData({
- address: null,
- address_id: 0
+ address_id: cache_address.id || null,
});
}
}
@@ -97,6 +95,8 @@ Page({
extension_data: data.extension_data || [],
data_list_loding_status: 3,
common_order_is_booking: data.common_order_is_booking || 0,
+ common_site_type: data.common_site_type || 0,
+ extraction_address: data.base.extraction_address || [],
plugins_coupon_data: data.plugins_coupon_data || null,
});
@@ -113,19 +113,15 @@ Page({
}
// 地址
- if (this.data.address == null || this.data.address_id == 0) {
- if((data.base.address || null) != null) {
- this.setData({
- address: data.base.address,
- address_id: data.base.address.id,
- });
+ this.setData({
+ address: data.base.address || null,
+ address_id: ((data.base.address || null) != null && (data.base.address.id || null) != null) ? data.base.address.id : null,
+ });
- wx.setStorage({
- key: app.data.cache_buy_user_address_select_key,
- data: data.base.address,
- });
- }
- }
+ wx.setStorage({
+ key: app.data.cache_buy_user_address_select_key,
+ data: data.base.address || null,
+ });
// 支付方式
this.payment_list_data(data.payment_list);
@@ -171,9 +167,11 @@ Page({
data['coupon_id'] = this.data.plugins_use_coupon_id;
// 数据验证
- var validation = [
- { fields: 'address_id', msg: '请选择地址' }
- ];
+ var validation = [];
+ if (this.data.common_site_type == 0 || this.data.common_site_type == 2)
+ {
+ validation.push({ fields: 'address_id', msg: '请选择地址', is_can_zero: 1 });
+ }
if (this.data.common_order_is_booking != 1) {
validation.push({ fields: 'payment_id', msg: '请选择支付方式' });
}
@@ -263,4 +261,21 @@ Page({
this.init();
},
+ // 地址选择事件
+ address_event(e) {
+ if(this.data.common_site_type == 0)
+ {
+ wx.navigateTo({
+ url: '/pages/user-address/user-address?is_back=1'
+ });
+ } else if (this.data.common_site_type == 2)
+ {
+ wx.navigateTo({
+ url: '/pages/extraction-address/extraction-address?is_back=1'
+ });
+ } else {
+ app.showToast('当前模式不允许使用地址');
+ }
+ },
+
});
diff --git a/public/appmini/old/weixin/pages/buy/buy.wxml b/public/appmini/old/weixin/pages/buy/buy.wxml
index 540802df5..59528ec90 100755
--- a/public/appmini/old/weixin/pages/buy/buy.wxml
+++ b/public/appmini/old/weixin/pages/buy/buy.wxml
@@ -1,125 +1,131 @@
-
-
-
-
-
-
- {{address.name}}
- {{address.tel}}
+
+
+
+
+
+
+
+
+
+
+
+ {{address.name}}
+ {{address.tel}}
+
+
+
+ {{address.province_name}}{{address.city_name}}{{address.county_name}}{{address.address}}
+
-
-
- {{address.province_name}}{{address.city_name}}{{address.county_name}}{{address.address}}
+
+ 请选择地址
-
- 请选择地址
-
-
-
-
+
+
-
-
-
-
-
- {{item.title}}
-
- {{spec.type}}:{{spec.value}}
+
+
+
+
+
+ {{item.title}}
+
+ {{spec.type}}:{{spec.value}}
+
+
+
+
+ ¥{{item.price}}
+
+ ¥{{item.original_price}}
+
+ x{{item.stock}}
+
+
+
+
+
+
+
+
+ {{user_note_value || '留言'}}
+
+
+
+
+ 优惠劵
+ {{plugins_choice_coupon_value}}
+
+
+
+
+
+ {{item.name}}
+
+ {{item.tips}}
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 合计:
+ ¥{{total_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- {{user_note_value || '留言'}}
-
-
-
-
- 优惠劵
- {{plugins_choice_coupon_value}}
-
-
-
-
-
- {{item.name}}
-
- {{item.tips}}
-
-
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
- 合计:
- ¥{{total_price}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/public/appmini/old/weixin/pages/extraction-address/extraction-address.js b/public/appmini/old/weixin/pages/extraction-address/extraction-address.js
new file mode 100644
index 000000000..a5fef9844
--- /dev/null
+++ b/public/appmini/old/weixin/pages/extraction-address/extraction-address.js
@@ -0,0 +1,138 @@
+const app = getApp();
+Page({
+ data: {
+ data_list_loding_status: 1,
+ data_bottom_line_status: false,
+ data_list: [],
+ params: null,
+ is_default: 0,
+ },
+
+ onLoad(params) {
+ this.setData({ params: params });
+ },
+
+ onShow() {
+ wx.setNavigationBarTitle({ title: app.data.common_pages_title.extraction_address });
+ this.init();
+ },
+
+ // 初始化
+ init() {
+ var user = app.get_user_cache_info(this, "init");
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ wx.redirectTo({
+ url: "/pages/login/login?event_callback=init"
+ });
+ return false;
+ } else {
+ // 获取数据
+ this.get_data_list();
+ }
+ },
+
+ // 获取数据列表
+ get_data_list() {
+ // 加载loding
+ wx.showLoading({ title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ // 获取数据
+ wx.request({
+ url: app.get_request_url("extraction", "useraddress"),
+ method: "POST",
+ data: {},
+ dataType: "json",
+ success: res => {
+ wx.hideLoading();
+ wx.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ if (res.data.data.length > 0) {
+ // 获取当前默认地址
+ var is_default = 0;
+ for (var i in res.data.data) {
+ if (res.data.data[i]['is_default'] == 1) {
+ is_default = res.data.data[i]['id'];
+ }
+ }
+
+ // 设置数据
+ this.setData({
+ data_list: res.data.data,
+ is_default: is_default,
+ 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
+ });
+
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ wx.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 ads = this.data.data_list[index] || null;
+ if (ads == null)
+ {
+ app.showToast("地址有误");
+ return false;
+ }
+
+ var lng = parseFloat(ads.lng_gcj || 0);
+ var lat = parseFloat(ads.lat_gcj || 0);
+ if (lng <= 0 || lat <= 0) {
+ app.showToast("坐标有误");
+ return false;
+ }
+
+ wx.openLocation({
+ latitude: lat,
+ longitude: lng,
+ scale: 18,
+ name: ads.alias || '',
+ address: (ads.province_name || '') + (ads.city_name || '') + (ads.county_name || '') + (ads.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) {
+ wx.setStorage({
+ key: app.data.cache_buy_user_address_select_key,
+ data: this.data.data_list[index]
+ });
+ wx.navigateBack();
+ }
+ },
+
+});
diff --git a/public/appmini/old/weixin/pages/extraction-address/extraction-address.json b/public/appmini/old/weixin/pages/extraction-address/extraction-address.json
new file mode 100644
index 000000000..331ad4f3d
--- /dev/null
+++ b/public/appmini/old/weixin/pages/extraction-address/extraction-address.json
@@ -0,0 +1,3 @@
+{
+ "enablePullDownRefresh": true
+}
\ No newline at end of file
diff --git a/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxml b/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxml
new file mode 100644
index 000000000..27826898e
--- /dev/null
+++ b/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ {{item.alias}}
+ {{item.name}}
+ {{item.tel}}
+
+
+
+ {{item.province_name}}{{item.city_name}}{{item.county_name}}{{item.address}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxss b/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxss
new file mode 100644
index 000000000..727237872
--- /dev/null
+++ b/public/appmini/old/weixin/pages/extraction-address/extraction-address.wxss
@@ -0,0 +1,24 @@
+.item {
+ padding: 10rpx 10rpx 0 10rpx;
+}
+.base, .address, .operation {
+ padding: 20rpx 0;
+}
+.address .item-icon {
+ width: 35rpx;
+ height: 35rpx !important;
+}
+.address-alias {
+ border: 1px solid #d2364c;
+ color: #d2364c;
+ padding: 4rpx 10rpx;
+ border-radius: 6rpx;
+ margin-right: 10rpx;
+}
+.address .text {
+ line-height: 44rpx;
+ width: calc(100% - 40rpx);
+}
+.operation .map-submit {
+ margin-left: 20rpx;
+}
\ No newline at end of file
diff --git a/public/appmini/old/weixin/pages/goods-detail/goods-detail.js b/public/appmini/old/weixin/pages/goods-detail/goods-detail.js
index b1fbbcaef..dc93a568f 100755
--- a/public/appmini/old/weixin/pages/goods-detail/goods-detail.js
+++ b/public/appmini/old/weixin/pages/goods-detail/goods-detail.js
@@ -66,8 +66,8 @@ Page({
// 购物车快捷导航
quick_nav_cart_count: 0,
- // 是否展示型
- common_is_exhibition_mode: 0,
+ // 站点模式
+ common_site_type: 0,
customer_service_tel: null,
},
@@ -185,8 +185,8 @@ Page({
}
// 是否展示型
- var common_is_exhibition_mode = data.common_is_exhibition_mode || 0;
- if (common_is_exhibition_mode == 1) {
+ var common_site_type = data.common_site_type || 0;
+ if (common_site_type == 1) {
nav_submit_text = data.common_is_exhibition_mode_btn_text || '立即咨询';
}
@@ -194,7 +194,7 @@ Page({
this.setData({
nav_submit_text: nav_submit_text,
nav_submit_is_disabled: nav_submit_is_disabled,
- common_is_exhibition_mode: common_is_exhibition_mode,
+ common_site_type: common_site_type,
customer_service_tel: data.customer_service_tel || null,
});
} else {
diff --git a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
index 616b0c19b..d883e4efe 100755
--- a/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
+++ b/public/appmini/old/weixin/pages/goods-detail/goods-detail.wxml
@@ -129,13 +129,13 @@
{{goods_favor_text}}
-
-
-
+
+
+
-
+
diff --git a/public/appmini/old/weixin/pages/user-address/user-address.wxml b/public/appmini/old/weixin/pages/user-address/user-address.wxml
index 17f7ce6f9..a4c4d0f11 100755
--- a/public/appmini/old/weixin/pages/user-address/user-address.wxml
+++ b/public/appmini/old/weixin/pages/user-address/user-address.wxml
@@ -3,6 +3,7 @@
+ {{item.alias}}
{{item.name}}
{{item.tel}}
diff --git a/public/appmini/old/weixin/pages/user-address/user-address.wxss b/public/appmini/old/weixin/pages/user-address/user-address.wxss
index dff6f15ed..ce9db6b99 100755
--- a/public/appmini/old/weixin/pages/user-address/user-address.wxss
+++ b/public/appmini/old/weixin/pages/user-address/user-address.wxss
@@ -8,6 +8,13 @@
width: 35rpx;
height: 35rpx !important;
}
+.address-alias {
+ border: 1px solid #d2364c;
+ color: #d2364c;
+ padding: 4rpx 10rpx;
+ border-radius: 6rpx;
+ margin-right: 10rpx;
+}
.address .text {
line-height: 44rpx;
width: calc(100% - 40rpx);
diff --git a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.js b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.js
index 235cea892..05a9e1dca 100755
--- a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.js
+++ b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.js
@@ -9,9 +9,11 @@ Page({
detail: null,
detail_list: [],
extension_data: [],
+ site_fictitious: null,
},
onLoad(params) {
+ params['id'] = 3;
this.setData({params: params});
this.init();
},
@@ -40,29 +42,31 @@ Page({
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
- detail: data,
+ detail: data.data,
detail_list:[
- {name: "订单号", value: data.order_no || ''},
- {name: "状态", value: data.status_name || ''},
- {name: "支付状态", value: data.pay_status_name || ''},
- {name: "单价", value: data.price || ''},
- {name: "总价", value: data.total_price || ''},
- {name: "优惠金额", value: data.preferential_price || ''},
- {name: "增加金额", value: data.increase_price || '' },
- {name: "支付金额", value: data.pay_price || ''},
- {name: "支付方式", value: data.payment_name || ''},
- {name: "快递公司", value: data.express_name || ''},
- {name: "快递单号", value: data.express_number || ''},
- {name: "用户留言", value: data.user_note || ''},
- {name: "创建时间", value: data.add_time || ''},
- {name: "确认时间", value: data.confirm_time || ''},
- {name: "支付时间", value: data.pay_time || ''},
- {name: "发货时间", value: data.delivery_time || ''},
- {name: "收货时间", value: data.collect_time || ''},
- {name: "取消时间", value: data.close_time || ''},
- {name: "关闭时间", value: data.close_time || ''},
+ {name: "订单号", value: data.data.order_no || ''},
+ {name: "订单模式", value: data.data.order_model_name || '' },
+ {name: "状态", value: data.data.status_name || ''},
+ {name: "支付状态", value: data.data.pay_status_name || ''},
+ {name: "单价", value: data.data.price || ''},
+ {name: "总价", value: data.data.total_price || ''},
+ {name: "优惠金额", value: data.data.preferential_price || ''},
+ {name: "增加金额", value: data.data.increase_price || '' },
+ {name: "支付金额", value: data.data.pay_price || ''},
+ {name: "支付方式", value: data.data.payment_name || ''},
+ {name: "快递公司", value: data.data.express_name || ''},
+ {name: "快递单号", value: data.data.express_number || ''},
+ {name: "用户留言", value: data.data.user_note || ''},
+ {name: "创建时间", value: data.data.add_time || ''},
+ {name: "确认时间", value: data.data.confirm_time || ''},
+ {name: "支付时间", value: data.data.pay_time || ''},
+ {name: "发货时间", value: data.data.delivery_time || ''},
+ {name: "收货时间", value: data.data.collect_time || ''},
+ {name: "取消时间", value: data.data.close_time || ''},
+ {name: "关闭时间", value: data.data.close_time || ''},
],
- extension_data: data.extension_data || [],
+ extension_data: data.data.extension_data || [],
+ site_fictitious: data.site_fictitious || null,
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: '',
diff --git a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxml b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxml
index 144f22ea2..9fcab68b8 100755
--- a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxml
+++ b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxml
@@ -1,5 +1,5 @@
-
+
{{detail.receive_name}}
{{detail.receive_tel}}
@@ -32,19 +32,42 @@
-
-
- {{item.name}}
- {{item.value}}
+
+ 基础数据
+
+
+ {{item.name}}
+ {{item.value}}
+
+
+
+
+
+
+ {{site_fictitious.title || '密钥信息'}}
+
+
+
+
+
+
+
+
+ 未配置数据
+
+
-
-
+
+ 扩展数据
+
+
{{item.name}}
{{item.tips}}
+
diff --git a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxss b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxss
index a847a2bbe..e31f525d8 100755
--- a/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxss
+++ b/public/appmini/old/weixin/pages/user-order-detail/user-order-detail.wxss
@@ -52,24 +52,31 @@
}
/*
- * 基础信息
+ * 面板信息
*/
-.detail-list {
- padding: 0 10rpx;
+.panel-item .panel-title {
+ background: #fff;
+ font-weight: bold;
+ padding: 15rpx;
+ border-bottom: 2px solid #eee;
+ font-size: 34rpx;
}
-.detail-list .item {
+.panel-item .panel-content .item {
padding: 20rpx 0;
}
-.detail-list .item .title {
+.panel-item .panel-content .item:last-child {
+ border: 0;
+}
+.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
-.detail-list .item .content {
+.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
}
-.detail-list .item view {
+.panel-item .panel-content .item view {
line-height: 46rpx;
}
@@ -84,4 +91,25 @@
}
.extension-list .item .content {
padding-left: 20rpx;
+}
+
+/*
+ * 虚拟销售信息
+ */
+.site-fictitious .panel-content {
+ padding: 0 20rpx;
+}
+.site-fictitious .panel-content .tips-value {
+ color: #f37b1d;
+ background-color: #fff2e9;
+ border-color: #ffebdb;
+ padding: 10rpx;
+ margin-top: 20rpx;
+}
+.site-fictitious .panel-content .left-image {
+ width: 80rpx;
+ height: 80rpx;
+}
+.site-fictitious .panel-content .right-value {
+ width: calc(100% - 100rpx);
}
\ No newline at end of file
diff --git a/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.wxml b/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.wxml
index 7685206c6..eb7dd6b78 100644
--- a/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.wxml
+++ b/public/appmini/old/weixin/pages/user-orderaftersale-detail/user-orderaftersale-detail.wxml
@@ -54,7 +54,7 @@
{{item.name}}
- {{new_aftersale_data[item.field] || ''}}
+ {{new_aftersale_data[item.field] || ''}}
diff --git a/public/static/admin/default/js/site.js b/public/static/admin/default/js/site.js
index 025c416d6..cb2c8fdde 100644
--- a/public/static/admin/default/js/site.js
+++ b/public/static/admin/default/js/site.js
@@ -58,9 +58,11 @@ function AddressModalHandle(data)
if(form_type == 'add')
{
$('ul.address-list').append(html);
+ data['id'] = value.length;
value.push(data);
} else {
var form_index = $popup.attr('data-index') || 0;
+ data['id'] = form_index;
value.splice(form_index, 1, data);
$('ul.address-list').find('li').eq(form_index).replaceWith(html);
}
diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js
index 40404c8b8..d3e3e12bc 100755
--- a/public/static/common/js/common.js
+++ b/public/static/common/js/common.js
@@ -146,7 +146,13 @@ function GetFormVal(element, is_json)
if(is_json === true)
{
var json = {};
- object.forEach((value, key) => json[key] = value);
+ object.forEach(function(value, key)
+ {
+ if((key || null) != null)
+ {
+ json[key] = value
+ }
+ });
return json;
}
return object;
|