Bladeren bron

修改物料池刷新

朱鑫波 4 jaren geleden
bovenliggende
commit
efdd248184

+ 2 - 2
src/utils/request.js

@@ -16,8 +16,8 @@ else if (process.env.NODE_ENV == 'debug') {
 else if (process.env.NODE_ENV == 'production') { 
   
   // axios.defaults.baseURL = 'http://apipre.tjyourong.com.cn/jeecg-boot';//预生产
-  // axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';     
-  axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
+  axios.defaults.baseURL = 'http://139.186.165.84:8806/jeecg-boot';     
+  // axios.defaults.baseURL = 'http://api.tjyourong.com.cn/jeecg-boot';//生产环境
 }
 const service = axios.create({
 //   baseURL: '/jeecg-boot', // api base_url

+ 31 - 14
src/views/modules/autoLaunch/application/application.vue

@@ -44,9 +44,9 @@
                             <a-button type="primary" icon="search" @click="handleQueryList">查询</a-button>
                             <a-button type="primary" @click="handleResetForm" icon="reload" class="middle-button">重置</a-button>
                             <a-button type="primary" @click="addNewApp(null)">添加应用</a-button>
-                             <!-- <a-button type="primary" @click="handleUpdatePerson"  class="middle-button" v-if="realShow" :loading="realLoading">
+                             <a-button type="primary" @click="handleUpdatePerson"  class="middle-button" v-if="realShow" :loading="realLoading">
                                 更新应用
-                            </a-button> -->
+                            </a-button>
                         </span>
                         
                     </a-col>
@@ -654,14 +654,14 @@ export default {
         this.form = this.$form.createForm(this);
     },
     mounted() {
-        // this.realShow = this.userInfo().realname === '管理员' ? true : false
-        // if(!this.realShow) {
-        //     getAction('/kuaishou/batch/syncUserAppList',{ userId:this.userInfo().id, type:0}).then(res => {
-        //         if(res.success) {
-        //             // this.$message.success('更新成功');
-        //         }
-        //     })
-        // }
+        this.realShow = this.userInfo().realname === '管理员' ? true : false
+        if(!this.realShow) {
+            getAction('/kuaishou/batch/syncUserAppList',{ userId:this.userInfo().id, type:0}).then(res => {
+                if(res.success) {
+                    // this.$message.success('更新成功');
+                }
+            })
+        }
         this.handleGetTableList({});
     },
     methods: {
@@ -1051,11 +1051,28 @@ export default {
                     id: this.tableSelectList.id
                 };
                 postAction('/kuaishouAppPackage/pushAppPackage', paramsData).then(result => {
-                    this.pushConfirmLoading = false;
+                   
                     if (result.code === 200) {
-                        this.pushVisible = false;
-                        this.handleGetTableList({});
-                        this.$message.success('推送成功')
+                        
+                        if(!this.realShow) {
+                            getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
+                                if(res.success) {
+                                    this.pushConfirmLoading = false;
+                                    this.pushVisible = false;
+                                    this.handleGetTableList({});
+                                    this.$message.success('推送成功')
+                                }
+                                else {
+                                    this.$message.error(res.message)
+                                }
+                            })
+                        }
+                        else {
+                            this.pushConfirmLoading = false;
+                            this.pushVisible = false;
+                            this.handleGetTableList({});
+                            this.$message.success('推送成功')
+                        }
                     }
                     else {
                         this.$message.error(result.message);

+ 46 - 16
src/views/modules/crowd-control/crowd-control.vue

@@ -28,9 +28,9 @@
                              <a-button type="primary" @click="handleUploadPerson" class="middle-button">
                                 上传人群包
                             </a-button>
-                             <!-- <a-button type="primary" @click="handleUpdatePerson" v-if="realShow" :loading="realLoading">
+                             <a-button type="primary" @click="handleUpdatePerson" v-if="realShow" :loading="realLoading">
                                 更新人群
-                            </a-button> -->
+                            </a-button>
                            
                         </span>
                         
@@ -412,14 +412,14 @@ export default {
         this.form = this.$form.createForm(this);
     },
     mounted() {
-        // this.realShow = this.userInfo().realname === '管理员' ? true : false
-        // if(!this.realShow) {
-        //     getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
-        //         if(res.success) {
+        this.realShow = this.userInfo().realname === '管理员' ? true : false
+        if(!this.realShow) {
+            getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
+                if(res.success) {
 
-        //         }
-        //     })
-        // }
+                }
+            })
+        }
         this.handleGetTableList({});
     },
     methods: {
@@ -430,9 +430,24 @@ export default {
             params.accountIds = [val.accountId];
             postAction('/kuaishouPopulationPackage/push' ,params).then(res => {
                 if(res.success) {
-                    this.$message.success(res.message);
-                    this.historyVisible = false;
-                    this.handleGetTableList({});
+                   
+                    if(!this.realShow) {
+                        getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
+                            if(res.success) {
+                                this.$message.success(res.message);
+                                this.historyVisible = false;
+                                this.handleGetTableList({});
+                            }
+                            else {
+                                this.$message.error(res.message);
+                            }
+                        })
+                    }
+                    else {
+                        this.$message.success(res.message);
+                        this.historyVisible = false;
+                        this.handleGetTableList({});
+                    }
                 }
                 else {
                     this.$message.error(res.message);
@@ -610,13 +625,28 @@ export default {
                     id: this.tableSelectList.id
                 };
                 postAction('/kuaishouPopulationPackage/push', paramsData).then(result => {
-                    this.pushConfirmLoading = false;
+                    
                     if (result.code === 200) {
-                        this.pushVisible = false;
-                        this.handleGetTableList({});
-                        this.$message.success('推送成功')
+                        
+                        if(!this.realShow) {
+                            getAction('/kuaishou/batch/syncUserPopulationList',{ userId:this.userInfo().id, type:1}).then(res => {
+                                if(res.success) {
+                                    this.pushConfirmLoading = false;
+                                    this.pushVisible = false;
+                                    this.handleGetTableList({});
+                                    this.$message.success('推送成功')
+                                }
+                            })
+                        }
+                        else {
+                            this.pushConfirmLoading = false;
+                            this.pushVisible = false;
+                            this.handleGetTableList({});
+                            this.$message.success('推送成功')
+                        }
                     }
                     else {
+                        this.pushConfirmLoading = false;
                         this.$message.error(result.message);
                     }
                 }).catch(error => {

+ 1 - 1
vue.config.js

@@ -77,7 +77,7 @@ module.exports = {
         // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8806', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
+        // target: 'http://192.168.1.219:8081', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
         //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目