ソースを参照

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

ccjgmwz 3 年 前
コミット
967bb69e33
43 ファイル変更896 行追加346 行削除
  1. 1 0
      pageD/warehousings/ex_warehouse.vue
  2. 21 0
      pages.json
  3. 1 0
      pages/public/login_account_number.vue
  4. 40 34
      pages/release/release.vue
  5. 113 0
      pages/user/setUp.vue
  6. 124 0
      pages/user/set_nickname.vue
  7. 211 0
      pages/user/set_picture.vue
  8. 385 312
      pages/user/user.vue
  9. BIN
      static/img/myimg/LiangNong.png
  10. BIN
      static/img/myimg/LiangNong@2x.png
  11. BIN
      static/img/myimg/LiangNong@3x.png
  12. BIN
      static/img/myimg/LiangShang@2x.png
  13. BIN
      static/img/myimg/LiangShang@3x.png
  14. BIN
      static/img/myimg/SiJi.png
  15. BIN
      static/img/myimg/SiJi@2x.png
  16. BIN
      static/img/myimg/SiJi@3x.png
  17. BIN
      static/img/myimg/YongHu.png
  18. BIN
      static/img/myimg/YongHu@2x.png
  19. BIN
      static/img/myimg/YongHu@3x.png
  20. BIN
      static/img/myimg/gengduo1.png
  21. BIN
      static/img/myimg/gengduo1@2x.png
  22. BIN
      static/img/myimg/gengduo1@3x.png
  23. BIN
      static/img/sign/authentication.png
  24. BIN
      static/img/sign/authentication@2x.png
  25. BIN
      static/img/sign/authentication@3x.png
  26. BIN
      static/img/sign/myContract.png
  27. BIN
      static/img/sign/myContract@2x.png
  28. BIN
      static/img/sign/myContract@3x.png
  29. BIN
      static/img/sign/myRelease.png
  30. BIN
      static/img/sign/myRelease@2x.png
  31. BIN
      static/img/sign/myRelease@3x.png
  32. BIN
      static/img/sign/myTask.png
  33. BIN
      static/img/sign/myTask@2x.png
  34. BIN
      static/img/sign/myTask@3x.png
  35. BIN
      static/img/sign/receiveGoods.png
  36. BIN
      static/img/sign/receiveGoods@2x.png
  37. BIN
      static/img/sign/receiveGoods@3x.png
  38. BIN
      static/img/sign/return.png
  39. BIN
      static/img/sign/return@2x.png
  40. BIN
      static/img/sign/return@3x.png
  41. BIN
      static/img/sign/shezhi.png
  42. BIN
      static/img/sign/shezhi@2x.png
  43. BIN
      static/img/sign/shezhi@3x.png

+ 1 - 0
pageD/warehousings/ex_warehouse.vue

