Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
0399b05a
Commit
0399b05a
authored
Mar 23, 2020
by
xd
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
512b44fc
b886a06a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
436 additions
and
491 deletions
+436
-491
.eslintignore
ybf_admin/.eslintignore
+1
-0
index.html
ybf_wx/public/index.html
+1
-2
4.png
ybf_wx/public/mainSale/4.png
+0
-0
index.html
ybf_wx/public/register/index.html
+75
-0
index.js
ybf_wx/src/router/index.js
+5
-0
aCommon.js
ybf_wx/src/utils/aCommon.js
+17
-20
home.vue
ybf_wx/src/views/home.vue
+210
-386
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+9
-83
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+118
-0
No files found.
ybf_admin/.eslintignore
View file @
0399b05a
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
build/
build/
tests/
tests/
node_modules/
node_modules/
node_modules
# D2CRUD 演示
# D2CRUD 演示
src/views/demo/d2-crud/
src/views/demo/d2-crud/
...
...
ybf_wx/public/index.html
View file @
0399b05a
...
@@ -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>
...
...
ybf_wx/public/mainSale/4.png
0 → 100644
View file @
0399b05a
14.4 KB
ybf_wx/public/register/index.html
0 → 100644
View file @
0399b05a
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
会员拉新
</title>
<script
src=
"../js/jquery-3.4.1.min.js"
></script>
<style>
html
,
body
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
padding
:
0
;
font-size
:
16px
;
color
:
#ffffff
;
}
.register_container
{
height
:
100%
;
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
margin
:
0
;
padding
:
2.5rem
2rem
;
box-sizing
:
border-box
;
text-align
:
center
;
}
.register_titles
.title
{
font-size
:
3rem
;
line-height
:
5rem
;
}
.register_qrcode
#image
{
display
:
inline-block
;
width
:
60%
;
height
:
auto
;
margin
:
3rem
0
;
}
.register_qrcode
.qrcodeTip
{
font-size
:
2rem
;
}
</style>
</head>
<body>
<div
class=
"register_container"
>
<div
class=
"register_titles"
>
<div
class=
"title"
>
扫码注册成为会员
</div>
</div>
<div
class=
"register_qrcode"
>
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
</div>
</div>
<script>
$
(
function
()
{
showQRInfo
()
});
const
showQRInfo
=
()
=>
{
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let
storecode
=
"181"
let
pageUri
=
`pages/user/register/register?storeCode=
${
storecode
}
`
;
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
pageUri
}
`
;
$
.
ajax
({
type
:
"POST"
,
url
:
pageUrl
,
data
:
{},
success
:
function
(
res
)
{
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
},
error
:
function
(
data
)
{
}
});
}
</script>
</body>
</html>
ybf_wx/src/router/index.js
View file @
0399b05a
...
@@ -42,6 +42,11 @@ const routes = [
...
@@ -42,6 +42,11 @@ const routes = [
name
:
'Discount'
,
name
:
'Discount'
,
component
:
()
=>
import
(
'@/views/sideNav/discount/index'
)
component
:
()
=>
import
(
'@/views/sideNav/discount/index'
)
},
},
{
path
:
'/invite'
,
name
:
'register'
,
component
:
()
=>
import
(
'@/views/sideNav/register/index'
)
},
{
{
path
:
'/mainSale'
,
path
:
'/mainSale'
,
name
:
'MainSale'
,
name
:
'MainSale'
,
...
...
ybf_wx/src/utils/aCommon.js
View file @
0399b05a
...
@@ -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
)
...
@@ -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
=>
{
...
@@ -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
;
}
}
}
}
...
@@ -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'
)
...
...
ybf_wx/src/views/home.vue
View file @
0399b05a
<
template
>
<
template
>
<!--
<div>
<button
@
click=
"disClick"
>
discount
</button>
<button
@
click=
"mainSaleClick"
>
mainSale
</button>
但事实上所所所你吧nnnnn
</div>
-->
<div
class=
"main"
>
<div
class=
"main"
>
<!--
<div
class=
"tops"
></div>
-->
<div
class=
"lists"
>
<div
class=
"lists"
>
<!--
<div
v-if=
"this.$route.query.code !== undefined"
style=
"font-size: 14px;"
>
Code:
{{
this
.
$route
.
query
.
code
}}
</div>
-->
<div
v-for=
"(item, index) of list.main"
:key=
"index"
>
<div
v-for=
"(item, index) of list.main"
:key=
"index"
>
<div
class=
"list"
@
click=
"listClick(item.redirect)"
>
<div
class=
"list"
@
click=
"listClick(item.redirect)"
>
<div>
<div>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
</div>
<div
class=
"list-infos"
>
<div
class=
"list-infos"
>
<div
class=
"list-info-title"
>
{{
item
.
name
}}
</div>
<div
class=
"list-info-title"
>
{{
item
.
name
}}
</div>
...
@@ -21,38 +12,19 @@
...
@@ -21,38 +12,19 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<button
class=
"testButton"
@
click=
"zTestPreAuthCode"
>
preAuthCodeUrl
</button>
<div
class=
"fkwindow"
>
{{
zcache
.
preAuthCodeUrl
}}
</div>
-->
<!--
<button
class=
"testButton"
@
click=
"zTestGetNowUrlInfo"
>
nowUrlInfo
</button>
<div
class=
"fkwindow"
>
{{
zcache
.
nowUrl
}}
</div>
-->
<!--
<button
class=
"testButton"
@
click=
"zTestGetUserInfoByOldToken"
>
GetUserInfoByOldToken
</button>
<div
class=
"fkwindow"
>
{{
zcache
.
userInfoResOld
}}
</div>
-->
<!--
<button
class=
"testButton"
@
click=
"zTestGetUserInfoByNewToken"
>
GetUserInfoByNewToken
</button>
-->
<!--
<button
class=
"testButton"
@
click=
"zTestGetUserInfoByNewToken"
>
RES
</button>
-->
<!--
<div
style=
"border:1px solid limegreen;padding:4px;height: 100px; width: 100%; overflow: auto; font-size:14px;word-wrap:break-word;"
>
{{
zcache
.
userInfoResNew
}}
</div>
-->
</div>
</div>
<!--
<div
class=
"menus"
>
<div
class=
"menu"
@
click=
"buttonMainMarketingClick"
>
精准营销
</div>
<div
class=
"menu activeMenu"
@
click=
"buttonSingleMarketingClick"
>
一对一营销侧边栏
</div>
</div>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ApiTestCfPost
,
ApiTestEaPost
}
from
"@/api/test/test"
;
import
{
ApiTestCfPost
,
ApiTestEaPost
}
from
"@/api/test/test"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
*
as
APIHome
from
"@/api/sidebar/home"
;
import
*
as
APIHome
from
"@/api/sidebar/home"
;
import
axios
from
"axios"
;
import
axios
from
"axios"
;
const
zlog
=
console
.
log
.
bind
(
console
);
export
default
{
const
zlog
=
console
.
log
.
bind
(
console
);
export
default
{
name
:
"home"
,
name
:
"home"
,
data
()
{
data
()
{
return
{
return
{
...
@@ -68,24 +40,27 @@ export default {
...
@@ -68,24 +40,27 @@ export default {
main
:
[
main
:
[
{
{
name
:
"顾客画像"
,
name
:
"顾客画像"
,
dsc
:
dsc
:
"欧亚会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
"亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
redirect
:
"ManInfo"
,
redirect
:
"ManInfo"
,
logoUrl
:
"/mainSale/1.png"
logoUrl
:
"/mainSale/1.png"
},
},
{
{
name
:
"优惠券推送"
,
name
:
"优惠券推送"
,
dsc
:
dsc
:
"欧亚会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
"亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
redirect
:
"Discount"
,
redirect
:
"Discount"
,
logoUrl
:
"/mainSale/2.png"
logoUrl
:
"/mainSale/2.png"
},
},
{
{
name
:
"爆品推送"
,
name
:
"爆品推送"
,
dsc
:
dsc
:
"欧亚会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
"亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点"
,
redirect
:
"GoodPost"
,
redirect
:
"GoodPost"
,
logoUrl
:
"/mainSale/3.png"
logoUrl
:
"/mainSale/3.png"
},
{
name
:
"营销工具箱"
,
dsc
:
"欧亚营销工具箱,通过营销工具箱可以为营业员提供更多的在线营销工具"
,
redirect
:
"register"
,
logoUrl
:
"/mainSale/4.png"
}
}
]
]
}
}
...
@@ -96,13 +71,8 @@ export default {
...
@@ -96,13 +71,8 @@ export default {
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetNowUrlInfo
();
},
},
created
()
{
created
()
{
// alert(`--->home: created.`)
// this.zReadyUserId()
// this.zReadyUserId();
// this.zTestGetNowUrlInfo();
},
},
methods
:
{
methods
:
{
// 判断是否有code
zReadyUserId
()
{
zReadyUserId
()
{
zlog
(
zlog
(
"%c--->this.zcache.code ="
,
"%c--->this.zcache.code ="
,
...
@@ -110,32 +80,22 @@ export default {
...
@@ -110,32 +80,22 @@ export default {
this
.
$route
.
query
.
code
this
.
$route
.
query
.
code
);
);
if
(
this
.
$route
.
query
.
code
===
undefined
)
{
if
(
this
.
$route
.
query
.
code
===
undefined
){
this
.
zTestPreAuthCode
();
this
.
zTestPreAuthCode
()
}
else
{
}
else
{
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetUserInfoByOldToken
();
this
.
zTestGetUserInfoByOldToken
();
}
}
// if(this.zcache.code === "") {
// this.zTestGetUserInfoByOldToken()
// } else {
// this.zTestPreAuthCode()
// }
},
},
// 测试-获取当前Url信息
// 测试-获取当前Url信息
zTestGetNowUrlInfo
()
{
zTestGetNowUrlInfo
()
{
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
// alert(`--->nowUrl and code =${this.zcache.nowUrl}`)
zlog
(
"%c--->zTestGetNowUrlInfo: "
,
"color: orange;"
,
this
.
zcache
.
nowUrl
);
zlog
(
"%c--->zTestGetNowUrlInfo: "
,
"color: orange;"
,
this
.
zcache
.
nowUrl
);
},
},
// 测试-获取预授权码
// redirectUrI: encodeURIComponent(location.href.split('#')[0]),
zTestPreAuthCode
()
{
zTestPreAuthCode
()
{
// alert(`--->home: zTestPreAuthCode: IN.`)
const
basicInfo
=
{
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
// appId: "wwd1cdbca7b8b2b6c4",
...
@@ -172,125 +132,36 @@ export default {
...
@@ -172,125 +132,36 @@ export default {
code
:
this
.
zcache
.
code
,
code
:
this
.
zcache
.
code
,
};
};
let
headerData
=
{
let
headerData
=
{
// agentId: "1000015",
// corpId: "wwd1cdbca7b8b2b6c4"
agentId
:
"1000032"
,
agentId
:
"1000032"
,
corpId
:
"ww4df265003b43fa0d"
corpId
:
"ww4df265003b43fa0d"
};
};
// url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo",
// headers: header,
// alert(
// `--->home.vue: zTestGetUserInfoByOldToken: postData =${JSON.stringify(
// postData
// )}`
// );
// alert(
// `--->home.vue: zTestGetUserInfoByOldToken: headerData =${JSON.stringify(
// headerData
// )}`
// );
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
);
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
);
axios
({
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
this
.
zcache
.
code
,
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
this
.
zcache
.
code
,
method
:
"post"
,
method
:
"post"
,
headers
:
headerData
,
headers
:
headerData
,
// data: postData
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
// alert(`--->home.vue: zTestGetUserInfoByOldToken: axios: res.`);
// alert(
// `--->home.vue: zTestGetUserInfoByOldToken: axios: res =${JSON.stringify(
// res
// )}`
// );
// this.zcache.userInfoResNew = "RESOK:" + JSON.stringify(res.data);
// 一些用户信息
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
// alert(`--->home.vue: zTestGetUserInfoByOldToken: axios: err.`);
// alert(
// `--->home.vue: zTestGetUserInfoByOldToken: axios: res =${JSON.stringify(
// err
// )}`
// );
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
});
});
},
},
zTestGetUserInfoByNewToken
()
{
// let basicInfo = {
// token: sessionStorage.getItem("XToken"),
// code: this.$route.query
// };
// getUserInfo()
// .then(res => {
// zlog('%c--->getUserInfo: res =', 'background: red;')
// })
// let token =
// "2CjH4hx8dtY_uQYjRggRk0NxtuBrpYC9Z7kqytWgys2AlIUWzCFEGeYfVCM3Ywq16M-WA7n7oMWMNMJl8JXxEgiTNIsil-Z7YzoDoeVaoilwIaukTBfppmkqQZd7uxfxK8I5CDXDB2GtZI_ufke6ln9n30vfq7p6Q8BzBplmoRLXR21qLgVmcfEcaHO0UbcnVTyHStG0FVad-dZY_AsJ-g";
// let code = this.zcache.code;
// let url = `https://qyapi.weixin.qq.com/cgi-bin/service/getuserinfo3rd?suite_access_token=${token}&code=${code}`;
// axios
// .get(url)
// .then(function(res) {
// zcache("$c--->axios: res.", "background: red.");
// this.zcache.userInfoResNew = JSON.stringify(res);
// })
// .catch(function(err) {
// zcache("$c--->axios: err.", "background: red.");
// });
},
// disClick() {
// this.$router.push("Discount");
// },
// mainSaleClick() {
// this.$router.push("MainSale");
// },
listClick
(
inData
)
{
listClick
(
inData
)
{
// this.$router.push(inData);
// this.$router.push({name: inData, transData: {userId: this.zcache.code}})
// alert(`--->listClick: IN.`)
// alert(`--->listClick: indata =${inData}. userId =${this.zcache.userId}`)
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
inData
,
name
:
inData
,
params
:
{
userId
:
this
.
zcache
.
userId
}
params
:
{
userId
:
this
.
zcache
.
userId
}
});
});
// this.$router.push({name: inData, params: {userId: 'SEGA'}})
},
buttonSingleMarketingClick
()
{
// this.$router.push("");
},
},
buttonMainMarketingClick
()
{
this
.
$router
.
push
(
"MainSale"
);
},
testButton
(
inCode
)
{},
// 获取店铺Id
getStoreId
()
{
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"scss"
>
/* button {
.main
{
border: 1px solid gray;
margin: 2px;
border-radius: 4px;
padding: 4px;
} */
.main
{
background-color
:
white
;
background-color
:
white
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
@@ -299,12 +170,11 @@ export default {
...
@@ -299,12 +170,11 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
start
;
justify-content
:
start
;
overflow
:
scroll
;
overflow
:
scroll
;
}
}
.lists
{
/* border: 2px solid red; */
.lists
{
height
:
auto
;
height
:
auto
;
padding
:
4px
12px
;
padding
:
4px
12px
;
/* margin-bottom: 20px; */
padding-bottom
:
40px
;
padding-bottom
:
40px
;
display
:
flex
;
display
:
flex
;
...
@@ -312,10 +182,10 @@ export default {
...
@@ -312,10 +182,10 @@ export default {
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
align-items
:
flex-start
;
overflow
:
scroll
;
overflow
:
scroll
;
}
}
.list
{
.list
{
height
:
140px
;
height
:
140px
;
/* border: 2px solid orange; */
box-shadow
:
0px
2px
4px
0px
rgb
(
187
,
187
,
187
);
box-shadow
:
0px
2px
4px
0px
rgb
(
187
,
187
,
187
);
margin
:
6px
0px
;
margin
:
6px
0px
;
padding
:
0px
12px
;
padding
:
0px
12px
;
...
@@ -325,16 +195,17 @@ export default {
...
@@ -325,16 +195,17 @@ export default {
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.list-logo
{
.list-logo
{
/* border: 1px solid red; */
/* border: 1px solid red; */
width
:
100px
;
width
:
100px
;
height
:
100px
;
height
:
100px
;
border-radius
:
6px
;
border-radius
:
6px
;
}
}
.list-infos
{
.list-infos
{
/* border: 1px solid orange; */
/* border: 1px solid orange; */
width
:
100
;
height
:
100px
;
height
:
100px
;
padding-left
:
12px
;
padding-left
:
12px
;
...
@@ -342,16 +213,18 @@ export default {
...
@@ -342,16 +213,18 @@ export default {
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
align-items
:
flex-start
;
}
}
.list-info-title
{
.list-info-title
{
width
:
100%
;
width
:
100%
;
height
:
18px
;
height
:
18px
;
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
bold
;
font-weight
:
bold
;
line-height
:
18px
;
line-height
:
18px
;
}
}
.list-info-dsc
{
.list-info-dsc
{
margin-top
:
6px
;
margin-top
:
6px
;
width
:
100%
;
width
:
100%
;
height
:
16px
;
height
:
16px
;
...
@@ -359,54 +232,5 @@ export default {
...
@@ -359,54 +232,5 @@ export default {
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
normal
;
font-weight
:
normal
;
line-height
:
18px
;
line-height
:
18px
;
}
}
.menus
{
border-top
:
1px
solid
rgb
(
194
,
194
,
194
);
position
:
fixed
;
bottom
:
0px
;
left
:
0px
;
width
:
100%
;
height
:
50px
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
start
;
align-items
:
center
;
}
.menu
{
/* border: 1px solid red; */
height
:
50px
;
/* width: 120px; */
width
:
50%
;
line-height
:
50px
;
text-align
:
center
;
font-size
:
14px
;
color
:
black
;
}
.activeMenu
{
color
:
lightcoral
;
}
</
style
>
<
style
scoped
>
.testButton
{
border
:
1px
solid
red
;
/* width: 140px; */
width
:
auto
;
font-size
:
14px
;
margin-top
:
4px
;
padding-bottom
:
4px
;
}
.fkwindow
{
border
:
1px
solid
limegreen
;
padding
:
4px
;
height
:
100px
;
width
:
100%
;
overflow
:
auto
;
font-size
:
14px
;
word-wrap
:
break-word
;
}
</
style
>
</
style
>
ybf_wx/src/views/sideNav/discount/index.vue
View file @
0399b05a
<
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>
-->
<div
v-for=
"item of zlist.voucher"
:key=
"item.coupon_id"
>
<!--
<div
class=
"lists"
>
<div
v-if=
"zlist.voucherUrl !== ''"
class=
"voucherUrl"
>
<div
@
click=
"zpick"
>
小程序Url:
{{
zlist
.
voucherUrl
}}
</div>
</div>
</div>
-->
</div>
<!--@click="zVoucherPick(item.action_id, 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))"
>
-->
<!-- <!–
<div
@
click=
"zpick"
>
小程序Url:
{{
String
(
zlist
.
voucherUrl
).
slice
(
-
2
)
}}
</div>
–>
-->
<!--
<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"
>
-->
<!-- <!–
<div
@
click=
"zpick"
>
小程序Url:
{{
String
(
zlist
.
voucherUrl
).
slice
(
-
2
)
}}
</div>
–>
-->
<!--
<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
=>
{
...
@@ -266,9 +191,10 @@ export default {
...
@@ -266,9 +191,10 @@ export default {
},
},
zpick
(
inMsgType
,
inUrl
)
{
zpick
(
inMsgType
,
inUrl
)
{
alert
(
`--->discount.vue: zpick: IN.`
);
//
alert(`--->discount.vue: zpick: IN.`);
switch
(
inMsgType
)
{
switch
(
inMsgType
)
{
case
"text"
:
case
"text"
:
wx
.
invoke
(
wx
.
invoke
(
"sendChatMessage"
,
"sendChatMessage"
,
...
@@ -290,7 +216,7 @@ export default {
...
@@ -290,7 +216,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"
,
...
@@ -305,12 +231,12 @@ export default {
...
@@ -305,12 +231,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}`
);
//
);
}
}
}
}
);
);
...
...
ybf_wx/src/views/sideNav/register/index.vue
0 → 100644
View file @
0399b05a
<
template
>
<div
class=
"register_container"
>
<div
v-for=
"(item, index) of list"
:key=
"index"
>
<div
class=
"list"
>
<div>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
<div
class=
"list-infos"
>
<div
class=
"list-info-title"
>
{{
item
.
name
}}
</div>
<div
class=
"list-info-dsc"
>
{{
item
.
dsc
}}
</div>
</div>
<button
class=
"button-send"
@
click=
"sendMessage"
>
邀请
</button>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'register'
,
data
()
{
return
{
list
:[
{
name
:
"会员拉新"
,
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
]
}
},
created
()
{
this
.
getAgentAuth
();
},
mounted
(){
},
methods
:{
sendMessage
(){
wx
.
invoke
(
"sendChatMessage"
,
{
msgtype
:
"text"
,
//消息类型,必填
news
:
{
link
:
`http://qywx2.100smartdata.com/register`
,
//H5消息页面url 必填
title
:
"会员拉新"
,
//H5消息标题
desc
:
'注册成为欧亚会员'
,
//H5消息摘要
imgUrl
:
""
//H5消息封面图片URL
}
},
function
(
res
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
// alert("--->register.vue: zpick: h5 分享成功!");
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
// alert(`--->register.vue: zpick: h5 分享失败.`);
}
}
);
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.register_container
{
padding
:
4px
12px
40px
12px
;
.list
{
height
:
140px
;
box-shadow
:
0px
2px
4px
0px
rgb
(
187
,
187
,
187
);
margin
:
6px
0px
;
padding
:
0px
12px
;
border-radius
:
6px
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
.list-logo
{
width
:
80px
;
height
:
80px
;
border-radius
:
6px
;
}
.list-infos
{
height
:
80px
;
padding-left
:
12px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
}
.list-info-title
{
width
:
100%
;
height
:
18px
;
font-size
:
16px
;
font-weight
:
bold
;
line-height
:
18px
;
}
.list-info-dsc
{
margin-top
:
6px
;
width
:
100%
;
height
:
16px
;
font-size
:
12px
;
font-weight
:
normal
;
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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment