提交 273b36a6 编写于 作者: D devil

1.8.1

上级 df3b9ffd
{
"name":"默认主题",
"ver":"1.9.0",
"ver":"1.8.1",
"author":"Devil",
"home":"https://shopxo.net/"
}
\ No newline at end of file
......@@ -27,7 +27,7 @@ return array(
'1.6.0' => array('value' => '1.6.0', 'name' => 'v1.6.0'),
'1.7.0' => array('value' => '1.7.0', 'name' => 'v1.7.0'),
'1.8.0' => array('value' => '1.8.0', 'name' => 'v1.8.0'),
'1.9.0' => array('value' => '1.9.0', 'name' => 'v1.9.0'),
'1.8.1' => array('value' => '1.8.1', 'name' => 'v1.8.1'),
),
// 用户注册类型列表
......
......@@ -32,221 +32,5 @@ return array (
'log_write' =>
array (
),
'plugins_css' =>
array (
0 => 'app\\plugins\\freightfee\\Hook',
1 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
2 => 'app\\plugins\\coupon\\Hook',
3 => 'app\\plugins\\distribution\\Hook',
4 => 'app\\plugins\\commononlineservice\\Hook',
5 => 'app\\plugins\\membershiplevelvip\\Hook',
6 => 'app\\plugins\\share\\Hook',
),
'plugins_service_buy_handle' =>
array (
0 => 'app\\plugins\\freightfee\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
2 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_goods_detail_title' =>
array (
0 => 'app\\plugins\\freightfee\\Hook',
1 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
),
'plugins_view_admin_order_top_operate' =>
array (
0 => 'app\\plugins\\orderexportprint\\Hook',
),
'plugins_view_admin_order_top_operation' =>
array (
0 => 'app\\plugins\\orderexportprint\\Hook',
),
'plugins_view_admin_order_list_operate' =>
array (
0 => 'app\\plugins\\orderexportprint\\Hook',
1 => 'app\\plugins\\orderpricerevision\\Hook',
),
'plugins_view_admin_order_list_operation' =>
array (
0 => 'app\\plugins\\orderexportprint\\Hook',
),
'plugins_view_user_login_info_top' =>
array (
0 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_view_user_reg_info' =>
array (
0 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_view_header_navigation_top_left' =>
array (
0 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_service_users_personal_show_field_list_handle' =>
array (
0 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_service_system_begin' =>
array (
0 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_service_users_center_left_menu_handle' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
2 => 'app\\plugins\\distribution\\Hook',
3 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_header_navigation_top_right_handle' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
2 => 'app\\plugins\\distribution\\Hook',
3 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_buy_order_insert_begin' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
),
'plugins_service_buy_order_insert_end' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_order_aftersale_audit_handle_end' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_order_status_change_history_success_handle' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
2 => 'app\\plugins\\distribution\\Hook',
),
'plugins_view_goods_detail_panel_bottom' =>
array (
0 => 'app\\plugins\\excellentbuyreturntocash\\Hook',
1 => 'app\\plugins\\coupon\\Hook',
),
'plugins_admin_css' =>
array (
0 => 'app\\plugins\\orderpricerevision\\Hook',
),
'plugins_admin_js' =>
array (
0 => 'app\\plugins\\orderpricerevision\\Hook',
1 => 'app\\plugins\\orderremind\\Hook',
),
'plugins_admin_view_common_bottom' =>
array (
0 => 'app\\plugins\\orderpricerevision\\Hook',
1 => 'app\\plugins\\orderremind\\Hook',
),
'plugins_js' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
1 => 'app\\plugins\\commononlineservice\\Hook',
2 => 'app\\plugins\\share\\Hook',
),
'plugins_service_navigation_header_handle' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook',
2 => 'app\\plugins\\speedplaceorder\\Hook',
3 => 'app\\plugins\\weixinliveplayer\\Hook',
),
'plugins_view_buy_goods_bottom' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_view_buy_form_inside' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_buy_order_insert_success' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_user_register_end' =>
array (
0 => 'app\\plugins\\coupon\\Hook',
),
'plugins_service_site_extraction_address_list' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_service_goods_spec_extends_handle' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_admin_user_save' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_user_save_handle' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
1 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_goods_detail_base_buy_nav_min_inside' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_view_goods_detail_photo_within' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_view_goods_detail_base_bottom' =>
array (
0 => 'app\\plugins\\distribution\\Hook',
),
'plugins_view_common_bottom' =>
array (
0 => 'app\\plugins\\commononlineservice\\Hook',
1 => 'app\\plugins\\share\\Hook',
),
'plugins_service_goods_handle_end' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_goods_spec_base' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_user_login_success_record' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_goods_save_handle' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_goods_detail_panel_price_top' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_home_goods_inside_bottom' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_search_goods_inside_bottom' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_service_goods_spec_type' =>
array (
0 => 'app\\plugins\\membershiplevelvip\\Hook',
),
'plugins_view_goods_detail_photo_bottom' =>
array (
0 => 'app\\plugins\\share\\Hook',
),
'plugins_common_header' =>
array (
0 => 'app\\plugins\\mourning\\Hook',
),
);
?>
\ No newline at end of file
+=========================================================+
ShopXO 1.8.1 Release 20200420 http://shopxo.net
+=========================================================+
全局
1. 优购返现
2. 微信小程序直播
3. 购物车商品删除造成数据尾款修复
4. 商品评论字符串截错误取修复
5. 更多细节优化以及BUG修复
6. 部分常用数据新增缓存、提升响应速度
web端
1. 后台数据列表布局优化、支持操作栏浮动
小程序端
1. 优购返现
2. 微信小程序直播
3. 分享组件增强
4. 部分细节优化以及BUG修复
插件
1. 优购返现
2. 极速下单
3. 微信小程序直播
4. 订单导出打印
5. 订单改价
+=========================================================+
ShopXO 1.8.0 Release 20200202 http://shopxo.net
+=========================================================+
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -13,7 +13,7 @@
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
// 系统版本
define('APPLICATION_VERSION', 'v1.9.0');
define('APPLICATION_VERSION', 'v1.8.1');
// 定义系统目录分隔符
define('DS', '/');
......
......@@ -67,7 +67,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
// request_url: 'http://shopxo.com/',
// request_url: 'http://dev.shopxo.net/',
// 基础信息
......
......@@ -40,7 +40,6 @@
"pages/plugins/membershiplevelvip/statistics/statistics",
"pages/plugins/membershiplevelvip/poster/poster",
"pages/plugins/membershiplevelvip/team/team",
"pages/plugins/distribution/user/user",
"pages/plugins/distribution/order/order",
"pages/plugins/distribution/order-detail/order-detail",
......@@ -62,10 +61,12 @@
"pages/plugins/wallet/user-recharge/user-recharge",
"pages/plugins/wallet/user-recharge-detail/user-recharge-detail",
"pages/plugins/wallet/user-cash/user-cash",
"pages/plugins/wallet/user-cash-detail/user-cash-detail"
"pages/plugins/wallet/user-cash-detail/user-cash-detail",
"pages/plugins/excellentbuyreturntocash/profit/profit",
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
],
"window": {
"defaultTitle": "shopxo",
"defaultTitle": "{{application_title}}",
"titleBarColor": "#d2364c",
"backgroundColor": "#f5f5f5"
},
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.0</view>
<view class="text">Powered by ShopXO v1.8.1</view>
</view>
</template>
\ No newline at end of file
.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;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
<view a:if="{{detail != null}}">
<view a:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view a:for="{{detail_list}}" class="item br-b oh">
<view class="title fl cr-888">{{item.name}}</view>
<view class="content cr-666 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view a:if="{{detail == null}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: [],
},
onLoad(params) {
//params['id'] = 1;
this.setData({ params: params });
this.init();
},
onShow() {},
init() {
var self = this;
my.showLoading({ content: "加载中..." });
this.setData({
data_list_loding_status: 1
});
my.request({
url: app.get_request_url("detail", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
my.hideLoading();
my.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [
{ name: "订单号", value: data.data.order_no },
{ name: "订单金额", value: data.data.total_price + '' || '' },
{ name: "退款金额", value: data.data.refund_price + '' || '' },
{ name: "有效金额", value: data.data.valid_price + '' || '' },
{ name: "返现金额", value: data.data.profit_price + '' || '' },
{ name: "结算状态", value: data.data.status_name || '' },
{ name: "订单状态", value: data.data.order_status_name || '' },
{ name: "订单支付状态", value: data.data.order_pay_status_name || '' },
{ name: "来源终端", value: data.data.order_client_type_name || '' },
{ name: "结算时间", value: (data.data.status == 2 && (data.data.success_estimate_icon || null) != null ? '(' + data.data.success_estimate_icon + ') ' : '') +data.data.success_time || '' },
{ name: "添加时间", value: data.data.add_time || '' },
{ name: "更新时间", value: data.data.upd_time || '' },
],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: '',
});
} else {
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: res.data.msg,
});
if (app.is_login_check(res.data, self, 'init')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
my.hideLoading();
my.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错',
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
},
});
\ No newline at end of file
{
"pullRefresh": true,
"defaultTitle": "返现详情"
}
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 16.66%;
}
.nav .active {
color: #d2364c;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .settlement-submit {
border: 1px solid #d2364c;
color: #d2364c !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block a:for="{{nav_status_list}}">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<block a:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" a:for="{{data_list}}">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button a:if="{{item.status == 2}}" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</view>
</block>
<view a:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.axml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [
{ name: "全部", value: "-1" },
{ name: "待生效", value: "0" },
{ name: "生效中", value: "1" },
{ name: "待结算", value: "2" },
{ name: "已结算", value: "3" },
{ name: "已失效", value: "4" },
],
nav_status_index: 0,
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index,
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
my.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false,
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
}
// 加载loding
my.showLoading({ content: "加载中..." });
this.setData({
data_list_loding_status: 1
});
// 参数
var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据
my.request({
url: app.get_request_url("index", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
page: this.data.data_page,
status: status,
is_more: 1,
},
dataType: "json",
success: res => {
my.hideLoading();
my.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1,
});
// 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({ data_bottom_line_status: true });
} else {
this.setData({ data_bottom_line_status: false });
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false,
});
}
} else {
this.setData({
data_list_loding_status: 0,
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
my.hideLoading();
my.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
});
app.showToast("服务器请求出错");
}
});
},
// 订单详情
list_submit_order_event(e) {
var oid = e.currentTarget.dataset.oid || null;
if (oid != null)
{
my.navigateTo({
url: "/pages/user-order-detail/user-order-detail?id="+oid
});
} else {
app.showToast('订单id有误');
}
},
// 立即结算事件
list_submit_settlement_event(e) {
var index = e.currentTarget.dataset.index || 0;
var self = this;
// 提交数据
my.showLoading({ content: "处理中..." });
my.request({
url: app.get_request_url("auto", "profit", "excellentbuyreturntocash"),
method: "POST",
data: { id: self.data.data_list[index]['id']},
dataType: "json",
success: res => {
my.hideLoading();
if (res.data.code == 0) {
var temp_data_list = this.data.data_list;
temp_data_list[index]['status'] = 3;
temp_data_list[index]['status_name'] = '已结算';
self.setData({
data_list: temp_data_list,
});
app.showToast(res.data.msg, "success");
} else {
app.alert({ msg: res.data.msg, is_show_cancel: 0});
}
},
fail: () => {
my.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1,
});
this.get_data_list(1);
},
});
\ No newline at end of file
{
"pullRefresh": true,
"defaultTitle": "返现明细"
}
\ No newline at end of file
......@@ -67,7 +67,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
// request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
// 基础信息
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.0</view>
<view class="text">Powered by ShopXO v1.8.1</view>
</view>
</template>
\ No newline at end of file
.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;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: []
},
onLoad(params) {
//params['id'] = 1;
this.setData({ params: params });
this.init();
},
onShow() {},
init() {
var self = this;
swan.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
swan.request({
url: app.get_request_url("detail", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
swan.hideLoading();
swan.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [
{ name: "订单号", value: data.data.order_no },
{ name: "订单金额", value: data.data.total_price + '' || '' },
{ name: "退款金额", value: data.data.refund_price + '' || '' },
{ name: "有效金额", value: data.data.valid_price + '' || '' },
{ name: "返现金额", value: data.data.profit_price + '' || '' },
{ name: "结算状态", value: data.data.status_name || '' },
{ name: "订单状态", value: data.data.order_status_name || '' },
{ name: "订单支付状态", value: data.data.order_pay_status_name || '' },
{ name: "来源终端", value: data.data.order_client_type_name || '' },
{ name: "结算时间", value: (data.data.status == 2 && (data.data.success_estimate_icon || null) != null ? '(' + data.data.success_estimate_icon + ') ' : '') +data.data.success_time || '' },
{ name: "添加时间", value: data.data.add_time || '' },
{ name: "更新时间", value: data.data.upd_time || '' },
],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: ''
});
} else {
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: res.data.msg
});
if (app.is_login_check(res.data, self, 'init')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
swan.hideLoading();
swan.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错'
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现详情"
}
\ No newline at end of file
<view wx:if="{{detail != null}}">
<view wx:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view wx:for="{{detail_list}}" wx:key="item" class="item br-b oh">
<view class="title fl cr-888">{{item.name}}</view>
<view class="content cr-666 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view wx:if="{{detail == null}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 16.66%;
}
.nav .active {
color: #d2364c;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .settlement-submit {
border: 1px solid #d2364c;
color: #d2364c !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [
{ name: "全部", value: "-1" },
{ name: "待生效", value: "0" },
{ name: "生效中", value: "1" },
{ name: "待结算", value: "2" },
{ name: "已结算", value: "3" },
{ name: "已失效", value: "4" },
],
nav_status_index: 0
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
swan.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
}
// 加载loding
swan.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
// 参数
var status = (this.data.nav_status_list[this.data.nav_status_index] || null) == null ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据
swan.request({
url: app.get_request_url("index", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
page: this.data.data_page,
status: status,
is_more: 1
},
dataType: "json",
success: res => {
swan.hideLoading();
swan.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1
});
// 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({ data_bottom_line_status: true });
} else {
this.setData({ data_bottom_line_status: false });
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false
});
}
} else {
this.setData({
data_list_loding_status: 0
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
swan.hideLoading();
swan.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2
});
app.showToast("服务器请求出错");
}
});
},
// 订单详情
list_submit_order_event(e) {
var oid = e.currentTarget.dataset.oid || null;
if (oid != null) {
swan.navigateTo({
url: "/pages/user-order-detail/user-order-detail?id=" + oid
});
} else {
app.showToast('订单id有误');
}
},
// 立即结算事件
list_submit_settlement_event(e) {
var index = e.currentTarget.dataset.index || 0;
var self = this;
// 提交数据
swan.showLoading({ title: "处理中..." });
swan.request({
url: app.get_request_url("auto", "profit", "excellentbuyreturntocash"),
method: "POST",
data: { id: self.data.data_list[index]['id'] },
dataType: "json",
success: res => {
swan.hideLoading();
if (res.data.code == 0) {
var temp_data_list = this.data.data_list;
temp_data_list[index]['status'] = 3;
temp_data_list[index]['status_name'] = '已结算';
self.setData({
data_list: temp_data_list
});
app.showToast(res.data.msg, "success");
} else {
app.alert({ msg: res.data.msg, is_show_cancel: 0 });
}
},
fail: () => {
swan.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1
});
this.get_data_list(1);
}
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现明细"
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block s-for="item, index in nav_status_list" s-key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<block s-if="data_list.length > 0">
<view class="item bg-white spacing-mb"s-for="item, index in data_list" s-key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button s-if="item.status == 2" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</view>
</block>
<view s-if="data_list.length == 0">
<import src="/pages/common/nodata.swan" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.swan" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
......@@ -38,7 +38,9 @@
"pages/plugins/wallet/user-recharge/user-recharge",
"pages/plugins/wallet/user-recharge-detail/user-recharge-detail",
"pages/plugins/wallet/user-cash/user-cash",
"pages/plugins/wallet/user-cash-detail/user-cash-detail"
"pages/plugins/wallet/user-cash-detail/user-cash-detail",
"pages/plugins/excellentbuyreturntocash/profit/profit",
"pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.0</view>
<view class="text">Powered by ShopXO v1.8.1</view>
</view>
</template>
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: [],
},
onLoad(params) {
//params['id'] = 1;
this.setData({ params: params });
this.init();
},
onShow() {},
init() {
var self = this;
qq.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
qq.request({
url: app.get_request_url("detail", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
qq.hideLoading();
qq.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [
{ name: "订单号", value: data.data.order_no },
{ name: "订单金额", value: data.data.total_price + '' || '' },
{ name: "退款金额", value: data.data.refund_price + '' || '' },
{ name: "有效金额", value: data.data.valid_price + '' || '' },
{ name: "返现金额", value: data.data.profit_price + '' || '' },
{ name: "结算状态", value: data.data.status_name || '' },
{ name: "订单状态", value: data.data.order_status_name || '' },
{ name: "订单支付状态", value: data.data.order_pay_status_name || '' },
{ name: "来源终端", value: data.data.order_client_type_name || '' },
{ name: "结算时间", value: (data.data.status == 2 && (data.data.success_estimate_icon || null) != null ? '(' + data.data.success_estimate_icon + ') ' : '') +data.data.success_time || '' },
{ name: "添加时间", value: data.data.add_time || '' },
{ name: "更新时间", value: data.data.upd_time || '' },
],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: '',
});
} else {
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: res.data.msg,
});
if (app.is_login_check(res.data, self, 'init')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
qq.hideLoading();
qq.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错',
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
},
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现详情"
}
\ No newline at end of file
<view qq:if="{{detail != null}}">
<view qq:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view qq:for="{{detail_list}}" qq:key="item" class="item br-b oh">
<view class="title fl cr-888">{{item.name}}</view>
<view class="content cr-666 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.qml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view qq:if="{{detail == null}}">
<import src="/pages/common/nodata.qml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
.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;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [
{ name: "全部", value: "-1" },
{ name: "待生效", value: "0" },
{ name: "生效中", value: "1" },
{ name: "待结算", value: "2" },
{ name: "已结算", value: "3" },
{ name: "已失效", value: "4" },
],
nav_status_index: 0,
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index,
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
qq.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false,
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
}
// 加载loding
qq.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
// 参数
var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据
qq.request({
url: app.get_request_url("index", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
page: this.data.data_page,
status: status,
is_more: 1,
},
dataType: "json",
success: res => {
qq.hideLoading();
qq.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1,
});
// 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({ data_bottom_line_status: true });
} else {
this.setData({ data_bottom_line_status: false });
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false,
});
}
} else {
this.setData({
data_list_loding_status: 0,
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
qq.hideLoading();
qq.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
});
app.showToast("服务器请求出错");
}
});
},
// 订单详情
list_submit_order_event(e) {
var oid = e.currentTarget.dataset.oid || null;
if (oid != null)
{
qq.navigateTo({
url: "/pages/user-order-detail/user-order-detail?id="+oid
});
} else {
app.showToast('订单id有误');
}
},
// 立即结算事件
list_submit_settlement_event(e) {
var index = e.currentTarget.dataset.index || 0;
var self = this;
// 提交数据
qq.showLoading({ title: "处理中..." });
qq.request({
url: app.get_request_url("auto", "profit", "excellentbuyreturntocash"),
method: "POST",
data: { id: self.data.data_list[index]['id']},
dataType: "json",
success: res => {
qq.hideLoading();
if (res.data.code == 0) {
var temp_data_list = this.data.data_list;
temp_data_list[index]['status'] = 3;
temp_data_list[index]['status_name'] = '已结算';
self.setData({
data_list: temp_data_list,
});
app.showToast(res.data.msg, "success");
} else {
app.alert({ msg: res.data.msg, is_show_cancel: 0});
}
},
fail: () => {
qq.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1,
});
this.get_data_list(1);
},
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现明细"
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block qq:for="{{nav_status_list}}" qq:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" qq:if="{{data_list.length > 0}}" qq:for="{{data_list}}" qq:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888"></text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888"></text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888"></text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888"></text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button qq:if="{{item.status == 2}}" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</view>
<view qq:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.qml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
</view>
<import src="/pages/common/bottom_line.qml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
</scroll-view>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 16.66%;
}
.nav .active {
color: #d2364c;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .settlement-submit {
border: 1px solid #d2364c;
color: #d2364c !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
\ No newline at end of file
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.0</view>
<view class="text">Powered by ShopXO v1.8.1</view>
</view>
</template>
\ No newline at end of file
const app = getApp();
Page({
data: {
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
detail: null,
detail_list: [],
},
onLoad(params) {
//params['id'] = 1;
this.setData({ params: params });
this.init();
},
onShow() {},
init() {
var self = this;
tt.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
tt.request({
url: app.get_request_url("detail", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
id: this.data.params.id
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
detail: data.data,
detail_list: [
{ name: "订单号", value: data.data.order_no },
{ name: "订单金额", value: data.data.total_price + '' || '' },
{ name: "退款金额", value: data.data.refund_price + '' || '' },
{ name: "有效金额", value: data.data.valid_price + '' || '' },
{ name: "返现金额", value: data.data.profit_price + '' || '' },
{ name: "结算状态", value: data.data.status_name || '' },
{ name: "订单状态", value: data.data.order_status_name || '' },
{ name: "订单支付状态", value: data.data.order_pay_status_name || '' },
{ name: "来源终端", value: data.data.order_client_type_name || '' },
{ name: "结算时间", value: (data.data.status == 2 && (data.data.success_estimate_icon || null) != null ? '(' + data.data.success_estimate_icon + ') ' : '') +data.data.success_time || '' },
{ name: "添加时间", value: data.data.add_time || '' },
{ name: "更新时间", value: data.data.upd_time || '' },
],
data_list_loding_status: 3,
data_bottom_line_status: true,
data_list_loding_msg: '',
});
} else {
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: res.data.msg,
});
if (app.is_login_check(res.data, self, 'init')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
self.setData({
data_list_loding_status: 2,
data_bottom_line_status: false,
data_list_loding_msg: '服务器请求出错',
});
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.init();
},
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现详情"
}
\ No newline at end of file
<view tt:if="{{detail != null}}">
<view tt:if="{{detail_list.length > 0}}" class="panel-item">
<view class="panel-content bg-white">
<view tt:for="{{detail_list}}" tt:key="item" class="item br-b oh">
<view class="title fl cr-888">{{item.name}}</view>
<view class="content cr-666 fl br-l">{{item.value}}</view>
</view>
</view>
</view>
<import src="/pages/common/bottom_line.wxml" />
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
</view>
<view tt:if="{{detail == null}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
<view class="nav-back tc wh-auto">
<navigator open-type="navigateBack" hover-class="none">
<button type="default" size="mini" class="cr-888 br" hover-class="none">返回</button>
</navigator>
</view>
</view>
\ No newline at end of file
.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;
}
.panel-item .panel-content .item:last-child {
border: 0;
}
.panel-item .panel-content .item .title {
width: 25%;
padding-left: 20rpx;
}
.panel-item .panel-content .item .content {
width: calc(75% - 50rpx);
padding-left: 20rpx;
min-height: 46rpx;
word-wrap: break-word;
word-break: normal;
}
.panel-item .panel-content .item view {
line-height: 46rpx;
}
\ No newline at end of file
const app = getApp();
Page({
data: {
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
params: null,
nav_status_list: [
{ name: "全部", value: "-1" },
{ name: "待生效", value: "0" },
{ name: "生效中", value: "1" },
{ name: "待结算", value: "2" },
{ name: "已结算", value: "3" },
{ name: "已失效", value: "4" },
],
nav_status_index: 0,
},
onLoad(params) {
// 是否指定状态
var nav_status_index = 0;
if ((params.status || null) != null) {
for (var i in this.data.nav_status_list) {
if (this.data.nav_status_list[i]['value'] == params.status) {
nav_status_index = i;
break;
}
}
}
this.setData({
params: params,
nav_status_index: nav_status_index,
});
this.init();
},
onShow() {},
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
tt.redirectTo({
url: "/pages/login/login?event_callback=init"
});
return false;
} else {
// 获取数据
this.get_data_list();
}
} else {
this.setData({
data_list_loding_status: 0,
data_bottom_line_status: false,
});
}
},
// 获取数据
get_data_list(is_mandatory) {
// 分页是否还有数据
if ((is_mandatory || 0) == 0) {
if (this.data.data_bottom_line_status == true) {
return false;
}
}
// 加载loding
tt.showLoading({ title: "加载中..." });
this.setData({
data_list_loding_status: 1
});
// 参数
var status = ((this.data.nav_status_list[this.data.nav_status_index] || null) == null) ? -1 : this.data.nav_status_list[this.data.nav_status_index]['value'];
// 获取数据
tt.request({
url: app.get_request_url("index", "profit", "excellentbuyreturntocash"),
method: "POST",
data: {
page: this.data.data_page,
status: status,
is_more: 1,
},
dataType: "json",
success: res => {
tt.hideLoading();
tt.stopPullDownRefresh();
if (res.data.code == 0) {
if (res.data.data.data.length > 0) {
if (this.data.data_page <= 1) {
var temp_data_list = res.data.data.data;
} else {
var temp_data_list = this.data.data_list;
var temp_data = res.data.data.data;
for (var i in temp_data) {
temp_data_list.push(temp_data[i]);
}
}
this.setData({
data_list: temp_data_list,
data_total: res.data.data.total,
data_page_total: res.data.data.page_total,
data_list_loding_status: 3,
data_page: this.data.data_page + 1,
});
// 是否还有数据
if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total) {
this.setData({ data_bottom_line_status: true });
} else {
this.setData({ data_bottom_line_status: false });
}
} else {
this.setData({
data_list_loding_status: 0,
data_list: [],
data_bottom_line_status: false,
});
}
} else {
this.setData({
data_list_loding_status: 0,
});
if (app.is_login_check(res.data, this, 'get_data_list')) {
app.showToast(res.data.msg);
}
}
},
fail: () => {
tt.hideLoading();
tt.stopPullDownRefresh();
this.setData({
data_list_loding_status: 2,
});
app.showToast("服务器请求出错");
}
});
},
// 订单详情
list_submit_order_event(e) {
var oid = e.currentTarget.dataset.oid || null;
if (oid != null)
{
tt.navigateTo({
url: "/pages/user-order-detail/user-order-detail?id="+oid
});
} else {
app.showToast('订单id有误');
}
},
// 立即结算事件
list_submit_settlement_event(e) {
var index = e.currentTarget.dataset.index || 0;
var self = this;
// 提交数据
tt.showLoading({ title: "处理中..." });
tt.request({
url: app.get_request_url("auto", "profit", "excellentbuyreturntocash"),
method: "POST",
data: { id: self.data.data_list[index]['id']},
dataType: "json",
success: res => {
tt.hideLoading();
if (res.data.code == 0) {
var temp_data_list = this.data.data_list;
temp_data_list[index]['status'] = 3;
temp_data_list[index]['status_name'] = '已结算';
self.setData({
data_list: temp_data_list,
});
app.showToast(res.data.msg, "success");
} else {
app.alert({ msg: res.data.msg, is_show_cancel: 0});
}
},
fail: () => {
tt.hideLoading();
app.showToast("服务器请求出错");
}
});
},
// 下拉刷新
onPullDownRefresh() {
this.setData({
data_page: 1
});
this.get_data_list(1);
},
// 滚动加载
scroll_lower(e) {
this.get_data_list();
},
// 导航事件
nav_event(e) {
this.setData({
nav_status_index: e.currentTarget.dataset.index || 0,
data_page: 1,
});
this.get_data_list(1);
},
});
\ No newline at end of file
{
"enablePullDownRefresh": true,
"navigationBarTitleText": "返现明细"
}
\ No newline at end of file
<!-- 导航 -->
<view class="nav">
<block tt:for="{{nav_status_list}}" tt:key="key">
<view class="item fl tc cr-888 {{nav_status_index == index ? 'active' : ''}}" data-index="{{index}}" bindtap="nav_event">{{item.name}}</view>
</block>
</view>
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<block tt:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" tt:for="{{data_list}}" tt:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button tt:if="{{item.status == 2}}" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</view>
</block>
<view tt: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>
</scroll-view>
\ No newline at end of file
/*
* 导航
*/
.nav {
background: #eee;
height: 80rpx;
line-height: 80rpx;
}
.nav .item {
width: 16.66%;
}
.nav .active {
color: #d2364c;
}
/*
* 列表
*/
.scroll-box {
height: calc(100vh - 80rpx);
}
.data-list .item .base,
.data-list .item .content {
padding: 20rpx 10rpx;
}
.data-list .item .content .multi-text {
line-height: 50rpx;
}
.data-list .item .content .multi-text .title {
margin-right: 30rpx;
}
.data-list .item .content .multi-text .value {
font-weight: 500;
}
.data-list .item .content .multi-text .unit {
margin-left: 10rpx;
}
.data-list .item .operation {
padding: 20rpx 10rpx;
}
.data-list .item .settlement-submit {
border: 1px solid #d2364c;
color: #d2364c !important;
}
.data-list .item .operation button:not(:first-child) {
margin-left: 30rpx;
}
\ No newline at end of file
......@@ -67,8 +67,8 @@ App({
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
request_url: 'https://dev.shopxo.net/',
// request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
......
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.9.0</view>
<view class="text">Powered by ShopXO v1.8.1</view>
</view>
</template>
\ No newline at end of file
......@@ -8,40 +8,42 @@
<!-- 列表 -->
<scroll-view scroll-y="{{true}}" class="scroll-box" bindscrolltolower="scroll_lower" lower-threshold="30">
<view class="data-list">
<view class="item bg-white spacing-mb" wx:if="{{data_list.length > 0}}" wx:for="{{data_list}}" wx:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
<block wx:if="{{data_list.length > 0}}">
<view class="item bg-white spacing-mb" wx:for="{{data_list}}" wx:key="key">
<view class="base oh br-b">
<text class="cr-666">{{item.add_time}}</text>
<text class="fr cr-main">{{item.status_name}}</text>
</view>
<navigator url="/pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail?id={{item.id}}" hover-class="none">
<view class="content">
<view class="multi-text">
<text class="title cr-666">订单金额</text>
<text class="value">{{item.total_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">退款金额</text>
<text class="value">{{item.refund_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">有效金额</text>
<text class="value">{{item.valid_price}}</text>
<text class="unit cr-888">元</text>
</view>
<view class="multi-text">
<text class="title cr-666">返现金额</text>
<text class="value">{{item.profit_price}}</text>
<text class="unit cr-888">元</text>
</view>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button wx:if="{{item.status == 2}}" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</navigator>
<view class="operation tr br-t-dashed">
<button class="br" type="default" size="mini" hover-class="none" data-oid="{{item.order_id}}" bindtap="list_submit_order_event">查看订单</button>
<button wx:if="{{item.status == 2}}" class="settlement-submit" type="default" size="mini" hover-class="none" data-index="{{index}}" bindtap="list_submit_settlement_event">立即结算</button>
</view>
</view>
</block>
<view wx:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册