diff --git a/application/index/controller/Buy.php b/application/index/controller/Buy.php index 31c73af81..24bd1a8ea 100755 --- a/application/index/controller/Buy.php +++ b/application/index/controller/Buy.php @@ -71,7 +71,7 @@ class Buy extends Common } // 参数 - $params = array_merge(input(), $data); + $params = array_merge($this->data_request, $data); $params['user'] = $this->user; $buy_ret = BuyService::BuyTypeGoodsList($params); @@ -82,7 +82,7 @@ class Buy extends Common $buy_base = $buy_ret['data']['base']; $buy_goods = $buy_ret['data']['goods']; $buy_extension_data = $buy_ret['data']['extension_data']; -print_r($buy_goods);die; + // 用户地址 $address = UserService::UserAddressList(['user'=>$this->user]); $this->assign('user_address_list', $address['data']); @@ -103,7 +103,7 @@ print_r($buy_goods);die; // 页面数据 $this->assign('base', $buy_base); - $this->assign('goods_list', $buy_goods); + $this->assign('buy_goods', $buy_goods); $this->assign('extension_data', $buy_extension_data); $this->assign('params', $params); diff --git a/application/index/view/default/buy/index.html b/application/index/view/default/buy/index.html index abb890a7d..c47ea739c 100755 --- a/application/index/view/default/buy/index.html +++ b/application/index/view/default/buy/index.html @@ -58,7 +58,7 @@

- 确认收货地址 + 确认收货地址

{{if !empty($user_address_list)}} @@ -72,10 +72,10 @@
{{if !empty($address.alias)}} - {{$address.alias}} + {{$address.alias}} {{/if}} {{if isset($address['is_default']) and $address['is_default'] eq 1}} - 默认 + 默认 {{/if}} {{$address.name}} @@ -134,7 +134,7 @@

