xiaoxin пре 1 година
родитељ
комит
465013f65e
8 измењених фајлова са 2929 додато и 2782 уклоњено
  1. 725 704
      my/apply/index.vue
  2. 553 517
      my/check/index.vue
  3. 387 355
      my/recruit/index.vue
  4. 158 184
      my/setting/feedback.vue
  5. 571 527
      pages/index/shop/im.vue
  6. 60 26
      pages/my/index.vue
  7. 2 20
      pages/order/feedback.vue
  8. 473 449
      pages/order/feedbacks.vue

Разлика између датотеке није приказан због своје велике величине
+ 725 - 704
my/apply/index.vue


Разлика између датотеке није приказан због своје велике величине
+ 553 - 517
my/check/index.vue


+ 387 - 355
my/recruit/index.vue

@@ -1,355 +1,387 @@
-<template>
-	<view>
-		<view class="hehuo_view" v-if="XCXIsSelect=='是'">
-			<image src="../../static/images/my/hezuobg.png"></image>
-			<view class="text_view">
-				<view class="item_view">
-					<view class="item_title">意向代理城市</view>
-					<input @click="goCity" type="text" disabled v-model="city" placeholder="请输入代理城市" />
-					<view class="xian"></view>
-				</view>
-
-				<view class="item_view">
-					<view class="item_title">姓名</view>
-					<input type="text" v-model="userName" placeholder="请输入姓名" />
-					<view class="xian"></view>
-				</view>
-				<view class="item_view">
-					<view class="item_title">联系电话</view>
-					<input type="number" v-model="phone" maxlength="11" placeholder="请输入联系电话" />
-					<view class="xian"></view>
-				</view>
-				<view class="item_view">
-					<view class="item_title">年龄</view>
-					<input type="number" v-model="age" maxlength="11" placeholder="请输入年龄" />
-					<view class="xian"></view>
-				</view>
-				<view class="item_view">
-					<view class="item_title">头像上传</view>
-					<view class="flex" style="overflow: hidden;flex-direction: initial;">
-						<view v-if="headImg.length">
-							<view class="margin-top flex margin-right-sm">
-								<view class="flex"
-									style="width: 150upx;height: 150upx;margin-right: 10rpx;position: relative;">
-									<image :src="headImg" style="width: 100%;height: 100%;"></image>
-									<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
-										@click="headImgremove(index)">
-										<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="margin-top" @click="addImage()" v-if="headImg.length<=0">
-							<view style="width: 150upx;height: 150upx;background: #F5F5F5;"
-								class="flex justify-center align-center">
-								<view>
-									<view class="text-center">
-										<image src="../../static/images/my/add.png"
-											style="width: 54upx;height: 47upx;position: relative;">
-										</image>
-									</view>
-									<view class="text-center text-xs margin-top-xs">上传图片</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-
-				<!-- <view class="audit_message" v-if="auditContent != '' && bb == 3">拒绝原因:{{auditContent}}</view> -->
-				<view class="save_btn" @tap="save" v-if="bb !=0">提交申请</view>
-				<!-- <view class="save_btn" v-if="status == 0">审核中</view> -->
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import configdata from '@/common/config.js';
-	export default {
-		data() {
-			return {
-				hotCitys: ['杭州', '天津', '北京', '上海', '深圳', '广州', '成都', '重庆', '厦门'],
-				locationValue: '正在定位...',
-				// auditContent: '',
-				city: '',
-				money: '',
-				teamNumber: '',
-				userName: '',
-				phone: '',
-				age: '',
-				headImg: [],
-				bb:true,
-				XCXIsSelect: '是',
-			}
-		},
-		onLoad() {
-			this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
-			if (this.XCXIsSelect == '否') {
-				uni.setNavigationBarTitle({
-					title: '隐私政策'
-				});
-			} else {
-				uni.setNavigationBarTitle({
-					title: '骑手招募'
-				});
-			}
-			this.getChannel();
-		},
-		methods: {
-			// 头像删除
-			headImgremove(index) {
-				this.headImg = ''
-			},
-			getChannel() {
-				let userId = this.$queue.getData('userId');
-				let data = {
-					userId: userId
-				}
-				this.$Request.getT('/app/artificer/selectAgencyById',data).then(res => {
-					if (res.code == 0) {
-						if (res.data == null) {
-							this.bb = 1;
-						} else {
-							this.bb = res.data.status;
-							this.city = res.data.city;
-							this.age = res.data.age;
-							this.headImg = res.data.img;
-							this.userName = res.data.name;
-							this.phone = res.data.phone;
-						}
-						console.log(this.bb)
-						// this.auditContent = res.data.auditContent;
-					}
-				});
-			},
-			//获取省市区
-			Getcity(latitude, longitude) {
-				this.$Request.get("/app/Login/selectCity", {
-					lat: latitude,
-					lng: longitude
-				}).then(res => {
-					console.log(res)
-					this.city = res.data.city
-					console.log(this.address)
-				});
-			},
-			goCity() {
-				let that = this
-				uni.chooseLocation({
-					success: function(res) {
-						console.log('位置名称:' + res.name);
-						console.log('详细地址:' + res.address);
-						console.log('纬度:' + res.latitude);
-						console.log('经度:' + res.longitude);
-						// that.city = res.address || '郑州'
-						that.Getcity(res.latitude, res.longitude)
-					}
-				});
-				// uni.getLocation({
-				// 	type: 'gcj02',
-				// 	geocode: true,
-				// 	success: function(res) {
-				// 		console.log('当前位置:' + res.address.city);
-				// 		that.city = res.address.city || '郑州'
-				// 	}
-				// });
-			},
-			save() {
-				// let isStudent = this.$queue.getData("isStudent");
-				// if (isStudent != 2) {
-				// 	uni.showModal({
-				// 		title: '温馨提示',
-				// 		content: '您还没有进行实名认证,请认证完成之后再来操作吧!',
-				// 		showCancel: true,
-				// 		cancelText: '取消',
-				// 		confirmText: '确认',
-				// 		success: res => {
-				// 			if (res.confirm) {
-				// 				uni.navigateTo({
-				// 					url: '/offlinetask/pages/public/authentication'
-				// 				});
-				// 			}
-				// 		}
-				// 	});
-				// 	return;
-				// }
-				// this.form.headImg = this.headImg
-				// this.headImg = this.headImg.toString();
-				if (this.city === '') {
-					this.$queue.showToast('请输入代理城市')
-					return;
-				}
-				if (this.userName === '') {
-					this.$queue.showToast('请输入姓名')
-					return;
-				}
-				if (this.phone === '' || this.phone.length != 11) {
-					this.$queue.showToast('请输入正确的手机号!')
-					return;
-				}
-				if (this.age === '') {
-					this.$queue.showToast('请输入年龄')
-					return;
-				}
-				if (this.headImg == '') {
-					this.$queue.showToast('请上传头像')
-					return;
-				}
-				let userId = this.$queue.getData('userId');
-				let data = {
-					userId: userId,
-					name: this.userName,
-					phone: this.phone,
-					age: this.age,
-					city: this.city,
-					img: this.headImg,
-				}
-				this.$Request.postJson('/app/artificer/insertAgency', data).then(res => {
-					if (res.code == 0) {
-						uni.hideLoading();
-						this.$queue.showToast('提交成功!');
-						setTimeout(d => {
-							uni.navigateBack();
-						}, 1000);
-					} else {
-						uni.hideLoading();
-						this.$queue.showToast(res.msg);
-					}
-				});
-			},
-			addImage() {
-				let that = this
-				uni.chooseImage({
-					count: 1,
-					sourceType: ['album', 'camera'],
-					success: res => {
-						for (let i = 0; i < 1; i++) {
-							that.$queue.showLoading("上传中...");
-							uni.uploadFile({ // 上传接口
-								url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
-								// url: 'https://anmo.xianmxkj.com/sqx_fast/alioss/upload',
-								filePath: res.tempFilePaths[i],
-								name: 'file',
-								success: (uploadFileRes) => {
-									console.log(uploadFileRes.data)
-									that.headImg = JSON.parse(uploadFileRes.data).data
-									console.log(that.headImg)
-									uni.hideLoading();
-								}
-							});
-						}
-					}
-				})
-			},
-			config: function(name) {
-				var info = null;
-				if (name) {
-					var name2 = name.split("."); //字符分割
-					if (name2.length > 1) {
-						info = configdata[name2[0]][name2[1]] || null;
-					} else {
-						info = configdata[name] || null;
-					}
-					if (info == null) {
-						let web_config = cache.get("web_config");
-						if (web_config) {
-							if (name2.length > 1) {
-								info = web_config[name2[0]][name2[1]] || null;
-							} else {
-								info = web_config[name] || null;
-							}
-						}
-					}
-				}
-				return info;
-			},
-		}
-	}
-</script>
-
-<style lang="less">
-	// @import '../../static/less/index.less';
-	// @import '../../static/css/index.css';
-
-	.hehuo_view {
-		width: 750rpx;
-		height: 1830upx;
-
-		image {
-			width: 750rpx;
-			height: 1830upx;
-			background-size: 100%;
-			position: absolute;
-		}
-
-		.text_view {
-			position: absolute;
-			z-index: 1;
-			width: 84%;
-			margin: 660rpx 50rpx 30rpx;
-
-			.audit_message {
-				color: red;
-				width: 650rpx;
-				height: 50rpx;
-				margin-top: 50rpx;
-			}
-
-			.save_btn {
-				width: 650rpx;
-				height: 88rpx;
-				background: #FFFFFF;
-				border-radius: 10rpx;
-
-				text-align: center;
-				line-height: 88rpx;
-				/* #ifdef MP-WEIXIN */
-				margin-top: 150rpx;
-				/* #endif */
-				/* #ifdef H5 */
-				margin-top: 100rpx;
-				/* #endif */
-				/* #ifdef APP-PLUS */
-				margin-top: 180rpx;
-				/* #endif */
-			}
-
-			.save_btn1 {
-				width: 650rpx;
-				height: 88rpx;
-				background: #FFFFFF;
-				border-radius: 10rpx;
-				margin-top: 100rpx;
-				text-align: center;
-				line-height: 88rpx;
-			}
-
-			.item_view {
-				margin-top: 30rpx;
-
-				.item_title {
-					font-size: 28rpx;
-					font-family: PingFang SC Heavy, PingFang SC Heavy-Heavy;
-					font-weight: 800;
-					color: #333333;
-				}
-
-				input {
-					margin-top: 20rpx;
-					height: 40rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC Regular, PingFang SC Regular-Regular;
-					font-weight: 400;
-					color: #333333;
-				}
-
-				.xian {
-					width: 630rpx;
-					height: 1rpx;
-					border: 1rpx solid #77D7B0;
-					margin-top: 10rpx;
-				}
-			}
-		}
-	}
-</style>
+<template>
+	<view>
+		<view class="hehuo_view" v-if="XCXIsSelect == '是'">
+			<image src="../../static/images/my/hezuobg.png"></image>
+			<view class="text_view">
+				<view class="item_view">
+					<view class="item_title">意向代理城市</view>
+					<input @click="goCity" type="text" disabled v-model="city" placeholder="请输入代理城市" />
+					<view class="xian"></view>
+				</view>
+
+				<view class="item_view">
+					<view class="item_title">姓名</view>
+					<input type="text" v-model="userName" placeholder="请输入姓名" />
+					<view class="xian"></view>
+				</view>
+				<view class="item_view">
+					<view class="item_title">联系电话</view>
+					<input type="number" v-model="phone" maxlength="11" placeholder="请输入联系电话" />
+					<view class="xian"></view>
+				</view>
+				<view class="item_view">
+					<view class="item_title">年龄</view>
+					<input type="number" v-model="age" maxlength="11" placeholder="请输入年龄" />
+					<view class="xian"></view>
+				</view>
+				<view class="item_view">
+					<view class="item_title">头像上传</view>
+					<view class="flex" style="overflow: hidden; flex-direction: initial">
+						<view v-if="headImg.length">
+							<view class="margin-top flex margin-right-sm">
+								<view class="flex" style="width: 150upx; height: 150upx; margin-right: 10rpx; position: relative">
+									<image :src="headImg" style="width: 100%; height: 100%"></image>
+									<view style="z-index: 9; position: absolute; top: -15rpx; right: -15rpx" @click="headImgremove(index)">
+										<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="margin-top" @click="addImage()" v-if="headImg.length <= 0">
+							<view style="width: 150upx; height: 150upx; background: #f5f5f5" class="flex justify-center align-center">
+								<view>
+									<view class="text-center">
+										<image src="../../static/images/my/add.png" style="width: 54upx; height: 47upx; position: relative"></image>
+									</view>
+									<view class="text-center text-xs margin-top-xs">上传图片</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- <view class="audit_message" v-if="auditContent != '' && bb == 3">拒绝原因:{{auditContent}}</view> -->
+				<view class="save_btn" @tap="save" v-if="bb != 0">提交申请</view>
+				<!-- <view class="save_btn" v-if="status == 0">审核中</view> -->
+			</view>
+		</view>
+
+		<!-- 用于图片压缩的canvas画布 -->
+		<canvas
+			:style="{
+				width: cw + 'px',
+				height: cw + 'px',
+				position: 'absolute',
+				zIndex: -1,
+				left: '-10000rpx',
+				top: '-10000rpx'
+			}"
+			canvas-id="zipCanvas"
+		></canvas>
+		<!--画布结束-->
+	</view>
+</template>
+
+<script>
+import configdata from '@/common/config.js'
+import getLessLimitSizeImage from '@/utils/imageCompress.js'
+export default {
+	data() {
+		return {
+			hotCitys: ['杭州', '天津', '北京', '上海', '深圳', '广州', '成都', '重庆', '厦门'],
+			locationValue: '正在定位...',
+			// auditContent: '',
+			city: '',
+			money: '',
+			teamNumber: '',
+			userName: '',
+			phone: '',
+			age: '',
+			headImg: [],
+			bb: true,
+			XCXIsSelect: '是',
+			//画板边长默认是屏幕宽度,正方形画布
+			cw: uni.getSystemInfoSync().windowWidth
+		}
+	},
+	onLoad() {
+		this.XCXIsSelect = this.$queue.getData('XCXIsSelect')
+		if (this.XCXIsSelect == '否') {
+			uni.setNavigationBarTitle({
+				title: '隐私政策'
+			})
+		} else {
+			uni.setNavigationBarTitle({
+				title: '骑手招募'
+			})
+		}
+		this.getChannel()
+	},
+	methods: {
+		// 头像删除
+		headImgremove(index) {
+			this.headImg = ''
+		},
+		getChannel() {
+			let userId = this.$queue.getData('userId')
+			let data = {
+				userId: userId
+			}
+			this.$Request.getT('/app/artificer/selectAgencyById', data).then((res) => {
+				if (res.code == 0) {
+					if (res.data == null) {
+						this.bb = 1
+					} else {
+						this.bb = res.data.status
+						this.city = res.data.city
+						this.age = res.data.age
+						this.headImg = res.data.img
+						this.userName = res.data.name
+						this.phone = res.data.phone
+					}
+					console.log(this.bb)
+					// this.auditContent = res.data.auditContent;
+				}
+			})
+		},
+		//获取省市区
+		Getcity(latitude, longitude) {
+			this.$Request
+				.get('/app/Login/selectCity', {
+					lat: latitude,
+					lng: longitude
+				})
+				.then((res) => {
+					console.log(res)
+					this.city = res.data.city
+					console.log(this.address)
+				})
+		},
+		goCity() {
+			let that = this
+			uni.chooseLocation({
+				success: function (res) {
+					console.log('位置名称:' + res.name)
+					console.log('详细地址:' + res.address)
+					console.log('纬度:' + res.latitude)
+					console.log('经度:' + res.longitude)
+					// that.city = res.address || '郑州'
+					that.Getcity(res.latitude, res.longitude)
+				}
+			})
+			// uni.getLocation({
+			// 	type: 'gcj02',
+			// 	geocode: true,
+			// 	success: function(res) {
+			// 		console.log('当前位置:' + res.address.city);
+			// 		that.city = res.address.city || '郑州'
+			// 	}
+			// });
+		},
+		save() {
+			// let isStudent = this.$queue.getData("isStudent");
+			// if (isStudent != 2) {
+			// 	uni.showModal({
+			// 		title: '温馨提示',
+			// 		content: '您还没有进行实名认证,请认证完成之后再来操作吧!',
+			// 		showCancel: true,
+			// 		cancelText: '取消',
+			// 		confirmText: '确认',
+			// 		success: res => {
+			// 			if (res.confirm) {
+			// 				uni.navigateTo({
+			// 					url: '/offlinetask/pages/public/authentication'
+			// 				});
+			// 			}
+			// 		}
+			// 	});
+			// 	return;
+			// }
+			// this.form.headImg = this.headImg
+			// this.headImg = this.headImg.toString();
+			if (this.city === '') {
+				this.$queue.showToast('请输入代理城市')
+				return
+			}
+			if (this.userName === '') {
+				this.$queue.showToast('请输入姓名')
+				return
+			}
+			if (this.phone === '' || this.phone.length != 11) {
+				this.$queue.showToast('请输入正确的手机号!')
+				return
+			}
+			if (this.age === '') {
+				this.$queue.showToast('请输入年龄')
+				return
+			}
+			if (this.headImg == '') {
+				this.$queue.showToast('请上传头像')
+				return
+			}
+			let userId = this.$queue.getData('userId')
+			let data = {
+				userId: userId,
+				name: this.userName,
+				phone: this.phone,
+				age: this.age,
+				city: this.city,
+				img: this.headImg
+			}
+			this.$Request.postJson('/app/artificer/insertAgency', data).then((res) => {
+				if (res.code == 0) {
+					uni.hideLoading()
+					this.$queue.showToast('提交成功!')
+					setTimeout((d) => {
+						uni.navigateBack()
+					}, 1000)
+				} else {
+					uni.hideLoading()
+					this.$queue.showToast(res.msg)
+				}
+			})
+		},
+		addImage() {
+			let that = this
+			uni.chooseImage({
+				count: 1,
+				sourceType: ['album', 'camera'],
+				success: (res) => {
+					for (let i = 0; i < 1; i++) {
+						//这里的id和页面中写的html代码的canvas的id要一致
+						let canvasId = 'zipCanvas'
+						//原图的路径
+						let imagePath = res.tempFiles[i].path
+						//大小限制
+						let limitSize = 1024 * 2
+						//初始绘画区域是画布自身的宽度也就是屏幕宽度
+						let drawWidth = uni.getSystemInfoSync().windowWidth
+						let that = this
+						getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
+							uni.showLoading({
+								title: '上传中'
+							})
+							uni.uploadFile({
+								url: that.config('APIHOST1') + '/alioss/upload',
+								filePath: resPath,
+								name: 'file',
+								success: (uploadFileRes) => {
+									console.log(uploadFileRes.data)
+									that.headImg = JSON.parse(uploadFileRes.data).data
+									console.log(that.headImg)
+									uni.hideLoading()
+								},
+								fail: () => {
+									uni.showToast({
+										title: '上传失败',
+										icon: 'error'
+									})
+								}
+							})
+						})
+					}
+				}
+			})
+		},
+		config: function (name) {
+			var info = null
+			if (name) {
+				var name2 = name.split('.') //字符分割
+				if (name2.length > 1) {
+					info = configdata[name2[0]][name2[1]] || null
+				} else {
+					info = configdata[name] || null
+				}
+				if (info == null) {
+					let web_config = cache.get('web_config')
+					if (web_config) {
+						if (name2.length > 1) {
+							info = web_config[name2[0]][name2[1]] || null
+						} else {
+							info = web_config[name] || null
+						}
+					}
+				}
+			}
+			return info
+		}
+	}
+}
+</script>
+
+<style lang="less">
+// @import '../../static/less/index.less';
+// @import '../../static/css/index.css';
+
+.hehuo_view {
+	width: 750rpx;
+	height: 1830upx;
+
+	image {
+		width: 750rpx;
+		height: 1830upx;
+		background-size: 100%;
+		position: absolute;
+	}
+
+	.text_view {
+		position: absolute;
+		z-index: 1;
+		width: 84%;
+		margin: 660rpx 50rpx 30rpx;
+
+		.audit_message {
+			color: red;
+			width: 650rpx;
+			height: 50rpx;
+			margin-top: 50rpx;
+		}
+
+		.save_btn {
+			width: 650rpx;
+			height: 88rpx;
+			background: #ffffff;
+			border-radius: 10rpx;
+
+			text-align: center;
+			line-height: 88rpx;
+			/* #ifdef MP-WEIXIN */
+			margin-top: 150rpx;
+			/* #endif */
+			/* #ifdef H5 */
+			margin-top: 100rpx;
+			/* #endif */
+			/* #ifdef APP-PLUS */
+			margin-top: 180rpx;
+			/* #endif */
+		}
+
+		.save_btn1 {
+			width: 650rpx;
+			height: 88rpx;
+			background: #ffffff;
+			border-radius: 10rpx;
+			margin-top: 100rpx;
+			text-align: center;
+			line-height: 88rpx;
+		}
+
+		.item_view {
+			margin-top: 30rpx;
+
+			.item_title {
+				font-size: 28rpx;
+				font-family: PingFang SC Heavy, PingFang SC Heavy-Heavy;
+				font-weight: 800;
+				color: #333333;
+			}
+
+			input {
+				margin-top: 20rpx;
+				height: 40rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC Regular, PingFang SC Regular-Regular;
+				font-weight: 400;
+				color: #333333;
+			}
+
+			.xian {
+				width: 630rpx;
+				height: 1rpx;
+				border: 1rpx solid #77d7b0;
+				margin-top: 10rpx;
+			}
+		}
+	}
+}
+</style>

