Переглянути джерело

店铺申请&进入店铺

panhui 4 роки тому
батько
коміт
022017a5d2

+ 198 - 198
project.config.json

@@ -1,205 +1,205 @@
 {
 {
-    "description": "项目配置文件",
-    "packOptions": {
-        "ignore": []
+  "description": "项目配置文件",
+  "packOptions": {
+    "ignore": []
+  },
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": false,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "useMultiFrameRuntime": true,
+    "useApiHook": true,
+    "useApiHostProcess": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
     },
     },
-    "setting": {
-        "urlCheck": true,
-        "es6": true,
-        "enhance": false,
-        "postcss": true,
-        "preloadBackgroundData": false,
-        "minified": true,
-        "newFeature": true,
-        "coverView": true,
-        "nodeModules": false,
-        "autoAudits": false,
-        "showShadowRootInWxmlPanel": true,
-        "scopeDataCheck": false,
-        "uglifyFileName": false,
-        "checkInvalidKey": true,
-        "checkSiteMap": true,
-        "uploadWithSourceMap": true,
-        "compileHotReLoad": false,
-        "useMultiFrameRuntime": true,
-        "useApiHook": true,
-        "useApiHostProcess": true,
-        "babelSetting": {
-            "ignore": [],
-            "disablePlugins": [],
-            "outputPath": ""
-        },
-        "enableEngineNative": false,
-        "bundle": false,
-        "useIsolateContext": true,
-        "useCompilerModule": true,
-        "userConfirmedUseCompilerModuleSwitch": false,
-        "userConfirmedBundleSwitch": false,
-        "packNpmManually": false,
-        "packNpmRelationList": [],
-        "minifyWXSS": true
+    "enableEngineNative": false,
+    "bundle": false,
+    "useIsolateContext": true,
+    "useCompilerModule": true,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.16.1",
+  "appid": "wxf3120271892d4f18",
+  "projectname": "%E5%8D%A1%E7%89%8C%E5%B0%8F%E7%A8%8B%E5%BA%8F",
+  "cloudfunctionTemplateRoot": "",
+  "watchOptions": {
+    "ignore": []
+  },
+  "debugOptions": {
+    "hidedInDevtools": []
+  },
+  "scripts": {},
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "miniprogramRoot": "dist-wechat/",
+  "condition": {
+    "search": {
+      "list": []
     },
     },
-    "compileType": "miniprogram",
-    "libVersion": "2.16.1",
-    "appid": "wxf3120271892d4f18",
-    "projectname": "%E5%8D%A1%E7%89%8C%E5%B0%8F%E7%A8%8B%E5%BA%8F",
-    "cloudfunctionTemplateRoot": "",
-    "watchOptions": {
-        "ignore": []
+    "conversation": {
+      "list": []
     },
     },
-    "debugOptions": {
-        "hidedInDevtools": []
+    "plugin": {
+      "list": []
     },
     },
-    "scripts": {},
-    "simulatorType": "wechat",
-    "simulatorPluginLibVersion": {},
-    "miniprogramRoot": "dist-wechat/",
-    "condition": {
-        "search": {
-            "list": []
-        },
-        "conversation": {
-            "list": []
-        },
-        "plugin": {
-            "list": []
-        },
-        "game": {
-            "list": []
-        },
-        "gamePlugin": {
-            "list": []
-        },
-        "miniprogram": {
-            "list": [
-                {
-                    "id": -1,
-                    "name": "消息",
-                    "pathName": "/pages/news",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "聊天页面",
-                    "pathName": "/pages/chat",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "我的",
-                    "pathName": "/pages/mine",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "我的收藏",
-                    "pathName": "/pages/mineFollow",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "个人设置",
-                    "pathName": "/pages/setting",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "我的钱包",
-                    "pathName": "/pages/wallet",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "授权登陆",
-                    "pathName": "/pages/authorized",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "常见问题",
-                    "pathName": "/pages/questions",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "选择地址",
-                    "pathName": "/pages/chooseAddress",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "订单详情",
-                    "pathName": "/pages/orderdetails",
-                    "query": "id=779"
-                },
-                {
-                    "id": -1,
-                    "name": "新增地址",
-                    "pathName": "/pages/receiving",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "首页",
-                    "pathName": "/pages/Home",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "拼箱详情",
-                    "pathName": "/pages/details",
-                    "query": "id=209"
-                },
-                {
-                    "id": -1,
-                    "name": "收货地址",
-                    "pathName": "/pages/address",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "确认订单",
-                    "pathName": "/pages/confirmorder",
-                    "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "我买到的",
-                    "pathName": "/pages/allorder",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "店铺申请",
-                    "pathName": "/pages/store/apply",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "认证审核进度",
-                    "pathName": "/pages/store/review",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "店铺首页",
-                    "pathName": "/pages/store/homePage",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "申请退款",
-                    "pathName": "/pages/Apply",
-                    "scene": null
-                },
-                {
-                    "id": -1,
-                    "name": "退款详情",
-                    "pathName": "/pages/Applydetails",
-                    "scene": null
-                }
-            ]
+    "game": {
+      "list": []
+    },
+    "gamePlugin": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": [
+        {
+          "id": -1,
+          "name": "消息",
+          "pathName": "/pages/news",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "聊天页面",
+          "pathName": "/pages/chat",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "我的",
+          "pathName": "/pages/mine",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "我的收藏",
+          "pathName": "/pages/mineFollow",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "个人设置",
+          "pathName": "/pages/setting",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "我的钱包",
+          "pathName": "/pages/wallet",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "授权登陆",
+          "pathName": "/pages/authorized",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "常见问题",
+          "pathName": "/pages/questions",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "选择地址",
+          "pathName": "/pages/chooseAddress",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "订单详情",
+          "pathName": "/pages/orderdetails",
+          "query": "id=779"
+        },
+        {
+          "id": -1,
+          "name": "新增地址",
+          "pathName": "/pages/receiving",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "首页",
+          "pathName": "/pages/Home",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "拼箱详情",
+          "pathName": "/pages/details",
+          "query": "id=209"
+        },
+        {
+          "id": -1,
+          "name": "收货地址",
+          "pathName": "/pages/address",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "确认订单",
+          "pathName": "/pages/confirmorder",
+          "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "我买到的",
+          "pathName": "/pages/allorder",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "店铺申请",
+          "pathName": "/pages/store/apply",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "认证审核进度",
+          "pathName": "/pages/store/review",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "店铺首页",
+          "pathName": "/pages/store/homePage",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "申请退款",
+          "pathName": "/pages/Apply",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "退款详情",
+          "pathName": "/pages/Applydetails",
+          "scene": null
         }
         }
+      ]
     }
     }
