提交 79fa83ae 编写于 作者: D devil_gong

优化

上级 fbc1fe3a
......@@ -50,7 +50,7 @@ App({
// 请求地址
request_url: "https://demo.shopxo.net/",
//request_url: 'http://localhost/project/shopxo/service/',
request_url: 'http://localhost/project/shopxo/service/',
// 基础信息
application_title: "ShopXO电商系统",
......@@ -442,7 +442,6 @@ App({
var value = e.target.dataset.value || null;
var type = parseInt(e.target.dataset.type);
console.log(value, type)
if (value != null) {
switch(type) {
// web
......@@ -462,11 +461,17 @@ App({
// 跳转到地图查看位置
case 3 :
var values = value.split('|');
if (values.length != 4) {
my.showToast({content: '事件值格式有误'});
return false;
}
my.openLocation({
longitude: '121.549697',
latitude: '31.227250',
name: '支付宝',
address: '杨高路地铁站',
name: values[0],
address: values[1],
longitude: values[2],
latitude: values[3],
});
break;
......
......@@ -151,9 +151,13 @@ Page({
success: res => {
my.hideLoading();
if (res.data.code == 0) {
my.redirectTo({
url: '/pages/user-order/user-order?is_pay=1' + '&order_id=' + res.data.data.order.id
});
if (res.data.data.order.status == 1) {
my.redirectTo({
url: '/pages/user-order/user-order?is_pay=1&order_id=' + res.data.data.order.id
});
} else {
my.redirectTo({url: '/pages/user-order/user-order'});
}
}
},
fail: () => {
......
<!-- 搜索 -->
<view a:if="{{load_status == 1 && is_enable_search == 1}}" class="search wh-auto">
<view a:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto">
<view class="search-content bg-white oh">
<icon type="search" size="16" />
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" onConfirm="search_input_event" />
......@@ -51,7 +51,7 @@
</view>
<!-- 留言 -->
<view a:if="{{load_status == 1 && is_enable_answer == 1}}" class="spacing-10">
<view a:if="{{load_status == 1 && common_app_is_enable_answer == 1}}" class="spacing-10">
<navigator url="/pages/answer-form/answer-form" hover-class="none" class="bg-white">
<image class="wh-auto" mode="widthFix" src="/images/home-consulting-image.jpg" />
</navigator>
......
......@@ -10,8 +10,8 @@ Page({
data_bottom_line_status: false,
data_list: [],
common_shop_notice: null,
is_enable_search: 1,
is_enable_answer: 1,
common_app_is_enable_search: 1,
common_app_is_enable_answer: 1,
load_status: 0,
},
......@@ -45,8 +45,8 @@ Page({
indicator_dots: (data.data_list.length > 1),
autoplay: (data.data_list.length > 1),
common_shop_notice: data.common_shop_notice || null,
is_enable_search: data.is_enable_search,
is_enable_answer: data.is_enable_answer,
common_app_is_enable_search: data.common_app_is_enable_search,
common_app_is_enable_answer: data.common_app_is_enable_answer,
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
data_bottom_line_status: true,
});
......
......@@ -40,7 +40,7 @@ Page({
self.setData({
detail: data,
detail_list:[
{name: "订单号", value: data.order_no},
{name: "订单号", value: data.order_no},
{name: "状态", value: data.status_name},
{name: "支付状态", value: data.pay_status_name},
{name: "单价", value: data.price},
......@@ -55,8 +55,9 @@ Page({
{name: "确认时间", value: data.confirm_time},
{name: "支付时间", value: data.pay_time},
{name: "发货时间", value: data.delivery_time},
{name: "完成时间", value: data.success_time},
{name: "取消时间", value: data.cancel_time},
{name: "收货时间", value: data.collect_time},
{name: "取消时间", value: data.close_time},
{name: "关闭时间", value: data.close_time},
],
data_list_loding_status: 3,
data_bottom_line_status: true,
......
......@@ -27,7 +27,7 @@
<!-- 导航 -->
<view class="nav-box bg-white">
<block a:for="{{lists}}">
<block a:for="{{nav_lists}}">
<view a:if="{{item.is_show == 1}}">
<navigator url="/pages/{{item.url}}/{{item.url}}" class="nav-item br-b" hover-class="none">
<view class="arrow-right">
......
......@@ -18,7 +18,7 @@ Page({
{ name: "待收货", status: 3, count: 0 },
{ name: "已完成", status: 4, count: 0 },
],
lists: [
nav_lists: [
{
url: "user-order",
icon: "user-nav-order-icon",
......@@ -121,6 +121,7 @@ Page({
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
head_nav_list: temp_head_nav_list,
'nav_lists[3].is_show': (data.common_app_is_enable_answer == 1) ? 1 : 0,
});
} else {
my.showToast({
......
......@@ -33,7 +33,7 @@
</div>
<div class="am-form-group">
<label>{{:L('common_app_event_type_text')}}<span class="fs-12 fw-100 cr-999">({{:L('common_app_event_type_tips')}})</span></label>
<label>{{:L('common_app_event_type_text')}}</label>
<select name="event_type" class="am-radius chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" placeholder="{{:L('common_app_event_type_format')}}">
<option value="">{{:L('common_select_can_choose')}}</option>
<foreach name="common_app_event_type" item="v">
......@@ -42,6 +42,10 @@
</select>
</div>
<div class="am-form-group">
<div class="am-alert am-alert-warning am-radius" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>{{:L('common_app_event_type_tips')}}</p>
</div>
<label>{{:L('common_app_event_value_text')}}</label>
<input type="text" name="event_value" placeholder="{{:L('common_app_event_value_text')}}" data-validation-message="{{:L('common_app_event_value_format')}}" class="am-radius" <notempty name="data"> value="{{$data.event_value}}"</notempty> />
</div>
......
......@@ -72,7 +72,7 @@ class GoodsController extends CommonController
// 数据返回
$result = [
'goods' => $goods[0],
'common_order_is_booking' => MyC('common_order_is_booking', 0),
'common_order_is_booking' => (int) MyC('common_order_is_booking', 0),
];
$this->ajaxReturn(L('common_operation_success'), 0, $result);
}
......
......@@ -42,10 +42,10 @@ class IndexController extends CommonController
public function Index()
{
$result = [
'data_list' => GoodsService::HomeFloorList(),
'common_shop_notice' => MyC('common_shop_notice', null, true),
'is_enable_search' => MyC('common_app_is_enable_search', 1),
'is_enable_answer' => MyC('common_app_is_enable_answer', 1),
'data_list' => GoodsService::HomeFloorList(),
'common_shop_notice' => MyC('common_shop_notice', null, true),
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
];
// 返回数据
......
......@@ -272,6 +272,7 @@ class UserController extends CommonController
'user_goods_favor_count' => $user_goods_favor_count,
'user_goods_browse_count' => $user_goods_browse_count,
'common_message_total' => $common_message_total,
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 0),
);
// 返回数据
......
......@@ -319,7 +319,7 @@ return array(
'common_app_event_type_text' => '事件类型',
'common_app_event_type_format' => '事件值类型有误',
'common_app_event_type_tips' => '1,2,3',
'common_app_event_type_tips' => 'WEB页面<br />&nbsp&nbsp&nbsp;1.以http开头<br />&nbsp&nbsp&nbsp;2.并在小程序后台加入白名单<br /><br /> 内部页面(小程序/APP内部地址)<br />&nbsp&nbsp&nbsp;1.小程序或APP内部地址<br />&nbsp&nbsp&nbsp;2.小程序以/pages开始<br />&nbsp&nbsp&nbsp;3.例如:/pages/user/user<br />&nbsp&nbsp&nbsp;4.支持带参数 ?x=xx<br /><br /> 跳转原生地图查看指定位置<br />&nbsp&nbsp&nbsp;1.以 | 竖线分割,分别顺序 名称|地址|经度|纬度<br />&nbsp&nbsp&nbsp;2.例如:ShopXO|上海浦东新区张江高科技园区XXX号|121.626444|31.20843 ',
'common_app_event_value_text' => '事件值',
'common_app_event_value_format' => '事件值最多 255 个字符',
......@@ -575,7 +575,7 @@ return array(
// app事件类型
'common_app_event_type' => array(
0 => array('value' => 0, 'name' => 'WEB页面'),
1 => array('value' => 1, 'name' => '内部页面(小程序内部地址)'),
1 => array('value' => 1, 'name' => '内部页面(小程序/APP内部地址)'),
2 => array('value' => 2, 'name' => '外部小程序(同一个主体下的小程序appid)'),
3 => array('value' => 3, 'name' => '跳转原生地图查看指定位置'),
4 => array('value' => 4, 'name' => '拨打电话'),
......
......@@ -32,7 +32,7 @@
<div class="base">
<p class="title">拍下商品</p>
<notempty name="data.add_time">
<p class="date">{{:date('Y-m-d H:i:s', $data['add_time'])}}</p>
<p class="date">{{$data.add_time}}</p>
</notempty>
</div>
</li>
......@@ -44,7 +44,7 @@
<div class="base">
<p class="title">付款</p>
<notempty name="data.pay_time">
<p class="date">{{:date('Y-m-d H:i:s', $data['pay_time'])}}</p>
<p class="date">{{$data.pay_time}}</p>
</notempty>
</div>
</li>
......@@ -56,7 +56,7 @@
<div class="base">
<p class="title">卖家发货</p>
<notempty name="data.delivery_time">
<p class="date">{{:date('Y-m-d H:i:s', $data['delivery_time'])}}</p>
<p class="date">{{$data.delivery_time}}</p>
</notempty>
</div>
</li>
......@@ -68,7 +68,7 @@
<div class="base">
<p class="title">确认收货</p>
<notempty name="data.collect_time">
<p class="date">{{:date('Y-m-d H:i:s', $data['collect_time'])}}</p>
<p class="date">{{$data.collect_time}}</p>
</notempty>
</div>
</li>
......@@ -79,8 +79,8 @@
</p>
<div class="base">
<p class="title">评价</p>
<notempty name="data.user_is_comments">
<p class="date">{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}</p>
<notempty name="data.user_is_comments_time">
<p class="date">{{$data.user_is_comments_time}}</p>
</notempty>
</div>
</li>
......@@ -110,39 +110,51 @@
<notempty name="data.add_time">
<div class="items">
<div class="items-title am-fl">下单时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['add_time'])}}</div>
<div class="items-detail am-fl">{{$data.add_time}}</div>
</div>
</notempty>
<notempty name="data.confirm_time">
<div class="items">
<div class="items-title am-fl">确认时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['confirm_time'])}}</div>
<div class="items-detail am-fl">{{$data.confirm_time}}</div>
</div>
</notempty>
<notempty name="data.pay_time">
<div class="items">
<div class="items-title am-fl">付款时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['pay_time'])}}</div>
<div class="items-detail am-fl">{{$data.pay_time}}</div>
</div>
</notempty>
<notempty name="data.delivery_time">
<div class="items">
<div class="items-title am-fl">发货时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['delivery_time'])}}</div>
<div class="items-detail am-fl">{{$data.delivery_time}}</div>
</div>
</notempty>
<notempty name="data.collect_time">
<div class="items">
<div class="items-title am-fl">收货时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['collect_time'])}}</div>
<div class="items-detail am-fl">{{$data.collect_time}}</div>
</div>
</notempty>
<notempty name="data.user_is_comments">
<notempty name="data.user_is_comments_time">
<div class="items">
<div class="items-title am-fl">评论时间:</div>
<div class="items-detail am-fl">{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}</div>
<div class="items-detail am-fl">{{$data.user_is_comments_time}}</div>
</div>
</notempty>
<if condition="in_array($data['status'], [5]) and !empty($data['cancel_time'])">
<div class="items">
<div class="items-title am-fl">取消时间:</div>
<div class="items-detail am-fl">{{$data.cancel_time}}</div>
</div>
</if>
<if condition="in_array($data['status'], [6]) and !empty($data['close_time'])">
<div class="items">
<div class="items-title am-fl">关闭时间:</div>
<div class="items-detail am-fl">{{$data.close_time}}</div>
</div>
</if>
</div>
</div>
</div>
......@@ -176,20 +188,22 @@
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius submit-delete" data-url="{{:U('Home/Order/Delete')}}" data-id="{{$data.id}}" data-view="jump" data-value="{{:U('Home/Order/Index')}}">删除</button>
</if>
</div>
<div class="logistics">
<div class="items">
<div class="items-title am-fl">快递公司:</div>
<div class="items-detail am-fl">
<notempty name="data.express_name">{{$data.express_name}}</notempty>
</div>
</div>
<notempty name="data.express_number">
<if condition="in_array($data['status'], [3,4])">
<div class="logistics">
<div class="items">
<div class="items-title am-fl">快递单号:</div>
<div class="items-detail am-fl">{{$data.express_number}}</div>
<div class="items-title am-fl">快递公司:</div>
<div class="items-detail am-fl">
<notempty name="data.express_name">{{$data.express_name}}</notempty>
</div>
</div>
</notempty>
</div>
<notempty name="data.express_number">
<div class="items">
<div class="items-title am-fl">快递单号:</div>
<div class="items-detail am-fl">{{$data.express_number}}</div>
</div>
</notempty>
</div>
</if>
</div>
</div>
......
......@@ -138,7 +138,7 @@
<table id="data-list-{{$order.id}}" class="data-list <if condition="$order['status'] LT 4">data-ongoing</if>">
<tr class="content-hd">
<td colspan="6">
<span class="am-icon-calendar-check-o"> {{:date('Y-m-d', $order['add_time'])}}</span>
<span class="am-icon-calendar-check-o"> {{$order.add_time}}</span>
<span class="am-icon-bookmark-o"> {{$order.order_no}}</span>
</td>
</tr>
......
......@@ -594,12 +594,18 @@ class OrderService
// 发货时间
$v['delivery_time'] = empty($v['delivery_time']) ? null : date('Y-m-d H:i:s', $v['delivery_time']);
// 完成时间
$v['success_time'] = empty($v['success_time']) ? null : date('Y-m-d H:i:s', $v['success_time']);
// 收货时间
$v['collect_time'] = empty($v['collect_time']) ? null : date('Y-m-d H:i:s', $v['collect_time']);
// 取消时间
$v['cancel_time'] = empty($v['cancel_time']) ? null : date('Y-m-d H:i:s', $v['cancel_time']);
// 关闭时间
$v['close_time'] = empty($v['close_time']) ? null : date('Y-m-d H:i:s', $v['close_time']);
// 评论时间
$v['user_is_comments_time'] = ($v['user_is_comments'] == 0) ? null : date('Y-m-d H:i:s', $v['user_is_comments']);
// 空字段数据处理
if(empty($v['express_number']))
{
......@@ -718,8 +724,9 @@ class OrderService
// 开启事务
$m->startTrans();
$upd_data = [
'status' => 5,
'upd_time' => time(),
'status' => 5,
'cancel_time' => time(),
'upd_time' => time(),
];
if($m->where($where)->save($upd_data))
{
......
......@@ -34,6 +34,8 @@ button { outline: none; }
/* 商城公告 */
.common-shop-notice {
margin: 0;
border-left: 0;
border-right: 0;
}
/*所有超链接不要下划线*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册