ccj 3 년 전
부모
커밋
4a28a2c712

+ 4 - 1
.gitignore

@@ -44,7 +44,10 @@ mvnw.cmd
 
 ### target ###
 /target/
-/unpackage/
+/unpackage/cache/
+/unpackage/debug/
+/unpackage/dist/
+
 
 ###node_modules###
 /node_modules/

+ 7 - 4
App.vue

@@ -95,16 +95,19 @@
 			}, err => {});
 			// 监听在线消息事件  
 			plus.push.addEventListener("receive", function(msg) {
+				var title = msg.content.split(':')[0]
+				var content = msg.content.split(':')[1]
+				
 				let params = {
 					inApp: true, // app内横幅提醒
 					voice: true, // 声音提醒
 					vibration: true, // 振动提醒
-					messageType: '',
-					messageTitle: msg.title,
-					messageContent: msg.content,
+					messageType: "",
+					messageTitle: title,
+					messageContent: content,
 					messageImage: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/logo.png'
 				}
-				console.log("params", params)
+				console.log("msg", msg)
 				new app_push({
 					...params
 				}).show();

+ 79 - 79
components/APPPush/app_push.js

@@ -26,7 +26,7 @@ export class appPush{
 	    //弹窗容器宽度
 	    this.popupViewWidth = this.propotation * 710;
 	    // 弹窗容器高度
-	    this.popupViewHeight = this.propotation * 192;
+	    this.popupViewHeight = this.propotation * 152;
 	    // 弹窗容器的Padding
 	    this.viewContentPadding = this.propotation * 30;
 		// 弹框容器的宽度
@@ -36,7 +36,7 @@ export class appPush{
 		// 过度时间
 		this.duration = 200
 		// 关闭时间
-		this.closeTime = 5000
+		this.closeTime = 10000
 		
 		console.log(this.inApp, this.voice, this.vibration)
 		
@@ -69,67 +69,67 @@ export class appPush{
 		})
 		// 绘制白色背景
 		view.drawRect({
-			color:"#fff",
+			color:"#626262",
 			radius:"10px"
 		})
 		let viewContentList = [
-			{
-				src: '/static/push/message-icon.png',
-				id: 'icon',
-				tag: 'img',
-				position: {
-					top: this.viewContentPadding + "px",
-					left: this.viewContentPadding + "px",
-					width: (this.propotation * 24) + 'px',
-					height: (this.propotation * 24) + 'px',
-				}
-			},
-			{
-				tag: 'font',
-				id: 'pop-title',
-				text: this.messageType,
-				textStyles: {
-					size: (this.propotation * 24) + 'px',
-					align: "left",
-					color: "#4F555B"
-				},
-				position: {
-					top: this.viewContentPadding + "px",
-					left: (this.propotation * 64) + 'px',
-					height: (this.propotation * 24) + 'px',
-					width: this.viewContentWidth + "px",
-				}
-			},
-			{
-				tag: 'font',
-				id: 'time',
-				text: this.messageTime,
-				textStyles: {
-					size: (this.propotation * 24) + 'px',
-					align: "right",
-					color: "#4F555B"
-				},
-				position: {
-					top: this.viewContentPadding + "px",
-					left: this.viewContentPadding + "px",
-					height: (this.propotation * 24) + 'px',
-					width: this.viewContentWidth + "px",
-				}
-			},
+			// {
+			// 	src: '/static/push/message-icon.png',
+			// 	id: 'icon',
+			// 	tag: 'img',
+			// 	position: {
+			// 		top: this.viewContentPadding + "px",
+			// 		left: this.viewContentPadding + "px",
+			// 		width: (this.propotation * 24) + 'px',
+			// 		height: (this.propotation * 24) + 'px',
+			// 	}
+			// },
+			// {
+			// 	tag: 'font',
+			// 	id: 'pop-title',
+			// 	text: this.messageType,
+			// 	textStyles: {
+			// 		size: (this.propotation * 24) + 'px',
+			// 		align: "left",
+			// 		color: "#4F555B"
+			// 	},
+			// 	position: {
+			// 		top: this.viewContentPadding + "px",
+			// 		left: (this.propotation * 64) + 'px',
+			// 		height: (this.propotation * 24) + 'px',
+			// 		width: this.viewContentWidth + "px",
+			// 	}
+			// },
+			// {
+			// 	tag: 'font',
+			// 	id: 'time',
+			// 	text: this.messageTime,
+			// 	textStyles: {
+			// 		size: (this.propotation * 24) + 'px',
+			// 		align: "right",
+			// 		color: "#4F555B"
+			// 	},
+			// 	position: {
+			// 		top: this.viewContentPadding + "px",
+			// 		left: this.viewContentPadding + "px",
+			// 		height: (this.propotation * 24) + 'px',
+			// 		width: this.viewContentWidth + "px",
+			// 	}
+			// },
 			{
 				tag: 'font',
 				id: 'push-title',
 				text: this.messageTitle,
 				textStyles: {
-					size: (this.propotation * 30) + 'px',
+					size: (this.propotation * 35) + 'px',
 					align: "left",
-					color: "#202123",
+					color: "#f7f7f7",
 					overflow: "ellipsis"
 				},
 				position: {
-					top: (this.propotation * 82) + 'px',
+					top: this.viewContentPadding + 'px',
 					left: (this.propotation * 30) + 'px',
-					height: (this.propotation * 30) + 'px',
+					height: (this.propotation * 35) + 'px',
 					width: (this.propotation * 505) + 'px',
 				}
 			},
@@ -138,42 +138,42 @@ export class appPush{
 				id: 'push-content',
 				text: this.messageContent,
 				textStyles: {
-					size: (this.propotation * 24) + 'px',
+					size: (this.propotation * 28) + 'px',
 					align: "left",
-					color: "#4F555B",
+					color: "#f7f7f7",
 					overflow: "ellipsis"
 				},
 				position: {
-					top: (this.propotation * 130) + 'px',
+					top: (this.propotation * 90) + 'px',
 					left: (this.propotation * 30) + 'px',
-					height: (this.propotation * 24) + 'px',
-					width: (this.propotation * 505) + 'px',
-				}
-			},
-			{
-				src: this.messageImage,
-				id: 'image',
-				tag: 'img',
-				position: {
-					top: (this.propotation * 68) + 'px',
-					// right: "0px",
-					left: (this.propotation * 586) + 'px',
-					width: (this.propotation * 100) + 'px',
-					height: (this.propotation * 100) + 'px',
-				}
-			},
-			{
-				src: '/static/push/img-bg.png',
-				id: 'img-bg',
-				tag: 'img',
-				position: {
-					top: (this.propotation * 68) + 'px',
-					// right: "0px",
-					left: (this.propotation * 586) + 'px',
-					width: (this.propotation * 100) + 'px',
-					height: (this.propotation * 100) + 'px',
+					height: (this.propotation * 28) + 'px',
+					width: (this.propotation * 655) + 'px',
 				}
 			},
+			// {
+			// 	src: this.messageImage,
+			// 	id: 'image',
+			// 	tag: 'img',
+			// 	position: {
+			// 		top: (this.propotation * 68) + 'px',
+			// 		// right: "0px",
+			// 		left: (this.propotation * 586) + 'px',
+			// 		width: (this.propotation * 100) + 'px',
+			// 		height: (this.propotation * 100) + 'px',
+			// 	}
+			// },
+			// {
+			// 	src: '/static/push/img-bg.png',
+			// 	id: 'img-bg',
+			// 	tag: 'img',
+			// 	position: {
+			// 		top: (this.propotation * 68) + 'px',
+			// 		// right: "0px",
+			// 		left: (this.propotation * 586) + 'px',
+			// 		width: (this.propotation * 100) + 'px',
+			// 		height: (this.propotation * 100) + 'px',
+			// 	}
+			// },
 		]
 		view.draw(viewContentList)
 		// view.addEventListener("click",(e)=>{

+ 21 - 1
manifest.json

@@ -67,7 +67,27 @@
                 "ad" : {},
                 "oauth" : {},
                 "push" : {
-                    "unipush" : {}
+                    "unipush" : {
+                        "icons" : {
+                            "push" : {
+                                // push图标,规格与应用图片一致,不配置则默认使用push图标  
+                                "ldpi" : "unpackage/res/icon/48x48.png",
+                                "mdpi" : "unpackage/res/icon/48x48.png",
+                                "hdpi" : "unpackage/res/icon/72x72.png",
+                                "xhdpi" : "unpackage/res/icon/96x96.png",
+                                "xxhdpi" : "unpackage/res/icon/144x144.png",
+                                "xxxhdpi" : "unpackage/res/icon/192x192.png"
+                            },
+                            "small" : {
+                                //  左上角小图标
+                                "ldpi" : "unpackage/res/icon/18x18.png",
+                                "mdpi" : "unpackage/res/icon/24x24.png",
+                                "hdpi" : "unpackage/res/icon/36x36.png",
+                                "xhdpi" : "unpackage/res/icon/48x48.png",
+                                "xxhdpi" : "unpackage/res/icon/72x72.png"
+                            }
+                        }
+                    }
                 },
                 "maps" : {
                     "amap" : {

+ 11 - 5
pages/business/business.vue

@@ -142,6 +142,14 @@
 			var userInfo = uni.getStorageSync("userInfo")
 			var that = this
 			console.log("userInfo", userInfo)
+			// setTimeout(function() {
+			// 	that.$api.doRequest('get', '/appVersion/test', {
+			// 		userId: "7e83070d05fc4d50aaa46e00a3ee03d8"
+			// 	}).then(res => {
+					
+			// 	})
+			// }, 500);
+			
 			this.$api.doRequest('get', '/salePlanInfo/getTips', {
 				phone: userInfo.phone
 			}).then(res => {
@@ -266,8 +274,7 @@
 			async loadData(type = 'add', loading) {
 				const that = this
 				uni.showLoading({
-					title: '正在加载',
-					mask: true
+					title: '正在加载'
 				})
 				var param1 = ''
 				if (that.TabCur == 0) {
@@ -351,8 +358,7 @@
 			getIndexBuyData() {
 				const that = this
 				uni.showLoading({
-					title: '正在加载',
-					mask: true
+					title: '正在加载'
 				})
 				var param1 = ''
 				if (that.TabCur == 0) {
@@ -770,7 +776,7 @@
 		border-radius: 10px;
 		background: #fff;
 		padding: 0upx 30upx 20upx;
-		margin: 8px;
+		margin: 18upx;
 		/* border-bottom: 1px solid #ccc; */
 	}
 

BIN
unpackage/res/icon/144x144.png


BIN
unpackage/res/icon/18x18.png


BIN
unpackage/res/icon/192x192.png


BIN
unpackage/res/icon/24x24.png


BIN
unpackage/res/icon/36x36.png


BIN
unpackage/res/icon/48x48.png


BIN
unpackage/res/icon/72x72.png


BIN
unpackage/res/icon/96x96.png


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png