Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b47b410b
authored
Oct 25, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_perm_20181024' into development
parents
90be815f
14f9ef97
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
14 deletions
app/Http/Controllers/AddOrderController.php
config/website.php
public/js/add_order.js
app/Http/Controllers/AddOrderController.php
View file @
b47b410b
...
...
@@ -289,11 +289,18 @@ Class AddOrderController extends Controller
if
(
$request
->
isMethod
(
'post'
))
{
$url
=
Config
(
'website.search-skuid'
);
$data
[
'sku_id'
]
=
$request
->
input
(
'sku_id'
);
$goods_type
=
$request
->
input
(
'goods_type'
);
$response
=
json_decode
(
curlApi
(
$url
,
$data
,
'POST'
),
true
);
if
(
!
empty
(
$response
[
'data'
][
'data'
]))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$response
[
'data'
][
'data'
][
$data
[
'sku_id'
]]];
if
(
$goods_type
==
1
)
{
$goods_info
=
$response
[
'data'
][
'sku'
];
}
else
{
$goods_info
=
$response
[
'data'
];
}
if
(
!
empty
(
$goods_info
))
{
return
[
'errcode'
=>
0
,
'errmsg'
=>
''
,
'data'
=>
$goods_info
];
}
else
{
return
[
'errcode'
=>
-
1
,
'errmsg'
=>
'未找SKU信息'
];
}
...
...
config/website.php
View file @
b47b410b
...
...
@@ -10,7 +10,7 @@ return [
'search'
=>
'http://'
.
env
(
'LOGIN_DOMAIN'
,
''
)
.
'/api/search'
,
],
'domain'
=>
'liexin.
com
'
,
'domain'
=>
'liexin.
net
'
,
// 订单系统
'order_url'
=>
'http://order.liexin.net'
,
...
...
@@ -51,8 +51,8 @@ return [
'check-user-url'
=>
'http://member.liexin.net/list'
,
// 查询SKUID接口
// 'search-skuid' => 'http://footstone.liexin.net/webapi/sku_list
',
'search-skuid'
=>
'http://www.liexin.com/v3/sku/list'
,
'search-skuid'
=>
'http://footstone.liexin.net/webapi/goods_details
'
,
//
'search-skuid' => 'http://www.liexin.com/v3/sku/list',
// 新增SKU入口
'add-sku-url'
=>
'http://footstone.liexin.net/manage/addsku'
,
...
...
public/js/add_order.js
View file @
b47b410b
...
...
@@ -220,7 +220,7 @@
$
.
ajax
({
url
:
'/ajax/getSku'
,
type
:
'post'
,
data
:
{
sku_id
:
sku_id
.
trim
()},
data
:
{
sku_id
:
sku_id
.
trim
()
,
goods_type
:
goods_type
},
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
!=
0
)
{
...
...
@@ -259,25 +259,47 @@
//阶梯价格
if
(
data
.
ladder_price
!=
null
)
{
var
len
=
data
.
ladder_price
.
length
;
if
(
data
.
ladder_price
.
constructor
==
String
)
{
//如果阶梯价为字符串,则转换为数字
var
price_arr
=
eval
(
data
.
ladder_price
);
}
else
{
var
price_arr
=
data
.
ladder_price
;
}
var
len
=
price_arr
.
length
;
if
(
len
>
0
)
{
var
html
=
''
;
var
str
=
''
;
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
html
+=
'<tr>'
;
if
(
i
==
0
)
{
if
(
goods_type
==
1
)
{
str
=
'<td>$<span class="goods-min-price-us">'
+
data
.
ladder_price
[
i
][
'price_us'
]
+
'</span></td>'
;
if
(
data
.
ac_type
)
{
html
+=
'<td><span class="goods-min-num">'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price">'
+
price_arr
[
i
][
'price_cn'
]
+
'</span><td>¥<span>'
+
price_arr
[
i
][
'price_ac'
]
+
'</span></td>'
;
}
else
{
html
+=
'<td><span class="goods-min-num">'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price">'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td>'
;
}
html
+=
'<tr><td><span class="goods-min-num">'
+
data
.
ladder_price
[
i
][
'purchases'
]
+
'</span></td><td>¥<span class="goods-min-price">'
+
data
.
ladder_price
[
i
][
'price_cn'
]
+
'</span></td>'
+
str
+
'</tr>'
;
if
(
goods_type
==
1
)
{
html
+=
'<td>$<span class="goods-min-price-us">'
+
price_arr
[
i
][
'price_us'
]
+
'</span></td>'
;
}
}
else
{
if
(
data
.
ac_type
)
{
html
+=
'<td><span>'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span>'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td><td>¥<span>'
+
price_arr
[
i
][
'price_ac'
]
+
'</span></td>'
;
}
else
{
html
+=
'<td><span>'
+
price_arr
[
i
][
'purchases'
]
+
'</span></td><td>¥<span>'
+
price_arr
[
i
][
'price_cn'
]
+
'</span></td>'
;
}
if
(
goods_type
==
1
)
{
str
=
'<td>$<span>'
+
data
.
ladder_price
[
i
][
'price_us'
]
+
'</span></td>'
;
html
+=
'<td>$<span>'
+
price_arr
[
i
][
'price_us'
]
+
'</span></td>'
;
}
}
html
+=
'<tr><td><span>'
+
data
.
ladder_price
[
i
][
'purchases'
]
+
'</span></td><td>¥<span>'
+
data
.
ladder_price
[
i
][
'price_cn'
]
+
'</span></td>'
+
str
+
'</tr>'
;
html
+=
'</tr>'
;
}
if
(
data
.
ac_type
==
1
)
{
$
(
'.ladder_price_table tr:eq(0)'
).
append
(
'<th>活动价</th>'
)
}
$
(
'.ladder_price_table tr:gt(0)'
).
remove
();
...
...
@@ -647,7 +669,7 @@
$
(
'.preferential_price_val'
).
empty
().
text
(
data
.
preferential_price_format
);
}
if
(
goods_type
==
2
&&
address_id
)
{
if
(
goods_type
==
2
)
{
$
(
'.express_fee_val'
).
empty
().
text
(
data
.
finally_shipping_price_format
);
// 运费
}
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment