当前位置:网站首页>Introduction to the development function of Hanlin Youshang system of Hansheng Youpin app
Introduction to the development function of Hanlin Youshang system of Hansheng Youpin app
2022-07-05 18:10:00 【weixin_ two billion forty-seven million six hundred and seventy】
Recently, a new set of ( Hansheng premium products app) Hanlin Youshang system , Its main functions are mall system , Member system , Mission system , Payment system , Points management system , Online consultation system and so on .
Hansheng premium products app characteristic :
1、 Select Meifu online special mobile shopping software , Update all kinds of activity offers and welfare products in real time .
2、 Constantly search for a large number of low-cost goods through Premium software , Select high-quality goods with many discounts .
3、 Bring more high-quality online shopping experience to consumers , Rich and good goods, buy at a low price, save money and rest assured .
Hansheng premium products app advantage :
1、 There are a wide range of goods, good quality and low price , Let you rest assured to buy good goods .
2、 Mobile social e-commerce APP, It aims to select high-quality products with high cost performance for users .
3、 Products related to food 、 beauty 、 clothing 、 Maternal and infant 、 Daily necessities and other fields .
Hansheng premium products app Bright spot :
1、 The latest and most comprehensive shopping experience will not disappoint you , Everyone can try .
2、 Everyone can buy good goods suitable for themselves , The above discounts and rewards are quite comprehensive .
3、 Feel free to experience , So many discounts won't let you go home empty handed , You can come together .
Hansheng premium products app Small make up comment on :
1、 The update of various commodities is still very timely , You can see all kinds of new product information every day ;
2、 There are no restrictions on direct mobile online orders , All the goods have been checked by specially assigned personnel ;
3、 You can also get coupons through this platform , As long as you place an order, you can directly deduct .
Han Sheng Superior products app System development source code sharing :
<?php
namespace app\admin\controller\article;
use think\facade\Route as Url;
use app\admin\controller\AuthController;
use app\admin\model\system\SystemAttachment;
use app\admin\model\article\{ArticleCategory as ArticleCategoryModel,Article as ArticleModel};
use crmeb\services\{FormBuilder as Form,UtilService as Util,JsonService as Json};
/**
* Article classification management controller
* */
class ArticleCategory extends AuthController
{
/**
* Classification management
* */
public function index()
{
$where = Util::getMore([
['status', ''],
['title', ''],
], $this->request);
$this->assign('where', $where);
$this->assign(ArticleCategoryModel::systemPage($where));
return $this->fetch();
}
/**
* Add Category Management
* */
public function create()
{
$f = array();
$f[] = Form::select('pid', ' Parent id')->setOptions(function () {
$list = ArticleCategoryModel::getTierList();
$menus[] = ['value' => 0, 'label' => ' Top class '];
foreach ($list as $menu) {
$menus[] = ['value' => $menu['id'], 'label' => $menu['html'] . $menu['title']];
}
return $menus;
})->filterable(1);
$f[] = Form::input('title', ' Category name ');
$f[] = Form::input('intr', ' Classification introduction ')->type('textarea');
$f[] = Form::frameImageOne('image', ' Sort of pictures ', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')))->icon('image')->width('100%')->height('500px');
$f[] = Form::number('sort', ' Sort ', 0);
$f[] = Form::radio('status', ' state ', 1)->options([['value' => 1, 'label' => ' Show '], ['value' => 0, 'label' => ' hide ']]);
$form = Form::make_post_form(' Add categories ', $f, Url::buildUrl('save'));
$this->assign(compact('form'));
return $this->fetch('public/form-builder');
}
/**
* s To upload pictures
* */
public function upload()
{
$res = Upload::instance()->setUploadPath('article')->image('file');
if (!is_array($res)) return Json::fail($res);
SystemAttachment::attachmentAdd($res['name'], $res['size'], $res['type'], $res['dir'], $res['thumb_path'], 5, $res['image_type'], $res['time']);
return Json::successful(' Image upload succeeded !', ['name' => $res['name'], 'url' => path_to_url($res['thumb_path'])]);
}
/**
* Save classification management
* */
public function save()
{
$data = Util::postMore([
'title',
'pid',
'intr',
['new_id', []],
['image', []],
['sort', 0],
'status',]);
if (!$data['title']) return Json::fail(' Please enter the classification name ');
if (count($data['image']) != 1) return Json::fail(' Please select a category picture , And you can only upload one ');
if ($data['sort'] < 0) return Json::fail(' Sorting cannot be negative ');
$data['add_time'] = time();
$data['image'] = $data['image'][0];
$new_id = $data['new_id'];
unset($data['new_id']);
$res = ArticleCategoryModel::create($data);
if (!ArticleModel::saveBatchCid($res['id'], implode(',', $new_id))) return Json::fail(' Failed to add the article list ');
return Json::successful(' Category added successfully !');
}
/**
* Modify the classification
* */
public function edit($id)
{
if (!$id) return $this->failed(' Parameter error ');
$article = ArticleCategoryModel::get($id)->getData();
if (!$article) return Json::fail(' The data doesn't exist !');
$f = array();
$f[] = Form::select('pid', ' Parent id', (string)$article['pid'])->setOptions(function () {
$list = ArticleCategoryModel::getTierList();
$menus[] = ['value' => 0, 'label' => ' Top class '];
foreach ($list as $menu) {
$menus[] = ['value' => $menu['id'], 'label' => $menu['html'] . $menu['title']];
}
return $menus;
})->filterable(1);
$f[] = Form::input('title', ' Category name ', $article['title']);
$f[] = Form::input('intr', ' Classification introduction ', $article['intr'])->type('textarea');
$f[] = Form::frameImageOne('image', ' Sort of pictures ', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')), $article['image'])->icon('image')->width('100%')->height('500px');
$f[] = Form::number('sort', ' Sort ', $article['sort']);
$f[] = Form::radio('status', ' state ', $article['status'])->options([['value' => 1, 'label' => ' Show '], ['value' => 0, 'label' => ' hide ']]);
$form = Form::make_post_form(' Edit category ', $f, Url::buildUrl('update', array('id' => $id)));
$this->assign(compact('form'));
return $this->fetch('public/form-builder');
}
public function update($id)
{
$data = Util::postMore([
'pid',
'title',
'intr',
// ['new_id',[]],
['image', []],
['sort', 0],
'status',]);
if (!$data['title']) return Json::fail(' Please enter the classification name ');
if (count($data['image']) != 1) return Json::fail(' Please select a category picture , And you can only upload one ');
if ($data['sort'] < 0) return Json::fail(' Sorting cannot be negative ');
$data['image'] = $data['image'][0];
if (!ArticleCategoryModel::get($id)) return Json::fail(' The edited record does not exist !');
// if(!ArticleModel::saveBatchCid($id,implode(',',$data['new_id']))) return Json::fail(' Failed to add the article list ');
// unset($data['new_id']);
ArticleCategoryModel::edit($data, $id);
return Json::successful(' Modification successful !');
}
/**
* Delete category
* */
public function delete($id)
{
$res = ArticleCategoryModel::delArticleCategory($id);
if (!$res)
return Json::fail(ArticleCategoryModel::getErrorInfo(' Delete failed , Please try again later !'));
else
return Json::successful(' Delete successful !');
}
}
边栏推荐
- nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
- Configure pytorch environment in Anaconda - win10 system (small white packet meeting)
- [JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business
- Star ring technology data security management platform defender heavy release
- pytorch yolov5 训练自定义数据
- 从XML架构生成类
- GFS distributed file system
- The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
- 怎么选择外盘期货平台最正规安全?
- 使用JMeter录制脚本并调试
猜你喜欢
Zabbix
Star Ring Technology launched transwarp Navier, a data element circulation platform, to help enterprises achieve secure data circulation and collaboration under privacy protection
What are the requirements for PMP certification? How much is it?
Configure pytorch environment in Anaconda - win10 system (small white packet meeting)
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
记录Pytorch中的eval()和no_grad()
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
Wu Enda team 2022 machine learning course, coming
FCN: Fully Convolutional Networks for Semantic Segmentation
Find the first k small element select_ k
随机推荐
Eliminate the writing of 'if () else{}'
Penetrate the whole intranet through socks agent
开户复杂吗?网上开户安全么?
What are the requirements for PMP certification? How much is it?
Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)
[PM2 details]
buuctf-pwn write-ups (9)
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
登录连接 CDB 和 PDB
Numerical calculation method chapter8 Numerical solutions of ordinary differential equations
图片数据不够?我做了一个免费的图像增强软件
Tkinter window preload
Let more young people from Hong Kong and Macao know about Nansha's characteristic cultural and creative products! "Nansha kylin" officially appeared
[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business
使用Jmeter虚拟化table失败
Sophon autocv: help AI industrial production and realize visual intelligent perception
Action avant ou après l'enregistrement du message teamcenter
写作写作写作写作
JDBC reads a large amount of data, resulting in memory overflow
ISPRS2022/云检测:Cloud detection with boundary nets基于边界网的云检测