瀏覽代碼

前端小程序更新 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
9b4e5db7f1

+ 1 - 0
pageD/warehousings/ex_warehouse.vue

@@ -501,6 +501,7 @@
 					this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
 				}
 				console.log(this.WarehouseInOutInfo, "卖粮对象")
+	
 				this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
 					if (res.data.code == 200) {
 						uni.showToast({

+ 0 - 1
pages/attestation/index.vue

@@ -34,7 +34,6 @@
 			</view>
 			<image src="../../static/img/authentication/farmer@2x.png" class="portrait1"></image>
 		</view> -->
-
 	</view>
 </template>
 

+ 0 - 1
pages/public/login_account_number.vue

@@ -4,7 +4,6 @@
 		<!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
 		<view class="wrapper">
 			<image style='width:38px;height:38px;margin-bottom:10px;' src='../../static/img/login/logo@2x.png'></image>
-
 			<h2>欢迎使用易粮易运</h2>
 			<view style='position:relative;width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 				<view style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>

+ 2 - 1
pages/sale/information.vue

@@ -92,7 +92,7 @@
 		<view class="guess-section-wrap1">
 			<view style='padding:15px;' class='flex justify-between'>
 				<view class='title'>行业新闻</view>
-				<view style='color:#B2B3BB;'>更多</view>
+				<view style='color:#B2B3BB;' @click="more('/pages/sale/newsinfo')">更多</view>
 			</view>
 			<view style='border-bottom:1px solid #EEEEEE;' class='guess-section-wrap-content1'>
 				<view style='border-bottom:1px solid #eee;padding:15px;' class='flex justify-between'  v-for='(item, index) in newsInfo' :key="index" @click="navToDetailPage(item.id)">
@@ -230,6 +230,7 @@
 					url: url
 				})
 			},
+			
 			DotStyle(e) {
 				this.dotStyle = e.detail.value
 			},

+ 3 - 7
pages/task/my_task.vue

@@ -27,9 +27,8 @@
 					</view>
 					<view class="title-tip-b">{{item.inOutDate}}</view>
 				</view>
-				<u-tag :text="item.taskType" type="success"/>
-				<!-- <u-tag :text="item.taskType" type=""/> -->
-				<!-- <u-tag text="入库任务" type="primary" /> -->
+				<u-tag :text="item.taskType" type="success" v-if="item.taskType == '出库任务'"/>
+				<u-tag :text="item.taskType" type="primary" v-if="item.taskType == '入库任务'"/>
 			</view>
 			<view v-show="isLoadMore">
 				<uni-load-more :status="loadStatus"></uni-load-more>
@@ -81,7 +80,6 @@
 				 }else{
 				 	datatime=date.getFullYear()+'-0'+(date.getMonth()+1)+'-'+date.getDate()
 				 }
-				 console.log(datatime ,newdate)
 			     if(datatime == newdate){
 			          var h = date.getHours();
 			             h = h < 10 ? '0' + h : h;
@@ -95,8 +93,7 @@
 						 return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()
 					 }else{
 						  return date.getFullYear()+'-0'+(date.getMonth()+1)+'-'+date.getDate()
-					 }
-					 
+					 } 
 				 }
 			 let o = {
 			  'Y': date.getFullYear(),
@@ -205,7 +202,6 @@
 				}
 			}
 			}
-
 		}
 	}
 </script>

+ 15 - 11
pages/user/setUp.vue

@@ -8,17 +8,15 @@
 				</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" @click="switchPicture"></image>
 			</view>
-			
 		</view>
 		<view class="flex headPortrait justify-between">
 			<view class="title">昵称</view>
 			<view class="nextStep flex">
 				<view class="username">
-					{{username}}
+					{{userInfo.userName}}
 					</view>
 				<image src="../../static/img/myimg/gengduo1@3x.png" class="arrow" @click="nickname"></image>
 			</view>
-	
 		</view>
 	</view>
 </template>
