Browse Source

对接登录

master
前端-胡立永 5 months ago
parent
commit
16eb69e7c8
5 changed files with 28 additions and 25 deletions
  1. +3
    -1
      App.vue
  2. +4
    -1
      components/user/visualization.vue
  3. +7
    -11
      pages/index/index.vue
  4. +2
    -1
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  5. +12
    -11
      store/store.js

+ 3
- 1
App.vue View File

@ -1,7 +1,9 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
this.$store.commit('getUserInfo')
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
}
}, },
onShow: function() { onShow: function() {
this.$store.commit('initConfig') this.$store.commit('initConfig')


+ 4
- 1
components/user/visualization.vue View File

@ -195,10 +195,13 @@
axisLabel: { axisLabel: {
color: '#fff', color: '#fff',
fontSize : '10px', fontSize : '10px',
}
},
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
min : function(value){
return value.min;
},
axisLine: { axisLine: {
lineStyle: { lineStyle: {
color: '#fff' color: '#fff'


+ 7
- 11
pages/index/index.vue View File

@ -63,13 +63,14 @@
} }
}, },
onShow() { onShow() {
this.getImagePhoneOther()
if (!this.$store.state.shop && !this.$store.state.buy) {
uni.reLaunch({
url: '/pages_order/auth/selectionIdentity?back=no&'
})
// if (!this.$store.state.shop && !this.$store.state.buy) {
// uni.reLaunch({
// url: '/pages_order/auth/selectionIdentity?back=no&'
// })
// }
if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo')
} }
this.$store.commit('getUserInfo')
this.getBannerList() this.getBannerList()
}, },
computed: { computed: {
@ -89,11 +90,6 @@
url: '/pages_order/order/offerOrBillLading?titleIndex=' + titleIndex url: '/pages_order/order/offerOrBillLading?titleIndex=' + titleIndex
}) })
}, },
getImagePhoneOther() {
this.$api('getImagePhoneOther', res => {
})
},
} }
} }
</script> </script>


+ 2
- 1
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -1,6 +1,7 @@
<template> <template>
<view class="refundsOrExchange"> <view class="refundsOrExchange">
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
<navbar :title="titleList[titleIndex]" leftClick
@leftClick="$utils.redirectTo('/pages/index/index')" />
<view class="frame"> <view class="frame">


+ 12
- 11
store/store.js View File

@ -94,23 +94,24 @@ const store = new Vuex.Store({
state.pic = res.result.pic state.pic = res.result.pic
// 如果什么身份都没有,就去注册 // 如果什么身份都没有,就去注册
if(!state.shopData && !state.buy &&
![
'/pages_order/auth/selectionIdentity',
'/pages_order/auth/registerShop',
].includes(this.$route.path)){
uni.reLaunch({
url: '/pages_order/auth/selectionIdentity?back=no&'
})
}
// if(!state.shopData && !state.buy &&
// ![
// '/pages_order/auth/selectionIdentity',
// '/pages_order/auth/registerShop',
// ].includes(this.$route.path)){
// uni.reLaunch({
// url: '/pages_order/auth/selectionIdentity?back=no&'
// })
// }
// 没有供应商身份 // 没有供应商身份
if(!state.shopData){ if(!state.shopData){
state.shop = false state.shop = false
// 没有采购商身份 // 没有采购商身份
}else if(!state.buy){
state.shop = true
} }
// else if(!state.buy){
// state.shop = true
// }
} }
}) })
}, },


Loading…
Cancel
Save