Bladeren bron

调整目录

ith5 6 maanden geleden
bovenliggende
commit
50d33ad9c2

+ 0 - 0
src/views/v1/api/common.js → src/views/v1/api/center/common.js


+ 0 - 0
src/views/v1/api/game.js → src/views/v1/api/center/game.js


+ 0 - 0
src/views/v1/api/gameMain.js → src/views/v1/api/center/gameMain.js


+ 0 - 0
src/views/v1/api/iosPayWay.js → src/views/v1/api/center/iosPayWay.js


+ 0 - 0
src/views/v1/api/qxSwitch.js → src/views/v1/api/center/qxSwitch.js


+ 2 - 2
src/views/v1/center/game/edit.vue

@@ -143,8 +143,8 @@
 import { ref, reactive, computed } from "vue";
 import tool from "@/utils/tool";
 import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/game";
-import centerCommonApi from "../../api/common";
+import api from "../../api/center/game";
+import centerCommonApi from "../../api/center/common";
 
 const emit = defineEmits(["success"]);
 // 引用定义

+ 2 - 2
src/views/v1/center/game/index.vue

@@ -74,8 +74,8 @@ import { onMounted, ref, reactive } from "vue";
 import { Message } from "@arco-design/web-vue";
 import EditForm from "./edit.vue";
 import CpInfo from "./cp-info.vue";
-import api from "../../api/game";
-import apiCommon from "../../api/common";
+import api from "../../api/center/game";
+import apiCommon from "../../api/center/common";
 
 // 引用定义
 const crudRef = ref();

+ 2 - 2
src/views/v1/center/gameMain/edit.vue

@@ -40,8 +40,8 @@
 import { ref, reactive, computed } from "vue";
 import tool from "@/utils/tool";
 import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/gameMain";
-import centerCommonApi from "@/views/v1/api/common";
+import api from "../../api/center/gameMain";
+import centerCommonApi from "@/views/v1/api/center/common";
 
 const emit = defineEmits(["success"]);
 // 引用定义

+ 1 - 1
src/views/v1/center/gameMain/index.vue

@@ -36,7 +36,7 @@
 import { onMounted, ref, reactive } from "vue";
 import { Message } from "@arco-design/web-vue";
 import EditForm from "./edit.vue";
-import api from "../../api/gameMain";
+import api from "../../api/center/gameMain";
 
 // 引用定义
 const crudRef = ref();

+ 30 - 7
src/views/v1/center/iosPayWay/edit.vue

@@ -16,14 +16,25 @@
       :rules="rules"
       :auto-label-width="true"
     >
+      <a-form-item label="游戏名称" field="game_id">
+        <a-select
+          v-model="formData.game_id"
+          :options="gameOptions"
+          placeholder="请选择游戏"
+          search
+          allow-clear
+        />
+      </a-form-item>
       <a-form-item label="开启时间" field="pay_stime">
         <a-time-picker
+          style="width: 100%"
           v-model="formData.pay_stime"
           placeholder="请选择开启时间"
         />
       </a-form-item>
       <a-form-item label="结束时间" field="pay_etime">
         <a-time-picker
+          style="width: 100%"
           v-model="formData.pay_etime"
           placeholder="请选择结束时间"
         />
@@ -40,11 +51,8 @@
       <a-form-item label="屏蔽地区" field="city">
         <a-input v-model="formData.city" placeholder="请输入屏蔽地区" />
       </a-form-item>
-      <a-form-item label="苹果支付" field="apple_pay">
-        <sa-switch v-model="formData.apple_pay" />
-      </a-form-item>
       <a-form-item label="充值渠道开关" field="pay_way">
-        <sa-radio v-model="formData.pay_way" dict="open_close" />
+        <sa-radio v-model="formData.pay_way" dict="ios_pay_way" />
       </a-form-item>
     </a-form>
     <!-- 表单信息 end -->
@@ -55,7 +63,8 @@
 import { ref, reactive, computed } from "vue";
 import tool from "@/utils/tool";
 import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/iosPayWay";
