YY пре 2 година
родитељ
комит
a6fbf85852

+ 1 - 1
src/plugins/check-res.js

@@ -10,7 +10,7 @@ const vm = new Vue({});
 const Plugin = {
   install(Vue, options) {
     // 4. 添加实例方法
-    Vue.prototype.$checkRes = async (res, okText, errText) => {
+    Vue.prototype.$checkRes = (res, okText, errText) => {
       let _okText = okText;
       let _errText = errText;
       if (!_.isFunction(okText) && _.isObject(okText) && okText != null) {

+ 1 - 2
src/views/platmanag/storeAcc/detail.vue

@@ -121,8 +121,7 @@ export default {
       let res;
       if (data.id) res = await this.update(data);
       else res = await this.create(data);
-      if (this.$checkRes(res)) {
-        this.$message({ type: `success`, message: `维护信息成功` });
+      if (this.$checkRes(res, `维护信息成功`, res.errmsg)) {
         this.search();
         this.toBackList();
       }

+ 1 - 0
src/views/platmanag/storeAcc/index.vue

@@ -63,6 +63,7 @@ export default {
       ],
       opera: [
         { label: '修改', method: 'edit' },
+        { label: '账号管理', method: 'manage' },
         { label: '删除', method: 'del', confirm: true, type: 'danger' },
       ],
       btnList: [{ label: '添加', method: 'add' }],

+ 4 - 0
src/views/selfShop/goods/index.vue

@@ -125,6 +125,7 @@ export default {
     ...goods(['delete', 'fetch', 'update', 'create']),
     ...methodsUtil,
     async search({ skip = 0, limit = this.limit, ...others } = {}) {
+      console.log(this.user);
       let query = { skip, limit, ...others };
       if (Object.keys(this.searchInfo).length > 0) query = { ...query, ...this.searchInfo };
       const res = await this.getGoods(query);
@@ -216,6 +217,9 @@ export default {
       this.$router.push({ path: `/selfShop/spec/${data._id}` });
     },
   },
+  computed: {
+    ...mapState(['user']),
+  },
 };
 </script>