guhongwei il y a 2 ans
Parent
commit
0e1c6b133f
2 fichiers modifiés avec 50 ajouts et 47 suppressions
  1. 0 1
      pagesHome/order/detail.vue
  2. 50 46
      pagesRest/article/index.vue

+ 0 - 1
pagesHome/order/detail.vue

@@ -60,7 +60,6 @@
 						</view>
 						<view class="five">
 							<view class="five_1">
-								<!-- <rich-text :nodes="info.brief"></rich-text> -->
 								<u-parse :content="info.brief"></u-parse>
 							</view>
 						</view>

+ 50 - 46
pagesRest/article/index.vue

@@ -1,55 +1,59 @@
 <template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<rich-text :nodes="info.content"></rich-text>
-			</view>
-		</view>
-	</mobile-frame>
+  <mobile-frame>
+    <view class="main">
+      <view class="one">
+        <u-parse :content="info.content"></u-parse>
+      </view>
+    </view>
+  </mobile-frame>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				id: '',
-				info: {}
-			};
-		},
-		onLoad: function(e) {
-			const that = this;
-			that.$set(that, `id`, e.id || '')
-		},
-		onShow: function() {
-			const that = this;
-			that.search();
-		},
-		methods: {
-			async search() {
-				const that = this;
-				const res = await that.$api(`/banner/${that.id}`, 'GET');
-				if (res.errcode == '0') {
-					that.$set(that, `info`, res.data)
-				} else {
-					uni.showToast({
-						title: res.errmsg,
-						icon: 'none'
-					})
-				}
-			}
-		}
-	}
+import uParse from "@/components/u-parse/u-parse.vue";
+export default {
+  components: {
+    uParse,
+  },
+  data() {
+    return {
+      id: "",
+      info: {},
+    };
+  },
+  onLoad: function (e) {
+    const that = this;
+    that.$set(that, `id`, e.id || "");
+  },
+  onShow: function () {
+    const that = this;
+    that.search();
+  },
+  methods: {
+    async search() {
+      const that = this;
+      const res = await that.$api(`/banner/${that.id}`, "GET");
+      if (res.errcode == "0") {
+        that.$set(that, `info`, res.data);
+      } else {
+        uni.showToast({
+          title: res.errmsg,
+          icon: "none",
+        });
+      }
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
+.main {
+  display: flex;
+  flex-direction: column;
+  width: 100vw;
+  height: 100vh;
 
-		.one {
-			padding: 2vw;
-		}
-	}
+  .one {
+    padding: 2vw;
+  }
+}
 </style>