Commit 44a406e8 by 王悦

add商标校验

parent 1c22e4d5
......@@ -27,6 +27,24 @@ class calculatepriceCtl extends CtlBase {
var result = await this.service.hookOrder(obj);
return System.getResult2(result, null);
}
async checkname(o, req) {
let url = settings.apiconfig.aliPOPUrl();
let app = req.session.app || null;
let obj = {
methodType:"CheckTmName",
body:{TmName:req.query.name},
appKey:app ? app.appid : "",
};
let rc = System.getObject("util.execClient");
let rtn = null;
try {
rtn = await rc.execPost(obj, url);
return JSON.parse(rtn.stdout);
} catch (e) {
console.log(e);
return System.getResult2(null, null);
}
}
async word2pic(o, req) {
console.log("qqqqqqqqqqqwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeee");
console.log(req.session.user.account);
......
......@@ -74,6 +74,10 @@ var settings = {
},
apiconfig: {
imageQueryKey: "4S3ypgaRq19bhKwB",
//阿里专家辅助注册服务商接口
aliPOPUrl:function(){
return "https://fqgirl.gongsibao.com/api/tmsub/queryAliTmStatus"
},
MgphoneSearchUrl: function () {
return settings.reqMgAddr() + "phones"
},
......
......@@ -27,10 +27,12 @@
<el-form-item label="商标名称" style="width:450px;float:left" prop="tmName">
<el-input v-model="form.tmName"></el-input>
</el-form-item>
<div style="float:left;padding-left:10px">
<el-button @click="checkname">检查名称</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="word2pic">文字商标在线生成</el-button>
</div>
<div style="clear:both;"></div>
<el-form-item style="width:350px;float:left" label="商标图样_黑白" prop="picUrl">
<img width="120px" height="120px" style="border:2px dashed #e9e9e9" v-if="form.picUrl"
......
......@@ -811,6 +811,24 @@
});
},
checkname()
{
if (!this.form.tmName) {
return this.$message.error('商标名称不能为空!');
}
this.$root.showMask();
this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName }).then(d => {
console.log(d);
if (d.data.data.Result === "PASS") {
this.$message.success(`名称可以使用`);
}else if (d.data.data.Result === "BLOCK") {
this.form.tmName = "";
this.$message.warning(d.data.data.Message)
}
}).finally(() => {
this.$root.hideMask();
});
},
updatePrice(){
this.form.totalSum = 0;
this.form.invoiceTaxes = 0;
......
......@@ -26,6 +26,9 @@
<el-form-item label="商标名称" style="width:450px;float:left" prop="tmName">
<el-input v-model="form.tmName"></el-input>
</el-form-item>
<div style="float:left;padding-left:10px">
<el-button @click="checkname">检查名称</el-button>
</div>
<div style="float:left;padding-left:10px" v-if="form.tmFormType==3">
<el-button @click="word2pic">文字商标在线生成</el-button>
</div>
......
......@@ -739,6 +739,24 @@
});
},
checkname()
{
if (!this.form.tmName) {
return this.$message.error('商标名称不能为空!');
}
this.$root.showMask();
this.$root.getReq("/web/calculatepriceCtl/checkname", { name: this.form.tmName }).then(d => {
console.log(d);
if (d.data.data.Result === "PASS") {
this.$message.success(`名称可以使用`);
}else if (d.data.data.Result === "BLOCK") {
this.form.tmName = "";
this.$message.warning(d.data.data.Message)
}
}).finally(() => {
this.$root.hideMask();
});
},
updatePrice(){
this.form.totalSum = 0;
this.form.invoiceTaxes = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment