ccjgmwz 3 年 前
コミット
0aec9eb77d

+ 2 - 2
config/index.js

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

+ 40 - 52
pages/user/set_nickname.vue

@@ -39,60 +39,48 @@
 					return
 				}
 				var that = this
-				uni.showModal({
-					content: "您确定要更改昵称?",
-					showCancel: true,
-					confirmText: '确定',
-					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) {
-											uni.showToast({
-												title: '修改成功!',
-												icon: 'success',
-												duration: 2000,
-												success() {
-													setTimeout(()=>{
-														var _student = uni.getStorageSync('userInfo');
-														_student.userName = that.nickname;
-														uni.setStorageSync('userInfo', _student);
-														var name = 'userInfo';
-														var value = _student;
-														that.$store.commit('$uStore', {
-															name,
-															value
-														});
-														uni.navigateBack()
-													},2000)
-												}
-											})
-										}
-									})
-								.catch(res => {
-									if(res.errmsg){
-										uni.showToast({
-											title: res.errmsg,
-											icon: 'none',
-											duration: 2000
-										})
+				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) {
+								uni.showToast({
+									title: '修改成功!',
+									icon: 'success',
+									duration: 2000,
+									success() {
+										setTimeout(()=>{
+											var _student = uni.getStorageSync('userInfo');
+											_student.userName = that.nickname;
+											uni.setStorageSync('userInfo', _student);
+											var name = 'userInfo';
+											var value = _student;
+											that.$store.commit('$uStore', {
+												name,
+												value
+											});
+											uni.navigateBack()
+										},2000)
 									}
-									else{
-										uni.showToast({
-											title: "系统异常,请联系管理员",
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								});
-
-						} else if (res.cancel) {
-							// console.log('用户点击取消');
+								})
+							}
+						})
+					.catch(res => {
+						if(res.errmsg){
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+						else{
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
 						}
-					},
-				})
+					});
 
 
 

+ 43 - 54
pages/user/set_picture.vue

@@ -113,64 +113,53 @@
 					return
 				}
 				var that = this
-				uni.showModal({
-					content: "您确定要更改图像?",
-					showCancel: true,
-					confirmText: '确定',
-					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,
-													success() {
-														setTimeout(()=>{
-															that.userInfo.avatarUrl = that.identityUrl
-															var _student = uni.getStorageSync('userInfo');
-															_student.avatarUrl = that.identityUrl;
-															uni.setStorageSync('userInfo', _student);
-															var name = 'userInfo';
-															var value = _student;
-															that.$store.commit('$uStore', {
-																name,
-																value
-															});
-															// this.$api.msg('修改成功2!')
-															uni.navigateBack({
-																delta:1
-															})
-														},2000)
-													}
+				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,
+										success() {
+											setTimeout(()=>{
+												that.userInfo.avatarUrl = that.identityUrl
+												var _student = uni.getStorageSync('userInfo');
+												_student.avatarUrl = that.identityUrl;
+												uni.setStorageSync('userInfo', _student);
+												var name = 'userInfo';
+												var value = _student;
+												that.$store.commit('$uStore', {
+													name,
+													value
+												});
+												// this.$api.msg('修改成功2!')
+												uni.navigateBack({
+													delta:1
 												})
-											
+											},2000)
 										}
 									})
-								.catch(res => {
-									if(res.data.errmsg){
-										uni.showToast({
-											title: res.data.errmsg,
-											icon: 'none',
-											duration: 2000
-										})
-									}
-									else{
-										uni.showToast({
-											title: "系统异常,请联系管理员",
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								});
-						} else if (res.cancel) {
-							// console.log('用户点击取消');
+								
+							}
+						})
+					.catch(res => {
+						if(res.data.errmsg){
+							uni.showToast({
+								title: res.data.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
 						}
-					},
-				})
+						else{
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
 			},
 		}
 	}

+ 6 - 67
pages/user/user.vue

@@ -64,18 +64,10 @@
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
 		</view>
