liyongli 4 months ago
parent
commit
584c54b34d
3 changed files with 25 additions and 2 deletions
  1. 7 0
      src/api/index.ts
  2. 7 0
      src/views/SkeletonPage.vue
  3. 11 2
      src/views/SourceMaterialPage.vue

+ 7 - 0
src/api/index.ts

@@ -263,3 +263,10 @@ export const getMediaMonthReport = (data: Pages) => {
 export const getProvinceCity = () => {
   return instance.get('http://cxzx.smcic.net/ad/config/cn.json')
 }
+
+/**
+ * 用户详情
+ */
+export const getUserDetail = () => {
+  return instance.get('/ad/users/info')
+}

+ 7 - 0
src/views/SkeletonPage.vue

@@ -3,6 +3,13 @@
 import { ref } from 'vue'
 import { RouterView } from 'vue-router'
 import { useRouter, useRoute } from 'vue-router'
+import { getUserDetail } from '@/api/index'
+const token = localStorage.getItem('token')
+if (token)
+  getUserDetail().then(({ data }) => {
+    console.log(data.role.menus)
+    localStorage.setItem('user', JSON.stringify(data))
+  })
 
 const phone: string = localStorage.getItem('phone') || ''
 

+ 11 - 2
src/views/SourceMaterialPage.vue

@@ -56,7 +56,7 @@
         <el-popconfirm
           title="确定启用该素材吗?"
           v-if="scope.row.status == 6 || scope.row.status == 8 || scope.row.status == 4"
-          @confirm="changeStatus(scope.row.creativeId, 10, '启用成功')"
+          @confirm="changeStatus(scope.row.stuffId, 10, '启用成功')"
         >
           <template #reference>
             <el-button link type="primary" size="small">启用</el-button>
@@ -65,12 +65,21 @@
         <el-popconfirm
           title="确定禁用该素材吗?"
           v-if="scope.row.status == 10"
-          @confirm="changeStatus(scope.row.creativeId, 6, '禁用成功')"
+          @confirm="changeStatus(scope.row.stuffId, 6, '禁用成功')"
         >
           <template #reference>
             <el-button link type="primary" size="small">禁用</el-button>
           </template>
         </el-popconfirm>
+        <el-popconfirm
+          title="确定通过该素材吗?"
+          v-if="scope.row.status == 0"
+          @confirm="changeStatus(scope.row.stuffId, 10, '审核成功')"
+        >
+          <template #reference>
+            <el-button link type="primary" size="small">审核</el-button>
+          </template>
+        </el-popconfirm>
         <el-button link type="primary" size="small" @click="() => creatEditPlan(scope.row)">
           修改
         </el-button>