wuhongyu 5 anni fa
parent
commit
6175170af4
2 ha cambiato i file con 23 aggiunte e 6 eliminazioni
  1. 8 2
      src/views/hall/dock/dockDetail.vue
  2. 15 4
      src/views/market/marketlists.vue

+ 8 - 2
src/views/hall/dock/dockDetail.vue

@@ -209,8 +209,14 @@ export default {
       form.market_userid = this.detailInfo.userid;
       form.market_username = this.detailInfo.contact_user;
       form.status = '0';
-      let res = await this.buyProduct(form);
-      this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+
+      if (!this.user.uid) {
+        this.$message.error('游客身份无法与卖家对话,请先注册');
+        return;
+      } else {
+        let res = await this.buyProduct(form);
+        this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+      }
     },
     // killTalk() {
     //   this.$alert('您确认对话已经可以结束了吗?');

+ 15 - 4
src/views/market/marketlists.vue

@@ -275,8 +275,13 @@ export default {
       form.market_userid = this.zhuanjiainfo.id;
       form.market_username = this.zhuanjiainfo.name;
       form.status = '0';
-      let res = await this.transactioncreate(form);
-      this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+      if (!this.user.uid) {
+        this.$message.error('游客身份无法与卖家对话,请先注册');
+        return;
+      } else {
+        let res = await this.transactioncreate(form);
+        this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+      }
     },
     async onSubmit() {
       let form = {};
@@ -287,8 +292,14 @@ export default {
       form.market_userid = this.detailInfo.userid;
       form.market_username = this.detailInfo.contact_user;
       form.status = '0';
-      let res = await this.transactioncreate(form);
-      this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+
+      if (!this.user.uid) {
+        this.$message.error('游客身份无法与卖家对话,请先注册');
+        return;
+      } else {
+        let res = await this.transactioncreate(form);
+        this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
+      }
 
       // console.log(this.user.uid);
       // let form = {};