wupengfei 1 年之前
父节点
当前提交
74cd2e923e

+ 12 - 11
.idea/workspace.xml

@@ -2,9 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/user/controller/PhonePre.php" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/user/view/phone_pre/form.html" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/application/user/view/phone_pre/index.html" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/view/datum_url/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/datum_url/index.html" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/view/series_datum/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/series_datum/index.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -139,7 +140,7 @@
     <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/operate/view" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/user/view" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -150,19 +151,19 @@
     <property name="two.files.diff.last.used.folder" value="$PROJECT_DIR$" />
   </component>
   <component name="RecentsManager">
-    <key name="CopyFile.RECENT_KEYS">
-      <recent name="D:\zs\gaoyixia\application\operate\view" />
-      <recent name="D:\zs\gaoyixia\application\operate\controller" />
-      <recent name="D:\zs\gaoyixia\application\user\view\member" />
-      <recent name="D:\zs\gaoyixia\application\operate\view\activity_apply_item" />
-      <recent name="D:\zs\gaoyixia\application\operate\view\activity" />
-    </key>
     <key name="MoveFile.RECENT_KEYS">
       <recent name="D:\zs\gaoyixia\public\wx_cert" />
       <recent name="D:\zs\gaoyixia\public\a" />
       <recent name="D:\zs\gaoyixia\public" />
       <recent name="D:\zs\gaoyixia\application\api\controller" />
     </key>
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\user\view" />
+      <recent name="D:\zs\gaoyixia\application\user\controller" />
+      <recent name="D:\zs\gaoyixia\application\operate\view" />
+      <recent name="D:\zs\gaoyixia\application\operate\controller" />
+      <recent name="D:\zs\gaoyixia\application\user\view\member" />
+    </key>
   </component>
   <component name="SvnConfiguration">
     <configuration />
@@ -347,7 +348,7 @@
       <workItem from="1686531301282" duration="5211000" />
       <workItem from="1686547377101" duration="6669000" />
       <workItem from="1686617135399" duration="21044000" />
-      <workItem from="1686704183130" duration="18320000" />
+      <workItem from="1686704183130" duration="20199000" />
     </task>
     <servers />
   </component>

+ 95 - 0
application/user/controller/PhonePre.php

@@ -0,0 +1,95 @@
+<?php
+namespace app\user\controller;
+use library\Controller;
+use think\Db;
+
+/**
+ * 手机号前缀
+ * Class PhonePre
+ * @package app\store\controller
+ */
+class PhonePre extends Controller
+{
+
+    /**
+     * 绑定数据表
+     * @var string
+     */
+    protected $table = 'PhonePre';
+
+    /**
+     * 等级管理
+     * @auth true
+     * @menu true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function index()
+    {
+        $this->title = '等级管理';
+        $query = $this->_query($this->table)->order('id asc')->page();
+    }
+
+    /**
+     * 数据列表处理
+     * @auth true
+     * @menu true
+     * @param array $data
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    protected function _index_page_filter(&$data)
+    {
+
+    }
+
+
+
+    /**
+     * 添加
+     * @auth true
+     * @menu true
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function add()
+    {
+        $this->title = '添加';
+        $this->_form($this->table, 'form');
+    }
+
+
+
+
+    /**
+     * 删除
+     * @auth true
+     * @menu true
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function del()
+    {
+        $this->_delete($this->table);
+    }
+
+
+    /**
+     * 表单数据处理
+     * @auth true
+     * @menu true
+     * @param array $data
+     */
+    protected function _form_filter(&$data)
+    {
+
+    }
+
+}

+ 26 - 0
application/user/view/phone_pre/form.html

@@ -0,0 +1,26 @@
+<div class="think-box-shadow">
+    <form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
+        <div class="layui-card-body">
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">国家/地区</label>
+                <div class="layui-input-block">
+                    <input name="name" maxlength="60"  value='{$vo.name|default=""}' placeholder="请输入国家/地区" class="layui-input">
+                </div>
+            </div>
+
+            <div class="layui-form-item">
+                <label class="layui-form-label label-required">手机前缀</label>
+                <div class="layui-input-block">
+                    <input name="code" maxlength="60"  value='{$vo.code|default=""}' placeholder="请输入手机前缀" class="layui-input">
+                </div>
+            </div>
+
+            {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
+            <div class="layui-form-item text-center">
+                <button class="layui-btn" type='submit'>保 存</button>
+                <button class="layui-btn layui-btn-danger" type='button'   data-close>取消编辑</button>
+            </div>
+        </div>
+    </form>
+
+</div>

+ 61 - 0
application/user/view/phone_pre/index.html

@@ -0,0 +1,61 @@
+{extend name='admin@main'}
+{block name="button"}
+<button data-modal='{:url("add")}' data-title="添加等级" class='layui-btn layui-btn-sm layui-btn-primary'>添加等级</button>
+{/block}
+{block name="content"}
+<div class="think-box-shadow">
+    <table class="layui-table margin-top-20" lay-skin="line">
+        <thead>
+        <tr>
+            <th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th>
+            <th class='text-left nowrap'>ID</th>
+            <th class="text-left" >国家/地区</th>
+            <th class="text-left" >前缀</th>
+            <th class="text-left" style="width: 20%">操作</th>
+        </tr>
+        </thead>
+        <tbody>
+        {foreach $list as $key=>$vo}
+        <tr>
+            <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
+            <td class='text-left nowrap'>{$vo.id|default=''}</td>
+            <td class='text-left nowrap'>{$vo.name|default=''}</td>
+            <td class='text-left nowrap'>{$vo.code|default=''}</td>
+            <td class='text-left' style="width: 20%">
+                <a data-title="编辑" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
+            </td>
+        </tr>
+        {/foreach}
+        </tbody>
+    </table>
+
+
+
+    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
+</div>
+<script>
+    function btn_confirm(msg,fun,id) {
+        layer.confirm('请确定是否'+msg, {btn: ['确定', '取消'], title: "提示"}, function () {
+            var url = "/user/phone_pre/"+fun;
+            layer.closeAll();
+            $.ajax({
+                type: "post",
+                url: url,
+                data: {id:id},
+                dataType: "json",
+                async: false,
+                success: function (data) {
+                    layer.msg(data.info);
+                    setTimeout(function () {
+                        window.location.reload();
+                    },1000)
+                }
+            });
+        });
+    }
+
+</script>
+{/block}
+
+
+