From 8563d41795ac12c7b97befe587eb01cc481fde94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=B1=E8=80=98=E7=A8=B7?= <18026623439@163.com>
Date: Thu, 10 Dec 2020 12:32:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E4=BA=8C=E7=BB=B4=E7=A0=81,?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E6=88=B7=E7=AB=AF=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=BB=91=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/yxStoreCustomer.js | 46 ++++++
src/utils/index.js | 13 ++
src/views/shop/customer/index.vue | 263 ++++++++++++++++++++++++++++++
src/views/wechat/config/index.vue | 27 ++-
4 files changed, 344 insertions(+), 5 deletions(-)
create mode 100644 src/api/yxStoreCustomer.js
create mode 100644 src/views/shop/customer/index.vue
diff --git a/src/api/yxStoreCustomer.js b/src/api/yxStoreCustomer.js
new file mode 100644
index 0000000..42241b1
--- /dev/null
+++ b/src/api/yxStoreCustomer.js
@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+export function add(data) {
+ return request({
+ url: 'api/yxStoreCustomer',
+ method: 'post',
+ data
+ })
+}
+
+export function del(ids) {
+ return request({
+ url: 'api/yxStoreCustomer/',
+ method: 'delete',
+ data: ids
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/yxStoreCustomer',
+ method: 'put',
+ data
+ })
+}
+
+export function getqrcode() {
+ return request({
+ url: 'api/wxmp/qrcode',
+ method: 'get'
+ })
+}
+export function getOpenId(key) {
+ return request({
+ url: 'api/wxmp/getOpenId?key=' + key,
+ method: 'get'
+ })
+}
+export function getwechatCode() {
+ return request({
+ url: 'api/wxmp/wechatCode',
+ method: 'get'
+ })
+}
+
+export default { add, edit, del, getqrcode, getOpenId, getwechatCode }
diff --git a/src/utils/index.js b/src/utils/index.js
index e2758e4..644fa56 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -419,3 +419,16 @@ export function downloadFile(obj, name, suffix) {
link.click()
document.body.removeChild(link)
}
+
+export function RandomNumber() {
+ var min = 5; var max = 36
+ var randomStr = ''
+ var range = (max ? Math.round(Math.random() * (max - min)) + min : min)
+ var arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
+
+ for (var i = 0; i < range; i++) {
+ var index = Math.round(Math.random() * (arr.length - 1))
+ randomStr += arr[index]
+ }
+ return randomStr
+}
diff --git a/src/views/shop/customer/index.vue b/src/views/shop/customer/index.vue
new file mode 100644
index 0000000..7c14cc5
--- /dev/null
+++ b/src/views/shop/customer/index.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 加载中
+ ...
+
+
+
+ 注:未关注公众号请先关注
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label.is_enable[scope.row.isEnable] }}
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wechat/config/index.vue b/src/views/wechat/config/index.vue
index 23dcc14..8c45a6b 100644
--- a/src/views/wechat/config/index.vue
+++ b/src/views/wechat/config/index.vue
@@ -17,7 +17,17 @@
-
+
+
+
+
@@ -47,6 +57,8 @@ export default {
mixins: [initData],
data() {
return {
+ wechat_follow_imgArr:[],
+ imageArr: [],
delLoading: false,
form: {
wechat_name: '',
@@ -58,12 +70,12 @@ export default {
wechat_encode: '',
wechat_encodingaeskey: '',
wechat_share_img: '',
- imageArr: [],
+ wechat_follow_img: '',
wechat_qrcode: '',
wechat_type: '',
wechat_share_title: '',
wechat_share_synopsis: '',
- api: 'http://你的H5端域名/api/wechat/serve',
+ api: 'http://你的yshop-app端域名/api/wechat/serve',
wechat_avatar: ''
},
rules: {
@@ -71,10 +83,14 @@ export default {
}
},
watch: {
- 'form.imageArr': function(val) {
+ imageArr: function(val) {
if (val) {
this.form.wechat_share_img = val.join(',')
}
+ },wechat_follow_imgArr: function(val) {
+ if (val) {
+ this.form.wechat_follow_img = val.join(',')
+ }
}
},
created() {
@@ -88,7 +104,8 @@ export default {
}
})
- this.form.imageArr = this.form.wechat_share_img.split(',')
+ this.imageArr = this.form.wechat_share_img.split(',')
+ this.wechat_follow_imgArr = this.form.wechat_follow_img.split(',')
})
},
methods: {