{{if !empty($base['address']['alias'])}} - {{$base.address.alias}} + {{$base.address.alias}} {{/if}} {{$base.address.name}} {{$base.address.tel}} @@ -172,7 +172,7 @@

  • {{if !empty($address['alias'])}} - {{$address.alias}} + {{$address.alias}} {{/if}} {{$address.name}} {{$address.tel}} @@ -183,7 +183,7 @@ {{$address.county_name}} {{$address.address}} {{if isset($address['lng']) and $address['lng'] gt 0 and isset($address['lat']) and $address['lat'] gt 0}} - 查看地图 + 查看地图 {{/if}}

    {{if (isset($params['address_id']) and $params['address_id'] eq $key) or (!empty($base['address']) and $base.address.id eq $key)}} @@ -195,12 +195,9 @@ {{/foreach}} -
    -
    - 地图位置 - -
    -
    +
  • @@ -260,68 +257,90 @@ {{/foreach}} {{/if}} - -
    -

    商品明细

    - {{if !empty($goods_list)}} - - - - - - - - - - - {{foreach $goods_list as $goods}} - - - - - - - {{/foreach}} - -
    商品信息单价数量金额
    -
    - - - -
    - {{$goods.title}} - {{if !empty($goods.spec)}} -
      - {{foreach $goods.spec as $spec}} -
    • {{$spec.type}}:{{$spec.value}}
    • - {{/foreach}} -
    - {{/if}} -
    + +
    +

    订单信息

    + {{if !empty($buy_goods)}} +
    + {{foreach $buy_goods as $v}} +
    +
    + {{$v.name}}{{if !empty($v['alias'])}}{{$v.alias}}{{/if}} + {{if isset($v['lng']) and isset($v['lat']) and $v['lng'] gt 0 and $v['lat'] gt 0}} + -
    - {{if $goods['original_price'] gt 0}} - {{$price_symbol}}{{$goods.original_price}} - {{/if}} - {{$price_symbol}}{{$goods.price}} - x{{$goods.stock}} -
    -
    - {{if $goods['original_price'] gt 0}} -

    {{$price_symbol}}{{$goods.original_price}}

    - {{/if}} -

    {{$price_symbol}}{{$goods.price}}

    -
    - {{$goods.stock}} {{$goods.inventory_unit}} - - {{$price_symbol}}{{$goods.total_price}} -
    + {{/if}} +
    +
    + + {{if !empty($v['goods_items'])}} + + + + + + + + + + + {{foreach $v.goods_items as $goods}} + + + + + + + {{/foreach}} + +
    商品信息单价数量金额
    +
    + + + +
    + {{$goods.title}} + {{if !empty($goods.spec)}} +
      + {{foreach $goods.spec as $spec}} +
    • {{$spec.type}}:{{$spec.value}}
    • + {{/foreach}} +
    + {{/if}} +
    +
    +
    + {{if $goods['original_price'] gt 0}} + {{$price_symbol}}{{$goods.original_price}} + {{/if}} + {{$price_symbol}}{{$goods.price}} + x{{$goods.stock}} +
    +
    + {{if $goods['original_price'] gt 0}} +

    {{$price_symbol}}{{$goods.original_price}}

    + {{/if}} +

    {{$price_symbol}}{{$goods.price}}

    +
    + {{$goods.stock}} {{$goods.inventory_unit}} + + {{$price_symbol}}{{$goods.total_price}} +
    + {{else /}} +
    没有商品
    + {{/if}} - -
    -

    - 合计 {{$price_symbol}}{{$base.total_price}} -

    + +
    +
    +

    + 合计 {{$price_symbol}}{{$v.items_total_price}} +

    +
    +
    +
    + {{/foreach}}
    {{else /}}
    没有商品
    @@ -343,14 +362,10 @@ {{/if}} -
    +
    - + +
    @@ -401,24 +416,14 @@
    实付款: - {{$price_symbol}} - {{$base.actual_price}} + {{$price_symbol}} + {{$base.actual_price}}
    - {{if in_array($common_site_type, [0,2])}} + {{if in_array($common_site_type, [0,2,4]) and !empty($base['address'])}}
    - +
    {{/if}}
    diff --git a/application/index/view/default/useraddress/index.html b/application/index/view/default/useraddress/index.html index 8e6df25cc..8cc704eef 100755 --- a/application/index/view/default/useraddress/index.html +++ b/application/index/view/default/useraddress/index.html @@ -32,10 +32,10 @@
    {{if !empty($address.alias)}} - {{$address.alias}} + {{$address.alias}} {{/if}} {{if isset($address['is_default']) and $address['is_default'] eq 1}} - 默认 + 默认 {{/if}} {{$address.name}} diff --git a/application/service/OrderSplitService.php b/application/service/OrderSplitService.php index 035459229..94dcd4d7c 100644 --- a/application/service/OrderSplitService.php +++ b/application/service/OrderSplitService.php @@ -11,7 +11,6 @@ namespace app\service; use think\Db; -use think\facade\Hook; use app\service\WarehouseService; /** @@ -103,30 +102,46 @@ class OrderSplitService // 商品仓库分组 if(!empty($warehouse)) { - $goods = []; foreach($warehouse as $w) { // 是否还存在未分配的数量 if($v['stock'] > 0) { - // 追加商品并减除数量 - $goods[] = $v; + // 赋值数据 + $temp_v = $v; + + // 购买数量计算 + if($temp_v['stock'] > $w['inventory']) + { + $temp_v['stock'] = $w['inventory']; + } + + // 总价计算 + $temp_v['total_price'] = $temp_v['price']*$temp_v['stock']; + + // 减除数量 $v['stock'] -= $w['inventory']; // 是否第一次赋值 if(!array_key_exists($w['id'], $result)) { + // 仓库 $warehouse_handle = WarehouseService::DataHandle([$w]); $result[$w['id']] = $warehouse_handle[0]; $result[$w['id']]['goods_items'] = []; unset($result[$w['id']]['is_default'], $result[$w['id']]['level'], $result[$w['id']]['inventory']); + + // 订单基础信息 + $result[$w['id']]['items_total_price'] = 0; + $result[$w['id']]['items_stock_total'] = 0; } // 商品归属到仓库下 - if(!empty($goods)) - { - $result[$w['id']]['goods_items'] = array_merge($result[$w['id']]['goods_items'], $goods); - } + $result[$w['id']]['goods_items'] = array_merge($result[$w['id']]['goods_items'], [$temp_v]); + + // 基础信息 + $result[$w['id']]['items_total_price'] += $temp_v['total_price']; + $result[$w['id']]['items_stock_total'] += $temp_v['stock']; } else { break; } @@ -141,13 +156,22 @@ class OrderSplitService { if(!array_key_exists($warehouse_default['id'], $result)) { + // 仓库 $warehouse_handle = WarehouseService::DataHandle([$warehouse_default]); $result[$warehouse_default['id']] = $warehouse_handle[0]; $result[$warehouse_default['id']]['goods_items'] = []; + + // 订单基础信息 + $result[$warehouse_default['id']]['items_total_price'] = 0; + $result[$warehouse_default['id']]['items_stock_total'] = 0; } // 商品归属到仓库下 $result[$warehouse_default['id']]['goods_items'][] = $v; + + // 基础信息 + $result[$warehouse_default['id']]['items_total_price'] += $temp_v['total_price']; + $result[$warehouse_default['id']]['items_stock_total'] += $temp_v['stock']; } } } diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 1fadeeb5a..47511deac 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -86,7 +86,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view, .content-app-ite padding-top: 0; background: #fff; } -.popup-not-title .am-popup-inner .am-close { +.popup-not-title .am-close { position: absolute; right: 10px; top: 10px; @@ -101,7 +101,7 @@ form.am-form .am-form-group-refreshing, .plug-file-upload-view, .content-app-ite height: 32px; z-index: 1; } -.popup-not-title .am-popup-inner .am-close:hover { +.popup-not-title .am-close:hover { background: #f22a30; } @@ -603,4 +603,38 @@ button.colorpicker-submit img { */ .am-text-grey { color: #c3c3c3; +} + +/** + * 小微章-镂空 + */ +.am-badge-default-plain { + border: 1px solid #999; + background: transparent; + color: #999; +} +.am-badge-primary-plain { + border: 1px solid #0e90d2; + background: transparent; + color: #0e90d2; +} +.am-badge-secondary-plain { + border: 1px solid #3bb4f2; + background: transparent; + color: #3bb4f2; +} +.am-badge-success-plain { + border: 1px solid #5eb95e; + background: transparent; + color: #5eb95e; +} +.am-badge-warning-plain { + border: 1px solid #F37B1D; + background: transparent; + color: #F37B1D; +} +.am-badge-danger-plain { + border: 1px solid #dd514c; + background: transparent; + color: #dd514c; } \ No newline at end of file diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index cb1966259..8e218a420 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -1514,12 +1514,17 @@ function TreeFormInit() * @param {[int]} level [层级] * @param {[object]} point [中心对象] * @param {[boolean]} is_dragend [标注是否可拖拽] + * @param {[string]} mapid [地图id(默认 map)] */ -function MapInit(lng, lat, level, point, is_dragend) +function MapInit(lng, lat, level, point, is_dragend, mapid) { // 百度地图API功能 - var map = new BMap.Map("map", {enableMapClick:false}); - level = level || $('#map').data('level') || 16; + if((mapid || null) == null) + { + mapid = 'map'; + } + var map = new BMap.Map(mapid, {enableMapClick:false}); + level = level || $('#'+mapid).data('level') || 16; point = point || (new BMap.Point(lng || 116.400244, lat || 39.92556)); map.centerAndZoom(point, level); @@ -2451,10 +2456,15 @@ $(function() return false; } + // 基础参数 + var title = $(this).data('title') || ''; + var class_tag = $(this).data('class') || ''; + // 弹窗 AMUI.dialog.popup({ + title: title, content: '
    ', - class: 'map-popup' + class: 'map-popup '+class_tag }); MapInit(lng, lat, null, null, false); }); diff --git a/public/static/index/default/css/buy.css b/public/static/index/default/css/buy.css index bde018d5c..c5cc1ed8b 100755 --- a/public/static/index/default/css/buy.css +++ b/public/static/index/default/css/buy.css @@ -39,12 +39,16 @@ ul.logistics-list li img, ul.payment-list li img { width: 36px; height: 36px; ve } /*运费、留言、扩展数据*/ -.buy-message {padding:0px 5px} .td.td-oplist .pay-logis,.td.td-bonus select{position:absolute;top:6px;right:0;} -.memo-input{width:calc(100% - 64px);border: 1px solid #ccc;padding: 5px;outline:none;border-radius: 2px;} +.memo-input {width:calc(100% - 55px);border: 1px solid #ccc;padding: 5px;outline:none;border-radius: 2px;} +@media only screen and (max-width: 1025px) { + .buy-message { + padding: 0 5px; + } +} /*合计*/ -.buy-point-discharge{font-size:14px ;font-weight: 700;padding:10px 5px;text-align: right;} +.buy-point-discharge{font-size:14px ;font-weight: 700;} .box{float:left;width:70%;height:40px ;line-height:40px ;font-size: 14px;text-align: right;padding-right:10px ;} .pay-address{display: none;} .nav-buy .btn-go{float:left;width:30%;color:#fff ;background:#d2364c ;text-align: center;height:40px ;line-height:40px ;font-size: 14px; border: 0; } @@ -74,6 +78,9 @@ ul.address-list, .business-item ul { overflow: hidden; } .link-list .mobile-address ul.address-list li .address-left { width: 100%; } .link-list .mobile-address ul.address-list li .address-right { display: none; } +/*留言*/ +.buy-message .order-extra {border:1px solid #ddd; overflow: hidden;padding: 15px 10px;} + @media only screen and (min-width:640px) { /*地址操作*/ .address { padding: 0 1px 0 5px; } @@ -81,7 +88,6 @@ ul.address-list, .business-item ul { overflow: hidden; } .address .control h3{ display: -webkit-inline-box; border: none;margin-top:20px; } .am-form-content {margin-left:75px;} .am-form-label {width:60px;float: left;} - .link-list{ margin:10px; } .link-list h3 {padding-bottom:5px;} /*业务*/ @@ -90,9 +96,7 @@ ul.address-list, .business-item ul { overflow: hidden; } .business-item ul li:hover, ul.address-list li:hover { border:1px solid #d2364c; box-shadow: 0px 0 0px 1px #d2364c; } /*留言*/ - .buy-message{border:1px solid #eee; overflow: hidden;padding: 10px; margin: 0 5px;} - .order-extra{border: none;float: left;width: 60%;} - .memo-input{min-width:280px ;width:80%; } + .buy-message .memo-input {min-width:280px ;max-width:60%; } /*带个人信息的结算*/ .box ,.nav-buy .btn-go{float:right;width:auto;height:auto;padding:10px 10px;} @@ -107,9 +111,8 @@ ul.address-list, .business-item ul { overflow: hidden; } .nav-buy .btn-go {display: block;padding: 0 26px;height: 36px;font: 400 18px/36px arial;font-size: 18px;background-color: #d2364c;color: #fff;text-align: center;cursor: pointer;outline: 0; z-index:999;} .base-real-pay {line-height: 16px;margin: 0px 0px 10px;position: relative;} .base-real-pay .g_price span {font-size: 26px;} - .price .nav-total-price {color: #d2364c;font: 700 26px tahoma;} + .price .nav-total-price {font: 700 26px tahoma;} .order-nav .buy-footer-address .buy-line-title {color: #404040;font-weight: 700;} - .link-list{margin:0px auto;} /*地址管理*/ .address ul{margin-top: 10px; padding: 1px;} ul.address-list li{display:block; width: calc(33% - 5px);height: 130px;float: left;margin:0 10px 10px 0 ;padding:10px;border: 1px solid #e5e5e5;} @@ -125,7 +128,6 @@ ul.address-list, .business-item ul { overflow: hidden; } } @media only screen and (min-width:1025px) { - .link-list{ margin:0; } ul.address-list li { width: calc(25% - 8px); } ul.address-list li:nth-child(4n) { margin-right: 0; } ul.address-list li:nth-child(3n) { margin-right: 10px; } @@ -136,8 +138,6 @@ ul.address-list, .business-item ul { overflow: hidden; } .business-item ul li:nth-child(4n) { margin-right: 10px; } .business-item ul { padding: 10px 1px 0 1px; } .link-list h3 { padding: 0 0 5px 0; } - .buy-message { margin: 0; } - .buy-point-discharge { padding: 10px 0px; } /*扩展数据*/ .buy-extension-data { margin: 10px 0 0 0; } @@ -145,9 +145,7 @@ ul.address-list, .business-item ul { overflow: hidden; } @media only screen and (max-width:640px) { .cart-content table tr .base { width: 100%; } - - .address { margin-top: 10px; } - .address, .buy-message { border-top: 1px solid #eee; } + .address { margin-top: 10px; border-top: 1px solid #eee; } .address .control { display: none; } .address-default {background: url(../images/buy-peraddress.png) repeat-x; background-position: bottom; } ul.address-list li { padding: 5px; min-height: 60px; overflow: hidden; } @@ -155,7 +153,6 @@ ul.address-list, .business-item ul { overflow: hidden; } .business-item ul li { width: calc(50% - 6px); } .business-item ul li:nth-child(2n) { margin-right: 0; } - .buy-message { padding-top: 10px; } .pay-confirm em { font-size: 12px; } .pay-confirm .nav-total-price { color: #d2364c; font-weight: 700; } .order-nav { background: #f5f5f5; z-index: 100; } @@ -175,13 +172,10 @@ ul.address-list, .business-item ul { overflow: hidden; } .goods-attr { margin-top: 5px; } .goods-attr li { color: #888; line-height: 16px; } .original-price, .line-price { font-family: Verdana,Tahoma,arial; } -.original-price { color: #9c9c9c; text-decoration: line-through; } -.line-price { color: #3c3c3c; } -.line-price, strong.total-price-content { font-weight: 700; font-family: Verdana,Tahoma,arial; } -strong.total-price-content { color: #d2364c; font-size: 16px; } +.original-price { color: #999; text-decoration: line-through; } .am-table { margin-bottom: 10px; } -.am-table > tbody > tr > td { border-top: 1px solid #F5F5F5; } -.am-table > thead > tr > th { border-bottom: 1px solid #f7f7f7; } +.am-table > tbody > tr > td { border-top: 1px solid #eee; } +.am-table > thead > tr > th { border-bottom: 1px solid #f5f5f5; } @media only screen and (min-width:640px) { .cart-content table tr .base { width: 40%; } @@ -190,6 +184,11 @@ strong.total-price-content { color: #d2364c; font-size: 16px; } .cart-content table tr .total-price { width: 20%; } .cart-content { margin-top: 20px; } } +@media only screen and (max-width:640px) { + .goods-detail { + margin-bottom: 5px; + } +} /** @@ -257,28 +256,29 @@ strong.total-price-content { color: #d2364c; font-size: 16px; } left: 0; background: rgba(0, 0, 0, 0.3); z-index: 1001; - padding: 10%; + padding: 50px; width: 100%; height: 100%; display: none; } -.extraction-address-map-container .map-title { - font-weight: bold; - font-size: 16px; - color: #333; +.extraction-address-map-container .am-close { + position: absolute; + right: 35px; + top: 35px; + -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); + opacity: 1; + background: #767676; + color: #fff; + border: 3px solid #f4f4f4; + width: 32px; + height: 32px; + z-index: 1; } -.extraction-address-map-container .map-inner { - height: 43px; - line-height: 43px; - background: #fff; - border-bottom: 1px solid #dedede; -} -.extraction-address-map-container .map-inner .am-close { - margin: 9px 9px 0 0; -} -#map { +#extraction-map { width: 100%; - height: calc(100% - 43px); + height: 100%; } /** @@ -296,4 +296,35 @@ strong.total-price-content { color: #d2364c; font-size: 16px; } margin-left: 0; margin-right: 0; } +} + +/** + * 商品分组列表 + */ +@media only screen and (max-width: 1025px) { + .goods-group-list { + padding: 0 5px; + } +} + +/** + * 无数据提示 + */ +.link-list .table-no { + padding: 50px 0; +} + +/** + * 面板 + */ +.link-list .am-panel { + -webkit-box-shadow: none; + box-shadow: none; +} + +/** + * 查看地图 + */ +.link-list .am-badge-default:hover { + background: #666; } \ No newline at end of file diff --git a/public/static/index/default/js/buy.js b/public/static/index/default/js/buy.js index e48892295..868a1efae 100755 --- a/public/static/index/default/js/buy.js +++ b/public/static/index/default/js/buy.js @@ -147,9 +147,9 @@ $(function() } $extraction_map_container.show(); - MapInit(lng, lat, null, null, false); + MapInit(lng, lat, null, null, false, 'extraction-map'); }); - $extraction_map_container.find('.map-inner .am-close').on('click', function() + $extraction_map_container.find('.am-close').on('click', function() { $extraction_map_container.hide(); }); diff --git a/sourcecode/alipay/pages/answer-form/answer-form.js b/sourcecode/alipay/pages/answer-form/answer-form.js index 81315da90..438e1be30 100755 --- a/sourcecode/alipay/pages/answer-form/answer-form.js +++ b/sourcecode/alipay/pages/answer-form/answer-form.js @@ -3,7 +3,6 @@ Page({ data: { data_list_loding_status: 1, data_list_loding_msg: '处理错误', - form_submit_loading: false, }, @@ -25,6 +24,12 @@ Page({ }); return false; } + + // 开启表单 + this.setData({data_list_loding_status: 0}); + } else { + // 提示错误 + this.setData({data_list_loding_status: 2, data_list_loding_msg: '用户未登录'}); } }, diff --git a/sourcecode/baidu/pages/answer-form/answer-form.js b/sourcecode/baidu/pages/answer-form/answer-form.js index e3b68a7f5..f07db2a55 100755 --- a/sourcecode/baidu/pages/answer-form/answer-form.js +++ b/sourcecode/baidu/pages/answer-form/answer-form.js @@ -1,7 +1,9 @@ const app = getApp(); Page({ data: { - form_submit_loading: false + data_list_loding_status: 1, + data_list_loding_msg: '处理错误', + form_submit_loading: false, }, onLoad() {}, @@ -22,6 +24,12 @@ Page({ }); return false; } + + // 开启表单 + this.setData({data_list_loding_status: 0}); + } else { + // 提示错误 + this.setData({data_list_loding_status: 2, data_list_loding_msg: '用户未登录'}); } }, diff --git a/sourcecode/baidu/pages/answer-form/answer-form.swan b/sourcecode/baidu/pages/answer-form/answer-form.swan index 2ac666ce6..bd51731a5 100755 --- a/sourcecode/baidu/pages/answer-form/answer-form.swan +++ b/sourcecode/baidu/pages/answer-form/answer-form.swan @@ -1,4 +1,4 @@ -
    + @@ -12,4 +12,9 @@ -
    \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/sourcecode/qq/pages/answer-form/answer-form.js b/sourcecode/qq/pages/answer-form/answer-form.js index 5d758e4cb..cdffc2466 100755 --- a/sourcecode/qq/pages/answer-form/answer-form.js +++ b/sourcecode/qq/pages/answer-form/answer-form.js @@ -1,6 +1,8 @@ const app = getApp(); Page({ data: { + data_list_loding_status: 1, + data_list_loding_msg: '处理错误', form_submit_loading: false, }, @@ -22,6 +24,12 @@ Page({ }); return false; } + + // 开启表单 + this.setData({data_list_loding_status: 0}); + } else { + // 提示错误 + this.setData({data_list_loding_status: 2, data_list_loding_msg: '用户未登录'}); } }, diff --git a/sourcecode/qq/pages/answer-form/answer-form.qml b/sourcecode/qq/pages/answer-form/answer-form.qml index 2ac666ce6..5cc59b8b3 100755 --- a/sourcecode/qq/pages/answer-form/answer-form.qml +++ b/sourcecode/qq/pages/answer-form/answer-form.qml @@ -1,4 +1,4 @@ -
    + @@ -12,4 +12,9 @@ -
    \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/sourcecode/toutiao/pages/answer-form/answer-form.js b/sourcecode/toutiao/pages/answer-form/answer-form.js index 95a78b7a0..9e3b7f87a 100755 --- a/sourcecode/toutiao/pages/answer-form/answer-form.js +++ b/sourcecode/toutiao/pages/answer-form/answer-form.js @@ -1,6 +1,8 @@ const app = getApp(); Page({ data: { + data_list_loding_status: 1, + data_list_loding_msg: '处理错误', form_submit_loading: false, }, @@ -22,6 +24,12 @@ Page({ }); return false; } + + // 开启表单 + this.setData({data_list_loding_status: 0}); + } else { + // 提示错误 + this.setData({data_list_loding_status: 2, data_list_loding_msg: '用户未登录'}); } }, diff --git a/sourcecode/toutiao/pages/answer-form/answer-form.ttml b/sourcecode/toutiao/pages/answer-form/answer-form.ttml index 2ac666ce6..f7d45702c 100755 --- a/sourcecode/toutiao/pages/answer-form/answer-form.ttml +++ b/sourcecode/toutiao/pages/answer-form/answer-form.ttml @@ -1,4 +1,4 @@ -
    + @@ -12,4 +12,9 @@ -
    \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/sourcecode/weixin/pages/answer-form/answer-form.js b/sourcecode/weixin/pages/answer-form/answer-form.js index 9f9ae86a7..ac16e7b5f 100755 --- a/sourcecode/weixin/pages/answer-form/answer-form.js +++ b/sourcecode/weixin/pages/answer-form/answer-form.js @@ -1,6 +1,8 @@ const app = getApp(); Page({ data: { + data_list_loding_status: 1, + data_list_loding_msg: '处理错误', form_submit_loading: false, }, @@ -22,6 +24,12 @@ Page({ }); return false; } + + // 开启表单 + this.setData({data_list_loding_status: 0}); + } else { + // 提示错误 + this.setData({data_list_loding_status: 2, data_list_loding_msg: '用户未登录'}); } }, diff --git a/sourcecode/weixin/pages/answer-form/answer-form.wxml b/sourcecode/weixin/pages/answer-form/answer-form.wxml index 2ac666ce6..f2ec0048b 100755 --- a/sourcecode/weixin/pages/answer-form/answer-form.wxml +++ b/sourcecode/weixin/pages/answer-form/answer-form.wxml @@ -1,4 +1,4 @@ -
    + @@ -12,4 +12,9 @@ -
    \ No newline at end of file + + + + + + \ No newline at end of file