Browse Source

前端 小程序 sdy

zhongtianhaoyuan 3 năm trước cách đây
mục cha
commit
923d6effee
41 tập tin đã thay đổi với 1541 bổ sung795 xóa
  1. 78 0
      App.vue
  2. 347 0
      components/APPPush/app_push.js
  3. 209 0
      components/APPPush/h5_push.vue
  4. 29 0
      components/APPPush/index.js
  5. 4 4
      components/code-elf-guide/code-elf-guide.vue
  6. 1 1
      components/ossutil/crypto.js
  7. 629 553
      components/upload.vue
  8. 1 1
      components/uview-ui/libs/util/province.js
  9. 1 2
      config/index.js
  10. 2 1
      main.js
  11. 1 1
      pageA/freightTransport/addpaygoods.vue
  12. 1 1
      pageA/freightTransport/addsendgoods.vue
  13. 0 1
      pageA/freightTransport/confirmpaygoods.vue
  14. 6 1
      pageA/product/detail.vue
  15. 4 1
      pageA/product/lookup.vue
  16. 7 3
      pageA/product/sales_detail.vue
  17. 3 1
      pageA/product/trade.vue
  18. 5 4
      pageB/contract/contract.vue
  19. 51 0
      pageD/identity/companyIdentity.vue
  20. 5 12
      pageD/identity/companyIdentityThree.vue
  21. 5 8
      pageD/identity/driverIdentity.vue
  22. 30 59
      pageD/identity/driverIdentityEdit.vue
  23. 5 29
      pageD/identity/driverIdentityThree.vue
  24. 8 6
      pageD/myRelease/buyGrain.vue
  25. 6 5
      pageD/myRelease/sellGrain.vue
  26. 12 11
      pageD/warehousings/ex_warehouse.vue
  27. 14 10
      pageD/warehousings/warehousings.vue
  28. 3 39
      pages/attestation/indexThree.vue
  29. 7 1
      pages/attestation/indexTwo.vue
  30. 18 7
      pages/business/business.vue
  31. 6 6
      pages/index/index.vue
  32. 1 1
      pages/public/code.vue
  33. 6 0
      pages/public/login.vue
  34. 8 1
      pages/public/login_account_number.vue
  35. 1 1
      pages/public/register.vue
  36. 0 1
      pages/sale/information.vue
  37. 5 0
      pages/sale/newsinfo.vue
  38. 4 4
      pages/tran/tran.vue
  39. 4 4
      pages/user/setUp.vue
  40. 14 14
      store/index.js
  41. 0 1
      websocket_sdk.js

+ 78 - 0
App.vue

@@ -18,6 +18,84 @@
 			if(type == "android"){
 				appUpdate()
 			}
+			var that = this
+			plus.push.getClientInfoAsync((info) => {
+				var name = 'clientId'
+				var value = info.clientid
+				that.$store.commit('$uStore', {
+					name,
+					value
+				});
+				uni.setStorageSync("clientId",info.clientid)
+				console.log("info.clientid",info.clientid)
+			   }, err => {
+			});
+			// 监听在线消息事件  
+			plus.push.addEventListener( "receive", function( msg ) {  
+				if ( msg.aps ) {  // Apple APNS message  
+					//APNS下发的消息,应用在前台  
+				} else {  
+					//其它情况接收消息  
+					
+				}  
+				let params = {
+					inApp: true, // app内横幅提醒
+					voice: true,    // 声音提醒
+					vibration: true,    // 振动提醒
+					messageType: '',
+					messageTitle: msg.title,
+					messageContent: msg.content,
+					messageImage: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/logo.png'
+				}
+				console.log("params",params,msg)
+				that.$appPush(params)
+				var userInfo = uni.getStorageSync("userInfo")
+				var that = this
+				this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
+					if (res.data.data) {
+						let name = 'myTip';
+						let value = res.data.data.myTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						if(value != 0){
+							uni.setTabBarBadge({
+								index:3,
+								text:value+""
+							})
+						}
+						name = 'taskTip';
+						value = res.data.data.taskTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						name = 'contractTip';
+						value = res.data.data.contractTip;
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+					}
+				})
+			//其它逻辑  
+			}, false );
+			//监听系统通知栏消息点击事件  
+			plus.push.addEventListener('click', function(msg){  
+			    //处理点击消息的业务逻辑代码  
+				if(msg.content&&msg.content.contains("任务")){
+					uni.navigateTo({
+						url: '/pages/task/my_task'
+					})
+				}
+				else if(msg.content&&(msg.content.contains("合同")||msg.content.contains("交易"))){
+					uni.navigateTo({
+						url: '/pageB/contract/contract'
+					})
+				}
+				
+			}, false);  
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';

+ 347 - 0
components/APPPush/app_push.js

@@ -0,0 +1,347 @@
+export class appPush{
+	constructor(option = {}) {
+		console.log(option)
+		// app内横幅提醒
+		this.inApp = option.inApp;
+		// 声音提醒
+		this.voice = option.voice;
+		// 振动提醒
+		this.vibration = option.vibration;
+		// 消息分类
+		this.messageType = option.messageType || '';
+		// 通知标题
+		this.messageTitle = option.messageTitle || '';
+		// 时间
+		this.messageTime = option.messageTime || '现在';
+		// 通知文案
+		this.messageContent = option.messageContent || '';
+		// 缩略图
+		this.messageImage = option.messageImage || '';	
+		
+		
+	    this.screenWidth = plus.screen.resolutionWidth;
+	    this.screenHeight = plus.screen.resolutionHeight;
+	    // 比例
+	    this.propotation = this.screenWidth / 750
+	    //弹窗容器宽度
+	    this.popupViewWidth = this.propotation * 710;
+	    // 弹窗容器高度
+	    this.popupViewHeight = this.propotation * 192;
+	    // 弹窗容器的Padding
+	    this.viewContentPadding = this.propotation * 30;
+		// 弹框容器的宽度
+		this.viewContentWidth = parseInt(this.popupViewWidth - (this.viewContentPadding * 2))
+		// 弹框到顶部的距离
+		this.system = uni.getSystemInfoSync()
+		// 过度时间
+		this.duration = 200
+		// 关闭时间
+		this.closeTime = 5000
+		
+		console.log(this.inApp, this.voice, this.vibration)
+		
+		this.top = (this.propotation * 20) + this.system.statusBarHeight;
+		this.initTop = -this.system.statusBarHeight
+		
+		this.body = null;
+		this.bodyBg = null;
+		this.timer = null;
+		
+		this.flag = false
+		this.cur = {
+			x: 0,
+			y: 0,
+			pageX: 0,
+			pageY: 0
+		}
+		
+	}
+	
+	// 生成弹框主体
+	createView() {
+		// console.log((this.propotation * 20) + this.system.statusBarHeight+ '--------------')
+		let view = new plus.nativeObj.View('popupView', {
+			// tag: 'rect',
+			top: (this.propotation * 20) + this.system.statusBarHeight,
+			left: this.propotation * 20,
+			height: this.popupViewHeight,
+			width: this.popupViewWidth
+		})
+		// 绘制白色背景
+		view.drawRect({
+			color:"#fff",
+			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",
+				}
+			},
+			{
+				tag: 'font',
+				id: 'push-title',
+				text: this.messageTitle,
+				textStyles: {
+					size: (this.propotation * 30) + 'px',
+					align: "left",
+					color: "#202123",
+					overflow: "ellipsis"
+				},
+				position: {
+					top: (this.propotation * 82) + 'px',
+					left: (this.propotation * 30) + 'px',
+					height: (this.propotation * 30) + 'px',
+					width: (this.propotation * 505) + 'px',
+				}
+			},
+			{
+				tag: 'font',
+				id: 'push-content',
+				text: this.messageContent,
+				textStyles: {
+					size: (this.propotation * 24) + 'px',
+					align: "left",
+					color: "#4F555B",
+					overflow: "ellipsis"
+				},
+				position: {
+					top: (this.propotation * 130) + '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',
+				}
+			},
+		]
+		view.draw(viewContentList)
+		// view.addEventListener("click",(e)=>{
+		// 	console.log('---------------------')
+		// });
+		view.addEventListener("touchstart", (event) => {
+			// console.log(event)
+			this.flag = true;  
+			var touch;  
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;  
+			}  
+			this.cur.x = touch.clientX;  
+			this.cur.y = touch.clientY;
+			this.cur.pageX = touch.pageX;
+			this.cur.pageY = touch.pageY;  
+		})
+		view.addEventListener("touchmove", (event) => {
+			// console.log(e)
+			var touch;  
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;
+			}  
+			let moveX = touch.pageX - this.cur.x;   
+			let moveY = touch.pageY - this.cur.y;   
+			let x = moveX;  
+			let y = moveY;
+			// console.log(x, y)
+			// console.log(this.cur, touch)
+			if (x < 0) {  
+				// x = 0;  
+			} else if (x > (this.popupViewWidth - this.popupViewWidth)) {  
+				// x = this.screenWidth - 40;  
+			}  
+			if (y < 0) {  
+				// y = 0;  
+			} else if (y >= ((this.propotation * 20) + this.system.statusBarHeight)) {  
+				y = ((this.propotation * 20) + this.system.statusBarHeight);  
+			}  
+			this.body.setStyle({  
+				top: y + 'px',  
+				left: x + 'px'  
+			});
+		})
+		/**
+		 * 这里有一个bug暂时无法解决,当用户快速往左滑时,滑动区域超出屏幕会监听不到touchend事件😂,很难被发现我就不解决了
+		 */
+		view.addEventListener("touchend", (event) => {
+			// console.log(this.cur, event)
+			var touch;
+			if (event.touches) {  
+				touch = event.touches[0];  
+			} else {  
+				touch = event;  
+			}
+			let differX = Math.abs(this.cur.pageX) - Math.abs(touch.pageX)
+			let differY = Math.abs(this.cur.pageY) - Math.abs(touch.pageY)
+			this.flag = false
+			// console.log(differX, differY)
+			if(Math.abs(differX) > 5 || Math.abs(differY) > 5) {	// 上下移动或左右移动超过5px则关闭弹窗
+				this.hide()
+			} else {	// 否则当作单击事件
+				console.log('-------------------')
+				this.hide()
+			}
+		})
+		this.body = view;
+		
+	// 	let bodyBg = new plus.nativeObj.View('bodyBg',{
+	// 		top: (this.propotation * 20) + this.system.statusBarHeight,
+	// 		left: this.propotation * 20,
+	// 		height: this.popupViewHeight,
+	// 		width: this.popupViewWidth,
+	// 		backgroundColor:'rgba(0, 0, 0, 1)',
+	// 	});
+	// 	bodyBg.draw([
+	// 	  {tag:'font',id:'confirm',text:'关闭关闭',textStyles:{color:'red',size:'16px'}},
+	// 	]);
+	
+	// 	bodyBg.addEventListener("click",(e)=>{
+	// 		console.log('---------------------')
+	// 	});
+	// 	this.bodyBg = bodyBg
+	}
+	// 显示/关闭弹框动画
+	modelAnimationOpenOrClose(type) {
+		var options = {type:type,duration:this.duration};
+		plus.nativeObj.View.startAnimation(options,this.body, () => {
+			// 关闭原生动画
+			plus.nativeObj.View.clearAnimation();
+		});
+	}
+	bgAnimationOpenOrClose(type) {
+		var options = {type:type,duration:this.duration};
+		plus.nativeObj.View.startAnimation(options,this.bodyBg, () => {
+			// 关闭原生动画
+			plus.nativeObj.View.clearAnimation();
+		});
+	}
+	// closeAnimation() {
+	// 	// push弹框距离最顶部的距离
+	// 	let top = (this.propotation * 20) + this.system.statusBarHeight
+	// 	// 完全隐藏时的顶部距离
+	// 	let hideTop = -this.system.statusBarHeight
+	// 	this.timer = setInterval(() => {
+	// 		this.top = this.top - 2
+	// 		if(this.top < hideTop * 2) {
+	// 			clearInterval(this.timer)
+	// 			this.timer = null
+	// 		}
+	// 		this.body.setStyle({
+	// 			top:this.top
+	// 		})
+	// 	}, 1)
+	// }
+	// 显示弹框
+	show() {
+		this.tips()
+		if(this.inApp) {
+			this.createView()
+			// this.modelAnimationOpenOrClose('slide-in-right')
+			this.body.show()
+			// this.bodyBg.show()
+			setTimeout(() => {
+				if(this.body) {
+					this.hide()
+				}
+			}, this.closeTime)
+		}
+	}
+	// 关闭弹框
+	hide() {
+		this.modelAnimationOpenOrClose('slide-out-right')
+		this.body.hide()
+		setTimeout(() => {
+			plus.nativeObj.View.clearAnimation();
+			this.body = null
+		}, this.duration)
+		// this.bgAnimationOpenOrClose('slide-out-right')
+		// this.bodyBg.hide()
+	}
+	// 调用系统提示音和振动
+	tips() {
+		if(this.voice) {
+			let system = uni.getSystemInfoSync().platform
+			if(system == 'ios') {
+				let player = plus.audio.createPlayer( "/static/audio/ios.mp3" );
+				player.play()
+			} else {
+				let main = plus.android.runtimeMainActivity();
+				let RingtoneManager = plus.android.importClass("android.media.RingtoneManager");
+				let uri = RingtoneManager.getActualDefaultRingtoneUri(main, RingtoneManager.TYPE_NOTIFICATION);
+				console.log(uri)
+				let MediaPlayer = plus.android.importClass("android.media.MediaPlayer");  
+				let player = MediaPlayer.create(main, uri);  
+				player.setLooping(false);  
+				player.prepare();  
+				player.start();
+			}
+		}
+		if(this.vibration) {
+			plus.device.vibrate()
+		}
+	}
+}
+
+export default appPush

