Compare commits
2 Commits
7274619f77
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a32dc70c0a | |||
| 6d50bf8cf9 |
@@ -21,3 +21,4 @@ npm run build --report
|
|||||||
## 注意
|
## 注意
|
||||||
|
|
||||||
- node版本不能过高,推荐v12.13.0
|
- node版本不能过高,推荐v12.13.0
|
||||||
|
- 后台添加新权限需登录admin后台添加
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ module.exports = {
|
|||||||
assetsPublicPath: '/',
|
assetsPublicPath: '/',
|
||||||
proxyTable: {
|
proxyTable: {
|
||||||
'/index.php':{
|
'/index.php':{
|
||||||
target:'http://cogapitest.scszsj.com/', //https://cogapi.scszsj.com/ http://cogapitest.scszsj.com/ http://gg.com/
|
target:'http://gg.local', //https://cogapi.scszsj.com/ http://cogapitest.scszsj.com/ http://gg.com/
|
||||||
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
|
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ let assetApi = {
|
|||||||
gameGenDac(data, errorback) {
|
gameGenDac(data, errorback) {
|
||||||
return request._post('/shop/gameasset.GameAsset/genDac', data, errorback);
|
return request._post('/shop/gameasset.GameAsset/genDac', data, errorback);
|
||||||
},
|
},
|
||||||
|
/*数字资产上链审核*/
|
||||||
|
gameAssetAudit(data, errorback) {
|
||||||
|
return request._post('/shop/gameasset.GameAsset/audit', data, errorback);
|
||||||
|
},
|
||||||
/*资产列表*/
|
/*资产列表*/
|
||||||
gameAssetdetail(data, errorback) {
|
gameAssetdetail(data, errorback) {
|
||||||
return request._get('/shop/gameasset.GameAsset/index', data, errorback);
|
return request._get('/shop/gameasset.GameAsset/index', data, errorback);
|
||||||
|
|||||||
@@ -68,10 +68,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column fixed="right" label="操作" width="210">
|
<el-table-column fixed="right" label="操作" width="260">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.status != 'pending'" @click="editClick(scope.row,'edit')" type="text" size="small" v-auth="'/gameasset/gameasset/edit'">查看</el-button>
|
<el-button v-if="scope.row.status != 'pending'" @click="editClick(scope.row,'edit')" type="text" size="small" v-auth="'/gameasset/gameasset/edit'">查看</el-button>
|
||||||
<el-button @click="editClicks(scope.row,'audit')" type="text" size="small" v-auth="'/gameasset/gameasset/recharge'">生成资产</el-button>
|
<el-button @click="editClicks(scope.row,'audit')" type="text" size="small" v-auth="'/gameasset/gameasset/recharge'">生成资产</el-button>
|
||||||
|
<el-button v-if="scope.row.auth_status=='pending'" @click="openAuditDialog(scope.row)" type="text" size="small" v-auth="'/gameasset/gameasset/audit'">审核</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -93,6 +94,32 @@
|
|||||||
|
|
||||||
<!--会员充值-->
|
<!--会员充值-->
|
||||||
<Recharge v-if="open_add" :open_add="open_add" :form="userModel" @closeDialog="closeDialogFunc($event, 'add')"></Recharge>
|
<Recharge v-if="open_add" :open_add="open_add" :form="userModel" @closeDialog="closeDialogFunc($event, 'add')"></Recharge>
|
||||||
|
|
||||||
|
<!--数字资产上链审核弹窗-->
|
||||||
|
<el-dialog :visible.sync="auditDialogVisible" title="数字资产上链审核" width="420px" @close="onAuditDialogClose">
|
||||||
|
<el-form size="small" :model="auditForm" :rules="auditRules" ref="auditFormRef" label-width="80px">
|
||||||
|
<el-form-item label="审核结果" prop="status">
|
||||||
|
<el-select v-model="auditForm.status" placeholder="请选择审核结果">
|
||||||
|
<el-option label="通过" value="pass"></el-option>
|
||||||
|
<el-option label="拒绝" value="reject"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="auditForm.remark"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核备注"
|
||||||
|
maxlength="255"
|
||||||
|
show-word-limit
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="auditDialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitAudit" :loading="auditLoading">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -128,7 +155,40 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
userModel:{},
|
userModel:{},
|
||||||
/*全部分类*/
|
/*全部分类*/
|
||||||
message: 'pages/product/detail/detail?product_id='
|
message: 'pages/product/detail/detail?product_id=',
|
||||||
|
/*审核弹窗相关*/
|
||||||
|
auditDialogVisible: false,
|
||||||
|
auditLoading: false,
|
||||||
|
auditForm: {
|
||||||
|
id: null,
|
||||||
|
status: '',
|
||||||
|
remark: ''
|
||||||
|
},
|
||||||
|
auditTargetRow: null,
|
||||||
|
auditRules: {
|
||||||
|
status: [
|
||||||
|
{ required: true, message: '请选择审核结果', trigger: 'change' }
|
||||||
|
],
|
||||||
|
remark: [
|
||||||
|
{ validator: (rule, value, callback) => {
|
||||||
|
const vm = this;
|
||||||
|
if (vm.auditForm.status === 'reject') {
|
||||||
|
if (!value || !value.trim()) {
|
||||||
|
callback(new Error('拒绝时审核备注不能为空'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (value.length > 255) {
|
||||||
|
callback(new Error('审核备注不能超过255字符'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (value && value.length > 255) {
|
||||||
|
callback(new Error('审核备注不能超过255字符'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}, trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -205,6 +265,49 @@ export default {
|
|||||||
this.userModel = item;
|
this.userModel = item;
|
||||||
this.open_add = true;
|
this.open_add = true;
|
||||||
},
|
},
|
||||||
|
/*打开审核弹窗*/
|
||||||
|
openAuditDialog(row) {
|
||||||
|
this.auditForm.id = row.id;
|
||||||
|
this.auditForm.status = '';
|
||||||
|
this.auditForm.remark = '';
|
||||||
|
this.auditTargetRow = row;
|
||||||
|
this.auditDialogVisible = true;
|
||||||
|
},
|
||||||
|
/*审核弹窗关闭重置*/
|
||||||
|
onAuditDialogClose() {
|
||||||
|
this.auditDialogVisible = false;
|
||||||
|
this.$refs.auditFormRef && this.$refs.auditFormRef.resetFields();
|
||||||
|
},
|
||||||
|
/*提交审核*/
|
||||||
|
submitAudit() {
|
||||||
|
this.$refs.auditFormRef.validate((valid) => {
|
||||||
|
if (!valid) return;
|
||||||
|
let self = this;
|
||||||
|
// 拒绝时备注二次校验
|
||||||
|
if (self.auditForm.status === 'reject' && (!self.auditForm.remark || !self.auditForm.remark.trim())) {
|
||||||
|
self.$message.warning('请填写审核备注');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self.auditLoading = true;
|
||||||
|
assetApi.gameAssetAudit({
|
||||||
|
id: self.auditForm.id,
|
||||||
|
status: self.auditForm.status,
|
||||||
|
remark: self.auditForm.remark
|
||||||
|
}, true).then(data => {
|
||||||
|
//响应拦截器保证此处 code 必为 1
|
||||||
|
self.auditLoading = false;
|
||||||
|
self.$message({
|
||||||
|
message: '审核提交成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
self.auditDialogVisible = false;
|
||||||
|
self.getData();
|
||||||
|
}).catch(error => {
|
||||||
|
//错误提示已由响应拦截器统一弹出
|
||||||
|
self.auditLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
/*打开编辑*/
|
/*打开编辑*/
|
||||||
editClick(row, e) {
|
editClick(row, e) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user