Browse Source

基础功能

lizhen_gitee 11 months ago
parent
commit
5144b044d7

+ 38 - 0
application/admin/controller/Startadvert.php

@@ -0,0 +1,38 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+/**
+ * 启动广告图
+ *
+ * @icon fa fa-circle-o
+ */
+class Startadvert extends Backend
+{
+
+    /**
+     * Startadvert模型对象
+     * @var \app\admin\model\Startadvert
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\Startadvert;
+        $this->view->assign("isShowList", $this->model->getIsShowList());
+        $this->view->assign("typeList", $this->model->getTypeList());
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+}

+ 14 - 0
application/admin/lang/zh-cn/startadvert.php

@@ -0,0 +1,14 @@
+<?php
+
+return [
+    'Id'         => 'ID',
+    'Images'     => '图片',
+    'Video_file' => '视频',
+    'Is_show'    => '是否显示',
+    'Is_show 1'  => '上架',
+    'Is_show 0'  => '下架',
+    'Type'       => '类型',
+    'Type 1'     => '视频',
+    'Type 2'     => '图片',
+    'Minsecond'  => 'N秒后可跳过'
+];

+ 63 - 0
application/admin/model/Startadvert.php

@@ -0,0 +1,63 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class Startadvert extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'start_advert';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'is_show_text',
+        'type_text'
+    ];
+    
+
+    
+    public function getIsShowList()
+    {
+        return ['1' => __('Is_show 1'), '0' => __('Is_show 0')];
+    }
+
+    public function getTypeList()
+    {
+        return ['1' => __('Type 1'), '2' => __('Type 2')];
+    }
+
+
+    public function getIsShowTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['is_show']) ? $data['is_show'] : '');
+        $list = $this->getIsShowList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getTypeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
+        $list = $this->getTypeList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+
+
+}

+ 27 - 0
application/admin/validate/Startadvert.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class Startadvert extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 67 - 0
application/admin/view/startadvert/add.html

@@ -0,0 +1,67 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-images"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-images"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Video_file')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-video_file" class="btn btn-danger faupload" data-input-id="c-video_file" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-video_file"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Is_show')}:</label>
+        <div class="col-xs-12 col-sm-8">
+                        
+            <select  id="c-is_show" data-rule="required" class="form-control selectpicker" name="row[is_show]">
+                {foreach name="isShowList" item="vo"}
+                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
+        <div class="col-xs-12 col-sm-8">
+                        
+            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
+                {foreach name="typeList" item="vo"}
+                    <option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Minsecond')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-minsecond" class="form-control" name="row[minsecond]" type="number" value="3">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 67 - 0
application/admin/view/startadvert/edit.html

@@ -0,0 +1,67 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-images"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-images"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Video_file')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-video_file" class="form-control" size="50" name="row[video_file]" type="text" value="{$row.video_file|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-video_file" class="btn btn-danger faupload" data-input-id="c-video_file" data-multiple="false" data-preview-id="p-video_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-video_file" class="btn btn-primary fachoose" data-input-id="c-video_file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-video_file"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-video_file"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Is_show')}:</label>
+        <div class="col-xs-12 col-sm-8">
+                        
+            <select  id="c-is_show" data-rule="required" class="form-control selectpicker" name="row[is_show]">
+                {foreach name="isShowList" item="vo"}
+                    <option value="{$key}" {in name="key" value="$row.is_show"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
+        <div class="col-xs-12 col-sm-8">
+                        
+            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
+                {foreach name="typeList" item="vo"}
+                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Minsecond')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-minsecond" class="form-control" name="row[minsecond]" type="number" value="{$row.minsecond|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 29 - 0
application/admin/view/startadvert/index.html

@@ -0,0 +1,29 @@
+<div class="panel panel-default panel-intro">
+    {:build_heading()}
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
+                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('startadvert/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
+                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('startadvert/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
+                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('startadvert/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
+                        
+
+                        
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('startadvert/edit')}"
+                           data-operate-del="{:$auth->check('startadvert/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 139 - 0
application/api/controller/Baseconfig.php

@@ -0,0 +1,139 @@
+<?php
+
+namespace app\api\controller;
+
+use app\common\controller\Api;
+use think\Db;
+/**
+ * 基础配置接口
+ */
+class Baseconfig extends Api
+{
+    protected $noNeedLogin = ['*'];
+    protected $noNeedRight = ['*'];
+
+   
+    public function index(){
+
+        $config = [
+            'comment_for_gold_switch'     => config('site.comment_for_gold_switch'),//好评有礼开关
+            'kefu_user_ids'            => config('site.kefu_user_ids'),//在线客服人员
+            'index_pipei_switch'    => config('site.index_pipei_switch'), //首页匹配功能开关
+            'kefu_url'    => config('site.kefu_url'), //客服超链接
+
+            //问答
+            'question_icon' => localpath_to_netpath(config('site.question_icon')),               //问号图标
+            'question_title' => config('site.question_title'),            //问答标题
+            'question_basedatakey' => config('site.question_basedatakey'),  //问答文章key
+        ];
+
+        $this->success('success',$config);
+    }
+
+    //用户端版本
+    public function user_app_version(){
+        $config = [
+            'android_update_num'     => config('site.user_android_update_num'),     //android版本迭代号
+            'android_update_version' => config('site.user_android_update_version'), //android展示版本号
+            'android_download_url'   => config('site.user_android_download_url'),   //android下载链接
+            'android_update_force'   => config('site.user_android_update_force'),   //android是否强制更新
+            'android_update_title'   => config('site.user_android_update_title'),   //android更新标题
+            'android_update_info'    => config('site.user_android_update_info'),    //android更新描述
+            'ios_update_num'         => config('site.user_ios_update_num'),         //ios版本迭代号
+            'ios_update_version'     => config('site.user_ios_update_version'),     //ios展示版本号
+            'ios_download_url'       => config('site.user_ios_download_url'),       //ios下载链接
+            'ios_update_force'       => config('site.user_ios_update_force'),       //ios是否强制更新
+            'ios_update_title'       => config('site.user_ios_update_title'),       //ios更新标题
+            'ios_update_info'        => config('site.user_ios_update_info'),        //ios更新描述
+        ];
+
+        $this->success('success',$config);
+    }
+
+    //医生端版本
+    public function doctor_app_version(){
+        $config = [
+            'android_update_num'     => config('site.doctor_android_update_num'),     //android版本迭代号
+            'android_update_version' => config('site.doctor_android_update_version'), //android展示版本号
+            'android_download_url'   => config('site.doctor_android_download_url'),   //android下载链接
+            'android_update_force'   => config('site.doctor_android_update_force'),   //android是否强制更新
+            'android_update_title'   => config('site.doctor_android_update_title'),   //android更新标题
+            'android_update_info'    => config('site.doctor_android_update_info'),    //android更新描述
+            'ios_update_num'         => config('site.doctor_ios_update_num'),         //ios版本迭代号
+            'ios_update_version'     => config('site.doctor_ios_update_version'),     //ios展示版本号
+            'ios_download_url'       => config('site.doctor_ios_download_url'),       //ios下载链接
+            'ios_update_force'       => config('site.doctor_ios_update_force'),       //ios是否强制更新
+            'ios_update_title'       => config('site.doctor_ios_update_title'),       //ios更新标题
+            'ios_update_info'        => config('site.doctor_ios_update_info'),        //ios更新描述
+        ];
+
+        $this->success('success',$config);
+    }
+
+
+
+    //启动广告图
+    public function start_advert(){
+        $info = Db::name('start_advert')->where('is_show',1)->order('id desc')->find();
+        $info = info_domain_image($info,['images','video_file']);
+        $this->success('success',$info);
+    }
+
+
+
+    //个人资料的一下枚举
+    public function userinfo_enum(){
+//        $enum_hobby = Db::name('enum_hobby')->field('id,name')->order('weight desc,id desc')->select();
+//        $enum_job = Db::name('enum_job')->field('id,name')->order('weight desc,id desc')->select();
+//        $enum_marital = Db::name('enum_marital')->field('id,name')->order('weight desc,id desc')->select();
+//        $enum_education = Db::name('enum_education')->field('id,name')->order('weight desc,id desc')->select();
+        $enum_tag = Db::name('enum_tag')->field('id,name,color')->order('weight desc,id desc')->select();
+//        $enum_wages = Db::name('enum_wages')->field('id,name')->order('weight desc,id desc')->select();
+
+        $data = [
+//            'enum_hobby' => $enum_hobby,
+//            'enum_job' => $enum_job,
+//            'enum_marital' => $enum_marital,
+//            'enum_education' => $enum_education,
+            'enum_tag' => $enum_tag,
+            'enumtag_max' => config('site.enumtag_max'),//最多可选个数
+//            'enum_wages' => $enum_wages,
+        ];
+
+        $this->success('success',$data);
+    }
+
+    //关键字过滤
+    public function keyworld_config(){
+        $config = config('keyworld');
+        $this->success('success',$config);
+    }
+
+///////////////////////本项目用不到的//////////////////////////////
+    /**
+     * 获取安卓版本更新信息
+     */
+    public function getandroidEdition() {
+        // 获取二维码
+        $is_force = config("site.android_is_force");
+        $apkUrl = config("site.android_apkUrl");
+        $apkName = config("site.android_apkName");
+        $desc = config("site.android_desc");
+        $versionCode = config("site.android_versionCode");
+        $this->success("获取成功!",["versionCode"=>$versionCode,"isForceUpdate"=>$is_force,"apkUrl"=>$apkUrl,"apkName"=>$apkName,"desc"=>$desc]);
+    }
+
+    /**
+     * 获取ios版本更新信息
+     */
+    public function getiosEdition() {
+        // 获取二维码
+        $is_force = config("site.iso_is_force");
+        $apkUrl = config("site.ios_downurl");
+        $apkName = config("site.iso_appname");
+        $desc = config("site.iso_desc");
+        $versionCode = config("site.iso_versioncode");
+        $this->success("获取成功!",["versionCode"=>$versionCode,"isForceUpdate"=>$is_force,"apkUrl"=>$apkUrl,"apkName"=>$apkName,"desc"=>$desc]);
+    }
+
+}

+ 42 - 12
application/extra/site.php

@@ -1,7 +1,7 @@
 <?php
 
 return array (
-  'name' => '最新版2024',
+  'name' => '健康E家',
   'beian' => '',
   'cdnurl' => '',
   'version' => '1.0.3',
@@ -15,18 +15,22 @@ return array (
   'fixedpage' => 'dashboard',
   'categorytype' => 
   array (
-    'default' => 'Default',
-    'page' => 'Page',
-    'article' => 'Article',
+    'default' => '默认',
+    'page' => '单页',
+    'article' => '文章',
     'test' => 'Test',
   ),
   'configgroup' => 
   array (
-    'basic' => 'Basic',
-    'email' => 'Email',
-    'dictionary' => 'Dictionary',
-    'user' => 'User',
-    'example' => 'Example',
+    'basic' => '基础配置',
+    'email' => '邮件配置',
+    'dictionary' => '字典配置',
+    'user' => '会员配置',
+    'siteconfig' => '网站配置',
+    'userandroid' => '用户安卓版本',
+    'userios' => '用户IOS版本',
+    'doctorandroid' => '医生安卓版本',
+    'doctorios' => '医生IOS版本',
   ),
   'mail_type' => '1',
   'mail_smtp_host' => 'smtp.qq.com',
@@ -37,8 +41,34 @@ return array (
   'mail_from' => '',
   'attachmentcategory' => 
   array (
-    'category1' => 'Category1',
-    'category2' => 'Category2',
-    'custom' => 'Custom',
+    'category1' => '分类一',
+    'category2' => '分类二',
+    'custom' => '自定义',
   ),
+  'apisite_switch' => '1',
+  'apisite_notice' => '全站维护中敬请期待新版本',
+  'user_android_update_num' => '1',
+  'user_android_update_version' => '1.0.0',
+  'user_android_download_url' => 'http://baidu.com',
+  'user_android_update_force' => '0',
+  'user_android_update_title' => '界是你没有挽过的船新版本',
+  'user_android_update_info' => '我是一条描述',
+  'user_ios_update_num' => '1',
+  'user_ios_update_version' => '1.0.0',
+  'user_ios_download_url' => 'http://apple.com',
+  'user_ios_update_force' => '1',
+  'user_ios_update_title' => '新的版本',
+  'user_ios_update_info' => '界是你没有挽过的船新版本',
+  'doctor_android_update_num' => '1',
+  'doctor_android_update_version' => '1.0.0',
+  'doctor_android_download_url' => 'http://baidu.com',
+  'doctor_android_update_force' => '0',
+  'doctor_android_update_title' => '界是你没有挽过的船新版本',
+  'doctor_android_update_info' => '我是一条描述',
+  'doctor_ios_update_num' => '1',
+  'doctor_ios_update_version' => '1.0.0',
+  'doctor_ios_download_url' => 'http://apple.com',
+  'doctor_ios_update_force' => '0',
+  'doctor_ios_update_title' => '新的版本',
+  'doctor_ios_update_info' => '界是你没有挽过的船新版本',
 );

+ 44 - 6
application/index/controller/Index.php

@@ -2,18 +2,56 @@
 
 namespace app\index\controller;
 
-use app\common\controller\Frontend;
-
-class Index extends Frontend
+use think\Controller;
+use think\Db;
+class Index extends Controller
 {
 
-    protected $noNeedLogin = '*';
-    protected $noNeedRight = '*';
-    protected $layout = '';
+
 
     public function index()
     {
         return $this->view->fetch();
     }
 
+
+    /**
+     * app下载页
+     * 判断是安卓还是ios
+     */
+    public function appdownload() {
+
+        if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
+            header("Location: ".config('site.ios_downurl'));
+        }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
+            $this->view->assign('downurl', config("site.android_apkUrl"));
+            return $this->view->fetch();
+        }else{
+            $this->view->assign('downurl', config("site.android_apkUrl"));
+            return $this->view->fetch();
+        }
+    }
+
+    //基础文章网页
+    public function basedata(){
+        $key = input('key','');
+        if(!$key){
+            exit;
+        }
+        $content = Db::name('basedata')->where('key',$key)->find();
+        $this->assign('content',$content['content']);
+        return $this->fetch();
+    }
+
+    //系统公告
+    public function messagesys(){
+        $id = input('id','');
+        if(!$id){
+            exit;
+        }
+        $content = Db::name('message_sys')->where('id',$id)->find();
+        $this->assign('content',$content['info']);
+        return $this->fetch('basedata');
+    }
+
 }

+ 82 - 0
application/index/view/index/appdownload.html

@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>TKEN下载</title>
+    <script src="../../assets/js/fontSize.js"></script>
+</head>
+<style>
+    .wxtip{background: rgba(0,0,0,0.8); text-align: center; position: fixed; left:0; top: 0; width: 100%; height: 100%; z-index: 998; display: none;}
+    .wxtip-icon{width: 52px; height: 67px; background: url(../../assets/img/weixin-tip.png) no-repeat; display: block; position: absolute; right: 20px; top: 20px;}
+    .wxtip-txt{margin-top: 107px; color: #fff; font-size: 16px; line-height: 1.5;}
+
+    * {
+        margin:0;
+        padding:0;
+    }
+    body {
+        background:#edf0f0;
+        font-family:Helvetica Neue,Helvetica,Arial,sans-serif;
+        font-size:14px;
+        color:#333;
+        padding:0;
+        margin:0;
+    }
+    .page{
+        position: relative;
+        left: 0;
+        top: 0;
+        right: 0;
+        bottom: 0;
+        width: 100vw;
+        height: 100vh;
+        background: url(../../assets/img/download.png) no-repeat center/cover;
+    }
+    .btn{
+        width: 290px;
+        height: 45px;
+        background: linear-gradient(90deg, #8F68DD, #6B7DDB);
+        box-shadow: 0px 1px 2px 0px rgba(126, 114, 220, 0.59);
+        line-height: 45px;
+        text-align: center;
+        font-size: 17px;
+        color: #FFFFFF;
+        border-radius: 35px;
+        bottom:26px;
+        left: 50%;
+        transform: translateX(-50%);
+        position: absolute;
+    }
+</style>
+
+<body >
+<div class="page">
+    <a class="btn" href="{$downurl}"  id="JdownApp">点击下载</a>
+</div>
+<div class="wxtip" id="JweixinTip">
+    <span class="wxtip-icon"></span>
+    <p class="wxtip-txt">点击右上角<br/>选择在浏览器中打开</p>
+</div>
+
+</body>
+<script>
+
+    function weixinTip(ele){
+        var ua = navigator.userAgent;
+        var isWeixin = !!/MicroMessenger/i.test(ua);
+        if(isWeixin){
+            ele.onclick=function(e){
+                window.event? window.event.returnValue = false : e.preventDefault();
+                document.getElementById('JweixinTip').style.display='block';
+            }
+            document.getElementById('JweixinTip').onclick=function(){
+                this.style.display='none';
+            }
+        }
+    }
+    var btn1 = document.getElementById('JdownApp');//下载一
+    weixinTip(btn1);
+</script>

+ 63 - 0
application/index/view/index/basedata.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+    <style>
+        html, body, div, span, applet, object, iframe,
+        h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+        a, abbr, acronym, address, big, cite, code,
+        del, dfn, em, img, ins, kbd, q, s, samp,
+        small, strike, strong, sub, sup, tt, var,
+        b, u, i, center,
+        dl, dt, dd, ol, ul, li,
+        fieldset, form, label, legend,
+        table, caption, tbody, tfoot, thead, tr, th, td,
+        article, aside, canvas, details, embed, 
+        figure, figcaption, footer, header, hgroup, 
+        menu, nav, output, ruby, section, summary,
+        time, mark, audio, video {
+            margin: 0;
+            padding: 0;
+            border: 0;
+            font-size: 100%;
+            font: inherit;
+            vertical-align: baseline;
+            box-sizing: border-box;
+            font-family: Source Han Sans CN;
+        }
+        .page{
+            padding: 15px;
+            font-size: 14px;
+            line-height: 16px;
+            color:#333;
+        }
+    </style>
+</head>
+<body>
+    <div class="page">
+        {$content}
+    </div>
+</body>
+</html>
+<script src="/assets/js/jquery-3.1.1.min.js"></script>
+<script>
+
+    function replaceDetail(){
+        var details = $('.page').html();
+	   //newContent仅是details替换后内容;
+        let newContent = details.replace(/<img[^>]*>/gi, function (match, capture) { //去除三标签
+            match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
+            match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+            match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+            return match;
+        });
+        newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+        newContent = newContent.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;margin:0 auto;"');
+        $('.page').html('');
+        $('.page').html(newContent);
+    }
+    replaceDetail();
+</script>

+ 82 - 0
application/index/view/index/wxsharedownload.html

@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>觅TA下载</title>
+    <script src="../../assets/js/fontSize.js"></script>
+</head>
+<style>
+    .wxtip{background: rgba(0,0,0,0.8); text-align: center; position: fixed; left:0; top: 0; width: 100%; height: 100%; z-index: 998; display: none;}
+    .wxtip-icon{width: 52px; height: 67px; background: url(../../assets/img/weixin-tip.png) no-repeat; display: block; position: absolute; right: 20px; top: 20px;}
+    .wxtip-txt{margin-top: 107px; color: #fff; font-size: 16px; line-height: 1.5;}
+
+    * {
+        margin:0;
+        padding:0;
+    }
+    body {
+        background:#edf0f0;
+        font-family:Helvetica Neue,Helvetica,Arial,sans-serif;
+        font-size:14px;
+        color:#333;
+        padding:0;
+        margin:0;
+    }
+    .page{
+        position: relative;
+        left: 0;
+        top: 0;
+        right: 0;
+        bottom: 0;
+        width: 100vw;
+        height: 100vh;
+        background: url(../../assets/img/download.png) no-repeat center/cover;
+    }
+    .btn{
+        width: 290px;
+        height: 45px;
+        background: linear-gradient(90deg, #8F68DD, #6B7DDB);
+        box-shadow: 0px 1px 2px 0px rgba(126, 114, 220, 0.59);
+        line-height: 45px;
+        text-align: center;
+        font-size: 17px;
+        color: #FFFFFF;
+        border-radius: 35px;
+        bottom:26px;
+        left: 50%;
+        transform: translateX(-50%);
+        position: absolute;
+    }
+</style>
+
+<body >
+<div class="page">
+    <a class="btn" href="{$downurl}"  id="JdownApp">点击下载</a>
+</div>
+<div class="wxtip" id="JweixinTip">
+    <span class="wxtip-icon"></span>
+    <p class="wxtip-txt">点击右上角<br/>选择在浏览器中打开</p>
+</div>
+
+</body>
+<script>
+
+    function weixinTip(ele){
+        var ua = navigator.userAgent;
+        var isWeixin = !!/MicroMessenger/i.test(ua);
+        if(isWeixin){
+            ele.onclick=function(e){
+                window.event? window.event.returnValue = false : e.preventDefault();
+                document.getElementById('JweixinTip').style.display='block';
+            }
+            document.getElementById('JweixinTip').onclick=function(){
+                this.style.display='none';
+            }
+        }
+    }
+    var btn1 = document.getElementById('JdownApp');//下载一
+    weixinTip(btn1);
+</script>

+ 55 - 0
public/assets/js/backend/startadvert.js

@@ -0,0 +1,55 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'startadvert/index' + location.search,
+                    add_url: 'startadvert/add',
+                    edit_url: 'startadvert/edit',
+                    del_url: 'startadvert/del',
+                    multi_url: 'startadvert/multi',
+                    import_url: 'startadvert/import',
+                    table: 'start_advert',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
+                        {field: 'video_file', title: __('Video_file'), operate: false, formatter: Table.api.formatter.file},
+                        {field: 'is_show', title: __('Is_show'), searchList: {"1":__('Is_show 1'),"0":__('Is_show 0')}, formatter: Table.api.formatter.normal},
+                        {field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
+                        {field: 'minsecond', title: __('Minsecond')},
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});

File diff suppressed because it is too large
+ 1 - 0
public/assets/js/jquery-3.1.1.min.js


Some files were not shown because too many files changed in this diff