瀏覽代碼

短信资源

natasha 1 年之前
父節點
當前提交
934681cb45
共有 4 個文件被更改,包括 188 次插入2 次删除
  1. 4 0
      src/components/NavMenu.vue
  2. 5 0
      src/router/index.js
  3. 6 2
      src/views/cdkey_manage/CheckGoods.vue
  4. 173 0
      src/views/system_config/SMSResources.vue

+ 4 - 0
src/components/NavMenu.vue

@@ -217,6 +217,10 @@ export default {
               title: "测评价格",
               index: "test_setting",
             },
+            {
+              title: "短信资源",
+              index: "SMS_resources",
+            },
           ],
         },
       ];

+ 5 - 0
src/router/index.js

@@ -155,6 +155,11 @@ export const constantRoutes = [{
             import ('@/views/system_config/TestSetting.vue')
     },
     {
+        path: '/SMS_resources',
+        component: () =>
+            import ('@/views/system_config/SMSResources.vue')
+    },
+    {
         path: '/personal',
         component: () =>
             import ('@/views/personal.vue')

+ 6 - 2
src/views/cdkey_manage/CheckGoods.vue

@@ -277,8 +277,12 @@
                 :index="(pageNumber - 1) * pageSize + 1"
               >
               </el-table-column>
-              <!-- <el-table-column prop="person_name" label="用户名" width="109">
-              </el-table-column> -->
+              <el-table-column
+                prop="person_user_name"
+                label="用户名"
+                width="109"
+              >
+              </el-table-column>
               <el-table-column prop="person_name" label="真实姓名" width="109">
               </el-table-column>
               <el-table-column

+ 173 - 0
src/views/system_config/SMSResources.vue

@@ -0,0 +1,173 @@
+<template>
+  <div class="manage-root reservation_setting">
+    <Header />
+    <div class="manage-root-contain">
+      <nav-menu
+        class="manage-root-contain-left"
+        :activeMenuIndex="activeMenuIndex"
+      ></nav-menu>
+      <div class="manage-root-contain-right">
+        <breadcrumb
+          :breadcrumbList="breadcrumbList"
+          class="breadcrumb-box"
+        ></breadcrumb>
+        <div class="create-bottom">
+          <h3>短信资源</h3>
+          <p>
+            短信剩余量:<span style="color: #f53f3f">{{ residue }}</span>
+          </p>
+          <el-button
+            type="primary"
+            @click="recharge"
+            size="small"
+            :loading="loading"
+            >充值短信</el-button
+          >
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+//例如:import 《组件名称》from ‘《组件路径》';
+import Header from "../../components/Header.vue";
+import NavMenu from "../../components/NavMenu.vue";
+import Breadcrumb from "../../components/Breadcrumb.vue";
+import { getLogin } from "@/api/ajax";
+
+export default {
+  //import引入的组件需要注入到对象中才能使用
+  components: { Header, NavMenu, Breadcrumb },
+  props: {},
+  data() {
+    //这里存放数据
+    return {
+      activeMenuIndex: "SMS_resources",
+      breadcrumbList: [
+        {
+          icon: "setting",
+          url: "",
+          text: "",
+        },
+        {
+          icon: "",
+          url: "",
+          notLink: true,
+          text: "系统配置",
+        },
+        {
+          icon: "",
+          url: "",
+          text: "短信资源",
+        },
+      ],
+      loading: false,
+      residue: 0,
+    };
+  },
+  //计算属性 类似于data概念
+  computed: {},
+  //监控data中数据变化
+  watch: {},
+  //方法集合
+  methods: {
+    // 得到配置信息
+    getInfo() {
+      let MethodName = "/OrgServer/Manager/SysResourceManager/GetSMSCountLave";
+      getLogin(MethodName, {})
+        .then((res) => {
+          if (res.status === 1) {
+            this.residue = res.sms_count_lave;
+          }
+        })
+        .catch((res) => {});
+    },
+    // 充值
+    recharge() {
+      this.loading = true;
+      let MethodName =
+        "/OrgServer/Manager/SysResourceManager/GetSMSRechargePageURL";
+      getLogin(MethodName, {})
+        .then((res) => {
+          this.loading = false;
+          if (res.status === 1) {
+            window.open(res.sms_recharge_page_url);
+          }
+        })
+        .catch((res) => {
+          this.loading = false;
+        });
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    this.getInfo();
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  //生命周期-创建之前
+  beforeCreated() {},
+  //生命周期-挂载之前
+  beforeMount() {},
+  //生命周期-更新之前
+  beforUpdate() {},
+  //生命周期-更新之后
+  updated() {},
+  //生命周期-销毁之前
+  beforeDestory() {},
+  //生命周期-销毁完成
+  destoryed() {},
+  //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {},
+};
+</script>
+<style lang="scss" scoped>
+/* @import url(); 引入css类 */
+.create-bottom {
+  padding: 40px 40px;
+  background: #ffffff;
+  border-radius: 4px;
+  height: calc(100vh - 140px);
+  overflow: auto;
+  h3 {
+    font-size: 20px;
+    font-weight: 500;
+    line-height: 28px;
+    margin: 0 0 28px 0;
+    color: #1d2129;
+  }
+}
+</style>
+
+<style lang="scss">
+.reservation_setting {
+  .personal-ceil {
+    width: 200px;
+    .el-input__inner {
+      width: 200px;
+      padding: 0 60px;
+    }
+  }
+  .price-box {
+    width: 300px;
+    display: inline-block;
+    .el-form-item__content {
+      position: relative;
+      .prepend,
+      .append {
+        position: absolute;
+        left: 44px;
+        font-size: 14px;
+        line-height: 22px;
+        color: #1d2129;
+        line-height: 34px;
+      }
+      .append {
+        left: 142px;
+      }
+    }
+  }
+}
+</style>