Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
7f8f7c59
Commit
7f8f7c59
authored
Sep 28, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 蒙层提示
parent
c6dc0333
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
216 additions
and
40 deletions
+216
-40
index.vue
src/components/mask-tip/index.vue
+89
-0
index.vue
src/pages/index/index.vue
+17
-0
mine.vue
src/pages/index/mine.vue
+33
-1
order.vue
src/pages/index/order.vue
+18
-0
index.vue
src/pages/mine/wallet/index.vue
+56
-38
index.js
src/store/index.js
+3
-1
No files found.
src/components/mask-tip/index.vue
0 → 100644
View file @
7f8f7c59
<
template
>
<u-mask
:show=
"visible"
@
click=
"handleClick"
:zoom=
"false"
>
<view
class=
"tip-view"
:style=
"'margin-top:' + statusBarHeight + 'px'"
>
<image
class=
"tip-image"
:src=
"imageUrl"
:style=
"imageStyle"
mode=
"widthFix"
></image>
</view>
</u-mask>
</
template
>
<
script
>
/**
* @description 创建一个遮罩层,提示图片
* @property {Boolean} show 是否显示遮罩(默认false)
* @property {Object} imageName 图片地址名
* @property {Object} imageStyle 自定义样式对象
* @example <mask-tip :show.sync="show"></mask-tip>
*/
export
default
{
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
,
},
imageName
:
{
type
:
String
,
default
:
''
},
imageStyle
:
{
type
:
String
,
default
:
''
},
name
:
{
type
:
String
,
default
:
''
},
timeout
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
statusBarHeight
:
20
,
visible
:
false
}
},
watch
:
{
show
(
val
)
{
if
(
!
val
)
return
let
value
=
this
.
vuex_not_first
if
(
!
value
[
this
.
name
])
{
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
this
.
statusBarHeight
=
res
.
statusBarHeight
setTimeout
(()
=>
{
this
.
visible
=
true
},
this
.
time
)
},
})
value
[
this
.
name
]
=
true
this
.
$u
.
vuex
(
'vuex_not_first'
,
value
)
}
}
},
computed
:
{
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
+
this
.
imageName
},
time
()
{
return
this
.
timeout
?
1500
:
0
}
},
methods
:
{
handleClick
()
{
this
.
visible
=
false
this
.
$emit
(
'click'
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.tip-view
{
}
</
style
>
src/pages/index/index.vue
View file @
7f8f7c59
...
@@ -110,12 +110,19 @@
...
@@ -110,12 +110,19 @@
<!-- <EusingList /> -->
<!-- <EusingList /> -->
</view>
</view>
<upload-progress
/>
<upload-progress
/>
<MaskTip
:show=
"showMask"
imageName=
"mengceng2.png"
:imageStyle=
"imageStyle"
name=
"upload_tip"
/>
</TabBarPage>
</TabBarPage>
</template>
</template>
<
script
>
<
script
>
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
TabBarPage
from
'@/components/tabBarList/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
MaskTip
from
'@/components/mask-tip/index.vue'
const
app
=
getApp
()
const
app
=
getApp
()
import
OrderCell
from
'@/components/order/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
// import EusingList from '@/components/order/eusingList.vue'
// import EusingList from '@/components/order/eusingList.vue'
...
@@ -125,6 +132,7 @@ export default {
...
@@ -125,6 +132,7 @@ export default {
OrderCell
,
OrderCell
,
TabBarPage
,
TabBarPage
,
NoOrder
,
NoOrder
,
MaskTip
,
// EusingList,
// EusingList,
},
},
data
()
{
data
()
{
...
@@ -151,6 +159,7 @@ export default {
...
@@ -151,6 +159,7 @@ export default {
old
:
{
old
:
{
scrollTop
:
0
,
scrollTop
:
0
,
},
},
showMask
:
false
,
}
}
},
},
watch
:
{
watch
:
{
...
@@ -193,6 +202,9 @@ export default {
...
@@ -193,6 +202,9 @@ export default {
weiruzhuImage
()
{
weiruzhuImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'weiruzhu.png'
return
process
.
uniEnv
.
qn_base_url
+
'weiruzhu.png'
},
},
imageStyle
()
{
return
'width:628rpx; margin-top:816rpx; margin-left:122rpx'
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
app
.
trackPage
(
'自营平台首页'
)
app
.
trackPage
(
'自营平台首页'
)
...
@@ -202,6 +214,7 @@ export default {
...
@@ -202,6 +214,7 @@ export default {
}
else
{
}
else
{
this
.
waitInit
=
true
this
.
waitInit
=
true
}
}
this
.
showMaskTip
()
},
},
onShow
()
{
onShow
()
{
// 每次进入页面都刷新入驻状态
// 每次进入页面都刷新入驻状态
...
@@ -444,6 +457,10 @@ export default {
...
@@ -444,6 +457,10 @@ export default {
url
:
'/pages/mine/customer/index'
+
'?type=exclusive'
,
url
:
'/pages/mine/customer/index'
+
'?type=exclusive'
,
})
})
},
},
// 显示提示蒙版
showMaskTip
()
{
this
.
showMask
=
true
},
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/index/mine.vue
View file @
7f8f7c59
...
@@ -57,13 +57,32 @@
...
@@ -57,13 +57,32 @@
<view>
<view>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
<MaskTip
:show=
"showMask"
imageName=
"mengceng4.png"
:imageStyle=
"imageStyle"
name=
"order_tip"
@
click=
"showMask1 = true"
/>
<MaskTip
:show=
"showMask1"
imageName=
"mengceng3.png"
:imageStyle=
"imageStyle1"
name=
"history_tip"
:timeout=
"false"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
login
from
"@/utils/login.js"
;
import
login
from
"@/utils/login.js"
;
import
MaskTip
from
'@/components/mask-tip/index.vue'
const
app
=
getApp
();
const
app
=
getApp
();
export
default
{
export
default
{
components
:
{
MaskTip
},
data
()
{
data
()
{
return
{
return
{
serviceTel
:
'18124099271'
,
serviceTel
:
'18124099271'
,
...
@@ -73,6 +92,8 @@
...
@@ -73,6 +92,8 @@
wodebeijingImage
:
''
,
wodebeijingImage
:
''
,
placeholderImage
:
''
,
placeholderImage
:
''
,
needSettled
:
true
,
// 需要入驻
needSettled
:
true
,
// 需要入驻
showMask
:
false
,
showMask1
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -190,6 +211,12 @@
...
@@ -190,6 +211,12 @@
},
},
isSuperuser
()
{
isSuperuser
()
{
return
this
.
vuex_superuser
return
this
.
vuex_superuser
},
imageStyle
()
{
return
'width:602rpx; margin-top:560rpx; margin-left:28rpx'
},
imageStyle1
()
{
return
'width:596rpx; margin-top:736rpx; margin-left:28rpx'
}
}
},
},
watch
:
{
watch
:
{
...
@@ -212,6 +239,7 @@
...
@@ -212,6 +239,7 @@
}
}
this
.
wodebeijingImage
=
this
.
qnFile
(
'wodebeijing-jb.png'
)
this
.
wodebeijingImage
=
this
.
qnFile
(
'wodebeijing-jb.png'
)
this
.
placeholderImage
=
this
.
qnFile
(
'touxiang.png'
)
this
.
placeholderImage
=
this
.
qnFile
(
'touxiang.png'
)
this
.
showMaskTip
()
},
},
onShow
()
{
onShow
()
{
// 更新是否需要入住
// 更新是否需要入住
...
@@ -279,7 +307,11 @@
...
@@ -279,7 +307,11 @@
}
else
{
}
else
{
this
.
$u
.
route
({
url
:
"pages/login/index"
})
this
.
$u
.
route
({
url
:
"pages/login/index"
})
}
}
}
},
// 显示提示蒙版
showMaskTip
()
{
this
.
showMask
=
true
},
}
}
}
}
</
script
>
</
script
>
...
...
src/pages/index/order.vue
View file @
7f8f7c59
...
@@ -93,6 +93,12 @@
...
@@ -93,6 +93,12 @@
</view>
</view>
<!-- 悬浮按钮 -->
<!-- 悬浮按钮 -->
<!-- <EusingList type="collapse" /> -->
<!-- <EusingList type="collapse" /> -->
<MaskTip
:show=
"showMask"
imageName=
"mengceng1.png"
:imageStyle=
"imageStyle"
name=
"today_tip"
/>
</TabBarPage>
</TabBarPage>
</template>
</template>
...
@@ -101,6 +107,8 @@ import TabBarPage from '@/components/tabBarList/index.vue'
...
@@ -101,6 +107,8 @@ import TabBarPage from '@/components/tabBarList/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
import
upload
from
'@/components/upload/task.js'
import
upload
from
'@/components/upload/task.js'
import
MaskTip
from
'@/components/mask-tip/index.vue'
// import EusingList from '@/components/order/eusingList.vue'
// import EusingList from '@/components/order/eusingList.vue'
export
default
{
export
default
{
...
@@ -108,6 +116,7 @@ export default {
...
@@ -108,6 +116,7 @@ export default {
TabBarPage
,
TabBarPage
,
OrderCell
,
OrderCell
,
NoOrder
,
NoOrder
,
MaskTip
,
// EusingList,
// EusingList,
},
},
data
()
{
data
()
{
...
@@ -171,6 +180,7 @@ export default {
...
@@ -171,6 +180,7 @@ export default {
old
:
{
old
:
{
scrollTop
:
0
,
scrollTop
:
0
,
},
},
showMask
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -281,6 +291,9 @@ export default {
...
@@ -281,6 +291,9 @@ export default {
noOrderCustomStyle
()
{
noOrderCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
},
imageStyle
()
{
return
'width:546rpx; margin-top:80rpx; margin-left:100rpx'
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
getApp
().
trackPage
(
'订单首页'
)
...
@@ -292,6 +305,7 @@ export default {
...
@@ -292,6 +305,7 @@ export default {
this
.
indexStatus
[
this
.
curNow
].
indexOf
(
e
.
type
)
this
.
indexStatus
[
this
.
curNow
].
indexOf
(
e
.
type
)
)
)
}
}
this
.
showMaskTip
()
},
},
onShow
()
{
onShow
()
{
if
(
this
.
uploadTask
.
length
>
0
)
{
if
(
this
.
uploadTask
.
length
>
0
)
{
...
@@ -488,6 +502,10 @@ export default {
...
@@ -488,6 +502,10 @@ export default {
this
.
scrollTop
=
0
this
.
scrollTop
=
0
})
})
},
},
// 显示提示蒙版
showMaskTip
()
{
this
.
showMask
=
true
},
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/mine/wallet/index.vue
View file @
7f8f7c59
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<view
class=
"wallet-view"
>
<view
class=
"wallet-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#F4F5F7"
title=
"我的钱包"
titleColor=
"#333333"
<u-navbar
back-icon-color=
"#333333"
background=
"#F4F5F7"
title=
"我的钱包"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"wallet-content-view"
>
<view
class=
"wallet-content-view"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<image
class=
"header-image"
:src=
"qnFile('qianbaobeijing.png')"
></image>
<image
class=
"header-image"
:src=
"qnFile('qianbaobeijing.png')"
></image>
</view>
</view>
<view
class=
"survey-view"
>
<view
class=
"survey-view"
>
<view
class=
"survey-top-view"
>
<view
class=
"survey-top-view"
>
...
@@ -51,6 +51,12 @@
...
@@ -51,6 +51,12 @@
</view>
</view>
</view>
</view>
</view>
</view>
<MaskTip
:show=
"showMask"
imageName=
"mengceng5.png"
:imageStyle=
"imageStyle"
name=
"settlement_tip"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -58,9 +64,12 @@
...
@@ -58,9 +64,12 @@
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
import
util
from
'@/utils/util.js'
import
util
from
'@/utils/util.js'
import
Statement
from
"@/components/mine/statement.vue"
import
Statement
from
"@/components/mine/statement.vue"
import
MaskTip
from
'@/components/mask-tip/index.vue'
export
default
{
export
default
{
components
:
{
components
:
{
Statement
Statement
,
MaskTip
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -74,6 +83,7 @@
...
@@ -74,6 +83,7 @@
loading
:
true
,
loading
:
true
,
statementList
:
[],
statementList
:
[],
settledAmount
:
0
,
settledAmount
:
0
,
showMask
:
false
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -119,21 +129,25 @@
...
@@ -119,21 +129,25 @@
'color'
:
'#2272FF'
,
'color'
:
'#2272FF'
,
'margin-bottom'
:
'20rpx'
'margin-bottom'
:
'20rpx'
};
};
},
},
pages
()
{
pages
()
{
return
[
'settlement'
,
'statement'
]
return
[
'settlement'
,
'statement'
]
},
imageStyle
()
{
return
'width:690rpx; margin-top:542rpx; margin-left:30rpx'
}
}
},
},
onLoad
()
{
onLoad
()
{
getApp
().
trackPage
(
'我的钱包页'
)
getApp
().
trackPage
(
'我的钱包页'
)
this
.
showMaskTip
()
},
},
onShow
()
{
onShow
()
{
// 未登录,先跳转登录
// 未登录,先跳转登录
if
(
!
this
.
vuex_token
)
{
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
route
({
url
:
'pages/login/index'
})
this
.
$u
.
route
({
url
:
'pages/login/index'
})
}
}
this
.
loadAssets
()
this
.
loadAssets
()
this
.
loadStatement
()
this
.
loadStatement
()
},
},
methods
:
{
methods
:
{
qnFile
(
src
)
{
qnFile
(
src
)
{
...
@@ -142,21 +156,21 @@
...
@@ -142,21 +156,21 @@
// 提现
// 提现
handleClickWithdraw
()
{
handleClickWithdraw
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/mine/wallet/withdraw'
url
:
'pages/mine/wallet/withdraw'
})
})
},
},
handleClick
(
index
)
{
handleClick
(
index
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/mine/wallet/'
+
this
.
pages
[
index
]
url
:
'pages/mine/wallet/'
+
this
.
pages
[
index
]
})
})
},
},
handleClickCell
(
orderId
)
{
handleClickCell
(
orderId
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/order/detail?&type=other'
,
url
:
'pages/order/detail?&type=other'
,
params
:
{
params
:
{
id
:
orderId
id
:
orderId
}
}
})
})
},
},
async
loadAssets
()
{
async
loadAssets
()
{
let
self
=
this
let
self
=
this
...
@@ -168,9 +182,9 @@
...
@@ -168,9 +182,9 @@
async
loadStatement
()
{
async
loadStatement
()
{
let
self
=
this
let
self
=
this
self
.
loading
=
true
self
.
loading
=
true
let
res
=
await
self
.
$u
.
api
.
listStatement
({
let
res
=
await
self
.
$u
.
api
.
listStatement
({
starDate
:
this
.
moment
(
new
Date
()).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
),
starDate
:
this
.
moment
(
new
Date
()).
startOf
(
'month'
).
format
(
'YYYY-MM-DD'
),
endDate
:
this
.
moment
(
new
Date
()).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
endDate
:
this
.
moment
(
new
Date
()).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
})
})
self
.
loading
=
false
self
.
loading
=
false
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
==
200
)
{
...
@@ -183,28 +197,32 @@
...
@@ -183,28 +197,32 @@
}
}
}
}
},
},
// 显示提示蒙版
showMaskTip
()
{
this
.
showMask
=
true
},
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wallet-view
{
.wallet-view
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100vh
;
height
:
100vh
;
.wallet-content-view
{
.wallet-content-view
{
position
:
relative
;
position
:
relative
;
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
.header-view
{
.header-view
{
position
:
absolute
;
position
:
absolute
;
width
:
100%
;
width
:
100%
;
padding-top
:
10rpx
;
padding-top
:
10rpx
;
padding-left
:
14rpx
;
padding-left
:
14rpx
;
.header-image
{
.header-image
{
width
:
730rpx
;
width
:
730rpx
;
height
:
420rpx
;
height
:
420rpx
;
}
}
}
}
...
@@ -310,5 +328,5 @@
...
@@ -310,5 +328,5 @@
border-radius
:
0
0
12rpx
12rpx
;
border-radius
:
0
0
12rpx
12rpx
;
}
}
}
}
}
}
</
style
>
</
style
>
src/store/index.js
View file @
7f8f7c59
...
@@ -12,7 +12,7 @@ try {
...
@@ -12,7 +12,7 @@ try {
}
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'uploadTotal'
,
'uploadSuccess'
,
'vuex_superuser'
];
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'uploadTotal'
,
'uploadSuccess'
,
'vuex_superuser'
,
'vuex_not_first'
];
// 保存变量到本地存储中
// 保存变量到本地存储中
const
saveLifeData
=
function
(
key
,
value
)
{
const
saveLifeData
=
function
(
key
,
value
)
{
...
@@ -50,6 +50,8 @@ const store = new Vuex.Store({
...
@@ -50,6 +50,8 @@ const store = new Vuex.Store({
uploadTotal
:
lifeData
.
uploadTotal
?
lifeData
.
uploadTotal
:
0
,
uploadTotal
:
lifeData
.
uploadTotal
?
lifeData
.
uploadTotal
:
0
,
// 已上传数量
// 已上传数量
uploadSuccess
:
lifeData
.
uploadSuccess
?
lifeData
.
uploadSuccess
:
0
,
uploadSuccess
:
lifeData
.
uploadSuccess
?
lifeData
.
uploadSuccess
:
0
,
// 初次登录
vuex_not_first
:
lifeData
.
vuex_not_first
?
lifeData
.
vuex_not_first
:
{},
},
},
mutations
:
{
mutations
:
{
$uStore
(
state
,
payload
)
{
$uStore
(
state
,
payload
)
{
...
...
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