Kaynağa Gözat

增加推送状态,同步,激活码开头长度限制 -zzx

zouzexu 7 ay önce
ebeveyn
işleme
36dc96a736

+ 9 - 0
src/api/common.js

@@ -11,6 +11,15 @@
 
 import request from '@/utils/request'
 
+// 同步推送状态
+export function syncNotified(params) {
+  return request({
+    url: '/vipserver/group/notified',
+    method: 'post',
+    params
+  })
+}
+
 // 后台激活指定账号
 export function labourActivation(params) {
   return request({

+ 9 - 5
src/views/operationManage/comboManage/checkoutCode.vue

@@ -93,7 +93,7 @@
       </el-table-column>
       <el-table-column align="center" label="推送状态" show-overflow-tooltipphone>
         <template slot-scope="scope">
-          <span>{{scope.row.sync===true?'推送成功':'推送失败'}}</span>
+          <span>{{scope.row.sync===true?'推送成功':'--'}}</span>
         </template>
       </el-table-column>
       <el-table-column align="center" label="激活手机号" show-overflow-tooltip>
@@ -111,7 +111,7 @@
         <template slot-scope="scope">
           <el-button type="text" size="small" v-if="scope.row.phone == null"
             @click="activationVip(scope.row)">激活</el-button>
-          <el-button type="text" size="small" v-else @click="synchronization">同步</el-button>
+          <el-button type="text" size="small" v-else @click="synchronization(scope.row)">同步</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -138,7 +138,7 @@
 
 <script>
 import { debounce } from "@/utils/index";
-import { checkoutActivationCode, labourActivation } from "@/api/common";
+import { checkoutActivationCode, labourActivation,syncNotified } from "@/api/common";
 import { timeFormat } from "@/utils/index";
 
 export default {
@@ -192,8 +192,12 @@ export default {
   },
   methods: {
     // 同步和校园数据,待完成
-    synchronization(){
-      this.getList();
+    synchronization(item){
+      syncNotified({ticketId:item.id}).then((res)=>{
+        if(res.state == "Success"){
+          this.getList()
+        }
+      })
     },
 
     Cancel(){

+ 2 - 1
src/views/operationManage/comboManage/vipActivation.vue

@@ -329,9 +329,10 @@
           <el-input
             v-model="setQuery.startString"
             class="item-width-100"
+            maxlength="6"
           ></el-input>
           <span style="color: red; font-size: 12px; margin-left: 10px"
-            >注:只能输入大小写英文和数字,创建激活码时放在激活码开头</span
+            >注:只能输入大小写英文和数字,最长单位为6位,创建激活码时放在激活码开头</span
           >
         </el-form-item>
       </el-form>