| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <div>
- <!--<div class="step-menu">-->
- <!--<ul class="x-step">-->
- <!--<li :class="section >= 1?'active':''" >第一步:完善企业信息-->
- <!--<i class="x-split"></i></li>-->
- <!--<li :class="section >= 2?'active':''" >第二步:阅读相关条例-->
- <!--<i class="x-split"></i></li>-->
- <!--<li :class="section >= 3?'active':''" >第三步:提交申请</li>-->
- <!--</ul>-->
- <!--</div>-->
- <div class="mobile-tab-list">
- <step-first v-show="section == 1"
- @sectionEvent="sectionChange"
- @registerAction="onRegister"
- :loginData="loginData"
- @businessImgUrlAction="onBusinessImgUrl"
- @isSelfCacheDataAction="onCacheData"></step-first>
- <step-second v-show="section == 2"
- @sectionEvent="sectionChange"
- :checkData="checkData"
- :loginData="loginData"
- :cacheData="cacheData"></step-second>
- <choose-storetype v-show="section == 3"
- @sectionEvent="sectionChange"
- >
- </choose-storetype>
- <step-third v-show="section == 4"
- @sectionEvent="sectionChange"
- :registerData="registerData"
- :enterpriseData="enterpriseData"
- :checkData="checkData"
- @businessImgUrlAction="onBusinessImgUrl"
- :loginData="loginData"
- :tab="tab" ref="clearInfo"></step-third>
- </div>
- </div>
- </template>
- <script>
- import StepFirst from '~components/mobile/register-saler/register/StepFirst.vue'
- import StepSecond from '~components/mobile/register-saler/register/StepSecond.vue'
- import StepThird from '~components/mobile/register-saler/register/StepThird.vue'
- import chooseStoretype from '~components/mobile/register-saler/register/chooseStoretype.vue'
- export default {
- data () {
- return {
- tab: 'ORIGINAL_FACTORY',
- section: 1,
- checkData: {
- checked: false
- },
- registerData: {
- enterprise: {},
- c: false,
- url: ''
- },
- loginData: {
- isSelf: true,
- section: 1,
- enterprise: {}
- },
- cacheData: {},
- enterpriseData: {},
- businessImgUrl: ''
- }
- },
- components: {
- StepFirst,
- StepSecond,
- StepThird,
- chooseStoretype
- },
- computed: {
- user () {
- return this.$store.state.option.user
- }
- },
- created () {
- let ens = this.user.data.enterprises
- let isSelf = true
- let tempEnterprise = {}
- if (ens && ens.length) {
- ens.forEach(function (item) {
- if (item.current) {
- isSelf = false
- tempEnterprise = item
- }
- })
- } else {
- isSelf = true
- }
- if (!isSelf) { // 是企业
- this.$http.get('/basic/enterprise/' + tempEnterprise.uu + '/info')
- .then(response => {
- this.enterpriseData = response.data
- if (this.user.data.enterprise.isVendor === 313) {
- this.$http.get('/basic/vendor/transactionInfo').then(response => {
- if (response.data.isOpenStore === false) {
- this.section = 3
- this.checkData.checked = true
- }
- })
- } else {
- this.section = 1
- this.checkData.checked = false
- }
- })
- } else { // 是个人
- this.$http.get('/basic/user/userCacheEnterprise')
- .then(response => {
- if (!response.data.name) {
- this.section = 1
- this.checkData.checked = false
- } else if (!response.data.enIsRead) {
- this.section = 2
- this.checkData.checked = false
- this.enterpriseData = response.data
- } else if (response.data.enIsRead) {
- this.section = 3
- this.checkData.checked = true
- this.enterpriseData = response.data
- }
- })
- }
- this.loginData.isSelf = isSelf
- this.loginData.section = this.section
- this.loginData.enterprise = tempEnterprise
- },
- methods: {
- sectionChange: function (num, tab) {
- this.section = num
- this.tab = ''
- if (tab) {
- this.$refs.clearInfo.clearInfo()
- this.tab = tab
- }
- },
- onRegister: function (data) {
- this.registerData.isValidRegister = data.isValidRegister
- this.registerData.enterprise = data.enterprise
- this.registerData.url = data.url
- },
- onCacheData: function (cache) {
- this.cacheData = cache
- },
- onBusinessImgUrl: function (url) {
- this.businessImgUrl = url
- }
- }
- }
- </script>
- <style>
- </style>
|