leisure-core 0.4.22 → 0.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -0
- package/le-cp/index.js +7 -0
- package/le-cp/src/main.vue +146 -0
- package/le-cp/src/sub.vue +135 -0
- package/le-mpurl/src/main.vue +27 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -44,6 +44,7 @@ import LeDistributionCategory from "./le-distribution-category/index.js";
|
|
|
44
44
|
import LeSelectUser from "./le-select-user/index.js";
|
|
45
45
|
import LeAdSpace from "./le-ad-space/index.js";
|
|
46
46
|
import LeAd from "./le-ad/index.js";
|
|
47
|
+
import LeCp from "./le-cp/index.js";
|
|
47
48
|
|
|
48
49
|
const components = [
|
|
49
50
|
LeArea,
|
|
@@ -89,6 +90,7 @@ const components = [
|
|
|
89
90
|
LeSelectUser,
|
|
90
91
|
LeAdSpace,
|
|
91
92
|
LeAd,
|
|
93
|
+
LeCp,
|
|
92
94
|
];
|
|
93
95
|
|
|
94
96
|
const install = function (Vue) {
|
|
@@ -204,4 +206,5 @@ export default {
|
|
|
204
206
|
LeSelectUser,
|
|
205
207
|
LeAdSpace,
|
|
206
208
|
LeAd,
|
|
209
|
+
LeCp,
|
|
207
210
|
};
|
package/le-cp/index.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form :inline="true" :model="searchData">
|
|
4
|
+
<el-form-item label="手机号">
|
|
5
|
+
<el-input v-model="searchData.cphone" placeholder="手机号"></el-input>
|
|
6
|
+
</el-form-item>
|
|
7
|
+
<el-form-item label="酒店名称">
|
|
8
|
+
<el-input v-model="searchData.cname" placeholder="酒店名称"></el-input>
|
|
9
|
+
</el-form-item>
|
|
10
|
+
<el-form-item>
|
|
11
|
+
<el-button type="primary" @click="list()">查询</el-button>
|
|
12
|
+
<el-button type="primary" @click="add()">新建酒店</el-button>
|
|
13
|
+
</el-form-item>
|
|
14
|
+
</el-form>
|
|
15
|
+
<el-table :data="tableData" border row-key="id" stripe style="width: 100%">
|
|
16
|
+
<el-table-column prop="cp_name" label="单位名称" width="180">
|
|
17
|
+
</el-table-column>
|
|
18
|
+
<el-table-column prop="cp_link_nick" label="联系人" width="180">
|
|
19
|
+
</el-table-column>
|
|
20
|
+
<el-table-column prop="cp_link_phone" label="联系人手机">
|
|
21
|
+
</el-table-column>
|
|
22
|
+
<el-table-column prop="cp_qrcode" label="二维码"> </el-table-column>
|
|
23
|
+
<el-table-column prop="note" label="备注"> </el-table-column>
|
|
24
|
+
<el-table-column
|
|
25
|
+
fixed="right"
|
|
26
|
+
label="操作"
|
|
27
|
+
align="center"
|
|
28
|
+
width="250"
|
|
29
|
+
row
|
|
30
|
+
>
|
|
31
|
+
<template slot-scope="scope">
|
|
32
|
+
<div class="btnClass">
|
|
33
|
+
<le-button-qr
|
|
34
|
+
:qrCodeUrl="scope.row.cp_qrcode"
|
|
35
|
+
:fileName="scope.row.cp_name"
|
|
36
|
+
@qrMake="showQrcodeFun"
|
|
37
|
+
></le-button-qr>
|
|
38
|
+
<le-button
|
|
39
|
+
id="btnEdit"
|
|
40
|
+
v-permission="$route.params.btns"
|
|
41
|
+
text="编辑"
|
|
42
|
+
:disp="btnEditDisp"
|
|
43
|
+
@click="openEditWindow(scope.row)"
|
|
44
|
+
></le-button>
|
|
45
|
+
<le-button-msg
|
|
46
|
+
@click="del(scope.row)"
|
|
47
|
+
:disp="btnDelDisp"
|
|
48
|
+
></le-button-msg>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
</el-table-column>
|
|
52
|
+
</el-table>
|
|
53
|
+
<div style="text-align: center; margin-top: 30px">
|
|
54
|
+
<el-pagination
|
|
55
|
+
background
|
|
56
|
+
layout="prev, pager, next"
|
|
57
|
+
:total="searchData.total"
|
|
58
|
+
:page-size="10"
|
|
59
|
+
@current-change="current_change"
|
|
60
|
+
></el-pagination>
|
|
61
|
+
</div>
|
|
62
|
+
<le-dialog-container :showDialog="showDialog" @close="closeDialog">
|
|
63
|
+
<le-cp-sub
|
|
64
|
+
@close="closeDialog"
|
|
65
|
+
@rowRefresh="list"
|
|
66
|
+
:rowitem="currentRow"
|
|
67
|
+
></le-cp-sub>
|
|
68
|
+
</le-dialog-container>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
<script>
|
|
72
|
+
import { list, del } from "@/api/systemcp";
|
|
73
|
+
import LeCpSub from "./sub.vue";
|
|
74
|
+
export default {
|
|
75
|
+
name: "le-cp",
|
|
76
|
+
components: {
|
|
77
|
+
LeCpSub,
|
|
78
|
+
},
|
|
79
|
+
props: {
|
|
80
|
+
btnEditDisp: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true,
|
|
83
|
+
},
|
|
84
|
+
btnDelDisp: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: true,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
data() {
|
|
90
|
+
return {
|
|
91
|
+
searchData: {
|
|
92
|
+
cname: "",
|
|
93
|
+
cphone: "",
|
|
94
|
+
pageNo: 1,
|
|
95
|
+
total: 1,
|
|
96
|
+
},
|
|
97
|
+
tableData: [],
|
|
98
|
+
showDialog: false,
|
|
99
|
+
showQRCodeDialog: false,
|
|
100
|
+
currentRow: {},
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
mounted() {
|
|
104
|
+
this.list();
|
|
105
|
+
},
|
|
106
|
+
methods: {
|
|
107
|
+
add() {
|
|
108
|
+
this.showDialog = true;
|
|
109
|
+
},
|
|
110
|
+
list() {
|
|
111
|
+
let params = JSON.parse(JSON.stringify(this.searchData));
|
|
112
|
+
list(params).then((res) => {
|
|
113
|
+
this.tableData = res.data.data.list;
|
|
114
|
+
this.searchData.total = res.data.data.count;
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
del(id) {
|
|
118
|
+
del(id).then((response) => {
|
|
119
|
+
this.list();
|
|
120
|
+
this.$message.success(response.data.info);
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
current_change(currentPage) {
|
|
124
|
+
this.searchData.pageNo = currentPage;
|
|
125
|
+
this.list();
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
openEditWindow(item) {
|
|
129
|
+
this.currentRow = item;
|
|
130
|
+
this.showDialog = true;
|
|
131
|
+
},
|
|
132
|
+
closeDialog() {
|
|
133
|
+
this.currentRow = {};
|
|
134
|
+
this.showDialog = false;
|
|
135
|
+
},
|
|
136
|
+
showQrcodeFun() {
|
|
137
|
+
this.showQRCodeDialog = true;
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
142
|
+
<style scoped>
|
|
143
|
+
.btnClass {
|
|
144
|
+
display: flex;
|
|
145
|
+
}
|
|
146
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
3
|
+
<el-form-item label="酒店名称" prop="cp_name">
|
|
4
|
+
<el-input v-model="form.cp_name"></el-input>
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<el-form-item label="酒店二维码">
|
|
7
|
+
<el-row>
|
|
8
|
+
<el-col :span="24">
|
|
9
|
+
<el-input v-model="form.cp_qrcode" disabled></el-input>
|
|
10
|
+
</el-col>
|
|
11
|
+
</el-row>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
<el-form-item label="联系人手机">
|
|
14
|
+
<el-input v-model="form.cp_link_phone"></el-input>
|
|
15
|
+
</el-form-item>
|
|
16
|
+
<el-form-item label="联系人昵称">
|
|
17
|
+
<el-row>
|
|
18
|
+
<el-col :span="20">
|
|
19
|
+
<el-input v-model="form.cp_link_nick" disabled></el-input>
|
|
20
|
+
</el-col>
|
|
21
|
+
<el-col :span="4">
|
|
22
|
+
<le-button @click="getUser" text="绑定联系人"></le-button>
|
|
23
|
+
</el-col>
|
|
24
|
+
</el-row>
|
|
25
|
+
</el-form-item>
|
|
26
|
+
<el-form-item label="备注" prop="note">
|
|
27
|
+
<el-input v-model="form.note"></el-input>
|
|
28
|
+
</el-form-item>
|
|
29
|
+
<el-form-item v-rfooter>
|
|
30
|
+
<el-button type="primary" @click="onSubmit">保存</el-button>
|
|
31
|
+
<el-button @click="close()">取消</el-button>
|
|
32
|
+
</el-form-item>
|
|
33
|
+
</el-form>
|
|
34
|
+
</template>
|
|
35
|
+
<script>
|
|
36
|
+
import { edit, create } from "@/api/systemcp";
|
|
37
|
+
import { userOne } from "@/api/user";
|
|
38
|
+
export default {
|
|
39
|
+
name: "le-cp-sub",
|
|
40
|
+
props: {
|
|
41
|
+
rowitem: {},
|
|
42
|
+
},
|
|
43
|
+
data() {
|
|
44
|
+
return {
|
|
45
|
+
form: {
|
|
46
|
+
id: "",
|
|
47
|
+
cp_name: "",
|
|
48
|
+
cp_qrcode: "",
|
|
49
|
+
cp_wx_url: "",
|
|
50
|
+
cp_link_uid: "",
|
|
51
|
+
cp_link_nick: "",
|
|
52
|
+
cp_link_phone: "",
|
|
53
|
+
note: "",
|
|
54
|
+
},
|
|
55
|
+
rules: {
|
|
56
|
+
cp_name: [
|
|
57
|
+
{ required: true, message: "请输入名称", trigger: "blur" },
|
|
58
|
+
{
|
|
59
|
+
min: 1,
|
|
60
|
+
max: 50,
|
|
61
|
+
message: "长度在 1 到 50 个字符",
|
|
62
|
+
trigger: "blur",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
note: [
|
|
66
|
+
{
|
|
67
|
+
max: 200,
|
|
68
|
+
message: "长度在 0 到 200个字符",
|
|
69
|
+
trigger: "blur",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
watch: {
|
|
76
|
+
rowitem: {
|
|
77
|
+
handler(newValue) {
|
|
78
|
+
this.form = newValue;
|
|
79
|
+
},
|
|
80
|
+
immediate: true,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
mounted() {},
|
|
84
|
+
methods: {
|
|
85
|
+
onSubmit() {
|
|
86
|
+
this.$refs["form"].validate((valid) => {
|
|
87
|
+
if (valid) {
|
|
88
|
+
let param = JSON.parse(JSON.stringify(this.form));
|
|
89
|
+
if (
|
|
90
|
+
param.cp_link_phone &&
|
|
91
|
+
param.cp_link_phone.length > 0 &&
|
|
92
|
+
!param.cp_link_uid
|
|
93
|
+
) {
|
|
94
|
+
this.$message.warning("请先绑定联系人");
|
|
95
|
+
} else {
|
|
96
|
+
this.savaData(param);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
savaData(param) {
|
|
102
|
+
if (param.id && param.id.length > 0) {
|
|
103
|
+
edit(param).then((response) => {
|
|
104
|
+
this.$message.success(response.data.info);
|
|
105
|
+
this.$emit("rowRefresh");
|
|
106
|
+
this.close();
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
create(param).then((res) => {
|
|
110
|
+
this.$message.success(res.data.info);
|
|
111
|
+
this.$emit("rowRefresh");
|
|
112
|
+
this.close();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
getUser() {
|
|
117
|
+
let param = {};
|
|
118
|
+
param.phone = this.form.cp_link_phone;
|
|
119
|
+
if (param.phone && param.phone.length > 0) {
|
|
120
|
+
userOne(param).then((response) => {
|
|
121
|
+
let user = response.data.data;
|
|
122
|
+
console.log(user);
|
|
123
|
+
this.form.cp_link_uid = user.id;
|
|
124
|
+
this.form.cp_link_nick = user.nick;
|
|
125
|
+
});
|
|
126
|
+
} else {
|
|
127
|
+
this.$message.error("请输入手机号码");
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
close() {
|
|
131
|
+
this.$emit("close");
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
</script>
|
package/le-mpurl/src/main.vue
CHANGED
|
@@ -8,28 +8,34 @@
|
|
|
8
8
|
stripe
|
|
9
9
|
style="width: 100%"
|
|
10
10
|
>
|
|
11
|
-
<el-table-column label="
|
|
12
|
-
|
|
13
|
-
<span v-if="scope.row.url_type == 1">商城版块</span>
|
|
14
|
-
<span v-if="scope.row.url_type == 2">旅游版块</span>
|
|
15
|
-
</template>
|
|
11
|
+
<el-table-column prop="code" label="编码" width="50"> </el-table-column>
|
|
12
|
+
<el-table-column prop="mp_path" label="小程序页面" width="150">
|
|
16
13
|
</el-table-column>
|
|
17
|
-
<el-table-column prop="
|
|
14
|
+
<el-table-column prop="mp_param" label="参数" width="50"> </el-table-column>
|
|
15
|
+
<el-table-column prop="wx_url" label="微信url" width="100">
|
|
18
16
|
</el-table-column>
|
|
19
|
-
<el-table-column prop="
|
|
17
|
+
<el-table-column prop="url_jump" label="推广链接" width="200">
|
|
20
18
|
</el-table-column>
|
|
21
|
-
<el-table-column prop="url_jump" label="推广链接"> </el-table-column>
|
|
22
19
|
<!-- <el-table-column prop="url_wx" label="小程序url地址"> </el-table-column> -->
|
|
23
|
-
<el-table-column prop="cdate" label="时间" width="
|
|
20
|
+
<el-table-column prop="cdate" label="时间" width="150">
|
|
24
21
|
<template slot-scope="scope">
|
|
25
22
|
<span v-if="scope.row.cdate">{{ parseTime(scope.row.cdate) }}</span>
|
|
26
23
|
</template>
|
|
27
24
|
</el-table-column>
|
|
28
25
|
<el-table-column prop="note" label="备注"> </el-table-column>
|
|
26
|
+
<el-table-column label="操作" align="center" width="80">
|
|
27
|
+
<template slot-scope="scope">
|
|
28
|
+
<le-button
|
|
29
|
+
type="primary"
|
|
30
|
+
text="生成"
|
|
31
|
+
@click="geneUrl(scope.row)"
|
|
32
|
+
></le-button>
|
|
33
|
+
</template>
|
|
34
|
+
</el-table-column>
|
|
29
35
|
</el-table>
|
|
30
36
|
</template>
|
|
31
37
|
<script>
|
|
32
|
-
import { mpUrlList } from "@/api/
|
|
38
|
+
import { mpUrlList, getMpLink } from "@/api/mpurl_templete";
|
|
33
39
|
export default {
|
|
34
40
|
name: "le-mpurl",
|
|
35
41
|
data() {
|
|
@@ -46,6 +52,17 @@ export default {
|
|
|
46
52
|
this.tableData = res.data.data;
|
|
47
53
|
});
|
|
48
54
|
},
|
|
55
|
+
geneUrl(row) {
|
|
56
|
+
let code = row.code;
|
|
57
|
+
let param = {};
|
|
58
|
+
param.code = code;
|
|
59
|
+
getMpLink(param).then((res) => {
|
|
60
|
+
let url = res.data.data;
|
|
61
|
+
if (url) {
|
|
62
|
+
this.list();
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
},
|
|
49
66
|
},
|
|
50
67
|
};
|
|
51
68
|
</script>
|