Compare commits

..

4 Commits

Author SHA1 Message Date
admin a32dc70c0a README.md update 2026-07-22 09:24:28 +08:00
admin 6d50bf8cf9 feat: 数字资产审核弹窗 2026-07-22 09:22:07 +08:00
admin 7274619f77 Merge branch 'main' of https://git.scszsj.com/code/Goodgame_mng 2026-07-21 16:31:07 +08:00
admin c88d8cbabf README.md update 2026-07-21 16:30:25 +08:00
4 changed files with 114 additions and 4 deletions
+4 -1
View File
@@ -18,4 +18,7 @@ npm run build
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
## 注意
- node版本不能过高,推荐v12.13.0
- 后台添加新权限需登录admin后台添加
+1 -1
View File
@@ -12,7 +12,7 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/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, // 如果接口跨域,需要进行这个参数配置
}
},
+4
View File
@@ -45,6 +45,10 @@ let assetApi = {
gameGenDac(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) {
return request._get('/shop/gameasset.GameAsset/index', data, errorback);
+105 -2
View File
@@ -68,10 +68,11 @@
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="210">
<el-table-column fixed="right" label="操作" width="260">
<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 @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>
</el-table-column>
@@ -93,6 +94,32 @@
<!--会员充值-->
<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>
</template>
@@ -128,7 +155,40 @@ export default {
tableData: [],
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() {
@@ -205,6 +265,49 @@ export default {
this.userModel = item;
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) {
this.$router.push({