Przeglądaj źródła

增加健康宣教路由

张田田 4 miesięcy temu
rodzic
commit
390798a0b6

+ 5 - 1
public/editor/preview.html

@@ -41,7 +41,11 @@
           const hashParams = location.hash.split('?')[1];
           const queryString = location.search || (hashParams ? `?${hashParams}` : '');
           const request = await fetch(`${location.origin}/manager/fdhb-mobile/psarticle/getPsarticleDetailById${queryString}`);
-          const result = await request.json();
+          // const result = await request.json();
+          alert('request status: ' + request.status + ', ok: ' + request.ok);
+          alert('request: ' + request);
+          const result = await JSON.parse(request.text());
+          alert('result: ' + result);
           document.title = result.title || `加载完成`;
           document.querySelector('.w-e-text-container').innerHTML = result.content || `暂无内容`;
           render(result);

Plik diff jest za duży
+ 0 - 1
src/components/EditEducation.vue


+ 7 - 6
src/pages/index/healthy/education.vue

@@ -12,8 +12,6 @@ import { notification } from 'ant-design-vue';
 
 import { type VxeFormListeners, type VxeFormProps, type VxeGridInstance, type VxeGridListeners, type VxeGridProps, VxeUI } from 'vxe-pc-ui';
 
-
-
 const model = shallowRef<EducationQuery>();
 const searchFormProps = reactive<VxeFormProps<EducationQuery>>({
   titleWidth: 100,
@@ -185,8 +183,11 @@ onSuccess(({ data: { data } }) => {
   gridRef.value?.loadData(data);
 });
 
-onMounted(() => {
+onMounted(async () => {
   model.value = toRaw(searchFormProps.data);
+  const request = await fetch(`${location.origin}/manager/fdhb-mobile/psarticle/getPsarticleDetailById?popularScienceArticleId=7`);
+  const result = await request.json();
+  console.log(result, 'result===result');
 });
 
 function updatePlanStatus(model: EducationModel, index: number, status: EducationModel['status']) {
@@ -194,12 +195,12 @@ function updatePlanStatus(model: EducationModel, index: number, status: Educatio
   const label = { '1': '禁用', '0': '启用' }[status];
   VxeUI.modal.confirm({
     title: `启用状态`,
-    content: `确认要 ${label} ${title} 宣教吗?`,
+    content: `确认要 ${label} ${title} 吗?`,
     showClose: false,
     onConfirm() {
       updateEducationStatusMethod({ id, status }).then(() => {
         notification.success({
-          message: `${label}宣教: ${title}`,
+          message: `${label}: ${title}`,
           description: '操作成功',
         });
         model.status = status;
@@ -213,7 +214,7 @@ function deleteEducation(model: EducationModel, index: number) {
   const { title } = model;
   VxeUI.modal.confirm({
     title: `删除宣教`,
-    content: `确认要删除 ${title} 宣教吗?`,
+    content: `确认要删除 ${title} 吗?`,
     showClose: false,
     onConfirm() {
       deleteEducationMethod(model).then(() => {

+ 32 - 32
src/request/api/account.api.ts

@@ -69,38 +69,38 @@ export function getMenusMethod(account: AccountModel) {
   return request.Get<AccountModel, any[]>(`/system/menu/getRouters`, {
     headers: { Authorization: account.token },
     transform(data) {
-      data.push(
-        {
-          path: '/',
-          children: [
-            {
-              path: 'healthy/education',
-              name: 'healthyEducation',
-              meta: { title: '健康宣教' },
-            },
-          ],
-        },
-        // {
-        //   path: '/',
-        //   children: [
-        //     {
-        //       path: 'notify/manage',
-        //       name: 'notifyManage',
-        //       meta: { title: '通知管理' },
-        //     },
-        //   ],
-        // },
-        // {
-        //   path: '/',
-        //   children: [
-        //     {
-        //       path: 'satisfaction/survey',
-        //       name: 'satisfactionSurvey',
-        //       meta: { title: '满意度调查' },
-        //     },
-        //   ],
-        // }
-      );
+      // data.push(
+      // {
+      //   path: '/',
+      //   children: [
+      //     {
+      //       path: 'healthy/education',
+      //       name: 'healthyEducation',
+      //       meta: { title: '健康宣教' },
+      //     },
+      //   ],
+      // },
+      // {
+      //   path: '/',
+      //   children: [
+      //     {
+      //       path: 'notify/manage',
+      //       name: 'notifyManage',
+      //       meta: { title: '通知管理' },
+      //     },
+      //   ],
+      // },
+      // {
+      //   path: '/',
+      //   children: [
+      //     {
+      //       path: 'satisfaction/survey',
+      //       name: 'satisfactionSurvey',
+      //       meta: { title: '满意度调查' },
+      //     },
+      //   ],
+      // }
+      // );
       console.log(data, 'push之后的data', transformMenus(data));
       return { ...account, menus: transformMenus(data) };
     },

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików