Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
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
01d35bea
authored
Mar 10, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
3c752037
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
app/Model/CommonModel.php
app/Model/InquiryItemsModel.php
app/Model/InquiryModel.php
app/Model/CommonModel.php
View file @
01d35bea
...
...
@@ -86,15 +86,15 @@ class CommonModel extends Model
//模糊搜索sku型号
public
function
SkuList
(
$k
)
{
$url
=
"http://s
.ichunt.com/api/think?k
="
.
$k
;
$url
=
"http://s
o12.ichunt.com/search/spu/think?spu_name
="
.
$k
;
$res
=
post_curl
(
$url
,[]);
$resArr
=
\GuzzleHttp\json_decode
(
$res
,
true
);
$temp
=
[];
if
(
count
(
$resArr
[
"data"
])
==
0
){
array_push
(
$temp
,[
"value"
=>
$k
,
"name"
=>
$k
]);
array_push
(
$temp
,[
"value"
=>
""
,
"name"
=>
$k
]);
}
else
{
foreach
(
$resArr
[
"data"
]
as
$k
=>
$v
){
array_push
(
$temp
,[
"value"
=>
$v
,
"name"
=>
$v
]);
array_push
(
$temp
,[
"value"
=>
json_encode
(
$v
),
"name"
=>
$v
[
"spu_name"
]
.
" 品牌:"
.
$v
[
"brand_name"
]
]);
}
}
echo
json_encode
(
$temp
,
JSON_UNESCAPED_UNICODE
)
;
...
...
app/Model/InquiryItemsModel.php
View file @
01d35bea
...
...
@@ -187,7 +187,6 @@ class InquiryItemsModel extends Model
if
(
empty
(
$b
[
"inquiry_number"
]))
throw
new
Exception
(
"请输入询价数量"
,
1004
);
if
(
empty
(
$b
[
"batch"
]))
throw
new
Exception
(
"请输入批次要求"
,
1005
);
if
(
empty
(
$b
[
"delivery_time"
]))
throw
new
Exception
(
"请选择交货日期"
,
1006
);
if
(
empty
(
$b
[
"brand_name"
]))
throw
new
Exception
(
"请选择品牌名称"
,
1003
);
try
{
$con
=
DB
::
connection
(
'rfq'
);
...
...
app/Model/InquiryModel.php
View file @
01d35bea
...
...
@@ -74,7 +74,7 @@ class InquiryModel extends Model
#不同类别查询
switch
(
@
$input
[
"types"
]){
case
"1"
:
//我的询价
$list
=
$list
->
where
(
'a.create_uid'
,
$user_id
)
->
whereIn
(
'a.status'
,
[
-
1
,
1
])
;
$list
=
$list
->
where
(
'a.create_uid'
,
$user_id
);
break
;
case
"2"
:
//我的已关闭询价
$list
=
$list
->
where
(
'a.create_uid'
,
$user_id
)
->
where
(
"b.status"
,
-
1
);
...
...
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