mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
â调整配置小程序
This commit is contained in:
parent
f675cb3b36
commit
219df5a344
@ -36,6 +36,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">小程序商户ID</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addSmallWeChatInfo.mchId" type="text" placeholder="必填,请填写小程序商户ID"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">配置</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addSmallWeChatInfo.objType">
|
||||
<option selected disabled value="">请选择状态</option>
|
||||
<option v-for="(item,index) in addSmallWeChatInfo.objTypes" :key="index"
|
||||
v-bind:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="addSmallWeChatInfo.remarks" type="text" placeholder="选填,请填写描述信息"
|
||||
class="form-control">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveSmallWeChatInfo()"><i class="fa fa-check"></i> 保存
|
||||
|
||||
@ -12,10 +12,18 @@
|
||||
appId: '',
|
||||
appSecret: '',
|
||||
payPassword: '',
|
||||
objType:'',
|
||||
objId:'',
|
||||
mchId:'',
|
||||
remarks:'',
|
||||
objTypes:'',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.getDict('small_wechat',"obj_type",function(_data){
|
||||
vc.component.addSmallWeChatInfo.objTypes = _data;
|
||||
});
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
@ -76,6 +84,20 @@
|
||||
errInfo: "支付密码不能超过200个字符"
|
||||
},
|
||||
],
|
||||
'addSmallWeChatInfo.objType': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "配置不能为空"
|
||||
}
|
||||
],
|
||||
'addSmallWeChatInfo.mchId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "小程序商户id不能为空"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
});
|
||||
@ -87,7 +109,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addSmallWeChatInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//vc.component.addSmallWeChatInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addSmallWeChatInfo);
|
||||
@ -95,6 +117,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let objType = vc.component.addSmallWeChatInfo.objType;
|
||||
//1000表示改小程序作用于当前小区 否则作用于所有小区
|
||||
if("1000" == objType){
|
||||
vc.component.addSmallWeChatInfo.objId = vc.getCurrentCommunity().communityId;
|
||||
}else{
|
||||
vc.component.addSmallWeChatInfo.objId = "allCommunity";
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'smallWeChat.saveSmallWeChat',
|
||||
JSON.stringify(vc.component.addSmallWeChatInfo),
|
||||
@ -123,12 +152,21 @@
|
||||
},
|
||||
clearAddSmallWeChatInfo: function () {
|
||||
vc.component.addSmallWeChatInfo = {
|
||||
weChatId: '',
|
||||
name: '',
|
||||
appId: '',
|
||||
appSecret: '',
|
||||
payPassword: '',
|
||||
objType:'',
|
||||
objId:'',
|
||||
mchId:'',
|
||||
remarks:'',
|
||||
objTypes:vc.component.addSmallWeChatInfo.objTypes,
|
||||
|
||||
};
|
||||
},
|
||||
getObjType:function () {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -36,6 +36,34 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">小程序商户ID</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editSmallWeChatInfo.mchId" type="text"
|
||||
placeholder="必填,请填写小程序商户ID" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">配置</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editSmallWeChatInfo.objType">
|
||||
<option selected disabled value="">请选择状态</option>
|
||||
<option v-for="(item,index) in editSmallWeChatInfo.objTypes" :key="index"
|
||||
v-bind:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="editSmallWeChatInfo.remarks" type="text" placeholder="选填,请填写描述信息"
|
||||
class="form-control">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="editSmallWeChat()"><i class="fa fa-check"></i> 保存
|
||||
|
||||
@ -8,7 +8,12 @@
|
||||
appId: '',
|
||||
appSecret: '',
|
||||
payPassword: '',
|
||||
createTime:''
|
||||
createTime:'',
|
||||
objType:'',
|
||||
objId:'',
|
||||
mchId:'',
|
||||
remarks:'',
|
||||
objTypes:''
|
||||
|
||||
}
|
||||
},
|
||||
@ -17,8 +22,10 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editSmallWeChat', 'openEditSmallWeChatModal', function (_params) {
|
||||
console.log("收到参数",_params);
|
||||
vc.component.refreshEditSmallWeChatInfo();
|
||||
vc.getDict('small_wechat',"obj_type",function(_data){
|
||||
vc.component.editSmallWeChatInfo.objTypes = _data;
|
||||
});
|
||||
$('#editSmallWeChatModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editSmallWeChatInfo);
|
||||
});
|
||||
@ -81,7 +88,22 @@
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "编码不能为空"
|
||||
}]
|
||||
},
|
||||
],
|
||||
'editSmallWeChatInfo.objType': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "配置不能为空"
|
||||
}
|
||||
],
|
||||
'editSmallWeChatInfo.mchId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "小程序商户id不能为空"
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
},
|
||||
@ -91,6 +113,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let objType = vc.component.editSmallWeChatInfo.objType;
|
||||
//1000表示改小程序作用于当前小区 否则作用于所有小区
|
||||
if("1000" == objType){
|
||||
vc.component.editSmallWeChatInfo.objId = vc.getCurrentCommunity().communityId;
|
||||
}else{
|
||||
vc.component.editSmallWeChatInfo.objId = "allCommunity";
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'smallWeChat.updateSmallWeChat',
|
||||
JSON.stringify(vc.component.editSmallWeChatInfo),
|
||||
@ -120,7 +150,12 @@
|
||||
appId: '',
|
||||
appSecret: '',
|
||||
payPassword: '',
|
||||
createTime:''
|
||||
createTime:'',
|
||||
objType:'',
|
||||
objId:'',
|
||||
mchId:'',
|
||||
remarks:'',
|
||||
objTypes:''
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,6 +57,9 @@
|
||||
<th class="text-center">appId</th>
|
||||
<th class="text-center">应用密钥</th>
|
||||
<th class="text-center">支付密码</th>
|
||||
<th class="text-center">商户ID</th>
|
||||
<th class="text-center">类型</th>
|
||||
<th class="text-center">描述</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
|
||||
@ -68,6 +71,9 @@
|
||||
<td class="text-center">{{smallWeChat.appId}}</td>
|
||||
<td class="text-center">{{smallWeChat.appSecret}}</td>
|
||||
<td class="text-center">{{smallWeChat.payPassword}}</td>
|
||||
<td class="text-center">{{smallWeChat.mchId}}</td>
|
||||
<td class="text-center">{{smallWeChat.objTypeName}}</td>
|
||||
<td class="text-center">{{smallWeChat.remarks}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user