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
48f89a98
Commit
48f89a98
authored
Apr 09, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取到新增粉丝数据和店铺全部粉丝数据,专柜维护判断用户身份
parent
b833ec26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
63 deletions
+123
-63
voucher.js
wx_application/src/api/sidebar/voucher.js
+16
-0
counterInfo.vue
wx_application/src/views/counter/counterInfo.vue
+19
-6
counterMaintain.vue
wx_application/src/views/counter/counterMaintain.vue
+0
-1
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+88
-56
No files found.
wx_application/src/api/sidebar/voucher.js
View file @
48f89a98
...
...
@@ -32,3 +32,19 @@ export function getStoreList(params) {
params
})
}
// 判断是否为主管
export
function
getDirector
(
params
)
{
return
requestCF
({
url
:
'/admin/auth/addressbook/clerk/isSupervisor'
,
method
:
'get'
,
params
})
}
// 获取一个部门下的所有员工列表
export
function
getMemberListByCode
(
params
)
{
return
requestCF
({
url
:
'/admin/auth/stall/getUserInfoByOyStallCode'
,
method
:
'get'
,
params
})
}
\ No newline at end of file
wx_application/src/views/counter/counterInfo.vue
View file @
48f89a98
...
...
@@ -17,7 +17,7 @@
</div>
</div>
<van-cell-group
class=
"gn"
>
<van-cell
title=
"专柜信息
"
is-link
value=
"详细信息"
@
click=
"handleEdit
"
/>
<van-cell
title=
"专柜信息
设置"
is-link
value=
"详细信息"
@
click=
"handleEdit"
v-if=
"flag == 1
"
/>
<van-cell
title=
"访问专柜首页"
is-link
value=
"详细信息"
@
click=
"handleCounterHome"
/>
<van-cell
title=
"专柜收款码"
is-link
value=
"详细信息"
@
click=
"getChargeCode"
/>
<van-cell
title=
"推送门店信息"
is-link
value=
"详细信息"
@
click=
"handlePushInfo"
/>
...
...
@@ -26,7 +26,7 @@
</
template
>
<
script
>
import
{
getStoreDetail
}
from
"@/api/sidebar/voucher"
;
import
{
getStoreDetail
,
getDirector
}
from
"@/api/sidebar/voucher"
;
import
{
quillEditor
}
from
"vue-quill-editor"
import
"quill/dist/quill.core.css"
import
"quill/dist/quill.snow.css"
...
...
@@ -36,6 +36,8 @@ export default {
return
{
info
:
1
,
oyStallCode
:
''
,
flag
:
2
,
userId
:
''
,
storeInfo
:
{
logo
:
'./img/counter.png'
,
name
:
'未配置'
,
...
...
@@ -45,8 +47,10 @@ export default {
}
},
mounted
()
{
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
console
.
log
(
sessionStorage
.
getItem
(
'oyStallCode'
),
'专柜code1'
);
this
.
userId
=
sessionStorage
.
getItem
(
'userId'
)
this
.
getDirector
(
this
.
userId
)
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
console
.
log
(
sessionStorage
.
getItem
(
'oyStallCode'
),
'专柜code1'
)
this
.
getAgentAuth
()
this
.
getDetail
()
},
...
...
@@ -100,14 +104,23 @@ export default {
})
}
}
},
getDirector
(
userId
)
{
getDirector
({
userId
}).
then
(
res
=>
{
if
(
res
.
data
==
true
)
{
this
.
flag
=
1
}
else
{
this
.
flag
=
2
}
})
}
}
</
script
>
<
style
scoped
>
.gn
>>>
.van-cell__title
{
font-size
:
14px
;
font-weight
:
bold
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
rgba
(
45
,
71
,
106
,
1
);
}
.gn
{
...
...
wx_application/src/views/counter/counterMaintain.vue
View file @
48f89a98
...
...
@@ -35,7 +35,6 @@
<van-field
v-model=
"floor"
placeholder=
"输入楼层"
class=
"input"
/>
</
template
>
</van-cell>
<!-- <van-cell title="专柜介绍" is-link value="点击输入" /> -->
<div
class=
"detail"
>
<div
class=
"border"
>
<div
class=
"des"
>
活动描述
</div>
...
...
wx_application/src/views/mainSale/active/main/index.vue
View file @
48f89a98
...
...
@@ -16,7 +16,11 @@
<div
class=
"main-tips"
>
<div
class=
"tips-tip"
>
店铺粉丝
{{
test
.
barInfo
.
fans
}}
</div>
<div
class=
"tips-tip"
>
个人粉丝
{{
test
.
barInfo
.
personalFans
}}
</div>
<div
class=
"tips-tip"
>
今日新增
{{
test
.
barInfo
.
newFans
}}
</div>
<div
class=
"tips-tip"
>
昨日新增
<span>
{{
test
.
barInfo
.
newFans
}}
</span>
<span>
/
</span>
<span>
{{
test
.
barInfo
.
allNewFans
}}
</span>
</div>
</div>
<div
class=
"main-menus"
>
<div
class=
"menus-row"
>
...
...
@@ -112,7 +116,7 @@
<
script
>
import
axios
from
"axios"
;
import
{
getStoreDetail
}
from
"@/api/sidebar/voucher"
;
import
{
getStoreDetail
,
getMemberListByCode
}
from
"@/api/sidebar/voucher"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
import
{
log
}
from
'util'
;
...
...
@@ -139,7 +143,8 @@ export default {
barInfo
:
{
fans
:
"299"
,
personalFans
:
"77"
,
newFans
:
"11"
newFans
:
"11"
,
allNewFans
:
'15'
},
menuInfo
:
{
icon
:
{
...
...
@@ -208,24 +213,32 @@ export default {
};
},
created
()
{
this
.
checkNowMenuBar
()
// this.getNewFans()
this
.
getAllNewFans
()
if
(
sessionStorage
.
getItem
(
'userId'
))
{
if
(
sessionStorage
.
getItem
(
'avatar'
))
{
console
.
log
(
sessionStorage
.
getItem
(
'avatar'
),
'已有头像'
)
this
.
test
.
manInfo
.
logoUrl
=
sessionStorage
.
getItem
(
'avatar'
)
}
if
(
sessionStorage
.
getItem
(
'personalFan'
))
{
console
.
log
(
sessionStorage
.
getItem
(
'personalFan'
),
'已有个人粉丝数'
)
this
.
test
.
barInfo
.
personalFans
=
sessionStorage
.
getItem
(
'personalFan'
)
}
if
(
sessionStorage
.
getItem
(
'barName'
))
{
this
.
test
.
manInfo
.
barName
=
sessionStorage
.
getItem
(
'barName'
)
console
.
log
(
sessionStorage
.
getItem
(
'barName'
),
'已有专柜名称'
)
}
if
(
sessionStorage
.
getItem
(
'allFans'
))
{
this
.
test
.
barInfo
.
fans
=
sessionStorage
.
getItem
(
'allFans'
)
console
.
log
(
sessionStorage
.
getItem
(
'allFans'
),
'已有全部粉丝'
)
}
if
(
sessionStorage
.
getItem
(
'newFans'
))
{
this
.
test
.
barInfo
.
newFans
=
sessionStorage
.
getItem
(
'allFans'
)
console
.
log
(
sessionStorage
.
getItem
(
'newFans'
),
'已有新增粉丝'
)
}
if
(
sessionStorage
.
getItem
(
'allNewFans'
))
{
this
.
test
.
barInfo
.
allNewFans
=
sessionStorage
.
getItem
(
'allNewFans'
)
console
.
log
(
sessionStorage
.
getItem
(
'allNewFans'
),
'已有店铺新增粉丝'
)
}
}
else
{
this
.
zReadyUserId
()
//
this.zReadyUserId()
this
.
zTestGetNowUrlInfo
()
}
},
...
...
@@ -279,53 +292,69 @@ export default {
let
headerData
=
{
agentId
:
"1000033"
,
corpId
:
"ww4df265003b43fa0d"
};
}
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId="
+
this
.
zcache
.
userId
,
url
:
"http://139.155.48.151:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode="
+
this
.
oyStallCode
,
method
:
"get"
,
headers
:
headerData
})
.
then
(
res
=>
{
this
.
test
.
barInfo
.
personalFans
=
res
.
data
.
data
.
length
sessionStorage
.
setItem
(
"personalFan"
,
res
.
data
.
data
.
length
)
console
.
log
(
res
,
'粉丝'
)
this
.
test
.
barInfo
.
fans
=
res
.
data
.
data
.
length
sessionStorage
.
setItem
(
"allFans"
,
res
.
data
.
data
.
length
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
getNewFans
()
{
this
.
getAddFans
(
1
,
this
.
zcache
.
userId
)
},
getAllNewFans
()
{
let
params
=
{
oyStallCode
:
this
.
oyStallCode
}
getMemberListByCode
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'res'
);
this
.
getAddFans
(
2
,
res
.
data
)
})
},
getAddFans
(
flag
,
userId
)
{
let
JsonStr
=
{}
if
(
flag
==
1
)
{
JsonStr
.
userid
=
[
userId
]
}
else
{
JsonStr
.
userid
=
userId
}
let
timeNow
=
Math
.
round
(
new
Date
()
/
1000
)
JsonStr
.
start_time
=
timeNow
-
24
*
60
*
60
JsonStr
.
end_time
=
timeNow
console
.
log
(
JsonStr
,
'obj'
)
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/contact/getUserBehaviorData"
,
method
:
"post"
,
headers
:
{
'Content-Type'
:
'application/json'
,
'agentId'
:
"1000033"
,
'corpId'
:
"ww4df265003b43fa0d"
},
data
:
JsonStr
})
.
then
(
res
=>
{
let
data
=
JSON
.
parse
(
res
.
data
.
data
)
if
(
flag
==
1
)
{
this
.
test
.
barInfo
.
newFans
=
data
.
behavior_data
[
0
].
new_contact_cnt
+
data
.
behavior_data
[
1
].
new_contact_cnt
sessionStorage
.
setItem
(
"newFans"
,
this
.
test
.
barInfo
.
newFans
)
}
else
{
this
.
test
.
barInfo
.
allNewFans
=
data
.
behavior_data
[
0
].
new_contact_cnt
+
data
.
behavior_data
[
1
].
new_contact_cnt
sessionStorage
.
setItem
(
"allNewFans"
,
this
.
test
.
barInfo
.
allNewFans
)
}
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// getNewFans() {
// // let headerData = {
// // agentId: "1000033",
// // corpId: "ww4df265003b43fa0d"
// // };
// let JsonStr = {}
// JsonStr.userid = ['shanDian']
// let timeNow = Date.parse(new Date())
// JsonStr.start_time = timeNow-24*60*60*1000
// JsonStr.end_time = timeNow
// console.log(JsonStr,'obj')
// axios({
// url: "http://139.155.48.151:8085/workWx/auth/contact/getUserBehaviorData",
// method: "post",
// headers: {
// 'Content-Type': 'application/json',
// 'agentId': "1000033",
// 'corpId': "ww4df265003b43fa0d"
// },
// data:JSON.stringify(JsonStr)
// })
// .then(res => {
// console.log(res,'res')
// })
// .catch(err => {
// console.log(err)
// })
// },
// 获取店铺信息
getStore
()
{
let
params
=
{
...
...
@@ -357,19 +386,19 @@ export default {
testButtonClick
()
{},
menu01Click
()
{},
menu02Click
()
{
this
.
$router
.
push
(
"Task"
)
;
this
.
$router
.
push
(
"Task"
)
},
menu03Click
()
{
this
.
$router
.
push
(
"activeList"
)
;
this
.
$router
.
push
(
"activeList"
)
},
menu04Click
()
{
this
.
$router
.
push
(
"counterInfo"
)
;
this
.
$router
.
push
(
"counterInfo"
)
},
menu05Click
()
{
this
.
$router
.
push
(
"ActTemplate"
)
;
this
.
$router
.
push
(
"ActTemplate"
)
},
menu06Click
()
{
this
.
$router
.
push
(
"goodManage"
)
;
this
.
$router
.
push
(
"goodManage"
)
},
buttonMainMarketingClick
()
{
// this.$router.push("home")
...
...
@@ -464,12 +493,15 @@ export default {
let
userName
=
id
;
getUserInfoByUserId
({
userName
})
.
then
(
res
=>
{
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
);
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
;
this
.
getStore
();
this
.
getFans
();
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
)
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
this
.
getStore
()
this
.
getFans
()
this
.
getAllFans
()
this
.
getNewFans
()
this
.
getAllNewFans
()
})
.
catch
(
err
=>
{})
;
.
catch
(
err
=>
{})
}
}
};
...
...
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