-}
+  }
+}

+ 7 - 1
src/components/ReviewSuccess.vue

@@ -12,7 +12,7 @@
                     在个人中心点击“<span>查看我的店铺</span>” 即可管理店铺商品及交易
                     在个人中心点击“<span>查看我的店铺</span>” 即可管理店铺商品及交易
                 </div>
                 </div>
 
 
-                <van-button :radius="8" class="go" type="primary">立即进入</van-button>
+                <van-button :radius="8" class="go" type="primary" @click="goStore">立即进入</van-button>
             </div>
             </div>
 
 
             <van-button type="info" icon="cross" plaint round> </van-button>
             <van-button type="info" icon="cross" plaint round> </van-button>
@@ -26,6 +26,12 @@ export default {
         return {
         return {
             show: false
             show: false
         };
         };
+    },
+    methods: {
+        goStore() {
+            this.show = false;
+            this.navigateTo('/pages/store/homePage');
+        }
     }
     }
 };
 };
 </script>
 </script>

+ 53 - 3
src/pages/mine.vue

@@ -32,12 +32,23 @@
             </div>
             </div>
 
 
             <van-image
             <van-image
+                v-if="userStoreInfo"
                 class="authentication"
                 class="authentication"
                 width="100%"
                 width="100%"
+                fit="contain"
                 height="86"
                 height="86"
                 src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/info_img_renzhengdianjia.png"
                 src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/info_img_renzhengdianjia.png"
+                @click="navigateTo('/pages/store/homePage')"
+            />
+
+            <van-image
+                v-else
+                class="authentication"
+                width="100%"
+                height="86"
+                src="https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/info_img_renzhengdianjia1.png"
                 fit="contain"
                 fit="contain"
