Skip to content

Commit

Permalink
v4.0手机端UI开发
Browse files Browse the repository at this point in the history
  • Loading branch information
gongfuxiang committed Nov 8, 2023
1 parent 349ef25 commit 3aa9568
Show file tree
Hide file tree
Showing 329 changed files with 1,773 additions and 5,950 deletions.
147 changes: 0 additions & 147 deletions app/admin/controller/Answer.php

This file was deleted.

56 changes: 56 additions & 0 deletions app/admin/controller/Qrcode.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;

/**
* 二维码生成控制层
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class QrCode extends Common
{
/**
* 二维码显示
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-04-16T21:52:09+0800
*/
public function Index()
{
if(empty($this->data_request['content']))
{
MyViewAssign('msg', MyLang('content_params_empty_tips'));
return MyView('public/tips_error');
}
(new \base\Qrcode())->View($this->data_request);
}

/**
* 二维码下载
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-04-16T21:52:18+0800
*/
public function Download()
{
$ret = (new \base\Qrcode())->Download($this->data_request);
if(!empty($ret) && isset($ret['code']) && $ret['code'] != 0)
{
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');
}
}
}
?>
13 changes: 12 additions & 1 deletion app/admin/controller/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ public function Save()
// 导航类型
switch($this->nav_type)
{
// 基础
case 'base' :
$field_list[] = 'home_site_logo';
$field_list[] = 'home_site_logo_wap';
$field_list[] = 'home_site_logo_app';
$field_list[] = 'home_site_logo_square';
break;

// 用户注册
case 'register' :
$field_list[] = 'home_user_reg_type';
Expand Down Expand Up @@ -244,6 +252,9 @@ public function Save()

// 站点类型
case 'sitetype' :
// 站点类型
$params['common_site_type'] = empty($params['common_site_type']) ? '' : (is_array($params['common_site_type']) ? json_encode($params['common_site_type'], JSON_UNESCAPED_UNICODE) : $params['common_site_type']);

// 自提地址处理
if(!empty($params['common_self_extraction_address']))
{
Expand Down Expand Up @@ -312,7 +323,7 @@ public function Save()
case 'cache' :
// session是否使用缓存
// 数据是否使用缓存
if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_cache']) && $params['common_data_is_use_cache'] == 1))
if((isset($params['common_session_is_use_cache']) && $params['common_session_is_use_cache'] == 1) || (isset($params['common_data_is_use_redis_cache']) && $params['common_data_is_use_redis_cache'] == 1))
{
// 连接测试
$ret = SiteService::RedisCheckConnectPing($params['common_cache_data_redis_host'], $params['common_cache_data_redis_port'], $params['common_cache_data_redis_password']);
Expand Down
32 changes: 28 additions & 4 deletions app/admin/form/Goods.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ public function Run($params = [])
'is_sort' => 1,
'sort_field' => 'title',
'search_config' => [
'form_type' => 'input',
'form_name' => 'title|simple_desc|seo_title|seo_keywords|seo_keywords',
'where_type' => 'like',
'placeholder' => '请输入商品名称/简述/SEO信息'
'form_type' => 'input',
'form_name' => 'id',
'where_type_custom' => 'in',
'where_value_custom' => 'WhereValueGoodsInfo',
'placeholder' => $lang['info_placeholder'],
],
],
[
Expand Down Expand Up @@ -311,6 +312,29 @@ public function Run($params = [])
];
}

/**
* 商品信息条件处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
* @param [string] $value [条件值]
* @param [array] $params [输入参数]
*/
public function WhereValueGoodsInfo($value, $params = [])
{
if(!empty($value))
{
// 获取商品 id
$ids = Db::name('Goods')->alias('g')->join('goods_spec_base gb', 'g.id=gb.goods_id')->where('g.title|g.simple_desc|g.seo_title|g.seo_keywords|g.seo_keywords|gb.coding|gb.barcode', 'like', '%'.$value.'%')->column('g.id');

// 避免空条件造成无效的错觉
return empty($ids) ? [0] : $ids;
}
return $value;
}

/**
* 商品分类条件处理
* @author Devil
Expand Down
2 changes: 1 addition & 1 deletion app/admin/form/Goodsspectemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function Run($params = [])
],
],
[
'label' => $lang['category_id'],
'label' => $lang['name'],
'view_type' => 'field',
'view_key' => 'name',
'is_sort' => 1,
Expand Down
30 changes: 1 addition & 29 deletions app/admin/lang/cht.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,28 +364,6 @@
],
],

// 问答
'answer' => [
'base_nav_title' => '問答',
'user_info_title' => '用戶資訊',
// 动态表格
'form_table' => [
'user' => '用戶資訊',
'user_placeholder' => '請輸入用戶名/昵稱/手機/郵箱',
'name' => '連絡人',
'tel' => '聯繫電話',
'title' => '標題',
'content' => '內容',
'reply' => '回復內容',
'is_show' => '是否顯示',
'is_reply' => '是否回復',
'reply_time_time' => '回復時間',
'access_count' => '訪問次數',
'add_time_time' => '創建時間',
'upd_time_time' => '更新時間',
],
],

// 仓库管理
'warehouse' => [
'base_nav_title' => '倉庫',
Expand Down Expand Up @@ -587,6 +565,7 @@
'form_table' => [
'id' => '商品ID',
'info' => '商品資訊',
'info_placeholder' => '請輸入商品名稱/簡述/編碼/條碼/SEO資訊',
'category_text' => '商品分類',
'brand_name' => '品牌',
'price' => '銷售價格(元)',
Expand Down Expand Up @@ -1505,13 +1484,6 @@
'data_index' => [
'name' => '資料管理',
'item' => [
'answer_index' => '問答留言',
'answer_reply' => '問答留言回復',
'answer_delete' => '問答留言删除',
'answer_statusupdate' => '問答留言狀態更新',
'answer_saveinfo' => '問答添加/編輯頁面',
'answer_save' => '問答添加/編輯',
'answer_detail' => '問答留言詳情',
'message_index' => '消息管理',
'message_delete' => '消息删除',
'message_detail' => '消息詳情',
Expand Down
30 changes: 1 addition & 29 deletions app/admin/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,28 +365,6 @@
],
],

// 问答
'answer' => [
'base_nav_title' => 'Q&A',
'user_info_title' => 'User Info',
// 动态表格
'form_table' => [
'user' => 'User Info',
'user_placeholder' => 'Please enter user name/nickname/mobile phone/email',
'name' => 'Contacts',
'tel' => 'Contact Number',
'title' => 'Title',
'content' => 'Content',
'reply' => 'Reply Content',
'is_show' => 'Show or not',
'is_reply' => 'Reply or not',
'reply_time_time' => 'Reply Time',
'access_count' => 'Access Count',
'add_time_time' => 'Creation Time',
'upd_time_time' => 'Update Time',
],
],

// 仓库管理
'warehouse' => [
'base_nav_title' => 'Warehouse',
Expand Down Expand Up @@ -588,6 +566,7 @@
'form_table' => [
'id' => 'Goods ID',
'info' => 'Goods Info',
'info_placeholder' => 'Please enter product name/brief description/code/barcode/SEO information',
'category_text' => 'Category',
'brand_name' => 'Brand',
'price' => 'Sales Price(yuan)',
Expand Down Expand Up @@ -1520,13 +1499,6 @@
'data_index' => [
'name' => 'Data Admin',
'item' => [
'answer_index' => 'Q&A message',
'answer_reply' => 'Q&A message reply',
'answer_delete' => 'Q&A message delete',
'answer_statusupdate' => 'Update message status',
'answer_saveinfo' => 'Q&A add/edit page',
'answer_save' => 'Q&A add/edit',
'answer_detail' => 'Q&A message details',
'message_index' => 'Message log',
'message_delete' => 'Message delete',
'message_detail' => 'Message details',
Expand Down
Loading

0 comments on commit 3aa9568

Please sign in to comment.