Browse Source

装配模板及添加装配

huwei 1 month ago
parent
commit
6b1b130891

+ 1 - 1
server/internal/admin/service/retrofit.go

@@ -32,7 +32,7 @@ func (s *sRetrofit) AddPlayer(ctx *gin.Context, req forms.RetrofitGroupAddPlayer
 	var (
 		q                = query.Use(config.DB).RetrofitGroup
 		r                = query.Use(config.DB).Retrofit
-		materials        map[int64]int64
+		materials        = make(map[int64]int64)
 		equipments       []int64
 		userAccountModel model.UserAccount
 	)

+ 12 - 22
web/src/views/account/accountList/components/BaseInfo.vue

@@ -9,27 +9,18 @@
     >
       <template #header-extra>
         <n-space>
-          <!--          <n-button-->
-          <!--            strong-->
-          <!--            secondary-->
-          <!--            type="warning"-->
-          <!--            v-show="useUserStore.config.mode !== 'release' && user.account === ''"-->
-          <!--            @click="showModalOpenAccount = true"-->
-          <!--            >开通账号登录-->
-          <!--          </n-button>-->
-
-<!--          <n-button
+          <!--          <n-button
             strong
             secondary
             type="error"
             v-show="useUserStore.config.mode !== 'release'"
             @click="openCompatibilityTest"
             >档案拷贝
-          </n-button>
+          </n-button> -->
           <n-button strong secondary type="success" @click="showModalRetrofit = true"
             >添加配装
           </n-button>
-          <n-button strong secondary type="info" @click="openSetDanScoreModal">修改段位分</n-button>
+          <!-- <n-button strong secondary type="info" @click="openSetDanScoreModal">修改段位分</n-button>
           <n-button strong secondary type="info" @click="showModal">账号等级对照表</n-button>
           <n-button
             strong
@@ -253,7 +244,7 @@
         </n-descriptions>
       </template>
 
-<!--      <template #header-extra>
+      <!--      <template #header-extra>
         <n-space>
           <n-button
             strong
@@ -267,7 +258,7 @@
       </template>-->
     </n-card>
 
-<!--    <n-card
+    <!--    <n-card
       :bordered="true"
       title="充值与消费 (消费数据统计时间从2022年9月1日开始)"
       class="proCard mt-2"
@@ -315,7 +306,7 @@
         </n-descriptions>
       </template>
     </n-card>-->
-<!--    <n-card
+    <!--    <n-card
       :bordered="true"
       title="玩家操作"
       class="proCard mt-2"
@@ -654,7 +645,7 @@
 
   const chatBan = reactive({
     ban: false,
-    deadline_time: null,
+    deadline_time: 0,
     banReason: '',
   });
 
@@ -898,7 +889,7 @@
           chatBan.ban = res.chatBan == 1;
           chatBan.banReason = chatBan.ban ? res.chatBanReason : '';
           chatBan.deadline_time =
-            res.chatBanDeadlineTime * 1000 < Date.now() ? null : res.chatBanDeadlineTime * 1000;
+            res.chatBanDeadlineTime * 1000 < Date.now() ? 0 : res.chatBanDeadlineTime * 1000;
           paySwitch.banReason = res.payOffReason;
         })
         .catch((error) => {
@@ -980,14 +971,13 @@
       return;
     }
     loadBaseInfo();
-    // getRetrofitOptions();
+    getRetrofitOptions();
   });
 
-  /*function getRetrofitOptions() {
+  function getRetrofitOptions() {
     new Promise((_resolve, _reject) => {
       RetrofitGroupOptions({})
         .then((res) => {
-          console.log('retrofitOptions res::' + JSON.stringify(res));
           retrofitOptions.value = res;
         })
         .catch((error) => {
@@ -995,7 +985,7 @@
           console.log('error:' + error.toString());
         });
     });
-  }*/
+  }
 
   function handleMaterialTypeChange(value: string, _option: SelectOption) {
     console.log('value' + value);
@@ -1006,7 +996,7 @@
 
     formRefRetrofit.value.validate((errors) => {
       if (!errors) {
-        console.log('formParamsRetrofit:' + JSON.stringify(formParamsRetrofit));
+        // console.log('formParamsRetrofit:' + JSON.stringify(formParamsRetrofit));
 
         if (formParamsRetrofit.value.rid === null) {
           message.error('请先选择一个配装');

+ 12 - 13
web/src/views/retrofit/modal/index.vue

@@ -87,25 +87,24 @@
   import { getRetrofitList, RetrofitDelete, RetrofitEdit } from '@/api/echarts/rechargeList';
   import { columns } from './columns';
   import { PlusOutlined } from '@vicons/antd';
-  import { updateTalents } from '@/api/account/list';
 
   const typeOptions = ref([
     {
       value: 1,
       label: '材料',
     },
-    {
-      value: 2,
-      label: '装备',
-    },
-    {
-      value: 3,
-      label: '钻石',
-    },
-    {
-      value: 4,
-      label: '金币',
-    },
+    // {
+    //   value: 2,
+    //   label: '装备',
+    // },
+    // {
+    //   value: 3,
+    //   label: '钻石',
+    // },
+    // {
+    //   value: 4,
+    //   label: '金币',
+    // },
   ]);
 
   interface Props {