| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | 
							- <template>
 
- 	<!-- 轮播详情 -->
 
- 	<view>
 
- 		<u-parse :html="dom"></u-parse>
 
- 		<u-toast ref="uToast" />
 
- 	</view>
 
- </template>
 
- <script>
 
- 	export default {
 
- 		data() {
 
- 			return {
 
- 				dom: ''
 
- 			}
 
- 		},
 
- 		onLoad(page) {
 
- 			if (page.id) {
 
- 				this.getDetails(page.id)
 
- 			}
 
- 		},
 
- 		methods: {
 
- 			// 获取详情
 
- 			getDetails(id) {
 
- 				this.$u.api.getIndexBannerList()
 
- 				.then(res=>{
 
- 					if (res.code === 200) {
 
- 						const list = res.data
 
- 						list.forEach(item => {
 
- 							if (item.id == id) {
 
- 								this.dom = item.content
 
- 							}
 
- 						})
 
- 					} else {
 
- 						this.$refs.uToast.show({
 
- 							title: res.msg,
 
- 							type: 'error'
 
- 						})
 
- 					}
 
- 				})
 
- 				.catch(err => {
 
- 					this.$refs.uToast.show({
 
- 						title: '操作失败!',
 
- 						type: 'error'
 
- 					})
 
- 				})
 
- 			}
 
- 		}
 
- 	}
 
- </script>
 
- <style>
 
- page{padding: 24rpx;}
 
- </style>
 
 
  |