Kaynağa Gözat

调整代码

zaijin 2 yıl önce
ebeveyn
işleme
c01fcb2e6f

+ 4 - 3
h5_web/App.vue

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

+ 87 - 85
h5_web/pages/policyInfo/policyInfoDetails.vue

@@ -1,96 +1,98 @@
 <template>
-	<view class="policyinfodetails">
-		<u-navbar back-text="" title="" back-icon-color="#FFFFFF" :background="{background: '#3D5D4C' }"></u-navbar>
-		<view class="policyinfodetails-header">
-			<view class="policyinfodetails-header-title">{{ policyInfoDetailsObj.artTitle }}</view>
-			<view class="policyinfodetails-header-subtitle">
-				<view>来源:{{ policyInfoDetailsObj.artAuthor }}</view>
-				<view>{{ formatDate(policyInfoDetailsObj.createTime) }}</view>
-			</view>
-		</view>
-		<view class="policyinfodetails-content">
+  <view class="policyinfodetails">
+    <u-navbar back-text="" title="" back-icon-color="#FFFFFF" :background="{ background: '#3D5D4C' }"></u-navbar>
+    <view class="policyinfodetails-header">
+      <view class="policyinfodetails-header-title">{{ policyInfoDetailsObj.artTitle }}</view>
+      <view class="policyinfodetails-header-subtitle">
+        <view>来源:{{ policyInfoDetailsObj.artAuthor }}</view>
+        <view>{{ formatDate(policyInfoDetailsObj.createTime) }}</view>
+      </view>
+    </view>
+    <view class="policyinfodetails-content">
       <view class="ql-editor">
         <u-parse :html="policyInfoDetailsObj.artContent"></u-parse>
       </view>