@@ -385,6 +385,7 @@
 				}
 			},
 			getImgUrl(res) {
+				console.log(res)
 				this.imgUrls.push(res);
 			},
 			onRemove(index) {

+ 21 - 0
pages.json

@@ -259,6 +259,27 @@
 			}
 
 		}, {
+			"path": "pages/user/setUp",
+			"style": {
+				"navigationBarTitleText": "设置",
+				"enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/user/set_picture",
+			"style": {
+				"navigationBarTitleText": "头像",
+				"enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/user/set_nickname",
+			"style": {
+				"navigationBarTitleText": "昵称",
+				"enablePullDownRefresh": true
+			}
+		},
+		{
 			"path": "pages/sale/port",
 			"style": {
 				"navigationBarTitleText": "港口价格",

+ 1 - 0
pages/public/login_account_number.vue

@@ -4,6 +4,7 @@
 		<!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
 		<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>

+ 40 - 34
pages/release/release.vue

@@ -123,7 +123,6 @@
 						showCancel: true,
 						confirmText: '确定',
 						success: function(res) {
-
 							if (res.confirm) {
 								that.$api.doRequest('post', '/salePlanInfo/api/editStatus', {
 										id: item.id,
@@ -156,7 +155,6 @@
 			},
 			edit(item) {
 				if (item.type == "买粮") {
-
 					uni.navigateTo({
 						url: `/pageD/myRelease/buyEdit?id=${item.id}`
 					})
@@ -173,23 +171,27 @@
 						content: '确定删除该信息?',
 						showCancel: true,
 						confirmText: '确定',
-						success: (e) => {
-							this.$api.doRequest('post', '/procurementPlanInfo/api/deleteProcurementPlan', {
-									id: item.id
-								}).then(res => {
-									if (res.data.message == "Success") {
-										this.$api.msg('删除成功!')
-										this.getList()
-										return
-									}
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.errmsg,
-										icon: 'none',
-										duration: 2000
+						success: function(res) {
+							if (res.confirm) {
+								this.$api.doRequest('post', '/procurementPlanInfo/api/deleteProcurementPlan', {
+										id: item.id
+									}).then(res => {
+										if (res.data.message == "Success") {
+											this.$api.msg('删除成功!')
+											this.getList()
+											return
+										}
 									})
-								});
+									.catch(res => {
+										uni.showToast({
+											title: res.errmsg,
+											icon: 'none',
+											duration: 2000
+										})
+									});
+							} else if (res.cancel) {
+								// console.log('用户点击取消');
+							}
 						},
 						fail: () => {},
 						complete: () => {}
@@ -200,23 +202,27 @@
 						content: '确定删除该信息?',
 						showCancel: true,
 						confirmText: '确定',
-						success: (e) => {
-							this.$api.doRequest('post', '/salePlanInfo/api/deleteSalePlanInfo', {
-									id: item.id
-								}).then(res => {
-									if (res.data.message == "Success") {
-										this.$api.msg('删除成功!')
-										this.getList()
-										return
-									}
-								})
-								.catch(res => {
-									uni.showToast({
-										title: res.errmsg,
-										icon: 'none',
-										duration: 2000
+						success: function(res) {
+							if (res.confirm) {
+								this.$api.doRequest('post', '/salePlanInfo/api/deleteSalePlanInfo', {
+										id: item.id
+									}).then(res => {
+										if (res.data.message == "Success") {
+											this.$api.msg('删除成功!')
+											this.getList()
+											return
+										}
 									})
-								});
+									.catch(res => {
+										uni.showToast({
+											title: res.errmsg,
+											icon: 'none',
+											duration: 2000
+										})
+									});
+							} else if (res.cancel) {
+								// console.log('用户点击取消');
+							}
 						},
 						fail: () => {},
 						complete: () => {}

+ 113 - 0
pages/user/setUp.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="container">
+		<view class=" flex headPortrait justify-between">
+			<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>
+			</view>
+			
+		</view>
+		<view class="flex headPortrait justify-between">
+			<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>
+			</view>
+	
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				headUrl:"../../static/img/myimg/YongHu@3x.png",
+				username:"",
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		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:{
+			switchPicture(){	
+				uni.navigateTo({
+					url: `/pages/user/set_picture`
+				})
+			},
+			nickname(){
+				uni.navigateTo({
+					url: `/pages/user/set_nickname`
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		padding: 10px 10px 0px;
+		background-color: #F5F6FA;
+	}
+
+	.headPortrait {
+		width: 100%;
+		height: 52px;
+		margin-top: 15px;
+		background-color: #FFFFFF;
+		border-radius: 6px;
+		// justify-content: flex-end;
+	}
+
+	.title {
+		font-size: 16px;
+		line-height: 50px;
+		font-weight: 600;
+		margin-left: 10px;
+	}
+
+	.pictures {
+		justify-content: flex-end;
+		width: 35px;
+		height: 35px;
+		background-color: #E0FAF6;
+		border-radius: 18px;
+		margin-top: 6px;
+	}
+
+	.picture {
+		width: 35px;
+		height: 35px;
+	}
+	.arrow {
+		margin-left: 15px;
+		width: 8px;
+		height: 12px;
+		top: 18px;
+		// justify-content: flex-end
+
+	}
+	.nextStep{
+		margin-right: 20px;
+	}
+	.username{
+		line-height: 50px;
+		color: #6D6D72;
+	}
+</style>

+ 124 - 0
pages/user/set_nickname.vue

@@ -0,0 +1,124 @@
+<template>
+	<view class="container">
+		<view class="explain">
+			昵称长度限制在2-24个字符内
+		</view>
+		<view class="editText">
+			<input placeholder="请输入昵称" name="input" v-model="nickname" class="texts"></input>
+		</view>
+		<view class="btn" @click="commit">
+			保存
+		</view>
+	</view>
+
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				nickname: "",
+				deptListurl: {},
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			
+			commit() {
+				if (this.nickname == null || this.nickname == "") {
+					this.$api.msg('请输入昵称!')
+					return
+				}
+				if (this.nickname.length < 2 || this.nickname.length > 24) {
+					this.$api.msg('请正确输入昵称!')
+					return
+				}
+				var that = this
+				uni.showModal({
+					content: "您确定要更改昵称?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							that.deptListurl.userName = that.nickname
+							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(res => {
+								if (res.data.code == 200) {
+								
+								var _student = wx.getStorageSync('userInfo');
+								_student.userName = that.nickname;
+								wx.setStorageSync('userInfo', _student);
+								
+									uni.navigateTo({
+										url: `/pages/user/setUp`
+									})
+									}
+								})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+							
+						} else if (res.cancel) {
+							// console.log('用户点击取消');
+						}
+					},
+				})
+				
+				
+				
+			},
+		}
+	}
+</script>
+
+<style>
+	.container {
+		padding: 10px 0px;
+		background-color: #F5F6FA;
+	}
+
+	.explain {
+		margin-left: 16px;
+		font-size: 16px;
+		color: #6D6D72;
+		margin-top: 20px;
+	}
+
+	.editText {
+		width: 100%;
+		height: 50px;
+		background-color: #FFFFFF;
+		line-height: 50px;
+		padding-left: 20px;
+		margin-top: 10px;
+		padding-top: 12px;
+	}
+
+	.texts {
+		line-height: 50px;
+		color: #C6C6C8;
+		font-size: 16px;
+		/* placeholder-style="font-size:18px" */
+	}
+
+	.btn {
+		width: 100%;
+		height: 50px;
+		background-color: #FFFFFF;
+		text-align: center;
+		color: #22C572;
+		font-size: 20px;
+		margin-top: 16px;
+		border-radius: 20px;
+		line-height: 50px;
+		font-weight: 500;
+	}
+</style>

+ 211 - 0
pages/user/set_picture.vue

@@ -0,0 +1,211 @@
+<template>
+	<view class="container">
+		<view class="headPortrait flex">
+			<view class="pictures">
+				<image src="../../static/img/myimg/YongHu@3x.png" v-bind:class="pictures" @click="oKSelected(1)">
+				</image>
+				<view style="margin: 0 auto;text-align: center;margin-top: -15px;" v-if="pictures == 'picture1'">
+					<image src="../../static/img/login/select@3x.png" class="duihao"></image>
+				</view>
+
+				<view class="title">默认</view>
+			</view>
+			<view class="pictures">
+				<image src="../../static/img/myimg/SiJi@3x.png" v-bind:class="picturesTwo" @click="oKSelected(2)">
+				</image>
+				<view style="margin: 0 auto;text-align: center;margin-top: -15px;" v-if="picturesTwo == 'picture1'">
+					<image src="../../static/img/login/select@3x.png" class="duihao"></image>
+				</view>
+				<view class="title">司机</view>
+			</view>
+			<view class="pictures">
+				<image src="../../static/img/myimg/LiangShang@3x.png" v-bind:class="picturesThree"
+					@click="oKSelected(3)"></image>
+				<view style="margin: 0 auto;text-align: center;margin-top: -15px;" v-if="picturesThree == 'picture1'">
+					<image src="../../static/img/login/select@3x.png" class="duihao"></image>
+				</view>
+				<view class="title">粮商</view>
+			</view>
+			<view class="pictures">
+				<image src="../../static/img/myimg/LiangNong@3x.png" v-bind:class="picturesFour" @click="oKSelected(4)">
+				</image>
+				<view style="margin: 0 auto;text-align: center;margin-top: -15px;" v-if="picturesFour == 'picture1'">
+					<image src="../../static/img/login/select@3x.png" class="duihao"></image>
+				</view>
+				<view class="title">粮农</view>
+			</view>
+		</view>
+		<view class="btn" @click="commit">
+			保存
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				pictures: "picture",
+				picturesTwo: "picture",
+				picturesThree: "picture",
+				picturesFour: "picture",
+				identityUrl: "",
+				deptListurl: {},
+
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			oKSelected(number) {
+				if (number == 1) {
+					if (this.pictures == "picture") {
+						this.pictures = "picture1"
+						this.picturesTwo = "picture"
+						this.picturesThree = "picture"
+						this.picturesFour = "picture"
+						this.identityUrl = "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/162874144867649.png"
+					} else {
+						this.pictures = "picture"
+					}
+				} else if (number == 2) {
+					if (this.picturesTwo == "picture") {
+						this.picturesTwo = "picture1"
+						this.pictures = "picture"
+						this.picturesThree = "picture"
+						this.picturesFour = "picture"
+						this.identityUrl = "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/162874149682940.png "
+					} else {
+						this.picturesTwo = "picture"
+						this.identityUrl = ""
+					}
+				} else if (number == 3) {
+					if (this.picturesThree == "picture") {
+						this.picturesThree = "picture1"
+						this.pictures = "picture"
+						this.picturesTwo = "picture"
+						this.picturesFour = "picture"
+						this.identityUrl = "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/1628741540162138.png"
+					} else {
+						this.picturesThree = "picture"
+						this.identityUrl = ""
+					}
+				} else if (number == 4) {
+					if (this.picturesFour == "picture") {
+						this.picturesFour = "picture1"
+						this.pictures = "picture"
+						this.picturesTwo = "picture"
+						this.picturesThree = "picture"
+						this.identityUrl = "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/162874156836497.png"
+					} else {
+						this.picturesFour = "picture"
+						this.identityUrl = ""
+					}
+				}
+			},
+			commit() {
+				if (this.identityUrl == null || this.identityUrl == "") {
+					this.$api.msg('请选择一张图片!')
+					return
+				}
+				var that = this
+				uni.showModal({
+					content: "您确定要更改图像?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							that.deptListurl.avatarUrl = that.identityUrl
+							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
+									res => {
+										if (res.data.code == 200) {
+											that.userInfo.avatarUrl = that.identityUrl
+											var _student = wx.getStorageSync('userInfo');
+											_student.avatarUrl = that.identityUrl;
+											wx.setStorageSync('userInfo', _student);
+											uni.navigateTo({
+												url: `/pages/user/setUp`
+											})
+										}
+
+									})
+								.catch(res => {
+									uni.showToast({
+										title: res.errmsg,
+										icon: 'none',
+										duration: 2000
+									})
+								});
+						} else if (res.cancel) {
+							// console.log('用户点击取消');
+						}
+					},
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	.container {
+		padding: 10px 10px 0px;
+		background-color: #F5F6FA;
+	}
+
+	.headPortrait {
+		width: 100%;
+		background-color: #FFFFFF;
+		border-radius: 20px;
+	}
+
+	.picture {
+		width: 70px;
+		height: 70px;
+		margin: 0 auto;
+		margin-top: 10px;
+	}
+
+	.picture1 {
+		width: 70px;
+		height: 70px;
+		margin: 0 auto;
+		border-radius: 35px;
+		margin-top: 10px;
+		border: 2px solid #22C572;
+	}
+
+	.title {
+		text-align: center;
+		margin: 16px 0;
+		font-size: 14px;
+		font-weight: 500;
+	}
+
+	.pictures {
+		margin-left: 15px;
+	}
+
+	.duihao {
+		width: 18px;
+		height: 18px;
+		text-align: center;
+		margin: 0 auto;
+	}
+
+	.btn {
+		width: 100%;
+		height: 50px;
+		background-color: #FFFFFF;
+		text-align: center;
+		color: #22C572;
+		font-size: 20px;
+		margin-top: 16px;
+		border-radius: 20px;
+		line-height: 50px;
+		font-weight: 500;
+	}
+</style>

ファイルの差分が大きいため隠しています
+ 385 - 312
pages/user/user.vue


BIN
static/img/myimg/LiangNong.png


BIN
static/img/myimg/LiangNong@2x.png


BIN
static/img/myimg/LiangNong@3x.png


BIN
static/img/myimg/LiangShang@2x.png


BIN
static/img/myimg/LiangShang@3x.png


BIN
static/img/myimg/SiJi.png


BIN
static/img/myimg/SiJi@2x.png


BIN
static/img/myimg/SiJi@3x.png


BIN
static/img/myimg/YongHu.png


BIN
static/img/myimg/YongHu@2x.png


BIN
static/img/myimg/YongHu@3x.png


BIN
static/img/myimg/gengduo1.png


BIN
static/img/myimg/gengduo1@2x.png


BIN
static/img/myimg/gengduo1@3x.png


BIN
static/img/sign/authentication.png


BIN
static/img/sign/authentication@2x.png


BIN
static/img/sign/authentication@3x.png


BIN
static/img/sign/myContract.png


BIN
static/img/sign/myContract@2x.png


BIN
static/img/sign/myContract@3x.png


BIN
static/img/sign/myRelease.png


BIN
static/img/sign/myRelease@2x.png


BIN
static/img/sign/myRelease@3x.png


BIN
static/img/sign/myTask.png


BIN
static/img/sign/myTask@2x.png


BIN
static/img/sign/myTask@3x.png


BIN
static/img/sign/receiveGoods.png


BIN
static/img/sign/receiveGoods@2x.png


BIN
static/img/sign/receiveGoods@3x.png


BIN
static/img/sign/return.png


BIN
static/img/sign/return@2x.png


BIN
static/img/sign/return@3x.png


BIN
static/img/sign/shezhi.png


BIN
static/img/sign/shezhi@2x.png


BIN
static/img/sign/shezhi@3x.png


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません