Commit 5d8283708829f3bb74a02e0d60e3fa3b1df93529

Authored by fengwotao
1 parent 74ede03a

perf: app 优化首页相关代码

... ... @@ -5,32 +5,28 @@
5 5 <public-module></public-module>
6 6 <view class="form-page">
7 7 <u--form labelPosition="left" :model="feedbackData" :rules="rules" ref="myfeedBackFormRef">
8   - <u-form-item required label="主题" prop="feedbackInfo.title" borderBottom ref="item1">
  8 + <u-form-item required label="主题" prop="feedbackInfo.title" borderBottom>
9 9 <u--input placeholder="请输入主题" v-model="feedbackData.feedbackInfo.title" border="none">
10 10 </u--input>
11 11 </u-form-item>
12   - <u-form-item required label="姓名" prop="feedbackInfo.name" borderBottom ref="item1">
  12 + <u-form-item required label="姓名" prop="feedbackInfo.name" borderBottom>
13 13 <u--input placeholder="请输入姓名" v-model="feedbackData.feedbackInfo.name" border="none"></u--input>
14 14 </u-form-item>
15   - <view class="info">
16   - <view class="info-contain">
17   - <u-form-item required label="反馈" prop="feedbackInfo.message" borderBottom ref="item1">
18   - <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count>
19   - </u--textarea>
20   - </u-form-item>
21   - </view>
22   - </view>
  15 + <u-form-item required label="反馈" prop="feedbackInfo.message" borderBottom>
  16 + <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count>
  17 + </u--textarea>
  18 + </u-form-item>
23 19 <view class="feed-back-text" style="margin: 15px 0px 0px -16rpx;">上传图片(最多6张)</view>
24 20 <view class="info" style="margin-top: 15rpx;background: rgba(1, 1, 1, 0);">
25 21 <view class="info-contain">
26   - <u-form-item label="图片" prop="feedbackInfo.images" borderBottom ref="item1">
  22 + <u-form-item label="图片" prop="feedbackInfo.images" borderBottom>
27 23 <u-upload :capture="capture" :fileList="fileList1" @afterRead="afterRead"
28 24 @delete="deletePic" name="1" multiple :maxCount="6"></u-upload>
29 25 </u-form-item>
30 26 </view>
31 27 <view style="width:427rpx;margin:0 auto;">
32 28 <u-button class="buttonSty button-sty" shape="circle" type="primary" text="提交"
33   - customStyle="margin-top: 129rpx" @click="submit"></u-button>
  29 + customStyle="margin-top: 200rpx" @click="submit"></u-button>