@@ -31,21 +29,27 @@
 		data() {
 			return {
 				headUrl:"../../static/img/myimg/YongHu@3x.png",
-				username:"",
+				username:"",	
+				
 			}
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			// ...mapState(['hasLogin', 'userInfo'])
+		},
+		onShow() {
+			this.getList()
 		},
 		onLoad() {
-			if(this.userInfo.avatarUrl != null || this.userInfo.avatarUrl != ""){
-				this.headUrl = this.userInfo.avatarUrl
-			}
-			if(this.userInfo.userName != null || this.userInfo.userName != ""){
-				this.username = this.userInfo.userName
-			}
 		},
 		methods:{
+			getList(){
+				this.userInfo= wx.getStorageSync('userInfo')
+					this.headUrl = this.userInfo.avatarUrl
+				if(this.headUrl == null || this.headUrl == ""){
+					this.headUrl="../../static/img/myimg/YongHu@3x.png"
+				}
+				this.username = this.userInfo.userName
+			},
 			switchPicture(){	
 				uni.navigateTo({
 					url: `/pages/user/set_picture`

+ 2 - 1
pages/user/set_nickname.vue

@@ -46,9 +46,10 @@
 					success: function(res) {
 						if (res.confirm) {
 							that.deptListurl.userName = that.nickname
+							that.deptListurl.id = that.userInfo.id
 							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(res => {
 								if (res.data.code == 200) {
-								
+								// this.$api.msg('修改成功!')
 								var _student = wx.getStorageSync('userInfo');
 								_student.userName = that.nickname;
 								wx.setStorageSync('userInfo', _student);

+ 8 - 2
pages/user/set_picture.vue

@@ -120,22 +120,28 @@
 					success: function(res) {
 						if (res.confirm) {
 							that.deptListurl.avatarUrl = that.identityUrl
+							that.deptListurl.id = that.userInfo.id
 							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
 									res => {
 										if (res.data.code == 200) {
+												// uni.showToast({
+												// 	title: '修改成功!',
+												// 	icon: 'success',
+												// 	duration: 2000
+												// })
 											that.userInfo.avatarUrl = that.identityUrl
 											var _student = wx.getStorageSync('userInfo');
 											_student.avatarUrl = that.identityUrl;
 											wx.setStorageSync('userInfo', _student);
+										    // this.$api.msg('修改成功!')
 											uni.navigateTo({
 												url: `/pages/user/setUp`
 											})
 										}
-
 									})
 								.catch(res => {
 									uni.showToast({
-										title: res.errmsg,
+										title: res.data.errmsg,
 										icon: 'none',
 										duration: 2000
 									})

+ 6 - 18
pages/user/user.vue

@@ -41,7 +41,6 @@
 					</view>
 					<!-- <image src="../../static/img/sign/authentication@3x.png" mode=""></image> -->
 				</view>
-
 				<!-- <view class='cu-item' @click='scanCode'>
 							<view>
 								<text class="cuIcon-scan icon text-grey"></text>
@@ -66,7 +65,6 @@
 
 		</neil-modal>
 	</view>
-
 </template>
 <script>
 	import dragButton from "@/components/drag-button/drag-button.vue";
@@ -158,7 +156,6 @@
 					// 	show:true
 					// },
 					// {
-
 					{
 						num: 0,
 						name: '身份认证',
@@ -229,7 +226,6 @@
 			}
 		},
 		onShow() {
-			console.log(uni.getStorageSync('userInfo'))
 			uni.showTabBar()
 			this.loadData()
 		},
@@ -239,8 +235,9 @@
 			}else if(this.userInfo.avatarUrl != "" || this.userInfo.avatarUrl != null){
 				this.headUrl = this.userInfo.avatarUrl
 			}
-			if(this.userInfo.userName != null || this.userInfo.userName != ""){
-				this.username = this.userInfo.userName
+			this.username = this.userInfo.userName
+			if(	this.username == null || this.username == ""){
+				this.username = "请更改昵称"
 			}
 			if(this.userInfo.phone != null || this.userInfo.phone != ""){
 				this.userphone = this.userInfo.phone
@@ -310,13 +307,11 @@
 				// 	uni.setStorageSync("task", data.task);
 				// 	uni.setStorageSync("contract", data.contract);
 				// 	uni.setStorageSync('showTran', data.showTran);
-
 				// 	that.showTran = data.showTran
 				// 	that.gridList[4].tips = data.task
 				// 	that.gridList[2].tips = data.contract
 				// 	that.companyId = data.companyId
 				// 	uni.hideLoading()
-
 				// })
 			},
 			gridClick(item, index) {
@@ -354,7 +349,6 @@
 							that.mycarStyle = "height:" + height + "rpx;width:" + width + "rpx"
 							that.modalName = 'MycarModal'
 						}
-
 						uni.hideLoading()
 					})
 
@@ -365,7 +359,6 @@
 						url: item.url + `?companyId=${that.companyId}`
 					})
 				}
-
 			},
 			toLogin() {
 				if (!this.hasLogin) {
@@ -416,16 +409,13 @@
 							uni.clearStorageSync();
 							that.$store.commit('logout')
 							that.$api.logout()
-							// uni.navigateTo({
-							// 	url: `/pages/public/login`
-							// })
-							console.log(that.$api)
-							console.log("成功没?")
+							uni.navigateTo({
+								url: `/pages/public/login`
+							})
 						}
 					}
 				})
 			},
-
 			/**
 			 * 统一跳转接口,拦截未登录路由
 			 * navigator标签现在默认没有转场动画,所以用view
@@ -443,14 +433,12 @@
 				uni.navigateTo({
 					url: `/pageB/car/mycar_detail?carNo=${carNo}`
 				})
-
 			},
 			qrClick(userInfo) {
 				this.modalName = null
 				uni.navigateTo({
 					url: `/pages/user/qr`
 				})
-
 			},
 			scanCode() {
 				uni.scanCode({