-		</view>
-		<u-toast ref="uToast" />
-	</view>
+    </view>
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
-				policyInfoDetailsObj: ''
-			}
-		},
-		onLoad(page){
-			if (page.artId) {
-				this.getDetails(page.artId);
-			}
-		},
-		onShow(){
-			
-		},
-		methods:{
-			// 获取详情
-			getDetails(id) {
-				this.$u.api.policyInfo.getPolicyInfoDetails({ id: id })
-				.then(res=>{
-					if (res.code === 200) {
-						this.policyInfoDetailsObj = res.data;
-					} else {
-						this.$refs.uToast.show({
-							title: res.msg,
-							type: 'error'
-						});
-					}
-				})
-				.catch(err => {
-					this.$refs.uToast.show({
-						title: '操作失败!',
-						type: 'error'
-					});
-				})
-			},
-			/**
-			 * 初始化日期 MM-dd hh:mm
-			 */
-			formatDate(date) {
-				let value;
-				if (date) {
-					value = this.$u.timeFormat(date.replace(/-/g, '/'), 'mm-dd hh:MM')
-				}
-				return value;
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      policyInfoDetailsObj: ''
+    };
+  },
+  onLoad(page) {
+    if (page.artId) {
+      this.getDetails(page.artId);
+    }
+  },
+  onShow() {},
+  methods: {
+    // 获取详情
+    getDetails(id) {
+      this.$u.api.policyInfo
+        .getPolicyInfoDetails({
+          id: id
+        })
+        .then((res) => {
+          if (res.code === 200) {
+            this.policyInfoDetailsObj = res.data;
+          } else {
+            this.$refs.uToast.show({
+              title: res.msg,
+              type: 'error'
+            });
+          }
+        })
+        .catch((err) => {
+          this.$refs.uToast.show({
+            title: '操作失败!',
+            type: 'error'
+          });
+        });
+    },
+    /**
+     * 初始化日期 MM-dd hh:mm
+     */
+    formatDate(date) {
+      let value;
+      if (date) {
+        value = this.$u.timeFormat(date.replace(/-/g, '/'), 'mm-dd hh:MM');
+      }
+      return value;
+    }
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-	@import  '@/static/css/quill.bubble.scss';
-	@import  '@/static/css/quill.core.scss';
-	@import  '@/static/css/quill.snow.scss';
-	.policyinfodetails {
-		padding: 30rpx 44rpx;
-		font-family: 'PingFangSC-Regular, PingFang SC';
-		&-header {
-			border-bottom: solid 1px #DBDBDB;
-			padding-bottom: 22rpx;
-			&-title {
-				color: #000;
-				font-size: 36rpx;
-			}
-			&-subtitle {
-				margin-top: 20rpx;
-				display: flex;
-				justify-content: space-between;
-				color: #6F6F6F;
-				font-size: 24rpx;
-			}
-		}
-		&-content {
-			padding: 18rpx 0;
-		}
-	}
+.policyinfodetails {
+  padding: 30rpx 44rpx;
+  font-family: 'PingFangSC-Regular, PingFang SC';
+
+  &-header {
+    border-bottom: solid 1px #dbdbdb;
+    padding-bottom: 22rpx;
+
+    &-title {
+      color: #000;
+      font-size: 36rpx;
+    }
+
+    &-subtitle {
+      margin-top: 20rpx;
+      display: flex;
+      justify-content: space-between;
+      color: #6f6f6f;
+      font-size: 24rpx;
+    }
+  }
+
+  &-content {
+    padding: 18rpx 0;
+  }
+}
 </style>

+ 44 - 51
h5_web/pages/policyNewsDetails/policyNewsDetails.vue

@@ -1,56 +1,49 @@
 <template>
-	<view class="ql-editor">
-		<u-parse :html="content"></u-parse>
-		<u-toast ref="uToast" />
-	</view>
+  <view class="ql-editor">
+    <u-parse :html="content"></u-parse>
+    <u-toast ref="uToast" />
+  </view>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{
-				content:''
-			}
-		},
-		onLoad(page){
-			if (page.artId) {
-				this.getDetails(page.artId)
-			}
-		},
-		onShow(){
-			
-		},
-		methods:{
-			// 获取详情
-			getDetails(id) {
-				this.$u.api.getPolicyNewsDetails({id:id})
-				.then(res=>{
-					console.log('getNewsDetails',JSON.parse(JSON.stringify(res)));
-					if (res.code === 200) {
-						console.log(res.data);
-						this.content = res.data.artContent;
-					} else {
-						this.$refs.uToast.show({
-							title: res.msg,
-							type: 'error'
-						})
-					}
-				})
-				.catch(err => {
-					this.$refs.uToast.show({
-						title: '操作失败!',
-						type: 'error'
-					})
-				})
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      content: ''
+    };
+  },
+  onLoad(page) {
+    if (page.artId) {
+      this.getDetails(page.artId);
+    }
+  },
+  onShow() {},
+  methods: {
+    // 获取详情
+    getDetails(id) {
+      this.$u.api
+        .getPolicyNewsDetails({
+          id: id
+        })
+        .then((res) => {
+          console.log('getNewsDetails', JSON.parse(JSON.stringify(res)));
+          if (res.code === 200) {
+            console.log(res.data);
+            this.content = res.data.artContent;
+          } else {
+            this.$refs.uToast.show({
+              title: res.msg,
+              type: 'error'
+            });
+          }
+        })
+        .catch((err) => {
+          this.$refs.uToast.show({
+            title: '操作失败!',
+            type: 'error'
+          });
+        });
+    }
+  }
+};
 </script>
-
-<style lang="scss" scoped>
-	// page{padding: 24rpx;}
-	// @import  './policyNewsDetails.scss'
-	@import  '@/static/css/quill.bubble.scss';
-	@import  '@/static/css/quill.core.scss';
-	@import  '@/static/css/quill.snow.scss';
-</style>

BIN
h5_web/static/jpeg/836ee345ca125ef429c04cfbabac0154.jpeg


BIN
h5_web/static/jpeg/a72f1cb8e19d649902859638ea458812.jpg


BIN
h5_web/static/jpeg/e2f3c933be411c565ec65cd49e832ac8.jpeg


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1
h5_web/static/js/jweixin-1.4.0.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 46
h5_web/static/js/mock.js


h5_web/static/css/quill.bubble.scss → h5_web/static/quill/quill.bubble.scss


h5_web/static/css/quill.core.scss → h5_web/static/quill/quill.core.scss


h5_web/static/css/quill.snow.scss → h5_web/static/quill/quill.snow.scss


h5_web/static/css/loading.scss → h5_web/static/styles/loading.scss


+ 1 - 1
h5_web/uni.scss

@@ -4,4 +4,4 @@
  * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 
  */
 @import 'uview-ui/theme.scss';
-@import '/static/css/loading.scss';
+@import '/static/styles/loading.scss';