Browse Source

付费规则调整

qymljy 2 years ago
parent
commit
f95edb7cb6
2 changed files with 7 additions and 98 deletions
  1. 0 90
      src/components/layout/index.vue
  2. 7 8
      src/views/homePage/index.vue

+ 0 - 90
src/components/layout/index.vue

@@ -46,18 +46,6 @@
         </el-container>
       </el-container>
     </el-container>
-    <el-dialog
-        title="提醒"
-        :visible.sync="dialogVisible"
-        width="600px"
-    >
-      <span>{{contentMsg}}</span>
-      <span slot="footer" class="dialog-footer">
-      <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-      <el-button v-if="type[0].usertype == '22'" @click="onReminder" size="small">提醒付费</el-button>
-      <el-button type="primary" @click="onPay" size="small">去付费</el-button>
-  </span>
-    </el-dialog>
   </div>
 </template>
 
@@ -83,11 +71,6 @@ export default {
       routerName:'',
       modeuls:[],
       act_id:null,
-      dialogVisible:false,
-      contentMsg:'',
-      type:"",
-      nowAccount:'',
-      userids:[]
     }
   },
   mounted() {
@@ -134,85 +117,12 @@ export default {
       }
 
     },
-
-
-    async queryAccount(){
-      const res = await this.$api.requested({
-        "classname": "webmanage.site.paymentrules",
-        "method": "queryRemind",
-        "content": {},
-      })
-      console.log(res.data,'当前账号')
-      this.nowAccount = res.data[0]
-      if (res.data.length > 0 ){
-        this.dialogVisible = true
-        this.contentMsg = '【'+res.data[0].partitionname+'】将在'+res.data[0].days+'天后到期,请尽快续费!'
-      }else {
-        this.queryReminder()
-      }
-    },
-    async queryReminder(){
-      const res = await this.$api.requested({
-        "classname": "webmanage.site.paymentrules",
-        "method": "queryRemindUser",
-        "content": {},
-      })
-      console.log(res.data,'提醒账号')
-      if (res.data.length > 0){
-        this.dialogVisible = true
-        let name = ''
-        this.userids = []
-        res.data.forEach((item,index)=>{
-          name = name + item.name
-          this.userids[index] = item.userid
-        })
-        this.contentMsg = name + '申请账号付费,请前往处理!'
-      }
-
-    },
-    onPay(){
-      this.dialogVisible = false
-      let module = JSON.parse(sessionStorage.getItem('module_info'))
-      let moduleList = []
-      module.forEach(item=>{
-        if (item.systemname === '通用'){
-          moduleList = item
-        }
-      })
-      let apps = []
-      moduleList.modules.forEach(item=>{
-        if (item.systemmodulename === '个人中心'){
-          apps = item
-        }
-      })
-      sessionStorage.setItem('active_modules',JSON.stringify(apps))
-      this.activePath = '/pay_orders'
-      this.$router.replace({path:'/pay_orders',query:{isPay:'2',id:this.nowAccount.sys_site_systempartitionid,userid:this.userids}})
-      sessionStorage.setItem('currentPath','/pay_orders')
-      let active_modules = JSON.parse(sessionStorage.getItem('active_modules'))
-      this.auth_data = active_modules.apps
-    },
-    async onReminder(){
-      const res = await this.$api.requested({
-        "classname": "system.payorder.payorder",
-        "method": "sendMessage",
-        "content": {
-          "sys_payorderid": 0
-        },
-      })
-      this.dialogVisible = false
-    }
   },
   created () {
     this.siteInfos()
     this.query_usershortcuts()
     this.routerName = this.$route.meta.title
     this.ast_nav = this.$route.meta.ast_nav
-    this.type = JSON.parse(sessionStorage.getItem('account_list'))
-    console.log(this.type)
-    this.userids[0] =  this.type[0].userid
-    this.queryAccount()
-
   },
   watch:{
     $route (val) {

+ 7 - 8
src/views/homePage/index.vue

@@ -71,13 +71,12 @@ export default {
       contentMsg:'',
       type:"",
       nowAccount:'',
-      userids:[]
+      userids:[],
+      flag:''
     }
   },
   methods:{
     redictToModules (item) {
-      console.log(item.apps[0].path);
-
       this.$router.push({path:item.apps[0].path})
       sessionStorage.setItem('active_modules',JSON.stringify(item))
       window.sessionStorage.setItem('currentPath',item.apps[0].path)
@@ -104,12 +103,12 @@ export default {
       this.$refs.storage.piePlot.changeData([{num:res.data.storage.unUsed,type:'未使用'},{num:res.data.storage.used,type:'已使用'}])
     },
     async queryAccount(){
+      sessionStorage.setItem('flag','1')
       const res = await this.$api.requested({
         "classname": "webmanage.site.paymentrules",
         "method": "queryRemind",
         "content": {},
       })
-      console.log(res.data,'当前账号')
       this.nowAccount = res.data[0]
       if (res.data.length > 0){
 
@@ -125,7 +124,6 @@ export default {
         "method": "queryRemindUser",
         "content": {},
       })
-      console.log(res.data,'提醒账号')
       if (res.data.length > 0){
         this.dialogVisible = true
         let name = ''
@@ -173,11 +171,12 @@ export default {
   mounted () {
     this.modulesList = JSON.parse(sessionStorage.getItem('module_info'))
     this.type = JSON.parse(sessionStorage.getItem('account_list'))
-    console.log(this.type)
+    this.flag = JSON.parse(sessionStorage.getItem('flag'))
     this.userids[0] =  this.type[0].userid
     this.getDataOverview()
-   /* this.queryAccount()*/
-
+    if (this.flag != '1'){
+      this.queryAccount()
+    }
   },
   created() {