Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
community_vote
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
community_vote
Commits
ed9fd412
Commit
ed9fd412
authored
Jan 06, 2022
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整
parent
9540f596
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
29 deletions
+56
-29
README.md
README.md
+2
-1
App.vue
src/App.vue
+7
-0
permission.ts
src/constants/permission.ts
+4
-2
navigator.vue
src/layouts/navigator.vue
+26
-14
index.ts
src/store/app/index.ts
+5
-0
Initiate.vue
src/views/Initiate.vue
+4
-4
CommunityVote.vue
src/views/home/CommunityVote.vue
+6
-5
founder_initiate.vue
src/views/initiate_comp/founder_initiate.vue
+2
-2
SquareVote.vue
src/views/square/SquareVote.vue
+0
-1
No files found.
README.md
View file @
ed9fd412
...
...
@@ -36,7 +36,8 @@ http://121.40.18.70:9056/
### 活动发起地址
```
14KEKbYtKKQm4wMthSK9J4La4nAiidGozt
// src/constants/permission
```
### nginx代理地址
...
...
src/App.vue
View file @
ed9fd412
...
...
@@ -15,6 +15,8 @@ import { mapState } from 'vuex'
import
{
Loading
}
from
'vant'
import
{
getCurrentBTYAddress
}
from
'@/utils/bridge'
// 币钱包环境
// import { test } from '@/constants/test' // 本地测试
// import {routes} from '@/router/index'
// import { permissionList } from '@/constants/permission'
Vue
.
use
(
Loading
)
export
default
Vue
.
extend
({
components
:
{
...
...
@@ -50,6 +52,11 @@ export default Vue.extend({
getCurrentBTYAddress
(
''
,(
res
:
any
)
=>
{
console
.
log
(
'res'
,
res
)
this
.
$store
.
commit
(
'app/SET_ADDRESS'
,
res
)
// const _routes = routes[0].children as NavItem[]
// if (permissionList.indexOf(res) > -1) {
// _routes[2].meta.text = '发起活动'
// }
// console.log(_routes)
})
// window.onresize = function () {
...
...
src/constants/permission.ts
View file @
ed9fd412
export
const
permissionList
=
[
'14KEKbYtKKQm4wMthSK9J4La4nAiidGozt'
,
//
'14KEKbYtKKQm4wMthSK9J4La4nAiidGozt',
'1L1L1Mjd81Q1JSRKn1rQEL17wAXnBjURDk'
,
'1KMzj1S2mEBSc1TWXfwK4B6AhW8iySzEq1'
'1KMzj1S2mEBSc1TWXfwK4B6AhW8iySzEq1'
,
'1MwgSgsRpuMVnRLGBgs7c7VNELA4PPHM1n'
// 测试地址
]
\ No newline at end of file
src/layouts/navigator.vue
View file @
ed9fd412
<
template
>
<div
class=
"flex w-full justify-around bg-app-blue-1 z-50"
>
{{
currentIndex
}}
<div
v-for=
"(i,index) in
navRoutes
"
:key=
"index"
class=
"py-3 flex flex-col text-center "
@
click=
"navigating(i,index)"
>
<div
v-for=
"(i,index) in
routeList
"
:key=
"index"
class=
"py-3 flex flex-col text-center "
@
click=
"navigating(i,index)"
>
<div
class=
"self-center"
>
<app-icon
customize
:type=
'i.meta.icon'
size=
'18px'
:color=
'index===activedIndex?"#FFBB00":" #FFFFFF"'
></app-icon>
</div>
...
...
@@ -16,6 +16,7 @@ import Vue from 'vue';
import
{
routes
}
from
'@/router/index'
import
Icon
from
'@/components/common/Icon.vue'
import
{
permissionList
}
from
'@/constants/permission'
// import { mapState } from 'vuex';
interface
NavItem
{
component
:
any
;
meta
:{
...
...
@@ -52,19 +53,19 @@ export default Vue.extend({
},
methods
:{
init
()
{
if
(
permissionList
.
indexOf
(
this
.
$store
.
state
.
app
.
address
)
>
-
1
)
{
this
.
navRoutes
.
forEach
(
item
=>
{
if
(
item
.
meta
.
text
===
'发起提案'
)
{
item
.
meta
.
text
=
'发起活动'
}
})
}
else
{
this
.
navRoutes
.
forEach
(
item
=>
{
if
(
item
.
meta
.
text
===
'发起提案'
)
{
item
.
meta
.
text
=
'发起提案'
}
})
}
//
if (permissionList.indexOf(this.$store.state.app.address) > -1) {
//
this.navRoutes.forEach(item => {
//
if (item.meta.text === '发起提案') {
//
item.meta.text = '发起活动'
//
}
//
})
//
} else {
//
this.navRoutes.forEach(item => {
//
if (item.meta.text === '发起提案') {
//
item.meta.text = '发起提案'
//
}
//
})
//
}
const
indexNumber
=
this
.
navRoutes
.
findIndex
(
i
=>
{
// console.log(i);
return
i
?.
path
===
this
.
$route
?.
path
...
...
@@ -97,6 +98,17 @@ export default Vue.extend({
},
currentIndex
()
{
return
this
.
$store
.
state
.
app
.
index
},
address
():
string
{
return
this
.
$store
.
state
.
app
.
address
},
routeList
():
Array
<
NavItem
>
{
const
_route
=
routes
[
0
].
children
as
NavItem
[]
console
.
log
(
'change menu'
,
this
.
address
);
if
(
permissionList
.
indexOf
(
this
.
address
)
>
-
1
)
{
_route
[
2
].
meta
.
text
=
'发起活动'
}
return
_route
}
},
watch
:
{
...
...
src/store/app/index.ts
View file @
ed9fd412
...
...
@@ -29,6 +29,11 @@ export const appStore = {
state
:
()
=>
({
...
stateData
}),
getter
:
{
getAddress
(
state
:
{
address
:
string
})
{
return
state
.
address
}
},
mutations
:
{
TOGGLE_STATUS
(
state
:
AppType
){
state
.
overlay
.
show
=
!
state
.
overlay
.
show
...
...
src/views/Initiate.vue
View file @
ed9fd412
...
...
@@ -24,13 +24,13 @@ export default Vue.extend({
},
created
()
{
const
addr
=
this
.
$store
.
state
.
app
.
address
console
.
log
(
addr
)
if
(
permissionList
.
indexOf
(
addr
)
>
-
1
)
{
this
.
isFounder
=
false
this
.
$route
.
meta
.
text
=
'发起活动'
}
else
{
this
.
$route
.
meta
.
text
=
'发起提案'
// this.$route.meta.text = '发起活动'
}
// else {
// this.$route.meta.text = '发起提案'
// }
// // 测试关闭投票
// service.memberCloseVote({
// voteId: '000000000608800001'
...
...
src/views/home/CommunityVote.vue
View file @
ed9fd412
...
...
@@ -115,11 +115,12 @@ export default Vue.extend({
let
o
=
[]
o
=
lists
.
filter
((
item
:
any
)
=>
item
.
isToday
)
this
.
isToday
=
o
[
0
]?.
isToday
if
(
this
.
community
.
isClose
)
{
this
.
rest
=
0
}
else
{
this
.
rest
=
+
o
[
0
]?.
balance
||
0
}
// if (this.community.isClose) {
// this.rest = 0
// } else {
// this.rest = +o[0]?.balance || 0
// }
this
.
rest
=
+
o
[
0
]?.
balance
||
0
this
.
endHeight
=
+
o
[
0
]?.
endHeight
||
0
// 结束时间或下次投票
if
(
Math
.
abs
(
this
.
endHeight
-
+
this
.
end
)
<
5
)
{
...
...
src/views/initiate_comp/founder_initiate.vue
View file @
ed9fd412
...
...
@@ -87,10 +87,10 @@
</div>
</div>
<div
class=
"cell flex justify-between items-center py-2 "
>
<
!--
<
div
class=
"cell flex justify-between items-center py-2 "
>
<div>
是否公开投票
</div>
<van-switch
v-model=
"checked"
size=
"18px"
/>
</div>
</div>
-->
<!--
<div
class=
"space h-11"
></div>
-->
<!--
<div
v-show=
"!checked"
class=
"cell flex justify-between items-center py-2 "
>
<div>
成员数设置
</div>
...
...
src/views/square/SquareVote.vue
View file @
ed9fd412
...
...
@@ -164,7 +164,6 @@ export default Vue.extend({
payload
:
{
id
:
this
.
$route
.
query
.
voteID
as
string
,
addr
:
this
.
$store
.
state
.
app
.
address
// addr: test.addr
}
}).
then
(
res
=>
{
const
lists
=
res
.
data
.
result
&&
res
.
data
.
result
.
dayAccount
||
[]
...
...
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