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
52a28bce
Commit
52a28bce
authored
Mar 25, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
精准营销获取用户数据为空
parent
c3a89696
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
61 additions
and
63 deletions
+61
-63
index.html
wx_application/public/index.html
+1
-1
aCommon.js
wx_application/src/utils/aCommon.js
+1
-2
index.vue
wx_application/src/views/mainSale/me/main/index.vue
+12
-18
public-class.scss
ybf_admin/src/assets/style/public-class.scss
+0
-9
public.scss
ybf_admin/src/assets/style/public.scss
+9
-0
header.js
ybf_admin/src/menu/header.js
+2
-2
index.vue
ybf_admin/src/pages/goods/main/index.vue
+34
-26
index.vue
ybf_admin/src/pages/in/contact/index.vue
+0
-1
routes.js
ybf_admin/src/router/routes.js
+2
-2
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+0
-2
No files found.
wx_application/public/index.html
View file @
52a28bce
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<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>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.
6
.0.js"
></script>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.
2
.0.js"
></script>
</head>
</head>
<body>
<body>
<noscript>
<noscript>
...
...
wx_application/src/utils/aCommon.js
View file @
52a28bce
...
@@ -20,10 +20,9 @@ async function getXToken() {
...
@@ -20,10 +20,9 @@ async function getXToken() {
}
}
console
.
log
(
'%c--->getXToken: PD ='
,
'background: orange;'
,
postData
)
console
.
log
(
'%c--->getXToken: PD ='
,
'background: orange;'
,
postData
)
await
wxRequest
(
'/workWx/
common/getToken'
,
qs
.
stringify
(
postData
)
).
then
(
res
=>
{
await
wxRequest
(
'/workWx/
auth/oauth2/getAccessToken'
,
qs
.
stringify
(
postData
),
'get'
).
then
(
res
=>
{
if
(
res
.
result
===
'success'
)
{
if
(
res
.
result
===
'success'
)
{
sessionStorage
.
setItem
(
'XToken'
,
res
.
data
)
sessionStorage
.
setItem
(
'XToken'
,
res
.
data
)
console
.
log
(
'%c--->getXToken: RD ='
,
'background: limegreen;'
,
res
)
console
.
log
(
'%c--->getXToken: RD ='
,
'background: limegreen;'
,
res
)
}
else
{
}
else
{
console
.
log
(
'%c--->getXToken: N/A. '
,
'background: red;'
)
console
.
log
(
'%c--->getXToken: N/A. '
,
'background: red;'
)
...
...
wx_application/src/views/mainSale/me/main/index.vue
View file @
52a28bce
<
template
>
<
template
>
<div
class=
"main"
>
<div
class=
"main"
>
<div>
1111
{{
href
}
<
/div
>
<div
class=
"backgrounds"
>
<div
class=
"backgrounds"
>
<img
class=
"background-img"
:src=
"cache.icon.testImg"
/>
<img
class=
"background-img"
:src=
"cache.icon.testImg"
/>
</div>
</div>
<div
class=
"infos"
>
<div
class=
"infos"
>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"info-logos"
>
<div
class=
"info-logos"
>
...
@@ -35,10 +33,11 @@
...
@@ -35,10 +33,11 @@
<div
class=
"list-title"
>
任务列表
</div>
<div
class=
"list-title"
>
任务列表
</div>
<img
class=
"list-icon"
:src=
"cache.icon.arrowRightDark"
/>
<img
class=
"list-icon"
:src=
"cache.icon.arrowRightDark"
/>
</div>
</div>
<div
class=
"list"
><span>
111
</span><span>
{{
userInfo
}}
</span></div>
<div
class=
"list list-latest"
>
<div
class=
"list list-latest"
>
<div
class=
"list-title"
>
我的收益
</div>
<div
class=
"list-title"
>
我的收益
</div>
<img
class=
"list-icon"
:src=
"cache.icon.arrowRightDark"
/>
<img
class=
"list-icon"
:src=
"cache.icon.arrowRightDark"
/>
<
/div
>
</div>
</div>
</div>
<div
class=
"main-menuBar"
>
<div
class=
"main-menuBar"
>
...
@@ -52,7 +51,7 @@
...
@@ -52,7 +51,7 @@
</div>
</div>
<div
class=
"menuBar-menu"
@
click=
"menuProfit()"
>
<div
class=
"menuBar-menu"
@
click=
"menuProfit()"
>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['3']"
/>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['3']"
/>
<
div
class
=
"menuBar-title"
>
收益
<
/div
>
<div
class=
"menuBar-title
menuBar-title-ac
"
>
收益
</div>
</div>
</div>
<div
class=
"menuBar-menu"
@
click=
"menuTask()"
>
<div
class=
"menuBar-menu"
@
click=
"menuTask()"
>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['4']"
/>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['4']"
/>
...
@@ -60,7 +59,7 @@
...
@@ -60,7 +59,7 @@
</div>
</div>
<div
class=
"menuBar-menu"
@
click=
"menuBarClick('Me')"
>
<div
class=
"menuBar-menu"
@
click=
"menuBarClick('Me')"
>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['5']"
/>
<img
class=
"menuBar-icon"
:src=
"menuBarInfo.icon.now['5']"
/>
<
div
class
=
"menuBar-title
menuBar-title-ac
"
>
我的
<
/div
>
<div
class=
"menuBar-title"
>
我的
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -80,7 +79,7 @@ export default {
...
@@ -80,7 +79,7 @@ export default {
arrowRightDark
:
"/mainSale/icon-arrow-right-dark.png"
arrowRightDark
:
"/mainSale/icon-arrow-right-dark.png"
}
}
},
},
href
:
''
,
userInfo
:
''
,
menuBarInfo
:
{
menuBarInfo
:
{
list
:
{
list
:
{
main
:
[
main
:
[
...
@@ -126,8 +125,8 @@ export default {
...
@@ -126,8 +125,8 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
checkNowMenuBar
();
/* alert('测试测试')
/* alert('测试测试')
alert(window.location.href)
alert(this.$route.query.code) */
alert(this.$route.query.code) */
this
.
zReadyUserId
()
this
.
zReadyUserId
()
this
.
zTestGetNowUrlInfo
()
this
.
zTestGetNowUrlInfo
()
...
@@ -168,7 +167,7 @@ export default {
...
@@ -168,7 +167,7 @@ export default {
this
.
zTestPreAuthCode
()
this
.
zTestPreAuthCode
()
}
else
{
}
else
{
alert
(
'有code'
)
alert
(
'有code'
)
alert
(
$route
.
query
.
code
)
alert
(
this
.
$route
.
query
.
code
)
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetUserInfoByOldToken
();
this
.
zTestGetUserInfoByOldToken
();
}
}
...
@@ -178,7 +177,9 @@ export default {
...
@@ -178,7 +177,9 @@ export default {
alert
(
'获取url'
)
alert
(
'获取url'
)
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
);
zlog
(
"%c--->zTestGetNowUrlInfo: "
,
"color: orange;"
,
this
.
zcache
.
nowUrl
);
alert
(
this
.
zcache
.
code
)
alert
(
this
.
zcache
.
nowUrl
)
this
.
url
=
this
.
zcache
.
nowUrl
},
},
zTestPreAuthCode
()
{
zTestPreAuthCode
()
{
alert
(
'获取code'
)
alert
(
'获取code'
)
...
@@ -186,7 +187,7 @@ export default {
...
@@ -186,7 +187,7 @@ export default {
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com"
),
redirectUrI
:
encodeURIComponent
(
"qywx2.100smartdata.com
:8087
"
),
responseType
:
"code"
,
responseType
:
"code"
,
scope
:
"snsapi_base"
,
scope
:
"snsapi_base"
,
state
:
"ztest"
,
state
:
"ztest"
,
...
@@ -206,12 +207,8 @@ export default {
...
@@ -206,12 +207,8 @@ export default {
"&state="
+
"&state="
+
basicInfo
.
state
+
basicInfo
.
state
+
basicInfo
.
tail
;
basicInfo
.
tail
;
zlog
(
"%c--->zTestPreAuthCode: Url ="
,
"background: orange"
,
url
);
this
.
zcache
.
preAuthCodeUrl
=
url
;
this
.
zcache
.
preAuthCodeUrl
=
url
;
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
this
.
href
=
url
alert
(
url
)
},
},
// 测试-获取用户信息
// 测试-获取用户信息
zTestGetUserInfoByOldToken
()
{
zTestGetUserInfoByOldToken
()
{
...
@@ -230,14 +227,11 @@ export default {
...
@@ -230,14 +227,11 @@ export default {
headers
:
headerData
,
headers
:
headerData
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
,
'用户信息'
);
this
.
info
=
res
.
data
+
''
alert
(
'获取用户信息接口成功'
)
alert
(
'获取用户信息接口成功'
)
this
.
userInfo
=
JSON
.
stringify
(
res
);
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
);
alert
(
this
.
zcache
.
userId
)
alert
(
'获取到了用户信息'
)
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
...
...
ybf_admin/src/assets/style/public-class.scss
View file @
52a28bce
...
@@ -59,12 +59,3 @@ $sizes: (0, 5, 10, 15, 20);
...
@@ -59,12 +59,3 @@ $sizes: (0, 5, 10, 15, 20);
.pRelative
{
.pRelative
{
position
:
relative
;
position
:
relative
;
}
}
.line
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-direction
:
row
;
height
:
42px
;
background-color
:
#ececec
;
padding
:
0
10px
;
}
\ No newline at end of file
ybf_admin/src/assets/style/public.scss
View file @
52a28bce
...
@@ -41,4 +41,13 @@ $prefix: d2;
...
@@ -41,4 +41,13 @@ $prefix: d2;
border-radius
:
4px
;
border-radius
:
4px
;
font-size
:
14px
;
font-size
:
14px
;
position
:
relative
;
position
:
relative
;
}
.line
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
flex-direction
:
row
;
height
:
42px
;
background-color
:
#ececec
;
padding
:
0
10px
;
}
}
\ No newline at end of file
ybf_admin/src/menu/header.js
View file @
52a28bce
...
@@ -26,11 +26,11 @@ export default [
...
@@ -26,11 +26,11 @@ export default [
title
:
'活动模版管理'
,
title
:
'活动模版管理'
,
icon
:
''
icon
:
''
},
},
{
/*
{
path: '/task/main',
path: '/task/main',
title: '任务管理',
title: '任务管理',
icon: ''
icon: ''
},
},
*/
{
{
path
:
'/goods/main'
,
path
:
'/goods/main'
,
title
:
'活动商品'
,
title
:
'活动商品'
,
...
...
ybf_admin/src/pages/goods/main/index.vue
View file @
52a28bce
<
template
>
<
template
>
<d2-container
class=
"pRelative"
>
<d2-container
class=
"pRelative"
>
<template
slot=
"header"
>
全部商品( 共5个 )
</
template
>
<div
class=
"searchs"
>
<div
class=
"searchs"
>
<div
class=
"buttons"
>
<!-- <el-button class="button buttonlight" size="small" @click="handleAdd">添加商品</el-button> -->
<!-- <el-button class="button buttondark" size="small">批量删除</el-button> -->
</div>
<!-- 搜索区 -->
<!-- 搜索区 -->
<div>
<el-button
class=
"button buttondark"
size=
"small"
>
批量上架
</el-button>
</div>
<el-form
class=
"searchzone"
:inline=
"true"
:model=
"formData"
label-width=
"auto"
>
<el-form
class=
"searchzone"
:inline=
"true"
:model=
"formData"
label-width=
"auto"
>
<el-form-item
label=
"门店"
>
<el-select
size=
"small"
v-model=
"formData.store"
placeholder=
"请选择门店"
style=
"width:160px;"
>
<el-option
v-for=
"item in statusList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
>
<el-select
<el-select
size=
"small"
size=
"small"
...
@@ -24,7 +36,7 @@
...
@@ -24,7 +36,7 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label
>
<el-form-item
label
=
"关键词"
>
<el-input
size=
"small"
v-model=
"formData.keys"
style=
"width:160px"
placeholder=
"请输入关键词"
/>
<el-input
size=
"small"
v-model=
"formData.keys"
style=
"width:160px"
placeholder=
"请输入关键词"
/>
</el-form-item>
</el-form-item>
<el-button
class=
"button buttondark"
size=
"small"
>
搜索
</el-button>
<el-button
class=
"button buttondark"
size=
"small"
>
搜索
</el-button>
...
@@ -37,25 +49,20 @@
...
@@ -37,25 +49,20 @@
style=
"width: 100%"
style=
"width: 100%"
empty-text=
"暂无商品信息"
empty-text=
"暂无商品信息"
height=
"calc(100% - 120px)"
height=
"calc(100% - 120px)"
@
selection-change=
"handleSelectionChange"
>
>
<!-- <el-table-column type="selection" width="55"> </el-table-column> -->
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"商品图片"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
<img
:src=
"scope.row.imgUrl"
alt
style=
"height: 60px; width: 60px;"
/>
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"goodName"
label=
"商品名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodName"
label=
"商品名称"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodPrice"
label=
"
商品价格
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodPrice"
label=
"
门店
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodNum"
label=
"
库存
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodNum"
label=
"
门店id
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodBackMoney"
label=
"
佣金
"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goodBackMoney"
label=
"
价格
"
align=
"center"
></el-table-column>
<
!-- <el-table-column prop="goodStatus" label="状态" align="center"></el-table-column> --
>
<
el-table-column
prop=
"goodStatus"
label=
"佣金"
align=
"center"
></el-table-column
>
<el-table-column
prop=
"goodStatus"
label=
"状态"
align=
"center"
>
<el-table-column
prop=
"goodStatus"
label=
"状态"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
goodStatus
===
'up'
?
'上
线'
:
'下线
'
}}
</span>
<span>
{{
scope
.
row
.
goodStatus
===
'up'
?
'上
架'
:
'下架
'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goodStatus"
label=
"上架时间"
align=
"center"
></el-table-column>
<!-- 查看详情 -->
<!-- 查看详情 -->
<el-table-column
<el-table-column
fixed=
"right"
fixed=
"right"
...
@@ -65,12 +72,8 @@
...
@@ -65,12 +72,8 @@
@
selection-change=
"listPick"
@
selection-change=
"listPick"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
type=
"text"
@
click=
""
>
详情
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleAdd"
>
{{
scope
.
row
.
goodStatus
===
'up'
?
'下架'
:
'上架'
}}
</el-button>
<!--
<el-button
type=
"text"
@
click=
""
>
编辑
</el-button>
-->
<el-button
type=
"text"
@
click=
"handleAdd"
>
佣金配置
</el-button>
<el-button
type=
"text"
@
click=
"handleAdd"
>
佣金配置
</el-button>
<el-button
type=
"text"
@
click=
"handleAdd"
>
{{
scope
.
row
.
goodStatus
===
'up'
?
'下线'
:
'上线'
}}
</el-button>
<!--
<el-button
type=
"text"
@
click=
""
class=
"listButtonRed"
>
删除
</el-button>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -196,11 +199,16 @@ export default {
...
@@ -196,11 +199,16 @@ export default {
components
:
{
addGoods
},
components
:
{
addGoods
},
methods
:
{
methods
:
{
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
page
.
currentPage
=
val
console
.
log
(
`当前页:
${
val
}
`
);
console
.
log
(
`当前页:
${
val
}
`
);
},
},
listPick
()
{},
listPick
()
{},
handleAdd
()
{
handleAdd
()
{
this
.
$refs
.
addGoods
.
dialogVisible
=
true
;
this
.
$refs
.
addGoods
.
dialogVisible
=
true
;
},
handleSelectionChange
(
val
)
{
console
.
log
(
val
,
'批量选择'
);
}
}
}
}
};
};
...
...
ybf_admin/src/pages/in/contact/index.vue
View file @
52a28bce
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
<counter
v-if=
"index == '2'"
></counter>
<counter
v-if=
"index == '2'"
></counter>
<store
v-if=
"index == '3'"
></store>
<store
v-if=
"index == '3'"
></store>
<org
v-if=
"index == '4'"
></org>
<org
v-if=
"index == '4'"
></org>
<history
v-if=
"isHistoryShow == true"
@
isShow=
"contorlHistoryShow"
></history>
<history
v-if=
"isHistoryShow == true"
@
isShow=
"contorlHistoryShow"
></history>
</div>
</div>
</d2-container>
</d2-container>
...
...
ybf_admin/src/router/routes.js
View file @
52a28bce
...
@@ -65,7 +65,7 @@ const frameIn = [
...
@@ -65,7 +65,7 @@ const frameIn = [
// Z-活动模版管理-模版中心
// Z-活动模版管理-模版中心
{
{
path
:
'/active/mode'
,
path
:
'/active/mode'
,
name
:
'
activeMode
'
,
name
:
'
modeCenter
'
,
component
:
()
=>
import
(
'@/pages/active/mode'
),
component
:
()
=>
import
(
'@/pages/active/mode'
),
meta
:
{
meta
:
{
auth
:
true
,
auth
:
true
,
...
@@ -75,7 +75,7 @@ const frameIn = [
...
@@ -75,7 +75,7 @@ const frameIn = [
// Z-活动模版管理-模版商城
// Z-活动模版管理-模版商城
{
{
path
:
'/active/shop'
,
path
:
'/active/shop'
,
name
:
'
activeMode
'
,
name
:
'
modeShop
'
,
component
:
()
=>
import
(
'@/pages/active/shop'
),
component
:
()
=>
import
(
'@/pages/active/shop'
),
meta
:
{
meta
:
{
auth
:
true
,
auth
:
true
,
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
52a28bce
...
@@ -58,10 +58,8 @@
...
@@ -58,10 +58,8 @@
function
(
res
)
{
function
(
res
)
{
alert
(
'sendChatMessage'
)
alert
(
'sendChatMessage'
)
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
alert
(
'发送成功'
)
// 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
(
'发送失败'
)
// alert(`--->register.vue: zpick: h5 分享失败.`);
// alert(`--->register.vue: zpick: h5 分享失败.`);
}
}
}
}
...
...
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