Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
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
76c8cbc2
authored
Nov 24, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev/ver/1.0.0' of
http://git.ichunt.net/semour/semour_web
into dev/ver/1.0.0
parents
7242a91d
1de8f745
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
27 deletions
.env
app/Http/Middleware/CheckApiLogin.php
app/Http/Services/CartService.php
public/assets/js/car/car.js
public/assets/js/user/frq.js
resources/views/user/inquiry.blade.php
.env
View file @
76c8cbc2
...
@@ -7,7 +7,7 @@ APP_URL=http://localhost
...
@@ -7,7 +7,7 @@ APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_CONNECTION=mysql
DB_HOST=
192.168.1.238
DB_HOST=
master.db2.liexindev.me
DB_PORT=3306
DB_PORT=3306
DB_DATABASE=semour
DB_DATABASE=semour
DB_USERNAME=semour
DB_USERNAME=semour
...
...
app/Http/Middleware/CheckApiLogin.php
View file @
76c8cbc2
...
@@ -7,7 +7,8 @@ use Closure;
...
@@ -7,7 +7,8 @@ use Closure;
class
CheckApiLogin
class
CheckApiLogin
{
{
public
$no_login_url
=
[
"api/cart/saveCart"
,
"api/cart/cartLists"
,
"api/cart/cartMyCount"
];
//一些接口可以登录或者不登录都可以通行
public
$no_login_url
=
[
"api/cart/cartDelete"
,
"api/cart/saveCart"
,
"api/cart/cartLists"
,
"api/cart/cartMyCount"
];
/**
/**
* Handle an incoming request.
* Handle an incoming request.
...
...
app/Http/Services/CartService.php
View file @
76c8cbc2
...
@@ -47,6 +47,7 @@ class CartService
...
@@ -47,6 +47,7 @@ class CartService
$temp
[
"raw_brand_name"
]
=
$digikeyArr
[
"raw_brand_name"
];
$temp
[
"raw_brand_name"
]
=
$digikeyArr
[
"raw_brand_name"
];
}
}
//购买时价格
//购买时价格
$buy_price
=
0
;
$buy_price
=
0
;
$ladder_price
=
data_get
(
$skuInfo
,
"ladder_price"
);
$ladder_price
=
data_get
(
$skuInfo
,
"ladder_price"
);
...
@@ -396,7 +397,7 @@ class CartService
...
@@ -396,7 +397,7 @@ class CartService
* 购物车当前数量
* 购物车当前数量
*/
*/
public
static
function
cartMyCount
(
$user_id
,
$gid
=
""
){
public
static
function
cartMyCount
(
$user_id
,
$gid
=
""
){
$where
=
$user_id
?
[
"user_id"
=>
$user_id
]
:
[
"gid"
=>
$gid
];
$where
=
$user_id
?
[
"user_id"
=>
$user_id
,
"status"
=>
1
]
:
[
"gid"
=>
$gid
,
"status"
=>
1
];
return
CartModel
::
where
(
$where
)
->
count
();
return
CartModel
::
where
(
$where
)
->
count
();
}
}
...
...
public/assets/js/car/car.js
View file @
76c8cbc2
...
@@ -108,6 +108,7 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports,
...
@@ -108,6 +108,7 @@ define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports,
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
liexin_pop
.
Tip
({
title
:
res
.
msg
},
function
(){
liexin_pop
.
Tip
({
title
:
res
.
msg
},
function
(){
car
.
getData
()
car
.
getData
()
ele
.
fadeOut
(
300
)
})
})
}
else
{
}
else
{
liexin_pop
.
Tip
({
title
:
res
.
msg
})
liexin_pop
.
Tip
({
title
:
res
.
msg
})
...
...
public/assets/js/user/frq.js
View file @
76c8cbc2
define
(
'frq'
,
[
'tool'
,
'liexin_pop'
,
'artTemplate
'
],
function
(
require
,
exports
,
module
)
{
define
(
'frq'
,
[
'tool'
,
'liexin_pop'
,
'artTemplate'
,
'pagination
'
],
function
(
require
,
exports
,
module
)
{
var
tool
=
require
(
"tool"
);
var
tool
=
require
(
"tool"
);
var
liexin_pop
=
require
(
"liexin_pop"
);
var
liexin_pop
=
require
(
"liexin_pop"
);
var
artTemplate
=
require
(
"artTemplate"
);
var
artTemplate
=
require
(
"artTemplate"
);
var
pagination
=
require
(
'pagination'
);
var
frq
=
{
var
frq
=
{
page
:
1
,
limit
:
10
,
init
:
function
()
{
init
:
function
()
{
frq
.
handle
();
frq
.
handle
();
frq
.
getData
()
frq
.
getData
()
},
},
getData
:
function
()
{
getData
:
function
()
{
$
.
liexin_ajax
(
'/api/inquiry/list'
,
'GET'
,
{
$
.
liexin_ajax
(
'/api/inquiry/list'
,
'GET'
,
{
status
:
$
(
".inuirynavs .item.act"
).
attr
(
"guid"
),
status
:
$
(
".inuirynavs .item.act"
).
attr
(
"guid"
),
keyword
:
$
(
".inquirysearchvalss"
).
val
()
keyword
:
$
(
".inquirysearchvalss"
).
val
(),
limit
:
frq
.
limit
,
page
:
frq
.
page
},
function
(
res
)
{
},
function
(
res
)
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
dataArr
=
res
.
data
||
[];
var
dataArr
=
res
.
data
||
[];
if
(
dataArr
.
length
==
0
)
{
if
(
dataArr
.
length
==
0
)
{
tool
.
NoData
(
".tbody"
)
tool
.
NoData
(
".tbody"
)
return
return
}
}
var
json_
=
{
var
json_
=
{
data
:
dataArr
data
:
dataArr
}
}
var
html
=
template
(
'DataTmp'
,
json_
);
var
html
=
template
(
'DataTmp'
,
json_
);
$
(
".tbody"
).
html
(
html
);
$
(
".tbody"
).
html
(
html
);
//分页初始化
$
(
'.M-pagebox'
).
pagination
({
totalData
:
res
.
count
,
showData
:
frq
.
limit
,
coping
:
true
,
prevContent
:
'<'
,
nextContent
:
'>'
,
jump
:
true
,
jumpBtn
:
"Go"
,
keepShowPN
:
true
,
current
:
frq
.
page
,
isHide
:
true
,
callback
:
function
(
api
)
{
frq
.
page
=
api
.
getCurrent
()
frq
.
getData
();
}
});
}
else
{
}
else
{
liexin_pop
.
Tip
({
title
:
res
.
msg
})
liexin_pop
.
Tip
({
title
:
res
.
msg
})
}
}
})
})
},
},
handle
:
function
()
{
handle
:
function
()
{
$
(
".inuirynavs .item"
).
click
(
function
()
{
$
(
".inuirynavs .item"
).
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
"act"
)){
return
}
if
(
$
(
this
).
hasClass
(
"act"
))
{
return
}
$
(
".inuirynavs .item"
).
removeClass
(
"act"
)
$
(
".inuirynavs .item"
).
removeClass
(
"act"
)
$
(
this
).
addClass
(
"act"
)
$
(
this
).
addClass
(
"act"
)
frq
.
page
=
1
;
frq
.
getData
()
frq
.
getData
()
})
})
$
(
".inquirysearchbtnss"
).
click
(
function
(){
$
(
".inquirysearchbtnss"
).
click
(
function
()
{
frq
.
page
=
1
;
frq
.
getData
()
frq
.
getData
()
})
})
$
(
"body"
).
on
(
"click"
,
".trdetail"
,
function
()
{
$
(
"body"
).
on
(
"click"
,
".trdetail"
,
function
()
{
var
guid_
=
$
(
this
).
attr
(
"guid"
);
var
guid_
=
$
(
this
).
attr
(
"guid"
);
frq
.
getFrqDetail
(
guid_
);
frq
.
getFrqDetail
(
guid_
);
})
})
},
},
getFrqDetail
:
function
(
id_
)
{
getFrqDetail
:
function
(
id_
)
{
$
.
liexin_ajax
(
'/api/inquiry/detail'
,
'GET'
,
{
$
.
liexin_ajax
(
'/api/inquiry/detail'
,
'GET'
,
{
inquiry_id
:
id_
inquiry_id
:
id_
},
function
(
res
)
{
},
function
(
res
)
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
var
arr_
=
res
.
data
.
items
||
[];
var
arr_
=
res
.
data
.
items
||
[];
var
html_
=
""
;
var
html_
=
""
;
for
(
var
i
=
0
;
i
<
arr_
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr_
.
length
;
i
++
)
{
html_
+=
'<div class="row gcon"><div>'
+
arr_
[
i
].
goods_name
+
'</div><div>'
+
arr_
[
i
].
brand_name
+
'</div><div>'
+
arr_
[
i
].
inquiry_number
+
'</div></div>'
html_
+=
'<div class="row gcon"><div>'
+
arr_
[
i
].
goods_name
+
'</div><div>'
+
arr_
[
i
].
brand_name
+
'</div><div>'
+
arr_
[
i
].
inquiry_number
+
'</div></div>'
}
}
liexin_pop
.
Open
({
liexin_pop
.
Open
({
title
:
"Inquiry"
,
title
:
"Inquiry"
,
width
:
766
,
width
:
766
,
ele
:
".frqDetailPop"
,
ele
:
".frqDetailPop"
,
success
:
function
()
{
success
:
function
()
{
$
(
".frqDetailPop .detailfrqbox"
).
html
(
html_
);
$
(
".frqDetailPop .detailfrqbox"
).
html
(
html_
);
$
(
".frqDetailPop .gba"
).
text
(
res
.
data
.
remark
)
$
(
".frqDetailPop .gba"
).
text
(
res
.
data
.
remark
)
}
}
...
...
resources/views/user/inquiry.blade.php
View file @
76c8cbc2
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
<div class="
tbody
">
<div class="
tbody
">
</div>
</div>
<div class="
M
-
pagebox
row
rowCenter
"></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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