Browse Source

Merge branch 'master' of http://118.190.145.217:3000/xiaojincai/wanzb_admin

Your Name 9 months ago
parent
commit
dd202f0103
2 changed files with 26 additions and 3 deletions
  1. 8 3
      src/views/comments/consult.vue
  2. 18 0
      src/views/data/index.vue

+ 8 - 3
src/views/comments/consult.vue

@@ -120,7 +120,7 @@ p {
       </el-table-column>
       <el-table-column prop="user_code" label="选手代码" width="100">
         <template slot-scope="scope">
-            <div style="text-decoration:underline" @click="pushOrder(scope.row.phone)">{{scope.row.user_code}}</div>
+            <div style="text-decoration:underline" @click="pushOrder(scope.row)">{{scope.row.user_code}}</div>
         </template>
       </el-table-column>
       <el-table-column prop="phone" label="手机号" width="100" />
@@ -436,6 +436,7 @@ export default {
         this.list = res.data.data.list;
         this.total = res.data.data.total;
         this.loading = false;
+        console.log(this.list)
       });
     },
     edit(row) {
@@ -538,8 +539,12 @@ export default {
         this.playerList = [];
       }
     },
-    pushOrder(user_phone){
-      this.$router.push({path:'/signup',query:{phone:user_phone}})
+    pushOrder(data){
+      if(data.phone){
+        this.$router.push({path:'/signup',query:{phone:data.phone}})
+      } else{
+        this.$router.push({path:'/signup',query:{phone:data.user_name}})
+      }
     },
     pushData(user_code){
       this.$router.push({path:'/data',query:{usercode:user_code}})

+ 18 - 0
src/views/data/index.vue

@@ -582,6 +582,24 @@ export default {
                 stock_date:this.getNowDate()
             }
         },
+        free(row){
+            console.log(row)
+            this.$api.getUserInfo({id:row.user_id}).then(res=>{
+                console.log(res)
+                if(res.data.data.player_type == 2 || res.data.data.player_type==3){
+                    this.msgSuccess("已经免费");
+                    return
+                }
+                this.$api.savePlayerTypePhone({user_id:res.data.data.id,player_id:row.user_id,player_type:3,phone:res.data.data.phone}).then(res=>{
+                    console.log(res)
+                    if(res.data.code != 0){
+                        this.msgError(response.data.message);
+                        return
+                    }
+                    this.msgSuccess("修改成功");
+                })
+            })
+        },
         showFundInOut(row){
             this.open2 = true;
             this.$api.getFundInOut({"id":row.fund_inout.id}).then(res=>{