bding vor 1 Jahr
Ursprung
Commit
f5b30b5642
1 geänderte Dateien mit 71 neuen und 2 gelöschten Zeilen
  1. 71 2
      pages-purchaser/writeNote/writeNote.vue

+ 71 - 2
pages-purchaser/writeNote/writeNote.vue

@@ -22,8 +22,8 @@
       <robbyImageUpload class="image-add-upload" :value="fileList" :limit="6" />
     </view>
     <view class="write-note-button">
-      <view class="write-note"> 草稿箱</view>
-      <view class="write-note"> 发布</view>
+      <view class="draft" @click="draftBtnHandler"> 草稿箱</view>
+      <view class="release" @click="releaseBtnHandler"> 发布</view>
     </view>
     <van-popup :show="showPopup" position="bottom" custom-style="height: 85%;" round custom-class="lable-class-popup">
       <viwe class="add-lable-box">
@@ -172,6 +172,42 @@ export default {
         this.companySelectedLable = this.companyLable.filter((key) => key.isActive);
       }
     },
+    // 草稿箱
+    draftBtnHandler() {
+      uni.showModal({
+        title: "是否保存当前修改",
+        content: "保存的草稿可在【内容中心】查看",
+        confirmColor: "#3385FF",
+        cancelColor: "#606266",
+        cancelText: "不保存",
+        confirmText: "保存",
+        success(res) {
+          if (res.confirm) {
+            console.log(22);
+          } else {
+            console.log(11);
+          }
+        },
+      });
+    },
+    // 发布
+    releaseBtnHandler() {
+      uni.showModal({
+        title: "确认发布",
+        content: "内容将提交给管理员审核后发布,确定要提交审核吗?",
+        confirmColor: "#3385FF",
+        cancelColor: "#606266",
+        // cancelText: "不保存",
+        // confirmText: "保存",
+        success(res) {
+          if (res.confirm) {
+            console.log(22);
+          } else {
+            console.log(11);
+          }
+        },
+      });
+    },
   },
   onLoad() {
     this.initNavBar();
@@ -182,6 +218,9 @@ export default {
 <style lang="scss" scope>
 .write-note {
   .nav-bar-wrap {
+    position:sticky;
+    top: 0;
+    left: 0;
     width: 100%;
     display: flex;
     align-items: center;
@@ -210,6 +249,7 @@ export default {
     }
   }
   background-color: #f3f5f9;
+  padding-bottom: 200rpx;
   .write-note-content {
     background-color: #fff;
     margin-top: 1rpx;
@@ -244,7 +284,36 @@ export default {
     }
   }
   .write-note-button {
+    position: fixed;
+    width: 100%;
+    bottom: 50rpx;
+    left: 0rpx;
+    z-index: 99;
     display: flex;
+    padding: 0 35rpx;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+    .draft {
+      margin-right: 20rpx;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 216rpx;
+      height: 72rpx;
+      color: #376cbb;
+      background-color: #e5efff;
+      border-radius: 9rpx;
+    }
+    .release {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      height: 72rpx;
+      border-radius: 9rpx;
+      color: #ffff;
+      background-color: #376cbb;
+    }
   }
   .lable-class-popup {
     padding: 30rpx;