Commit b886a06a authored by xulili's avatar xulili

去掉注释和弹窗

parent 581a9b8a
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>亿百分</title> <title>亿百分</title>
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script> <script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
......
...@@ -66,10 +66,7 @@ ${storecode}`; ...@@ -66,10 +66,7 @@ ${storecode}`;
$('#image').attr('src', res.data) $('#image').attr('src', res.data)
}, },
error: function (data) { error: function (data) {
alert(`--->qrCode: ajax: err.`)
alert(`--->qrCode: ajax: err: err =${JSON.stringify(err)}`)
alert('error' + JSON.stringify(data))
console.log(data);
} }
}); });
} }
......
...@@ -43,7 +43,7 @@ const routes = [ ...@@ -43,7 +43,7 @@ const routes = [
component: () => import('@/views/sideNav/discount/index') component: () => import('@/views/sideNav/discount/index')
}, },
{ {
path: '/register', path: '/invite',
name: 'register', name: 'register',
component: () => import('@/views/sideNav/register/index') component: () => import('@/views/sideNav/register/index')
}, },
......
...@@ -28,10 +28,10 @@ async function getXToken() { ...@@ -28,10 +28,10 @@ async function getXToken() {
} else { } else {
console.log('%c--->getXToken: N/A. ', 'background: red;') console.log('%c--->getXToken: N/A. ', 'background: red;')
this.$message({ // this.$message({
message: res.errorMsg, // message: res.errorMsg,
type: 'error' // type: 'error'
}) // })
} }
}).catch(err => { }).catch(err => {
console.log('!==>getXToken: err:', err) console.log('!==>getXToken: err:', err)
...@@ -84,7 +84,7 @@ Vue.prototype.getAgentAuth = function () { ...@@ -84,7 +84,7 @@ Vue.prototype.getAgentAuth = function () {
let config = res.data let config = res.data
wx.config({ wx.config({
beta: true, beta: true,
debug: true, //调试的时候可以开启 debug: false, //调试的时候可以开启
appId: config.jsApiSignature.appId, // 必填,公众号的唯一标识 appId: config.jsApiSignature.appId, // 必填,公众号的唯一标识
timestamp: config.jsApiSignature.timestamp, // 必填,生成签名的时间戳 timestamp: config.jsApiSignature.timestamp, // 必填,生成签名的时间戳
nonceStr: config.jsApiSignature.nonceStr, // 必填,生成签名的随机串 nonceStr: config.jsApiSignature.nonceStr, // 必填,生成签名的随机串
...@@ -100,7 +100,7 @@ Vue.prototype.getAgentAuth = function () { ...@@ -100,7 +100,7 @@ Vue.prototype.getAgentAuth = function () {
// JS-SDK配置信息验证失败时会进入此方法 // JS-SDK配置信息验证失败时会进入此方法
wx.error(function (res) { wx.error(function (res) {
alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res)); // alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res));
}) })
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口 // 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
...@@ -108,11 +108,8 @@ Vue.prototype.getAgentAuth = function () { ...@@ -108,11 +108,8 @@ Vue.prototype.getAgentAuth = function () {
{ {
jsApiList: ['agentConfig', 'sendChatMessage'], jsApiList: ['agentConfig', 'sendChatMessage'],
success: function (res) { success: function (res) {
// alert(`--->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: success.`)
// alert(`--->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: success. res =${JSON.stringify(res)}`)
if (res.errMsg != "checkJsApi:ok") { if (res.errMsg != "checkJsApi:ok") {
alert("JS-SDK接口检测失败:" + JSON.stringify(res)); // alert("JS-SDK接口检测失败:" + JSON.stringify(res));
return false; return false;
} else { } else {
wxRequest('/workWx/auth/base/getAgentJsSdkSignature', qs.stringify(postData), header) wxRequest('/workWx/auth/base/getAgentJsSdkSignature', qs.stringify(postData), header)
...@@ -160,10 +157,10 @@ Vue.prototype.getAgentAuth = function () { ...@@ -160,10 +157,10 @@ Vue.prototype.getAgentAuth = function () {
) )
}) })
} else { } else {
this.$message({ // this.$message({
type: 'error', // type: 'error',
message: res.errorMsg // message: res.errorMsg
}) // })
} }
}) })
.catch(err => { .catch(err => {
...@@ -189,10 +186,10 @@ function configWx(to) { ...@@ -189,10 +186,10 @@ function configWx(to) {
let config = res.data let config = res.data
wx.config({ wx.config({
beta: true, beta: true,
debug: true, //调试的时候可以开启 debug: false, //调试的时候可以开启
appId: config.jsApiSignature.appId, // 必填,公众号的唯一标识 appId: config.jsApiSignature.appId, // 必填,公众号的唯一标识
timestamp: config.jsApiSignature.timestamp, // 必填,生成签名的时间戳 timestamp: config.jsApiSignature.timestamp, // 必填,生成签名的时间戳
nonceStr: config.jsApiSignature.nonceStr, // 必填,生成签名的随机串 nonceStr: config.jsApiSignature.nonceStr, // 必填,生成签名的随机串
signature: config.jsApiSignature.signature, // 必填,签名 signature: config.jsApiSignature.signature, // 必填,签名
// 根据自己的需求,填写 jsapilist 内容 // 根据自己的需求,填写 jsapilist 内容
jsApiList: ['agentConfig', 'getCurExternalContact'] jsApiList: ['agentConfig', 'getCurExternalContact']
...@@ -210,7 +207,7 @@ function configWx(to) { ...@@ -210,7 +207,7 @@ function configWx(to) {
// router.push(to) // router.push(to)
if (res.errMsg != "checkJsApi:ok") { if (res.errMsg != "checkJsApi:ok") {
alert("JS-SDK接口检测失败:" + JSON.stringify(res)); // alert("JS-SDK接口检测失败:" + JSON.stringify(res));
return false; return false;
} }
} }
...@@ -236,7 +233,7 @@ function configWx(to) { ...@@ -236,7 +233,7 @@ function configWx(to) {
signature: agentConfig.agentJsApiSignature.signature,// 必填,签名,agentConfig所以为应用签名 signature: agentConfig.agentJsApiSignature.signature,// 必填,签名,agentConfig所以为应用签名
jsApiList: ['getCurExternalContact'], //必填 jsApiList: ['getCurExternalContact'], //必填
success: function (res) { success: function (res) {
// alert('agentConfig:ok') // alert('agentConfig:ok')
// alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: res =${res}`) // alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: res =${res}`)
// alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: to =${JSON.stringify(to)}`) // alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: to =${JSON.stringify(to)}`)
sessionStorage.setItem('zConfigWx', 'Pass') sessionStorage.setItem('zConfigWx', 'Pass')
...@@ -265,10 +262,10 @@ function configWx(to) { ...@@ -265,10 +262,10 @@ function configWx(to) {
}) })
}) })
} else { } else {
this.$message({ // this.$message({
type: 'error', // type: 'error',
message: res.errorMsg // message: res.errorMsg
}) // })
} }
}).catch(err => { }).catch(err => {
console.log(err, 'err') console.log(err, 'err')
......
<template> <template>
<div class="main"> <div class="main">
<!-- <div class="tops"></div> -->
<div class="contents"> <div class="contents">
<!-- <div style="font-size: 12px;">userId={{zcache.userId}}</div> -->
<!-- <div style="font-size: 12px;">storeId={{zcache.userInfo}}</div> -->
<div class="zListActive"> <div class="zListActive">
<div class="inputs"> <div class="inputs">
<!-- <div class="button" @click="zTest">Redirect</div>
<div class="button" @click="zReadyDelVoucherList">Clear</div>-->
<div class="button" @click="zReadySetVoucherList">ReLoad</div> <div class="button" @click="zReadySetVoucherList">ReLoad</div>
</div> </div>
<!-- <div class="lists">
<div
class="item"
v-for="item in zlist.voucher"
:key="item.coupon_id"
@click="zVoucherPick(item.action_id, item.coupon_id)"
>
<div>优惠券ID: {{ item.coupon_id }}</div>
<div>活动ID: {{ item.action_id }}</div>
<div>活动标题: {{ item.coupon_title }}</div>
<div>活动列表: {{ item.coupon_link }}</div>
</div>
</div>-->
<!-- <div class="lists">
<div v-if="zlist.voucherUrl !== ''" class="voucherUrl">
<div @click="zpick">小程序Url: {{ zlist.voucherUrl }}</div>
</div>
</div>-->
</div> </div>
<!--@click="zVoucherPick(item.action_id, item.coupon_id)"--> <div v-for="item of zlist.voucher" :key="item.coupon_id" >
<div
v-for="item of zlist.voucher"
:key="item.coupon_id"
>
<div class="content"> <div class="content">
<div class="content-imgs"> <div class="content-imgs">
<img class="imgs-img" :src="zcache.defaultImgUrl" alt /> <img class="imgs-img" :src="zcache.defaultImgUrl" alt />
...@@ -56,38 +28,7 @@ ...@@ -56,38 +28,7 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div class="zListActive">-->
<!-- <div class="lists">-->
<!-- <div v-if="zlist.voucherUrl !== ''" class="voucherUrl" @click="zpick('h5', String(zlist.voucherUrl))">-->
<!-- &lt;!&ndash; <div @click="zpick">小程序Url:{{ String(zlist.voucherUrl).slice(-2) }}</div> &ndash;&gt;-->
<!-- <div>小程序Url:{{ String(zlist.voucherUrl).slice(-2) }}</div>-->
<!-- <div>{{ zlist.voucherUrl }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--<div class="zListActive">-->
<!-- <div class="lists">-->
<!-- <div v-if="zlist.voucherUrl !== ''" class="voucherUrl">-->
<!-- &lt;!&ndash; <div @click="zpick">小程序Url:{{ String(zlist.voucherUrl).slice(-2) }}</div> &ndash;&gt;-->
<!-- <div>小程序Url:{{ String(zlist.voucherUrl).slice(-2) }}</div>-->
<!-- <div-->
<!-- v-if="String(zlist.voucherUrl).slice(-2) === '97'"-->
<!-- @click="zpick('h5', String(zlist.voucherUrl))"-->
<!-- >{{ zlist.voucherUrl }}</div>-->
<!-- <div-->
<!-- v-if="String(zlist.voucherUrl).slice(-2) !== '97'"-->
<!-- @click="zpick('h5', String(zlist.voucherUrl))"-->
<!-- >{{ zlist.voucherUrl }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
</div> </div>
<!-- <div class="menus">
<div class="menu" @click="buttonMainMarketingClick">精准营销</div>
<div class="menu activeMenu" @click="buttonSingleMarketingClick">一对一营销侧边栏</div>
</div> -->
</div> </div>
</template> </template>
...@@ -147,18 +88,11 @@ export default { ...@@ -147,18 +88,11 @@ export default {
}; };
}, },
created() { created() {
zlog("%c--->Created.", "color: orange");
// alert(`--->discount: IN.`);
// configWx()
this.zcache.userId = this.$route.params.userId; this.zcache.userId = this.$route.params.userId;
// zlog('%c--->userId =', this.zcache.userId)
this.zReadyGetUserFromId(); this.zReadyGetUserFromId();
// this.zReadySetVoucherList();
this.getAgentAuth(); this.getAgentAuth();
}, },
mounted() { mounted() {
// zlog("%c--->Mounted.", "color: orange");
// this.getAgentAuth();
}, },
methods: { methods: {
// 测试-获取预授权码 // 测试-获取预授权码
...@@ -187,23 +121,14 @@ export default { ...@@ -187,23 +121,14 @@ export default {
"&state=" + "&state=" +
basicInfo.state + basicInfo.state +
basicInfo.tail; basicInfo.tail;
zlog("%c--->zTestPreAuthCode: Url =", "background: orange", url); zlog("%c--->zTestPreAuthCode: Url =", "background: orange", url);
// window.location.href = url // window.location.href = url
}, },
// 测试-测试函数调用
zTest() {
this.zTestPreAuthCode();
},
zReadyGetUserFromId() { zReadyGetUserFromId() {
let postData = { let postData = {
param: this.zcache.userId param: this.zcache.userId
// param: 'ZhouHeQiang' // param: 'ZhouHeQiang'
}; };
// alert(`--->userInfoFromId: postData = ${JSON.stringify(postData)}`); // alert(`--->userInfoFromId: postData = ${JSON.stringify(postData)}`);
getUserInfoByUserId(postData) getUserInfoByUserId(postData)
.then(res => { .then(res => {
...@@ -264,7 +189,7 @@ export default { ...@@ -264,7 +189,7 @@ export default {
}, },
zpick(inMsgType, inUrl) { zpick(inMsgType, inUrl) {
alert(`--->discount.vue: zpick: IN.`); // alert(`--->discount.vue: zpick: IN.`);
switch (inMsgType) { switch (inMsgType) {
...@@ -289,7 +214,7 @@ export default { ...@@ -289,7 +214,7 @@ export default {
); );
break; break;
case "h5": case "h5":
alert(`--->discount.vue: zpick: H5: IN.`); // alert(`--->discount.vue: zpick: H5: IN.`);
wx.invoke( wx.invoke(
"sendChatMessage", "sendChatMessage",
...@@ -304,12 +229,12 @@ export default { ...@@ -304,12 +229,12 @@ export default {
}, },
function(res) { function(res) {
if (res.err_msg == "sendChatMessage:ok") { if (res.err_msg == "sendChatMessage:ok") {
alert("--->discount.vue: zpick: h5 分享成功!"); // alert("--->discount.vue: zpick: h5 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") { } else if (res.err_msg != "sendChatMessage:ok") {
alert(`--->discount.vue: zpick: h5 分享失败.`); // alert(`--->discount.vue: zpick: h5 分享失败.`);
alert( // alert(
`--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}` // `--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}`
); // );
} }
} }
); );
......
<template> <template>
<div class="register_container"> <div class="register_container">
<div v-for="(item, index) of list" :key="index" @click="sendMessage"> <div v-for="(item, index) of list" :key="index" >
<div class="list"> <div class="list">
<div> <div>
<img class="list-logo" :src="item.logoUrl" alt/> <img class="list-logo" :src="item.logoUrl" alt/>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<div class="list-info-title">{{item.name}}</div> <div class="list-info-title">{{item.name}}</div>
<div class="list-info-dsc">{{item.dsc}}</div> <div class="list-info-dsc">{{item.dsc}}</div>
</div> </div>
<button class="button-send" @click="sendMessage">邀请</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -21,12 +22,15 @@ ...@@ -21,12 +22,15 @@
list:[ list:[
{ {
name: "会员拉新", name: "会员拉新",
dsc: "推送给顾客成为欧亚会员,完成拉新任务", dsc: "推荐完成注册,完成会员拉新",
logoUrl: "/mainSale/4.png" logoUrl: "/mainSale/4.png"
} }
] ]
} }
}, },
created() {
this.getAgentAuth();
},
mounted(){ mounted(){
}, },
...@@ -45,9 +49,9 @@ ...@@ -45,9 +49,9 @@
}, },
function(res) { function(res) {
if (res.err_msg == "sendChatMessage:ok") { if (res.err_msg == "sendChatMessage:ok") {
alert("--->register.vue: zpick: h5 分享成功!"); // alert("--->register.vue: zpick: h5 分享成功!");
} else if (res.err_msg != "sendChatMessage:ok") { } else if (res.err_msg != "sendChatMessage:ok") {
alert(`--->register.vue: zpick: h5 分享失败.`); // alert(`--->register.vue: zpick: h5 分享失败.`);
} }
} }
); );
...@@ -69,12 +73,12 @@ ...@@ -69,12 +73,12 @@
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
.list-logo { .list-logo {
width: 100px; width: 80px;
height: 100px; height: 80px;
border-radius: 6px; border-radius: 6px;
} }
.list-infos { .list-infos {
height: 100px; height: 80px;
padding-left: 12px; padding-left: 12px;
display: flex; display: flex;
...@@ -99,6 +103,16 @@ ...@@ -99,6 +103,16 @@
font-weight: normal; font-weight: normal;
line-height: 18px; line-height: 18px;
} }
.button-send {
border: 0px solid blue;
margin-left: 5px;
height: 40px;
width: 84px;
border-radius: 4px;
background-color: rgba(68, 93, 251, 1);
color: white;
font-size: 16px;
}
} }
} }
</style> </style>
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