liyongli 1 жил өмнө
parent
commit
1724047974

+ 26 - 17
src/api/2023.js

@@ -1,19 +1,28 @@
 import ajax from '@/utils/request.js';
 export function saveUser(data) {
-    return ajax({
-      url: 'user-inc/create',
-      method: 'POST',
-      urlType: 'slikRoad',
-      errorToast: '当前访问人数过多,请重试。',
-      data,
-    });
-  }
-  export function getTotal(data) {
-    return ajax({
-      url: 'user-inc/order',
-      method: 'GET',
-      urlType: 'slikRoad',
-      errorToast: '当前访问人数过多,请重试。',
-      data,
-    });
-  }
+  return ajax({
+    url: 'user-inc/create',
+    method: 'POST',
+    urlType: 'slikRoad',
+    errorToast: '当前访问人数过多,请重试。',
+    data
+  });
+}
+export function getTotal(data) {
+  return ajax({
+    url: 'user-inc/order',
+    method: 'GET',
+    urlType: 'slikRoad',
+    errorToast: '当前访问人数过多,请重试。',
+    data
+  });
+}
+export function submitworld(data) {
+  return ajax({
+    url: 'https://shuhua.smcic.net/keyword/save',
+    method: 'POST',
+    urlType: 'default',
+    errorToast: '当前访问人数过多,请重试。',
+    data
+  });
+}

+ 3 - 0
src/config/page.json

@@ -75,5 +75,8 @@
     },
     "IntangibleCulturalHeritageCeremony":{
         "title": "2024陕西省首届非遗年度盛典"
+    },
+    "mmg": {
+        "title": "漫漫逛热点推荐"
     }
 }

+ 9 - 0
src/view/mmg/index.js

@@ -0,0 +1,9 @@
+import App from './index.vue';
+import '@/assets/js/common';
+import { createApp } from 'vue';
+import { getPageParameters, environment } from '../../config/pageConfig';
+// 判断环境
+environment();
+window.$originData = getPageParameters();
+document.title = window.$originData.orginParames.title || '';
+createApp(App).mount('#app');

+ 54 - 0
src/view/mmg/index.vue

@@ -0,0 +1,54 @@
+<template>
+  <div class="mmg">
+    <div class="input-with-select">
+      <el-input  size="large" v-model="input2" style="width: 100%" placeholder="请输入关键字">
+        <template #append><div @click="submit">提交</div></template>
+      </el-input>
+    </div>
+  </div>
+</template>
+<script setup>
+// import { onMounted, reactive } from "vue";
+// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
+// console.log(window.$originData);
+/**
+ * window.$originData.orginParames.title 页面标题
+ * window.$originData.orginParames.parameters 固定参数值
+ * window.$originData.urlParames url参数
+ */
+import { submitworld } from '@/api/2023';
+import { ref } from 'vue';
+import { ElInput, ElMessage } from 'element-plus';
+import "element-plus/theme-chalk/base.css";
+import 'element-plus/theme-chalk/el-input.css';
+import 'element-plus/theme-chalk/el-message.css';
+
+const input2 = ref('');
+const submit = () => {
+    if(!input2.value) return ElMessage('请输入关键词')
+  const T = input2.value.replace(/\s+/g, '\n');
+  submitworld({ words: T }).then(r => {
+    ElMessage(r)
+  });
+};
+</script>
+<style lang="scss">
+.mmg {
+  width: 100vw;
+  height: 100vh;
+  padding-top: 30vh;
+
+  .input-with-select {
+    width: 60%;
+    margin: 0 auto;
+    display: block;
+    overflow: hidden;
+  }
+
+  .el-input-group__append {
+    background-color: #0078d4;
+    color: #fff;
+    cursor: pointer;
+  }
+}
+</style>