当前位置:网站首页>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 !');
}
}
边栏推荐
- 《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!
- OpenShift常用管理命令杂记
- Daily exercise: a series of dates
- Can communication of nano
- 破解湖+仓混合架构顽疾,星环科技推出自主可控云原生湖仓一体平台
- [PM2 details]
- buuctf-pwn write-ups (9)
- Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)
- Wu Enda team 2022 machine learning course, coming
- Leetcode daily practice: rotating arrays
猜你喜欢

图像分类,看我就够啦!

IDC report: Tencent cloud database ranks top 2 in the relational database market!

Find the first k small element select_ k

Record a case of using WinDbg to analyze memory "leakage"

Elk log analysis system

About Estimation with Cross-Validation

分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载

Sophon AutoCV:助力AI工业化生产,实现视觉智能感知

瀚升优品app翰林优商系统开发功能介绍

U-Net: Convolutional Networks for Biomedical Images Segmentation
随机推荐
Leetcode notes: Weekly contest 300
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
文章中的逻辑词
分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载
Operation before or after Teamcenter message registration
Introduction to Resampling
JVM第三话 -- JVM性能调优实战和高频面试题记录
Numerical calculation method chapter8 Numerical solutions of ordinary differential equations
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
[utiliser Electron pour développer le Bureau sur youkirin devrait]
Multithreading (I) processes and threads
Generate classes from XML schema
[paddleclas] common commands
ClickHouse(03)ClickHouse怎么安装和部署
Elk log analysis system
What are the requirements for PMP certification? How much is it?
图像分类,看我就够啦!
开户复杂吗?网上开户安全么?
Tupu software digital twin | visual management system based on BIM Technology
[TestLink] testlink1.9.18 solutions to common problems