作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改后台小样上传

... ... @@ -2,9 +2,12 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php" afterPath="$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/admin/view/pic/add.html" afterPath="$PROJECT_DIR$/application/admin/view/pic/add.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/admin/view/pic/edit.html" afterPath="$PROJECT_DIR$/application/admin/view/pic/edit.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/common/library/Auth.php" afterPath="$PROJECT_DIR$/application/common/library/Auth.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/assets/js/backend/pic.js" afterPath="$PROJECT_DIR$/public/assets/js/backend/pic.js" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -18,14 +21,17 @@
<file leaf-file-name="User.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="219">
<caret line="306" column="30" lean-forward="true" selection-start-line="306" selection-start-column="30" selection-end-line="306" selection-end-column="30" />
<state relative-caret-position="600">
<caret line="331" column="58" lean-forward="false" selection-start-line="331" selection-start-column="58" selection-end-line="331" selection-end-column="58" />
<folding>
<element signature="e#38#68#0#PHP" expanded="true" />
<element signature="e#462#1200#0#PHP" expanded="false" />
<element signature="e#1205#2868#0#PHP" expanded="false" />
<element signature="e#2874#3402#0#PHP" expanded="false" />
<element signature="e#3407#4178#0#PHP" expanded="false" />
<element signature="e#4184#4591#0#PHP" expanded="false" />
<element signature="e#4945#5597#0#PHP" expanded="false" />
<element signature="e#5602#7338#0#PHP" expanded="false" />
<element signature="e#7344#7793#0#PHP" expanded="false" />
<element signature="e#7798#8681#0#PHP" expanded="false" />
</folding>
... ... @@ -33,26 +39,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="Auth.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/common/library/Auth.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="105" column="38" lean-forward="true" selection-start-line="105" selection-start-column="38" selection-end-line="105" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="verify.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/extra/verify.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="18" column="40" lean-forward="true" selection-start-line="18" selection-start-column="40" selection-end-line="18" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
... ... @@ -85,10 +71,6 @@
<option value="$PROJECT_DIR$/application/admin/model/Pic.php" />
<option value="$PROJECT_DIR$/application/admin/model/Type.php" />
<option value="$PROJECT_DIR$/application/admin/view/pic/index.html" />
<option value="$PROJECT_DIR$/application/admin/view/pic/add.html" />
<option value="$PROJECT_DIR$/public/assets/js/backend/pic.js" />
<option value="$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php" />
<option value="$PROJECT_DIR$/application/admin/view/pic/edit.html" />
<option value="$PROJECT_DIR$/application/admin/view/video/edit.html" />
<option value="$PROJECT_DIR$/application/admin/view/video/add.html" />
<option value="$PROJECT_DIR$/application/admin/lang/zh-cn/video.php" />
... ... @@ -103,6 +85,10 @@
<option value="$PROJECT_DIR$/public/.gitignore" />
<option value="$PROJECT_DIR$/application/extra/verify.php" />
<option value="$PROJECT_DIR$/application/common/library/Auth.php" />
<option value="$PROJECT_DIR$/public/assets/js/backend/pic.js" />
<option value="$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php" />
<option value="$PROJECT_DIR$/application/admin/view/pic/add.html" />
<option value="$PROJECT_DIR$/application/admin/view/pic/edit.html" />
<option value="$PROJECT_DIR$/application/api/controller/User.php" />
</list>
</option>
... ... @@ -122,8 +108,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="529" />
<option name="y" value="29" />
<option name="x" value="253" />
<option name="y" value="32" />
<option name="width" value="1589" />
<option name="height" value="939" />
</component>
... ... @@ -158,20 +144,55 @@
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="application" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="common" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="application" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="application" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="common" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="library" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="view" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="application" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="extra" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="view" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="pic" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="assets" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="assets" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="js" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="areial" type="b2602c69:ProjectViewProjectNode" />
<item name="areial" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="assets" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="js" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="backend" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
... ... @@ -219,7 +240,7 @@
<workItem from="1574122453532" duration="15780000" />
<workItem from="1574141466352" duration="745000" />
<workItem from="1574143209694" duration="3660000" />
<workItem from="1574146994475" duration="7109000" />
<workItem from="1574146994475" duration="8359000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -232,7 +253,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="55462000" />
<option name="totallyTimeSpent" value="56712000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -244,7 +265,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="529" y="29" width="1589" height="939" extended-state="0" />
<frame x="253" y="32" width="1589" height="939" extended-state="0" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18574232" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
... ... @@ -427,20 +448,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/pic/edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="361">
<caret line="46" column="4" lean-forward="false" selection-start-line="46" selection-start-column="4" selection-end-line="57" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/pic/add.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<caret line="46" column="4" lean-forward="true" selection-start-line="46" selection-start-column="4" selection-end-line="57" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/video/add.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="675">
... ... @@ -455,13 +462,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="12" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/lang/zh-cn/video.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
... ... @@ -476,13 +476,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Pic.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="564">
<caret line="178" column="4" lean-forward="true" selection-start-line="178" selection-start-column="4" selection-end-line="321" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/common/controller/Backend.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3867">
... ... @@ -497,13 +490,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/pic.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="27" column="61" lean-forward="true" selection-start-line="27" selection-start-column="61" selection-end-line="27" selection-end-column="61" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/library/ExceptionHandle.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-61">
... ... @@ -647,16 +633,66 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/lang/zh-cn/pic.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175">
<caret line="7" column="29" lean-forward="false" selection-start-line="7" selection-start-column="29" selection-end-line="7" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/pic/edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="511">
<caret line="34" column="28" lean-forward="true" selection-start-line="34" selection-start-column="28" selection-end-line="34" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/view/pic/add.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="205">
<caret line="33" column="10" lean-forward="true" selection-start-line="33" selection-start-column="10" selection-end-line="33" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/assets/js/backend/pic.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
<caret line="23" column="26" lean-forward="true" selection-start-line="23" selection-start-column="26" selection-end-line="23" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/admin/controller/Pic.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1200">
<caret line="169" column="27" lean-forward="false" selection-start-line="169" selection-start-column="27" selection-end-line="169" selection-end-column="27" />
<folding>
<element signature="e#693#1831#0#PHP" expanded="false" />
<element signature="e#1863#3665#0#PHP" expanded="false" />
<element signature="e#3697#5737#0#PHP" expanded="false" />
<element signature="e#5743#5987#0#PHP" expanded="false" />
<element signature="e#5993#6139#0#PHP" expanded="false" />
<element signature="e#6144#11945#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="219">
<caret line="306" column="30" lean-forward="true" selection-start-line="306" selection-start-column="30" selection-end-line="306" selection-end-column="30" />
<state relative-caret-position="600">
<caret line="331" column="58" lean-forward="false" selection-start-line="331" selection-start-column="58" selection-end-line="331" selection-end-column="58" />
<folding>
<element signature="e#38#68#0#PHP" expanded="true" />
<element signature="e#462#1200#0#PHP" expanded="false" />
<element signature="e#1205#2868#0#PHP" expanded="false" />
<element signature="e#2874#3402#0#PHP" expanded="false" />
<element signature="e#3407#4178#0#PHP" expanded="false" />
<element signature="e#4184#4591#0#PHP" expanded="false" />
<element signature="e#4945#5597#0#PHP" expanded="false" />
<element signature="e#5602#7338#0#PHP" expanded="false" />
<element signature="e#7344#7793#0#PHP" expanded="false" />
<element signature="e#7798#8681#0#PHP" expanded="false" />
</folding>
... ...
... ... @@ -5,7 +5,7 @@ return [
'Keyword' => '关键词(多个关键词中间用逗号隔开)',
'Thumbnail' => '缩略图',
'Type_ids' => '地区标签',
'Water_url' => '带水印的百度云盘地址',
'Water_url' => '带水印的小样图片',
'Url' => '高清百度云盘地址',
'Is_recommend' => '是否精选',
'Content' => '图片介绍',
... ...
... ... @@ -35,7 +35,15 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Water_url')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-water_url" data-rule="required" class="form-control" name="row[water_url]" type="text" placeholder="请输入带水印网址">
<div class="input-group">
<input id="c-water_url" data-rule="required" class="form-control" size="35" name="row[water_url]" type="text" placeholder="请上传小样图片">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-water_url" class="btn btn-danger plupload" data-input-id="c-water_url" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-water_url"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-water_url" class="btn btn-primary fachoose" data-input-id="c-water_url" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-water_url"></ul>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -35,7 +35,15 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Water_url')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-water_url" data-rule="required" class="form-control" name="row[water_url]" type="text" value="{$row.water_url|htmlentities}">
<div class="input-group">
<input id="c-water_url" data-rule="required" class="form-control" size="35" name="row[water_url]" value="{$row.water_url}" type="text" placeholder="请上传小样图片">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-water_url" class="btn btn-danger plupload" data-input-id="c-water_url" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-water_url"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-water_url" class="btn btn-primary fachoose" data-input-id="c-water_url" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-water_url"></ul>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -289,7 +289,7 @@ class User extends Api
"data": {
"id": 4,//图片id,
"thumbnail": //缩略图,
"water_url": //带水印的地址,
"water_url": //小样带水印的图片地址,
"url": //高清地址,
"price"://正常价格,
"vip_price"://vip价格,
... ... @@ -316,6 +316,7 @@ class User extends Api
->where('id',$pic_id)
->find();
$data['thumbnail'] = $rule.$data['thumbnail'];
$data['water_url'] = $rule.$data['water_url'];
$data['is_vip'] = 0;
$this->success('SUCCESS',$data);
}elseif($res['is_vip'] == 1){
... ... @@ -328,6 +329,7 @@ class User extends Api
->find();
$data['is_vip'] = 1;
$data['thumbnail'] = $rule.$data['thumbnail'];
$data['water_url'] = $rule.$data['water_url'];
$this->success('SUCCESS',$data);
}
}
... ...
... ... @@ -1976,7 +1976,7 @@
"data": {
"id": 4,//图片id,
"thumbnail": //缩略图,
"water_url": //带水印的地址,
"water_url": //小样带水印的图片地址,
"url": //高清地址,
"price"://正常价格,
"vip_price"://vip价格,
... ... @@ -1999,7 +1999,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2019-11-19 17:01:47 </div>
Generated on 2019-11-19 17:22:43 </div>
<div class="col-md-6" align="right">
<a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
</div>
... ...
... ... @@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'keyword', title: __('Keyword')},
{field: 'thumbnail', title: __('Thumbnail'), events: Table.api.events.image,formatter: Table.api.formatter.image},
{field: 'type_ids', title: __('Type_ids'),searchList:$.getJSON('pic/type')},
{field: 'water_url', title: __('Water_url'), formatter: Table.api.formatter.url},
{field: 'water_url', title: __('Water_url'), events: Table.api.events.image,formatter: Table.api.formatter.image},
{field: 'url', title: __('Url'), formatter: Table.api.formatter.url},
{field: 'is_recommend', title: __('Is_recommend'),formatter: Table.api.formatter.label,searchList:{'0': '否', '1': '是'}},
{field: 'price', title: __('Price')},
... ...