commonUse.vue
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<template>
<view class="commonUse">
<view class="hometit">常用功能</view>
<view class="commonList">
<view @click="handleChild">
<icon class="icon delivery"></icon>
<text>派件扫描</text>
</view>
<view @click="handleChild">
<icon class="icon sign"></icon>
<text>签收扫描</text>
</view>
<view>
<view @click="handleHistory">
<icon class="icon history"></icon>
<text>全部取派</text>
</view>
</view>
<view>
<view @click="handleNew">
<icon class="icon new"></icon>
<text>消息通知</text>
</view>
</view>
<view>
<navigator url="/pages/freight/index" open-type="redirect">
<icon class="icon freight"></icon>
<text>运费查询</text>
</navigator>
</view>
<view>
<view @click="handleTip">
<icon class="icon tip"></icon>
<text>签收提醒</text>
</view>
</view>
<view @click="handleChild">
<icon class="icon exclusive"></icon>
<text>专属取寄</text>
</view>
</view>
</view>
</template>
<script setup>
import { useStore } from "vuex";
// 获取父组件值、方法
const props = defineProps({});
const store = useStore(); //vuex获取储存数据
// 定义方法
const handleChild = () => {
uni.showToast({
title: "程序员哥哥正在实现中",
duration: 1000,
icon: "none",
});
};
// 历史派件
const handleHistory = () => {
store.commit("user/setTabIndex", 0);
store.commit("user/setNewType", null);
uni.navigateTo({
url: "/pages/history/index",
});
};
// 签收提醒
const handleTip = () => {
store.commit("user/setTaskStatus", -1);
uni.navigateTo({
url: "/pages/news/system?title=签收提醒&type=302",
});
};
// 消息通知
const handleNew = () => {
store.commit("user/setTabIndex", 1);
uni.navigateTo({
url: "/pages/news/index",
});
};
</script>
<style src="../index.scss" lang="scss"></style>