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
4a5e5c17
Commit
4a5e5c17
authored
Apr 01, 2020
by
xulili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的消息
parent
4af504e3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
465 additions
and
63 deletions
+465
-63
.env
wx_application/.env
+1
-1
.env.dev
wx_application/.env.dev
+1
-1
.env.prod
wx_application/.env.prod
+1
-1
package.json
wx_application/package.json
+1
-2
main.js
wx_application/src/main.js
+2
-0
index.js
wx_application/src/router/index.js
+3
-2
message.js
wx_application/src/store/modules/message.js
+15
-0
bRequest.js
wx_application/src/utils/bRequest.js
+52
-0
utils.Request.aApi.js
wx_application/src/utils/utils.Request.aApi.js
+28
-0
index.vue
wx_application/src/views/mainSale/me/main/index.vue
+64
-56
addMessage.vue
wx_application/src/views/mainSale/message/addMessage.vue
+81
-0
index.vue
wx_application/src/views/mainSale/message/index.vue
+73
-0
releaseMessage.vue
wx_application/src/views/mainSale/message/releaseMessage.vue
+143
-0
No files found.
wx_application/.env
View file @
4a5e5c17
...
...
@@ -6,4 +6,4 @@ VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = /api/
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://1
11.26.165.55:8010/crminterface.ashx
VUE_APP_API_B = http://1
39.155.48.151:8084
wx_application/.env.dev
View file @
4a5e5c17
...
...
@@ -6,4 +6,4 @@ VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://1
11.26.165.55:8010/crminterface.ashx
VUE_APP_API_B = http://1
39.155.48.151:8084
wx_application/.env.prod
View file @
4a5e5c17
...
...
@@ -6,4 +6,4 @@ VUE_APP_TITLE = 亿百分-prod
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://1
11.26.165.55:8010/crminterface.ashx
VUE_APP_API_B = http://1
39.155.48.151:8084
wx_application/package.json
View file @
4a5e5c17
...
...
@@ -15,8 +15,7 @@
"core-js"
:
"^3.4.4"
,
"js-md5"
:
"^0.7.3"
,
"jssdk"
:
"^0.0.1"
,
"qrcode"
:
"^1.4.4"
,
"vant"
:
"^2.3.3"
,
"vant"
:
"^2.5.9"
,
"vue"
:
"^2.6.10"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^3.1.3"
,
...
...
wx_application/src/main.js
View file @
4a5e5c17
...
...
@@ -5,11 +5,13 @@ import router from './router'
import
store
from
'./store'
import
'./lib/rem'
;
import
Vant
from
'vant'
;
import
{
Toast
}
from
'vant'
;
import
'vant/lib/index.css'
;
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
Vant
);
Vue
.
use
(
Toast
);
const
originalPush
=
Router
.
prototype
.
push
Router
.
prototype
.
push
=
function
push
(
location
)
{
...
...
wx_application/src/router/index.js
View file @
4a5e5c17
...
...
@@ -3,7 +3,7 @@ import VueRouter from 'vue-router'
import
Home
from
'../views/home.vue'
import
{
getXToken
,
configWx
}
from
'@/utils/aCommon'
import
mineRoute
from
'./mine'
Vue
.
use
(
VueRouter
)
const
routes
=
[
...
...
@@ -141,7 +141,8 @@ const routes = [
path
:
'/qrCode'
,
name
:
'qrCode'
,
component
:
()
=>
import
(
'@/views/qrCode/index'
)
}
},
...
mineRoute
// {
// path: '/about',
// name: 'about',
...
...
wx_application/src/store/modules/message.js
0 → 100644
View file @
4a5e5c17
export
default
{
namespaced
:
true
,
state
:
{
title
:
''
,
content
:
''
},
mutations
:
{
title
(
state
,
title
)
{
state
.
title
=
title
},
content
(
state
,
content
)
{
state
.
content
=
content
},
}
}
wx_application/src/utils/bRequest.js
0 → 100644
View file @
4a5e5c17
import
axios
from
'axios'
import
envConfig
from
'@/config/env-config'
let
INFO
=
{
// corpId: 'wwd1cdbca7b8b2b6c4',
// agentId: '1000015',
corpId
:
'ww4df265003b43fa0d'
,
agentId
:
'1000033'
,
url
:
envConfig
.
appBaseUrlB
,
}
// 创建axios实例
const
service
=
axios
.
create
({
baseURL
:
INFO
.
url
,
// api 的 base_url
timeout
:
50000
// 请求超时时间
})
// request拦截器
service
.
interceptors
.
request
.
use
(
(
config
)
=>
{
if
(
sessionStorage
[
'token'
])
{
config
.
headers
[
'token'
]
=
sessionStorage
[
'token'
]
config
.
headers
[
'businessId'
]
=
sessionStorage
[
'businessId'
]
}
else
{
config
.
headers
[
'businessId'
]
=
'10'
}
return
config
;
},
(
error
)
=>
{
Promise
.
reject
(
error
)
}
)
// response 拦截器
service
.
interceptors
.
response
.
use
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
status
==
200
)
{
return
response
.
data
}
else
{
Message
({
message
:
response
.
data
.
msg
,
type
:
'error'
,
duration
:
5
*
1000
})
}
},
error
=>
{
console
.
log
(
error
)
}
)
export
default
service
wx_application/src/utils/utils.Request.aApi.js
0 → 100644
View file @
4a5e5c17
/**
* Created by supervisor on 2020/3/31
*/
import
requestAPI
from
'@/utils/bRequest'
export
function
getMessageByClerkId
(
params
)
{
return
requestAPI
({
url
:
'/admin/auth/marketing/getMessageByClerkId'
,
method
:
'get'
,
params
})
}
export
function
getClerkInfoBySupervisorId
(
params
)
{
return
requestAPI
({
url
:
'/admin/auth/addressbook/clerk/getClerkInfoBySupervisorId'
,
method
:
'get'
,
params
})
}
export
function
newTask
(
data
)
{
return
requestAPI
({
url
:
'/admin/auth/marketing/newTask'
,
method
:
'post'
,
data
})
}
wx_application/src/views/mainSale/me/main/index.vue
View file @
4a5e5c17
...
...
@@ -36,7 +36,7 @@
<div
class=
"list list-latest"
>
<div
class=
"list-title"
>
我的收益
</div>
<img
class=
"list-icon"
:src=
"cache.icon.arrowRightDark"
/>
</div>
</div>
</div>
<div
class=
"main-menuBar"
>
...
...
@@ -65,55 +65,56 @@
</
template
>
<
script
>
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
axios
from
"axios"
;
export
default
{
name
:
"me"
,
data
()
{
return
{
cache
:
{
icon
:
{
testImg
:
"/mainSale/test-city.png"
,
arrowRightLight
:
"/mainSale/icon-arrow-right-light.png"
,
arrowRightDark
:
"/mainSale/icon-arrow-right-dark.png"
}
},
userInfo
:
''
,
menuBarInfo
:
{
list
:
{
main
:
[
{
name
:
""
,
iconUaUrl
:
""
,
iconAcUrl
:
""
}
]
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
axios
from
"axios"
;
export
default
{
name
:
"me"
,
data
()
{
return
{
cache
:
{
icon
:
{
testImg
:
"/mainSale/test-city.png"
,
arrowRightLight
:
"/mainSale/icon-arrow-right-light.png"
,
arrowRightDark
:
"/mainSale/icon-arrow-right-dark.png"
}
},
icon
:
{
now
:
{
"1"
:
""
,
"2"
:
""
,
"3"
:
""
,
"4"
:
""
,
"5"
:
""
userInfo
:
''
,
menuBarInfo
:
{
list
:
{
main
:
[
{
name
:
""
,
iconUaUrl
:
""
,
iconAcUrl
:
""
}
]
},
ua
:
{
"1"
:
"/mainSale/icon-menuBar-1-ua.png"
,
"2"
:
"/mainSale/icon-menuBar-2-ua.png"
,
"3"
:
"/mainSale/icon-menuBar-3-ua.png"
,
"4"
:
"/mainSale/icon-menuBar-4-ua.png"
,
"5"
:
"/mainSale/icon-menuBar-5-ua.png"
},
ac
:
{
"1"
:
"/mainSale/icon-menuBar-1-ac.png"
,
"2"
:
"/mainSale/icon-menuBar-2-ac.png"
,
"3"
:
"/mainSale/icon-menuBar-3-ac.png"
,
"4"
:
"/mainSale/icon-menuBar-4-ac.png"
,
"5"
:
"/mainSale/icon-menuBar-5-ac.png"
icon
:
{
now
:
{
"1"
:
""
,
"2"
:
""
,
"3"
:
""
,
"4"
:
""
,
"5"
:
""
},
ua
:
{
"1"
:
"/mainSale/icon-menuBar-1-ua.png"
,
"2"
:
"/mainSale/icon-menuBar-2-ua.png"
,
"3"
:
"/mainSale/icon-menuBar-3-ua.png"
,
"4"
:
"/mainSale/icon-menuBar-4-ua.png"
,
"5"
:
"/mainSale/icon-menuBar-5-ua.png"
},
ac
:
{
"1"
:
"/mainSale/icon-menuBar-1-ac.png"
,
"2"
:
"/mainSale/icon-menuBar-2-ac.png"
,
"3"
:
"/mainSale/icon-menuBar-3-ac.png"
,
"4"
:
"/mainSale/icon-menuBar-4-ac.png"
,
"5"
:
"/mainSale/icon-menuBar-5-ac.png"
}
}
}
},
zcache
:
{
},
zcache
:
{
nowUrl
:
""
,
preAuthCodeUrl
:
""
,
code
:
""
,
...
...
@@ -124,12 +125,14 @@ export default {
};
},
mounted
()
{
this
.
checkNowMenuBar
()
// this.zReadyUserId()
this
.
checkNowMenuBar
();
/* alert('测试测试')
alert(this.$route.query.code) */
this
.
zReadyUserId
()
this
.
zTestGetNowUrlInfo
()
},
methods
:
{
methods
:
{
checkNowMenuBar
()
{
let
inData
=
"5"
;
this
.
menuBarInfo
.
icon
.
now
=
this
.
menuBarInfo
.
icon
.
ua
;
...
...
@@ -157,7 +160,7 @@ export default {
"color: orange;",
this.$route.query.code
) */
if
(
this
.
$route
.
query
.
code
===
undefined
){
// alert('没code')
this
.
zTestPreAuthCode
()
...
...
@@ -172,10 +175,10 @@ export default {
// alert('获取url')
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
this
.
url
=
this
.
zcache
.
nowUrl
this
.
url
=
this
.
zcache
.
nowUrl
},
zTestPreAuthCode
()
{
// alert('获取code')
// alert('获取code')
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
...
...
@@ -230,8 +233,13 @@ export default {
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
});
},
}
};
handleDetail
(
type
){
if
(
type
===
'message'
){
this
.
$router
.
push
(
'/message'
)
}
}
}
};
</
script
>
<
style
scoped
>
...
...
wx_application/src/views/mainSale/message/addMessage.vue
0 → 100644
View file @
4a5e5c17
<
template
>
<div
class=
"add-message-container"
>
<van-nav-bar
left-text=
"取消"
right-text=
"下一步"
@
click-left=
"onClickLeft"
@
click-right=
"onClickRight"
/>
<van-panel
class=
"van-panel"
>
<template
#
header
>
<van-field
class=
"message-title"
v-model=
"title"
placeholder=
"请输入标题"
/>
</
template
>
<van-field
class=
"message-content"
v-model=
"content"
placeholder=
"请输入内容"
input-align=
"left"
type=
"textarea"
/>
</van-panel>
</div>
</template>
<
script
>
export
default
{
name
:
'addMessage'
,
data
()
{
return
{
title
:
''
,
content
:
''
}
},
methods
:
{
onClickLeft
()
{
this
.
$router
.
back
()
},
onClickRight
()
{
//发布 全员发送 获取全部id 部分可见 获取check 的id
if
(
!
this
.
title
){
this
.
$toast
(
"请输入标题"
)
return
false
}
if
(
!
this
.
content
){
this
.
$toast
(
"请输入内容"
)
return
false
}
this
.
$store
.
commit
(
'message/title'
,
this
.
title
)
this
.
$store
.
commit
(
'message/content'
,
this
.
content
)
this
.
$router
.
push
(
'/releaseMessage'
)
},
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.add-message-container
{
height
:
100%
;
overflow
:
hidden
;
.van-nav-bar
{
padding
:
0
20px
;
&
:after
{
border
:
none
;
}
}
/
deep
/
.van-panel
{
padding
:
0
20px
;
&
:after
{
border
:
none
;
}
.message-title
{
&
:after
{
left
:
0
;
border-color
:
#ccc
;
}
.van-field__control
{
height
:
45px
;
}
}
.message-content
{
padding-top
:
10px
;
.van-field__control
{
height
:
calc
(
100vh
-
110px
);
}
}
}
}
</
style
>
wx_application/src/views/mainSale/message/index.vue
0 → 100644
View file @
4a5e5c17
<
template
>
<div
class=
"message-container"
>
<div
class=
"message-list"
>
<div
class=
"message-panel-box"
v-for=
"(item,index) in messageList"
:key=
"index"
>
<div
class=
"message-panel-box-left"
>
<p
class=
"message-title"
></p>
<p
class=
"message-content"
></p>
</div>
<div
class=
"message-panel-box-right"
>
<span></span>
</div>
</div>
</div>
<div
class=
"btn-plus"
@
click=
"handleAddMessage"
>
<span>
+
</span>
</div>
</div>
</
template
>
<
script
>
import
{
getMessageByClerkId
}
from
'@/utils/utils.Request.aApi'
export
default
{
name
:
'index'
,
data
()
{
return
{
clerkId
:
'2003160512400400000'
,
messageList
:
[]
}
},
mounted
()
{
this
.
handleGetMessageByClerkId
()
},
methods
:
{
handleGetMessageByClerkId
()
{
let
_this
=
this
getMessageByClerkId
({
clerkId
:
_this
.
clerkId
})
.
then
(
res
=>
{
if
(
res
.
result
==
'success'
)
{
_this
.
messageList
=
res
.
data
}
else
{
_this
.
messageList
=
[]
_this
.
$toast
(
res
.
errorMsg
);
}
})
.
catch
(
err
=>
{
})
},
handleAddMessage
(){
this
.
$router
.
push
(
'/addMessage'
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.message-container
{
height
:
100%
;
.btn-plus
{
position
:
fixed
;
right
:
30px
;
bottom
:
30px
;
font-size
:
40px
;
font-weight
:
bold
;
width
:
50px
;
height
:
50px
;
border
:
2px
solid
#ccc
;
border-radius
:
50%
;
text-align
:
center
;
color
:
green
;
line-height
:
1
;
}
}
</
style
>
wx_application/src/views/mainSale/message/releaseMessage.vue
0 → 100644
View file @
4a5e5c17
<
template
>
<div
class=
"release-message-container"
>
<van-nav-bar
left-text=
"取消"
right-text=
"发布"
@
click-left=
"onClickLeft"
@
click-right=
"onClickRight"
/>
<div
class=
"radio-group"
>
<van-radio-group
v-model=
"radio"
direction=
"horizontal"
@
change=
"handleChangeRadio"
>
<van-radio
name=
"1"
>
全员发送
</van-radio>
<van-radio
name=
"2"
>
部分可见
</van-radio>
</van-radio-group>
</div>
<div
class=
"userlist"
>
<van-checkbox-group
v-model=
"checkIds"
>
<van-checkbox
:name=
"item.userId"
shape=
"square"
v-for=
"(item,index) in userList"
:key=
"index"
>
{{
item
.
userName
}}
</van-checkbox>
</van-checkbox-group>
</div>
</div>
</
template
>
<
script
>
import
{
getClerkInfoBySupervisorId
,
newTask
}
from
'@/utils/utils.Request.aApi'
export
default
{
name
:
'releaseMessage'
,
data
()
{
return
{
radio
:
'1'
,
checkIds
:[],
supervisorId
:
'2003160512400400000'
,
userList
:[]
}
},
mounted
(){
this
.
getClerkInfoBySupervisorId
()
},
methods
:
{
// 根据主管id获取所属部门全部员工信息
getClerkInfoBySupervisorId
(){
let
_this
=
this
getClerkInfoBySupervisorId
({
supervisorId
:
_this
.
supervisorId
})
.
then
(
res
=>
{
if
(
res
.
result
==
'success'
)
{
_this
.
userList
=
res
.
data
_this
.
checkIds
=
res
.
data
.
map
(
v
=>
{
return
v
.
userId
})
}
else
{
_this
.
userList
=
[]
_this
.
$toast
(
res
.
errorMsg
);
}
})
.
catch
(
err
=>
{
})
},
onClickLeft
()
{
this
.
$router
.
back
()
},
onClickRight
()
{
//发布 全员发送 获取全部id 部分可见 获取check 的id
let
title
=
this
.
$store
.
state
.
title
let
content
=
this
.
$store
.
state
.
content
let
supervisorId
=
this
.
supervisorId
let
clerkIds
=
this
.
checkIds
debugger
let
requestParam
=
{
title
:
title
,
content
:
content
,
supervisorId
:
supervisorId
,
clerkIds
:
clerkIds
}
let
_this
=
this
// newTask(requestParam)
// .then(res => {
// if (res.result == 'success') {
// _this.$toast('发布成功');
// _this.$router.push('/message')
// } else {
// _this.$toast(res.errorMsg);
// }
// })
// .catch(err => {
//
// })
},
handleChangeRadio
(
val
){
if
(
val
==
'1'
){
this
.
checkIds
=
this
.
userList
.
map
(
v
=>
{
return
v
.
userId
})
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
.release-message-container
{
height
:
100%
;
overflow
:
hidden
;
.van-nav-bar
{
padding
:
0
20px
;
/*&:after{*/
/*border: none;*/
/*}*/
}
.radio-group
{
margin
:
10px
0
20px
0
;
.van-radio-group--horizontal
{
padding
:
0
20px
;
justify-content
:
space-around
;
}
.van-radio__icon
{
font-size
:
18px
;
}
.van-radio__label
{
font-size
:
14px
;
}
}
.userlist
{
height
:
calc
(
100%
-
66px
);
overflow-x
:
hidden
;
overflow-y
:
scroll
;
.van-checkbox-group
{
padding
:
0
30px
;
.van-checkbox
{
margin-bottom
:
10px
;
.van-checkbox__icon
{
font-size
:
18px
;
}
.van-checkbox__label
{
font-size
:
14px
;
}
}
}
}
}
</
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