Browse Source

checkredis

undefined
娄梦宁 4 years ago
parent
commit
62be2fb0a7
5 changed files with 21 additions and 11 deletions
  1. +1
    -1
      addons/unishop/application/admin/controller/unishop/Product.php
  2. +8
    -8
      addons/unishop/controller/Order.php
  3. +5
    -2
      application/admin/controller/user/User.php
  4. +6
    -0
      application/admin/view/user/user/edit.html
  5. +1
    -0
      public/assets/js/backend/user/user.js

+ 1
- 1
addons/unishop/application/admin/controller/unishop/Product.php View File

@@ -20,7 +20,7 @@ class Product extends Backend
* 快速搜索时执行查找的字段
*/
protected $searchFields = 'title';
protected $noNeedLogin = ["select"];
/**
* Multi方法可批量修改的字段
*/


+ 8
- 8
addons/unishop/controller/Order.php View File

@@ -426,14 +426,14 @@ class Order extends Base
$order['express_number'] = $order['extend']['express_number'];

// 送货地址
$address = json_decode($order['extend']['address_json'], true);
$area = (new \addons\unishop\model\Area())
->whereIn('id', [$address['province_id'], $address['city_id'], $address['area_id']])
->column('name', 'id');
$delivery['username'] = $address['name'];
$delivery['mobile'] = $address['mobile'];
$delivery['address'] = $area[$address['province_id']] . ' ' . $area[$address['city_id']] . ' ' . $area[$address['area_id']] . ' ' . $address['address'];
$order['delivery'] = $delivery;
// $address = json_decode($order['extend']['address_json'], true);
// $area = (new \addons\unishop\model\Area())
// ->whereIn('id', [$address['province_id'], $address['city_id'], $address['area_id']])
// ->column('name', 'id');
// $delivery['username'] = $address['name'];
// $delivery['mobile'] = $address['mobile'];
// $delivery['address'] = $area[$address['province_id']] . ' ' . $area[$address['city_id']] . ' ' . $area[$address['area_id']] . ' ' . $address['address'];
// $order['delivery'] = $delivery;

// 是否已评论
$evaluate = array_column($order['evaluate'], 'product_id');


+ 5
- 2
application/admin/controller/user/User.php View File

@@ -78,7 +78,9 @@ class User extends Backend
$fieldArr = [ 'nickname',
'username',
'password',
'email',];
'email',
'floor'
];


//加载文件
@@ -96,11 +98,12 @@ class User extends Backend
'username',
'password',
'email',
'floor'
];
for ($currentRow = 2; $currentRow <= $allRow; $currentRow++) {
$values = [];
$salt = \fast\Random::alnum();
for ($currentColumn = 1; $currentColumn <= 4; $currentColumn++) {
for ($currentColumn = 1; $currentColumn <= 5; $currentColumn++) {
$val = $currentSheet->getCellByColumnAndRow($currentColumn, $currentRow)->getValue();
if ($currentColumn==3){
//修改的是密码


+ 6
- 0
application/admin/view/user/user/edit.html View File

@@ -30,6 +30,12 @@
<input id="c-email" data-rule="" class="form-control" name="row[email]" type="text" value="{$row.email|htmlentities}">
</div>
</div>
<div class="form-group">
<label for="c-floor" class="control-label col-xs-12 col-sm-2">{:__("所在楼层")}:</label>
<div class="col-xs-12 col-sm-4">
<input id="c-floor" data-rule="" class="form-control" name="row[floor]" type="text" value="{$row.floor|htmlentities}">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>-->
<!-- <div class="col-xs-12 col-sm-4">-->


+ 1
- 0
public/assets/js/backend/user/user.js View File

@@ -30,6 +30,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'username', title: __('Username'), operate: 'LIKE'},
{field: 'nickname', title: __('Nickname'), operate: 'LIKE'},
{field: 'email', title: __('Email'), operate: 'LIKE'},
{field: 'floor', title: __('所在楼层'), operate: 'LIKE'},
// {field: 'mobile', title: __('Mobile'), operate: 'LIKE'},
// {field: 'avatar', title: __('Avatar'), events: Table.api.events.image, formatter: Table.api.formatter.image, operate: false},
// {field: 'level', title: __('Level'), operate: 'BETWEEN', sortable: true},


Loading…
Cancel
Save