commonApplications.vue
4.44 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<template>
<view>
<view class="commonApplicationsCss usuallyCard">
<view class="text-lg">
常用应用
</view>
<view class="margin-top-lg">
<u-line></u-line>
</view>
<u-grid :border="false" col="4" @click="goToAppPage">
<u-grid-item v-for="(appListItem,appListIndex) in appList" :key="appListIndex">
<view class="margin-top">
<u-image width="30px" height="35px" mode="widthFix" :src="appListItem.icon"
:customStyle="{marginTop:'5px'}"></u-image>
</view>
<text class="text-sm text-gray margin-top-sm">{{appListItem.name}}</text>
</u-grid-item>
</u-grid>
</view>
</view>
</template>
<script>
export default {
components: {},
props: {
},
data() {
return {
appList: [{
name: '报修工单',
icon: "/static/images/mine/applist-01.png",
path: "/pages/mine/appList/repairWorkOrder/repairWorkOrder"
},
{
name: '退瓶列表',
icon: "/static/images/mine/applist-02.png",
path: "/pages/mine/appList/listOfBottleReturn/listOfBottleReturn"
},
{
name: '气瓶回收列表',
icon: "/static/images/mine/applist-03.png",
path: "/pages/mine/appList/deaerationList/deaerationList"
}, {
name: '气瓶查看',
icon: "/static/images/mine/applist-04.png",
path: ""
},
{
name: '积分商城',
icon: "/static/images/mine/applist-05.png",
path: "/pages/mine/emptyPage"
},
{
name: '入户安检',
icon: "/static/images/mine/applist-06.png",
path: '/pages/mine/appList/homeSecurity/homeSecurityCheck'
},
{
name: '我的押金',
icon: "/static/images/mine/applist-07.png",
path: "/pages/mine/emptyPage"
},
{
name: '地址管理',
icon: "/static/images/mine/applist-08.png",
path: "/pages/mine/appList/addressManagement/addressManagement"
}, {
name: '编辑信息',
icon: "/static/images/mine/applist-09.png",
path: "/pages/mine/appList/editInformation/editInformation"
},
// {
// name: '联系客服',
// icon: "/static/images/mine/applist-10.png",
// path:""
// },
{
name: '联系我们',
icon: "/static/images/mine/applist-11.png",
path: ""
},
{
name: '员工信息',
icon: "/static/images/mine/applist-11.png",
path: "/pages/scanCodeUserInfo/index"
}
],
callPhone: '',
qptm: '',
}
},
computed: {
},
onLoad(data) {
if (data.qptm) {
this.qptm = data.qptm;
this.getGasInformation();
}
},
methods: {
async getGasInformation() {
let query = {
qptm: this.qptm
}
const result = await this.$api.gasApi.getDetailByQuery(query);
let {
code,
value
} = result;
let data = code === 200 ? value : null;
this.list = this.$assignValues(data, this.list);
},
async getPhone() {
let params = {
pageBean: {
page: 1,
pageSize: 10,
showTotal: true
},
querys: [{
property: 'f_key',
value: 'system.pt.lxdh',
group: 'advance',
relation: 'AND',
operation: 'EQUAL'
}]
}
let result = await this.$api.chargingInformationApi.getSecurityInfo(params);
let {
rows
} = result;
let infoValue = rows[0].f_value;
this.callPhone = infoValue;
let option = {
confirmText: "呼叫",
}
console.log('打印this.callPhonew', this.callPhone);
this.$modal.confirm(this.callPhone, '呼叫号码', option).then(() => {
// window.location.href = `tel:${this.callPhone}`
uni.makePhoneCall({
phoneNumber: this.callPhone, // 电话号码
success: function() {
console.log('拨号成功');
},
fail: function(err) {
console.log('拨号失败:', err);
}
});
}).catch(() => {
console.log("取消");
});
},
goToAppPage(app) {
console.log('打印goToAppPage',app);
if (this.appList[app].path) {
let toUrl = this.appList[app].path;
let urlName = this.appList[app].name
uni.navigateTo({
url: `${toUrl}?qptm=${this.qptm}&pageName=${urlName}`
})
} else {
if (app == 3) {
this.$emit('selectItem', app);
} else if (app == 9) {
this.getPhone();
} else {
this.$modal.msg('待开发');
}
}
}
}
}
</script>
<style lang="scss" scoped>
.commonApplicationsCss {
margin: 10px;
padding: 20px 10px 20px 10px;
}
</style>