Explorar el Código

Merge branch 'master' of http://git.dgtis.com/sunlupeng/pointsMall-admin into mall_filedFix

sunny hace 2 días
padre
commit
fca5185c8d
Se han modificado 5 ficheros con 90 adiciones y 11 borrados
  1. 4 4
      config/prod.env.js
  2. 1 7
      src/api/storage.js
  3. 1 0
      src/permission.js
  4. 1 0
      src/router/index.js
  5. 83 0
      src/views/pointManage/activityRules.vue

+ 4 - 4
config/prod.env.js

@@ -2,10 +2,10 @@ module.exports = {
 	NODE_ENV: '"production"',
 	ENV_CONFIG: '"prod"',
 	// 阿里云环境
-  BASE_API: '"http://47.103.79.143:9085/admin"',
-  OS_API: '"http://dgtcloud.dgtis.com/oneportal/login"'
+  // BASE_API: '"http://47.103.79.143:9085/admin"',
+  // OS_API: '"http://dgtcloud.dgtis.com/oneportal/login"'
   //正式环境
-  // BASE_API: '"https://xiaoyou.dgtis.com/admin"',
-  // OS_API: '"http://dgt.dgtis.com/oneportal/login"'
+  BASE_API: '"https://xiaoyou.dgtis.com/admin"',
+  OS_API: '"http://dgt.dgtis.com/oneportal/login"'
 }
 

+ 1 - 7
src/api/storage.js

@@ -7,12 +7,6 @@ const service = axios.create({
   timeout: 10000 // request timeout
 })
 
-const myService = axios.create({
-  baseURL: process.env.OS_API, // api的base_url
-  // baseURL: process.env.BASE_API,
-  timeout: 10000 // request timeout
-})
-
 /*批量导入员工福利信息 excel*/
 export function insetListWelfare(data) {
   return service({
@@ -38,7 +32,7 @@ export function createStorage(data) {
   })
 }
 export function uploadPic(data) {
-  return myService({
+  return service({
     url: '/storage/uploadPic',
     method: 'post',
     data

+ 1 - 0
src/permission.js

@@ -55,6 +55,7 @@ const myRoles = [
   'pointManage', 
   'pointIndateList',
   'pointInstructions', 
+  'activityRules',
   'pointRulesList', 
   'pointList', 
   'pointsDetailList',

+ 1 - 0
src/router/index.js

@@ -102,6 +102,7 @@ export const asyncRouterMap = [
     },
     children: [
       { path: 'pointInstructions', component: _import('pointManage/pointInstructions'), name: 'pointInstructions', meta: { title: '积分规则说明书', noCache: true }},
+      { path: 'activityRules', component: _import('pointManage/activityRules'), name: 'activityRules', meta: { title: '活跃度判定规则', noCache: true }},
       { path: 'pointRulesList', component: _import('pointManage/pointRulesList'), name: 'pointRulesList', meta: { title: '积分规则列表', noCache: true }},
       { path: 'pointIndateList', component: _import('pointManage/pointIndateList'), name: 'pointIndateList', meta: { title: '积分有效期列表', noCache: true }},
       { path: 'pointList', component: _import('pointManage/pointList'), name: 'pointList', meta: { title: '积分列表', noCache: true }},

+ 83 - 0
src/views/pointManage/activityRules.vue

@@ -0,0 +1,83 @@
+<template>
+    <div class="app-container calendar-list-container" style="padding-bottom: 80px;">
+        <el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="100px" style='width: 85%; margin-left:50px;'>
+         <el-form-item  label="标题" prop="title">
+              <el-input v-model="dataForm.title"></el-input>
+            </el-form-item>
+            <el-form-item
+              style="width: 100%"
+              label="内容"
+              prop="content"
+            >
+              <tinymce v-model="dataForm.content" ref="tinymce"></tinymce>
+            </el-form-item>
+        </el-form>
+        <el-button style="float: right;margin-right: 120px;" type="primary" @click="updateData">修改</el-button>
+    
+        
+    </div>
+   
+  </template>
+  
+  <style>
+    
+  </style>
+  
+  
+  <script>
+   import {rulesDetail, updateRule} from "@/api/public";
+    import waves from "@/directive/waves"; // 水波纹指令
+    import Tinymce from '@/components/Tinymce'
+    export default {
+    name: 'pointInstructions',
+    components: { Tinymce },
+    directives: { waves },
+    data() {
+      return {
+        dataForm: {
+          id:'',
+          title: '',
+          content: "",
+        },
+        dialogFormVisible: false,
+        rules: {
+            title: [{ required: true, message: "标题不能为空", trigger: "blur" }],
+            content: [{ required: true, message: "活跃度判定规则不能为空", trigger: "blur" }],
+        },
+      }
+    },
+    created() {
+        this.getDetail();
+    },
+    methods: {
+    
+      getDetail() {
+        this.listLoading = true
+        rulesDetail({noticeType:'activityRules'}).then(response => {
+          this.dataForm.title = response.data.data.title;
+          this.dataForm.content = response.data.data.content;
+          this.dataForm.id = response.data.data.id;
+        }).catch(() => {})
+      },
+      updateData() {
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            updateRule(this.dataForm).then(() => {
+                this.dialogFormVisible = false
+                this.$notify({
+                  title: '成功',
+                  message: '更新成功',
+                  type: 'success',
+                  duration: 2000
+                })
+                this.getDetail()
+              }) 
+          }
+        })
+      },
+  
+      
+    }
+  }
+  </script>
+