GivenSir 4 rokov pred
rodič
commit
ac91e72db1

+ 2 - 2
.env

@@ -3,6 +3,6 @@ ENV = 'development'
 
 # base api
 VUE_APP_BASE_API = ''
-# VUE_APP_BASE_URL = 'https://api.youxi9.com/'
-VUE_APP_BASE_URL = 'http://devapi.youxi9.com/'
+VUE_APP_BASE_URL = 'https://api.youxi9.com/'
+# VUE_APP_BASE_URL = 'http://devapi.youxi9.com/'
 VUE_APP_IMG_URL = 'https://cdn.youxi9.com/'

+ 1 - 1
README.zh-CN.md

@@ -96,7 +96,7 @@ server
 4. [x] 清除默认充值显示的账号
 5. [x] 充值时添加充值状态和计数
 6. [x] 账号为空时不能充值
-7. [ ] 本地浏览器记录历史充值记录信息
+7. [ ] 本地浏览器记录历史充值记录信息。(非必要)
 8. [ ] 充值账户的 textarea 显示行号,并把状态显示到这里。(非必要)
 
 ### v1.6

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 44 - 43
mock/common.js


+ 4 - 0
src/store/modules/user.js

@@ -5,6 +5,7 @@ import router, { resetRouter } from '@/router'
 
 const state = {
   token: getToken(),
+  // mobile: '',
   name: '',
   avatar: '',
   introduction: '',
@@ -16,6 +17,9 @@ const mutations = {
   SET_TOKEN: (state, token) => {
     state.token = token
   },
+  // SET_MONILE: (state, token) => {
+  //   state.mobile = token
+  // },
   SET_INTRODUCTION: (state, introduction) => {
     state.introduction = introduction
   },

+ 10 - 4
src/views/dashboard/index.vue

@@ -1,17 +1,18 @@
 <template>
   <div class="dashboard-container">
-    <component :is="currentRole" />
+    <h1>没有内容的首页</h1>
+    <!-- <component :is="currentRole" /> -->
   </div>
 </template>
 
 <script>
 import { mapGetters } from 'vuex'
-import adminDashboard from './admin'
-import editorDashboard from './editor'
+// import adminDashboard from './admin'
+// import editorDashboard from './editor'
 
 export default {
   name: 'Dashboard',
-  components: { adminDashboard, editorDashboard },
+  // components: { adminDashboard, editorDashboard },
   data() {
     return {
       currentRole: 'adminDashboard'
@@ -29,3 +30,8 @@ export default {
   }
 }
 </script>
+<style lang="scss">
+.dashboard-container{
+  margin: 100px;
+}
+</style>

+ 27 - 6
src/views/recharge/index.vue

@@ -38,7 +38,7 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="4">
+        <el-col :span="3">
           <el-form-item label="充值账户" prop="username" class="filter-item">
             <span style="font-size: 5px; color: #67C23A;">:{{ accountNum }}</span>
             <el-input
@@ -49,7 +49,17 @@
               @change="setAccountNum"
             />
           </el-form-item>
-          <span v-show="repeatNumList">重复账号:{{ repeatNumList }}</span>
+        </el-col>
+
+        <el-col v-show="repeatNumList" :span="3">
+          <el-form-item label="重复账号:" class="filter-item">
+            <span style="font-size: 5px; color: #F56C6C;">:{{ repeatNumNum }}</span>
+            <el-input
+              v-model="repeatNumList"
+              type="textarea"
+              :autosize="{ minRows: 15, maxRows: 100 }"
+            />
+          </el-form-item>
         </el-col>
 
         <el-col :span="5">
@@ -114,7 +124,6 @@ export default {
   data() {
     return {
       // accountHandleSuccess: '', // 处理成功账号
-      repeatNumList: [], // 重复账号
       dataForm: {
         pid: 'd65aa6d7614589bffe62456b88e98811', // 游戏平台ID;默认魅族平台
         cid: '', // 渠道账号ID
@@ -151,6 +160,9 @@ export default {
       rechargeGame: [], // 游戏列表
 
       accountNum: 0, // 总账户个数
+      repeatNumList: '', // 重复账号列表
+      repeatNumNum: 0, // 重复账号个数
+
       thenAccount: '', // 成功账户
       thenAccountNum: 0, // 成功个数
       catchAccount: '', // 失败账户
@@ -180,21 +192,28 @@ export default {
       }
       this.accountNum = 0
       this.repeatNumList = []
+      this.repeatNumNum = 0
+
       var newQuestion = this.dataForm.username.replace(/\n\n/, '\n')
       const list = newQuestion.split('\n')
 
-      var newList = [] // 处理重复数据
+      var newList = []
       for (var i = 0; i < list.length; i++) {
+        if (list[i] === '') {
+          continue
+        }
         // 账户去重,并提示
         if (newList.indexOf(list[i]) === -1) {
           this.accountNum++
           newList.push(list[i])
         } else {
           if (this.repeatNumList.indexOf(list[i]) === -1) {
+            this.repeatNumNum++
             this.repeatNumList.push(list[i])
           }
         }
       }
+      this.repeatNumList = this.repeatNumList.join().replace(new RegExp(',', 'g'), '\n')
       this.dataForm.username = newList.join().replace(new RegExp(',', 'g'), '\n')
     },
     async onSubmit() {
@@ -323,8 +342,10 @@ export default {
       this.$store.dispatch('common/rechargeGame', pid).then((res) => {
         this.rechargeGame = res
 
-        // TODO: 判断当前账户是否有默认选项,没有则选中第一条。
-        this.dataForm.gfid = 42670
+        // 设置默认游戏
+        if (res.find(item => item.id === 54252)) {
+          this.dataForm.gfid = 54252
+        }
       }).catch((res) => {
         return Message({
           message: res,

+ 11 - 11
vue.config.js

@@ -35,19 +35,19 @@ module.exports = {
     overlay: {
       warnings: true,
       errors: true
-    }
+    },
     // before: require('./mock/mock-server.js'),
 
-    // proxy: {
-    //   [process.env.VUE_APP_BASE_API]: { // 这里是公共部分,在调用接口时后面接不相同的部分,/api就相当于http://192.168.0.199:8926/api这一段
-    //     target: process.env.VUE_APP_BASE_URL, // 这里写的是访问接口的域名和端口号
-    //     changeOrigin: true, // 必须加上这个才能跨域请求
-    //     logLevel: 'debug'
-    //     // pathRewrite: { // 重命名
-    //     //   ['^/' + process.env.VUE_APP_BASE_API]: ''
-    //     // }
-    //   }
-    // }
+    proxy: {
+      [process.env.VUE_APP_BASE_API]: { // 这里是公共部分,在调用接口时后面接不相同的部分,/api就相当于http://192.168.0.199:8926/api这一段
+        target: process.env.VUE_APP_BASE_URL, // 这里写的是访问接口的域名和端口号
+        changeOrigin: true, // 必须加上这个才能跨域请求
+        logLevel: 'debug'
+        // pathRewrite: { // 重命名
+        //   ['^/' + process.env.VUE_APP_BASE_API]: ''
+        // }
+      }
+    }
   },
   configureWebpack: {
     // provide the app's title in webpack's name field, so that