+import api from "../../api/center/iosPayWay";
+import centerCommonApi from "../../api/center/common";
 
 const emit = defineEmits(["success"]);
 // 引用定义
@@ -63,6 +72,7 @@ const visible = ref(false);
 const loading = ref(false);
 const formRef = ref();
 const mode = ref("");
+const gameOptions = ref([]);
 
 let title = computed(() => {
   return "ios切支付" + (mode.value == "add" ? "-新增" : "-编辑");
@@ -71,6 +81,7 @@ let title = computed(() => {
 // 表单初始值
 const initialFormData = {
   id: null,
+  game_id: null,
   pay_stime: "",
   pay_etime: "",
   pay_money: 45,
@@ -78,7 +89,7 @@ const initialFormData = {
   reg_day: 1,
   city: "",
   apple_pay: 1,
-  pay_way: "0",
+  pay_way: 1,
 };
 
 // 表单信息
@@ -86,6 +97,8 @@ const formData = reactive({ ...initialFormData });
 
 // 验证规则
 const rules = {
+  pay_stime: [{ required: true, message: "开启时间必需填写" }],
+  pay_etime: [{ required: true, message: "结束时间必需填写" }],
   game_id: [{ required: true, message: "游戏名称必需填写" }],
   pay_money: [{ required: true, message: "充值金额必需填写" }],
   pay_num: [{ required: true, message: "充值次数必需填写" }],
@@ -94,6 +107,14 @@ const rules = {
   pay_way: [{ required: true, message: "充值渠道开关必需填写" }],
 };
 
+// 获取游戏列表
+const getGameOptionsList = async () => {
+  const res = await centerCommonApi.getGameOptionsApi();
+  if (res.code == 200) {
+    gameOptions.value = res.data;
+  }
+};
+
 // 打开弹框
 const open = async (type = "add") => {
   mode.value = type;
@@ -105,7 +126,9 @@ const open = async (type = "add") => {
 };
 
 // 初始化页面数据
-const initPage = async () => {};
+const initPage = async () => {
+  await getGameOptionsList();
+};
 
 // 设置数据
 const setFormData = async (data) => {

+ 3 - 3
src/views/v1/center/iosPayWay/index.vue

@@ -21,7 +21,7 @@
 import { onMounted, ref, reactive } from "vue";
 import { Message } from "@arco-design/web-vue";
 import EditForm from "./edit.vue";
-import api from "../../api/iosPayWay";
+import api from "../../api/center/iosPayWay";
 
 // 引用定义
 const crudRef = ref();
@@ -71,12 +71,12 @@ const columns = reactive([
   { title: "充值次数", dataIndex: "pay_num", width: 180 },
   { title: "注册天数", dataIndex: "reg_day", width: 180 },
   { title: "屏蔽地区", dataIndex: "city", width: 180 },
-  { title: "苹果支付", dataIndex: "apple_pay", width: 180 },
+
   {
     title: "充值渠道开关",
     dataIndex: "pay_way",
     type: "dict",
-    dict: "open_close",
+    dict: "ios_pay_way",
     width: 120,
   },
 ]);

+ 1 - 1
src/views/v1/center/qxSwitch/edit.vue

@@ -49,7 +49,7 @@
 import { ref, reactive, computed } from "vue";
 import tool from "@/utils/tool";
 import { Message, Modal } from "@arco-design/web-vue";
-import api from "../../api/qxSwitch";
+import api from "../../api/center/qxSwitch";
 
 const emit = defineEmits(["success"]);
 // 引用定义

+ 1 - 1
src/views/v1/center/qxSwitch/index.vue

@@ -55,7 +55,7 @@
 import { onMounted, ref, reactive } from "vue";
 import { Message } from "@arco-design/web-vue";
 import EditForm from "./edit.vue";
-import api from "../../api/qxSwitch";
+import api from "../../api/center/qxSwitch";
 
 // 引用定义
 const crudRef = ref();