|
@@ -123,80 +123,61 @@
|
|
|
loginFlag: 2
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
|
|
|
- mobilePhone: this.phone,
|
|
|
- veriCode: "123456",
|
|
|
- loginFlag: 2
|
|
|
- }).then(res1 => {
|
|
|
- that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
|
|
|
- reCommonId: this.userInfo.id,
|
|
|
- }).then(res3 => {
|
|
|
- if (res3.data) {
|
|
|
- let name = 'myTip';
|
|
|
- let value = res3.data
|
|
|
- if (value == 0) {
|
|
|
- uni.removeTabBarBadge({
|
|
|
- index: 2
|
|
|
- })
|
|
|
- }
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- if (value != 0 && value) {
|
|
|
- uni.setTabBarBadge({
|
|
|
- index: 2,
|
|
|
- text: value + ""
|
|
|
- })
|
|
|
- }
|
|
|
+ uni.setStorageSync('userInfo', res.data)
|
|
|
+ that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
|
|
|
+ reCommonId: res.data.id,
|
|
|
+ }).then(res3 => {
|
|
|
+ if (res3.data) {
|
|
|
+ let name = 'myTip';
|
|
|
+ let value = res3.data
|
|
|
+ if (value == 0) {
|
|
|
+ uni.removeTabBarBadge({
|
|
|
+ index: 2
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
- if (res1.code == 200) {
|
|
|
- uni.setStorageSync('pcuserInfo', res1.data)
|
|
|
- helper.getListByUserId()
|
|
|
- } else {
|
|
|
- that.$api.doRequest('post', '/commonUser/api/loginQuickly', {
|
|
|
- mobilePhone: '14444444444',
|
|
|
- veriCode: "123456",
|
|
|
- loginFlag: 2
|
|
|
- }).then(res2 => {
|
|
|
- that.$request.baseRequest('get',
|
|
|
- '/newsInfo/unreadMessage', {
|
|
|
- reCommonId: this.userInfo.id,
|
|
|
- }).then(res3 => {
|
|
|
- if (res3.data) {
|
|
|
- let name = 'myTip';
|
|
|
- let value = res3.data
|
|
|
- if (value == 0) {
|
|
|
- uni.removeTabBarBadge({
|
|
|
- index: 2
|
|
|
- })
|
|
|
- }
|
|
|
- that.$store.commit('$uStore', {
|
|
|
- name,
|
|
|
- value
|
|
|
- });
|
|
|
- if (value != 0 && value) {
|
|
|
- uni.setTabBarBadge({
|
|
|
- index: 2,
|
|
|
- text: value + ""
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ that.$store.commit('$uStore', {
|
|
|
+ name,
|
|
|
+ value
|
|
|
+ });
|
|
|
+ if (value != 0 && value) {
|
|
|
+ uni.setTabBarBadge({
|
|
|
+ index: 2,
|
|
|
+ text: value + ""
|
|
|
})
|
|
|
- uni.setStorageSync('pcuserInfo', res2.data)
|
|
|
- helper.getListByUserId()
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- uni.setStorageSync('userInfo', res.data)
|
|
|
- helper.getListByUserId()
|
|
|
- that.$store.commit('login', res.data)
|
|
|
- // that.liangxinLogin()
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/goodSource/index'
|
|
|
- });
|
|
|
- uni.hideLoading()
|
|
|
+ that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
|
|
|
+ driverPhone: this.phone,
|
|
|
+ }).then(res2 => {
|
|
|
+ if (res.data.statusFlag == '已禁用') {
|
|
|
+ this.isShowAlert = true
|
|
|
+ uni.hideLoading()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.setStorageSync('pcuserInfo', res.data)
|
|
|
+ uni.setStorageSync('userInfo', res.data)
|
|
|
+ uni.setStorageSync('firstAuthentication', res2.data)
|
|
|
+ helper.getListByUserId()
|
|
|
+ that.$store.commit('login', res.data)
|
|
|
+ var name = 'userInfo';
|
|
|
+ var value = res.data;
|
|
|
+ that.$store.commit('$uStore', {
|
|
|
+ name,
|
|
|
+ value
|
|
|
+ });
|
|
|
+
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/goodSource/index'
|
|
|
+ });
|
|
|
+ uni.hideLoading()
|
|
|
+ // that.liangxinLogin()
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/goodSource/index'
|
|
|
+ });
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
uni.hideLoading()
|
|
|
uni.showToast({
|