调整公众号页面

This commit is contained in:
15178832520 2020-06-18 23:57:15 +08:00
parent 5fb43de016
commit fbf64d3b46
9 changed files with 330 additions and 35 deletions

1
app.js
View File

@ -34,6 +34,7 @@ let opts = {
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts));
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts));
//app.listen(3000);

View File

@ -7,17 +7,6 @@
<div class="ibox-content">
<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.weChatType">
<option selected disabled value="">请选择</option>
<option v-for="(item,index) in addSmallWeChatInfo.types" :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">

View File

@ -32,7 +32,9 @@
},
_initEvent: function () {
vc.on('addSmallWeChat', 'openAddSmallWeChatModal', function () {
vc.on('addSmallWeChat', 'openAddSmallWeChatModal', function (type) {
console.log(type);
vc.component.addSmallWeChatInfo.weChatType = type;
$('#addSmallWeChatModel').modal('show');
});
},
@ -89,13 +91,6 @@
errInfo: "支付密码不能超过200个字符"
},
],
'addSmallWeChatInfo.weChatType': [
{
limit: "required",
param: "",
errInfo: "配置不能为空"
}
],
'addSmallWeChatInfo.mchId': [
{
limit: "required",

View File

@ -0,0 +1,47 @@
<div class="animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>商户信息</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddSmallWeChatModal(1100)">
<i class="glyphicon glyphicon-plus"></i>
返回
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<tbody>
<tr v-for="(storeAttr, key) in listStoreManageInfo.storeAttrDtoList">
<td class="text-center">{{storeAttr.name}}</td>
<td class="text-center">{{storeAttr.value}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditStoreAttrModel(storeAttr)">修改
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<vc:create path="common/editStoreInfo"></vc:create>
<vc:create path="common/editStoreAttr"></vc:create>
</div>

View File

@ -0,0 +1,66 @@
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
listStoreManageInfo: {
listStores: [],
storeAttrDtoList:[],
total: 0,
records: 1,
conditions: {
name: '',
storeTypeCd: '',
tel: ''
}
}
},
_initMethod: function () {
vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('storeInfoManage', 'getStoreInfo', function (_param) {
vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
});
},
methods: {
_listListStores: function (_page, _rows) {
vc.component.listStoreManageInfo.conditions.page = _page;
vc.component.listStoreManageInfo.conditions.row = _rows;
var param = {
params: vc.component.listStoreManageInfo.conditions
};
//发送get请求
vc.http.get('listStoreManage',
'getStoreInfo',
param,
function (json, res) {
var _listStoreManageInfo = JSON.parse(json);
vc.component.listStoreManageInfo.listStores = _listStoreManageInfo.stores;
vc.component.listStoreManageInfo.storeAttrDtoList = vc.component.listStoreManageInfo.listStores[0].storeAttrDtoList;
vc.emit('pagination', 'init', {
total: vc.component.listStoreManageInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_queryListStoreMethod: function () {
vc.component._listListStores(DEFAULT_PAGE, DEFAULT_ROWS);
},
_openEditStoreInfoModel(_storeInfo){
vc.emit('editStoreInfo', 'openEditStoreModal', {_storeInfo});
},
_openEditStoreAttrModel(_storeAttr){
vc.emit('editStoreAttr', 'openEditStoreAttrModal', {_storeAttr});
}
}
});
})(window.vc);

View File

@ -0,0 +1,116 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入名称"
v-model="smallWeChatManageInfo.conditions.name" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入appId"
v-model="smallWeChatManageInfo.conditions.appId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_querySmallWeChatMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" v-if="smallWeChatManageInfo.wetConfig == false">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddSmallWeChatModal(1100)">
<i class="glyphicon glyphicon-plus"></i>
添加公众号
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny"
data-page-size="15"
>
<thead>
<tr>
<th class="text-center">名称</th>
<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>
</tr>
</thead>
<tbody>
<tr v-for="smallWeChat in smallWeChatManageInfo.smallWeChats">
<td class="text-center">{{smallWeChat.name}}</td>
<td class="text-center">{{smallWeChat.appId}}</td>
<td class="text-center">********</td>
<td class="text-center">**********</td>
<td class="text-center">{{smallWeChat.mchId}}</td>
<td class="text-center">{{smallWeChat.remarks}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openWeChatTemplateModel(smallWeChat)">模板配置
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteSmallWeChatModel(smallWeChat)">删除
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
<vc:create path="property/addSmallWeChat" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="property/editSmallWeChat"></vc:create>
<vc:create path="property/deleteSmallWeChat"></vc:create>
<div v-if="smallWeChatManageInfo.wetConfig == true">
<vc:create path="property/wetChatAttrConfig"></vc:create>
</div>
</div>

View File

@ -0,0 +1,93 @@
/**
微信公众号
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
smallWeChatManageInfo: {
smallWeChats: [],
total: 0,
records: 1,
moreCondition: false,
name: '',
wetConfig:false,
conditions: {
name: '',
appId: '',
weChatType:'1100'
}
}
},
_initMethod: function () {
vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('smallWeChatManage', 'listSmallWeChat', function (_param) {
vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listSmallWeChats(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listSmallWeChats: function (_page, _rows) {
vc.component.smallWeChatManageInfo.conditions.page = _page;
vc.component.smallWeChatManageInfo.conditions.row = _rows;
var param = {
params: vc.component.smallWeChatManageInfo.conditions
};
//发送get请求
vc.http.apiGet('smallWeChat.listSmallWeChats',
param,
function (json, res) {
var _smallWeChatManageInfo = JSON.parse(json);
vc.component.smallWeChatManageInfo.total = _smallWeChatManageInfo.total;
vc.component.smallWeChatManageInfo.records = _smallWeChatManageInfo.records;
vc.component.smallWeChatManageInfo.smallWeChats = _smallWeChatManageInfo.smallWeChats;
vc.emit('pagination', 'init', {
total: vc.component.smallWeChatManageInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openAddSmallWeChatModal: function (type) {
vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', type);
},
_openEditSmallWeChatModel: function (_smallWeChat) {
vc.emit('editSmallWeChat', 'openEditSmallWeChatModal', _smallWeChat);
},
_openDeleteSmallWeChatModel: function (_smallWeChat) {
vc.emit('deleteSmallWeChat', 'openDeleteSmallWeChatModal', _smallWeChat);
},
_querySmallWeChatMethod: function () {
vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS);
},
_switchWeChatType:function(type){
console.log(type);
vc.component.smallWeChatManageInfo.conditions.weChatType = type;
vc.component._listSmallWeChats(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.smallWeChatManageInfo.moreCondition) {
vc.component.smallWeChatManageInfo.moreCondition = false;
} else {
vc.component.smallWeChatManageInfo.moreCondition = true;
}
},
_openWeChatTemplateModel:function (smallWeChat) {
vc.component.smallWeChatManageInfo.wetConfig = true;
}
}
});
})(window.vc);

View File

@ -38,22 +38,10 @@
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button"
class="btn btn-light btn-sm"
v-bind:class="{'btn-primary': smallWeChatManageInfo.conditions.weChatType == 1000}"
v-on:click="_switchWeChatType(1000)"
>小程序</button>
<button type="button"
class="btn btn-light btn-sm"
v-bind:class="{'btn-primary': smallWeChatManageInfo.conditions.weChatType == 1100}"
v-on:click="_switchWeChatType(1100)"
>公众号</button>
</div>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddSmallWeChatModal()">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddSmallWeChatModal(1000)">
<i class="glyphicon glyphicon-plus"></i>
微信配置
添加小程序
</button>
</div>
</div>

View File

@ -58,8 +58,8 @@
}
);
},
_openAddSmallWeChatModal: function () {
vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', {});
_openAddSmallWeChatModal: function (type) {
vc.emit('addSmallWeChat', 'openAddSmallWeChatModal', type);
},
_openEditSmallWeChatModel: function (_smallWeChat) {
vc.emit('editSmallWeChat', 'openEditSmallWeChatModal', _smallWeChat);