34 30 </view>
35 31 </view>
36 32 </u--form>
... ... @@ -153,7 +149,7 @@
153 149 // #endif
154 150 if (!token) return uni.$u.toast('请登录后上传图片');
155 151 return new Promise((resolve, reject) => {
156   - let a = uni.uploadFile({
  152 + uni.uploadFile({
157 153 url: `${baseUrl.baseUrl}/yt/oss/upload`,
158 154 filePath: url,
159 155 name: 'file',
... ... @@ -186,7 +182,7 @@
186 182 .validate()
187 183 .then(async res => {
188 184 if (res) {
189   - let httpData = {
  185 + let data = {
190 186 title: this.feedbackData.feedbackInfo.title,
191 187 name: this.feedbackData.feedbackInfo.name,
192 188 images: this.feedbackData.feedbackInfo.images.length == 0 ? '' : JSON
... ... @@ -194,11 +190,8 @@
194 190 this.feedbackData.feedbackInfo.images),
195 191 message: this.feedbackData.feedbackInfo.message
196 192 };
197   - const res = await api.feedbackApi.postFeedBackApi(httpData)
198   - uni.showToast({
199   - title: '意见反馈提交成功~',
200   - icon: 'none'
201   - });
  193 + const res = await api.feedbackApi.postFeedBackApi(data)
  194 + uni.$u.toast('意见反馈提交成功~');
202 195 setTimeout(() => {
203 196 uni.navigateBack();
204 197 }, 500);
... ... @@ -213,58 +206,7 @@
213 206 </script>
214 207
215 208 <style lang="scss" scoped>
216   - .feedback-page {
217   - min-height: 100vh;
218   - background-color: #f8f9fa;
219   - padding-top: 9rpx;
220   - padding-left: 27rpx;
221   - overflow-y: scroll;
222   - overflow: hidden;
223   - }
224   -
225   - .form-page {
226   - width: 700rpx;
227   - background-color: #ffffff;
228   - border-radius: 10px;
229   - margin-top: 20rpx;
230   - padding-left: 15rpx;
231   - padding: 0 20rpx;
232   - height: 500rpx;
233   -
234   - .info {
235   - width: 700rpx;
236   - background-color: #ffffff;
237   - border-radius: 10px;
238   - margin-top: 100rpx;
239   - height: 256rpx;
240   - margin-left: -20rpx;
241   -
242   - .info-contain {
243   - margin: 0rpx 27rpx;
244   -
245   - /deep/ .u-line {
246   - display: none !important;
247   - }
248   -
249   - /deep/ .u-form-item__body__left__content__label {
250   - display: none !important;
251   - }
252   -
253   - /deep/.u-form-item__body__right {
254   - margin-left: -106rpx;
255   - }
256   -
257   - /deep/.u-textarea--radius {
258   - border: none !important;
259   - }
260   - }
261   - }
262   -
263   - /deep/.u-button--primary {
264   - background-color: #377DFF !important;
265   - border-color: #377DFF !important;
266   - }
267   - }
  209 + @import "./static/feedback.scss";
268 210
269 211 //#ifndef MP
270 212 .buttonSty {
... ... @@ -272,4 +214,4 @@
272 214 }
273 215
274 216 //#endif
275   -</style>
  217 +</style>
\ No newline at end of file
... ...
  1 +.feedback-page {
  2 + min-height: 100vh;
  3 + background-color: #f8f9fa;
  4 + padding-top: 9rpx;
  5 + padding-left: 27rpx;
  6 + overflow-y: scroll;
  7 + overflow: hidden;
  8 + }
  9 +
  10 + .form-page {
  11 + width: 700rpx;
  12 + background-color: #ffffff;
  13 + border-radius: 10px;
  14 + margin-top: 20rpx;
  15 + padding-left: 15rpx;
  16 + padding: 0 20rpx;
  17 + height: 860rpx;
  18 +
  19 + .info {
  20 + width: 700rpx;
  21 + background-color: #ffffff;
  22 + border-radius: 10px;
  23 + margin-top: 100rpx;
  24 + height: 256rpx;
  25 + margin-left: -20rpx;
  26 +
  27 + .info-contain {
  28 + margin: 0rpx 27rpx;
  29 +
  30 + /deep/ .u-line {
  31 + display: none !important;
  32 + }
  33 +
  34 + /deep/ .u-form-item__body__left__content__label {
  35 + display: none !important;
  36 + }
  37 +
  38 + /deep/.u-form-item__body__right {
  39 + margin-left: -106rpx;
  40 + }
  41 +
  42 + /deep/.u-textarea--radius {
  43 + border: none !important;
  44 + }
  45 + }
  46 + }
  47 +
  48 + /deep/.u-button--primary {
  49 + background-color: #377DFF !important;
  50 + border-color: #377DFF !important;
  51 + }
  52 + }
\ No newline at end of file
... ...
1 1 <template>
2   - <view class="status-page">
3   - <view style="margin-left:15rpx;background-color: #f8f9fa;position:fixed;top:0rpx;z-index: 99999;">
4   - <view style="height:35rpx;background-color: #f8f9fa;"></view>
  2 + <view class="configuation-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view class="configuation-header">
  6 + <view class="header-gap"></view>
5 7 <view class="u-flex search-top">
6 8 <view class="search-main">
7 9 <u--input @change="inputChanged" prefixIcon="search" placeholder="请输入组态名称" border="surround"
... ... @@ -10,8 +12,6 @@
10 12 </view>
11 13 </view>
12 14 <view style="height:35rpx"></view>
13   - <!-- 公共组件-每个页面必须引入 -->
14   - <public-module></public-module>
15 15 <!-- 自带分页组件 -->
16 16 <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback"
17 17 @up="upCallback">
... ... @@ -25,7 +25,6 @@
25 25 </view>
26 26 <mescroll-empty v-if="!list.length" />
27 27 </mescroll-body>
28   - <!-- 自带分页组件 -->
29 28 <view style="height: 60rpx;"></view>
30 29 </view>
31 30 </template>
... ... @@ -38,7 +37,7 @@
38 37 mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
39 38 data() {
40 39 return {
41   - defaultConfigImage: '../../../static/test.png',
  40 + defaultConfigImage: '/static/test.png',
42 41 page: {
43 42 num: 0,
44 43 size: 10
... ... @@ -117,4 +116,4 @@
117 116
118 117 <style lang="scss" scoped>
119 118 @import '../static/configuration.scss';
120   -</style>
  119 +</style>
\ No newline at end of file
... ...
... ... @@ -11,7 +11,6 @@
11 11 data() {
12 12 return {
13 13 showConfiguration: '',
14   - defauleConfigImage: 'https://dev.thingskit.com',
15 14 params: ''
16 15 };
17 16 },
... ...
1   -<template>
2   - <view class="index-page">
3   - <!-- 公共组件-每个页面必须引入 -->
4   - <public-module></public-module>
5   - <view>
6   - <!-- 基础统计 -->
7   - <view class="basic-sty">
8   - <view class="basic-text"><text class="text text-bold">基础统计</text></view>
9   - <view class="basic">
10   - <view class="basic-item">
11   - <view class="item-child-top u-flex">
12   - <image class="item-image" src="../../static/device-total.png"></image>
13   - <text class="item-text home-text-muted">设备统计</text>
14   - </view>
15   - <view class="item-child-bottom u-flex">
16   - <view @click="navigatorDeviceStatus('ONLINE')" class="u-flex sigle-child">
17   - <view class="sigle-text">
18   - <text class="home-text-total">{{ deviceData.onLine }}</text>
19   - </view>
20   - <view class="sigle-value"><text class="home-text-total-bottom">在线</text></view>
21   - </view>
22   - <view @click="navigatorDeviceStatus('OFFLINE')" class="u-flex sigle-child">
23   - <view class="sigle-text">
24   - <text class="home-text-total">{{ deviceData.offLine }}</text>
25   - </view>
26   - <view class="sigle-value"><text class="home-text-total-bottom">离线</text></view>
27   - </view>
28   - <view @click="navigatorDeviceStatus('INACTIVE')" class="u-flex sigle-child">
29   - <view class="sigle-text">
30   - <text class="home-text-total">{{ deviceData.inActive }}</text>
31   - </view>
32   - <view class="sigle-value"><text class="home-text-total-bottom">待激活</text></view>
33   - </view>
34   - </view>
35   - </view>
36   - <view class="basic-item">
37   - <view class="item-child-top u-flex">
38   - <image class="item-image" src="../../static/alert.png"></image>
39   - <text class="item-text home-text-muted">告警统计</text>
40   - </view>
41   - <view class="item-child-bottom u-flex">
42   - <view @click="navigatorAlarmStatus(['ACTIVE_UNACK'])"
43   - class="u-flex sigle-child">
44   - <view class="sigle-text">
45   - <text class="home-text-total">{{ alertData.activedAlarm }}</text>
46   - </view>
47   - <view class="sigle-value"><text class="home-text-total-bottom">未处理</text></view>
48   - </view>
49   - <view @click="navigatorAlarmStatus('CLEARED_ACK')" class="u-flex sigle-child">
50   - <view class="sigle-text">
51   - <text class="home-text-total">{{ alertData.clearedAck }}</text>
52   - </view>
53   - <view class="sigle-value"><text class="home-text-total-bottom">已处理</text></view>
54   - </view>
55   - <view @click="navigatorAlarmStatus('CLEARED_UNACK')" class="u-flex sigle-child">
56   - <view class="sigle-text">
57   - <text class="home-text-total">{{ alertData.clearedUnack }}</text>
58   - </view>
59   - <view class="sigle-value"><text class="home-text-total-bottom">误报</text></view>
60   - </view>
61   - </view>
62   - </view>
63   - </view>
64   - </view>
65   - <!-- 基础统计 -->
66   - <!-- 四宫格CSS最新网格布局-->
67   - <view class="grid-container">
68   - <!-- <view class="grid-item" @click="showToastWip()">
69   - <view class="item-center">
70   - <view class="center"><image class="image" src="../../static/form.png"></image></view>
71   - <view class="center-text"><text class="text text-muted">维修工单</text></view>
72   - </view>
73   - </view> -->
74   - <view @click="openCamera" class="grid-item">
75   - <view class="item-center">
76   - <view class="center">
77   - <image class="image" src="../../static/camer.png"></image>
78   - </view>
79   - <view class="center-text"><text class="text text-muted" style="">摄像头管理</text></view>
80   - </view>
81   - </view>
82   - <!-- <view class="grid-item" @click="showToastWip()">
83   - <view class="item-center">
84   - <view class="center"><image class="image" src="../../static/device.png"></image></view>
85   - <view class="center-text"><text class="text text-muted">设备接入</text></view>
86   - </view>
87   - </view> -->
88   - <view @click="openOrgStatus" class="grid-item">
89   - <view class="item-center">
90   - <view class="center">
91   - <image class="image" src="../../static/status.png"></image>
92   - </view>
93   - <view class="center-text"><text class="text text-muted">组态</text></view>
94   - </view>
95   - </view>
96   - </view>
97   - <!-- 四宫格 -->
98   - </view>
99   - <f-tabbar></f-tabbar>
100   - </view>
101   -</template>
102   -
103   -<script>
104   - import fTabbar from '@/components/module/f-tabbar/f-tabbar';
105   - import {
106   - mapActions
107   - } from 'vuex';
  1 +<template>
  2 + <view class="index-page">
  3 + <!-- 公共组件-每个页面必须引入 -->
  4 + <public-module></public-module>
  5 + <view>
  6 + <!-- 基础统计 -->
  7 + <view class="basic-sty">
  8 + <view class="basic-text"><text class="text text-bold">基础统计</text></view>
  9 + <view class="basic">
  10 + <view class="basic-item" v-for="(item,index) in basicStatistics" :key="index">
  11 + <view class="item-child-top u-flex">
  12 + <image class="item-image" :src="item.icon"></image>
  13 + <text class="item-text home-text-muted">{{item.text}}</text>
  14 + </view>
  15 + <view class="item-child-bottom u-flex">
  16 + <view @click="navigatorPage(item,item.leftParam)" class="u-flex sigle-child">
  17 + <view class="sigle-text">
  18 + <text class="home-text-total">{{item.value.leftValue}}</text>
  19 + </view>
  20 + <view class="sigle-value"><text
  21 + class="home-text-total-bottom">{{item.label.leftText}}</text></view>
  22 + </view>
  23 + <view @click="navigatorPage(item,item.centerParam)" class="u-flex sigle-child">
  24 + <view class="sigle-text">
  25 + <text class="home-text-total">{{item.value.centerValue}}</text>
  26 + </view>
  27 + <view class="sigle-value"><text
  28 + class="home-text-total-bottom">{{item.label.centerText}}</text></view>
  29 + </view>
  30 + <view @click="navigatorPage(item,item.rightParam)" class="u-flex sigle-child">
  31 + <view class="sigle-text">
  32 + <text class="home-text-total">{{item.value.rightrValue}}</text>
  33 + </view>
  34 + <view class="sigle-value"><text
  35 + class="home-text-total-bottom">{{item.label.rightText}}</text></view>
  36 + </view>
  37 + </view>
  38 + </view>
  39 + </view>
  40 + </view>
  41 + <!-- 网格信息 -->
  42 + <view class="grid-container">
  43 + <view v-for="(item,index) in basicGridList" :key="index" @click="handleEvent(item.event)"
  44 + class="grid-item">
  45 + <view class="item-center">
  46 + <view class="center">
  47 + <image class="image" :src="item.icon"></image>
  48 + </view>
  49 + <view class="center-text"><text class="text text-muted" style="">{{item.text}}</text></view>
  50 + </view>
  51 + </view>
  52 + </view>
  53 + </view>
  54 + <f-tabbar></f-tabbar>
  55 + </view>
  56 +</template>
  57 +
  58 +<script>
  59 + import fTabbar from '@/components/module/f-tabbar/f-tabbar';
  60 + import {
  61 + mapActions
  62 + } from 'vuex';
108 63 import api from '@/api/index.js'
109   - import { useNavigateTo } from '@/plugins/utils.js'
110   -
111   - export default {
112   - components: {
113   - fTabbar
114   - },
115   - data() {
116   - return {
117   - deviceData: {
118   - onLine: 0,
119   - offLine: 0,
120   - inActive: 0
121   - },
122   - alertData: {
123   - activedAlarm: 0,
124   - clearedAck: 0,
125   - clearedUnack: 0
126   - }
127   - };
128   - },
129   - onLoad() {
130   - // 隐藏原生的tabbar
131   - uni.hideTabBar();
132   - if(getApp().getBindNot()){
133   - return
134   - }
135   - this.getDeviceTotalData();
136   - uni.setStorageSync('getConfiguration', {
137   - isConfiguration: false
138   - });
139   - uni.removeStorageSync('getConfiguration');
  64 + import {
  65 + useNavigateTo
  66 + } from '@/plugins/utils.js'
  67 +
  68 + export default {
  69 + components: {
  70 + fTabbar
  71 + },
  72 + data() {
  73 + return {
  74 + basicGridList: [{
  75 + event: 'openCamera',
  76 + icon: '/static/camer.png',
  77 + text: '摄像头管理'
  78 + },
  79 + {
  80 + event: 'openConfiguration',
  81 + icon: '/static/status.png',
  82 + text: '组态'
  83 + },
  84 + ],
  85 + basicStatistics: [{
  86 + text: '设备统计',
  87 + icon: '/static/device-total.png',
  88 + leftParam: 'ONLINE',
  89 + centerParam: 'OFFLINE',
  90 + rightParam: 'INACTIVE',
  91 + value: {
  92 + leftValue: 0,
  93 + centerValue: 0,
  94 + rightrValue: 0
  95 + },
  96 + label: {
  97 + leftText: "在线",
  98 + centerText: "离线",
  99 + rightText: "待激活"
  100 + }
  101 + },
  102 + {
  103 + text: '告警统计',
  104 + icon: '/static/alert.png',
  105 + leftParam: ['ACTIVE_UNACK'],
  106 + centerParam: 'CLEARED_ACK',
  107 + rightParam: 'CLEARED_UNACK',
  108 + value: {
  109 + leftValue: 0,
  110 + centerValue: 0,
  111 + rightrValue: 0
  112 + },
  113 + label: {
  114 + leftText: "未处理",
  115 + centerText: "已处理",
  116 + rightText: "误报"
  117 + }
  118 + },
  119 + ]
  120 + };
  121 + },
  122 + onLoad() {
  123 + // 隐藏原生的tabbar
  124 + uni.hideTabBar();
  125 + if (getApp().getBindNot()) {
  126 + return
  127 + }
  128 + this.getDeviceTotalData();
  129 + uni.setStorageSync('getConfiguration', {
  130 + isConfiguration: false
  131 + });
  132 + uni.removeStorageSync('getConfiguration');
140 133 },
141 134 onPullDownRefresh() {
142 135 this.getDeviceTotalData();
143   - setTimeout(function () {
  136 + setTimeout(function() {
144 137 uni.stopPullDownRefresh();
145 138 uni.$u.toast('下拉刷新成功...');
146   - }, 1000);
147   - },
148   - methods: {
149   - ...mapActions(['updateBadgeTotal']),
150   - async getDeviceTotalData() {
151   - const res = await api.homeApi.getHomeStatisticsApi()
  139 + }, 800);
  140 + },
  141 + methods: {
  142 + ...mapActions(['updateBadgeTotal']),
  143 + async getDeviceTotalData() {
  144 + const res = await api.homeApi.getHomeStatisticsApi()
152 145 if (res) {
153   - for(let i in this.deviceData) Reflect.set(this.deviceData,i,res.totalDevice[i])
154   - for(let i in this.alertData) Reflect.set(this.alertData,i,res.totalAlarm[i])
155   - //异步实时更新告警徽标数
156   - this.updateBadgeTotal(res.totalAlarm?.activedAlarm);
157   - }
158   - },
159   - showToastWip() {
160   - uni.$u.toast('拼命开发中 ...');
161   - },
  146 + this.basicStatistics[0].value.leftValue = res.totalDevice.onLine
  147 + this.basicStatistics[0].value.centerValue = res.totalDevice.offLine
  148 + this.basicStatistics[0].value.rightrValue = res.totalDevice.inActive
  149 + this.basicStatistics[1].value.leftValue = res.totalAlarm.activedAlarm
  150 + this.basicStatistics[1].value.centerValue = res.totalAlarm.clearedAck
  151 + this.basicStatistics[1].value.rightrValue = res.totalAlarm.clearedUnack
  152 + //异步实时更新告警徽标数
  153 + this.updateBadgeTotal(res.totalAlarm?.activedAlarm);
  154 + }
  155 + },
162 156 openCamera() {
163   - useNavigateTo('camera/camera')
164   - },
165   - openOrgStatus() {
166   - useNavigateTo('configuration/configuration')
167   - },
168   - //告警状态查询
169   - navigatorAlarmStatus(e) {
170   - uni.reLaunch({
171   - url: '../alarm/alarm?type=' + JSON.stringify(e)
172   - });
173   - },
174   - //设备状态查询
175   - navigatorDeviceStatus(e) {
176   - uni.reLaunch({
177   - url: `../device/device?deviceState=${e}`
178   - });
179   - }
180   - }
181   - };
182   -</script>
183   -
184   -<style lang="scss" scoped>
185   - @import './static/index.scss';
186   -</style>
  157 + useNavigateTo('camera/camera')
  158 + },
  159 + openConfiguration() {
  160 + useNavigateTo('configuration/configuration')
  161 + },
  162 + handleEvent(event) {
  163 + if (event === 'openCamera') {
  164 + this.openCamera()
  165 + } else {
  166 + this.openConfiguration()
  167 + }
  168 + },
  169 + navigatorPage(item, type) {
  170 + const {
  171 + text
  172 + } = item
  173 + if (text === '设备统计') {
  174 + this.navigatorDeviceStatus(type)
  175 + } else {
  176 + this.navigatorAlarmStatus(type)
  177 + }
  178 + },
  179 + //告警状态查询
  180 + navigatorAlarmStatus(e) {
  181 + uni.reLaunch({
  182 + url: '../alarm/alarm?type=' + JSON.stringify(e)
  183 + });
  184 + },
  185 + //设备状态查询
  186 + navigatorDeviceStatus(e) {
  187 + uni.reLaunch({
  188 + url: `../device/device?deviceState=${e}`
  189 + });
  190 + }
  191 + }
  192 + };
  193 +</script>
  194 +
  195 +<style lang="scss" scoped>
  196 + @import './static/index.scss';
  197 +</style>
\ No newline at end of file
... ...
... ... @@ -12,6 +12,7 @@
12 12 mapState
13 13 } from 'vuex';
14 14 import api from '@/api/index.js'
  15 + import { useReLaunch } from '@/plugins/utils.js'
15 16
16 17 export default {
17 18 data() {
... ... @@ -29,16 +30,12 @@
29 30 created() {
30 31 if (!this.userInfo.isToken) {
31 32 setTimeout(() => {
32   - uni.reLaunch({
33   - url: '/publicLoginSubPage/public/login'
34   - });
35   - }, 1500);
  33 + useReLaunch('/publicLoginSubPage/public/login')
  34 + }, 1000);
36 35 } else {
37 36 setTimeout(() => {
38   - uni.reLaunch({
39   - url: '/pages/index/index'
40   - });
41   - }, 1500);
  37 + useReLaunch('/pages/index/index')
  38 + }, 1000);
42 39 }
43 40 },
44 41 computed: {
... ...
1   -.status-page {
  1 +.configuation-page {
2 2 background: #f8f9fa;
3 3 padding: 15rpx 15rpx;
4 4 min-height: 100vh;
5   - .search-top {
6   - justify-content: space-between;
7   - flex-direction: row;
8   - .search-main {
9   - width: 700rpx;
10   - margin-top: -34rpx;
  5 + .configuation-header{
  6 + margin-left:15rpx;
  7 + background-color: #f8f9fa;
  8 + position:fixed;
  9 + top:0rpx;
  10 + z-index: 99999;
  11 + .header-gap{
  12 + height:35rpx;
  13 + background-color: #f8f9fa;
  14 + }
  15 + .search-top {
  16 + justify-content: space-between;
  17 + flex-direction: row;
  18 + .search-main {
  19 + width: 700rpx;
  20 + margin-top: -34rpx;
  21 + }
11 22 }
12 23 }
  24 +
13 25 .configuation-container {
14 26 .configuation-item {
15 27 width: 750rpx;
... ...
... ... @@ -159,10 +159,17 @@ export const useNavigateTo = (path, param) => {
159 159 }
160 160
161 161 //封装uniapp跳转 reLaunch
162   -export const useReLaunch = (url) => {
163   - uni.reLaunch({
164   - url
165   - });
  162 +export const useReLaunch = (path, param) => {
  163 + if (!path) return
  164 + if (param) {
  165 + uni.reLaunch({
  166 + url: path + encodeURIComponent(JSON.stringify(param))
  167 + });
  168 + } else {
  169 + uni.reLaunch({
  170 + url: path
  171 + });
  172 + }
166 173 }
167 174
168 175 //封装uniapp showToast
... ...