shish 3 年之前
父節點
當前提交
9579cb3475
共有 2 個文件被更改,包括 16 次插入16 次删除
  1. 7 6
      pt/src/saas/shop/shop.vue
  2. 9 10
      pt/src/service/shop/index.js

+ 7 - 6
pt/src/saas/shop/shop.vue

@@ -210,13 +210,14 @@ export default {
           this.addYgPop = false;
         },
         submitForm () {
-          this.$refs['adForm'].validate(valid => {
+          let that = this
+          that.$refs['adForm'].validate(valid => {
             if (valid) {
-              this.$service.saasShop.rechargeBalance(this.addStaffForm).then(res => {
-                if(res.code == 1){
-                  this.$message.success('操作成功')
-                  this.addYgPop = false
-                  this.app.refresh()
+              that.$service.shop.addStaff(that.addStaffForm).then(res => {
+                  if(res.id && Number(res.id)>0){
+                    that.$message.success('操作成功')
+                    that.addYgPop = false
+                    that.app.refresh()
                 }
               })
             } else {

+ 9 - 10
pt/src/service/shop/index.js

@@ -3,16 +3,15 @@ import { baseUrl } from '@/config/env';
 import store from '@/store';
 
 @Service('shop')
-export class LevelService extends BaseService {
-	downloadGatheringCode(id) {
-		return baseUrl + `/shop/download-gathering-code?id=${id}&token=${store.state.user.token}`;
-	}
+export class ShopService extends BaseService {
 
-	downloadApplyMemberCode(id) {
-		return (
-			baseUrl + `/shop/download-apply-member-code?id=${id}&token=${store.state.user.token}`
-		);
+	addStaff(data) {
+		return this.request({
+			url: '/add-staff',
+			method: 'POST',
+			data: data
+		});
 	}
-}
 
-export default new LevelService();
+}
+export default new ShopService();