+ 158 - 184
my/setting/feedback.vue

@@ -1,184 +1,158 @@
-<template>
-	<view class="page" style="background-color: #ffffff;" v-if="XCXIsSelect=='是'">
-		<view class="feedback-title">
-			<text>问题和意见</text>
-			<text @tap="chooseMsg">快速键入</text>
-		</view>
-		<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.feedbackMessage" class="feedback-textare" /></view>
-		<view class="feedback-title"><text>联系方式</text></view>
-		<view class="feedback-body"><input class="feedback-input" v-model="sendDate.userEmail" placeholder="方便我们联系你" /></view>
-
-		<button style="" class="feedback-submit" @tap="send">提交</button>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			XCXIsSelect: '是',
-			msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
-			stars: [1, 2, 3, 4, 5],
-			imageList: [],
-			sendDate: {
-				score: 5,
-				feedbackMessage: '',
-				userEmail: ''
-			}
-		};
-	},
-	onLoad() {
-		this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
-		// let deviceInfo = {
-		// 	appid: plus.runtime.appid,
-		// 	imei: plus.device.imei, //设备标识
-		// 	p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
-		// 	md: plus.device.model, //设备型号
-		// 	app_version: plus.runtime.version,
-		// 	plus_version: plus.runtime.innerVersion, //基座版本号
-		// 	os: plus.os.version,
-		// 	net: '' + plus.networkinfo.getCurrentType()
-		// };
-		// this.sendDate = Object.assign(deviceInfo, this.sendDate);
-	},
-	methods: {
-		close(e) {
-			this.imageList.splice(e, 1);
-		},
-		chooseMsg() {
-			//快速输入
-			uni.showActionSheet({
-				itemList: this.msgContents,
-				success: res => {
-					this.sendDate.feedbackMessage = this.msgContents[res.tapIndex];
-				}
-			});
-		},
-		chooseImg() {
-			//选择图片
-			uni.chooseImage({
-				sourceType: ['camera', 'album'],
-				sizeType: 'compressed',
-				count: 8 - this.imageList.length,
-				success: res => {
-					this.imageList = this.imageList.concat(res.tempFilePaths);
-				}
-			});
-		},
-		chooseStar(e) {
-			//点击评星
-			this.sendDate.score = e;
-		},
-		previewImage() {
-			//预览图片
-			uni.previewImage({
-				urls: this.imageList
-			});
-		},
-		send() {
-			//发送反馈
-			console.log(JSON.stringify(this.sendDate));
-
-			if (!this.sendDate.feedbackMessage) {
-				uni.showToast({
-					icon: 'none',
-					title: '请输入反馈内容'
-				});
-				return;
-			}
-			if (!this.sendDate.userEmail) {
-				uni.showToast({
-					icon: 'none',
-					title: '请填写联系方式'
-				});
-				return;
-			}
-			this.$queue.showLoading('加载中...');
-			this.$Request.postJson('/app/userinfo/userFeedback', {
-				userEmail: this.sendDate.userEmail,
-				feedbackMessage: this.sendDate.feedbackMessage,
-				feedbackType: 1
-			}).then(res => {
-				if (res.code === 0) {
-					uni.showToast({
-						title: '提交成功'
-					});
-					setTimeout(function() {
-						uni.navigateBack();
-					}, 1000);
-				} else {
-					uni.hideLoading();
-					uni.showModal({
-						showCancel: false,
-						title: '提交失败',
-						feedbackMessage: res.msg
-					});
-				}
-			});
-		}
-	}
-};
-</script>
-
-<style>
-@font-face {
-	font-family: uniicons;
-	font-weight: normal;
-	font-style: normal;
-	src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
-}
-page {
-	background-color: #F5F5F5 !important;
-}
-view {
-	font-size: 28upx;
-}
-
-
-/*问题反馈*/
-.feedback-title {
-	display: flex;
-	flex-direction: row;
-	justify-content: space-between;
-	align-items: center;
-	padding: 20upx;
-	color: #8f8f94;
-	font-size: 28upx;
-}
-.feedback-star-view.feedback-title {
-	justify-content: flex-start;
-	margin: 0;
-}
-
-.feedback-body {
-	font-size: 32upx;
-	padding: 16upx;
-	margin: 16upx;
-	border-radius: 16upx;
-	background: #FFFFFF;
-	/* color: #FFF; */
-}
-.feedback-textare {
-	height: 200upx;
-	font-size: 34upx;
-	line-height: 50upx;
-	width: 100%;
-	box-sizing: border-box;
-	padding: 20upx 30upx 0;
-
-}
-.feedback-input {
-	font-size: 32upx;
-	height: 60upx;
-	/* padding: 15upx 20upx; */
-	line-height: 60upx;
-}
-
-
-.feedback-submit {
-	background: #FFCC00;
-	/* color: #ffffff; */
-	margin: 20upx;
-	margin-top: 32upx;
-}
-</style>
+<template>
+	<view class="page" style="background-color: #ffffff" v-if="XCXIsSelect == '是'">
+		<view class="feedback-title">
+			<text>问题和意见</text>
+			<text @tap="chooseMsg">快速键入</text>
+		</view>
+		<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.feedbackMessage" class="feedback-textare" /></view>
+		<view class="feedback-title"><text>联系方式</text></view>
+		<view class="feedback-body"><input class="feedback-input" v-model="sendDate.userEmail" placeholder="方便我们联系你" /></view>
+
+		<button style="" class="feedback-submit" @tap="send">提交</button>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			XCXIsSelect: '是',
+			msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
+			sendDate: {
+				score: 5,
+				feedbackMessage: '',
+				userEmail: ''
+			}
+		}
+	},
+	onLoad() {
+		this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
+		// let deviceInfo = {
+		// 	appid: plus.runtime.appid,
+		// 	imei: plus.device.imei, //设备标识
+		// 	p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
+		// 	md: plus.device.model, //设备型号
+		// 	app_version: plus.runtime.version,
+		// 	plus_version: plus.runtime.innerVersion, //基座版本号
+		// 	os: plus.os.version,
+		// 	net: '' + plus.networkinfo.getCurrentType()
+		// };
+		// this.sendDate = Object.assign(deviceInfo, this.sendDate);
+	},
+	methods: {
+		chooseMsg() {
+			//快速输入
+			uni.showActionSheet({
+				itemList: this.msgContents,
+				success: (res) => {
+					this.sendDate.feedbackMessage = this.msgContents[res.tapIndex]
+				}
+			})
+		},
+
+		send() {
+			//发送反馈
+			console.log(JSON.stringify(this.sendDate))
+
+			if (!this.sendDate.feedbackMessage) {
+				uni.showToast({
+					icon: 'none',
+					title: '请输入反馈内容'
+				})
+				return
+			}
+			if (!this.sendDate.userEmail) {
+				uni.showToast({
+					icon: 'none',
+					title: '请填写联系方式'
+				})
+				return
+			}
+			this.$queue.showLoading('加载中...')
+			this.$Request
+				.postJson('/app/userinfo/userFeedback', {
+					userEmail: this.sendDate.userEmail,
+					feedbackMessage: this.sendDate.feedbackMessage,
+					feedbackType: 1
+				})
+				.then((res) => {
+					if (res.code === 0) {
+						uni.showToast({
+							title: '提交成功'
+						})
+						setTimeout(function () {
+							uni.navigateBack()
+						}, 1000)
+					} else {
+						uni.hideLoading()
+						uni.showModal({
+							showCancel: false,
+							title: '提交失败',
+							feedbackMessage: res.msg
+						})
+					}
+				})
+		}
+	}
+}
+</script>
+
+<style>
+@font-face {
+	font-family: uniicons;
+	font-weight: normal;
+	font-style: normal;
+	src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
+}
+page {
+	background-color: #f5f5f5 !important;
+}
+view {
+	font-size: 28upx;
+}
+
+/*问题反馈*/
+.feedback-title {
+	display: flex;
+	flex-direction: row;
+	justify-content: space-between;
+	align-items: center;
+	padding: 20upx;
+	color: #8f8f94;
+	font-size: 28upx;
+}
+.feedback-star-view.feedback-title {
+	justify-content: flex-start;
+	margin: 0;
+}
+
+.feedback-body {
+	font-size: 32upx;
+	padding: 16upx;
+	margin: 16upx;
+	border-radius: 16upx;
+	background: #ffffff;
+	/* color: #FFF; */
+}
+.feedback-textare {
+	height: 200upx;
+	font-size: 34upx;
+	line-height: 50upx;
+	width: 100%;
+	box-sizing: border-box;
+	padding: 20upx 30upx 0;
+}
+.feedback-input {
+	font-size: 32upx;
+	height: 60upx;
+	/* padding: 15upx 20upx; */
+	line-height: 60upx;
+}
+
+.feedback-submit {
+	background: #ffcc00;
+	/* color: #ffffff; */
+	margin: 20upx;
+	margin-top: 32upx;
+}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 571 - 527
pages/index/shop/im.vue


