Commit 7f8f7c59 authored by Facius's avatar Facius

feat: 蒙层提示

parent c6dc0333
<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>
...@@ -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>
......
...@@ -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>
......
...@@ -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>
......
...@@ -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: {
...@@ -122,10 +132,14 @@ ...@@ -122,10 +132,14 @@
}, },
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() {
// 未登录,先跳转登录 // 未登录,先跳转登录
...@@ -183,6 +197,10 @@ ...@@ -183,6 +197,10 @@
} }
} }
}, },
// 显示提示蒙版
showMaskTip() {
this.showMask = true
},
} }
} }
</script> </script>
......
...@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment