Browse Source

feat(publish/case): 发布设计案例功能的添加

EvilDragon 7 months ago
parent
commit
45b9a549d2
4 changed files with 57 additions and 1 deletions
  1. 5 1
      src/layouts/tabbar.vue
  2. 8 0
      src/pages.json
  3. 43 0
      src/pages/publish/cases/index.vue
  4. 1 0
      src/types/uni-pages.d.ts

+ 5 - 1
src/layouts/tabbar.vue

@@ -66,6 +66,10 @@ const toPublishMoment = () => {
   uni.navigateTo({ url: '/pages/publish/moment/index' })
   publishState.value = false
 }
+const toPublishCase = () => {
+  uni.navigateTo({ url: '/pages/publish/cases/index' })
+  publishState.value = false
+}
 </script>
 
 <template>
@@ -99,7 +103,7 @@ const toPublishMoment = () => {
                 个人动态
               </div>
             </div>
-            <div class="flex flex-col items-center">
+            <div class="flex flex-col items-center" @click="toPublishCase">
               <wd-img :src="iconWallet" width="66" mode="widthFix"></wd-img>
               <div class="text-black text-sm font-normal font-['PingFang SC'] leading-[21px]">
                 设计案例

+ 8 - 0
src/pages.json

@@ -212,6 +212,14 @@
       }
     },
     {
+      "path": "pages/publish/cases/index",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "设计案例",
+        "navigationBarBackgroundColor": "#fff"
+      }
+    },
+    {
       "path": "pages/publish/moment/index",
       "type": "page",
       "style": {

+ 43 - 0
src/pages/publish/cases/index.vue

@@ -0,0 +1,43 @@
+<route lang="yaml">
+style:
+  navigationBarTitleText: 设计案例
+  navigationBarBackgroundColor: '#fff'
+</route>
+<script setup lang="ts">
+import SectionHeading from '@/components/section-heading.vue'
+
+const value = ref('')
+const fileList = ref([])
+const action = ref('')
+const handleChange = (e: any) => {
+  console.log(e)
+}
+</script>
+<template>
+  <div class="flex-grow bg-white p-3.5 flex flex-col">
+    <wd-form ref="form">
+      <wd-cell-group border>
+        <wd-picker label="空间类型:" v-model="value" />
+        <wd-picker label="设计风格:" v-model="value" />
+        <wd-input label="空间位置:" v-model="value" placeholder="填写位置" />
+        <wd-textarea
+          label="客户需求:"
+          v-model="value"
+          placeholder="请简单描述客户的生活需求和您的设计理念"
+        />
+      </wd-cell-group>
+    </wd-form>
+
+    <wd-upload
+      :file-list="fileList"
+      image-mode="aspectFill"
+      :action="action"
+      @change="handleChange"
+    ></wd-upload>
+    <SectionHeading title="标签" custom-class="my-6" size="base"></SectionHeading>
+    <div class="flex-1"></div>
+    <div class="w-full">
+      <wd-button type="primary" :round="false" block>发布</wd-button>
+    </div>
+  </div>
+</template>

+ 1 - 0
src/types/uni-pages.d.ts

@@ -23,6 +23,7 @@ interface NavigateToOptions {
        "/pages/material/calculator/index" |
        "/pages/material/detail/index" |
        "/pages/material/recommend/index" |
+       "/pages/publish/cases/index" |
        "/pages/publish/moment/index" |
        "/pages/publish/tags/index";
 }