Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xxmp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chan
xxmp
Commits
a422017e
Commit
a422017e
authored
May 21, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品会员
parent
989587f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
18 deletions
+35
-18
goodsedit.inc.php
addons/longbing_company/inc/web/manage/goodsedit.inc.php
+4
-2
shopgoodsdetail.inc.php
addons/longbing_company/inc/wxapp/shopgoodsdetail.inc.php
+11
-6
goodsEdit.html
addons/longbing_company/template/manage/goodsEdit.html
+20
-10
No files found.
addons/longbing_company/inc/web/manage/goodsedit.inc.php
View file @
a422017e
...
...
@@ -164,8 +164,10 @@ if (isset($_GPC['id'])) {
if
(
$info
[
'images'
])
{
$info
[
'images'
]
=
explode
(
','
,
$info
[
'images'
]);
}
$start_time
=
array
();
if
(
$info
[
'start_time'
])
{
$start_time
=
json_decode
(
$info
[
'start_time'
],
true
);
}
}
...
...
addons/longbing_company/inc/wxapp/shopgoodsdetail.inc.php
View file @
a422017e
...
...
@@ -151,7 +151,7 @@ if (!$to_uid) {
$u
=
pdo_get
(
'longbing_company_user'
,
array
(
"id"
=>
$uid
));
$level
=
$u
[
'level_id'
];
$goods
=
pdo_get
(
'longbing_company_goods'
,
array
(
'id'
=>
$goods_id
),
array
(
'id'
,
'name'
,
'cover'
,
'images'
,
'price'
,
'view_count'
,
'sale_count'
,
'desc'
,
'content'
,
'collage_count'
,
'is_collage'
,
'freight'
,
'recommend'
,
'stock'
,
'image_url'
,
'unit'
,
'start_time'
,
'end_time'
,
'is_free_card'
,
'is_discount'
,
'leve_id'
,
'is_make'
));
$goods
=
pdo_get
(
'longbing_company_goods'
,
array
(
'id'
=>
$goods_id
),
array
(
'id'
,
'name'
,
'cover'
,
'images'
,
'price'
,
'view_count'
,
'sale_count'
,
'desc'
,
'content'
,
'collage_count'
,
'is_collage'
,
'freight'
,
'recommend'
,
'stock'
,
'image_url'
,
'unit'
,
'start_time'
,
'end_time'
,
'is_free_card'
,
'is_discount'
,
'leve_id'
,
'is_make'
,
'explain'
));
$goods_price
=
$goods
[
'price'
];
$goods_stock
=
$goods
[
'stock'
];
$is_discount
=
$goods
[
'is_discount'
];
...
...
@@ -179,6 +179,7 @@ if($level>0){
$goods
[
'content'
]
=
$this
->
toWXml
(
$goods
[
'content'
]);
$goods
[
'explain'
]
=
$this
->
toWXml
(
$goods
[
'explain'
]);
$spe
=
pdo_getall
(
'longbing_company_shop_spe'
,
array
(
'goods_id'
=>
$goods_id
,
'status'
=>
1
,
'uniacid'
=>
$uniacid
),
array
(
'id'
,
'title'
,
'pid'
));
$speList
=
array
();
...
...
@@ -197,18 +198,20 @@ if($level>0){
}
}
}
$goods
[
'start_time'
]
=
json_decode
(
$goods
[
'start_time'
]);
if
(
$goods
[
'start_time'
]){
$goods
[
'start_time'
]
=
json_decode
(
$goods
[
'start_time'
],
true
);
}
$goods
[
'companyList'
]
=
getCompanys
(
$goods
[
'id'
]);
$goods
[
'spe_list'
]
=
$speList
;
$spe_price
=
pdo_getall
(
'longbing_company_shop_spe_price'
,
array
(
'goods_id'
=>
$goods_id
,
'status'
=>
1
,
'uniacid'
=>
$uniacid
),
array
(
'id'
,
'spe_id_1'
,
'price'
,
'stock'
));
$goods
[
'spe_price'
]
=
$spe_price
;
$ids
=
''
;
foreach
(
$spe_price
as
$k
=>
$v
)
{
$ids
.=
','
.
$v
[
'id'
];
}
$price1
=
$v
[
'price'
]
*
$level_discount
/
100
;
$spe_price
[
$k
][
'm_price'
]
=
sprintf
(
'%.2f'
,
$price1
);
}
$goods
[
'spe_price'
]
=
$spe_price
;
// foreach ($goods as $c => $g){
// $goods[$c]['to_uid']=$to_uid;
//
...
...
@@ -354,6 +357,7 @@ if($level>0){
}
$goods
[
'content'
]
=
$this
->
toWXml
(
$goods
[
'content'
]);
$goods
[
'explain'
]
=
$this
->
toWXml
(
$goods
[
'explain'
]);
$spe
=
pdo_getall
(
'longbing_company_shop_spe'
,
array
(
'goods_id'
=>
$goods_id
,
'status'
=>
1
,
'uniacid'
=>
$uniacid
),
array
(
'id'
,
'title'
,
'pid'
));
$speList
=
array
();
...
...
@@ -522,6 +526,7 @@ if($level>0){
}
$goods
[
'content'
]
=
$this
->
toWXml
(
$goods
[
'content'
]);
$goods
[
'explain'
]
=
$this
->
toWXml
(
$goods
[
'explain'
]);
$spe
=
pdo_getall
(
'longbing_company_shop_spe'
,
array
(
'goods_id'
=>
$goods_id
,
'status'
=>
1
,
'uniacid'
=>
$uniacid
),
array
(
'id'
,
'title'
,
'pid'
));
$speList
=
array
();
...
...
addons/longbing_company/template/manage/goodsEdit.html
View file @
a422017e
...
...
@@ -330,6 +330,9 @@
<div
class=
"layui-inline"
style=
"float: left"
>
<label
class=
"layui-form-label"
>
出发时间:
</label>
<div
class=
"layui-input-inline add"
id=
"timeList"
>
{loop $start_time['sites'] $index $item}
<input
type=
"date"
name=
'start_time{$index}'
value=
"{$item['time']}"
class=
"layui-input"
placeholder=
"年-月-日"
/>
{/loop}
</div>
<div
style=
"clear: both;padding-top: 15px;"
><button
class=
"layui-btn"
onclick=
"dayHtml();return false;"
>
+添加
</button></div>
...
...
@@ -437,6 +440,12 @@
{php echo tpl_ueditor('content', $info['content']);}
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
预定须知
</label>
<div
class=
"layui-input-block"
>
{php echo tpl_ueditor('explain', $info['explain']);}
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
...
...
@@ -446,7 +455,8 @@
</div>
</div>
</div>
</div>
</form>
...
...
@@ -459,7 +469,7 @@
<script
src=
"../../../addons/{$module_name}/images/layuiadmin/layui/layui.js"
></script>
<script>
function
dayHtml
(){
let
count
=
$
(
"input[name^='start_time']"
).
size
()
+
1
;
let
count
=
$
(
"input[name^='start_time']"
).
size
();
let
names
=
"start_time"
+
count
;
var
html
=
""
;
html
+=
'<input type="date" name="'
+
names
+
'" class="layui-input" placeholder="年-月-日" />'
;
...
...
@@ -494,9 +504,8 @@
return
"0"
+
e
;
}
}
function
timesFun
(){
var
start_time
=
"{$info['start_time']}"
;
// var end_time = "{$info['end_time']}";
function
timesFun
(){
debugger
var
start_time
=
{
$start_time
};
if
(
start_time
){
var
d
=
new
Date
(
start_time
*
1000
);
var
n
=
d
.
getFullYear
();
//年
...
...
@@ -521,7 +530,7 @@
});
$
(
function
(){
getSheng
();
timesFun
();
//
timesFun();
dayHtml
();
})
form
.
on
(
'select(province)'
,
function
(
data
){
...
...
@@ -548,15 +557,15 @@
}
}
layer
.
load
();
debugger
layer
.
load
();
let
count
=
$
(
"input[name^='start_time']"
).
size
();
let
sites
=
[];
for
(
let
i
=
1
;
i
<=
count
;
i
++
)
{
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
let
n
=
"start_time"
+
i
let
t
=
{
time
:
formData
[
n
]
};
sites
.
push
(
t
);
if
(
t
.
time
){
sites
.
push
(
t
);}
delete
formData
[
n
];
}
// if(formData.start_time){
...
...
@@ -574,7 +583,8 @@
if
(
id
>
0
)
{
data
.
id
=
id
;
}
data
.
start_time
=
formData
.
start_time
;
data
.
start_time
=
{
sites
:
sites
}
;
postData
(
url
,
data
);
return
false
;
});
...
...
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