-                @click="navigateTo('/pages/store/apply')"
+                @click="goAuth"
             />
             />
         </div>
         </div>
 
 
@@ -87,7 +98,7 @@
             <van-button type="default" size="small">立即邀请</van-button>
             <van-button type="default" size="small">立即邀请</van-button>
         </div> -->
         </div> -->
 
 
-        <review-success></review-success>
+        <review-success ref="reviewPass"></review-success>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -98,7 +109,7 @@ export default {
     components: { ReviewSuccess },
     components: { ReviewSuccess },
     name: 'Mine',
     name: 'Mine',
     computed: {
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo', 'userStoreInfo']),
         city() {
         city() {
             if (this.userInfo) {
             if (this.userInfo) {
                 if (/[\u4e00-\u9fa5]/.test(this.userInfo.city)) {
                 if (/[\u4e00-\u9fa5]/.test(this.userInfo.city)) {
@@ -130,7 +141,46 @@ export default {
                         });
                         });
                 }
                 }
             });
             });
+        },
+        checkAuthen() {
+            return this.$http
+                .postJson('/storeAuthentication/all', {
+                    query: { userId: this.$store.state.userInfo.id, del: false }
+                })
+                .then(res => {
+                    if (res.empty) {
+                        return Promise.reject();
+                    } else {
+                        return Promise.resolve(res.content[0]);
+                    }
+                });
+        },
+        goAuth() {
+            this.checkAuthen()
+                .then(res => {
+                    this.navigateTo('/pages/store/apply');
+                })
+                .catch(() => {
+                    this.navigateTo('/pages/store/review');
+                });
+        },
+        loginMethods() {
+            this.$nextTick(() => {
+                if (this.isLogin) {
+                    var authStatus = wx.getStorageSync('authStatus');
+                    this.$store.dispatch('getUserStore').then(res => {
+                        console.log(authStatus);
+                        if (authStatus !== res.id + '_PASS') {
+                            this.$refs.reviewPass.show = true;
+                            wx.setStorageSync('authStatus', res.id + '_PASS');
+                        }
+                    });
+                }
+            });
         }
         }
+    },
+    onShow() {
+        this.loginMethods();
     }
     }
 };
 };
 </script>
 </script>

+ 90 - 13
src/pages/store/apply.vue

@@ -17,13 +17,13 @@
             <div class="text1">填写申请资料</div>
             <div class="text1">填写申请资料</div>
             <div class="text2">申请所填信息仅用于平台店家审核使用,决不做其他用途</div>
             <div class="text2">申请所填信息仅用于平台店家审核使用,决不做其他用途</div>
         </div>
         </div>
-        <van-form :border="false">
+        <van-cell-group :border="false">
             <van-field
             <van-field
                 name="店家名称"
                 name="店家名称"
                 label="店家名称"
                 label="店家名称"
                 placeholder="请输入您店铺的名称"
                 placeholder="请输入您店铺的名称"
                 :value="form.storeName"
                 :value="form.storeName"
-                :rules="[{ required: true, message: '请输入您店铺的名称' }]"
+                @input="form.storeName = $event.detail"
             />
             />
             <van-field
             <van-field
                 type="phone"
                 type="phone"
@@ -31,7 +31,7 @@
                 label="手机号码"
                 label="手机号码"
                 placeholder="请输入您的手机号码"
                 placeholder="请输入您的手机号码"
                 :value="form.phone"
                 :value="form.phone"
-                :rules="[{ required: true, message: '请输入您的手机号码' }]"
+                @input="form.phone = $event.detail"
             />
             />
 
 
             <van-field
             <van-field
@@ -39,28 +39,28 @@
                 label="电子邮箱"
                 label="电子邮箱"
                 placeholder="请输入邮箱"
                 placeholder="请输入邮箱"
                 :value="form.email"
                 :value="form.email"
-                :rules="[{ required: true, message: '请输入邮箱' }]"
+                @input="form.email = $event.detail"
             />
             />
             <van-field
             <van-field
                 type="text"
                 type="text"
                 label="身份证号"
                 label="身份证号"
                 placeholder="请输入18位身份证号"
                 placeholder="请输入18位身份证号"