-		<neil-modal :show="inputShow" @close="cancel" :style="{display:inputStatus}" title="修改昵称" showCancel="true">
-			<input v-model="inputContent" style="margin:20upx;" placeholder="请输入昵称" />
-			<button class="margin:20upx;bg-green">
-				确认修改
-			</button>
-
-		</neil-modal>
 	</view>
 </template>
 <script>
 	import dragButton from "@/components/drag-button/drag-button.vue";
-	import neilModal from '@/components/neil-modal/neil-modal.vue';
 	import {
 		mapState
 	} from 'vuex';
@@ -84,7 +76,6 @@
 		pageAtTop = true;
 	export default {
 		components: {
-			neilModal,
 			dragButton
 		},
 		data() {
@@ -106,63 +97,6 @@
 				userphone:"",
 				username:"请更改昵称",
 				gridList: [
-					// {
-					// 	num:0,
-					// 	name: '货源信息',
-					// 	icon:'cuIcon-apps',
-					// 	tips: 0,
-					// 	url:'/pages/tran/my_tran?TabCur=0',
-					// 	show:true
-					// },
-					// {
-					// 	num:1,
-					// 	name: '承运信息',
-					// 	icon:'cuIcon-calendar',
-					// 	tips: 0,
-					// 	url:'/pages/tran/my_tran?TabCur=1',
-					// 	show:true
-					// },
-					// {
-					// 	num:2,
-					// 	name: '我的合同',
-					// 	icon:'cuIcon-copy',
-					// 	tips: 0,
-					// 	url:'/pageB/contract/contract',
-					// 	show:true
-					// },
-					// {
-					// 	num:3,
-					// 	name: '消息列表',
-					// 	icon:'cuIcon-news',
-					// 	tips: 0,
-					// 	url:'/pages/user/message',
-					// 	show:true
-					// },
-					// {
-					// 	num:4,
-					// 	name: '任务中心',
-					// 	icon:'cuIcon-copy',
-					// 	tips: 0,
-					// 	url:`/pages/user/task`,
-					// 	show:true
-					// },
-					// {
-					// 	num:5,
-					// 	name: '我的车辆',
-					// 	icon:'cuIcon-deliver',
-					// 	tips: 0,
-					// 	url:'',
-					// 	show:true
-					// },
-					// {
-					// 	num:6,
-					// 	name: '联系我们',
-					// 	icon:'cuIcon-phone',
-					// 	tips: 0,
-					// 	url:'/pages/user/contact',
-					// 	show:true
-					// },
-					// {
 					{
 						num: 0,
 						name: '身份认证',
@@ -261,7 +195,9 @@
 			// 手机号中间4位加*
 			starUserphone(){
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				return this.userphone.replace(reg, "$1****$2");
+				if(this.userphone){
+					return this.userphone.replace(reg, "$1****$2");
+				}
 			}
 		},
 		onShow() {
@@ -480,6 +416,9 @@
 					confirmText: '确定',
 					success: (e) => {
 						if (e.confirm) {
+							uni.hideTabBarRedDot({
+								index:3
+							})
 							uni.clearStorageSync();
 							that.$store.commit('logout')
 							that.$api.logout()

BIN
static/img/jiaoyi.png


BIN
static/img/jiaoyi_check.png


BIN
static/img/liangxin.png


BIN
static/img/liangxin_check.png


BIN
static/img/splash1.png


BIN
static/img/splash1@2x.png


BIN
static/img/splash1@3x.png


BIN
static/img/splash2.png


BIN
static/img/splash2@2x.png


BIN
static/img/splash2@3x.png


BIN
static/img/splash3.png


BIN
static/img/splash3@2x.png


BIN
static/img/splash3@3x.png


BIN
static/img/wode.png


BIN
static/img/wode_check.png


BIN
static/img/wuliu.png


BIN
static/img/wuliu_check.png


BIN
static/img/zixun.png


BIN
static/img/zixun_check.png