xiaol 3 周之前
父節點
當前提交
ccd3184246
共有 6 個文件被更改,包括 39 次插入22 次删除
  1. 1 1
      .hbuilderx/launch.json
  2. 5 2
      components/gaoyia-parse/libs/html2json.js
  3. 1 0
      library/upapp.js
  4. 2 2
      manifest.json
  5. 4 1
      pages/guild/index.vue
  6. 26 16
      pages/news/index.vue

+ 1 - 1
.hbuilderx/launch.json

@@ -16,7 +16,7 @@
             "type" : "uniCloud"
         },
         {
-            "playground" : "custom",
+            "playground" : "standard",
             "type" : "uni-app:app-android"
         }
     ]

+ 5 - 2
components/gaoyia-parse/libs/html2json.js

@@ -25,9 +25,12 @@ function makeMap(str) {
 // Block Elements - HTML 5
 const block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
 
-// Inline Elements - HTML 5
+// #ifdef APP
+const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
+// #endif
+// #ifndef APP
 const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
-
+// #endif
 // Elements that you can, intentionally, leave open
 // (and which close themselves)
 const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');

+ 1 - 0
library/upapp.js

@@ -12,6 +12,7 @@ export default function initSys() {
 						code: versionCode
 					})
 					.then(res => {
+						console.log(res.data.app_code,8888)
 						if (res.code == 200) {
 							if (appType != "ios") {
 								if (wgtinfo.versionCode < res.data.app_code) {

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易趣CBB",
     "appid" : "__UNI__2978829",
     "description" : "一款电商App",
-    "versionName" : "3.2.6",
-    "versionCode" : 326,
+    "versionName" : "3.1.1",
+    "versionCode" : 311,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 4 - 1
pages/guild/index.vue

@@ -1,6 +1,9 @@
 <template>
 	<view>
-		<image src="https://apps.yiqucbb.cn/h5/tipImg.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
+		<image src="https://apps.yiqucbb.cn/h5/tipImg1.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
+		<image src="https://apps.yiqucbb.cn/h5/tipImg2.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
+		<image src="https://apps.yiqucbb.cn/h5/tipImg3.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
+		<image src="https://apps.yiqucbb.cn/h5/tipImg4.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
 		<!-- <view class="app-bg">
 			<image src="/static/img/tream_bg.png"></image>
 		</view>

+ 26 - 16
pages/news/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view id="box">
-			<u-parse :content="content" :noData="content" v-if="isShow"/>
+			<u-parse :content="content" :noData="content" v-if="isShow" :imageProp="imageProp" />
 		</view>
 	</view>
 </template>
@@ -10,33 +10,41 @@
 	import uParse from '@/components/gaoyia-parse/parse.vue'
 	export default {
 		components: {
-			uParse 
+			uParse
 		},
-		data() {
+		data () {
 			return {
-				content:"",
-				isShow:false
+				content: "",
+				isShow: false,
+				imageProp:{
+					mode: 'aspectFit',
+					padding: 0,
+					lazyLoad: false,
+					domain: ''
+				}
 			}
 		},
-		onLoad(options) {
+		onLoad (options) {
 			this.id = options.id || 0;
 			this.get_article();
 		},
 		methods: {
-			get_article(){
+			get_article () {
 				this
 					.request
-					.post("getContent",{id : this.id})
-					.then(res=>{
-						if(res.code == 200) {
+					.post("getContent", {
+						id: this.id
+					})
+					.then(res => {
+						if (res.code == 200) {
 							this.content = res.data.content;
 							uni.setNavigationBarTitle({
-								title:res.data.title
+								title: res.data.title
 							});
 							this.isShow = true;
 						}
 					})
-					.catch(err=>{
+					.catch(err => {
 						this.utils.Tip("网络错误,请稍后尝试");
 					});
 			}
@@ -44,16 +52,18 @@
 	}
 </script>
 
-<style  lang="scss">
+<style lang="scss">
 	@import url("/components/gaoyia-parse/parse.css");
-	
 	#box {
 		z-index: -1;
 		padding: 15px;
 	}
 	/deep/ {
-		.img{
+		/* #ifndef APP */
+		.img {
 			display: block !important;
+			width: 100%;
 		}
+		/* #endif */
 	}
-</style>
+</style>