提交 0fb83dfb 编写于 作者: D devil_gong

小程序模式开发

上级 77000e59
......@@ -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());
......
......@@ -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);
......
......@@ -17,31 +17,6 @@
<label>{{$data.admin_page_number.name}}<span class="am-form-group-label-tips">{{$data.admin_page_number.describe}}</span></label>
<input type="number" name="{{$data.admin_page_number.only_tag}}" placeholder="{{$data.admin_page_number.name}}" pattern="{{:lang('common_regex_page_number')}}" data-validation-message="{{$data.admin_page_number.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.admin_page_number.value}}"{{/if}} required />
</div>
<div class="am-form-group">
<label>{{$data.common_is_deduction_inventory.name}}<span class="am-form-group-label-tips">{{$data.common_is_deduction_inventory.describe}}</span></label>
<select name="{{$data.common_is_deduction_inventory.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_deduction_inventory.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_is_deduction_inventory']['value']) and $data['common_is_deduction_inventory']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_deduction_inventory_rules.name}}<span class="am-form-group-label-tips">{{$data.common_deduction_inventory_rules.describe}}</span></label>
<select name="{{$data.common_deduction_inventory_rules.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_deduction_inventory_rules.error_tips}}" required>
{{foreach $common_deduction_inventory_rules_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_deduction_inventory_rules']['value']) and $data['common_deduction_inventory_rules']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_order_is_booking.name}}<span class="am-form-group-label-tips">{{$data.common_order_is_booking.describe}}</span></label>
<select name="{{$data.common_order_is_booking.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_order_is_booking.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_order_is_booking']['value']) and $data['common_order_is_booking']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_spec_add_max_number.name}}<span class="am-form-group-label-tips">{{$data.common_spec_add_max_number.describe}}</span></label>
<input type="number" name="{{$data.common_spec_add_max_number.only_tag}}" placeholder="{{$data.common_spec_add_max_number.describe}}" data-validation-message="{{$data.common_spec_add_max_number.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_spec_add_max_number.value}}"{{/if}} />
......
......@@ -128,7 +128,7 @@
<td class="am-hide-sm-only">
<div class="order-no am-padding-bottom-xs">
<span>{{$v.order_no}}</span>
<span class="am-badge am-badge-secondary am-radius" title="订单模式">{{$v.order_model_name}}</span>
<span class="am-badge am-badge-primary am-radius" title="订单模式">{{$v.order_model_name}}</span>
<span class="am-badge am-badge-secondary am-radius" title="客户端类型">{{$v.client_type_name}}</span>
</div>
{{foreach $v.items as $vs}}
......@@ -238,7 +238,7 @@
{{if empty($v['order_model_name'])}}
<span class="cr-ddd">未知</span>
{{else /}}
<span class="am-badge am-badge-secondary am-radius" title="订单模式">{{$v.order_model_name}}</span>
<span class="am-badge am-badge-primary am-radius" title="订单模式">{{$v.order_model_name}}</span>
{{/if}}
</dd>
......
......@@ -6,6 +6,7 @@
<!-- operation start -->
<div class="am-g">
<a href="javascript:;" class="am-btn am-btn-secondary am-btn-xs am-margin-left-sm am-icon-cloud-upload am-radius" data-am-modal="{target: '#payment-upload-win'}"> 上传</a>
<a class="am-margin-left-sm" href="https://store.shopxo.net/payment.html" target="_blank">更多支付插件下载 <i class="am-icon-external-link"></i></a>
</div>
<!-- operation end -->
......
......@@ -33,6 +33,34 @@
{{/foreach}}
</select>
</div>
<!-- 是否预约模式 -->
<div class="am-form-group">
<label>{{$data.common_order_is_booking.name}}<span class="am-form-group-label-tips">{{$data.common_order_is_booking.describe}}</span></label>
<select name="{{$data.common_order_is_booking.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_order_is_booking.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_order_is_booking']['value']) and $data['common_order_is_booking']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<!-- 库存 -->
<div class="am-form-group">
<label>{{$data.common_is_deduction_inventory.name}}<span class="am-form-group-label-tips">{{$data.common_is_deduction_inventory.describe}}</span></label>
<select name="{{$data.common_is_deduction_inventory.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_deduction_inventory.error_tips}}" required>
{{foreach $common_is_text_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_is_deduction_inventory']['value']) and $data['common_is_deduction_inventory']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
<div class="am-form-group">
<label>{{$data.common_deduction_inventory_rules.name}}<span class="am-form-group-label-tips">{{$data.common_deduction_inventory_rules.describe}}</span></label>
<select name="{{$data.common_deduction_inventory_rules.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_deduction_inventory_rules.error_tips}}" required>
{{foreach $common_deduction_inventory_rules_list as $v}}
<option value="{{$v.id}}" {{if isset($data['common_deduction_inventory_rules']['value']) and $data['common_deduction_inventory_rules']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
{{/foreach}}
</select>
</div>
</div>
</div>
......
......@@ -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]),
......
......@@ -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),
......
......@@ -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);
}
......
......@@ -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
......@@ -345,7 +345,7 @@
{{else /}}
<div class="submit">
<div class="clearfix tb-btn tb-btn-buy buy-event login-event buy-submit" data-type="buy">
<button title="点此按钮到下一步确认购买信息" href="javascript:;" type="button">立即购买</button>
<button title="点此按钮到下一步确认购买信息" href="javascript:;" type="button">{{if $common_order_is_booking eq 1}}立即预约{{else /}}立即购买{{/if}}</button>
</div>
</div>
<div class="submit">
......
......@@ -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']]))
{
......
......@@ -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
......
......@@ -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 '</br>';
echo $ret['lng'].','.$ret['lat'];*/
......
......@@ -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) {
......
public/appmini/old/alipay/images/error.png

2.7 KB | W: | H:

public/appmini/old/alipay/images/error.png

2.1 KB | W: | H:

public/appmini/old/alipay/images/error.png
public/appmini/old/alipay/images/error.png
public/appmini/old/alipay/images/error.png
public/appmini/old/alipay/images/error.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -86,7 +86,7 @@
</view>
</view>
<view a:if="{{goods.length == 0}}">
<view a:if="{{goods_list.length == 0}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
......
......@@ -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) {
......
public/appmini/old/baidu/images/error.png

2.7 KB | W: | H:

public/appmini/old/baidu/images/error.png

2.1 KB | W: | H:

public/appmini/old/baidu/images/error.png
public/appmini/old/baidu/images/error.png
public/appmini/old/baidu/images/error.png
public/appmini/old/baidu/images/error.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -85,7 +85,7 @@
</view>
</view>
<view s-if="goods.length == 0">
<view s-if="goods_list.length == 0">
<import src="/pages/common/nodata.swan" />
<template is="nodata" data="{{{status: data_list_loding_status, msg: data_list_loding_msg}}}"></template>
</view>
......
......@@ -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) {
......
public/appmini/old/qq/images/error.png

2.7 KB | W: | H:

public/appmini/old/qq/images/error.png

2.1 KB | W: | H:

public/appmini/old/qq/images/error.png
public/appmini/old/qq/images/error.png
public/appmini/old/qq/images/error.png
public/appmini/old/qq/images/error.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -85,7 +85,7 @@
</view>
</view>
<view qq:if="{{goods.length == 0}}">
<view qq:if="{{goods_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
......
......@@ -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) {
......
public/appmini/old/toutiao/images/error.png

2.7 KB | W: | H:

public/appmini/old/toutiao/images/error.png

2.1 KB | W: | H:

public/appmini/old/toutiao/images/error.png
public/appmini/old/toutiao/images/error.png
public/appmini/old/toutiao/images/error.png
public/appmini/old/toutiao/images/error.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -85,7 +85,7 @@
</view>
</view>
<view tt:if="{{goods.length == 0}}">
<view tt:if="{{goods_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
......
......@@ -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) {
......
{
"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}}",
......
public/appmini/old/weixin/images/error.png

2.7 KB | W: | H:

public/appmini/old/weixin/images/error.png

2.1 KB | W: | H:

public/appmini/old/weixin/images/error.png
public/appmini/old/weixin/images/error.png
public/appmini/old/weixin/images/error.png
public/appmini/old/weixin/images/error.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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('当前模式不允许使用地址');
}
},
});
<view wx:if="{{goods_list.length > 0}}" class="page">
<!-- 地址 -->
<view class="address bg-white arrow-right">
<navigator url="/pages/user-address/user-address?is_back=1" hover-class="none">
<view wx:if="{{address != null}}">
<view class="address-base oh">
<text>{{address.name}}</text>
<text class="fr">{{address.tel}}</text>
<block wx:if="{{common_site_type == 1}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: 2, msg: '展示型不允许提交订单'}}"></template>
</block>
<block wx:else>
<view wx:if="{{goods_list.length > 0}}" class="page">
<!-- 地址 -->
<block wx:if="{{common_site_type == 0 || common_site_type == 2}}">
<view class="address bg-white arrow-right" bindtap="address_event">
<view wx:if="{{address != null}}">
<view class="address-base oh">
<text>{{address.name}}</text>
<text class="fr">{{address.tel}}</text>
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name}}{{address.city_name}}{{address.county_name}}{{address.address}}</view>
</view>
</view>
<view class="address-detail oh">
<image class="icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{address.province_name}}{{address.city_name}}{{address.county_name}}{{address.address}}</view>
<view wx:if="{{address == null}}" class="no-address cr-888">
请选择地址
</view>
</view>
<view wx:if="{{address == null}}" class="no-address cr-888">
请选择地址
</view>
</navigator>
</view>
<view class="address-divider spacing-mb"></view>
<view class="address-divider spacing-mb"></view>
</block>
<!-- 商品 -->
<view class="goods bg-white spacing-mb">
<view wx:for="{{goods_list}}" wx:key="key" class="goods-item oh">
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block wx:if="{{item.spec != null}}">
<view class="goods-spec cr-888" wx:for="{{item.spec}}" wx:key="key" wx:for-item="spec">{{spec.type}}:{{spec.value}}
</view>
</block>
</view>
<view class="oh goods-price">
<text class="sales-price">¥{{item.price}}
</text>
<text wx:if="{{item.original_price > 0}}" class="original-price">¥{{item.original_price}}
</text>
<text class="buy-number cr-888">x{{item.stock}}
</text>
<!-- 商品 -->
<view class="goods bg-white spacing-mb">
<view wx:for="{{goods_list}}" wx:key="key" class="goods-item oh">
<image class="goods-image fl" src="{{item.images}}" mode="aspectFill" />
<view class="goods-base">
<view class="goods-title multi-text">{{item.title}}</view>
<block wx:if="{{item.spec != null}}">
<view class="goods-spec cr-888" wx:for="{{item.spec}}" wx:key="key" wx:for-item="spec">{{spec.type}}:{{spec.value}}
</view>
</block>
</view>
<view class="oh goods-price">
<text class="sales-price">¥{{item.price}}
</text>
<text wx:if="{{item.original_price > 0}}" class="original-price">¥{{item.original_price}}
</text>
<text class="buy-number cr-888">x{{item.stock}}
</text>
</view>
</view>
</view>
</view>
<!-- 留言 -->
<view class="content-textarea-view bg-white spacing-mb">
<textarea wx:if="{{!popup_plugins_coupon_status}}" bindinput="bind_user_note_event" value="{{user_note_value}}" maxlength="60" placeholder="留言" class="wh-auto" />
<view wx:if="{{popup_plugins_coupon_status}}" class="cr-888">{{user_note_value || '留言'}}</view>
</view>
<!-- 优惠劵 -->
<view wx:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="plugins-coupon bg-white spacing-mb arrow-right" bindtap="plugins_coupon_open_event">
<text class="cr-666">优惠劵</text>
<text class="cr-ccc fr">{{plugins_choice_coupon_value}}</text>
</view>
<!-- 留言 -->
<view class="content-textarea-view bg-white spacing-mb">
<textarea wx:if="{{!popup_plugins_coupon_status}}" bindinput="bind_user_note_event" value="{{user_note_value}}" maxlength="60" placeholder="留言" class="wh-auto" />
<view wx:if="{{popup_plugins_coupon_status}}" class="cr-888">{{user_note_value || '留言'}}</view>
</view>
<!-- 扩展数据展示 -->
<view wx:if="{{extension_data.length > 0}}" class="extension-list spacing-mb">
<view wx:for="{{extension_data}}" wx:key="key" class="item oh">
<text class="cr-666 fl">{{item.name}}
</text>
<text class="text-tips fr">{{item.tips}}
</text>
<!-- 优惠劵 -->
<view wx:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="plugins-coupon bg-white spacing-mb arrow-right" bindtap="plugins_coupon_open_event">
<text class="cr-666">优惠劵</text>
<text class="cr-ccc fr">{{plugins_choice_coupon_value}}</text>
</view>
</view>
<!-- 支付方式 -->
<view wx:if="{{payment_list.length > 0 && common_order_is_booking != 1}}" class="payment-list bg-white oh">
<view class="item tc fl" wx:for="{{payment_list}}" wx:key="key">
<view class="item-content br {{(item.selected || '')}}" data-value="{{item.id}}" bindtap="payment_event">
<image wx:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
<text>{{item.name}}</text>
<!-- 扩展数据展示 -->
<view wx:if="{{extension_data.length > 0}}" class="extension-list spacing-mb">
<view wx:for="{{extension_data}}" wx:key="key" class="item oh">
<text class="cr-666 fl">{{item.name}}
</text>
<text class="text-tips fr">{{item.tips}}
</text>
</view>
</view>
</view>
<!-- 导航 -->
<view class="buy-nav oh wh-auto">
<view class="nav-base bg-white fl single-text">
<text>合计:</text>
<text class="sales-price">¥{{total_price}}</text>
<!-- 支付方式 -->
<view wx:if="{{payment_list.length > 0 && common_order_is_booking != 1}}" class="payment-list bg-white oh">
<view class="item tc fl" wx:for="{{payment_list}}" wx:key="key">
<view class="item-content br {{(item.selected || '')}}" data-value="{{item.id}}" bindtap="payment_event">
<image wx:if="{{(item.logo || null) != null}}" class="icon" src="{{item.logo}}" mode="widthFix" />
<text>{{item.name}}</text>
</view>
</view>
</view>
<view class="fr nav-submit">
<button class="bg-main wh-auto" type="default" bindtap="buy_submit_event" disabled="{{buy_submit_disabled_status}}" hover-class="none">提交订单</button>
<!-- 导航 -->
<view class="buy-nav oh wh-auto">
<view class="nav-base bg-white fl single-text">
<text>合计:</text>
<text class="sales-price">¥{{total_price}}</text>
</view>
<view class="fr nav-submit">
<button class="bg-main wh-auto" type="default" bindtap="buy_submit_event" disabled="{{buy_submit_disabled_status}}" hover-class="none">提交订单</button>
</view>
</view>
</view>
</view>
<view wx:if="{{goods.length == 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<view wx:if="{{goods_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<!-- 优惠劵选择 -->
<component-popup prop-show="{{popup_plugins_coupon_status}}" prop-position="bottom" bindonclose="plugins_coupon_close_event">
<view class="plugins-coupon-popup bg-white">
<view class="close oh">
<view class="fr" catchtap="plugins_coupon_close_event">
<icon type="clear" size="20" />
</view>
</view>
<view wx:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="coupon-container oh br-b">
<view class="not-use-tips tc">
<text bindtap="plugins_coupon_not_use_event">不使用优惠劵</text>
<!-- 优惠劵选择 -->
<component-popup prop-show="{{popup_plugins_coupon_status}}" prop-position="bottom" bindonclose="plugins_coupon_close_event">
<view class="plugins-coupon-popup bg-white">
<view class="close oh">
<view class="fr" catchtap="plugins_coupon_close_event">
<icon type="clear" size="20" />
</view>
</view>
<block wx:for="{{plugins_coupon_data.coupon_list}}" wx:key="item">
<view class="item spacing-mt bg-white" style="border:1px solid {{item.coupon.bg_color_value}};">
<view class="v-left fl">
<view class="base single-text" style="color:{{item.coupon.bg_color_value}};">
<text class="symbol">¥</text>
<text class="price">{{item.coupon.discount_value}}</text>
<text class="unit">{{item.coupon.type_unit}}</text>
<text wx:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
<view wx:if="{{(plugins_coupon_data || null) != null && plugins_coupon_data.coupon_list.length > 0}}" class="coupon-container oh br-b">
<view class="not-use-tips tc">
<text bindtap="plugins_coupon_not_use_event">不使用优惠劵</text>
</view>
<block wx:for="{{plugins_coupon_data.coupon_list}}" wx:key="item">
<view class="item spacing-mt bg-white" style="border:1px solid {{item.coupon.bg_color_value}};">
<view class="v-left fl">
<view class="base single-text" style="color:{{item.coupon.bg_color_value}};">
<text class="symbol">¥</text>
<text class="price">{{item.coupon.discount_value}}</text>
<text class="unit">{{item.coupon.type_unit}}</text>
<text wx:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666 single-text">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888 single-text">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
</view>
<view class="v-right fr" style="background:{{item.coupon.bg_color_value}};" data-index="{{index}}" data-value="{{item.id}}" bindtap="plugins_coupon_use_event">
<text class="circle"></text>
<text>{{plugins_use_coupon_id == item.id ? '已选' : '选择'}}</text>
</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666 single-text">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888 single-text">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
</view>
<view class="v-right fr" style="background:{{item.coupon.bg_color_value}};" data-index="{{index}}" data-value="{{item.id}}" bindtap="plugins_coupon_use_event">
<text class="circle"></text>
<text>{{plugins_use_coupon_id == item.id ? '已选' : '选择'}}</text>
</view>
</view>
</block>
</block>
</view>
</view>
</view>
</component-popup>
\ No newline at end of file
</component-popup>
</block>
\ No newline at end of file
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();
}
},
});
{
"enablePullDownRefresh": true
}
\ No newline at end of file
<view class="page">
<view wx:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" wx:for="{{data_list}}" wx:key="key">
<view bindtap="address_conent_event" data-index="{{index}}">
<view class="base oh">
<text wx:if="{{(item.alias || null) != null}}" class="address-alias">{{item.alias}}</text>
<text>{{item.name}}</text>
<text class="fr">{{item.tel}}</text>
</view>
<view class="address oh">
<image class="item-icon fl" src="/images/user-address.png" mode="widthFix" />
<view class="text fr">{{item.province_name}}{{item.city_name}}{{item.county_name}}{{item.address}}</view>
</view>
</view>
<view class="operation br-t oh">
<button wx:if="{{item.lng > 0 && item.lat > 0}}" class="fr cr-666 map-submit br" type="default" size="mini" bindtap="address_map_event" data-index="{{index}}" hover-class="none">查看地图</button>
</view>
</view>
</view>
<view wx:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
\ No newline at end of file
.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
......@@ -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 {
......
......@@ -129,13 +129,13 @@
<image src="{{goods_favor_icon}}" mode="scaleToFill" />
<text class="dis-block cr-888">{{goods_favor_text}}</text>
</view>
<view class="fr {{common_is_exhibition_mode == 1 ? 'exhibition-mode' : ''}}">
<!-- 展示型 -->
<block wx:if="{{common_is_exhibition_mode == 1}}">
<view class="fr {{common_site_type == 1 ? 'exhibition-mode' : ''}}">
<!-- 站点模式 1 展示型 -->
<block wx:if="{{common_site_type == 1}}">
<button class="bg-main fl" type="default" bindtap="exhibition_submit_event" hover-class="none">{{nav_submit_text}}</button>
</block>
<!-- 销售型 -->
<!-- 销售型,自提点,虚拟销售 -->
<block wx:else>
<button class="bg-warning fl" type="default" bindtap="cart_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">加入购物车</button>
<button class="bg-main fl" type="default" bindtap="buy_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">{{nav_submit_text}}</button>
......
......@@ -3,6 +3,7 @@
<view class="item bg-white spacing-mb" wx:for="{{data_list}}" wx:key="key">
<view bindtap="address_conent_event" data-index="{{index}}">
<view class="base oh">
<text wx:if="{{(item.alias || null) != null}}" class="address-alias">{{item.alias}}</text>
<text>{{item.name}}</text>
<text class="fr">{{item.tel}}</text>
</view>
......
......@@ -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);
......
......@@ -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: '',
......
<view wx:if="{{detail != null}}">
<view class="address bg-white spacing-mb">
<view wx:if="{{detail.order_model == 0 || detail.order_model == 2}}" class="address bg-white spacing-mb">
<view class="address-base oh">
<text>{{detail.receive_name}}</text>
<text class="fr">{{detail.receive_tel}}</text>
......@@ -32,19 +32,42 @@
</view>
<!-- 订单基础数据 -->
<view wx:if="{{detail_list.length > 0}}" class="detail-list bg-white">
<view wx:for="{{detail_list}}" wx:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{item.value}}</view>
<view wx:if="{{detail_list.length > 0}}" class="panel-item spacing-mt">
<view class="panel-title">基础数据</view>
<view class="panel-content bg-white">
<view wx:for="{{detail_list}}" wx:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<!-- 虚拟销售数据 -->
<view wx:if="{{detail.order_model == 3 && detail.pay_status == 1 && (detail.status == 3 || detail.status == 4)}}" class="panel-item spacing-mt site-fictitious">
<view class="panel-title">{{site_fictitious.title || '密钥信息'}}</view>
<view class="panel-content bg-white oh">
<view wx:if="{{(site_fictitious.tips || null) != null}}" class="tips-value">
<rich-text nodes="{{site_fictitious.tips}}"></rich-text>
</view>
<view wx:for="{{detail.items}}" wx:key="item" class="item br-b oh">
<image class="left-image br fl" src="{{item.images}}" mode="aspectFill" />
<view class="right-value fr">
<rich-text wx:if="{{(item.fictitious_goods_value || null) != null}}" nodes="{{item.fictitious_goods_value}}"></rich-text>
<text wx:else class="cr-888">未配置数据</text>
</view>
</view>
</view>
</view>
<!-- 扩展数据 -->
<view wx:if="{{extension_data.length > 0}}" class="extension-list bg-white spacing-mt">
<view wx:for="{{extension_data}}" wx:key="item" class="item br-b oh">
<view wx:if="{{extension_data.length > 0}}" class="panel-item spacing-mt extension-list">
<view class="panel-title">扩展数据</view>
<view class="panel-content bg-white">
<view wx:for="{{extension_data}}" wx:key="item" class="item br-b oh">
<text class="title">{{item.name}}</text>
<text class="content cr-888 br-l">{{item.tips}}</text>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.wxml" />
......
......@@ -52,24 +52,31 @@
}
/*
* 基础信息
* 面板信息
*/
.detail-list {
padding: 0 10rpx;
}
.detail-list .item {
.panel-item .panel-title {
background: #fff;
font-weight: bold;
padding: 15rpx;
border-bottom: 2px solid #eee;
font-size: 34rpx;
}
.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
......@@ -54,7 +54,7 @@
<view class="panel-content">
<view wx:for="{{panel_base_data_list}}" wx:key="item" class="item br-b oh">
<view class="title fl">{{item.name}}</view>
<view class="content cr-888 fl br-l">{{new_aftersale_data[item.field] || ''}}</view>
<view class="content cr-ccc fl br-l">{{new_aftersale_data[item.field] || ''}}</view>
</view>
</view>
</view>
......
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册