-                :value="form.id"
-                :rules="[{ required: true, message: '请输入18位身份证号' }]"
+                :value="form.idNo"
+                @input="form.idNo = $event.detail"
             />
             />
 
 
             <van-cell title="身份证照片(正面照)">
             <van-cell title="身份证照片(正面照)">
-                <img-uploader v-model="form.idImg"></img-uploader>
+                <img-uploader ref="idNoImage" v-model="form.idNoImage"></img-uploader>
             </van-cell>
             </van-cell>
 
 
             <van-cell title="营业执照" :border="false">
             <van-cell title="营业执照" :border="false">
-                <img-uploader v-model="form.icImg"></img-uploader>
+                <img-uploader ref="licenseImage" v-model="form.licenseImage"></img-uploader>
             </van-cell>
             </van-cell>
 
 
             <div class="btn">
             <div class="btn">
-                <van-button block type="primary" native-type="submit">提交审核</van-button>
+                <van-button block type="primary" :disabled="!next" @click="submit">提交审核</van-button>
             </div>
             </div>
-        </van-form>
+        </van-cell-group>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -72,12 +72,89 @@ export default {
     data() {
     data() {
         return {
         return {
             form: {
             form: {
-                idImg: '',
-                icImg: ''
+                storeName: '',
+                phone: '',
+                email: '',
+                idNo: '',
+                idNoImage: '',
+                licenseImage: ''
             }
             }
         };
         };
     },
     },
-    onPageScroll() {}
+    computed: {
+        next() {
+            return (
+                !!this.form.storeName &&
+                !!this.form.phone &&
+                !!this.form.email &&
+                !!this.form.idNo &&
+                !!this.form.idNoImage &&
+                !!this.form.licenseImage
+            );
+        }
+    },
+    onPageScroll() {},
+    methods: {
+        submit() {
+            if (!this.form.storeName) {
+                this.toast('请输入店家名称');
+                return;
+            }
+            if (!/^1[3~9]\d{9}$/.test(this.form.phone)) {
+                this.toast('请输入正确手机号');
+                return;
+            }
+
+            if (!/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(this.form.email)) {
+                this.toast('请输入正确邮箱');
+                return;
+            }
+
+            if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNo)) {
+                this.toast('请输入正确身份证');
+                return;
+            }
+
+            if (!this.form.idNoImage) {
+                this.toast('请上传身份证照片(正面照)');
+                return;
+            }
+
+            if (!this.form.licenseImage) {
+                this.toast('请上传营业执照');
+                return;
+            }
+            let data = { ...this.form };
+            if (!data.id) {
+                data.userId = this.$store.state.userInfo.id;
+            }
+            data.status = 'CREATED';
+            this.showLoading();
+            this.$http.postJson('/storeAuthentication/save', data).then(res => {
+                this.toast('申请成功', 'success');
+
+                setTimeout(() => {
+                    wx.redirectTo({
+                        url: '/pages/store/review'
+                    });
+                }, 1500);
+            });
+        },
+        loginMethods() {
+            console.log('init');
+            this.$http
+                .postJson('/storeAuthentication/all', {
+                    query: { userId: this.$store.state.userInfo.id, del: false }
+                })
+                .then(res => {
+                    if (!res.empty) {
+                        this.form = res.content[0];
+                        this.$refs.idNoImage.setFile(res.content[0].idNoImage);
+                        this.$refs.licenseImage.setFile(res.content[0].licenseImage);
+                    }
+                });
+        }
+    }
 };
 };
 </script>
 </script>
 
 

+ 56 - 6
src/pages/store/review.vue

@@ -12,8 +12,15 @@
             <div class="text1">{{ title }}</div>
             <div class="text1">{{ title }}</div>
             <div class="text2">{{ desc }}</div>
             <div class="text2">{{ desc }}</div>
 
 
-            <van-button type="primary" block>返回</van-button>
-            <van-button type="primary" plain block>取消申请</van-button>
+            <template v-if="status === 'CREATED'">
+                <van-button type="primary" block @click="navigateBack">返回</van-button>
+                <van-button type="primary" plain block @click="cancel">取消申请</van-button>
+            </template>
+
+            <template v-else>
+                <van-button type="primary" block @click="back">重新申请</van-button>
+                <van-button type="primary" plain block @click="navigateBack">返回</van-button>
+            </template>
         </div>
         </div>
     </div>
     </div>
 </template>
 </template>