+ 60 - 26
pages/my/index.vue

@@ -172,11 +172,26 @@
 			<img src="../../static/images/my/13.png" style="width: 60rpx; height: 60rpx" mode="scaleToFill" />
 			<view class="serviceBtn_text">联系客服</view>
 		</view>
+
+		<!-- 用于图片压缩的canvas画布 -->
+		<canvas
+			:style="{
+				width: cw + 'px',
+				height: cw + 'px',
+				position: 'absolute',
+				zIndex: -1,
+				left: '-10000rpx',
+				top: '-10000rpx'
+			}"
+			canvas-id="zipCanvas"
+		></canvas>
+		<!--画布结束-->
 	</view>
 </template>
 
 <script>
 import configdata from '@/common/config.js'
+import getLessLimitSizeImage from '@/utils/imageCompress.js'
 export default {
 	data() {
 		return {
@@ -203,7 +218,9 @@ export default {
 			time: '',
 
 			qishouAppId: '', //骑手APPID
-			shopAppId: '' //商户appid
+			shopAppId: '', //商户appid
+			//画板边长默认是屏幕宽度,正方形画布
+			cw: uni.getSystemInfoSync().windowWidth
 		}
 	},
 	onLoad() {
@@ -358,34 +375,51 @@ export default {
 						})
 					} else if (index === 1) {
 						uni.chooseImage({
-							count: 1, //默认9
-							sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-							sourceType: ['album'], //从相册选择
-							success: function (res) {
-								uni.showLoading({
-									title: '上传中...',
-									mask: true // 是否显示透明蒙层,防止触摸穿透
-								})
+							count: 1,
+							sourceType: ['album'],
+							success: (res) => {
 								let token = uni.getStorageSync('token')
-								uni.uploadFile({
-									// url: config.APIHOST1 + '/alioss/upload', //仅为示例,非真实的接口地址
-									url: that.config('APIHOST1') + '/alioss/upload', //仅为示例,非真实的接口地址
-									filePath: res.tempFilePaths[0],
-									header: {
-										token: token
-									},
-									name: 'file',
-									success: (uploadFileRes) => {
-										url = JSON.parse(uploadFileRes.data).data
-										that.$Request.postJson('/app/user/updateUserImageUrl?avatar=' + url).then((res) => {
-											uni.hideLoading()
-											if (res.code === 0) {
-												that.$queue.showToast('更新成功')
-												that.getUserInfo()
+
+								for (let i = 0; i < res.tempFiles.length; i++) {
+									//这里的id和页面中写的html代码的canvas的id要一致
+									let canvasId = 'zipCanvas'
+									//原图的路径
+									let imagePath = res.tempFiles[i].path
+									//大小限制
+									let limitSize = 1024 * 2
+									//初始绘画区域是画布自身的宽度也就是屏幕宽度
+									let drawWidth = uni.getSystemInfoSync().windowWidth
+									let that = this
+									getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
+										uni.showLoading({
+											title: '上传中'
+										})
+										uni.uploadFile({
+											url: that.config('APIHOST') + '/alioss/upload',
+											filePath: resPath,
+											header: {
+												token: token
+											},
+											name: 'file',
+											success: (uploadFileRes) => {
+												url = JSON.parse(uploadFileRes.data).data
+												that.$Request.postJson('/app/user/updateUserImageUrl?avatar=' + url).then((res) => {
+													uni.hideLoading()
+													if (res.code === 0) {
+														that.$queue.showToast('更新成功')
+														that.getUserInfo()
+													}
+												})
+											},
+											fail: () => {
+												uni.showToast({
+													title: '上传失败',
+													icon: 'error'
+												})
 											}
 										})
-									}
-								})
+									})
+								}
 							}
 						})
 					}

+ 2 - 20
pages/order/feedback.vue

@@ -171,9 +171,7 @@ export default {
 		removeImg(index) {
 			this.shopBanner.splice(index, 1)
 		},
-		close(e) {
-			this.imageList.splice(e, 1)
-		},
+
 		chooseMsg() {
 			//快速输入
 			uni.showActionSheet({
@@ -183,27 +181,11 @@ export default {
 				}
 			})
 		},
-		chooseImg() {
-			//选择图片
-			uni.chooseImage({
-				sourceType: ['camera', 'album'],
-				sizeType: 'compressed',
-				count: 8 - this.imageList.length,
-				success: (res) => {
-					this.imageList = this.imageList.concat(res.tempFilePaths)
-				}
-			})
-		},
 		chooseStar(e) {
 			//点击评星
 			this.sendDate.score = e
 		},
-		previewImage() {
-			//预览图片
-			uni.previewImage({
-				urls: this.imageList
-			})
-		},
+
 		send() {
 			//发送反馈
 			// console.log(this.sendDate,'111111111');

+ 473 - 449
pages/order/feedbacks.vue

@@ -1,449 +1,473 @@
-<template>
-	<view class="page">
-		<view class="feedback-title">
-			<text>是否满意</text>
-			<text @tap="chooseMsg">{{satisfactionFlagName?satisfactionFlagName:'请选择是否满意'}}</text>
-		</view>
-		<view class="feedback-body">
-			<textarea placeholder="请输入你的评价..." v-model="sendDate.content" class="feedback-textare" />
-		</view>
-		<!-- <view class="feedback-title"><text>QQ/邮箱</text></view> -->
-		<!-- <view class="feedback-body"><input class="feedback-input" v-model="sendDate.mail" placeholder="方便我们联系你 " /></view> -->
-		
-		<!-- <view class="text-white padding bg radius margin-tb-sm">
-			<view>
-				<view class="text-lg text-black">评价图(可多张)</view>
-				<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
-					<view>
-						<view class="margin-top flex margin-right-sm flex-wrap">
-							<view class="flex"
-								style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
-								v-for="(image,index) in shopBanner" :key="index">
-								<image :src="image" style="width: 100%;height: 100%;"></image>
-								<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
-									@click="removeImg(index)">
-									<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
-								</view>
-		
-							</view>
-							<view class="flex"
-								style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;" @click="addImages(2)" v-if="shopBanner.length<9">
-								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
-									class="flex justify-center align-center">
-									<view>
-										<view class="text-center">
-											<image src="/static/images/addimg.png" style="width: 65rpx;height: 55rpx;">
-											</image>
-										</view>
-										<view class="text-center text-black">添加图片</view>
-									</view>
-								</view>
-									
-							</view>
-						</view>
-					</view>
-					
-				</view>
-			</view>
-		</view> -->
-		<!-- <view class="feedback-title feedback-star-view">
-			<text>订单评分</text>
-			<view class="feedback-star-view">
-			</view>
-			<u-rate :count="count" min-count='1' active-color="#FCD202" v-model="value"></u-rate>
-		</view> -->
-		<button type="primary" style="background: #FCD202;margin-top: 32upx;" class="feedback-submit"
-			@tap="send">提交</button>
-	</view>
-</template>
-
-<script>
-	import configUrl from '../../common/config.js'
-	export default {
-		data() {
-			return {
-				satisfactionFlag:0,
-				satisfactionFlagName:'满意',
-				shopBanner: [],
-				msgContents: ['满意', '不满意'],
-				stars: [1, 2, 3, 4, 5],
-				imageList: [],
-				sendDate: {
-					score: 5,
-					content: '',
-					contact: '',
-					goodsId: '',
-					ordersId: '',
-					orderNumber: '',
-					shopId: ''
-				},
-				
-				count: 5,
-				value: 5,
-				goodsId: '',
-				ordersId: '',
-				orderNumber: '',
-				indentNumber:''
-			};
-		},
-		onLoad(e) {
-			this.indentNumber = e.indentNumber;
-			// this.sendDate.goodsId = e.goodsId
-			// this.sendDate.ordersId = e.ordersId
-			// this.sendDate.orderNumber = e.orderNumber
-			// this.sendDate.shopId = e.shopId
-			// let deviceInfo = {
-			// 	appid: plus.runtime.appid,
-			// 	imei: plus.device.imei, //设备标识
-			// 	p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
-			// 	md: plus.device.model, //设备型号
-			// 	app_version: plus.runtime.version,
-			// 	plus_version: plus.runtime.innerVersion, //基座版本号
-			// 	os: plus.os.version,
-			// 	net: '' + plus.networkinfo.getCurrentType()
-			// };
-			// this.sendDate = Object.assign(deviceInfo, this.sendDate);
-		},
-		methods: {
-			// 图片上传
-			addImages(e) {
-				let that = this
-				uni.chooseImage({
-					count: 9,
-					sourceType: ['album', 'camera'],
-					success: res => {
-						for (let i = 0; i < res.tempFilePaths.length; i++) {
-							that.$queue.showLoading("上传中...");
-							uni.uploadFile({ // 上传接口
-								// url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
-								// url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload',
-								url:configUrl.APIHOST+'/alioss/upload',
-								filePath: res.tempFilePaths[i],
-								name: 'file',
-								success: (uploadFileRes) => {
-									if (that.shopBanner.length < 9) {
-										if(JSON.parse(uploadFileRes.data).data){
-											that.shopBanner.push(JSON.parse(uploadFileRes.data).data)
-										}else{
-											uni.showToast({
-												title:'图片上传失败,请重试',
-												icon:'none'
-											})
-										}
-										
-									}
-									console.log(that.shopBanner)
-									uni.hideLoading();
-								}
-							});
-						}
-					}
-				})
-			},
-			// 评价图删除
-			removeImg(index) {
-				this.shopBanner.splice(index, 1)
-			},
-			close(e) {
-				this.imageList.splice(e, 1);
-			},
-			chooseMsg() {
-				//快速输入
-				uni.showActionSheet({
-					itemList: this.msgContents,
-					success: res => {
-						console.log(res.tapIndex)
-						this.satisfactionFlagName = this.msgContents[res.tapIndex];
-						this.satisfactionFlag = res.tapIndex;
-					}
-				});
-			},
-			chooseImg() {
-				//选择图片
-				uni.chooseImage({
-					sourceType: ['camera', 'album'],
-					sizeType: 'compressed',
-					count: 8 - this.imageList.length,
-					success: res => {
-						this.imageList = this.imageList.concat(res.tempFilePaths);
-					}
-				});
-			},
-			chooseStar(e) {
-				//点击评星
-				this.sendDate.score = e;
-			},
-			previewImage() {
-				//预览图片
-				uni.previewImage({
-					urls: this.imageList
-				});
-			},
-			send() {
-				//发送反馈
-				// console.log(this.sendDate,'111111111');
-				// console.log(this.shopBanner.join(','),'22222222222222222')
-				
-				if(!this.satisfactionFlagName){
-					uni.showToast({
-						icon: 'none',
-						title: '请选择是否满意'
-					});
-					return;
-				}
-				
-				if (!this.sendDate.content) {
-					uni.showToast({
-						icon: 'none',
-						title: '请输入评价内容'
-					});
-					return;
-				}
-				
-				// if(!this.shopBanner.length){
-				// 	uni.showToast({
-				// 		icon: 'none',
-				// 		title: '请上传评价图'
-				// 	});
-				// 	return;
-				// }
-				this.$queue.showLoading('加载中...');
-				// console.log(this.orderNumber)
-				
-				this.$Request.postJson('/app/apperrandevaluate/userEvaluate', {
-					indentNumber: this.indentNumber,
-					evaluateMessage: this.sendDate.content,
-					satisfactionFlag: this.satisfactionFlag
-				}).then(res => {
-					if (res.code === 0) {
-						uni.showToast({
-							title: '评价成功'
-						});
-						setTimeout(function() {
-							uni.navigateBack();
-						}, 1000);
-					} else {
-						uni.hideLoading();
-						uni.showModal({
-							showCancel: false,
-							title: '评价失败',
-							content: res.msg
-						});
-					}
-				});
-			}
-		}
-	};
-</script>
-
-<style>
-	@font-face {
-		font-family: uniicons;
-		font-weight: normal;
-		font-style: normal;
-		src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
-	}
-
-	page {
-		background-color: #FFFFFF;
-	}
-
-	view {
-		font-size: 28upx;
-	}
-
-	.input-view {
-		font-size: 28upx;
-	}
-
-	.close-view {
-		text-align: center;
-		line-height: 14px;
-		height: 16px;
-		width: 16px;
-		border-radius: 50%;
-		background: #ff5053;
-		color: #ffffff;
-		position: absolute;
-		top: -6px;
-		right: -4px;
-		font-size: 12px;
-	}
-
-	/* 上传 */
-	.uni-uploader {
-		flex: 1;
-		flex-direction: column;
-	}
-
-	.uni-uploader-head {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-	}
-
-	.uni-uploader-info {
-		color: #b2b2b2;
-	}
-
-	.uni-uploader-body {
-		margin-top: 16upx;
-	}
-
-	.uni-uploader__files {
-		display: flex;
-		flex-direction: row;
-		flex-wrap: wrap;
-	}
-
-	.uni-uploader__file {
-		margin: 10upx;
-		width: 210upx;
-		height: 210upx;
-	}
-
-	.uni-uploader__img {
-		display: block;
-		width: 210upx;
-		height: 210upx;
-	}
-
-	.uni-uploader__input-box {
-		position: relative;
-		margin: 10upx;
-		width: 208upx;
-		height: 208upx;
-		border: 2upx solid #d9d9d9;
-	}
-
-	.uni-uploader__input-box:before,
-	.uni-uploader__input-box:after {
-		content: ' ';
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		-webkit-transform: translate(-50%, -50%);
-		transform: translate(-50%, -50%);
-		background-color: #d9d9d9;
-	}
-
-	.uni-uploader__input-box:before {
-		width: 4upx;
-		height: 79upx;
-	}
-
-	.uni-uploader__input-box:after {
-		width: 79upx;
-		height: 4upx;
-	}
-
-	.uni-uploader__input-box:active {
-		border-color: #999999;
-	}
-
-	.uni-uploader__input-box:active:before,
-	.uni-uploader__input-box:active:after {
-		background-color: #999999;
-	}
-
-	.uni-uploader__input {
-		position: absolute;
-		z-index: 1;
-		top: 0;
-		left: 0;
-		width: 100%;
-		height: 100%;
-		opacity: 0;
-	}
-
-	/*问题反馈*/
-	.feedback-title {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		align-items: center;
-		padding: 20upx;
-		color: #333333;
-		font-size: 28upx;
-	}
-
-	.feedback-star-view.feedback-title {
-		justify-content: flex-start;
-		margin: 0;
-	}
-
-	.feedback-quick {
-		position: relative;
-		padding-right: 40upx;
-	}
-
-	.feedback-quick:after {
-		font-family: uniicons;
-		font-size: 40upx;
-		content: '\e581';
-		position: absolute;
-		right: 0;
-		top: 50%;
-		color: #bbb;
-		-webkit-transform: translateY(-50%);
-		transform: translateY(-50%);
-	}
-
-	.feedback-body {
-		font-size: 32upx;
-		padding: 16upx;
-		margin: 16upx;
-		border-radius: 16upx;
-		background: #F2F2F2;
-		color: #FFF;
-	}
-
-	.feedback-textare {
-		height: 200upx;
-		font-size: 30upx;
-		line-height: 50upx;
-		width: 100%;
-		box-sizing: border-box;
-		padding: 10upx 0upx 0;
-		color: #8f8f94;
-	}
-
-	.feedback-input {
-		font-size: 32upx;
-		height: 60upx;
-		padding: 15upx 20upx;
-		line-height: 60upx;
-	}
-
-	.feedback-uploader {
-		padding: 22upx 20upx;
-	}
-
-	.feedback-star {
-		font-family: uniicons;
-		font-size: 40upx;
-		margin-left: 6upx;
-	}
-
-	.feedback-star-view {
-		margin-left: 20upx;
-	}
-
-	.feedback-star:after {
-		content: '\e408';
-	}
-
-	.feedback-star.active {
-		color: #ffb400;
-	}
-
-	.feedback-star.active:after {
-		content: '\e438';
-	}
-
-	.feedback-submit {
-		background: #007aff;
-		color: #ffffff;
-		margin: 20upx;
-	}
-</style>
+<template>
+	<view class="page">
+		<view class="feedback-title">
+			<text>是否满意</text>
+			<text @tap="chooseMsg">{{ satisfactionFlagName ? satisfactionFlagName : '请选择是否满意' }}</text>
+		</view>
+		<view class="feedback-body">
+			<textarea placeholder="请输入你的评价..." v-model="sendDate.content" class="feedback-textare" />
+		</view>
+		<!-- <view class="feedback-title"><text>QQ/邮箱</text></view> -->
+		<!-- <view class="feedback-body"><input class="feedback-input" v-model="sendDate.mail" placeholder="方便我们联系你 " /></view> -->
+
+		<!-- <view class="text-white padding bg radius margin-tb-sm">
+			<view>
+				<view class="text-lg text-black">评价图(可多张)</view>
+				<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
+					<view>
+						<view class="margin-top flex margin-right-sm flex-wrap">
+							<view class="flex"
+								style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
+								v-for="(image,index) in shopBanner" :key="index">
+								<image :src="image" style="width: 100%;height: 100%;"></image>
+								<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
+									@click="removeImg(index)">
+									<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
+								</view>
+		
+							</view>
+							<view class="flex"
+								style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;" @click="addImages(2)" v-if="shopBanner.length<9">
+								<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
+									class="flex justify-center align-center">
+									<view>
+										<view class="text-center">
+											<image src="/static/images/addimg.png" style="width: 65rpx;height: 55rpx;">
+											</image>
+										</view>
+										<view class="text-center text-black">添加图片</view>
+									</view>
+								</view>
+									
+							</view>
+						</view>
+					</view>
+					
+				</view>
+			</view>
+		</view> -->
+		<!-- <view class="feedback-title feedback-star-view">
+			<text>订单评分</text>
+			<view class="feedback-star-view">
+			</view>
+			<u-rate :count="count" min-count='1' active-color="#FCD202" v-model="value"></u-rate>
+		</view> -->
+		<button type="primary" style="background: #fcd202; margin-top: 32upx" class="feedback-submit" @tap="send">提交</button>
+
+		<!-- 用于图片压缩的canvas画布 -->
+		<canvas
+			:style="{
+				width: cw + 'px',
+				height: cw + 'px',
+				position: 'absolute',
+				zIndex: -1,
+				left: '-10000rpx',
+				top: '-10000rpx'
+			}"
+			canvas-id="zipCanvas"
+		></canvas>
+		<!--画布结束-->
+	</view>
+</template>
+
+<script>
+import configUrl from '../../common/config.js'
+import getLessLimitSizeImage from '@/utils/imageCompress.js'
+export default {
+	data() {
+		return {
+			satisfactionFlag: 0,
+			satisfactionFlagName: '满意',
+			shopBanner: [],
+			msgContents: ['满意', '不满意'],
+			stars: [1, 2, 3, 4, 5],
+			imageList: [],
+			sendDate: {
+				score: 5,
+				content: '',
+				contact: '',
+				goodsId: '',
+				ordersId: '',
+				orderNumber: '',
+				shopId: ''
+			},
+
+			count: 5,
+			value: 5,
+			goodsId: '',
+			ordersId: '',
+			orderNumber: '',
+			indentNumber: '',
+			//画板边长默认是屏幕宽度,正方形画布
+			cw: uni.getSystemInfoSync().windowWidth
+		}
+	},
+	onLoad(e) {
+		this.indentNumber = e.indentNumber
+		// this.sendDate.goodsId = e.goodsId
+		// this.sendDate.ordersId = e.ordersId
+		// this.sendDate.orderNumber = e.orderNumber
+		// this.sendDate.shopId = e.shopId
+		// let deviceInfo = {
+		// 	appid: plus.runtime.appid,
+		// 	imei: plus.device.imei, //设备标识
+		// 	p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
+		// 	md: plus.device.model, //设备型号
+		// 	app_version: plus.runtime.version,
+		// 	plus_version: plus.runtime.innerVersion, //基座版本号
+		// 	os: plus.os.version,
+		// 	net: '' + plus.networkinfo.getCurrentType()
+		// };
+		// this.sendDate = Object.assign(deviceInfo, this.sendDate);
+	},
+	methods: {
+		// 图片上传
+		addImages(e) {
+			let that = this
+			uni.chooseImage({
+				count: 9,
+				sourceType: ['album', 'camera'],
+				success: (res) => {
+					for (let i = 0; i < res.tempFiles.length; i++) {
+						//这里的id和页面中写的html代码的canvas的id要一致
+						let canvasId = 'zipCanvas'
+						//原图的路径
+						let imagePath = res.tempFiles[i].path
+						//大小限制
+						let limitSize = 1024 * 2
+						//初始绘画区域是画布自身的宽度也就是屏幕宽度
+						let drawWidth = uni.getSystemInfoSync().windowWidth
+						let that = this
+						getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
+							uni.showLoading({
+								title: '上传中'
+							})
+							uni.uploadFile({
+								url: configUrl.APIHOST + '/alioss/upload',
+								filePath: resPath,
+								name: 'file',
+								success: (uploadFileRes) => {
+									if (that.shopBanner.length < 9) {
+										if (JSON.parse(uploadFileRes.data).data) {
+											that.shopBanner.push(JSON.parse(uploadFileRes.data).data)
+										} else {
+											uni.showToast({
+												title: '图片上传失败,请重试',
+												icon: 'none'
+											})
+										}
+									}
+									console.log(that.shopBanner)
+									uni.hideLoading()
+								},
+								fail: () => {
+									uni.showToast({
+										title: '上传失败',
+										icon: 'error'
+									})
+								}
+							})
+						})
+					}
+				}
+			})
+		},
+		// 评价图删除
+		removeImg(index) {
+			this.shopBanner.splice(index, 1)
+		},
+		close(e) {
+			this.imageList.splice(e, 1)
+		},
+		chooseMsg() {
+			//快速输入
+			uni.showActionSheet({
+				itemList: this.msgContents,
+				success: (res) => {
+					console.log(res.tapIndex)
+					this.satisfactionFlagName = this.msgContents[res.tapIndex]
+					this.satisfactionFlag = res.tapIndex
+				}
+			})
+		},
+
+		chooseStar(e) {
+			//点击评星
+			this.sendDate.score = e
+		},
+		previewImage() {
+			//预览图片
+			uni.previewImage({
+				urls: this.imageList
+			})
+		},
+		send() {
+			//发送反馈
+			// console.log(this.sendDate,'111111111');
+			// console.log(this.shopBanner.join(','),'22222222222222222')
+
+			if (!this.satisfactionFlagName) {
+				uni.showToast({
+					icon: 'none',
+					title: '请选择是否满意'
+				})
+				return
+			}
+
+			if (!this.sendDate.content) {
+				uni.showToast({
+					icon: 'none',
+					title: '请输入评价内容'
+				})
+				return
+			}
+
+			// if(!this.shopBanner.length){
+			// 	uni.showToast({
+			// 		icon: 'none',
+			// 		title: '请上传评价图'
+			// 	});
+			// 	return;
+			// }
+			this.$queue.showLoading('加载中...')
+			// console.log(this.orderNumber)
+
+			this.$Request
+				.postJson('/app/apperrandevaluate/userEvaluate', {
+					indentNumber: this.indentNumber,
+					evaluateMessage: this.sendDate.content,
+					satisfactionFlag: this.satisfactionFlag
+				})
+				.then((res) => {
+					if (res.code === 0) {
+						uni.showToast({
+							title: '评价成功'
+						})
+						setTimeout(function () {
+							uni.navigateBack()
+						}, 1000)
+					} else {
+						uni.hideLoading()
+						uni.showModal({
+							showCancel: false,
+							title: '评价失败',
+							content: res.msg
+						})
+					}
+				})
+		}
+	}
+}
+</script>
+
+<style>
+@font-face {
+	font-family: uniicons;
+	font-weight: normal;
+	font-style: normal;
+	src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
+}
+
+page {
+	background-color: #ffffff;
+}
+
+view {
+	font-size: 28upx;
+}
+
+.input-view {
+	font-size: 28upx;
+}
+
+.close-view {
+	text-align: center;
+	line-height: 14px;
+	height: 16px;
+	width: 16px;
+	border-radius: 50%;
+	background: #ff5053;
+	color: #ffffff;
+	position: absolute;
+	top: -6px;
+	right: -4px;
+	font-size: 12px;
+}
+
+/* 上传 */
+.uni-uploader {
+	flex: 1;
+	flex-direction: column;
+}
+
+.uni-uploader-head {
+	display: flex;
+	flex-direction: row;
+	justify-content: space-between;
+}
+
+.uni-uploader-info {
+	color: #b2b2b2;
+}
+
+.uni-uploader-body {
+	margin-top: 16upx;
+}
+
+.uni-uploader__files {
+	display: flex;
+	flex-direction: row;
+	flex-wrap: wrap;
+}
+
+.uni-uploader__file {
+	margin: 10upx;
+	width: 210upx;
+	height: 210upx;
+}
+
+.uni-uploader__img {
+	display: block;
+	width: 210upx;
+	height: 210upx;
+}
+
+.uni-uploader__input-box {
+	position: relative;
+	margin: 10upx;
+	width: 208upx;
+	height: 208upx;
+	border: 2upx solid #d9d9d9;
+}
+
+.uni-uploader__input-box:before,
+.uni-uploader__input-box:after {
+	content: ' ';
+	position: absolute;
+	top: 50%;
+	left: 50%;
+	-webkit-transform: translate(-50%, -50%);
+	transform: translate(-50%, -50%);
+	background-color: #d9d9d9;
+}
+
+.uni-uploader__input-box:before {
+	width: 4upx;
+	height: 79upx;
+}
+
+.uni-uploader__input-box:after {
+	width: 79upx;
+	height: 4upx;
+}
+
+.uni-uploader__input-box:active {
+	border-color: #999999;
+}
+
+.uni-uploader__input-box:active:before,
+.uni-uploader__input-box:active:after {
+	background-color: #999999;
+}
+
+.uni-uploader__input {
+	position: absolute;
+	z-index: 1;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	opacity: 0;
+}
+
+/*问题反馈*/
+.feedback-title {
+	display: flex;
+	flex-direction: row;
+	justify-content: space-between;
+	align-items: center;
+	padding: 20upx;
+	color: #333333;
+	font-size: 28upx;
+}
+
+.feedback-star-view.feedback-title {
+	justify-content: flex-start;
+	margin: 0;
+}
+
+.feedback-quick {
+	position: relative;
+	padding-right: 40upx;
+}
+
+.feedback-quick:after {
+	font-family: uniicons;
+	font-size: 40upx;
+	content: '\e581';
+	position: absolute;
+	right: 0;
+	top: 50%;
+	color: #bbb;
+	-webkit-transform: translateY(-50%);
+	transform: translateY(-50%);
+}
+
+.feedback-body {
+	font-size: 32upx;
+	padding: 16upx;
+	margin: 16upx;
+	border-radius: 16upx;
+	background: #f2f2f2;
+	color: #fff;
+}
+
+.feedback-textare {
+	height: 200upx;
+	font-size: 30upx;
+	line-height: 50upx;
+	width: 100%;
+	box-sizing: border-box;
+	padding: 10upx 0upx 0;
+	color: #8f8f94;
+}
+
+.feedback-input {
+	font-size: 32upx;
+	height: 60upx;
+	padding: 15upx 20upx;
+	line-height: 60upx;
+}
+
+.feedback-uploader {
+	padding: 22upx 20upx;
+}
+
+.feedback-star {
+	font-family: uniicons;
+	font-size: 40upx;
+	margin-left: 6upx;
+}
+
+.feedback-star-view {
+	margin-left: 20upx;
+}
+
+.feedback-star:after {
+	content: '\e408';
+}
+
+.feedback-star.active {
+	color: #ffb400;
+}
+
+.feedback-star.active:after {
+	content: '\e438';
+}
+
+.feedback-submit {
+	background: #007aff;
+	color: #ffffff;
+	margin: 20upx;
+}
+</style>