浏览代码

版本升级、修改密码

chenrui 3 年之前
父节点
当前提交
18a0ce1a62
共有 6 个文件被更改,包括 33 次插入27 次删除
  1. 2 2
      api/data.js
  2. 1 1
      api/user.js
  3. 2 1
      config/index.js
  4. 17 13
      pages/login/login.vue
  5. 1 1
      pages/userCenter/changePwd.vue
  6. 10 9
      pages/userCenter/index.vue

+ 2 - 2
api/data.js

@@ -9,8 +9,8 @@ export const getLookUpDatas = (params) => {
 // 查询最新版本信息
 export const getSysVersion = (params) => {
   return axios.request({
-    url: `zycar-mgr/sysVersion/getLatest`,
+    url: `sysVersion/getLatest`,
     method: 'post',
-	data: {applyCode:'zyit',versionType: params.versionType}
+	data: {applyCode:'jgqp',versionType: params.versionType}
   }, true)
 }

+ 1 - 1
api/user.js

@@ -59,7 +59,7 @@ export const getStore = (token) => {
 // 修改密码
 export const changePwd = params => {
   return axios.request({
-    url: 'user/updatePwd',
+    url: 'user/changePWD',
     method: 'post',
     data: {
       oldPassword: params.oldPassword,

+ 2 - 1
config/index.js

@@ -7,7 +7,8 @@ const getConfig = (theme) => {
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
 			// dev_URL: 'http://192.168.16.107:7300/mock/61aad8ea5688cb3878d81e39/qpls-md/', // 本地地址
-			dev_URL: 'http://frps.chelingzhu.com:7800/qpls-md/', // 本地地址
+			// dev_URL: 'http://frps.chelingzhu.com:7800/qpls-md/', // 本地地址
+			dev_URL: 'http://1982177cu2.iask.in/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 17 - 13
pages/login/login.vue

@@ -20,7 +20,7 @@
 							</label>
 						</checkbox-group>
 					</view>
-					<view class="forget-pass" @click="forgetPass">忘记密码</view>
+					<!-- <view class="forget-pass" @click="forgetPass">忘记密码</view> -->
 				</view>
 				<view class="form-btn-con">
 					<button class="form-btn" :disabled="isDisabled" :style="{'background':isDisabled?'#e5e5e5':$config('primaryColor')}" form-type="submit">登录</button>
@@ -88,18 +88,22 @@ export default {
 	methods: {
 		// 版本更新
 		AndroidCheckUpdate(){
-			// let _this = this
-			// let version = getApp().globalData.version
-			// uni.showLoading({
-			// 	title: '正在登录...'
-			// });
-			// getSysVersion({versionType:version.platform=='android'?'ANDROID':'IOS'}).then(ret => {
-			// 	if(ret.status == 200){
-			// 		this.$store.state.vuex_versionInfo = ret.data
-			// 		checkVersionToLoadUpdate(ret.data,0,_this.formSubmit);
-			// 	}
-			// })
-			this.formSubmit()
+			let _this = this
+			let version = getApp().globalData.version
+			uni.showLoading({
+				title: '正在登录...'
+			});
+			getSysVersion({versionType:version.platform=='android'?'ANDROID':'IOS'}).then(ret => {
+				if(ret.status == 200){
+					if(ret.data){
+						this.$store.state.vuex_versionInfo = ret.data || null
+						checkVersionToLoadUpdate(ret.data,0,_this.formSubmit)
+					}else{
+						this.formSubmit()
+					}
+				}
+				uni.hideLoading()
+			})
 		},
 		// 过滤权限code
 		fiterAuthCode(data) {

+ 1 - 1
pages/userCenter/changePwd.vue

@@ -109,7 +109,7 @@
 						this.$store.state.vuex_userData = ''
 						uni.setStorageSync('setStatusIndexFunc', 0)
 						uni.reLaunch({
-							url: "/pages/login/pwLogin"
+							url: "/pages/login/login"
 						})
 					}
 					this.loading = false

+ 10 - 9
pages/userCenter/index.vue

@@ -9,8 +9,8 @@
 				<u-avatar :src="userAvatarUrl" size="100" class="avatar"></u-avatar>
 			</view>
 			<view class="user-info">
-				<text class="user-name">用户名</text>
-				<text class="user-phone">15785829632</text>
+				<text class="user-name">{{$store.state.vuex_userData.userNameCN}}</text>
+				<text class="user-phone">{{$store.state.vuex_userData.username}}</text>
 			</view>
 		</view>
 		<!-- 列表 -->
@@ -52,13 +52,14 @@
 		methods:{
 			//  获取用户信息
 			getUserInfo(){
-				getUserInfo().then(res => {
-					if(res.status == 200){
-						this.userInfoData = res.data
-					}else{
-						this.userInfoData = null
-					}
-				})
+				console.log(this.$store.state.vuex_userData)
+				// getUserInfo().then(res => {
+				// 	if(res.status == 200){
+				// 		this.userInfoData = res.data
+				// 	}else{
+				// 		this.userInfoData = null
+				// 	}
+				// })
 			},
 			// 打开对应的页面
 			toPage(index){