Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
36e22ff6
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
36e22ff6
编写于
1月 06, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
接口统一返回处理
上级
e4032fc2
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
146 addition
and
101 deletion
+146
-101
application/api/controller/Answer.php
application/api/controller/Answer.php
+5
-4
application/api/controller/Banner.php
application/api/controller/Banner.php
+3
-4
application/api/controller/Base.php
application/api/controller/Base.php
+1
-1
application/api/controller/Buy.php
application/api/controller/Buy.php
+6
-5
application/api/controller/Cart.php
application/api/controller/Cart.php
+6
-5
application/api/controller/Goods.php
application/api/controller/Goods.php
+7
-7
application/api/controller/Index.php
application/api/controller/Index.php
+2
-1
application/api/controller/Message.php
application/api/controller/Message.php
+5
-4
application/api/controller/Navigation.php
application/api/controller/Navigation.php
+3
-4
application/api/controller/Order.php
application/api/controller/Order.php
+8
-7
application/api/controller/Orderaftersale.php
application/api/controller/Orderaftersale.php
+6
-5
application/api/controller/Region.php
application/api/controller/Region.php
+3
-2
application/api/controller/Search.php
application/api/controller/Search.php
+4
-7
application/api/controller/Toutiao.php
application/api/controller/Toutiao.php
+3
-1
application/api/controller/User.php
application/api/controller/User.php
+2
-1
application/api/controller/Useraddress.php
application/api/controller/Useraddress.php
+8
-3
application/api/controller/Usergoodsbrowse.php
application/api/controller/Usergoodsbrowse.php
+5
-4
application/api/controller/Usergoodsfavor.php
application/api/controller/Usergoodsfavor.php
+5
-4
application/api/controller/Userintegral.php
application/api/controller/Userintegral.php
+5
-4
application/service/BaseService.php
application/service/BaseService.php
+28
-2
sourcecode/alipay/default/pages/user-address/user-address.js
sourcecode/alipay/default/pages/user-address/user-address.js
+6
-5
sourcecode/baidu/default/pages/user-address/user-address.js
sourcecode/baidu/default/pages/user-address/user-address.js
+6
-5
sourcecode/qq/default/pages/user-address/user-address.js
sourcecode/qq/default/pages/user-address/user-address.js
+6
-5
sourcecode/toutiao/default/pages/user-address/user-address.js
...cecode/toutiao/default/pages/user-address/user-address.js
+6
-5
sourcecode/weixin/default/app.js
sourcecode/weixin/default/app.js
+1
-1
sourcecode/weixin/default/pages/user-address/user-address.js
sourcecode/weixin/default/pages/user-address/user-address.js
+6
-5
未找到文件。
application/api/controller/Answer.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\AnswerService
;
/**
...
...
@@ -72,11 +73,11 @@ class Answer extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Banner.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\BannerService
;
/**
...
...
@@ -44,10 +45,8 @@ class Banner extends Common
public
function
Index
()
{
// 获取轮播
$data
=
BannerService
::
Banner
();
// 返回数据
return
DataReturn
(
'success'
,
0
,
$data
);
$result
=
BannerService
::
Banner
();
return
BaseService
::
DataReturn
(
$result
);
}
}
?>
\ No newline at end of file
application/api/controller/Base.php
浏览文件 @
36e22ff6
...
...
@@ -35,7 +35,7 @@ class Base extends Common
// 参数
$params
=
$this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
return
DataReturn
(
'success'
,
0
,
BaseService
::
Common
(
$params
)
);
return
BaseService
::
Common
(
$params
);
}
}
?>
\ No newline at end of file
application/api/controller/Buy.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\GoodsService
;
use
app\service\UserService
;
use
app\service\PaymentService
;
...
...
@@ -67,10 +68,10 @@ class Buy extends Common
// 数据返回组装
$result
=
[
'goods_list'
=>
$buy_goods
,
'payment_list'
=>
$payment_list
,
'base'
=>
$buy_base
,
'common_site_type'
=>
(
int
)
$buy_base
[
'common_site_type'
],
'goods_list'
=>
$buy_goods
,
'payment_list'
=>
$payment_list
,
'base'
=>
$buy_base
,
'common_site_type'
=>
(
int
)
$buy_base
[
'common_site_type'
],
];
// 优惠劵
...
...
@@ -87,7 +88,7 @@ class Buy extends Common
$result
[
'plugins_points_data'
]
=
$ret
[
'data'
][
'data'
];
}
return
DataReturn
(
'操作成功'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
return
$buy_ret
;
}
...
...
application/api/controller/Cart.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\BuyService
;
/**
...
...
@@ -47,12 +48,12 @@ class Cart extends Common
public
function
Index
()
{
$ret
=
BuyService
::
CartList
([
'user'
=>
$this
->
user
]);
$re
t
[
'data'
]
=
[
'data'
=>
$ret
[
'data'
],
'common_cart_total'
=>
BuyService
::
UserCartTotal
([
'user'
=>
$this
->
user
]),
$re
sult
=
[
'data'
=>
$ret
[
'data'
],
'common_cart_total'
=>
BuyService
::
UserCartTotal
([
'user'
=>
$this
->
user
]),
];
return
$ret
;
return
BaseService
::
DataReturn
(
$result
)
;
}
/**
...
...
application/api/controller/Goods.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\GoodsService
;
use
app\service\BuyService
;
use
app\service\PluginsService
;
...
...
@@ -166,7 +167,7 @@ class Goods extends Common
$result
[
'plugins_coupon_data'
]
=
$ret
[
'data'
][
'data'
];
}
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
@@ -239,10 +240,9 @@ class Goods extends Common
public
function
Category
()
{
$result
=
[
'category'
=>
GoodsService
::
GoodsCategoryAll
(
$this
->
data_post
),
//'category_show_level' => MyC('common_show_goods_category_level', 3, true),
'category'
=>
GoodsService
::
GoodsCategoryAll
(
$this
->
data_post
),
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
@@ -299,16 +299,16 @@ class Goods extends Common
'where'
=>
$where
,
'is_public'
=>
1
,
);
$
data
=
GoodsCommentsService
::
GoodsCommentsList
(
$data_params
);
$
ret
=
GoodsCommentsService
::
GoodsCommentsList
(
$data_params
);
// 返回数据
$result
=
[
'number'
=>
$number
,
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$
data
[
'data'
],
'data'
=>
$
ret
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
}
?>
\ No newline at end of file
application/api/controller/Index.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\GoodsService
;
use
app\service\BannerService
;
use
app\service\AppHomeNavService
;
...
...
@@ -64,7 +65,7 @@ class Index extends Common
}
// 返回数据
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
}
?>
\ No newline at end of file
application/api/controller/Message.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\MessageService
;
/**
...
...
@@ -75,11 +76,11 @@ class Message extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
}
?>
\ No newline at end of file
application/api/controller/Navigation.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\AppHomeNavService
;
/**
...
...
@@ -44,10 +45,8 @@ class Navigation extends Common
public
function
Index
()
{
// 获取轮播
$data
=
AppHomeNavService
::
AppHomeNav
();
// 返回数据
return
DataReturn
(
'success'
,
0
,
$data
);
$result
=
AppHomeNavService
::
AppHomeNav
();
return
BaseService
::
DataReturn
(
$result
);
}
}
?>
\ No newline at end of file
application/api/controller/Order.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\PaymentService
;
use
app\service\OrderService
;
use
app\service\GoodsCommentsService
;
...
...
@@ -80,12 +81,12 @@ class Order extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'payment_list'
=>
$payment_list
,
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'payment_list'
=>
$payment_list
,
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
@@ -131,7 +132,7 @@ class Order extends Common
$site_fictitious
=
ConfigService
::
SiteFictitiousConfig
();
$result
[
'site_fictitious'
]
=
$site_fictitious
[
'data'
];
}
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
return
DataReturn
(
'数据不存在或已删除'
,
-
100
);
}
...
...
@@ -178,7 +179,7 @@ class Order extends Common
'data'
=>
$data
[
'data'
][
0
],
'editor_path_type'
=>
'order_comments-'
.
$this
->
user
[
'id'
]
.
'-'
.
$data
[
'data'
][
0
][
'id'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
return
DataReturn
(
'没有相关数据'
,
-
100
);
}
...
...
application/api/controller/Orderaftersale.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\OrderAftersaleService
;
/**
...
...
@@ -75,11 +76,11 @@ class Orderaftersale extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
@@ -139,7 +140,7 @@ class Orderaftersale extends Common
'return_goods_address'
=>
MyC
(
'home_order_aftersale_return_goods_address'
,
'管理员未填写'
,
true
),
'editor_path_type'
=>
OrderAftersaleService
::
EditorAttachmentPathType
(
$this
->
user
[
'id'
],
$order_id
,
$order_detail_id
),
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
return
DataReturn
(
$ret
[
'msg'
],
-
1
);
}
...
...
application/api/controller/Region.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\RegionService
;
/**
...
...
@@ -50,8 +51,8 @@ class Region extends Common
'pid'
=>
isset
(
$this
->
data_post
[
'pid'
])
?
intval
(
$this
->
data_post
[
'pid'
])
:
0
,
],
];
$
data
=
RegionService
::
RegionNode
(
$params
);
return
DataReturn
(
'success'
,
0
,
$data
);
$
result
=
RegionService
::
RegionNode
(
$params
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Search.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\SearchService
;
use
app\service\GoodsService
;
...
...
@@ -51,16 +52,12 @@ class Search extends Common
// 获取数据
$ret
=
SearchService
::
GoodsList
(
$this
->
data_post
);
$result
=
$ret
[
'data'
];
// 分类
if
(
!
empty
(
$this
->
data_post
[
'category_id'
]))
{
$ret
[
'data'
][
'category'
]
=
GoodsService
::
GoodsCategoryRow
([
'id'
=>
$this
->
data_post
[
'category_id'
]]);
}
else
{
$ret
[
'data'
][
'category'
]
=
[];
}
$result
[
'category'
]
=
empty
(
$this
->
data_post
[
'category_id'
])
?
[]
:
GoodsService
::
GoodsCategoryRow
([
'id'
=>
$this
->
data_post
[
'category_id'
]]);
return
$ret
;
return
BaseService
::
DataReturn
(
$result
)
;
}
}
?>
\ No newline at end of file
application/api/controller/Toutiao.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\ToutiaoService
;
/**
...
...
@@ -50,7 +51,8 @@ class Toutiao extends Common
// 获取支付信息
$params
=
$this
->
data_post
;
$params
[
'user'
]
=
$this
->
user
;
return
ToutiaoService
::
Pay
(
$params
);
$ret
=
ToutiaoService
::
Pay
(
$params
);
return
BaseService
::
DataReturn
(
$ret
[
'data'
]);
}
}
?>
\ No newline at end of file
application/api/controller/User.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\UserService
;
use
app\service\OrderService
;
use
app\service\GoodsService
;
...
...
@@ -548,7 +549,7 @@ class User extends Common
);
// 返回数据
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Useraddress.php
浏览文件 @
36e22ff6
...
...
@@ -10,8 +10,9 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\
UserAddress
Service
;
use
app\service\
Base
Service
;
use
app\service\ConfigService
;
use
app\service\UserAddressService
;
/**
* 用户地址
...
...
@@ -48,7 +49,11 @@ class UserAddress extends Common
*/
public
function
Index
()
{
return
UserAddressService
::
UserAddressList
([
'user'
=>
$this
->
user
]);
$ret
=
UserAddressService
::
UserAddressList
([
'user'
=>
$this
->
user
]);
$result
=
[
'data'
=>
$ret
[
'data'
],
];
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
@@ -70,7 +75,7 @@ class UserAddress extends Common
'data'
=>
empty
(
$data
[
'data'
])
?
null
:
$data
[
'data'
],
'editor_path_type'
=>
UserAddressService
::
EditorAttachmentPathType
(
$this
->
user
[
'id'
]),
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Usergoodsbrowse.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\GoodsBrowseService
;
/**
...
...
@@ -73,11 +74,11 @@ class UserGoodsBrowse extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Usergoodsfavor.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\GoodsFavorService
;
/**
...
...
@@ -72,11 +73,11 @@ class UserGoodsFavor extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
/**
...
...
application/api/controller/Userintegral.php
浏览文件 @
36e22ff6
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\api\controller
;
use
app\service\BaseService
;
use
app\service\IntegralService
;
/**
...
...
@@ -73,11 +74,11 @@ class UserIntegral extends Common
// 返回数据
$result
=
[
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
'total'
=>
$total
,
'page_total'
=>
$page_total
,
'data'
=>
$data
[
'data'
],
];
return
DataReturn
(
'success'
,
0
,
$result
);
return
BaseService
::
DataReturn
(
$result
);
}
}
...
...
application/service/BaseService.php
浏览文件 @
36e22ff6
...
...
@@ -10,7 +10,6 @@
// +----------------------------------------------------------------------
namespace
app\service
;
use
think\Db
;
use
think\facade\Hook
;
use
app\service\ResourcesService
;
use
app\service\QuickNavService
;
...
...
@@ -108,7 +107,34 @@ class BaseService
'params'
=>
$params
,
]);
return
$data
;
return
DataReturn
(
'success'
,
0
,
$data
);
}
/**
* 数据返回处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-01-06
* @desc description
* @param [array] $data [返回数据]
*/
public
static
function
DataReturn
(
$data
=
[])
{
// 当前操作名称, 兼容插件模块名称
$module_name
=
strtolower
(
request
()
->
module
());
$controller_name
=
strtolower
(
request
()
->
controller
());
$action_name
=
strtolower
(
request
()
->
action
());
// 接口返回信息钩子
$hook_name
=
'plugins_service_base_return_data_'
.
$module_name
.
'_'
.
$controller_name
.
'_'
.
$action_name
;
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'data'
=>
&
$data
,
]);
return
DataReturn
(
'success'
,
0
,
$data
);
}
}
?>
\ No newline at end of file
sourcecode/alipay/default/pages/user-address/user-address.js
浏览文件 @
36e22ff6
...
...
@@ -58,20 +58,21 @@ Page({
my
.
hideLoading
();
my
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
var
data
=
res
.
data
.
data
;
if
(
data
.
data
.
length
>
0
)
{
// 获取当前默认地址
var
is_default
=
0
;
for
(
var
i
in
res
.
data
.
data
)
for
(
var
i
in
data
.
data
)
{
if
(
res
.
data
.
data
[
i
][
'
is_default
'
]
==
1
)
if
(
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
res
.
data
.
data
[
i
][
'
id
'
];
is_default
=
data
.
data
[
i
][
'
id
'
];
}
}
// 设置数据
this
.
setData
({
data_list
:
res
.
data
.
data
,
data_list
:
data
.
data
,
is_default
:
is_default
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
...
...
sourcecode/baidu/default/pages/user-address/user-address.js
浏览文件 @
36e22ff6
...
...
@@ -57,18 +57,19 @@ Page({
swan
.
hideLoading
();
swan
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
var
data
=
res
.
data
.
data
;
if
(
data
.
data
.
length
>
0
)
{
// 获取当前默认地址
var
is_default
=
0
;
for
(
var
i
in
res
.
data
.
data
)
{
if
(
res
.
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
res
.
data
.
data
[
i
][
'
id
'
];
for
(
var
i
in
data
.
data
)
{
if
(
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
data
.
data
[
i
][
'
id
'
];
}
}
// 设置数据
this
.
setData
({
data_list
:
res
.
data
.
data
,
data_list
:
data
.
data
,
is_default
:
is_default
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
...
...
sourcecode/qq/default/pages/user-address/user-address.js
浏览文件 @
36e22ff6
...
...
@@ -57,20 +57,21 @@ Page({
qq
.
hideLoading
();
qq
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
var
data
=
res
.
data
.
data
;
if
(
data
.
data
.
length
>
0
)
{
// 获取当前默认地址
var
is_default
=
0
;
for
(
var
i
in
res
.
data
.
data
)
for
(
var
i
in
data
.
data
)
{
if
(
res
.
data
.
data
[
i
][
'
is_default
'
]
==
1
)
if
(
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
res
.
data
.
data
[
i
][
'
id
'
];
is_default
=
data
.
data
[
i
][
'
id
'
];
}
}
// 设置数据
this
.
setData
({
data_list
:
res
.
data
.
data
,
data_list
:
data
.
data
,
is_default
:
is_default
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
...
...
sourcecode/toutiao/default/pages/user-address/user-address.js
浏览文件 @
36e22ff6
...
...
@@ -57,20 +57,21 @@ Page({
tt
.
hideLoading
();
tt
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
var
data
=
res
.
data
.
data
;
if
(
data
.
data
.
length
>
0
)
{
// 获取当前默认地址
var
is_default
=
0
;
for
(
var
i
in
res
.
data
.
data
)
for
(
var
i
in
data
.
data
)
{
if
(
res
.
data
.
data
[
i
][
'
is_default
'
]
==
1
)
if
(
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
res
.
data
.
data
[
i
][
'
id
'
];
is_default
=
data
.
data
[
i
][
'
id
'
];
}
}
// 设置数据
this
.
setData
({
data_list
:
res
.
data
.
data
,
data_list
:
data
.
data
,
is_default
:
is_default
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
...
...
sourcecode/weixin/default/app.js
浏览文件 @
36e22ff6
...
...
@@ -74,7 +74,7 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
request_url
:
'
http://shopxo.com/
'
,
request_url
:
'
https://dev.shopxo.net/
'
,
//
request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
sourcecode/weixin/default/pages/user-address/user-address.js
浏览文件 @
36e22ff6
...
...
@@ -57,20 +57,21 @@ Page({
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
var
data
=
res
.
data
.
data
;
if
(
data
.
data
.
length
>
0
)
{
// 获取当前默认地址
var
is_default
=
0
;
for
(
var
i
in
res
.
data
.
data
)
for
(
var
i
in
data
.
data
)
{
if
(
res
.
data
.
data
[
i
][
'
is_default
'
]
==
1
)
if
(
data
.
data
[
i
][
'
is_default
'
]
==
1
)
{
is_default
=
res
.
data
.
data
[
i
][
'
id
'
];
is_default
=
data
.
data
[
i
][
'
id
'
];
}
}
// 设置数据
this
.
setData
({
data_list
:
res
.
data
.
data
,
data_list
:
data
.
data
,
is_default
:
is_default
,
data_list_loding_status
:
3
,
data_bottom_line_status
:
true
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录