diff --git a/App.vue b/App.vue index 5676699..2086032 100644 --- a/App.vue +++ b/App.vue @@ -4,6 +4,7 @@ }, onShow: function() { // this.$store.commit('initConfig') + this.$store.commit('getUserInfo') }, onHide: function() { } diff --git a/pages_order/auth/loginAndRegisterAndForgetPassword.vue b/pages_order/auth/loginAndRegisterAndForgetPassword.vue index eea720b..f9ef44d 100644 --- a/pages_order/auth/loginAndRegisterAndForgetPassword.vue +++ b/pages_order/auth/loginAndRegisterAndForgetPassword.vue @@ -123,8 +123,8 @@ titleList: ['注册', '登录', '重置密码'], checkboxValue: [], form: { - username: 'h1', - password: 'l', + username: '19330214982', + password: '123456', loginModel : 0, captcha : '', }, @@ -154,6 +154,13 @@ return } + if(!this.$utils.verificationPhone(this.form.username)){ + return uni.showToast({ + title: '账号请输入合法的手机号', + icon:'none' + }) + } + if(this.titleIndex == 0){ // 注册 this.$api('registerUser', this.form, res =>{ diff --git a/pages_order/auth/selectionIdentity.vue b/pages_order/auth/selectionIdentity.vue index 932ac4e..2ae3905 100644 --- a/pages_order/auth/selectionIdentity.vue +++ b/pages_order/auth/selectionIdentity.vue @@ -5,7 +5,7 @@ @leftClick="$utils.navigateBack" /> - + {{ $t('components.selectIdentity') }} @@ -35,15 +35,21 @@ export default { computed: { - ...mapGetters(['userShop', "userInfo", 'buy', 'shopData']), + ...mapGetters(['userShop', "userInfo"]), }, methods: { selectIdentity(identity) { // if (userInfo) - if (identity == 0 && this.buy) { + if (identity == 0 && this.$store.state.buy) { this.$store.commit('setShop', false) - } else if (identity == 1 && this.shopData) { + uni.reLaunch({ + url: '/pages/index/index' + }) + } else if (identity == 1 && this.$store.state.shopData) { this.$store.commit('setShop', true) + uni.reLaunch({ + url: '/pages/index/index' + }) } else { uni.navigateTo({ url: `/pages_order/auth/registerShop?identity=${identity}` diff --git a/pages_order/order/offerOrBillLading.vue b/pages_order/order/offerOrBillLading.vue index 280bff8..9e3cb9f 100644 --- a/pages_order/order/offerOrBillLading.vue +++ b/pages_order/order/offerOrBillLading.vue @@ -1,434 +1,438 @@ \ No newline at end of file diff --git a/store/store.js b/store/store.js index 56d7d96..f96372c 100644 --- a/store/store.js +++ b/store/store.js @@ -10,7 +10,7 @@ import { date } from '../uni_modules/uv-ui-tools/libs/function/test'; const store = new Vuex.Store({ state: { configList: [], //配置列表 - shop : false, + shop : true, userInfo : {}, //用户信息 shopData : {}, buy : {},