shish 2 years ago
parent
commit
834b9e839b
2 changed files with 18 additions and 2 deletions
  1. 7 0
      pt/src/service/pt-cp/index.js
  2. 11 2
      pt/src/views/cp/pt-list.vue

+ 7 - 0
pt/src/service/pt-cp/index.js

@@ -32,5 +32,12 @@ export class CpService extends BaseService {
 		});
 	}
 
+	pleaseAuth(data) {
+		return this.request({
+			url: '/auth',
+			params: data
+		});
+	}
+
 }
 export default new CpService();

+ 11 - 2
pt/src/views/cp/pt-list.vue

@@ -88,6 +88,10 @@
 				<el-button type="text" @click="replaceCpFn(scope.row.id)" style="margin-right:20px;">修改</el-button>
 			</template>
 
+			<template #slot-pleaseAuth="{scope}">
+				<el-button type="text" @click="authFn(scope.row.id)" style="margin-right:20px;">认证</el-button>
+			</template>
+
 		</x-crud>
 
 		<el-dialog :title="`${currentCpId == 0 ? '添加' : '修改'}产品`" :visible.sync="replaceCpPop" :close-on-click-modal="false" width="500px" >
@@ -205,6 +209,11 @@ export default {
 			this.$refs['replaceForm'].resetFields();
 			this.replaceCpPop = false;
 		},
+		authFn(id){
+			this.$service.ptCp.pleaseAuth({id:id}).then(res=>{
+				this.$message.success('操作成功')
+			})
+		},
 		replaceCpFn(id){
 			this.replaceCpPop = true
 			this.currentCpId = id
@@ -312,12 +321,12 @@ export default {
 					op: {
 						visible: true,
 						props: {
-							width: 200,
+							width: 250,
 							align: 'center',
 							fixed: 'right',
 							label: '操作',
 						},
-						layout: ['slot-modify','slot-column-option'],
+						layout: ['slot-modify','slot-pleaseAuth','slot-column-option'],
 					},
 				})
 				.set('pagination', {