mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-04 04:49:33 +08:00
hoe
This commit is contained in:
parent
98a7c55a1c
commit
bd8e395564
@ -44,8 +44,8 @@ App({
|
||||
},
|
||||
|
||||
// 请求地址
|
||||
request_url: "http://demo.shopxo.net/",
|
||||
request_url: 'http://default.com/project/shopxo/service/',
|
||||
//request_url: "http://demo.shopxo.net/",
|
||||
request_url: 'http://localhost/project/shopxo/service/',
|
||||
|
||||
// 基础信息
|
||||
application_title: "ShopXO电商系统",
|
||||
@ -427,5 +427,49 @@ App({
|
||||
s_x += "0";
|
||||
}
|
||||
return s_x;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 价格保留两位小数
|
||||
* price 价格保留两位小数
|
||||
*/
|
||||
operation_event(e) {
|
||||
var value = e.target.dataset.value || null;
|
||||
var type = parseInt(e.target.dataset.type);
|
||||
|
||||
console.log(value, type)
|
||||
if (value != null) {
|
||||
switch(type) {
|
||||
// web
|
||||
case 0 :
|
||||
my.navigateTo({url: '/pages/web-view/web-view?url='+value});
|
||||
break;
|
||||
|
||||
// 内部页面
|
||||
case 1 :
|
||||
my.navigateTo({url: value});
|
||||
break;
|
||||
|
||||
// 跳转到外部小程序
|
||||
case 2 :
|
||||
my.navigateToMiniProgram({appId: value});
|
||||
break;
|
||||
|
||||
// 跳转到地图查看位置
|
||||
case 3 :
|
||||
my.openLocation({
|
||||
longitude: '121.549697',
|
||||
latitude: '31.227250',
|
||||
name: '支付宝',
|
||||
address: '杨高路地铁站',
|
||||
});
|
||||
break;
|
||||
|
||||
// 拨打电话
|
||||
case 4 :
|
||||
my.makePhoneCall({ number: value });
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -39,7 +39,7 @@
|
||||
"pagePath": "pages/answer-list/answer-list",
|
||||
"icon": "/images/nav-icon-answer.png",
|
||||
"activeIcon": "/images/nav-icon-answer-active.png",
|
||||
"name": "问答"
|
||||
"name": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/user",
|
||||
|
@ -1,22 +0,0 @@
|
||||
.category-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
.category-list .items {
|
||||
width: 25%;
|
||||
padding-bottom: 20rpx;
|
||||
float: left;
|
||||
}
|
||||
.items-content {
|
||||
margin: 20rpx;
|
||||
}
|
||||
.category-list .items:nth-child(4n+1) {
|
||||
|
||||
}
|
||||
.category-list .items image {
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
}
|
||||
.category-list .items .title {
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<view a:if="{{category_list.length > 0}}">
|
||||
<view class="category-list">
|
||||
<view class="items" a:for="{{category_list}}">
|
||||
<view class="items-content" style="background-color:{{item.bg_color}}">
|
||||
<navigator url="/pages/goods-search/goods-search?category_id={{item.id}}" hover-class="none">
|
||||
<image class="wh-auto" src="{{item.icon}}" mode="aspectFit" />
|
||||
<view class="title tc single-text">{{item.name}}</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view a:if="{{category_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
</view>
|
@ -5,15 +5,15 @@
|
||||
autoplay="{{autoplay}}"
|
||||
circular="{{circular}}"
|
||||
class="banner bg-white spacing-mb"
|
||||
a:if="{{banner_list.length > 0}}">
|
||||
<block a:for="{{banner_list}}">
|
||||
a:if="{{data_list.length > 0}}">
|
||||
<block a:for="{{data_list}}">
|
||||
<swiper-item>
|
||||
<image class="wh-auto" src="{{item.images_url}}" mode="widthFix" data-value="{{item.jump_url}}" data-type="{{item.jump_url_type}}" onTap="banner_event" />
|
||||
<image class="wh-auto" src="{{item.images_url}}" mode="widthFix" data-value="{{item.event_value}}" data-type="{{item.event_type}}" onTap="banner_event" />
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
|
||||
<view a:if="{{banner_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
<view a:if="{{data_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
</view>
|
@ -9,7 +9,7 @@ Component({
|
||||
circular: true,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
banner_list: [],
|
||||
data_list: [],
|
||||
},
|
||||
props: {},
|
||||
didMount() {
|
||||
@ -27,7 +27,7 @@ Component({
|
||||
|
||||
// 加载loding
|
||||
my.httpRequest({
|
||||
url: app.get_request_url("Banner", "Index"),
|
||||
url: app.get_request_url("HomeBanner", "Resources"),
|
||||
method: "POST",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
@ -35,7 +35,7 @@ Component({
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
banner_list: data,
|
||||
data_list: data,
|
||||
indicator_dots: (data.length > 1),
|
||||
autoplay: (data.length > 1),
|
||||
data_list_loding_status: data.length == 0 ? 0 : 3,
|
||||
@ -67,28 +67,9 @@ Component({
|
||||
});
|
||||
},
|
||||
|
||||
// 轮播图事件
|
||||
// 操作事件
|
||||
banner_event(e) {
|
||||
var value = e.target.dataset.value || null;
|
||||
var type = parseInt(e.target.dataset.type);
|
||||
if (value != null) {
|
||||
switch(type) {
|
||||
// web
|
||||
case 0 :
|
||||
my.navigateTo({url: '/pages/web-view/web-view?url='+value});
|
||||
break;
|
||||
|
||||
// 内部页面
|
||||
case 1 :
|
||||
my.navigateTo({url: value});
|
||||
break;
|
||||
|
||||
// 跳转到外部小程序
|
||||
case 2 :
|
||||
my.navigateToMiniProgram({appId: value});
|
||||
break;
|
||||
}
|
||||
}
|
||||
app.operation_event(e);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
21
alipay/components/home-nav/home-nav.acss
Executable file
21
alipay/components/home-nav/home-nav.acss
Executable file
@ -0,0 +1,21 @@
|
||||
.data-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
.data-list .items {
|
||||
width: calc(25% - 40rpx);
|
||||
float: left;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.items-content {
|
||||
border-radius: 50%;
|
||||
padding: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.data-list .items image {
|
||||
width: 80rpx !important;
|
||||
height: 80rpx !important;
|
||||
}
|
||||
.data-list .items .title {
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
15
alipay/components/home-nav/home-nav.axml
Normal file
15
alipay/components/home-nav/home-nav.axml
Normal file
@ -0,0 +1,15 @@
|
||||
<view a:if="{{data_list.length > 0}}">
|
||||
<view class="data-list">
|
||||
<view class="items" a:for="{{data_list}}">
|
||||
<view class="items-content" style="background-color:{{item.bg_color}}" data-value="{{item.event_value}}" data-type="{{item.event_type}}" onTap="nav_event">
|
||||
<image class="wh-auto" src="{{item.images_url}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="title tc single-text">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view a:if="{{data_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
</view>
|
@ -5,7 +5,7 @@ Component({
|
||||
data: {
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
category_list: [],
|
||||
data_list: [],
|
||||
},
|
||||
didMount() {
|
||||
this.init();
|
||||
@ -21,7 +21,7 @@ Component({
|
||||
|
||||
// 加载loding
|
||||
my.httpRequest({
|
||||
url: app.get_request_url("GoodsCategoryNav", "Index"),
|
||||
url: app.get_request_url("HomeNav", "Resources"),
|
||||
method: "POST",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
@ -29,7 +29,7 @@ Component({
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
category_list: data,
|
||||
data_list: data,
|
||||
data_list_loding_status: data.length == 0 ? 0 : 3,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
@ -58,5 +58,10 @@ Component({
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 操作事件
|
||||
nav_event(e) {
|
||||
app.operation_event(e);
|
||||
},
|
||||
}
|
||||
});
|
@ -0,0 +1,72 @@
|
||||
.floor {
|
||||
|
||||
}
|
||||
.floor, .floor-list, .floor-left {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.floor .nav-name {
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.floor .vice-name {
|
||||
top: 20rpx;
|
||||
left: 20rpx;
|
||||
}
|
||||
.floor-left {
|
||||
width: 40%;
|
||||
float: left;
|
||||
height: 660rpx;
|
||||
}
|
||||
.floor-left image {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.floor .vice-name,
|
||||
.floor-left image,
|
||||
.goods-list .goods:nth-child(1),
|
||||
.goods-list .goods:nth-child(2) {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.goods-list .goods {
|
||||
height: 330rpx;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
.goods-list .goods image {
|
||||
width: 100%;
|
||||
}
|
||||
.goods-list .goods:nth-child(1),
|
||||
.goods-list .goods:nth-child(2) {
|
||||
width: 60%;
|
||||
}
|
||||
.goods-list .goods:nth-child(1) .goods-base,
|
||||
.goods-list .goods:nth-child(2) .goods-base {
|
||||
float: left;
|
||||
}
|
||||
.goods-list .goods:nth-child(1) image,
|
||||
.goods-list .goods:nth-child(2) image {
|
||||
width: 60%;
|
||||
float: right;
|
||||
}
|
||||
.goods-list .goods:nth-child(1) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.goods-list .goods:nth-child(2) {
|
||||
top: 330rpx;
|
||||
right: 0;
|
||||
}
|
||||
.goods-list .goods:nth-child(3),
|
||||
.goods-list .goods:nth-child(4),
|
||||
.goods-list .goods:nth-child(5),
|
||||
.goods-list .goods:nth-child(6) {
|
||||
margin-top: 330rpx;
|
||||
width: 50%;
|
||||
}
|
@ -1,25 +1,34 @@
|
||||
<!-- 轮播 -->
|
||||
<component-home-banner />
|
||||
<component-goods-category-nav />
|
||||
|
||||
<!-- 导航 -->
|
||||
<component-home-nav />
|
||||
|
||||
<!-- <view class="spacing-nav-title">
|
||||
<text class="line"></text>
|
||||
<text class="text-wrapper">商品分类</text>
|
||||
</view>
|
||||
<view class="category-list">
|
||||
<view class="items bg-white" a:for="{{category_list}}" a:if="{{item.is_home_recommended == 1}}">
|
||||
<navigator url="/pages/goods-search/goods-search?category_id={{item.id}}" hover-class="none">
|
||||
<image class="wh-auto" src="{{item.big_images}}" mode="aspectFit" />
|
||||
<view class="title tc single-text">{{item.name}}</view>
|
||||
</navigator>
|
||||
<!-- 楼层数据 -->
|
||||
|
||||
<block a:if="{{data_list.length > 0}}">
|
||||
<view a:for="{{data_list}}" a:for-item="floor" class="floor">
|
||||
<view class="nav-name">
|
||||
{{floor.name}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="floor-list" style="background-color:{{floor.bg_color}}">
|
||||
<view class="floor-left">
|
||||
<view class="vice-name">{{floor.vice_name}}</view>
|
||||
<image src="{{floor.big_images}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="goods-list" a:if="{{floor.goods.length > 0}}">
|
||||
<view a:for="{{floor.goods}}" a:for-item="goods" class="goods">
|
||||
<image src="{{goods.home_recommended_images}}" mode="aspectFit" />
|
||||
<view class="goods-base">
|
||||
<view class="goods-itle">{{goods.title}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
<view a:if="{{category_list.length == 0}}">
|
||||
<import src="/pages/common/nodata.axml" />
|
||||
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
|
||||
</view>
|
||||
|
||||
<view a:if="{{load_status == 1}}" class="spacing-10">
|
||||
<navigator url="/pages/answer-form/answer-form" hover-class="none" class="bg-white">
|
||||
@ -27,9 +36,5 @@
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view a:if="{{load_status == 1}}" class="customer-service" onTap="call_event">
|
||||
<image src="/images/customer-service-icon.png" mode="scaleToFill" />
|
||||
</view>
|
||||
|
||||
<import src="/pages/common/bottom_line.axml" />
|
||||
<template is="bottom_line" data="{{status: data_bottom_line_status}}"></template>
|
||||
|
@ -8,14 +8,7 @@ Page({
|
||||
circular: true,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
|
||||
banner_list: [],
|
||||
category_list: [],
|
||||
cart_count: 0,
|
||||
username: null,
|
||||
nickname: null,
|
||||
customer_service_tel: null,
|
||||
|
||||
data_list: [],
|
||||
load_status: 0,
|
||||
},
|
||||
|
||||
@ -45,15 +38,10 @@ Page({
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
self.setData({
|
||||
banner_list: data.banner,
|
||||
indicator_dots: (data.banner.length > 1),
|
||||
autoplay: (data.banner.length > 1),
|
||||
category_list: data.category,
|
||||
cart_count: data.cart_count,
|
||||
username: data.username,
|
||||
nickname: data.nickname,
|
||||
customer_service_tel: data.customer_service_tel,
|
||||
data_list_loding_status: data.category.length == 0 ? 0 : 3,
|
||||
data_list: data,
|
||||
indicator_dots: (data.length > 1),
|
||||
autoplay: (data.length > 1),
|
||||
data_list_loding_status: data.length == 0 ? 0 : 3,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
} else {
|
||||
@ -84,48 +72,11 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
// 轮播图事件
|
||||
banner_event(e) {
|
||||
var value = e.target.dataset.value || null;
|
||||
var type = parseInt(e.target.dataset.type);
|
||||
if (value != null) {
|
||||
switch(type) {
|
||||
// web
|
||||
case 0 :
|
||||
my.navigateTo({url: '/pages/web-view/web-view?url='+value});
|
||||
break;
|
||||
|
||||
// 内部页面
|
||||
case 1 :
|
||||
my.navigateTo({url: value});
|
||||
break;
|
||||
|
||||
// 跳转到外部小程序
|
||||
case 2 :
|
||||
my.navigateToMiniProgram({appId: value});
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 客服电话
|
||||
call_event() {
|
||||
if(this.data.customer_service_tel == null)
|
||||
{
|
||||
my.showToast({
|
||||
type: "fail",
|
||||
content: "客服电话有误"
|
||||
});
|
||||
} else {
|
||||
my.makePhoneCall({ number: this.data.customer_service_tel });
|
||||
}
|
||||
},
|
||||
|
||||
// 自定义分享
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"pullRefresh": true,
|
||||
"usingComponents": {
|
||||
"component-goods-category-nav": "/components/goods-category-nav/goods-category-nav",
|
||||
"component-home-nav": "/components/home-nav/home-nav",
|
||||
"component-home-banner": "/components/home-banner/home-banner"
|
||||
}
|
||||
}
|
@ -59,7 +59,7 @@ class AppHomeNavController extends CommonController
|
||||
$page = new \Library\Page($page_param);
|
||||
|
||||
// 获取列表
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('is_enable desc, id desc')->select());
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('is_enable desc, sort asc')->select());
|
||||
|
||||
// 参数
|
||||
$this->assign('param', $param);
|
||||
@ -209,30 +209,7 @@ class AppHomeNavController extends CommonController
|
||||
}
|
||||
|
||||
// 图片
|
||||
if(!empty($_FILES['file_images_url']))
|
||||
{
|
||||
// 文件上传校验
|
||||
$error = FileUploadError('file_images_url');
|
||||
if($error !== true)
|
||||
{
|
||||
$this->ajaxReturn($error, -1);
|
||||
}
|
||||
|
||||
// 文件类型
|
||||
list($type, $suffix) = explode('/', $_FILES['file_images_url']['type']);
|
||||
$path = 'Public'.DS.'Upload'.DS.'app_home_nav'.DS.date('Y').DS.date('m').DS;
|
||||
if(!is_dir($path))
|
||||
{
|
||||
mkdir(ROOT_PATH.$path, 0777, true);
|
||||
}
|
||||
$filename = date('YmdHis').GetNumberCode(6).'.'.$suffix;
|
||||
$file_images_url = $path.$filename;
|
||||
|
||||
if(move_uploaded_file($_FILES['file_images_url']['tmp_name'], ROOT_PATH.$file_images_url))
|
||||
{
|
||||
$_POST['images_url'] = DS.$file_images_url;
|
||||
}
|
||||
}
|
||||
$this->FileSave('images_url', 'file_images_url', 'app_home_nav');
|
||||
|
||||
// 添加
|
||||
if(empty($_POST['id']))
|
||||
@ -263,11 +240,12 @@ class AppHomeNavController extends CommonController
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->event_type = intval(I('event_type'));
|
||||
$m->event_type = intval(I('event_type', -1));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->bg_color = I('bg_color');
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->add_time = time();
|
||||
|
||||
// 数据添加
|
||||
@ -300,11 +278,12 @@ class AppHomeNavController extends CommonController
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->event_type = intval(I('event_type'));
|
||||
$m->event_type = intval(I('event_type', -1));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->bg_color = I('bg_color');
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->upd_time = time();
|
||||
|
||||
// 更新数据库
|
||||
|
61
service/Application/Admin/Controller/AppMiniAlipayConfigController.class.php
Executable file
61
service/Application/Admin/Controller/AppMiniAlipayConfigController.class.php
Executable file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 支付宝小程序 - 配置
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AppMiniAlipayConfigController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 配置列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 配置信息
|
||||
$data = M('Config')->getField('only_tag,name,describe,value,error_tips');
|
||||
$this->assign('data', $data);
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 配置数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-02T23:08:19+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
$this->MyConfigSave();
|
||||
}
|
||||
}
|
||||
?>
|
369
service/Application/Admin/Controller/AppSlideController.class.php
Executable file
369
service/Application/Admin/Controller/AppSlideController.class.php
Executable file
@ -0,0 +1,369 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 手机管理-轮播图片管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AppSlideController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 手机管理-轮播图片列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 参数
|
||||
$param = array_merge($_POST, $_GET);
|
||||
|
||||
// 模型对象
|
||||
$m = M('AppSlide');
|
||||
|
||||
// 条件
|
||||
$where = $this->GetIndexWhere();
|
||||
|
||||
// 分页
|
||||
$number = MyC('admin_page_number');
|
||||
$page_param = array(
|
||||
'number' => $number,
|
||||
'total' => $m->where($where)->count(),
|
||||
'where' => $param,
|
||||
'url' => U('Admin/AppSlide/Index'),
|
||||
);
|
||||
$page = new \Library\Page($page_param);
|
||||
|
||||
// 获取列表
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('is_enable desc, sort asc')->select());
|
||||
|
||||
// 参数
|
||||
$this->assign('param', $param);
|
||||
|
||||
// 分页
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 是否启用
|
||||
$this->assign('common_is_enable_list', L('common_is_enable_list'));
|
||||
|
||||
// 所属平台
|
||||
$this->assign('common_platform_type', L('common_platform_type'));
|
||||
|
||||
// 事件类型
|
||||
$this->assign('common_app_event_type', L('common_app_event_type'));
|
||||
|
||||
// 数据列表
|
||||
$this->assign('list', $list);
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [SetDataHandle 数据处理]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-29T21:27:15+0800
|
||||
* @param [array] $data [手机管理-轮播图片数据]
|
||||
* @return [array] [处理好的数据]
|
||||
*/
|
||||
private function SetDataHandle($data)
|
||||
{
|
||||
if(!empty($data))
|
||||
{
|
||||
$common_platform_type = L('common_platform_type');
|
||||
$common_is_enable_tips = L('common_is_enable_tips');
|
||||
$common_app_event_type = L('common_app_event_type');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
$v['is_enable_text'] = $common_is_enable_tips[$v['is_enable']]['name'];
|
||||
|
||||
// 平台类型
|
||||
$v['platform_text'] = $common_platform_type[$v['platform']]['name'];
|
||||
|
||||
// 事件类型
|
||||
$v['event_type_text'] = $common_app_event_type[$v['event_type']]['name'];
|
||||
|
||||
// 图片地址
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : C('IMAGE_HOST').$v['images_url'];
|
||||
|
||||
// 添加时间
|
||||
$v['add_time_text'] = date('Y-m-d H:i:s', $v['add_time']);
|
||||
|
||||
// 更新时间
|
||||
$v['upd_time_text'] = date('Y-m-d H:i:s', $v['upd_time']);
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetIndexWhere 列表条件]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T22:16:29+0800
|
||||
*/
|
||||
private function GetIndexWhere()
|
||||
{
|
||||
$where = array();
|
||||
|
||||
// 模糊
|
||||
if(!empty($_REQUEST['keyword']))
|
||||
{
|
||||
$where['name'] = array('like', '%'.I('keyword').'%');
|
||||
}
|
||||
|
||||
// 是否更多条件
|
||||
if(I('is_more', 0) == 1)
|
||||
{
|
||||
if(I('is_enable', -1) > -1)
|
||||
{
|
||||
$where['is_enable'] = intval(I('is_enable', 0));
|
||||
}
|
||||
if(I('event_type', -1) > -1)
|
||||
{
|
||||
$where['event_type'] = intval(I('event_type', 0));
|
||||
}
|
||||
if(!empty($_REQUEST['platform']))
|
||||
{
|
||||
$where['platform'] = I('platform');
|
||||
}
|
||||
|
||||
// 表达式
|
||||
if(!empty($_REQUEST['time_start']))
|
||||
{
|
||||
$where['add_time'][] = array('gt', strtotime(I('time_start')));
|
||||
}
|
||||
if(!empty($_REQUEST['time_end']))
|
||||
{
|
||||
$where['add_time'][] = array('lt', strtotime(I('time_end')));
|
||||
}
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
* [SaveInfo 添加/编辑页面]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-14T21:37:02+0800
|
||||
*/
|
||||
public function SaveInfo()
|
||||
{
|
||||
// 手机管理-轮播图片信息
|
||||
$data = empty($_REQUEST['id']) ? array() : M('AppSlide')->find(I('id'));
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 所属平台
|
||||
$this->assign('common_platform_type', L('common_platform_type'));
|
||||
|
||||
// 事件类型
|
||||
$this->assign('common_app_event_type', L('common_app_event_type'));
|
||||
|
||||
// 参数
|
||||
$this->assign('param', array_merge($_POST, $_GET));
|
||||
|
||||
$this->display('SaveInfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 手机管理-轮播图片添加/编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-14T21:37:02+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 图片
|
||||
$this->FileSave('images_url', 'file_images_url', 'app_slide');
|
||||
|
||||
// 添加
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
$this->Add();
|
||||
|
||||
// 编辑
|
||||
} else {
|
||||
$this->Edit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Add 手机管理-轮播图片添加]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-18T16:20:59+0800
|
||||
*/
|
||||
private function Add()
|
||||
{
|
||||
// 手机管理-轮播图片模型
|
||||
$m = D('AppSlide');
|
||||
|
||||
// 数据自动校验
|
||||
if($m->create($_POST, 1))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->event_type = intval(I('event_type', -1));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->add_time = time();
|
||||
|
||||
// 数据添加
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Edit 手机管理-轮播图片编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-17T22:13:40+0800
|
||||
*/
|
||||
private function Edit()
|
||||
{
|
||||
// 手机管理-轮播图片模型
|
||||
$m = D('AppSlide');
|
||||
|
||||
// 数据自动校验
|
||||
if($m->create($_POST, 2))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->event_type = intval(I('event_type', -1));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->upd_time = time();
|
||||
|
||||
// 更新数据库
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 手机管理-轮播图片删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-15T11:03:30+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 参数处理
|
||||
$id = I('id');
|
||||
|
||||
// 删除数据
|
||||
if(!empty($id))
|
||||
{
|
||||
// 模型
|
||||
$m = M('AppSlide');
|
||||
|
||||
// 是否存在
|
||||
$data = $m->find($id);
|
||||
if(empty($data))
|
||||
{
|
||||
$this->ajaxReturn(L('common_data_no_exist_error'), -2);
|
||||
}
|
||||
if($data['is_enable'] == 1)
|
||||
{
|
||||
$this->ajaxReturn(L('common_already_is_enable_error'), -3);
|
||||
}
|
||||
|
||||
// 删除
|
||||
if($m->where(array('id'=>$id))->delete() !== false)
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('AppSlide')->where(array('id'=>I('id')))->save(array('is_enable'=>I('state'))))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
@ -39,10 +39,6 @@ class ConfigController extends CommonController
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 学期
|
||||
$semester_list = M('Semester')->field(array('id', 'name'))->where(array('is_enable'=>1))->order('id desc')->select();
|
||||
$this->assign('semester_list', $semester_list);
|
||||
|
||||
// csv
|
||||
$this->assign('common_excel_charset_list', L('common_excel_charset_list'));
|
||||
|
||||
|
@ -59,7 +59,7 @@ class SlideController extends CommonController
|
||||
$page = new \Library\Page($page_param);
|
||||
|
||||
// 获取列表
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('is_enable desc, id desc')->select());
|
||||
$list = $this->SetDataHandle($m->where($where)->limit($page->GetPageStarNumber(), $number)->order('is_enable desc, sort asc')->select());
|
||||
|
||||
// 参数
|
||||
$this->assign('param', $param);
|
||||
@ -70,12 +70,6 @@ class SlideController extends CommonController
|
||||
// 是否启用
|
||||
$this->assign('common_is_enable_list', L('common_is_enable_list'));
|
||||
|
||||
// 所属平台
|
||||
$this->assign('common_platform_type', L('common_platform_type'));
|
||||
|
||||
// 跳转类型
|
||||
$this->assign('common_jump_url_type', L('common_jump_url_type'));
|
||||
|
||||
// 数据列表
|
||||
$this->assign('list', $list);
|
||||
$this->display('Index');
|
||||
@ -94,20 +88,12 @@ class SlideController extends CommonController
|
||||
{
|
||||
if(!empty($data))
|
||||
{
|
||||
$common_platform_type = L('common_platform_type');
|
||||
$common_is_enable_tips = L('common_is_enable_tips');
|
||||
$common_jump_url_type = L('common_jump_url_type');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 是否启用
|
||||
$v['is_enable_text'] = $common_is_enable_tips[$v['is_enable']]['name'];
|
||||
|
||||
// 平台类型
|
||||
$v['platform_text'] = $common_platform_type[$v['platform']]['name'];
|
||||
|
||||
// 跳转类型
|
||||
$v['jump_url_type_text'] = $common_jump_url_type[$v['jump_url_type']]['name'];
|
||||
|
||||
// 图片地址
|
||||
$v['images_url'] = empty($v['images_url']) ? '' : C('IMAGE_HOST').$v['images_url'];
|
||||
|
||||
@ -145,14 +131,6 @@ class SlideController extends CommonController
|
||||
{
|
||||
$where['is_enable'] = intval(I('is_enable', 0));
|
||||
}
|
||||
if(I('jump_url_type', -1) > -1)
|
||||
{
|
||||
$where['jump_url_type'] = intval(I('jump_url_type', 0));
|
||||
}
|
||||
if(!empty($_REQUEST['platform']))
|
||||
{
|
||||
$where['platform'] = I('platform');
|
||||
}
|
||||
|
||||
// 表达式
|
||||
if(!empty($_REQUEST['time_start']))
|
||||
@ -180,12 +158,6 @@ class SlideController extends CommonController
|
||||
$data = empty($_REQUEST['id']) ? array() : M('Slide')->find(I('id'));
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 所属平台
|
||||
$this->assign('common_platform_type', L('common_platform_type'));
|
||||
|
||||
// 跳转类型
|
||||
$this->assign('common_jump_url_type', L('common_jump_url_type'));
|
||||
|
||||
// 参数
|
||||
$this->assign('param', array_merge($_POST, $_GET));
|
||||
|
||||
@ -208,30 +180,7 @@ class SlideController extends CommonController
|
||||
}
|
||||
|
||||
// 图片
|
||||
if(!empty($_FILES['file_images_url']))
|
||||
{
|
||||
// 文件上传校验
|
||||
$error = FileUploadError('file_images_url');
|
||||
if($error !== true)
|
||||
{
|
||||
$this->ajaxReturn($error, -1);
|
||||
}
|
||||
|
||||
// 文件类型
|
||||
list($type, $suffix) = explode('/', $_FILES['file_images_url']['type']);
|
||||
$path = 'Public'.DS.'Upload'.DS.'slide'.DS.date('Y').DS.date('m').DS;
|
||||
if(!is_dir($path))
|
||||
{
|
||||
mkdir(ROOT_PATH.$path, 0777, true);
|
||||
}
|
||||
$filename = date('YmdHis').GetNumberCode(6).'.'.$suffix;
|
||||
$file_images_url = $path.$filename;
|
||||
|
||||
if(move_uploaded_file($_FILES['file_images_url']['tmp_name'], ROOT_PATH.$file_images_url))
|
||||
{
|
||||
$_POST['images_url'] = DS.$file_images_url;
|
||||
}
|
||||
}
|
||||
$this->FileSave('images_url', 'file_images_url', 'slide');
|
||||
|
||||
// 添加
|
||||
if(empty($_POST['id']))
|
||||
@ -262,11 +211,10 @@ class SlideController extends CommonController
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->jump_url_type = intval(I('jump_url_type'));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->bg_color = I('bg_color');
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->add_time = time();
|
||||
|
||||
// 数据添加
|
||||
@ -299,11 +247,10 @@ class SlideController extends CommonController
|
||||
// 额外数据处理
|
||||
$m->name = I('name');
|
||||
$m->jump_url = I('jump_url');
|
||||
$m->jump_url_type = intval(I('jump_url_type'));
|
||||
$m->images_url = I('images_url');
|
||||
$m->platform = I('platform');
|
||||
$m->is_enable = intval(I('is_enable', 0));
|
||||
$m->bg_color = I('bg_color');
|
||||
$m->sort = intval(I('sort'));
|
||||
$m->upd_time = time();
|
||||
|
||||
// 更新数据库
|
||||
@ -366,13 +313,13 @@ class SlideController extends CommonController
|
||||
}
|
||||
|
||||
/**
|
||||
* [StateUpdate 状态更新]
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StateUpdate()
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
|
21
service/Application/Admin/Lang/zh-cn/appslide.php
Executable file
21
service/Application/Admin/Lang/zh-cn/appslide.php
Executable file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-轮播图片
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 添加/编辑
|
||||
'app_slide_add_name' => '轮播添加',
|
||||
'app_slide_edit_name' => '轮播编辑',
|
||||
|
||||
'app_slide_name_text' => '名称',
|
||||
'app_slide_name_format' => '名称格式 2~60 个字符',
|
||||
|
||||
'app_slide_images_url_text' => '轮播图片',
|
||||
'app_slide_images_url_format' => '请上传轮播图片',
|
||||
);
|
||||
?>
|
@ -4,7 +4,7 @@ namespace Admin\Model;
|
||||
use Think\Model;
|
||||
|
||||
/**
|
||||
* 支付宝小程序-首页导航模型
|
||||
* 手机管理-首页导航模型
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
|
26
service/Application/Admin/Model/AppSlideModel.class.php
Executable file
26
service/Application/Admin/Model/AppSlideModel.class.php
Executable file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Model;
|
||||
use Think\Model;
|
||||
|
||||
/**
|
||||
* 手机管理-轮播图片模型
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class AppSlideModel extends CommonModel
|
||||
{
|
||||
// 数据自动校验
|
||||
protected $_validate = array(
|
||||
// 添加,编辑
|
||||
array('name', '2,60', '{%app_slide_name_format}', 1, 'length', 3),
|
||||
array('platform', array('pc','h5','app','alipay','wechat','baidu'), '{%common_platform_format}', 1, 'in', 3),
|
||||
array('event_value', '0,255', '{%common_app_event_value_format}', 2, 'length', 3),
|
||||
array('event_type', array(0,1,2,3,4), '{%common_app_event_type_format}', 1, 'in', 3),
|
||||
array('images_url', 'require', '{%app_slide_images_url_format}', 1, '', 3),
|
||||
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
|
||||
);
|
||||
}
|
||||
?>
|
@ -15,10 +15,8 @@ class SlideModel extends CommonModel
|
||||
// 数据自动校验
|
||||
protected $_validate = array(
|
||||
// 添加,编辑
|
||||
array('name', '0,60', '{%slide_name_format}', 1, 'length', 3),
|
||||
array('platform', array('pc','h5','app','alipay','wechat','baidu'), '{%common_platform_format}', 1, 'in', 3),
|
||||
array('name', '2,60', '{%slide_name_format}', 1, 'length', 3),
|
||||
array('jump_url', '0,255', '{%common_jump_url_format}', 2, 'length', 3),
|
||||
array('jump_url_type', array(0,1,2), '{%common_jump_url_type_format}', 1, 'in', 3),
|
||||
array('images_url', 'require', '{%slide_images_url_format}', 1, '', 3),
|
||||
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
|
||||
);
|
||||
|
@ -70,6 +70,10 @@
|
||||
<img src="__PUBLIC__/Common/Images/colorpicker.png" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="<if condition="isset($data['sort'])">{{$data.sort}}<else />0</if>" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label class="block">{{:L('common_view_enable_title')}}</label>
|
||||
<input name="is_enable" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_enable'] eq 1">checked="true"</if> />
|
||||
|
31
service/Application/Admin/View/Default/AppMiniAlipayConfig/Index.html
Executable file
31
service/Application/Admin/View/Default/AppMiniAlipayConfig/Index.html
Executable file
@ -0,0 +1,31 @@
|
||||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:U('Admin/AppMiniAlipayConfig/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AppMiniAlipayConfig/Index')}}">
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_app_mini_alipay_title.name}}</label>
|
||||
<input type="text" name="{{$data.home_app_mini_alipay_title.only_tag}}" placeholder="{{$data.home_app_mini_alipay_title.name}}" data-validation-message="{{$data.home_app_mini_alipay_title.error_tips}}" class="am-radius" <present name="data"> value="{{$data.home_app_mini_alipay_title.value}}"</present> required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_app_mini_alipay_describe.name}}</label>
|
||||
<input type="text" name="{{$data.home_app_mini_alipay_describe.only_tag}}" placeholder="{{$data.home_app_mini_alipay_describe.name}}" data-validation-message="{{$data.home_app_mini_alipay_describe.error_tips}}" class="am-radius" <present name="data"> value="{{$data.home_app_mini_alipay_describe.value}}"</present> required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.home_app_mini_alipay_customer_service_tel.name}}</label>
|
||||
<input type="text" name="{{$data.home_app_mini_alipay_customer_service_tel.only_tag}}" placeholder="{{$data.home_app_mini_alipay_customer_service_tel.name}}" data-validation-message="{{$data.home_app_mini_alipay_customer_service_tel.error_tips}}" class="am-radius" <present name="data"> value="{{$data.home_app_mini_alipay_customer_service_tel.value}}"</present> />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
120
service/Application/Admin/View/Default/AppSlide/Index.html
Executable file
120
service/Application/Admin/View/Default/AppSlide/Index.html
Executable file
@ -0,0 +1,120 @@
|
||||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form view-list" action="{{:U('Admin/AppSlide/Index')}}" method="POST">
|
||||
<div class="am-g">
|
||||
<input type="text" class="am-radius form-keyword" placeholder="{{:L('app_slide_name_text')}}" name="keyword" <present name="param['keyword']"> value="{{$param.keyword}}"</present> />
|
||||
<button type="submit" class="am-btn am-btn-secondary am-btn-sm am-radius form-submit">{{:L('common_operation_query')}}</button>
|
||||
<label class="fs-12 m-l-5 c-p fw-100 more-submit">
|
||||
{{:L('common_more_screening')}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" <if condition="isset($param['is_more']) and $param['is_more'] eq 1">checked</if> />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
</label>
|
||||
|
||||
<div class="more-where <if condition="!isset($param['is_more']) or $param['is_more'] neq 1">none</if>">
|
||||
<select name="is_enable" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('common_view_enable_title')}}</option>
|
||||
<foreach name="common_is_enable_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="isset($param['is_enable']) and $param['is_enable'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="platform" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="">{{:L('common_platform_text')}}</option>
|
||||
<foreach name="common_platform_type" item="v">
|
||||
<if condition="!in_array($v['value'], ['pc'])">
|
||||
<option value="{{$v.value}}" <if condition="isset($param['platform']) and $param['platform'] eq $v['value']">selected</if>>{{$v.name}}</option>
|
||||
</if>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="event_type" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('common_app_event_type_text')}}</option>
|
||||
<foreach name="common_app_event_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($param['event_type']) and $param['event_type'] eq $v['value']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<div class="param-date param-where m-l-5">
|
||||
<input type="text" name="time_start" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_start_name')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_start'])">value="{{$param.time_start}}"</if>/>
|
||||
<span>~</span>
|
||||
<input type="text" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_end_name')}}" name="time_end" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_end'])">value="{{$param.time_end}}"</if>/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
|
||||
<!-- operation start -->
|
||||
<div class="am-g m-t-15">
|
||||
<a href="{{:U('Admin/AppSlide/SaveInfo')}}" class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"> {{:L('common_operation_add')}}</a>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('app_slide_name_text')}}</th>
|
||||
<th>{{:L('common_platform_text')}}</th>
|
||||
<th>{{:L('app_slide_images_url_text')}}</th>
|
||||
<th>{{:L('common_app_event_value_text')}}</th>
|
||||
<th>{{:L('common_view_enable_title')}}</th>
|
||||
<th>{{:L('common_create_time_name')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_enable'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}</td>
|
||||
<td>{{$v.platform_text}}</td>
|
||||
<td <if condition="!empty($v['bg_color'])">style="background-color:{{$v.bg_color}};"</if>>
|
||||
<if condition="!empty($v['images_url'])">
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
<img src="{{$v['images_url']}}" class="am-radius" width="100" height="60" />
|
||||
</a>
|
||||
<else />
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{{$v.event_value}}
|
||||
<if condition="!empty($v['event_value'])">
|
||||
<br /><span class="am-badge am-badge-warning am-radius">{{$v.event_type_text}}</span>
|
||||
</if>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/AppSlide/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>{{$v.add_time_text}}</td>
|
||||
<td class="view-operation">
|
||||
<a href="{{:U('Admin/AppSlide/SaveInfo', array('id'=>$v['id']))}}">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit"> {{:L('common_operation_edit')}}</button>
|
||||
</a>
|
||||
<if condition="$v['is_enable'] eq 0">
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/AppSlide/Delete')}}" data-id="{{$v.id}}"> {{:L('common_operation_delete')}}</button>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="20" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
|
||||
<!-- page start -->
|
||||
<if condition="!empty($list)">
|
||||
{{$page_html}}
|
||||
</if>
|
||||
<!-- page end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
80
service/Application/Admin/View/Default/AppSlide/SaveInfo.html
Executable file
80
service/Application/Admin/View/Default/AppSlide/SaveInfo.html
Executable file
@ -0,0 +1,80 @@
|
||||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:U('Admin/AppSlide/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AppSlide/Index')}}" enctype="multipart/form-data">
|
||||
<input type="hidden" name="max_file_size" value="{{:MyC('home_max_limit_image', 2048000)}}" />
|
||||
<legend>
|
||||
<span class="fs-16">
|
||||
<if condition="empty($data['id'])">
|
||||
{{:L('app_slide_add_name')}}
|
||||
<else />
|
||||
{{:L('app_slide_edit_name')}}
|
||||
</if>
|
||||
</span>
|
||||
<a href="{{:U('Admin/AppSlide/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('app_slide_name_text')}}</label>
|
||||
<input type="text" name="name" placeholder="{{:L('app_slide_name_text')}}" minlength="2" maxlength="60" data-validation-message="{{:L('app_slide_name_format')}}" class="am-radius" <notempty name="data"> value="{{$data.name}}"</notempty> required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_platform_text')}}</label>
|
||||
<select name="platform" class="am-radius chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" placeholder="{{:L('common_platform_format')}}">
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_platform_type" item="v">
|
||||
<if condition="!in_array($v['value'], ['pc'])">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['platform']) and $data['platform'] eq $v['value']">selected<else /><if condition="!isset($data['platform']) and isset($v['checked']) and $v['checked'] eq true">selected</if></if>>{{$v.name}}</option>
|
||||
</if>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_app_event_type_text')}}<span class="fs-12 fw-100 cr-999">({{:L('common_app_event_type_tips')}})</span></label>
|
||||
<select name="event_type" class="am-radius chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" placeholder="{{:L('common_app_event_type_format')}}">
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_app_event_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['event_type']) and $data['event_type'] eq $v['value']">selected<else /><if condition="!isset($data['event_type']) and isset($v['checked']) and $v['checked'] eq true">selected</if></if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_app_event_value_text')}}</label>
|
||||
<input type="text" name="event_value" placeholder="{{:L('common_app_event_value_text')}}" data-validation-message="{{:L('common_app_event_value_format')}}" class="am-radius" <notempty name="data"> value="{{$data.event_value}}"</notempty> />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-file">
|
||||
<label class="block">{{:L('app_slide_images_url_text')}}</label>
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> {{:L('common_select_images_text')}}</button>
|
||||
<input type="text" name="images_url" class="am-radius js-choice-one original-images-url" data-choice-one-to=".images-file-event" <notempty name="data"> value="{{$data.images_url}}"</notempty>" data-validation-message="{{:L('common_select_images_tips')}}" readonly="readonly" <notempty name="data"> value="{{$data.images_url}}"</notempty> required />
|
||||
<input type="file" name="file_images_url" multiple data-validation-message="{{:L('common_select_images_tips')}}" accept="image/gif,image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event" data-choice-one-to=".original-images-url" data-tips-tag="#form-images_url-tips" data-image-tag="#form-img-images_url" required />
|
||||
<div id="form-images_url-tips" class="m-t-5"></div>
|
||||
<img src="<if condition="!empty($data['images_url'])">{{$image_host}}{{$data.images_url}}<else />{{$image_host}}/Public/Admin/Default/Images/default-images.png</if>" id="form-img-images_url" class="block m-t-5 am-img-thumbnail am-radius" width="300" height="150" data-default="<if condition="!empty($data['images_url'])">{{$image_host}}{{$data.images_url}}<else />{{$image_host}}/Public/Admin/Default/Images/default-images.png</if>" />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="<if condition="isset($data['sort'])">{{$data.sort}}<else />0</if>" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label class="block">{{:L('common_view_enable_title')}}</label>
|
||||
<input name="is_enable" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_enable'] eq 1">checked="true"</if> />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty> />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
@ -11,6 +11,7 @@
|
||||
<css href="__PUBLIC__/Common/Lib/amazeui-tagsinput/amazeui.tagsinput.css" />
|
||||
<css href="__PUBLIC__/Common/Css/Common.css" />
|
||||
<css href="__PUBLIC__/Admin/{{$default_theme}}/Css/Common.css" />
|
||||
<css href="__PUBLIC__/Admin/{{$default_theme}}/Css/IconfontMenu.css" />
|
||||
<if condition="!empty($module_css)">
|
||||
<css href="__PUBLIC__/{{$module_css}}" />
|
||||
</if>
|
||||
|
@ -2,17 +2,17 @@
|
||||
<div class="am-offcanvas-bar admin-offcanvas-bar">
|
||||
<ul class="am-list admin-sidebar-list common-left-menu">
|
||||
<li>
|
||||
<a href="javascript:;" data-type="menu" data-url="{{:U('Admin/Index/Init')}}" class="common-left-menu-active"><span class="am-icon-home"></span> {{:L('common_home_text')}}</a>
|
||||
<a href="javascript:;" data-type="menu" data-url="{{:U('Admin/Index/Init')}}" class="common-left-menu-active"><span class="iconfont icon-shouye"></span> {{:L('common_home_text')}}</a>
|
||||
</li>
|
||||
<foreach name="left_menu" item="v">
|
||||
<if condition="empty($v['item'])">
|
||||
<li>
|
||||
<a href="javascript:;" data-type="menu" data-url="{{:U('Admin/'.$v['control'].'/'.$v['action'])}}"><if condition="!empty($v['icon'])"><span class="{{$v.icon}}"></span></if> {{$v.name}}</a>
|
||||
<a href="javascript:;" data-type="menu" data-url="{{:U('Admin/'.$v['control'].'/'.$v['action'])}}"><if condition="!empty($v['icon'])"><span class="iconfont {{$v.icon}}"></span></if> {{$v.name}}</a>
|
||||
</li>
|
||||
<else />
|
||||
<li class="admin-parent">
|
||||
<a data-type="menu" class="am-cf" data-am-collapse="{target: '#power-menu-{{$v.id}}'}">
|
||||
<if condition="!empty($v['icon'])"><span class="{{$v.icon}}"></span></if> {{$v.name}}
|
||||
<if condition="!empty($v['icon'])"><span class="iconfont {{$v.icon}}"></span></if> {{$v.name}}
|
||||
<i class="am-icon-angle-down am-fr am-margin-right left-menu-more-ico-rotate"></i>
|
||||
</a>
|
||||
<ul class="am-list am-collapse admin-sidebar-sub" id="power-menu-{{$v.id}}">
|
||||
|
@ -21,18 +21,6 @@
|
||||
<option value="{{$v.id}}" <if condition="isset($param['is_enable']) and $param['is_enable'] eq $v['id']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="platform" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="">{{:L('common_platform_text')}}</option>
|
||||
<foreach name="common_platform_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($param['platform']) and $param['platform'] eq $v['value']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<select name="jump_url_type" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('common_jump_url_type_text')}}</option>
|
||||
<foreach name="common_jump_url_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($param['jump_url_type']) and $param['jump_url_type'] eq $v['value']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
<div class="param-date param-where m-l-5">
|
||||
<input type="text" name="time_start" class="Wdate am-radius m-t-10" placeholder="{{:L('common_time_start_name')}}" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})" <if condition="isset($param['time_start'])">value="{{$param.time_start}}"</if>/>
|
||||
<span>~</span>
|
||||
@ -54,7 +42,6 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('slide_name_text')}}</th>
|
||||
<th>{{:L('common_platform_text')}}</th>
|
||||
<th>{{:L('slide_images_url_text')}}</th>
|
||||
<th>{{:L('common_jump_url_text')}}</th>
|
||||
<th>{{:L('common_view_enable_title')}}</th>
|
||||
@ -67,7 +54,6 @@
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_enable'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}</td>
|
||||
<td>{{$v.platform_text}}</td>
|
||||
<td <if condition="!empty($v['bg_color'])">style="background-color:{{$v.bg_color}};"</if>>
|
||||
<if condition="!empty($v['images_url'])">
|
||||
<a href="{{$v['images_url']}}" target="_blank">
|
||||
@ -77,14 +63,9 @@
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
{{$v.jump_url}}
|
||||
<if condition="!empty($v['jump_url'])">
|
||||
<br /><span class="am-badge am-badge-warning am-radius">{{$v.jump_url_type_text}}</span>
|
||||
</if>
|
||||
</td>
|
||||
<td>{{$v.jump_url}}</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Slide/StateUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Slide/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>{{$v.add_time_text}}</td>
|
||||
<td class="view-operation">
|
||||
|
@ -20,25 +20,6 @@
|
||||
<label>{{:L('slide_name_text')}}</label>
|
||||
<input type="text" name="name" placeholder="{{:L('slide_name_text')}}" minlength="2" maxlength="60" data-validation-message="{{:L('slide_name_format')}}" class="am-radius" <notempty name="data"> value="{{$data.name}}"</notempty> required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_platform_text')}}</label>
|
||||
<select name="platform" class="am-radius chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" placeholder="{{:L('common_platform_format')}}">
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_platform_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['platform']) and $data['platform'] eq $v['value']">selected<else /><if condition="!isset($data['platform']) and isset($v['checked']) and $v['checked'] eq true">selected</if></if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_jump_url_type_text')}}<span class="fs-12 fw-100 cr-999">({{:L('common_jump_url_type_tips')}})</span></label>
|
||||
<select name="jump_url_type" class="am-radius chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" placeholder="{{:L('common_jump_url_type_format')}}">
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_jump_url_type" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['jump_url_type']) and $data['jump_url_type'] eq $v['value']">selected<else /><if condition="!isset($data['jump_url_type']) and isset($v['checked']) and $v['checked'] eq true">selected</if></if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_jump_url_text')}}</label>
|
||||
<input type="text" name="jump_url" placeholder="{{:L('common_jump_url_text')}}" data-validation-message="{{:L('common_jump_url_format')}}" class="am-radius" <notempty name="data"> value="{{$data.jump_url}}"</notempty> />
|
||||
@ -60,6 +41,12 @@
|
||||
<img src="__PUBLIC__/Common/Images/colorpicker.png" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="<if condition="isset($data['sort'])">{{$data.sort}}<else />0</if>" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label class="block">{{:L('common_view_enable_title')}}</label>
|
||||
<input name="is_enable" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="!empty($data) and $data['is_enable'] eq 1">checked="true"</if> />
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace Api\Controller;
|
||||
|
||||
use Service\BannerService;
|
||||
use Service\GoodsService;
|
||||
|
||||
/**
|
||||
@ -42,61 +41,10 @@ class IndexController extends CommonController
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 初始化数据
|
||||
$result = array(
|
||||
'username' => null,
|
||||
'nickname' => null,
|
||||
'cart_count' => 0,
|
||||
'banner' => [],
|
||||
'category' => [],
|
||||
'customer_service_tel' => MyC('common_customer_service_tel'),
|
||||
);
|
||||
|
||||
if(!empty($this->user))
|
||||
{
|
||||
// 基础信息
|
||||
$result['username'] = $this->user['username'];
|
||||
$result['nickname'] = $this->user['nickname'];
|
||||
|
||||
// 购物车总数
|
||||
$where = array('user_id'=>$this->user['id']);
|
||||
$result['cart_count'] = intval(M('Cart')->where($where)->count());
|
||||
}
|
||||
|
||||
// 轮播图片
|
||||
$result['banner'] = BannerService::Home();
|
||||
|
||||
// 商品分类
|
||||
$result['category'] = GoodsService::GoodsCategoryList();
|
||||
$data = GoodsService::HomeFloorList();
|
||||
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* [GoodsCategoryNav 商品分类导航]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-05-25T11:03:59+0800
|
||||
*/
|
||||
public function GoodsCategoryNav()
|
||||
{
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, GoodsService::GoodsCategoryList());
|
||||
}
|
||||
|
||||
/**
|
||||
* [Banner 首页轮播]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-05-25T11:03:59+0800
|
||||
*/
|
||||
public function Banner()
|
||||
{
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, BannerService::Home());
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $data);
|
||||
}
|
||||
}
|
||||
?>
|
@ -2,6 +2,9 @@
|
||||
|
||||
namespace Api\Controller;
|
||||
|
||||
use Service\ResourcesService;
|
||||
use Service\BannerService;
|
||||
|
||||
/**
|
||||
* 资源
|
||||
* @author Devil
|
||||
@ -39,90 +42,33 @@ class ResourcesController extends CommonController
|
||||
*/
|
||||
public function Express()
|
||||
{
|
||||
// 条件
|
||||
$where = ['is_enable' => 1];
|
||||
// 获取数据
|
||||
$field = 'id,name';
|
||||
$data = M('Express')->where($where)->field($field)->order('id asc, sort asc')->select();
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $data);
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, ResourcesService::ExpressList());
|
||||
}
|
||||
|
||||
/**
|
||||
* [Goods 获取物品类型]
|
||||
* [HomeBanner 首页轮播]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-04-08T15:08:01+0800
|
||||
* @datetime 2018-05-25T11:03:59+0800
|
||||
*/
|
||||
public function Goods()
|
||||
public function HomeBanner()
|
||||
{
|
||||
// 条件
|
||||
$where = ['is_enable' => 1];
|
||||
// 获取数据
|
||||
$field = 'id,name';
|
||||
$data = M('Goods')->where($where)->field($field)->order('id asc, sort asc')->select();
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $data);
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, BannerService::App());
|
||||
}
|
||||
|
||||
/**
|
||||
* 购买服务介绍
|
||||
* [HomeNav 首页导航]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-06-12
|
||||
* @desc 客户端购买服务页面介绍
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-05-25T11:03:59+0800
|
||||
*/
|
||||
public function ServiceBuyInit()
|
||||
public function HomeNav()
|
||||
{
|
||||
$data = [
|
||||
'service_price' => MyC('common_service_price'),
|
||||
'service_buy_desc' => MyC('common_service_buy_desc'),
|
||||
];
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取json数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-06-07
|
||||
* @desc description
|
||||
*/
|
||||
public function Shelves()
|
||||
{
|
||||
$data = $this->GetShelvesNodes('id,name');
|
||||
if(!empty($data))
|
||||
{
|
||||
foreach($data as &$v)
|
||||
{
|
||||
unset($v['id']);
|
||||
$v['subList'] = $this->GetShelvesNodes('name', $v['id']);
|
||||
}
|
||||
}
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取货架节点数据列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-06-07
|
||||
* @desc description
|
||||
* @param string $field [制定返回字段]
|
||||
* @param int $pid [父级id]
|
||||
*/
|
||||
private function GetShelvesNodes($field, $pid = 0)
|
||||
{
|
||||
// 条件
|
||||
$where = [
|
||||
'is_enable' => 1,
|
||||
'pid' => intval($pid),
|
||||
];
|
||||
|
||||
// 获取数据
|
||||
return M('Shelves')->where($where)->field($field)->order('id asc, sort asc')->select();
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, ResourcesService::AppHomeNav());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class IndexController extends CommonController
|
||||
public function Index()
|
||||
{
|
||||
// 首页轮播
|
||||
$this->assign('banner_list', BannerService::Home());
|
||||
$this->assign('banner_list', BannerService::PC());
|
||||
|
||||
// 楼层数据
|
||||
$this->assign('goods_floor_list', GoodsService::HomeFloorList());
|
||||
|
@ -12,7 +12,7 @@ namespace Service;
|
||||
class BannerService
|
||||
{
|
||||
/**
|
||||
* 获取首页轮播
|
||||
* 获取首页轮播 - PC
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -20,10 +20,10 @@ class BannerService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function Home($params = [])
|
||||
public static function PC($params = [])
|
||||
{
|
||||
// 轮播图片
|
||||
$banner = M('Slide')->field('jump_url,jump_url_type,images_url,name,bg_color')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->select();
|
||||
$banner = M('Slide')->field('name,jump_url,images_url,bg_color')->where(['is_enable'=>1])->order('sort asc')->select();
|
||||
if(!empty($banner))
|
||||
{
|
||||
$images_host = C('IMAGE_HOST');
|
||||
@ -36,5 +36,30 @@ class BannerService
|
||||
}
|
||||
return $banner;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮播 - APP
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-08-29
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function App($params = [])
|
||||
{
|
||||
$banner = M('AppSlide')->field('name,images_url,event_value,event_type')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->order('sort asc')->select();
|
||||
if(!empty($banner))
|
||||
{
|
||||
$images_host = C('IMAGE_HOST');
|
||||
foreach($banner as &$v)
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
$v['images_url'] = $images_host.$v['images_url'];
|
||||
$v['event_value'] = empty($v['event_value']) ? null : $v['event_value'];
|
||||
}
|
||||
}
|
||||
return $banner;
|
||||
}
|
||||
}
|
||||
?>
|
@ -130,7 +130,7 @@ class GoodsService
|
||||
foreach($goods_category as &$v)
|
||||
{
|
||||
$category_ids = self::GoodsCategoryItemsIds(['category_id'=>$v['id']]);
|
||||
$v['goods'] = self::GoodsList(['where'=>['gci.category_id'=>['in', $category_ids], 'is_home_recommended'=>1], 'm'=>0, 'n'=>6]);
|
||||
$v['goods'] = self::GoodsList(['where'=>['gci.category_id'=>['in', $category_ids], 'is_home_recommended'=>1], 'm'=>0, 'n'=>6, 'field'=>'g.title,g.title_color,g.images,g.home_recommended_images,g.original_price,g.price,g.inventory,g.buy_min_number,g.buy_max_number']);
|
||||
}
|
||||
}
|
||||
return $goods_category;
|
||||
|
@ -198,5 +198,30 @@ class ResourcesService
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* APP获取首页导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-11-19
|
||||
* @desc description
|
||||
* @param array $params [description]
|
||||
*/
|
||||
public static function AppHomeNav($params = [])
|
||||
{
|
||||
$data = M('AppHomeNav')->field('id,name,images_url,event_value,event_type,bg_color')->where(['platform'=>APPLICATION_CLIENT_TYPE, 'is_enable'=>1])->order('sort asc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$images_host = C('IMAGE_HOST');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
$v['images_url_old'] = $v['images_url'];
|
||||
$v['images_url'] = $images_host.$v['images_url'];
|
||||
$v['event_value'] = empty($v['event_value']) ? null : $v['event_value'];
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
?>
|
File diff suppressed because one or more lines are too long
18
service/Public/Admin/Default/Css/AppSlide.css
Executable file
18
service/Public/Admin/Default/Css/AppSlide.css
Executable file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.form-keyword { width: 55% !important; display: initial !important; }
|
||||
.more-submit input { display: none; }
|
||||
.param-where, .param-date input { display: initial !important; }
|
||||
@media only screen and (max-width: 641px) {
|
||||
.param-where { width: 100% !important; margin-left: 0px !important; }
|
||||
.param-date input { width: 47% !important; }
|
||||
}
|
||||
@media only screen and (min-width: 641px) {
|
||||
.param-where { width: 32% !important; float: left; }
|
||||
.param-date input { width: 45% !important; }
|
||||
.param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; }
|
||||
}
|
||||
@media only screen and (max-width: 321px) {
|
||||
.view-operation button { margin: 2px 0px; }
|
||||
}
|
@ -363,20 +363,20 @@ a:focus {outline:0;text-decoration:none;}
|
||||
@media only screen and (max-width:641px) {.am-dropdown-content {border:0px;}
|
||||
header .tpl-header-list-user-nick {color:#fff;}
|
||||
}
|
||||
header {min-height:51px;background-color:#0e90d2 !important;border-color:#0b6fa2;color:#fff;}
|
||||
header {min-height:51px;background-color:#4386fb !important; border-color:#4386fb; color:#fff;}
|
||||
header .am-dropdown-content {border-radius:2px;}
|
||||
ul {margin-top:0;}
|
||||
.admin-header {position:fixed;top:0;left:0;right:0;z-index:1000;font-size:1.4rem;margin-bottom:0;}
|
||||
.admin-sidebar {width:260px;min-height:100%;float:left;border-right:1px solid #cecece;}
|
||||
.admin-sidebar.am-active {z-index:1600;}
|
||||
.admin-sidebar-list {margin-bottom:0;}
|
||||
.admin-sidebar-list li a {color:#5c5c5c;padding-left:24px;}
|
||||
.admin-sidebar-list li a {color:#b6b6b6;padding-left:24px;}
|
||||
.admin-sidebar-list li:first-child {border-top:none;}
|
||||
.admin-sidebar-sub {margin-top:0;margin-bottom:0;box-shadow:0 16px 8px -15px #e2e2e2 inset;background:#ececec;padding-left:24px;}
|
||||
.admin-sidebar-sub {margin-top:0;margin-bottom:0;box-shadow:0 16px 8px -15px #e2e2e2 inset;background:#404040;padding-left:24px;}
|
||||
.admin-sidebar-sub li:first-child {border-top:1px solid #dedede;}
|
||||
.admin-sidebar {height:100%;overflow-x:hidden;overflow-y:scroll;-webkit-overflow-scrolling:touch;}
|
||||
@media only screen and (min-width:641px) {
|
||||
.admin-sidebar {display:block;position:static;background:none;width:200px;z-index:1;}
|
||||
.admin-sidebar {display:block;position:static;background:none;width:245px;z-index:1;}
|
||||
.admin-offcanvas-bar {position:static;width:auto;background:none;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);overflow-y:visible;min-height:100%;}
|
||||
.admin-offcanvas-bar:after {content:none;}
|
||||
}
|
||||
@ -393,9 +393,11 @@ ul {margin-top:0;}
|
||||
.content-right {overflow:auto;flex:1;-webkit-flex:1;}
|
||||
.content-right .content {padding:10px 10px 0 10px;}
|
||||
.admin-sidebar-list li a {padding:0.6rem 0 0.6rem 1.6rem;}
|
||||
.common-left-menu a:hover,.common-left-menu-active {background:#ececec;color:#333 !important;}
|
||||
.common-left-menu a:hover,.common-left-menu-active {background:#767778;color:#fff !important;}
|
||||
#ifcontent {border:0px;width:100%;overflow-x:hidden;}
|
||||
.am-table > tbody > tr > td {vertical-align:top;}
|
||||
.admin-offcanvas-bar, .admin-offcanvas-bar .am-list > li { background: #36373c; }
|
||||
.admin-offcanvas-bar .am-list > li { border: 1px solid #2e2e31; }
|
||||
|
||||
/**
|
||||
* excel导入窗口
|
||||
|
55
service/Public/Admin/Default/Css/IconfontMenu.css
Normal file
55
service/Public/Admin/Default/Css/IconfontMenu.css
Normal file
File diff suppressed because one or more lines are too long
@ -158,17 +158,4 @@ button.colorpicker-submit:active {
|
||||
}
|
||||
button.colorpicker-submit img {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义icon
|
||||
*/
|
||||
.am-icon-alipay {
|
||||
background-image: url('../Images/am-icon-alipay.png');
|
||||
background-repeat:no-repeat;
|
||||
background-size:100% 100%;
|
||||
-moz-background-size:100% 100%;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
vertical-align: middle;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue
Block a user