Procházet zdrojové kódy

修改banner详情为空的问题

yangzj před 2 roky
rodič
revize
f711c7c027
2 změnil soubory, kde provedl 11 přidání a 4 odebrání
  1. 3 0
      h5_web/App.vue
  2. 8 4
      h5_web/pages/bannerDetails/bannerDetails.vue

+ 3 - 0
h5_web/App.vue

@@ -13,6 +13,9 @@
 </script>
 
 <style lang="scss">
+	@import '@/static/css/quill.bubble.scss';
+	@import '@/static/css/quill.snow.scss';
+	@import '@/static/css/quill.core.scss';
 	/*每个页面公共css */
 	@import "uview-ui/index.scss";
 	#achievement .u-form-item--right__content__slot {

+ 8 - 4
h5_web/pages/bannerDetails/bannerDetails.vue

@@ -1,8 +1,9 @@
 <template>
 	<!-- 轮播详情 -->
 	<view>
-		<u-navbar back-text="" title="" back-icon-color="#FFFFFF" :background="{ background: '#3D5D4C' }" :border-bottom="false"></u-navbar>
-		<u-parse :html="dom"></u-parse>
+		<u-navbar back-text="" title="" back-icon-color="#FFFFFF" :background="{ background: '#3D5D4C' }"
+			:border-bottom="false"></u-navbar>
+		<u-parse class="ql-editor" :html="dom"></u-parse>
 		<u-toast ref="uToast" />
 	</view>
 </template>
@@ -16,15 +17,18 @@
 			}
 		},
 		onLoad(page) {
+			console.log(page);
 			if (page.id) {
-				this.getDetails(page.id);
 				this.type = page.type
+				this.getDetails(page.id);
 			}
 		},
 		methods: {
 			// 获取详情
 			getDetails(id) {
-				this.$u.api.indexApi.indexBannerListApi({ type: this.type }).then(res => {
+				this.$u.api.indexApi.indexBannerListApi({
+						type: this.type
+					}).then(res => {
 						if (res.code === 200) {
 							const list = res.data
 							list.forEach(item => {