+ 209 - 0
components/APPPush/h5_push.vue

@@ -0,0 +1,209 @@
+<template>
+	<view>
+		<transition name="slide-fade">
+			<view class="h5_push" @touchstart.stop.prevent="touchstart" @touchmove.stop.prevent="touchmove" @touchend.stop.prevent="touchend" v-if="show" :style="style">
+				<view class="push-title">
+					<view class="push-type">
+						<image src="/static/push/message-icon.png"></image>
+						{{messageType}}
+					</view>
+					{{messageTime}}
+				</view>
+				<view class="push-body">
+					<view class="push-content">
+						<view class="push-content-title">{{messageTitle}}</view>
+						<view class="push-content-text">{{messageContent}}</view>
+					</view>
+					<image :src="messageImage" class="push-img" mode="aspectFill"></image>
+				</view>
+			</view>
+		</transition>
+	</view>
+</template>
+
+<script>
+	export default{
+		data() {
+			return {
+				show: false,
+				// 关闭时间
+				closeTime: 3000,
+				// app内横幅提醒
+				inApp: false,
+				// 声音提醒
+				voice: true,
+				// 振动提醒
+				vibration: false,
+				// 消息分类
+				messageType: '',
+				// 通知标题
+				messageTitle: '',
+				// 时间
+				messageTime: '现在',
+				// 通知文案
+				messageContent: '',
+				// 缩略图
+				messageImage: '',
+				
+				top: 20,
+				left: 20,
+				cur: {
+					x: 0,
+					y: 0,
+					pageX: 0,
+					pageY: 0
+				}
+			}
+		},
+		computed:{
+			style() {
+				let system = uni.getSystemInfoSync()
+				let statusBarHeight = system.statusBarHeight
+				return `top: calc(${statusBarHeight}px + ${this.top}rpx);left: ${this.left}rpx`
+			}
+		},
+		created() {
+			setTimeout(() => {
+				this.show = false
+			}, this.closeTime)
+		},
+		methods:{
+			touchstart(event) {
+				console.log(event)
+				var touch;  
+				if (event.touches) {
+					touch = event.touches[0];  
+				} else {  
+					touch = event;  
+				}  
+				this.cur.x = touch.clientX;  
+				this.cur.y = touch.clientY;
+				this.cur.pageX = touch.pageX;
+				this.cur.pageY = touch.pageY;  
+				console.log(this.cur)
+			},
+			touchmove(event) {
+				var touch;
+				if (event.touches) {  
+					touch = event.touches[0];  
+				} else {  
+					touch = event;
+				}  
+				let moveX = touch.pageX - this.cur.x;   
+				let moveY = touch.pageY - this.cur.y;   
+				let x = moveX;  
+				let y = moveY;
+				// console.log(x, y)
+				// console.log(this.cur, touch)
+				let system = uni.getSystemInfoSync()
+				if (y >= (uni.upx2px(20) + system.statusBarHeight)) {  
+					y = (uni.upx2px(20) + system.statusBarHeight);  
+				}
+				this.top = y / (uni.upx2px(y) / y)
+				this.left = x / (uni.upx2px(x) / x)
+				
+				// this.body.setStyle({  
+				// 	top: y + 'px',  
+				// 	left: x + 'px'  
+				// });
+			},
+			touchend(event) {
+				console.log(event)
+				var touch;
+				if (event.touches.length) {  
+					touch = event.touches[0];  
+				} else {  
+					touch = event.changedTouches[0];  
+				}
+				console.log(this.cur, touch)
+				let differX = Math.abs(this.cur.pageX) - Math.abs(touch.pageX)
+				let differY = Math.abs(this.cur.pageY) - Math.abs(touch.pageY)
+				// console.log(differX, differY)
+				if(Math.abs(differX) > 5 || Math.abs(differY) > 5) {	// 上下移动或左右移动超过5px则关闭弹窗
+					this.show = false
+				} else {	// 否则当作单击事件
+					console.log('-------------------')
+					this.show = false
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.h5_push{
+		width: 710rpx;
+		height: 192rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 3rpx 18rpx 0px rgba(54, 58, 68, 0.08);
+		border-radius: 20rpx;
+		position: fixed;
+		z-index: 9999999;
+		.push-title{
+			padding: 30rpx 30rpx 15rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			font-size: 24rpx;
+			font-weight: 400;
+			color: #4F555B;
+			.push-type{
+				display: flex;
+				align-items: center;
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #4F555B;
+				image{
+					width: 24rpx;
+					height: 24rpx;
+					margin-right: 10rpx;
+				}
+			}
+		}
+		.push-body{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 0 24rpx 0 30rpx;
+			.push-content{
+				width: calc(100% - 150rpx);
+				.push-content-title{
+					font-size: 30rpx;
+					font-weight: 500;
+					color: #202123;
+					margin-bottom: 20rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+				.push-content-text{
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #4F555B;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+			}
+			.push-img{
+				width: 100rpx;
+				height: 100rpx;
+				background: #F2F2F3;
+				border: 0.5px solid #E9E9E9;
+				border-radius: 10rpx;
+				margin-left: 50rpx;
+			}
+		}
+	}
+	.slide-fade-enter-active {
+	  transition: all .3s ease;
+	}
+	.slide-fade-leave-active {
+	  transition: all .3s cubic-bezier(1.0, 0.5, 0.8, 1.0);
+	}
+	.slide-fade-enter, .slide-fade-leave-to
+	/* .slide-fade-leave-active for below version 2.1.8 */ {
+	  transform: translateX(10px);
+	  opacity: 0;
+	}
+</style>

+ 29 - 0
components/APPPush/index.js

@@ -0,0 +1,29 @@
+import app_push from './app_push.js'
+import h5Push from './h5_push.vue'
+
+const appPush = {
+	install: function(Vue) {
+		Vue.prototype.$appPush = function(op = {}) {
+			// #ifdef APP-PLUS
+			new app_push({
+				...op
+			}).show();
+			// #endif
+			// #ifdef H5
+			// Vue.component('h5Push', h5Push)
+			// 创建构造器
+			const H5PushInstance = Vue.extend(h5Push)
+			let instance = new H5PushInstance({
+				data: op
+			})
+			instance.$mount()
+			document.body.appendChild(instance.$el)
+			Vue.nextTick(() => {
+				instance.show = true
+			})
+			// #endif
+		}
+	}
+}
+
+export default appPush

+ 4 - 4
components/code-elf-guide/code-elf-guide.vue

@@ -49,20 +49,20 @@
 			}
 		},
 		methods: {
-			launchFlag: function(){
+			launchFlag(){
 				/**
 				 * 向本地存储中设置launchFlag的值,即启动标识;
 				 */
 				uni.setStorage({
-						key: 'launchFlag',
-						data: true,
+					key: 'launchFlag',
+					data: true,
 				});
 				uni.switchTab({
 					url: '/pages/sale/information'
 				});
 				
 			},
-			swiperChange:function(e){
+			swiperChange(e){
 				this.currentSwiper=e.detail.current
 				if(e.detail.current==2){
 					this.show=true

+ 1 - 1
components/ossutil/crypto.js

@@ -103,7 +103,7 @@ var util = Crypto.util = {
 	bytesToBase64: function (bytes) {
 
 		// Use browser-native function if it exists
-		if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+		// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
 
 		var base64 = [],
 		    overflow;

+ 629 - 553
components/upload.vue

@@ -1,393 +1,426 @@
 <template>
 	<view class="u-upload" v-if="!disabled">
-		<view
-			v-if="showUploadList"
-			class="u-list-item u-preview-wrap"
-			v-for="(item, index) in lists"
-			:key="index"
-			:style="{
-				width: width + 'rpx',
-				height: width + 'rpx'
-			}"
-		>
-			<view
-				v-if="deletable"
-				class="u-delete-icon"
-				@tap.stop="deleteItem(index)"
-				:style="{
-					background: delBgColor
-				}"
-			>
-				<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
-			</view>
-			<u-line-progress
-				v-if="showProgress && item.progress > 0 && !item.error"
-				:show-percent="false"
-				height="16"
-				class="u-progress"
-				:percent="item.progress"
-			></u-line-progress>
-			<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
-			<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image" v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
-		</view>
-		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
-			<slot name="addBtn"></slot>
-			<view
-				v-if="!customBtn"
-				class="u-list-item u-add-wrap"
-				hover-class="u-add-wrap__hover"
-				hover-stay-time="150"
+		<div v-if="!custom">
+			<view v-if="showUploadList" class="u-list-item u-preview-wrap" v-for="(item, index) in lists" :key="index"
 				:style="{
 					width: width + 'rpx',
 					height: width + 'rpx'
-				}"
-			>
-				<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
-				<view class="u-add-tips">{{ uploadText }}</view>
+				}">
+				<view v-if="deletable" class="u-delete-icon" @tap.stop="deleteItem(index)" :style="{
+						background: delBgColor
+					}">
+					<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
+				</view>
+				<u-line-progress v-if="showProgress && item.progress > 0 && !item.error" :show-percent="false"
+					height="16" class="u-progress" :percent="item.progress"></u-line-progress>
+				<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
+				<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image"
+					v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
+			</view>
+		</div>
+		<slot name="file" :file="lists"></slot>
+		<view class="" v-if="!custom">
+			<view style="display: inline-block;" @tap="selectFile" v-if="maxCount > lists.length">
+				<slot name="addBtn"></slot>
+				<view v-if="!customBtn" class="u-list-item u-add-wrap" hover-class="u-add-wrap__hover"
+					hover-stay-time="150" :style="{
+						width: width + 'rpx',
+						height: width + 'rpx'
+					}">
+					<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
+					<view class="u-add-tips">{{ uploadText }}</view>
+				</view>
+			</view>
+		</view>
+		<!-- 自定义背景 -->
+		<view class="custom-style" v-if="custom"
+			:style="{backgroundImage: 'url(' + options.bgc + ')', backgroundSize:'100% 100%'}">
+
+			<!-- 自定义预览 -->
+			<view v-if="custom&&isSelectFile" class="u-preview">
+				<view v-if="showUploadList" class="u-list-item u-preview-wrap u-list-item-custom"
+					v-for="(item, index) in lists" :key="index" :style="{
+						width: width + 'rpx',
+						height: width + 'rpx'
+					}">
+					<view v-if="deletable" class="u-delete-icon" @tap.stop="deleteItem(index)" :style="{
+							background: delBgColor
+						}">
+						<u-icon class="u-icon" :name="delIcon" size="20" :color="delColor"></u-icon>
+					</view>
+					<u-line-progress v-if="showProgress && item.progress > 0 && !item.error" :show-percent="false"
+						height="16" class="u-progress" :percent="item.progress"></u-line-progress>
+					<view @tap.stop="retry(index)" v-if="item.error" class="u-error-btn">点击重试</view>
+					<image @tap.stop="doPreviewImage(item.url || item.path, index)" class="u-preview-image"
+						v-if="!item.isImage" :src="item.url || item.path" :mode="imageMode"></image>
+				</view>
+			</view>
+			<view @tap="selectFile" v-if="maxCount > lists.length">
+				<slot name="addBtn"></slot>
+				<view v-if="!customBtn" class="content">
+					<img :src="options.imgSrc" alt="" class="custom-img">
+					<view class="text">{{ options.text }}</view>
+				</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
-/**
- * upload 图片上传
- * @description 该组件用于上传图片场景
- * @tutorial https://www.uviewui.com/components/upload.html
- * @property {String} action 服务器上传地址
- * @property {String Number} max-count 最大选择图片的数量(默认99)
- * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
- * @property {Boolean} show-progress 是否显示进度条(默认true)
- * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
- * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
- * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
- * @property {String} del-bg-color 右上角关闭按钮的背景颜色
- * @property {String} del-color 右上角关闭按钮图标的颜色
- * @property {Object} header 上传携带的头信息,对象形式
- * @property {Object} form-data 上传额外携带的参数
- * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
- * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
- * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
- * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
- * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
- * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
- * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
- * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
- * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
- * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
- * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
- * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
- * @event {Function} on-oversize 图片大小超出最大允许大小
- * @event {Function} on-preview 全屏预览图片时触发
- * @event {Function} on-remove 移除图片时触发
- * @event {Function} on-success 图片上传成功时触发
- * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
- * @event {Function} on-error 图片上传失败时触发
- * @event {Function} on-progress 图片上传过程中的进度变化过程触发
- * @event {Function} on-uploaded 所有图片上传完毕触发
- * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
- * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
- */
+	/**
+	 * upload 图片上传
+	 * @description 该组件用于上传图片场景
+	 * @tutorial https://www.uviewui.com/components/upload.html
+	 * @property {String} action 服务器上传地址
+	 * @property {String Number} max-count 最大选择图片的数量(默认99)
+	 * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)
+	 * @property {Boolean} show-progress 是否显示进度条(默认true)
+	 * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)
+	 * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)
+	 * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标
+	 * @property {String} del-bg-color 右上角关闭按钮的背景颜色
+	 * @property {String} del-color 右上角关闭按钮图标的颜色
+	 * @property {Object} header 上传携带的头信息,对象形式
+	 * @property {Object} form-data 上传额外携带的参数
+	 * @property {String} name 上传文件的字段名,供后端获取使用(默认file)
+	 * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])
+	 * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])
+	 * @property {Boolean} preview-full-image	是否可以通过uni.previewImage预览已选择的图片(默认true)
+	 * @property {Boolean} multiple	是否开启图片多选,部分安卓机型不支持(默认true)
+	 * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)
+	 * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)
+	 * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性
+	 * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)
+	 * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)
+	 * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)
+	 * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)
+	 * @event {Function} on-oversize 图片大小超出最大允许大小
+	 * @event {Function} on-preview 全屏预览图片时触发
+	 * @event {Function} on-remove 移除图片时触发
+	 * @event {Function} on-success 图片上传成功时触发
+	 * @event {Function} on-change 图片上传后,无论成功或者失败都会触发
+	 * @event {Function} on-error 图片上传失败时触发
+	 * @event {Function} on-progress 图片上传过程中的进度变化过程触发
+	 * @event {Function} on-uploaded 所有图片上传完毕触发
+	 * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表
+	 * @example <u-upload :action="action" :file-list="fileList" ></u-upload>
+	 */
 
-import uploadImage from '@/components/ossutil/uploadFile.js';
-export default {
-	name: 'upload',
-	props: {
-		//是否显示组件自带的图片预览功能
-		showUploadList: {
-			type: Boolean,
-			default: true
-		},
-		// 后端地址
-		action: {
-			type: String,
-			default: ''
-		},
-		// 最大上传数量
-		maxCount: {
-			type: [String, Number],
-			default: 52
-		},
-		//  是否显示进度条
-		showProgress: {
-			type: Boolean,
-			default: true
-		},
-		// 是否启用
-		disabled: {
-			type: Boolean,
-			default: false
-		},
-		// 预览上传的图片时的裁剪模式,和image组件mode属性一致
-		imageMode: {
-			type: String,
-			default: 'aspectFill'
-		},
-		// 头部信息
-		header: {
-			type: Object,
-			default() {
-				return {};
-			}
-		},
-		// 额外携带的参数
-		formData: {
-			type: Object,
-			default() {
-				return {};
-			}
-		},
-		// 上传的文件字段名
-		name: {
-			type: String,
-			default: 'file'
-		},
-		// 所选的图片的尺寸, 可选值为original compressed
-		sizeType: {
-			type: Array,
-			default() {
-				return ['original', 'compressed'];
-			}
-		},
-		sourceType: {
-			type: Array,
-			default() {
-				return ['album', 'camera'];
-			}
-		},
-		// 是否在点击预览图后展示全屏图片预览
-		previewFullImage: {
-			type: Boolean,
-			default: true
-		},
-		// 是否开启图片多选,部分安卓机型不支持
-		multiple: {
-			type: Boolean,
-			default: true
-		},
-		// 是否展示删除按钮
-		deletable: {
-			type: Boolean,
-			default: true
-		},
-		// 文件大小限制,单位为byte
-		maxSize: {
-			type: [String, Number],
-			default: Number.MAX_VALUE
-		},
-		// 显示已上传的文件列表
-		fileList: {
-			type: Array,
-			default() {
-				return [];
+	import uploadImage from '@/components/ossutil/uploadFile.js';
+	export default {
+		name: 'upload',
+		props: {
+			//是否显示组件自带的图片预览功能
+			showUploadList: {
+				type: Boolean,
+				default: true
+			},
+			// 后端地址
+			action: {
+				type: String,
+				default: ''
+			},
+			// 最大上传数量
+			maxCount: {
+				type: [String, Number],
+				default: 52
+			},
+			//  是否显示进度条
+			showProgress: {
+				type: Boolean,
+				default: true
+			},
+			// 是否启用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// 预览上传的图片时的裁剪模式,和image组件mode属性一致
+			imageMode: {
+				type: String,
+				default: 'aspectFill'
+			},
+			// 头部信息
+			header: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			// 额外携带的参数
+			formData: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			// 上传的文件字段名
+			name: {
+				type: String,
+				default: 'file'
+			},
+			// 所选的图片的尺寸, 可选值为original compressed
+			sizeType: {
+				type: Array,
+				default () {
+					return ['original', 'compressed'];
+				}
+			},
+			sourceType: {
+				type: Array,
+				default () {
+					return ['album', 'camera'];
+				}
+			},
+			// 是否在点击预览图后展示全屏图片预览
+			previewFullImage: {
+				type: Boolean,
+				default: true
+			},
+			// 是否开启图片多选,部分安卓机型不支持
+			multiple: {
+				type: Boolean,
+				default: true
+			},
+			// 是否展示删除按钮
+			deletable: {
+				type: Boolean,
+				default: true
+			},
+			// 文件大小限制,单位为byte
+			maxSize: {
+				type: [String, Number],
+				default: Number.MAX_VALUE
+			},
+			// 显示已上传的文件列表
+			fileList: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 上传区域的提示文字
+			uploadText: {
+				type: String,
+				default: '选择图片'
+			},
+			// 是否自动上传
+			autoUpload: {
+				type: Boolean,
+				default: true
+			},
+			// 是否显示toast消息提示
+			showTips: {
+				type: Boolean,
+				default: true
+			},
+			// 是否通过slot自定义传入选择图标的按钮
+			customBtn: {
+				type: Boolean,
+				default: false
+			},
+			// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
+			width: {
+				type: [String, Number],
+				default: 200
+			},
+			// 右上角关闭按钮的背景颜色
+			delBgColor: {
+				type: String,
+				default: '#fa3534'
+			},
+			// 右上角关闭按钮的叉号图标的颜色
+			delColor: {
+				type: String,
+				default: '#ffffff'
+			},
+			// 右上角删除图标名称,只能为uView内置图标
+			delIcon: {
+				type: String,
+				default: 'close'
+			},
+			// 如果上传后的返回值为json字符串,是否自动转json
+			toJson: {
+				type: Boolean,
+				default: true
+			},
+			// 上传前的钩子,每个文件上传前都会执行
+			beforeUpload: {
+				type: Function,
+				default: null
+			},
+			options: {
+				type: Object,
+				default: null
+			},
+			custom: {
+				type: Boolean,
+				default: false
 			}
+
 		},
-		// 上传区域的提示文字
-		uploadText: {
-			type: String,
-			default: '选择图片'
-		},
-		// 是否自动上传
-		autoUpload: {
-			type: Boolean,
-			default: true
-		},
-		// 是否显示toast消息提示
-		showTips: {
-			type: Boolean,
-			default: true
-		},
-		// 是否通过slot自定义传入选择图标的按钮
-		customBtn: {
-			type: Boolean,
-			default: false
-		},
-		// 内部预览图片区域和选择图片按钮的区域宽度,高等于宽
-		width: {
-			type: [String, Number],
-			default: 200
-		},
-		// 右上角关闭按钮的背景颜色
-		delBgColor: {
-			type: String,
-			default: '#fa3534'
-		},
-		// 右上角关闭按钮的叉号图标的颜色
-		delColor: {
-			type: String,
-			default: '#ffffff'
-		},
-		// 右上角删除图标名称,只能为uView内置图标
-		delIcon: {
-			type: String,
-			default: 'close'
-		},
-		// 如果上传后的返回值为json字符串,是否自动转json
-		toJson: {
-			type: Boolean,
-			default: true
-		},
-		// 上传前的钩子,每个文件上传前都会执行
-		beforeUpload: {
-			type: Function,
-			default: null
-		}
-	},
-	mounted() {},
-	data() {
-		return {
-			lists: [],
-			isInCount: true,
-			uploading: false
-		};
-	},
-	watch: {
-		fileList: {
-			immediate: true,
-			handler(val) {
-				val.map(value => {
-					this.lists.push({ url: value.url, error: false, progress: 100 });
-				});
+		mounted() {},
+		data() {
+			return {
+				lists: [],
+				isInCount: true,
+				uploading: false,
+				isSelectFile: false
+			};
+		},
+		watch: {
+			fileList: {
+				immediate: true,
+				handler(val) {
+					val.map(value => {
+						this.lists.push({
+							url: value.url,
+							error: false,
+							progress: 100
+						});
+					});
+				}
 			}
-		}
-	},
-	methods: {
-		// 清除列表
-		clear() {
-			this.lists = [];
-			// 如果是清空形式的话,发出"on-list-change"事件
-			this.$emit('on-list-change', this.lists);
-		},
-		// 重新上传队列中上传失败的所有文件
-		reUpload() {
-			this.uploadFile();
 		},
-		// 选择图片
-		selectFile() {
-			if (this.disabled) return;
-			const { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this;
-			let chooseFile = null;
-			const newMaxCount = maxCount - lists.length;
-			// 设置为只选择图片的时候使用 chooseImage 来实现
-			chooseFile = new Promise((resolve, reject) => {
-				uni.chooseImage({
-					count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
-					sourceType: sourceType,
-					sizeType,
-					success: resolve,
-					fail: reject
+		methods: {
+			// 清除列表
+			clear() {
+				this.lists = [];
+				// 如果是清空形式的话,发出"on-list-change"事件
+				this.$emit('on-list-change', this.lists);
+			},
+			// 重新上传队列中上传失败的所有文件
+			reUpload() {
+				this.uploadFile();
+			},
+			// 选择图片
+			selectFile() {
+				if (this.disabled) return;
+				const {
+					name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType
+				} = this;
+				let chooseFile = null;
+				const newMaxCount = maxCount - lists.length;
+				// 设置为只选择图片的时候使用 chooseImage 来实现
+				chooseFile = new Promise((resolve, reject) => {
+					uni.chooseImage({
+						count: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,
+						sourceType: sourceType,
+						sizeType,
+						success: resolve,
+						fail: reject
+					});
 				});
-			});
-			chooseFile
-				.then(res => {
-					let file = null;
-					let listOldLength = this.lists.length;
-					res.tempFiles.map((val, index) => {
-						// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
-						if (!multiple && index >= 1) return;
-						if (val.size > maxSize) {
-							this.$emit('on-oversize', val, this.lists);
-							this.showToast('超出允许的文件大小');
-						} else {
-							if (maxCount <= lists.length) {
-								this.$emit('on-exceed', val, this.lists);
-								this.showToast('超出最大允许的文件个数');
-								return;
-							}
-							let fileName = '';
-							let fileNameLength='';
-							let fileFormat = '';
-							//#ifdef H5
+				chooseFile
+					.then(res => {
+						let file = null;
+						let listOldLength = this.lists.length;
+						res.tempFiles.map((val, index) => {
+							// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理
+							if (!multiple && index >= 1) return;
+							if (val.size > maxSize) {
+								this.$emit('on-oversize', val, this.lists);
+								this.showToast('超出允许的文件大小');
+							} else {
+								if (maxCount <= lists.length) {
+									this.$emit('on-exceed', val, this.lists);
+									this.showToast('超出最大允许的文件个数');
+									return;
+								}
+								let fileName = '';
+								let fileNameLength = '';
+								let fileFormat = '';
+								//#ifdef H5
 								fileName = val.name.lastIndexOf(".");
 								fileNameLength = val.name.length;
 								fileFormat = val.name.substring(fileName + 1, fileNameLength).toLowerCase();
-							//#endif
-							//#ifndef H5
+								//#endif
+								//#ifndef H5
 								fileName = val.path.lastIndexOf(".");
 								fileNameLength = val.path.length;
 								fileFormat = val.path.substring(fileName + 1, fileNameLength).toLowerCase();
-							//#endif
-							lists.push({
-								url: val.path,
-								fileType: fileFormat,
-								progress: 0,
-								error: false
-							});
-							// 列表发生改变,发出事件,第二个参数为当前发生变化的项的索引
-							this.$emit('on-list-change', this.lists);
-						}
+								//#endif
+								lists.push({
+									url: val.path,
+									fileType: fileFormat,
+									progress: 0,
+									error: false
+								});
+								// 列表发生改变,发出事件,第二个参数为当前发生变化的项的索引
+								this.$emit('on-list-change', this.lists);
+							}
+						});
+						// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
+						this.$emit('on-choose-complete', this.lists);
+						if (this.autoUpload) this.uploadFile(listOldLength);
+					})
+					.catch(error => {
+						this.$emit('on-error', error);
 					});
-					// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去
-					this.$emit('on-choose-complete', this.lists);
-					if (this.autoUpload) this.uploadFile(listOldLength);
-				})
-				.catch(error => {
-					// this.$emit('on-error', error);
-				});
-		},
-		// 提示用户消息
-		showToast(message, force = false) {
-			if (this.showTips || force) {
-				uni.showToast({
-					title: message,
-					icon: 'none'
+			},
+			// 提示用户消息
+			showToast(message, force = false) {
+				if (this.showTips || force) {
+					uni.showToast({
+						title: message,
+						icon: 'none'
+					});
+				}
+			},
+			// 该方法供用户通过ref调用,手动上传
+			upload() {
+				this.uploadFile();
+			},
+			// 对失败的图片重新上传
+			retry(index) {
+				this.lists[index].progress = 0;
+				this.lists[index].error = false;
+				this.lists[index].response = null;
+				uni.showLoading({
+					title: '重新上传'
 				});
-			}
-		},
-		// 该方法供用户通过ref调用,手动上传
-		upload() {
-			this.uploadFile();
-		},
-		// 对失败的图片重新上传
-		retry(index) {
-			this.lists[index].progress = 0;
-			this.lists[index].error = false;
-			this.lists[index].response = null;
-			uni.showLoading({
-				title: '重新上传'
-			});
-			this.uploadFile(index);
-		},
-		// 上传图片
-		async uploadFile(index = 0) {
-			if (this.disabled) return;
-			if (this.uploading) return;
-			// 全部上传完成
-			if (index >= this.lists.length) {
-				this.$emit('on-uploaded', this.lists);
-				return;
-			}
-			// 检查上传地址
-			if (!this.action) {
-				this.showToast('请配置上传地址', true);
-				return;
-			}
-			// 检查是否是已上传或者正在上传中
-			if (this.lists[index].progress == 100) {
-				if (this.autoUpload == false) this.uploadFile(index + 1);
-				return;
-			}
-			// 执行before-upload钩子
-			if(this.beforeUpload && typeof(this.beforeUpload) === 'function') {
-				// 执行回调,同时传入索引和文件列表当作参数
-				let beforeResponse = this.beforeUpload(index, this.lists);
-				// 判断是否返回了promise
-				if (!!beforeResponse && typeof beforeResponse.then === 'function') {
-					await beforeResponse.then(res => {
-						// promise返回成功,不进行动作,继续上传
-					}).catch(err => {
-						// 进入catch回调的话,继续下一张
+				this.uploadFile(index);
+			},
+			// 上传图片
+			async uploadFile(index = 0) {
+				if (this.disabled) return;
+				if (this.uploading) return;
+				// 全部上传完成
+				if (index >= this.lists.length) {
+					this.isSelectFile = true
+					this.$emit('on-uploaded', this.lists);
+					return;
+				}
+				// 检查上传地址
+				if (!this.action) {
+					this.showToast('请配置上传地址', true);
+					return;
+				}
+				// 检查是否是已上传或者正在上传中
+				if (this.lists[index].progress == 100) {
+					if (this.autoUpload == false) this.uploadFile(index + 1);
+					return;
+				}
+				// 执行before-upload钩子
+				if (this.beforeUpload && typeof(this.beforeUpload) === 'function') {
+					// 执行回调,同时传入索引和文件列表当作参数
+					let beforeResponse = this.beforeUpload(index, this.lists);
+					// 判断是否返回了promise
+					if (!!beforeResponse && typeof beforeResponse.then === 'function') {
+						await beforeResponse.then(res => {
+							// promise返回成功,不进行动作,继续上传
+						}).catch(err => {
+							// 进入catch回调的话,继续下一张
+							return this.uploadFile(index + 1);
+						})
+					} else if (beforeResponse === false) {
+						// 如果返回false,继续下一张图片的上传
 						return this.uploadFile(index + 1);
-					})
-				} else if(beforeResponse === false) {
-					 // 如果返回false,继续下一张图片的上传
-					return this.uploadFile(index + 1);
+					}
 				}
-			}
-			this.lists[index].error = false;
-			this.uploading = true;
-			uploadImage(this.lists[index].url, 'appData/',
+				this.lists[index].error = false;
+				this.uploading = true;
+				uploadImage(this.lists[index].url, 'appData/',
 					result => {
 						// 上传成功
 						this.lists[index].response = result;
@@ -401,216 +434,259 @@ export default {
 						this.$emit('on-change', data, index, this.lists);
 					}
 				)
-			// // 创建上传对象
-			// const task = uni.uploadFile({
-			// 	url: this.action,
-			// 	filePath: this.lists[index].url,
-			// 	name: this.name,
-			// 	formData: this.formData,
-			// 	header: this.header,
-			// 	success: res => {
-			// 		// 判断是否json字符串,将其转为json格式
-			// 		let data = this.toJson && this.checkIsJSON(res.data) ? JSON.parse(res.data) : res.data;
-			// 		if (![200, 201].includes(res.statusCode)) {
-			// 			this.uploadError(index, data);
-			// 		} else {
-			// 			// 上传成功
-			// 			this.lists[index].response = data;
-			// 			this.lists[index].progress = 0;
-			// 			this.lists[index].error = false;
-			// 			this.$emit('on-success', data, index, this.lists);
-			// 		}
-			// 	},
-			// 	fail: e => {
-			// 		this.uploadError(index, e);
-			// 	},
-			// 	complete: res => {
-			// 		uni.hideLoading();
-			// 		this.uploading = false;
-			// 		this.uploadFile(index + 1);
-			// 		this.$emit('on-change', res, index, this.lists);
-			// 	}
-			// });
-			// task.onProgressUpdate(res => {
-			// 	if (res.progress > 0) {
-			// 		this.lists[index].progress = res.progress;
-			// 		this.$emit('on-progress', res, index, this.lists);
-			// 	}
-			// });
-		},
-		// 上传失败
-		uploadError(index, err) {
-			this.lists[index].progress = 0;
-			this.lists[index].error = true;
-			this.lists[index].response = null;
-			this.$emit('on-error', err, index, this.lists);
-			this.showToast('上传失败,请重试');
-		},
-		// 删除一个图片
-		deleteItem(index) {
-			uni.showModal({
-				title: '提示',
-				content: '您确定要删除此项吗?',
-				success: res => {
-					if (res.confirm) {
-						if (this.lists[index].process < 100 && this.lists[index].process > 0) {
-							typeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort();
+				// // 创建上传对象
+				// const task = uni.uploadFile({
+				// 	url: this.action,
+				// 	filePath: this.lists[index].url,
+				// 	name: this.name,
+				// 	formData: this.formData,
+				// 	header: this.header,
+				// 	success: res => {
+				// 		// 判断是否json字符串,将其转为json格式
+				// 		let data = this.toJson && this.checkIsJSON(res.data) ? JSON.parse(res.data) : res.data;
+				// 		if (![200, 201].includes(res.statusCode)) {
+				// 			this.uploadError(index, data);
+				// 		} else {
+				// 			// 上传成功
+				// 			this.lists[index].response = data;
+				// 			this.lists[index].progress = 0;
+				// 			this.lists[index].error = false;
+				// 			this.$emit('on-success', data, index, this.lists);
+				// 		}
+				// 	},
+				// 	fail: e => {
+				// 		this.uploadError(index, e);
+				// 	},
+				// 	complete: res => {
+				// 		uni.hideLoading();
+				// 		this.uploading = false;
+				// 		this.uploadFile(index + 1);
+				// 		this.$emit('on-change', res, index, this.lists);
+				// 	}
+				// });
+				// task.onProgressUpdate(res => {
+				// 	if (res.progress > 0) {
+				// 		this.lists[index].progress = res.progress;
+				// 		this.$emit('on-progress', res, index, this.lists);
+				// 	}
+				// });
+			},
+			// 上传失败
+			uploadError(index, err) {
+				this.lists[index].progress = 0;
+				this.lists[index].error = true;
+				this.lists[index].response = null;
+				this.$emit('on-error', err, index, this.lists);
+				this.showToast('上传失败,请重试');
+			},
+			// 删除一个图片
+			deleteItem(index) {
+				uni.showModal({
+					title: '提示',
+					content: '您确定要删除此项吗?',
+					success: res => {
+						if (res.confirm) {
+							this.isSelectFile = false
+							if (this.lists[index].process < 100 && this.lists[index].process > 0) {
+								typeof this.lists[index].uploadTask != 'undefined' && this.lists[index]
+									.uploadTask.abort();
+							}
+							this.lists.splice(index, 1);
+							this.$forceUpdate();
+							this.$emit('on-remove', index, this.lists);
+							this.showToast('移除成功');
+							// 列表发生改变,发出事件
+							this.$emit('on-list-change', this.lists);
 						}
-						this.lists.splice(index, 1);
-						this.$forceUpdate();
-						this.$emit('on-remove', index, this.lists);
-						this.showToast('移除成功');
-						// 列表发生改变,发出事件
-						this.$emit('on-list-change', this.lists);
 					}
+				});
+			},
+			// 用户通过ref手动的形式,移除一张图片
+			remove(index) {
+				// 判断索引的合法范围
+				if (index >= 0 && index < this.lists.length) {
+					this.lists.splice(index, 1);
+					this.$emit('on-list-change', this.lists);
 				}
-			});
-		},
-		// 用户通过ref手动的形式,移除一张图片
-		remove(index) {
-			// 判断索引的合法范围
-			if (index >= 0 && index < this.lists.length) {
-				this.lists.splice(index, 1);
-				this.$emit('on-list-change', this.lists);
-			}
-		},
-		// 预览图片
-		doPreviewImage(url, index) {
-			if (!this.previewFullImage) return;
-			const images = this.lists.map(item => item.url || item.path);
-			uni.previewImage({
-				urls: images,
-				current: url,
-				success: () => {
-					this.$emit('on-preview', url, this.lists);
-				},
-				fail: () => {
-					uni.showToast({
-						title: '预览图片失败',
-						icon: 'none'
-					});
-				}
-			});
-		},
-		// 判断是否json字符串
-		checkIsJSON(str) {
-			if (typeof str == 'string') {
-				try {
-					var obj = JSON.parse(str);
-					if (typeof obj == 'object' && obj) {
-						return true;
-					} else {
+			},
+			// 预览图片
+			doPreviewImage(url, index) {
+				if (!this.previewFullImage) return;
+				const images = this.lists.map(item => item.url || item.path);
+				uni.previewImage({
+					urls: images,
+					current: url,
+					success: () => {
+						this.$emit('on-preview', url, this.lists);
+					},
+					fail: () => {
+						uni.showToast({
+							title: '预览图片失败',
+							icon: 'none'
+						});
+					}
+				});
+			},
+			// 判断是否json字符串
+			checkIsJSON(str) {
+				if (typeof str == 'string') {
+					try {
+						var obj = JSON.parse(str);
+						if (typeof obj == 'object' && obj) {
+							return true;
+						} else {
+							return false;
+						}
+					} catch (e) {
 						return false;
 					}
-				} catch (e) {
-					return false;
 				}
+				return false;
 			}
-			return false;
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-// nvue不能用标签命名样式
-/* #ifndef APP-NVUE */
-image {
-	display: inline-block;
-	// 解决图片加载时可能会瞬间变形的问题
-	will-change: transform;
-}
+	// nvue不能用标签命名样式
+	/* #ifndef APP-NVUE */
+	image {
+		display: inline-block;
+		// 解决图片加载时可能会瞬间变形的问题
+		will-change: transform;
+	}
+
+	view,
+	text {
+		box-sizing: border-box;
+		flex-direction: row;
+	}
+
+	/* #endif */
+	.u-upload {
+		display: flex;
+		flex-wrap: wrap;
+		align-items: center;
+	}
+
+	.u-list-item {
+		width: 200rpx;
+		height: 200rpx;
+		overflow: hidden;
+		margin: 10rpx;
+		background: rgb(244, 245, 246);
+		position: relative;
+		border-radius: 10rpx;
+		display: inline-flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.u-preview-wrap {
+		border: 1px solid rgb(235, 236, 238);
+	}
+
+	.u-add-wrap {
+		flex-direction: column;
+		color: $u-content-color;
+		font-size: 28rpx;
+	}
 
-view,
-text {
-	box-sizing: border-box;
-	flex-direction: row;
-}
-/* #endif */
-.u-upload {
-	display: flex;
-	flex-wrap: wrap;
-	align-items: center;
-}
+	.u-add-tips {
+		margin-top: 20rpx;
+	}
 
-.u-list-item {
-	width: 200rpx;
-	height: 200rpx;
-	overflow: hidden;
-	margin: 10rpx;
-	background: rgb(244, 245, 246);
-	position: relative;
-	border-radius: 10rpx;
-	display: inline-flex;
-	align-items: center;
-	justify-content: center;
-}
+	.u-add-wrap__hover {
+		background-color: rgb(235, 236, 238);
+	}
 
-.u-preview-wrap {
-	border: 1px solid rgb(235, 236, 238);
-}
+	.u-preview-image {
+		display: block;
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+	}
 
-.u-add-wrap {
-	flex-direction: column;
-	color: $u-content-color;
-	font-size: 28rpx;
-}
+	.u-delete-icon {
+		position: absolute;
+		top: 10rpx;
+		right: 10rpx;
+		z-index: 10;
+		background-color: $u-type-error;
+		border-radius: 100rpx;
+		width: 44rpx;
+		height: 44rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 
-.u-add-tips {
-	margin-top: 20rpx;
-}
+	.u-icon {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 
-.u-add-wrap__hover {
-	background-color: rgb(235, 236, 238);
-}
+	.u-progress {
+		position: absolute;
+		bottom: 10rpx;
+		left: 8rpx;
+		right: 8rpx;
+		z-index: 9;
+		width: auto;
+	}
 
-.u-preview-image {
-	display: block;
-	width: 100%;
-	height: 100%;
-	border-radius: 10rpx;
-}
+	.u-error-btn {
+		color: #ffffff;
+		background-color: $u-type-error;
+		font-size: 20rpx;
+		padding: 4px 0;
+		text-align: center;
+		position: absolute;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 9;
+		line-height: 1;
+	}
 
-.u-delete-icon {
-	position: absolute;
-	top: 10rpx;
-	right: 10rpx;
-	z-index: 10;
-	background-color: $u-type-error;
-	border-radius: 100rpx;
-	width: 44rpx;
-	height: 44rpx;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
+	.custom-style {
+		// background: red;
+		width: 100%;
+		height: 480rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 
-.u-icon {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
+	.custom-img {
+		width: 120rpx;
+		height: 100rpx;
+	}
+
+	.text {
+		font-size: 18px;
+		font-weight: 600;
+		color: #617E8B;
+	}
 
-.u-progress {
-	position: absolute;
-	bottom: 10rpx;
-	left: 8rpx;
-	right: 8rpx;
-	z-index: 9;
-	width: auto;
-}
+	.content {
+		display: flex;
+		justify-content: center;
+		flex-direction: column;
+		align-items: center;
+	}
 
-.u-error-btn {
-	color: #ffffff;
-	background-color: $u-type-error;
-	font-size: 20rpx;
-	padding: 4px 0;
-	text-align: center;
-	position: absolute;
-	bottom: 0;
-	left: 0;
-	right: 0;
-	z-index: 9;
-	line-height: 1;
-}
+	.u-preview {
+		width: 100%;
+		height: 100%;
+		// position: absolute;
+		background: red;
+	}
+
+	.u-list-item-custom {
+		margin: 0 !important;
+		width: 100% !important;
+		height: 100% !important;
+	}
 </style>

+ 1 - 1
components/uview-ui/libs/util/province.js

@@ -1 +1 @@
-var provinceData=[{"label":"北京市","value":"11"},{"label":"天津市","value":"12"},{"label":"河北省","value":"13"},{"label":"山西省","value":"14"},{"label":"内蒙古自治区","value":"15"},{"label":"辽宁省","value":"21"},{"label":"吉林省","value":"22"},{"label":"黑龙江省","value":"23"},{"label":"上海市","value":"31"},{"label":"江苏省","value":"32"},{"label":"浙江省","value":"33"},{"label":"安徽省","value":"34"},{"label":"福建省","value":"35"},{"label":"江西省","value":"36"},{"label":"山东省","value":"37"},{"label":"河南省","value":"41"},{"label":"湖北省","value":"42"},{"label":"湖南省","value":"43"},{"label":"广东省","value":"44"},{"label":"广西壮族自治区","value":"45"},{"label":"海南省","value":"46"},{"label":"重庆市","value":"50"},{"label":"四川省","value":"51"},{"label":"贵州省","value":"52"},{"label":"云南省","value":"53"},{"label":"西藏自治区","value":"54"},{"label":"陕西省","value":"61"},{"label":"甘肃省","value":"62"},{"label":"青海省","value":"63"},{"label":"宁夏回族自治区","value":"64"},{"label":"新疆维吾尔自治区","value":"65"},{"label":"台湾","value":"66"},{"label":"香港","value":"67"},{"label":"澳门","value":"68"}];export default provinceData;
+var provinceData=[{"label":"北京市","value":"110000"},{"label":"天津市","value":"120000"},{"label":"河北省","value":"130000"},{"label":"山西省","value":"140000"},{"label":"内蒙古自治区","value":"150000"},{"label":"辽宁省","value":"210000"},{"label":"吉林省","value":"220000"},{"label":"黑龙江省","value":"230000"},{"label":"上海市","value":"310000"},{"label":"江苏省","value":"320000"},{"label":"浙江省","value":"330000"},{"label":"安徽省","value":"340000"},{"label":"福建省","value":"350000"},{"label":"江西省","value":"360000"},{"label":"山东省","value":"370000"},{"label":"河南省","value":"410000"},{"label":"湖北省","value":"420000"},{"label":"湖南省","value":"430000"},{"label":"广东省","value":"440000"},{"label":"广西壮族自治区","value":"450000"},{"label":"海南省","value":"460000"},{"label":"重庆市","value":"500000"},{"label":"四川省","value":"510000"},{"label":"贵州省","value":"520000"},{"label":"云南省","value":"530000"},{"label":"西藏自治区","value":"540000"},{"label":"陕西省","value":"610000"},{"label":"甘肃省","value":"620000"},{"label":"青海省","value":"630000"},{"label":"宁夏回族自治区","value":"640000"},{"label":"新疆维吾尔自治区","value":"650000"},{"label":"台湾省","value":"710000"},{"label":"香港特别行政区","value":"810000"},{"label":"澳门特别行政区","value":"820000"}];export default provinceData;

+ 1 - 2
config/index.js

@@ -1,8 +1,7 @@
 const dev = {
 	// baseUrlNew: 'http://192.168.1.122:9100/',
-	baseUrl: 'https://www.zthymaoyi.com',
+	// baseUrl: 'https://www.zthymaoyi.com',
 	baseUrlNew: 'http://192.168.1.120:8090/',
-	  // baseUrlNew: 'http://api.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 2 - 1
main.js

@@ -14,7 +14,8 @@ import tarBar from './components/tarbar.vue'
 Vue.component('tar-bar', tarBar)
 import tran from './pages/tran/tran.vue'
 Vue.component('tran',tran)
-
+import appPush from './components/APPPush/index.js'
+Vue.use(appPush)
 import my from './pages/user/user.vue'
 Vue.component('my',my)
 // main.js

+ 1 - 1
pageA/freightTransport/addpaygoods.vue

@@ -192,7 +192,7 @@
 										title: '删除成功',
 										icon: 'none',
 										duration: 2000,
-										success: function() {debugger
+										success: function() {
 											that.getDetail(that.userInfo.infoId)
 										}
 									})

+ 1 - 1
pageA/freightTransport/addsendgoods.vue

@@ -150,7 +150,7 @@
 			},
 			commit() {
 				this.purchaseOrder.accountNumber= this.phone
-				this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {debugger
+				this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {
 					// if(res.data.code=='200'){
 					// 	uni.showModal({
 					// 		title: '提示',

+ 0 - 1
pageA/freightTransport/confirmpaygoods.vue

@@ -267,7 +267,6 @@
 									that.goods).then(
 									res => {
 										if (res.data.code == 200) {
-											debugger
 											console.log(that.goods)
 											uni.showModal({
 												content: '提交成功!',

+ 6 - 1
pageA/product/detail.vue

@@ -1,8 +1,11 @@
 <template>
 	<!--采购详情-->
 	<view class="container">
-		<view class="back-btn cuIcon-back" @click="navBack"></view>
+		<view class="">
+			<view class="back-btn cuIcon-back" @click="navBack"></view>
 		<view class='title1'>采购详情</view>
+		</view>
+		
 		<image style='width:100%;' src='../../static/img/jiaoyi/bg@3x.png'></image>
 		<view class="introduce-section">
 			<view style='height:70px;'>
@@ -570,8 +573,10 @@
 		left:50%;
 		transform: translateX(-50%);
 		top: 40upx;
+		padding-top: var(--status-bar-height);
 		z-index:9999;
 		color:#fff;
+		font-size: 36rpx;
 	}
 	page {
 		background: #F5F6FA;

+ 4 - 1
pageA/product/lookup.vue

@@ -4,7 +4,7 @@
 			<view style='background:#fff;display:flex;' class="cu-bar search">
 			<view style='flex:6;' class="search-form round" >
 				<text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
-				<input type="text" maxlength="20" v-model="searchKeyWord" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
+				<input type="text" maxlength="20" v-model="searchKeyWord" @confirm="doSearch()" @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
 				
 			</view>
 			<view @click='doSearch()' style="width:4%;flex:1;">搜索</view>
@@ -183,6 +183,9 @@
 					this.loadOldKeyword()
 					this.loadHotKeyword()
 				}
+				else{
+					this.searchKeyWord = e.detail.value
+				}
 			},
 			blur(){
 				uni.hideKeyboard()

+ 7 - 3
pageA/product/sales_detail.vue

@@ -1,8 +1,10 @@
 <!--销售详情-->
 <template>
 	<view class="container">
-		<view class="back-btn cuIcon-back" @click="navBack"></view>
-		<view class='title1'>销售详情</view>
+		<view>
+			<view class="back-btn cuIcon-back" @click="navBack"></view>
+			<view class='title1'>销售详情</view>
+		</view>
 		<image style='width:100%;' src='../../static/img/jiaoyi/bg@3x.png'></image>
 		<view class="introduce-section">
 			<view style='height:70px;'>
@@ -549,9 +551,11 @@
 		position:absolute;
 		left:50%;
 		transform: translateX(-50%);
-		top: 80upx;
+		top: 40upx;
+		padding-top: var(--status-bar-height);
 		z-index:9999;
 		color:#fff;
+		font-size: 36rpx;
 	}
 	page {
 		background: #F5F6FA;

+ 3 - 1
pageA/product/trade.vue

@@ -44,7 +44,7 @@
 						<view class="title">{{minimumVolume}}</view>
 					</view>
 				</view>
-				<view class="c-row">
+				<view v-if='' class="c-row">
 					<text class="tit">今日基差(元/吨)</text>
 					<view class="con-list">
 						<view class="title">{{basisPrice}}</view>
@@ -136,6 +136,7 @@
 					receivePrivate:'',
 					receiveCity:'',
 					receiveArea:'',
+					procurementPlanType:'',
 					minimumVolume:0,
 					basisPrice:0,
 					pcFlag:0,
@@ -194,6 +195,7 @@
 				};
 			},
 			onLoad(options) {
+				this.procurementPlanType = options.procurementPlanType
 				this.receiveWarehouse=options.receiveWarehouse
 				this.receivePrivate=options.receivePrivate
 				this.receiveCity=options.receiveCity

+ 5 - 4
pageB/contract/contract.vue

@@ -6,7 +6,8 @@
 					<text class="tit" v-if="item.orderType == '采购'">{{item.orderType}}</text>
 					<text class="tit2" v-if="item.orderType == '销售'">{{item.orderType}}</text>
 					<view class="enterprise">
-						编号{{item.contractNo}}({{item.procurementPlanType}})
+						<text v-if='item.status!="待审核"'>编号{{item.contractNo}}({{item.procurementPlanType}})</text>
+						<text v-if='item.status=="待审核"'>合同编号待定</text>
 					</view>
 					<!-- <text class="status status1" v-if="item.status == '已挂单'">{{item.status}}</text>
 					<text class="status status2" v-if="item.status == '已成交'">{{item.status}}</text>
@@ -32,16 +33,16 @@
 				<view class="title">基差:¥<text>{{item.basis}}</text></view>
 			</view>
 			<view class="c-row flex annius">
-				<text class="anniu" @click="commit(item)"> 附件</text>
+				<text v-if='item.status!="待审核"' class="anniu" @click="commit(item)"> 附件</text>
 				<text class="anniu" @click="someprice(item)"
 					v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
-				<text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'"> 发货</text>
+				<text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'&&item.status!='待审核'"> 发货</text>
 
 			<!-- 	<text class="anniu" @click="commit"> 附件</text>
 				<text class="anniu" @click="someprice(item)" v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
 				<text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'&&item.status != '待审核'"> 发货</text> -->
 
-				<text class="anniu1" @click="commit2(item)" v-if="item.orderType == '销售'"> 收货</text>
+				<text class="anniu1" @click="commit2(item)" v-if="item.orderType == '销售'&&item.status!='待审核'"> 收货</text>
 			</view>
 		</view>
 		<view v-if='pricestatus' class='shade'>

+ 51 - 0
pageD/identity/companyIdentity.vue

@@ -6,6 +6,22 @@
 		</view>
 		<view v-if="consentStatus == true">
 			<view>
+				<upload
+					class="upload"
+					ref="upload"
+					:action="action"
+					:max-size="maxSize"
+					:max-count="1"
+					:size-type="['compressed']"
+					@on-success="getImgUrl"
+					@on-error="onError"
+					@on-remove="onRemove"
+					@on-uploaded="isAdd = true"
+					:before-upload="filterFileType"
+					:options="uploadOptions"
+					:custom="uploadCustom"
+				></upload>
+				
 				<view style="margin: 0 auto;height: 240px;" v-if="license1 != ''" @click="license">
 					<image v-bind:src="license1" class="picture"></image>
 					<view class="floats" v-if="certificates == true">
@@ -62,13 +78,26 @@
 </template>
 
 <script>
+	import upload from '@/components/upload.vue';
 	import {
 		mapState
 	} from 'vuex';
 	export default {
+		components:{upload},
 		name: "buy",
 		data() {
 			return {
+				action: this.$uploadUrl,
+				maxSize: 5 * 1024 * 1024, //限制文件大小 2M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				imgUrls:[],
+				uploadCustom:true,
+				uploadOptions:{
+					"text":"上传营业执照",
+					"imgSrc":"~@/static/img/authentication/xiangji@3x.png",
+					"bgc":"~@/static/img/authentication/business@3x.png"
+				},
 				tupian: "",
 				inputContent: null,
 				customerPhone: '',
@@ -99,6 +128,28 @@
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			getImgUrl(res) {
+				console.log(res)
+				this.imgUrls.push(res);
+			},
+			onError(error){
+				console.log(error)
+			},
+			onRemove(index) {
+				this.imgUrls.splice(index, 1);
+			},
 			jumpUrl() {
 				if (this.consentStatus) {
 					if (!this.identityAuthenticationInfo.compName) {

+ 5 - 12
pageD/identity/companyIdentityThree.vue

@@ -371,18 +371,12 @@
 																				icon: 'none',
 																				duration: 2000
 																			})
-																			uni.navigateTo({
-																				url: `/pages/attestation/indexTwo`,
+																			uni.navigateBack({
+																				delta:3
 																			})
 																		}
 																	})
-															} else if (res.cancel) {
-																uni.showToast({
-																	title: '提交失败',
-																	icon: 'none',
-																	duration: 2000
-																})
-															}
+															} 
 														}
 													});
 												} else if (res.data.code == 200) {
@@ -396,9 +390,8 @@
 																	icon: 'none',
 																	duration: 2000
 																})
-																uni.navigateTo({
-																	url: `/pages/attestation/indexTwo`,
-
+																uni.navigateBack({
+																	delta:3
 																})
 															}
 														})

+ 5 - 8
pageD/identity/driverIdentity.vue

@@ -39,14 +39,14 @@
 			<view class="c-row b-b">
 				<text class="tit">手机号</text>
 				<view class="con-list">
-					<input placeholder="请填写手机号" type="number" maxlength = "11" @input='phoneinput' name="input" v-model="DriverViewInfo.driverPhone"></input>
+					<input placeholder="请填写手机号" maxlength = "11" @input='phoneinput' name="input" v-model="DriverViewInfo.driverPhone"></input>
 				</view>
 			</view>
 			<view style='padding:10px;' class="c-row b-b">
-				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
-					class='getcode'>{{sendText}}</button>
+				<button :class='!sendDisabled?"active getcode":"getcode"' @click='getcode'
+					>{{sendText}}</button>
 					<view class="con-list">
-						<input v-model='verifyCode'  maxlength = "6"  placeholder="请输入验证码" type="number">
+						<input v-model='verifyCode' maxlength = "6"  placeholder="请输入验证码" type="text">
 					</view>
 			</view>
 			<view class="c-row ">
@@ -127,8 +127,6 @@
 				this.region = e.province.label + '-' + e.city.label
 				this.DriverViewInfo.residentCityProvincial = e.province.label + e.city.label
 			},
-			//achao
-			//此处加载较慢,判断过多,获取验证码修改未异步,待修改
 			jumpUrl() {
 				if (this.id[0] == "" || this.id[0] == null) {
 					this.$api.msg('请上传身份证正面!')
@@ -480,7 +478,7 @@
 		border: none;
 	}
 
-	.getcode.active {
+	.active {
 		background: #22C572;
 		color: #fff;
 	}
@@ -530,7 +528,6 @@
 
 	.btns {
 		background-color: #22C572;
-		color: white;
 	}
 	.words{
 		font-size: 18px;

+ 30 - 59
pageD/identity/driverIdentityEdit.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="center">
 		<view>
-
 			<view>
 				<view style="margin: 0 auto;" v-if="id != ''" @click="idUp">
 					<image v-bind:src="id1" class="picture"></image>
@@ -12,8 +11,6 @@
 				</view>
 			</view>
 			<view class="personalcss">
-
-
 				<view class="c-row b-b">
 					<text class="tit">姓名</text>
 					<view class="con-list">
@@ -33,9 +30,9 @@
 					</view>
 				</view>
 				<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
-					<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
-						class='getcode'>{{sendText}}</button>
-					<view style='width:70%;position:relative;margin-left: 200px;'>
+					<button :class='!sendDisabled?"getcode active":"getcode"' @click='getcode'
+						>{{sendText}}</button>
+					<view style='width:70%;position:relative;margin-left: 200rpx;'>
 						<view class="con-list">
 							<!-- style='width:70%;position:relative;margin-left: 200px;' -->
 							<input v-model='verifyCode' placeholder="请输入验证码" type="text">
@@ -43,11 +40,11 @@
 
 					</view>
 				</view>
-				<view class="c-row b-b">
+				<view class="c-row ">
 					<text class="tit">常驻城市</text>
 					<view class="con-list">
-						<input placeholder="请填写常驻城市" name="input"
-							v-model="DriverViewInfo.residentCityProvincial"></input>
+						<view @click='regionchange'>{{region}}</view>
+						<u-picker :params='params1' @confirm='regionpicker' mode="region" v-model="show1"></u-picker>
 					</view>
 				</view>
 			</view>
@@ -59,7 +56,7 @@
 			<view class="c-row">
 				<text class="tit" style="line-height: 36px;">货车信息</text>
 				<view class="con-list">
-					<image v-bind:src="opencar" class="open" opencarboolean @click="opencarclick"></image>
+					<image v-bind:src="opencar" class="open"  @click="opencarclick"></image>
 				</view>
 			</view>
 		</view>
@@ -270,6 +267,10 @@
 				params: {
 					year: true,
 				},
+				params1: {
+					province: true,
+					city: true,
+				},
 				verifyCode: "",
 				codestatus: false,
 				customerPhone: '',
@@ -278,6 +279,7 @@
 				openuserboolean: false,
 				carchength: true,
 				show: false,
+				show1: false,
 				opencar: "../../static/img/authentication/down2@3x.png",
 				openuser: "../../static/img/authentication/down2@3x.png",
 				bankimg: "",
@@ -285,6 +287,7 @@
 				bankIndex: -1,
 				bankType: [],
 				year:[],
+				region:"请选择常驻城市",
 			}
 		},
 		computed: {
@@ -307,6 +310,15 @@
 			this.getList(option.id)
 		},
 		methods: {
+			regionchange() {
+				this.show1 = true
+			},
+			regionpicker(e) {
+				// this.deptList.outputPrivate = e.province.label
+				// this.deptList.outputCity = e.city.label
+				this.region = e.province.label + '-' + e.city.label
+				this.DriverViewInfo.residentCityProvincial = e.province.label + e.city.label
+			},
 			yearpicker(e, index) {
 				this.year[index] = e.year
 				this.driverCarInfoList[index].yearManufacture = e.year
@@ -398,6 +410,7 @@
 							this.operates = this.address[2]
 							this.practices = this.address[3]
 						}
+						this.region = this.DriverViewInfo.residentCityProvincial
 					})
 					.catch(res => {
 						if(res.errmsg){
@@ -588,10 +601,10 @@
 			},
 			getcode() {
 				var that = this
-				console.log(that.DriverViewInfo.driverPhone)
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
+					console.log(that.DriverViewInfo.driverPhone)
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
-							customerPhone: that.DriverViewInfo.driverPhone
+							phone: that.DriverViewInfo.driverPhone
 						}).then(res => {
 							if (res.data.code == 200) {
 								that.sendDisabled = true
@@ -648,8 +661,7 @@
 	}
 
 	.labels {
-		font-size: 16px;
-		font-weight: 400;
+		font-size: 14px;
 	}
 
 	.c-row {
@@ -690,58 +702,17 @@
 		background: #F5F6F9;
 		height: 30px;
 		line-height: 30px;
+		
 	}
-
-	.getcode.active {
-		border: none;
+	.active {
+		background: #22C572;
+		color: #fff;
 	}
-
 	.uni-navigator {
 		display: inline-block;
 		color: #22C572;
 	}
 
-	.getcode.active {
-		background: #22C572;
-		color: #fff;
-	}
-
-
-
-	.labels {
-		font-size: 16px;
-		font-weight: 400;
-	}
-
-	.c-row {
-		display: -webkit-box;
-		display: -webkit-flex;
-		display: flex;
-		-webkit-box-align: center;
-		-webkit-align-items: center;
-		align-items: center;
-		padding: 20rpx 30rpx;
-		position: relative;
-	}
-
-	.con-list {
-		-webkit-box-flex: 1;
-		-webkit-flex: 1;
-		flex: 1;
-		display: -webkit-box;
-		display: -webkit-flex;
-		display: flex;
-		-webkit-box-orient: vertical;
-		-webkit-box-direction: normal;
-		-webkit-flex-direction: column;
-		flex-direction: column;
-		color: #303133;
-		line-height: 40rpx;
-		text-align: right;
-		padding-right: 20rpx;
-		font-size: 14px;
-	}
-
 	.verificationCode {
 		margin-top: 20px;
 		background: #F5F6F9;

+ 5 - 29
pageD/identity/driverIdentityThree.vue

@@ -123,8 +123,8 @@
 																		icon: 'none',
 																		duration: 2000
 																	})
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
+																	uni.navigateBack({
+																		delta:3
 																	})
 																} else if (res.data.code ==
 																	'ERROR002') {
@@ -132,25 +132,14 @@
 																		title: '提示',
 																		content: '司机身份证号重复,添加失败',
 																	});
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
-																	})
 																} else if (res.data.code == 'ERROR003') {
 																	uni.showModal({
 																		title: '提示',
 																		content: '收款人身份证号重复,添加失败',
 																	});
-																	uni.navigateTo({
-																		url: `/pages/attestation/indexThree`
-																	})
+																	
 																}
 															})
-														} else if (res.cancel) {
-															uni.showToast({
-																title: '提交失败',
-																icon: 'none',
-																duration: 2000
-															})
 														}
 													}
 												});
@@ -162,34 +151,21 @@
 																icon: 'none',
 																duration: 2000
 															})
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
+															uni.navigateBack({
+																delta:3
 															})
 														} else if (res.data.code =='ERROR002') {
 															uni.showModal({
 																title: '提示',
 																content: '司机身份证号重复,添加失败',
 															});
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
-															})
 														} else if (res.data.code == 'ERROR003') {
 															uni.showModal({
 																title: '提示',
 																content: '收款人身份证号重复,添加失败',
 															});
-															uni.navigateTo({
-																url: `/pages/attestation/indexThree`
-															})
 														}
 													})
-												// } else if (res.cancel) {
-												// 	uni.showToast({
-												// 		title: '提交失败',
-												// 		icon: 'none',
-												// 		duration: 2000
-												// 	})
-												// }
 											}
 										}).catch(res => {
 											uni.showToast({

+ 8 - 6
pageD/myRelease/buyGrain.vue

@@ -205,16 +205,18 @@
 				typesType: ["现货", "期货"],
 				typesIndex: 0,
 				deptList: {
-					salePlanTypeKey: 0,
-					grainKey: 0,
-					gradeKey: 0,
-					packingTypeKey: 0,
-					freightPayerKey: 0,
+					// salePlanTypeKey: 0,
+					// grainKey: 0,
+					// gradeKey: 0,
+					// packingTypeKey: 0,
+					// freightPayerKey: 0,
 					priceType: "定价采购",
+					priceTypeKey: 2,
 					procurementPlanType: "现货",
+					procurementPlanTypeKey: 1,
 					grain: "",
 					grade: "",
-					outputYear: "",
+					// outputYear: "",
 					packingType: "",
 					freightPayer: "",
 				},

+ 6 - 5
pageD/myRelease/sellGrain.vue

@@ -202,12 +202,13 @@
 				typesIndex: 0,
 				deptList: {
 					salePlanType: '现货',
-					salePlanTypeKey: 0,
-					grainKey: 0,
-					gradeKey: 0,
-					packingTypeKey: 0,
-					freightPayerKey: -1,
+					salePlanTypeKey: 1,
+					// grainKey: 0,
+					// gradeKey: 0,
+					// packingTypeKey: 0,
+					// freightPayerKey: -1,
 					priceType: "定价销售",
+					priceTypeKey: 2,
 					 grain: "",
 					grade: "一等品",
 					packingType: "散装",

+ 12 - 11
pageD/warehousings/ex_warehouse.vue

@@ -425,7 +425,6 @@
 			},
 			warehouseChange1(e) {
 				var id = ''
-				
 				this.warehouseIndex1 = e.detail.value
 				this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
 				this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
@@ -504,13 +503,12 @@
 						return
 					}
 				}
-				if (this.list.bulkDensity && this.list.bulkDensity < 1 || this.list.bulkDensity && this.list.bulkDensity >
-					40) {
+				if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
 					this.$api.msg('容重输入错误')
 					return
 				}
-				if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
-					if (this.list.bulkDensity.split('.')[1].length > 2) {
+				if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
+					if(this.list.bulkDensity.split('.')[1].length>2){
 						this.$api.msg('容重输入错误')
 						return
 					}
@@ -612,7 +610,7 @@
 					return
 				}
 				if (!this.WarehouseInOutInfo.binNumber) {
-					this.$api.msg('仓不能为空')
+					this.$api.msg('仓位号不能为空')
 					return
 				}
 				if (this.WarehouseInOutInfo.grossWeight > 100 || this.WarehouseInOutInfo.grossWeight < 1) {
@@ -661,13 +659,12 @@
 						return
 					}
 				}
-				if (this.list.bulkDensity && this.list.bulkDensity < 1 || this.list.bulkDensity && this.list.bulkDensity >
-					40) {
+				if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
 					this.$api.msg('容重输入错误')
 					return
 				}
-				if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
-					if (this.list.bulkDensity.split('.')[1].length > 2) {
+				if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
+					if(this.list.bulkDensity.split('.')[1].length>2){
 						this.$api.msg('容重输入错误')
 						return
 					}
@@ -721,7 +718,11 @@
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
-				// this.WarehouseInOutInfo.baseId=0
+				for(let i = 0 ;i < this.warehouselist.length ; i++){
+					if(this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName){
+						this.WarehouseInOutInfo.baseId = this.warehouselist[i].id
+					}
+				}
 				this.WarehouseInOutInfo.taskType = "出库任务"
 				uni.showLoading({
 					title: "正在提交"

+ 14 - 10
pageD/warehousings/warehousings.vue

@@ -55,6 +55,7 @@
 					<text class="tit">仓库</text>
 					<view style="color: #ff0000; padding-left: 10rpx;">*</view>
 					<view class="con-list">
+						
 						<picker @change="warehouseChange" :value="warehouseIndex" :range="warehouse" class="con-list">
 							<view >
 								{{warehouseIndex>-1?warehouse[warehouseIndex]:'请选择仓库'}}
@@ -77,7 +78,7 @@
 				<view class="c-row b-b">
 					<text class="tit">入库类型 </text>
 					<picker @change="ruChange" :value="ruIndex" :range="ruType" class="con-list">
-						<view >
+						<view v-model="WarehouseInOutInfo.inOutType">
 							 {{ruIndex > -1?ruType[ruIndex]:'请选择入库类型'}} 
 						</view>
 					</picker>
@@ -210,6 +211,8 @@ import upload from '@/components/upload.vue';
 					pcFlag: 0,
 					contractNo: {},
 					carNo: {},
+					inOutType:'采购入库',
+					inOutTypeKey:1,
 				},
 				WarehouseInOutInfo1: {
 					contractNo: {},
@@ -218,7 +221,7 @@ import upload from '@/components/upload.vue';
 				pinIndex: -1,
 				pinTypes: '',
 				pinType: ['一等品', '二等品', '三等品', '等外'],
-				ruIndex: -1,
+				ruIndex: 0,
 				rutypes: '',
 				warehouse:[],
 				warehouseIndex:-1,
@@ -337,8 +340,9 @@ import upload from '@/components/upload.vue';
 					if(this.WarehouseInOutInfo.inOutTypeKey != null){
 						this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey 
 					}
-					
-					this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
+					if(this.WarehouseInOutInfo.deductionAmount!=null){
+						this.WarehouseInOutInfo.deductionAmount = Math.abs(res.data.data.deductionAmount) 
+					}
 				})
 				.catch(res => {
 					if(res.errmsg){
@@ -563,7 +567,7 @@ import upload from '@/components/upload.vue';
 					return
 				}
 				if(!this.WarehouseInOutInfo.binNumber){
-					this.$api.msg('仓不能为空')
+					this.$api.msg('仓位号不能为空')
 					return
 				}
 				if(this.WarehouseInOutInfo.grossWeight>100||this.WarehouseInOutInfo.grossWeight<1){
@@ -677,7 +681,6 @@ import upload from '@/components/upload.vue';
 				this.WarehouseInOutInfo.warehouseInOutDetail = this.list
 				this.WarehouseInOutInfo.statusFlag = 3
 				this.WarehouseInOutInfo.pcFlag = 0
-				debugger
 				for(let i = 0 ;i < this.warehouselist.length ; i++){
 					if(this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName){
 						this.WarehouseInOutInfo.baseId = this.warehouselist[i].id
@@ -689,13 +692,14 @@ import upload from '@/components/upload.vue';
 				})
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
 					if(res.data.code==200){
-						uni.showToast({
-							title: '提交成功',
-							icon: 'none'
-						})
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 1000)
+						uni.showToast({
+							title: '提交成功',
+							icon: 'none',
+							duration: 2000
+						})
 					}else{
 						uni.showToast({
 							title: res.data.message,

+ 3 - 39
pages/attestation/indexThree.vue

@@ -82,7 +82,9 @@
 
 
 		</view>
-		<button class="btn btns" @click="Add">新增</button>
+		<view>
+			<button class="btn btns" @click="Add">新增</button>
+		</view>
 	</view>
 </template>
 
@@ -236,43 +238,6 @@
 								})
 							}
 						})
-					// 	if (res.data.code == 200) {
-					// 		that.$api.doRequest('post',
-					// 			'/identityAuthenticationInfo/api/modifyIdentityPhone',
-					// 			that.identityAuthenticationInfo).then(
-					// 			res => {
-					// 				uni.showToast({
-					// 					title: '提交成功',
-					// 					icon: 'none',
-					// 					duration: 2000
-					// 				})
-					// 				uni.navigateTo({
-					// 					url: `/pages/attestation/indexTwo`,
-					// 				})
-					// 			}).catch(res => {
-					// 			uni.showToast({
-					// 				title: res.data.message,
-					// 				icon: 'none',
-					// 				duration: 2000
-					// 			})
-					// 		})
-					// 	} else {
-					// 		uni.showToast({
-					// 			title: res.data.message,
-					// 			icon: 'none',
-					// 			duration: 2000
-					// 		})
-					// 		return
-					// 	}
-					// })
-					// .catch(res => {
-					// 		uni.showToast({
-					// 			title: res.data.message,
-					// 			icon: 'none',
-					// 			duration: 2000
-					// 		})
-					// 		return
-					// });
 			},
 			getcode() {
 					if (!this.price) {
@@ -292,7 +257,6 @@
 					return
 				}
 				this.pricestatusTwo = true
-				// this.pricestatusTwo = !this.pricestatusTwo
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.price)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {

+ 7 - 1
pages/attestation/indexTwo.vue

@@ -111,7 +111,7 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 		},
-		onLoad() {
+		onshow() {
 			this.getList()
 		},
 		onPullDownRefresh() {
@@ -199,6 +199,12 @@
 								res.data.data.records[i].basis = "true"
 							}
 						}
+						var data = res.data.data.records
+						for(var i=0;i<data.length;i++){
+							if(data[i].compName.length > 10){
+								data[i].compName = data[i].compName.substring(0,10) + "..."
+							}
+						}
 						this.businessman = res.data.data.records
 
 					})

+ 18 - 7
pages/business/business.vue

@@ -3,7 +3,12 @@
 		<view class="top-style">
 			<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
 				<view class="cu-bar search">
-					<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);'>
+					<view style='position:absolute;left:30px;top:50%;transform: translateY(-50%);' @click='status=true'>
+						{{location}}<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
+							src='../../static/img/jiaoyi/down.png'></image>
+					</view>
+					<u-picker mode="selector" @confirm='locationChange' v-model="status" :range="locationType"></u-picker>
+					<!-- <view>
 						<picker style='display:inline-block;' @change="locationChange" :value="location"
 							:range="locationType">
 							<view class="picker">
@@ -12,7 +17,8 @@
 						</picker>
 						<image style='width:10px;height:6px;margin-left:4px;position:relative;top:-2px;'
 							src='../../static/img/jiaoyi/down.png'></image>
-					</view>
+					</view> -->
+					
 					<view class="search-form round" @click="naviageToPage('/pageA/product/lookup?TabCur=')">
 						<text style='color: #ccc;text-indent:56px;' class="cuIcon-search"></text>
 						<input type="text" placeholder="请输入货名或标题" confirm-type="search"></input>
@@ -93,9 +99,10 @@
 				isLoadMore: false, //是否加载中
 				showTran: true,
 				scrollTop: 0,
+				status:false,
 				pageSize: 10,
 				searchKeyWord: '',
-				receivePrivate: '',
+				receivePrivate: '全国',
 				currentPage: 1,
 				categoryList: [{
 					title: '我要买粮',
@@ -106,7 +113,10 @@
 				}],
 				TabCur: 0,
 				current: 1,
-				location: 0,
+				location: '全国',
+				params:{
+					province: true,
+				},
 				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
@@ -203,8 +213,9 @@
 				})
 			},
 			locationChange(e) {
-				this.location = e.detail.value
-				this.receivePrivate = e.detail.value
+				console.log(e)
+				this.location = this.locationType[e[0]]
+				this.receivePrivate = this.locationType[e[0]]
 				this.currentPage = 1
 				this.loadData()
 			},
@@ -246,7 +257,7 @@
 						showFlag: 1,
 						currentPage: this.currentPage,
 						searchKeyWord: this.searchKeyWord,
-						receivePrivate: this.receivePrivate =="0" ? '':this.locationType[this.receivePrivate]
+						receivePrivate: this.receivePrivate
 					}).then(res => {
 						uni.hideLoading()
 						this.buyInfo = res.data.data.records

+ 6 - 6
pages/index/index.vue

@@ -19,7 +19,7 @@
 			this.loadExecution()
 		},
 		methods: {
-			loadExecution: function(){
+			loadExecution(){
 				/**
 				 * 获取本地存储中launchFlag的值
 				 * 若存在,说明不是首次启动,直接进入首页;
@@ -29,9 +29,13 @@
 					// 获取本地存储中launchFlag标识
 				    const value = uni.getStorageSync('launchFlag');
 				    if (value) {
+						uni.setStorage({
+							key: 'launchFlag',
+							data: true,
+						});
 						// launchFlag=true直接跳转到首页
 						uni.switchTab({
-							url: '/pages/tabBar/component/component'
+							url: '/pages/sale/information'
 						});
 				    } else {
 						// launchFlag!=true显示引导页
@@ -48,10 +52,6 @@
 					}); 
 					this.guidePages = true
 				}
-				return;
-				uni.switchTab({
-				    url: '/pages/tabBar/component/component'
-				});
 			}
 		}
 	}

+ 1 - 1
pages/public/code.vue

@@ -169,7 +169,7 @@
 						title: '登录中',
 						mask:true
 					})
-					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList}).then(res => {
+					this.$api.doRequest('get','/commonUser/loginVerifyCode',{phone:this.phone,verifyCode:this.inputList,cid:this.clientId}).then(res => {
 					    if(res.data.code==200){
 							this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",
 password: "y123456",

+ 6 - 0
pages/public/login.vue

@@ -27,6 +27,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -61,6 +64,9 @@
 				codestatus:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()

+ 8 - 1
pages/public/login_account_number.vue

@@ -32,6 +32,9 @@
 	} from 'vuex';
 	import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
 	import { queryData, upData, initData } from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -65,6 +68,9 @@
 				canIUseProfile:false
 			}
 		},
+		computed: {
+			...mapState(['clientId'])
+		},
 		onShow() {
 			// this.loginType = "wechat"
 			this.$api.logout()
@@ -96,7 +102,8 @@
 					title: '登录中',
 					mask:true
 				})
-				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+				console.log("clinetId",this.clientId)
+				this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 					if(res.data.code==200){
 						uni.setStorageSync('userInfo', res.data.data)
 						this.$api.doRequest('post','/auth/api/loginEnhanced',{companyName: "易粮易运",

+ 1 - 1
pages/public/register.vue

@@ -218,7 +218,7 @@
 							title: '登录中',
 							mask:true
 						})
-						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password}).then(res => {
+						this.$api.doRequest('get','/commonUser/login',{phone:this.phone,password:this.password,cid:this.clientId}).then(res => {
 							
 							if(res.data.code==200){
 								// pc登录

+ 0 - 1
pages/sale/information.vue

@@ -167,7 +167,6 @@
 			this.loadData()
 			var userInfo = uni.getStorageSync("userInfo")
 			var that = this
-			console.log("userInfo",userInfo)
 			this.$api.doRequest('get', '/salePlanInfo/getTips', {phone:userInfo.phone}).then(res => {
 				if (res.data.data) {
 					let name = 'myTip';

+ 5 - 0
pages/sale/newsinfo.vue

@@ -172,6 +172,11 @@
 						uni.hideLoading()
 					}).then(res => {
 						let data = res.data
+						for(var i=0;i<data.length;i++){
+							if(data[i].title.length > 20){
+								data[i].title = data[i].title.substring(0,20) + "..."
+							}
+						}
 						that.newsInfo = data
 						uni.hideLoading()
 					})

+ 4 - 4
pages/tran/tran.vue

@@ -15,12 +15,12 @@
 			<swiper-item class="tab-content" data-id="1">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==0">
-						<view class="cu-bar search">
+						<!-- <view class="cu-bar search">
 							<view class="search-form round" @click="naviageToPage('/pageA/product/search?TabCur=2')">
 								<text class="cuIcon-search"></text>
 								<input type="text" placeholder="搜索" confirm-type="search"></input>
 							</view>
-						</view>
+						</view> -->
 						<view class="guess-section">
 							<view 
 								v-for="(item , index) in tranInfo" :key="index"
@@ -57,12 +57,12 @@
 			<swiper-item class="tab-content" data-id="0">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="onReachBottomTmp">
 					<block v-if="TabCur==1">
-						<view class="cu-bar search">
+						<!-- <view class="cu-bar search">
 							<view class="search-form round" @click="naviageToPage('/pageA/product/search?TabCur=3')">
 								<text class="cuIcon-search"></text>
 								<input type="text" placeholder="搜索" confirm-type="search"></input>
 							</view>
-						</view>
+						</view> -->
 						<view class="guess-section">
 							<view 
 								v-for="(item, index) in carInfo" :key="index"

+ 4 - 4
pages/user/setUp.vue

@@ -1,21 +1,21 @@
 <template>
 	<view class="container">
-		<view class=" flex headPortrait justify-between">
+		<view class=" flex headPortrait justify-between" @click="switchPicture">
 			<view class="title">头像</view>
 			<view class="nextStep flex">
 				<view class="pictures">
 					<image :src="headUrl" class="picture"></image>
 				</view>
-				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" @click="switchPicture"></image>
+				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
 			</view>
 		</view>
-		<view class="flex headPortrait justify-between">
+		<view class="flex headPortrait justify-between" @click="nickname">
 			<view class="title">昵称</view>
 			<view class="nextStep flex">
 				<view class="username">
 					{{username}}
 					</view>
-				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" @click="nickname"></image>
+				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" ></image>
 			</view>
 		</view>
 	</view>

+ 14 - 14
store/index.js

@@ -21,20 +21,20 @@ const saveLifeData = function(key, value) {
 		let tmp = uni.getStorageSync('lifeData');
 		// 第一次打开APP,不存在lifeData变量,故放一个{}空对象
 		tmp = tmp ? tmp : {};
-		if(key == 'contractTip' && tmp[key] < value){
-			uni.vibrateLong({
-			    success: function () {
-			        console.log('震动成功');
-			    }
-			});
-		}
-		if(key == 'taskTip' && tmp[key] < value){
-			uni.vibrateLong({
-			    success: function () {
-			        console.log('震动成功');
-			    }
-			});
-		}
+		// if(key == 'contractTip' && tmp[key] < value){
+		// 	uni.vibrateLong({
+		// 	    success: function () {
+		// 	        console.log('震动成功');
+		// 	    }
+		// 	});
+		// }
+		// if(key == 'taskTip' && tmp[key] < value){
+		// 	uni.vibrateLong({
+		// 	    success: function () {
+		// 	        console.log('震动成功');
+		// 	    }
+		// 	});
+		// }
 		tmp[key] = value;
 		// 执行这一步后,所有需要存储的变量,都挂载在本地的lifeData对象中
 		uni.setStorageSync('lifeData', tmp);

+ 0 - 1
websocket_sdk.js

@@ -291,7 +291,6 @@ export default class Websocket {
 			    },
 			    method: 'GET',
 			    success: (res) => {			
-					console.log("websocket myTips",res)
 					if (res.data.data) {
 			    		let name = 'myTip';
 			    		let value = res.data.data.myTip;