Commit 332b1be5 authored by xd's avatar xd

侧边栏注册完成,推券待确定

parent 383789d9
...@@ -90,16 +90,6 @@ export function getHistoryList(data) { ...@@ -90,16 +90,6 @@ export function getHistoryList(data) {
params:data params:data
}) })
} }
// 模糊查询
export function search(data) {
return request({
url: '/admin/auth/addressbook/clerk/getByUserIdOrUserName',
method: 'get',
params:data
})
}
// 添加子部门 // 添加子部门
export function addGroup(params) { export function addGroup(params) {
return request({ return request({
...@@ -150,3 +140,11 @@ export function getHistoryList(data) { ...@@ -150,3 +140,11 @@ export function getHistoryList(data) {
params params
}) })
} }
export function search(params) {
return request({
url: '/admin/auth/addressbook/clerk/getByUserName',
method: 'get',
params
})
}
\ No newline at end of file
...@@ -328,10 +328,11 @@ export default { ...@@ -328,10 +328,11 @@ export default {
this.counterId = this.groupId; this.counterId = this.groupId;
} }
let params = { let params = {
param: this.formData.keywords param: this.formData.keywords,
departmentId: this.groupId
} }
search(params).then(res=>{ search(params).then(res=>{
console.log(res) console.log(res,'搜索数据')
this.tableData = res.data this.tableData = res.data
// this.page.total = Number(res.data.total); // this.page.total = Number(res.data.total);
}) })
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>会员拉新</title> <title>会员拉新</title>
<script src="../js/jquery-3.4.1.min.js"></script> <script src="../js/jquery-3.4.1.min.js"></script>
<style> <style>
html,body{ html,
body {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0; margin: 0;
...@@ -13,7 +15,8 @@ ...@@ -13,7 +15,8 @@
font-size: 16px; font-size: 16px;
color: #ffffff; color: #ffffff;
} }
.register_container{
.register_container {
height: 100%; height: 100%;
background-color: rgba(15, 106, 184, 0.99); background-color: rgba(15, 106, 184, 0.99);
margin: 0; margin: 0;
...@@ -21,24 +24,28 @@ ...@@ -21,24 +24,28 @@
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
} }
.register_titles .title{
.register_titles .title {
font-size: 3rem; font-size: 3rem;
line-height: 5rem; line-height: 5rem;
} }
.register_qrcode #image{
.register_qrcode #image {
display: inline-block; display: inline-block;
width: 60%; width: 60%;
height: auto; height: auto;
margin: 3rem 0; margin: 3rem 0;
} }
.register_qrcode .qrcodeTip{
.register_qrcode .qrcodeTip {
font-size: 2rem; font-size: 2rem;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="register_container"> <div class="register_container">
<div class="register_titles"> <div class="register_titles">
<div class="title">扫码注册成为会员</div> <div class="title">扫码注册成为会员</div>
</div> </div>
...@@ -46,16 +53,29 @@ ...@@ -46,16 +53,29 @@
<img class="qrcode" id="image" src="" alt /> <img class="qrcode" id="image" src="" alt />
<div class="qrcodeTip">长按识别二维码</div> <div class="qrcodeTip">长按识别二维码</div>
</div> </div>
</div> </div>
<script> <script>
alert(window.location.href)
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg)
var context = ""
if (r != null)
context = r[2]
reg = null
r = null
return context == null || context == "" || context == "undefined" ? "" : context;
}
// alert(GetQueryString("storeCode"))
const storecode = GetQueryString("storeCode")
$(function () { $(function () {
showQRInfo() showQRInfo()
}); });
const showQRInfo = () => { const showQRInfo = () => {
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`; // let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let storecode = "181" // let storecode = "181"
let pageUri = `pages/user/register/register?storeCode= alert(storecode)
${storecode}`; let pageUri = `pages/user/register/register?storeCode=${storecode}`
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`; let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({ $.ajax({
...@@ -70,6 +90,7 @@ ${storecode}`; ...@@ -70,6 +90,7 @@ ${storecode}`;
} }
}); });
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
this.zcache.userId = this.$route.params.userId; this.zcache.userId = this.$route.params.userId;
this.zReadyGetUserFromId(); this.zReadyGetUserFromId();
this.getAgentAuth(); this.getAgentAuth();
this.zReadySetVoucherList() // this.zReadySetVoucherList()
}, },
mounted() { mounted() {
}, },
...@@ -127,15 +127,15 @@ export default { ...@@ -127,15 +127,15 @@ export default {
}, },
zReadyGetUserFromId() { zReadyGetUserFromId() {
let postData = { let postData = {
param: this.zcache.userId userId: this.zcache.userId
// param: 'ZhouHeQiang'
} }
getUserInfoByUserId(postData) getUserInfoByUserId(postData)
.then(res => { .then(res => {
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data[0])}`); // alert(`--->userInfoFromId: res = ${JSON.stringify(res.data)}`);
this.zcache.userInfo = String(res.data[0].departmentId); // this.zcache.userInfo = String(res.data[0].departmentId);
// storeId 暂时写死 // storeId 暂时写死
this.zcache.storeId = 1; alert(res.data[0])
this.zcache.storeId = res.data[0]
// this.zcache.storeId = Number(res.data[0].stall); // this.zcache.storeId = Number(res.data[0].stall);
this.zReadySetVoucherList(); this.zReadySetVoucherList();
}) })
...@@ -143,16 +143,12 @@ export default { ...@@ -143,16 +143,12 @@ export default {
}, },
// 获取优惠券列表 // 获取优惠券列表
zReadySetVoucherList() { zReadySetVoucherList() {
// alert('获取优惠券')
this.zReadyDelVoucherList(); this.zReadyDelVoucherList();
const postData = { const postData = {
appCode: "0696", // j接口编码 appCode: "0696", // j接口编码
// mdid: this.zcache.storeId mdid: this.zcache.storeId
mdid: 1
} }
getVoucherList(postData).then(res => { getVoucherList(postData).then(res => {
// alert('getVoucherList')
zlog("%c--->VoucherList: RD =", "background: limegreen;", res);
this.zVoucherSet(res.result.coupons); this.zVoucherSet(res.result.coupons);
}) })
.catch(err => { .catch(err => {
...@@ -167,7 +163,7 @@ export default { ...@@ -167,7 +163,7 @@ export default {
this.zcache.now.activeId = String(inActiveId) this.zcache.now.activeId = String(inActiveId)
this.zcache.now.voucherId = String(inVoucherId) this.zcache.now.voucherId = String(inVoucherId)
this.zVoucherUrlDel(); this.zVoucherUrlDel()
const postData = { const postData = {
appCode: "0697", appCode: "0697",
...@@ -179,7 +175,7 @@ export default { ...@@ -179,7 +175,7 @@ export default {
getVoucherWxUrl(postData).then(res => { getVoucherWxUrl(postData).then(res => {
this.zVoucherUrlSet(res.result.link) this.zVoucherUrlSet(res.result.link)
// alert('获取列表成功') alert('获取列表成功')
}); });
}, },
...@@ -250,26 +246,6 @@ export default { ...@@ -250,26 +246,6 @@ export default {
zVoucherUrlDel() { zVoucherUrlDel() {
this.zlist.voucherUrl = ""; this.zlist.voucherUrl = "";
}, },
// testEaPost() {
// let postData = {
// appCode: '0603',
// condType: 1,
// condValue: '138069094',
// };
// ApiEaPost(postData).then(res => {
// console.log(res);
// });
// },
// testEaPost() {
// let postData = {
// appCode: '0606',
// crmActionDate: '2019-12-12'
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
testEaPost() { testEaPost() {
let postData = { let postData = {
...@@ -281,17 +257,6 @@ export default { ...@@ -281,17 +257,6 @@ export default {
}); });
}, },
// testEaPost() {
// let postData = {
// appCode: '0608',
// content: 'text',
// phone: '18801342762',
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
buttonSingleMarketingClick() { buttonSingleMarketingClick() {
// this.$router.push(""); // this.$router.push("");
}, },
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
</div> </div>
</template> </template>
<script> <script>
import { getUserInfoByUserId } from "@/api/sidebar/voucher";
export default { export default {
name: 'register', name: 'register',
data() { data() {
...@@ -25,44 +28,58 @@ ...@@ -25,44 +28,58 @@
dsc: "推荐完成注册,完成会员拉新", dsc: "推荐完成注册,完成会员拉新",
logoUrl: "/mainSale/4.png" logoUrl: "/mainSale/4.png"
} }
] ],
storeCode: ''
} }
}, },
created() { created() {
this.getAgentAuth(); this.zReadyGetUserFromId()
}, this.getAgentAuth()
mounted(){
}, },
methods:{ methods:{
zReadyGetUserFromId() {
alert('获取店铺')
alert(this.$route.params.userId)
// let postData = {
// userId: this.$route.params.userId
// }
let userId = this.$route.params.userId
alert('请求')
getUserInfoByUserId({ userId }).then(res => {
alert('获取成功')
alert(res.data[0])
this.storeCode = res.data[0]
})
.catch(err => {
alert('获取店铺失败')
})
alert('what?')
},
sendMessage(){ sendMessage(){
const url = 'http://www.baidu.com' alert('发消息')
let url = `http://oysales.oywanhao.com/register?storeCode=${this.storeCode}`
alert(url)
wx.invoke( wx.invoke(
"sendChatMessage", "sendChatMessage",
{ {
msgtype: "news", //消息类型,必填 msgtype: "news", //消息类型,必填
news: { news: {
link: "http://oysales.oywanhao.com/register", //H5消息页面url 必填 link: url, //H5消息页面url 必填
title: "注册邀请", //H5消息标题 title: "注册邀请", //H5消息标题
desc: "注册成为欧亚会员", //H5消息摘要 desc: "注册成为欧亚会员", //H5消息摘要
imgUrl: "" //H5消息封面图片URL imgUrl: "" //H5消息封面图片URL
} }
/* news:
{
link: url, //H5消息页面url 必填
title: "", //H5消息标题
desc: "", //H5消息摘要
imgUrl: "", //H5消息封面图片URL
} */
}, },
function(res) { function(res) {
alert('进入发送')
// alert('sendChatMessage') // alert('sendChatMessage')
if (res.err_msg == "sendChatMessage:ok") { if (res.err_msg == "sendChatMessage:ok") {
} else if (res.err_msg != "sendChatMessage:ok") { } else if (res.err_msg != "sendChatMessage:ok") {
} }
} }
); );
} },
} }
} }
</script> </script>
......
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