@@ -21,26 +28,69 @@
 <script>
 <script>
 export default {
 export default {
     data() {
     data() {
-        return {};
+        return {
+            authentication: null
+        };
     },
     },
     computed: {
     computed: {
+        status() {
+            return this.authentication ? this.authentication.status : '';
+        },
         img() {
         img() {
             const imgs = [
             const imgs = [
                 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_shenghezhong.png',
                 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_shenghezhong.png',
                 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_shengheshibai.png'
                 'https://ticket-exchange.oss-cn-hangzhou.aliyuncs.com/wechat/kong_png_shengheshibai.png'
             ];
             ];
-            return imgs[0];
+            return imgs[this.status === 'CREATED' ? 0 : 1];
         },
         },
         title() {
         title() {
             const list = ['资料审核中!', '资料审核失败'];
             const list = ['资料审核中!', '资料审核失败'];
-            return list[0];
+            return list[this.status === 'CREATED' ? 0 : 1];
         },
         },
         desc() {
         desc() {
             const list = [
             const list = [
                 '平台将于3日内完成资料审核,并将审核结果以短信的形式通知您',
                 '平台将于3日内完成资料审核,并将审核结果以短信的形式通知您',
                 '很遗憾,您的资料审核失败,请检查您填写的资料是否正确以及上传照片是否清晰'
                 '很遗憾,您的资料审核失败,请检查您填写的资料是否正确以及上传照片是否清晰'
             ];
             ];
-            return list[0];
+            return list[this.status === 'CREATED' ? 0 : 1];
+        }
+    },
+    methods: {
+        loginMethods() {
+            this.$http
+                .postJson('/storeAuthentication/all', {
+                    query: { userId: this.$store.state.userInfo.id, del: false }
+                })
+                .then(res => {
+                    console.log(res);
+                    if (!res.empty) {
+                        this.authentication = res.content[0];
+                        if (res.content[0].status === 'PASS') {
+                            this.navigateBack();
+                        }
+                    }
+                });
+        },
+        cancel() {
+            wx.showModal({
+                content: '确定要取消申请吗?',
+                confirmColor: this.$colors.prim,
+                success: res => {
+                    if (res.confirm) {
+                        this.$http.post('/storeAuthentication/del/' + this.authentication.id).then(res => {
+                            this.toast('取消成功', 'success');
+                            setTimeout(() => {
+                                this.navigateBack();
+                            }, 1500);
+                        });
+                    }
+                }
+            });
+        },
+        back() {
+            wx.redirectTo({
+                url: '/pages/store/apply'
+            });
         }
         }
     }
     }
 };
 };

+ 22 - 1
src/store/index.js

@@ -10,7 +10,8 @@ export default new Vuex.Store({
         systemInfo: {
         systemInfo: {
             statusBarHeight: 44
             statusBarHeight: 44
         },
         },
-        userInfo: null
+        userInfo: null,
+        userStoreInfo: null
     },
     },
     mutations: {
     mutations: {
         setUserInfo(state, userInfo) {
         setUserInfo(state, userInfo) {
@@ -21,6 +22,9 @@ export default new Vuex.Store({
         },
         },
         setSystemInfo(state, systemInfo) {
         setSystemInfo(state, systemInfo) {
             state.systemInfo = systemInfo;
             state.systemInfo = systemInfo;
+        },
+        setUserStoreInfo(state, userStoreInfo) {
+            state.userStoreInfo = userStoreInfo;
         }
         }
     },
     },
     actions: {
     actions: {
@@ -34,6 +38,23 @@ export default new Vuex.Store({
 
 
                 return Promise.resolve(res);
                 return Promise.resolve(res);
             });
             });
+        },
+        getUserStore(context) {
+            return http.http
+                .postJson('/store/all', {
+                    query: {
+                        userId: context.state.userInfo.id
+                    }
+                })
+                .then(res => {
+                    if (res.empty) {
+                        context.commit('setUserStoreInfo', null);
+                        return Promise.reject();
+                    } else {
+                        context.commit('setUserStoreInfo', res.content[0]);
+                        return Promise.resolve(res.content[0]);
+                    }
+                });
         }
         }
     }
     }
 });
 });