Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
574341ff
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,体验更适合开发者的 AI 搜索 >>
提交
574341ff
编写于
1月 07, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
985ec8f9
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
116 addition
and
21 deletion
+116
-21
application/api/controller/User.php
application/api/controller/User.php
+2
-0
application/service/BuyService.php
application/service/BuyService.php
+16
-3
application/service/OrderService.php
application/service/OrderService.php
+4
-4
extend/base/BaiduAuth.php
extend/base/BaiduAuth.php
+4
-0
public/appmini/old/alipay/app.js
public/appmini/old/alipay/app.js
+1
-1
public/appmini/old/alipay/app.json
public/appmini/old/alipay/app.json
+2
-1
public/appmini/old/baidu/app.js
public/appmini/old/baidu/app.js
+36
-2
public/appmini/old/baidu/app.json
public/appmini/old/baidu/app.json
+3
-1
public/appmini/old/baidu/pages/cart/cart.js
public/appmini/old/baidu/pages/cart/cart.js
+16
-0
public/appmini/old/baidu/pages/index/index.js
public/appmini/old/baidu/pages/index/index.js
+9
-0
public/appmini/old/baidu/pages/index/index.json
public/appmini/old/baidu/pages/index/index.json
+2
-0
public/appmini/old/baidu/pages/user/user.js
public/appmini/old/baidu/pages/user/user.js
+8
-0
public/appmini/old/baidu/pages/user/user.json
public/appmini/old/baidu/pages/user/user.json
+6
-4
public/appmini/old/weixin/app.js
public/appmini/old/weixin/app.js
+1
-1
public/appmini/old/weixin/app.json
public/appmini/old/weixin/app.json
+4
-2
public/appmini/old/weixin/pages/index/index.json
public/appmini/old/weixin/pages/index/index.json
+1
-1
public/appmini/old/weixin/pages/plugins/membershiplevelvip/user/user.json
...ld/weixin/pages/plugins/membershiplevelvip/user/user.json
+1
-1
未找到文件。
application/api/controller/User.php
浏览文件 @
574341ff
...
...
@@ -306,6 +306,8 @@ class User extends Common
$result
[
'openid'
]
=
$result
[
'data'
][
'openid'
];
$result
[
'referrer'
]
=
isset
(
$this
->
data_post
[
'referrer'
])
?
$this
->
data_post
[
'referrer'
]
:
0
;
return
UserService
::
AuthUserProgram
(
$result
,
'baidu_openid'
);
}
else
{
return
DataReturn
(
$result
[
'msg'
],
-
1
);
}
}
else
{
return
DataReturn
(
'授权成功'
,
0
,
$user
);
...
...
application/service/BuyService.php
浏览文件 @
574341ff
...
...
@@ -1305,7 +1305,7 @@ class BuyService
}
/**
*
库存
校验
*
订单支付前
校验
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -1313,7 +1313,7 @@ class BuyService
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
Order
Inventory
Check
(
$params
=
[])
public
static
function
Order
PayBegin
Check
(
$params
=
[])
{
// 请求参数
$p
=
[
...
...
@@ -1352,7 +1352,20 @@ class BuyService
{
foreach
(
$order_detail
as
$v
)
{
$goods
=
Db
::
name
(
'Goods'
)
->
field
(
'is_deduction_inventory,inventory,title'
)
->
find
(
$v
[
'goods_id'
]);
// 获取商品
$goods
=
Db
::
name
(
'Goods'
)
->
field
(
'is_shelves,is_deduction_inventory,inventory,title'
)
->
find
(
$v
[
'goods_id'
]);
if
(
empty
(
$goods
))
{
return
DataReturn
(
'商品不存在'
,
-
10
);
}
// 商品状态
if
(
$goods
[
'is_shelves'
]
!=
1
)
{
return
DataReturn
(
'商品已下架['
.
$goods
[
'title'
]
.
']'
,
-
10
);
}
// 库存
if
(
isset
(
$goods
[
'is_deduction_inventory'
])
&&
$goods
[
'is_deduction_inventory'
]
==
1
)
{
// 先判断商品库存是否不足
...
...
application/service/OrderService.php
浏览文件 @
574341ff
...
...
@@ -72,8 +72,8 @@ class OrderService
return
DataReturn
(
'状态不可操作['
.
$status_text
.
']'
,
-
1
);
}
//
库存
校验
$ret
=
BuyService
::
Order
Inventory
Check
([
'order_id'
=>
$order
[
'id'
],
'order_data'
=>
$order
]);
//
订单支付前
校验
$ret
=
BuyService
::
Order
PayBegin
Check
([
'order_id'
=>
$order
[
'id'
],
'order_data'
=>
$order
]);
if
(
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
...
...
@@ -263,8 +263,8 @@ class OrderService
return
DataReturn
(
'状态不可操作['
.
$status_text
.
']'
,
-
1
);
}
//
库存
校验
$ret
=
BuyService
::
Order
Inventory
Check
([
'order_id'
=>
$order
[
'id'
],
'order_data'
=>
$order
]);
//
订单支付前
校验
$ret
=
BuyService
::
Order
PayBegin
Check
([
'order_id'
=>
$order
[
'id'
],
'order_data'
=>
$order
]);
if
(
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
...
...
extend/base/BaiduAuth.php
浏览文件 @
574341ff
...
...
@@ -79,6 +79,10 @@ class BaiduAuth
if
(
function_exists
(
"openssl_decrypt"
))
{
$plaintext
=
openssl_decrypt
(
$encrypted_data
,
"AES-192-CBC"
,
$session_key
,
OPENSSL_RAW_DATA
|
OPENSSL_ZERO_PADDING
,
$iv
);
}
else
{
if
(
!
function_exists
(
'mcrypt_module_open'
))
{
return
[
'status'
=>-
1
,
'msg'
=>
'mcrypt_module_open方法不支持'
];
}
$td
=
mcrypt_module_open
(
MCRYPT_RIJNDAEL_128
,
null
,
MCRYPT_MODE_CBC
,
null
);
mcrypt_generic_init
(
$td
,
$session_key
,
$iv
);
$plaintext
=
mdecrypt_generic
(
$td
,
$encrypted_data
);
...
...
public/appmini/old/alipay/app.js
浏览文件 @
574341ff
...
...
@@ -721,8 +721,8 @@ App({
set_nav_bg_color_main
()
{
// 窗口和下拉顶部背景色
my
.
setBackgroundColor
({
backgroundColor
:
'
#d2364c
'
,
backgroundColorTop
:
'
#d2364c
'
,
backgroundColorBottom
:
'
#f5f5f5
'
,
});
// 下拉文字颜色
...
...
public/appmini/old/alipay/app.json
浏览文件 @
574341ff
...
...
@@ -32,7 +32,8 @@
],
"window"
:
{
"defaultTitle"
:
"shopxo"
,
"titleBarColor"
:
"#d2364c"
"titleBarColor"
:
"#d2364c"
,
"backgroundColor"
:
"#f5f5f5"
},
"tabBar"
:
{
"textColor"
:
"#8a8a8a"
,
...
...
public/appmini/old/baidu/app.js
浏览文件 @
574341ff
...
...
@@ -62,8 +62,8 @@ App({
// 请求地址
request_url
:
"
{{request_url}}
"
,
// request_url: 'http://tp5-dev
.com/',
//
request_url: 'https://dev.shopxo.net/',
request_url
:
'
http://shopxo
.com/
'
,
request_url
:
'
https://dev.shopxo.net/
'
,
// 基础信息
application_title
:
"
{{application_title}}
"
,
...
...
@@ -623,4 +623,38 @@ App({
return
true
;
},
/**
* 设置导航reddot
* index tabBar 的哪一项,从左边算起(0开始)
* type 0 移出, 1 添加 (默认 0 移出)
*/
set_tab_bar_reddot
(
index
,
type
)
{
if
(
index
!==
undefined
&&
index
!==
null
)
{
if
((
type
||
0
)
==
0
)
{
swan
.
hideTabBarRedDot
({
index
:
Number
(
index
)
});
}
else
{
swan
.
showTabBarRedDot
({
index
:
Number
(
index
)
});
}
}
},
/**
* 设置导航车badge
* index tabBar 的哪一项,从左边算起(0开始)
* type 0 移出, 1 添加 (默认 0 移出)
* value 显示的文本,超过 4 个字符则显示成 ...(type参数为1的情况下有效)
*/
set_tab_bar_badge
(
index
,
type
,
value
)
{
if
(
index
!==
undefined
&&
index
!==
null
)
{
if
((
type
||
0
)
==
0
)
{
swan
.
removeTabBarBadge
({
index
:
Number
(
index
)
});
}
else
{
swan
.
setTabBarBadge
({
index
:
Number
(
index
),
"
text
"
:
value
.
toString
()
});
}
}
},
});
\ No newline at end of file
public/appmini/old/baidu/app.json
浏览文件 @
574341ff
...
...
@@ -32,7 +32,9 @@
],
"window"
:
{
"navigationBarTitleText"
:
"{{application_title}}"
,
"navigationBarBackgroundColor"
:
"#d2364c"
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColor"
:
"#f5f5f5"
,
"backgroundColorBottom"
:
"#f5f5f5"
},
"tabBar"
:
{
"color"
:
"#8a8a8a"
,
...
...
public/appmini/old/baidu/pages/cart/cart.js
浏览文件 @
574341ff
...
...
@@ -89,6 +89,14 @@ Page({
common_is_exhibition_mode_btn_text
:
data
.
common_is_exhibition_mode_btn_text
||
'
立即咨询
'
,
customer_service_tel
:
data
.
customer_service_tel
||
null
,
});
// 导航购物车处理
var
cart_total
=
data
.
common_cart_total
||
0
;
if
(
cart_total
<=
0
)
{
app
.
set_tab_bar_badge
(
2
,
0
);
}
else
{
app
.
set_tab_bar_badge
(
2
,
1
,
cart_total
);
}
}
else
{
this
.
setData
({
data_list_loding_status
:
2
,
...
...
@@ -260,6 +268,14 @@ Page({
data_list_loding_status
:
temp_data_list
.
length
==
0
?
0
:
this
.
data
.
data_list_loding_status
});
// 导航购物车处理
var
cart_total
=
res
.
data
.
data
||
0
;
if
(
cart_total
<=
0
)
{
app
.
set_tab_bar_badge
(
2
,
0
);
}
else
{
app
.
set_tab_bar_badge
(
2
,
1
,
cart_total
);
}
app
.
showToast
(
type
==
'
delete
'
?
'
删除成功
'
:
'
收藏成功
'
,
'
success
'
);
}
else
{
if
(
app
.
is_login_check
(
res
.
data
))
{
...
...
public/appmini/old/baidu/pages/index/index.js
浏览文件 @
574341ff
...
...
@@ -61,6 +61,15 @@ Page({
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
});
// 导航购物车处理
var
cart_total
=
data
.
common_cart_total
||
0
;
if
(
cart_total
<=
0
)
{
app
.
set_tab_bar_badge
(
2
,
0
);
}
else
{
app
.
set_tab_bar_badge
(
2
,
1
,
cart_total
);
}
// 限时秒杀倒计时
if
(
this
.
data
.
common_app_is_limitedtimediscount
==
1
&&
this
.
data
.
plugins_limitedtimediscount_data
!=
null
)
{
this
.
plugins_limitedtimediscount_countdown
();
...
...
public/appmini/old/baidu/pages/index/index.json
浏览文件 @
574341ff
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColorTop"
:
"#d2364c"
,
"usingComponents"
:
{
"component-icon-nav"
:
"/components/icon-nav/icon-nav"
,
"component-banner"
:
"/components/slider/slider"
...
...
public/appmini/old/baidu/pages/user/user.js
浏览文件 @
574341ff
...
...
@@ -112,6 +112,14 @@ Page({
common_app_is_online_service
:
data
.
common_app_is_online_service
||
0
,
common_app_is_head_vice_nav
:
data
.
common_app_is_head_vice_nav
||
0
,
});
// 导航购物车处理
var
cart_total
=
data
.
common_cart_total
||
0
;
if
(
cart_total
<=
0
)
{
app
.
set_tab_bar_badge
(
2
,
0
);
}
else
{
app
.
set_tab_bar_badge
(
2
,
1
,
cart_total
);
}
}
else
{
if
(
app
.
is_login_check
(
res
.
data
,
this
,
'
get_data
'
))
{
...
...
public/appmini/old/baidu/pages/user/user.json
浏览文件 @
574341ff
{
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"component-badge"
:
"/components/badge/badge"
}
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColorTop"
:
"#d2364c"
,
"usingComponents"
:
{
"component-badge"
:
"/components/badge/badge"
}
}
\ No newline at end of file
public/appmini/old/weixin/app.js
浏览文件 @
574341ff
...
...
@@ -71,7 +71,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}}
"
,
...
...
public/appmini/old/weixin/app.json
浏览文件 @
574341ff
{
"pages"
:
[
"pages/plugins/membershiplevelvip/order/order"
,
"pages/index/index"
,
"pages/goods-category/goods-category"
,
"pages/cart/cart"
,
...
...
@@ -36,7 +36,9 @@
],
"window"
:
{
"navigationBarTitleText"
:
"{{application_title}}"
,
"navigationBarBackgroundColor"
:
"#d2364c"
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColor"
:
"#f5f5f5"
,
"backgroundColorBottom"
:
"#f5f5f5"
},
"tabBar"
:
{
"color"
:
"#8a8a8a"
,
...
...
public/appmini/old/weixin/pages/index/index.json
浏览文件 @
574341ff
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#d2364c"
,
"backgroundColor"
:
"#d2364c"
,
"backgroundColor
Top
"
:
"#d2364c"
,
"usingComponents"
:
{
"component-icon-nav"
:
"/components/icon-nav/icon-nav"
,
"component-banner"
:
"/components/slider/slider"
...
...
public/appmini/old/weixin/pages/plugins/membershiplevelvip/user/user.json
浏览文件 @
574341ff
{
"enablePullDownRefresh"
:
true
,
"navigationBarBackgroundColor"
:
"#1d1611"
,
"backgroundColor"
:
"#1d1611"
"backgroundColor
Top
"
:
"#1d1611"
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录