Commit dd2c2983c64ea499fb7ea23500c01cb65366db52
1 parent
1a0bdbe0
优化缴费页面
Showing
4 changed files
with
157 additions
and
208 deletions
src/api/fee/payFeeOrderApi.js
| @@ -3,309 +3,258 @@ import { getCommunityId } from '@/api/community/communityApi' | @@ -3,309 +3,258 @@ import { getCommunityId } from '@/api/community/communityApi' | ||
| 3 | 3 | ||
| 4 | // 查询费用对象信息 | 4 | // 查询费用对象信息 |
| 5 | export function listFeeObj(params) { | 5 | export function listFeeObj(params) { |
| 6 | - return new Promise( (resolve, reject) => { | ||
| 7 | - try { | ||
| 8 | - const communityId = getCommunityId() | ||
| 9 | - const response = request({ | ||
| 10 | - url: '/feeApi/listFeeObj', | ||
| 11 | - method: 'get', | ||
| 12 | - params: { | ||
| 13 | - ...params, | ||
| 14 | - communityId | ||
| 15 | - } | ||
| 16 | - }) | 6 | + return new Promise((resolve, reject) => { |
| 7 | + const communityId = getCommunityId() | ||
| 8 | + request({ | ||
| 9 | + url: '/feeApi/listFeeObj', | ||
| 10 | + method: 'get', | ||
| 11 | + params: { ...params, communityId } | ||
| 12 | + }).then(response => { | ||
| 17 | resolve(response.data) | 13 | resolve(response.data) |
| 18 | - } catch (error) { | 14 | + }).catch(error => { |
| 19 | reject(error) | 15 | reject(error) |
| 20 | - } | 16 | + }) |
| 21 | }) | 17 | }) |
| 22 | } | 18 | } |
| 23 | 19 | ||
| 24 | // 计算费用折扣 | 20 | // 计算费用折扣 |
| 25 | export function computeFeeDiscount(params) { | 21 | export function computeFeeDiscount(params) { |
| 26 | - return new Promise( (resolve, reject) => { | ||
| 27 | - try { | ||
| 28 | - const communityId = getCommunityId() | ||
| 29 | - const response = request({ | ||
| 30 | - url: '/feeDiscount/computeFeeDiscount', | ||
| 31 | - method: 'get', | ||
| 32 | - params: { | ||
| 33 | - ...params, | ||
| 34 | - communityId | ||
| 35 | - } | ||
| 36 | - }) | 22 | + return new Promise((resolve, reject) => { |
| 23 | + const communityId = getCommunityId() | ||
| 24 | + request({ | ||
| 25 | + url: '/feeDiscount/computeFeeDiscount', | ||
| 26 | + method: 'get', | ||
| 27 | + params: { ...params, communityId } | ||
| 28 | + }).then(response => { | ||
| 37 | resolve(response.data) | 29 | resolve(response.data) |
| 38 | - } catch (error) { | 30 | + }).catch(error => { |
| 39 | reject(error) | 31 | reject(error) |
| 40 | - } | 32 | + }) |
| 41 | }) | 33 | }) |
| 42 | } | 34 | } |
| 43 | 35 | ||
| 44 | // 计算缴费优惠券 | 36 | // 计算缴费优惠券 |
| 45 | export function computePayFeeCoupon(params) { | 37 | export function computePayFeeCoupon(params) { |
| 46 | - return new Promise( (resolve, reject) => { | ||
| 47 | - try { | ||
| 48 | - const communityId = getCommunityId() | ||
| 49 | - const response = request({ | ||
| 50 | - url: '/coupon.computePayFeeCoupon', | ||
| 51 | - method: 'get', | ||
| 52 | - params: { | ||
| 53 | - ...params, | ||
| 54 | - communityId | ||
| 55 | - } | ||
| 56 | - }) | 38 | + return new Promise((resolve, reject) => { |
| 39 | + const communityId = getCommunityId() | ||
| 40 | + request({ | ||
| 41 | + url: '/coupon/computePayFeeCoupon', | ||
| 42 | + method: 'get', | ||
| 43 | + params: { ...params, communityId } | ||
| 44 | + }).then(response => { | ||
| 57 | resolve(response.data) | 45 | resolve(response.data) |
| 58 | - } catch (error) { | 46 | + }).catch(error => { |
| 59 | reject(error) | 47 | reject(error) |
| 60 | - } | 48 | + }) |
| 61 | }) | 49 | }) |
| 62 | } | 50 | } |
| 63 | 51 | ||
| 64 | // 查询用户账户 | 52 | // 查询用户账户 |
| 65 | export function queryCommunityOwnerAccount(params) { | 53 | export function queryCommunityOwnerAccount(params) { |
| 66 | - return new Promise( (resolve, reject) => { | ||
| 67 | - try { | ||
| 68 | - const communityId = getCommunityId() | ||
| 69 | - const response = request({ | ||
| 70 | - url: '/account.queryCommunityOwnerAccount', | ||
| 71 | - method: 'get', | ||
| 72 | - params: { | ||
| 73 | - ...params, | ||
| 74 | - communityId | ||
| 75 | - } | ||
| 76 | - }) | 54 | + return new Promise((resolve, reject) => { |
| 55 | + const communityId = getCommunityId() | ||
| 56 | + request({ | ||
| 57 | + url: '/account/queryCommunityOwnerAccount', | ||
| 58 | + method: 'get', | ||
| 59 | + params: { ...params, communityId } | ||
| 60 | + }).then(response => { | ||
| 77 | resolve(response.data) | 61 | resolve(response.data) |
| 78 | - } catch (error) { | 62 | + }).catch(error => { |
| 79 | reject(error) | 63 | reject(error) |
| 80 | - } | 64 | + }) |
| 81 | }) | 65 | }) |
| 82 | } | 66 | } |
| 83 | 67 | ||
| 84 | // 查询押金信息 | 68 | // 查询押金信息 |
| 85 | export function queryFeeDeposit(params) { | 69 | export function queryFeeDeposit(params) { |
| 86 | - return new Promise( (resolve, reject) => { | ||
| 87 | - try { | ||
| 88 | - const communityId = getCommunityId() | ||
| 89 | - const response = request({ | ||
| 90 | - url: '/fee.queryFeeDeposit', | ||
| 91 | - method: 'get', | ||
| 92 | - params: { | ||
| 93 | - ...params, | ||
| 94 | - communityId, | ||
| 95 | - state: '1400' | ||
| 96 | - } | ||
| 97 | - }) | 70 | + return new Promise((resolve, reject) => { |
| 71 | + const communityId = getCommunityId() | ||
| 72 | + request({ | ||
| 73 | + url: '/fee/queryFeeDeposit', | ||
| 74 | + method: 'get', | ||
| 75 | + params: { ...params, communityId, state: '1400' } | ||
| 76 | + }).then(response => { | ||
| 98 | resolve(response.data) | 77 | resolve(response.data) |
| 99 | - } catch (error) { | 78 | + }).catch(error => { |
| 100 | reject(error) | 79 | reject(error) |
| 101 | - } | 80 | + }) |
| 102 | }) | 81 | }) |
| 103 | } | 82 | } |
| 104 | 83 | ||
| 105 | // 退押金 | 84 | // 退押金 |
| 106 | export function refundFeeDeposit(data) { | 85 | export function refundFeeDeposit(data) { |
| 107 | - return new Promise( (resolve, reject) => { | ||
| 108 | - try { | ||
| 109 | - data.communityId = getCommunityId() | ||
| 110 | - const response = request({ | ||
| 111 | - url: '/fee.refundFeeDeposit', | ||
| 112 | - method: 'post', | ||
| 113 | - data | ||
| 114 | - }) | 86 | + return new Promise((resolve, reject) => { |
| 87 | + data.communityId = getCommunityId() | ||
| 88 | + request({ | ||
| 89 | + url: '/fee/refundFeeDeposit', | ||
| 90 | + method: 'post', | ||
| 91 | + data | ||
| 92 | + }).then(response => { | ||
| 115 | resolve(response.data) | 93 | resolve(response.data) |
| 116 | - } catch (error) { | 94 | + }).catch(error => { |
| 117 | reject(error) | 95 | reject(error) |
| 118 | - } | 96 | + }) |
| 119 | }) | 97 | }) |
| 120 | } | 98 | } |
| 121 | 99 | ||
| 122 | // 缴费 | 100 | // 缴费 |
| 123 | export function payFee(data) { | 101 | export function payFee(data) { |
| 124 | - return new Promise( (resolve, reject) => { | ||
| 125 | - try { | ||
| 126 | - data.communityId = getCommunityId() | ||
| 127 | - const response = request({ | ||
| 128 | - url: '/fee.payFee', | ||
| 129 | - method: 'post', | ||
| 130 | - data | ||
| 131 | - }) | 102 | + return new Promise((resolve, reject) => { |
| 103 | + data.communityId = getCommunityId() | ||
| 104 | + request({ | ||
| 105 | + url: '/fee/payFee', | ||
| 106 | + method: 'post', | ||
| 107 | + data | ||
| 108 | + }).then(response => { | ||
| 132 | resolve(response.data) | 109 | resolve(response.data) |
| 133 | - } catch (error) { | 110 | + }).catch(error => { |
| 134 | reject(error) | 111 | reject(error) |
| 135 | - } | 112 | + }) |
| 136 | }) | 113 | }) |
| 137 | } | 114 | } |
| 138 | 115 | ||
| 139 | // 扫码支付 | 116 | // 扫码支付 |
| 140 | export function qrCodePayment(data) { | 117 | export function qrCodePayment(data) { |
| 141 | - return new Promise( (resolve, reject) => { | ||
| 142 | - try { | ||
| 143 | - data.communityId = getCommunityId() | ||
| 144 | - data.subServiceCode = 'fee.payFee' | ||
| 145 | - const response = request({ | ||
| 146 | - url: '/payment.qrCodePayment', | ||
| 147 | - method: 'post', | ||
| 148 | - data | ||
| 149 | - }) | 118 | + return new Promise((resolve, reject) => { |
| 119 | + data.communityId = getCommunityId() | ||
| 120 | + data.subServiceCode = 'fee.payFee' | ||
| 121 | + request({ | ||
| 122 | + url: '/payment/qrCodePayment', | ||
| 123 | + method: 'post', | ||
| 124 | + data | ||
| 125 | + }).then(response => { | ||
| 150 | resolve(response.data) | 126 | resolve(response.data) |
| 151 | - } catch (error) { | 127 | + }).catch(error => { |
| 152 | reject(error) | 128 | reject(error) |
| 153 | - } | 129 | + }) |
| 154 | }) | 130 | }) |
| 155 | } | 131 | } |
| 156 | 132 | ||
| 157 | // 检查支付状态 | 133 | // 检查支付状态 |
| 158 | export function checkPayFinish(data) { | 134 | export function checkPayFinish(data) { |
| 159 | - return new Promise( (resolve, reject) => { | ||
| 160 | - try { | ||
| 161 | - data.communityId = getCommunityId() | ||
| 162 | - data.subServiceCode = 'fee.payFee' | ||
| 163 | - const response = request({ | ||
| 164 | - url: '/payment.checkPayFinish', | ||
| 165 | - method: 'post', | ||
| 166 | - data | ||
| 167 | - }) | 135 | + return new Promise((resolve, reject) => { |
| 136 | + data.communityId = getCommunityId() | ||
| 137 | + data.subServiceCode = 'fee.payFee' | ||
| 138 | + request({ | ||
| 139 | + url: '/payment/checkPayFinish', | ||
| 140 | + method: 'post', | ||
| 141 | + data | ||
| 142 | + }).then(response => { | ||
| 168 | resolve(response.data) | 143 | resolve(response.data) |
| 169 | - } catch (error) { | 144 | + }).catch(error => { |
| 170 | reject(error) | 145 | reject(error) |
| 171 | - } | 146 | + }) |
| 172 | }) | 147 | }) |
| 173 | } | 148 | } |
| 174 | 149 | ||
| 175 | // 查询收据 | 150 | // 查询收据 |
| 176 | export function queryFeeReceipt(params) { | 151 | export function queryFeeReceipt(params) { |
| 177 | - return new Promise( (resolve, reject) => { | ||
| 178 | - try { | ||
| 179 | - const communityId = getCommunityId() | ||
| 180 | - const response = request({ | ||
| 181 | - url: '/feeReceipt/queryFeeReceipt', | ||
| 182 | - method: 'get', | ||
| 183 | - params: { | ||
| 184 | - ...params, | ||
| 185 | - communityId | ||
| 186 | - } | ||
| 187 | - }) | 152 | + return new Promise((resolve, reject) => { |
| 153 | + const communityId = getCommunityId() | ||
| 154 | + request({ | ||
| 155 | + url: '/feeReceipt/queryFeeReceipt', | ||
| 156 | + method: 'get', | ||
| 157 | + params: { ...params, communityId } | ||
| 158 | + }).then(response => { | ||
| 188 | resolve(response.data) | 159 | resolve(response.data) |
| 189 | - } catch (error) { | 160 | + }).catch(error => { |
| 190 | reject(error) | 161 | reject(error) |
| 191 | - } | 162 | + }) |
| 192 | }) | 163 | }) |
| 193 | } | 164 | } |
| 194 | 165 | ||
| 195 | // 查询打印页面 | 166 | // 查询打印页面 |
| 196 | export function listFeePrintPages(params) { | 167 | export function listFeePrintPages(params) { |
| 197 | - return new Promise( (resolve, reject) => { | ||
| 198 | - try { | ||
| 199 | - const communityId = getCommunityId() | ||
| 200 | - const response = request({ | ||
| 201 | - url: '/feePrintPage.listFeePrintPage', | ||
| 202 | - method: 'get', | ||
| 203 | - params: { | ||
| 204 | - ...params, | ||
| 205 | - communityId, | ||
| 206 | - state: 'T' | ||
| 207 | - } | ||
| 208 | - }) | 168 | + return new Promise((resolve, reject) => { |
| 169 | + const communityId = getCommunityId() | ||
| 170 | + request({ | ||
| 171 | + url: '/feePrintPage.listFeePrintPage', | ||
| 172 | + method: 'get', | ||
| 173 | + params: { ...params, communityId, state: 'T' } | ||
| 174 | + }).then(response => { | ||
| 209 | resolve(response.data) | 175 | resolve(response.data) |
| 210 | - } catch (error) { | 176 | + }).catch(error => { |
| 211 | reject(error) | 177 | reject(error) |
| 212 | - } | 178 | + }) |
| 213 | }) | 179 | }) |
| 214 | } | 180 | } |
| 215 | 181 | ||
| 216 | // 业主预存账户 | 182 | // 业主预存账户 |
| 217 | export function ownerPrestoreAccount(data) { | 183 | export function ownerPrestoreAccount(data) { |
| 218 | - return new Promise( (resolve, reject) => { | ||
| 219 | - try { | ||
| 220 | - data.communityId = getCommunityId() | ||
| 221 | - const response = request({ | ||
| 222 | - url: '/account.ownerPrestoreAccount', | ||
| 223 | - method: 'post', | ||
| 224 | - data | ||
| 225 | - }) | 184 | + return new Promise((resolve, reject) => { |
| 185 | + data.communityId = getCommunityId() | ||
| 186 | + request({ | ||
| 187 | + url: '/account/ownerPrestoreAccount', | ||
| 188 | + method: 'post', | ||
| 189 | + data | ||
| 190 | + }).then(response => { | ||
| 226 | resolve(response.data) | 191 | resolve(response.data) |
| 227 | - } catch (error) { | 192 | + }).catch(error => { |
| 228 | reject(error) | 193 | reject(error) |
| 229 | - } | 194 | + }) |
| 230 | }) | 195 | }) |
| 231 | } | 196 | } |
| 232 | 197 | ||
| 233 | // 查询房间信息 | 198 | // 查询房间信息 |
| 234 | export function queryRooms(params) { | 199 | export function queryRooms(params) { |
| 235 | - return new Promise( (resolve, reject) => { | ||
| 236 | - try { | ||
| 237 | - const communityId = getCommunityId() | ||
| 238 | - const response = request({ | ||
| 239 | - url: '/room.queryRooms', | ||
| 240 | - method: 'get', | ||
| 241 | - params: { | ||
| 242 | - ...params, | ||
| 243 | - communityId | ||
| 244 | - } | ||
| 245 | - }) | 200 | + return new Promise((resolve, reject) => { |
| 201 | + const communityId = getCommunityId() | ||
| 202 | + request({ | ||
| 203 | + url: '/room/queryRooms', | ||
| 204 | + method: 'get', | ||
| 205 | + params: { ...params, communityId } | ||
| 206 | + }).then(response => { | ||
| 246 | resolve(response.data) | 207 | resolve(response.data) |
| 247 | - } catch (error) { | 208 | + }).catch(error => { |
| 248 | reject(error) | 209 | reject(error) |
| 249 | - } | 210 | + }) |
| 250 | }) | 211 | }) |
| 251 | } | 212 | } |
| 252 | 213 | ||
| 253 | // 查询费用信息 | 214 | // 查询费用信息 |
| 254 | export function listFee(params) { | 215 | export function listFee(params) { |
| 255 | - return new Promise( (resolve, reject) => { | ||
| 256 | - try { | ||
| 257 | - const communityId = getCommunityId() | ||
| 258 | - const response = request({ | ||
| 259 | - url: '/fee.listFee', | ||
| 260 | - method: 'get', | ||
| 261 | - params: { | ||
| 262 | - ...params, | ||
| 263 | - communityId | ||
| 264 | - } | ||
| 265 | - }) | 216 | + return new Promise((resolve, reject) => { |
| 217 | + const communityId = getCommunityId() | ||
| 218 | + request({ | ||
| 219 | + url: '/fee/listFee', | ||
| 220 | + method: 'get', | ||
| 221 | + params: { ...params, communityId } | ||
| 222 | + }).then(response => { | ||
| 266 | resolve(response.data) | 223 | resolve(response.data) |
| 267 | - } catch (error) { | 224 | + }).catch(error => { |
| 268 | reject(error) | 225 | reject(error) |
| 269 | - } | 226 | + }) |
| 270 | }) | 227 | }) |
| 271 | } | 228 | } |
| 272 | 229 | ||
| 273 | // 查询费用配置 | 230 | // 查询费用配置 |
| 274 | export function listFeeConfigs(params) { | 231 | export function listFeeConfigs(params) { |
| 275 | - return new Promise( (resolve, reject) => { | ||
| 276 | - try { | ||
| 277 | - const communityId = getCommunityId() | ||
| 278 | - const response = request({ | ||
| 279 | - url: '/feeConfig.listFeeConfigs', | ||
| 280 | - method: 'get', | ||
| 281 | - params: { | ||
| 282 | - ...params, | ||
| 283 | - communityId | ||
| 284 | - } | ||
| 285 | - }) | 232 | + return new Promise((resolve, reject) => { |
| 233 | + const communityId = getCommunityId() | ||
| 234 | + request({ | ||
| 235 | + url: '/feeConfig/listFeeConfigs', | ||
| 236 | + method: 'get', | ||
| 237 | + params: { ...params, communityId } | ||
| 238 | + }).then(response => { | ||
| 286 | resolve(response.data) | 239 | resolve(response.data) |
| 287 | - } catch (error) { | 240 | + }).catch(error => { |
| 288 | reject(error) | 241 | reject(error) |
| 289 | - } | 242 | + }) |
| 290 | }) | 243 | }) |
| 291 | } | 244 | } |
| 292 | 245 | ||
| 293 | // 计算缴费积分 | 246 | // 计算缴费积分 |
| 294 | export function computePayFeeIntegral(params) { | 247 | export function computePayFeeIntegral(params) { |
| 295 | - return new Promise( (resolve, reject) => { | ||
| 296 | - try { | ||
| 297 | - const communityId = getCommunityId() | ||
| 298 | - const response = request({ | ||
| 299 | - url: '/integral.computePayFeeIntegral', | ||
| 300 | - method: 'get', | ||
| 301 | - params: { | ||
| 302 | - ...params, | ||
| 303 | - communityId | ||
| 304 | - } | ||
| 305 | - }) | 248 | + return new Promise((resolve, reject) => { |
| 249 | + const communityId = getCommunityId() | ||
| 250 | + request({ | ||
| 251 | + url: '/integral/computePayFeeIntegral', | ||
| 252 | + method: 'get', | ||
| 253 | + params: { ...params, communityId } | ||
| 254 | + }).then(response => { | ||
| 306 | resolve(response.data) | 255 | resolve(response.data) |
| 307 | - } catch (error) { | 256 | + }).catch(error => { |
| 308 | reject(error) | 257 | reject(error) |
| 309 | - } | 258 | + }) |
| 310 | }) | 259 | }) |
| 311 | } | 260 | } |
| 312 | \ No newline at end of file | 261 | \ No newline at end of file |
src/components/fee/payFeeOrderResult.vue
| @@ -40,6 +40,7 @@ | @@ -40,6 +40,7 @@ | ||
| 40 | 40 | ||
| 41 | <script> | 41 | <script> |
| 42 | import { getCommunityId } from '@/api/community/communityApi' | 42 | import { getCommunityId } from '@/api/community/communityApi' |
| 43 | +import { listFeePrintPages } from '@/api/fee/payFeeOrderApi' | ||
| 43 | 44 | ||
| 44 | export default { | 45 | export default { |
| 45 | name: 'PayFeeOrderResult', | 46 | name: 'PayFeeOrderResult', |
| @@ -86,18 +87,16 @@ export default { | @@ -86,18 +87,16 @@ export default { | ||
| 86 | }, | 87 | }, |
| 87 | async listFeePrintPages() { | 88 | async listFeePrintPages() { |
| 88 | try { | 89 | try { |
| 89 | - const communityId = await getCommunityId() | ||
| 90 | - const response = await this.$http.get('/feePrintPage.listFeePrintPage', { | ||
| 91 | - params: { | 90 | + const communityId = getCommunityId() |
| 91 | + const response = await listFeePrintPages({ | ||
| 92 | page: 1, | 92 | page: 1, |
| 93 | row: 1, | 93 | row: 1, |
| 94 | state: 'T', | 94 | state: 'T', |
| 95 | communityId | 95 | communityId |
| 96 | - } | ||
| 97 | }) | 96 | }) |
| 98 | 97 | ||
| 99 | - if (response.data.data && response.data.data.length > 0) { | ||
| 100 | - this.printUrl = response.data.data[0].url | 98 | + if (response.data && response.data.length > 0) { |
| 99 | + this.printUrl = response.data[0].url | ||
| 101 | } | 100 | } |
| 102 | } catch (error) { | 101 | } catch (error) { |
| 103 | console.error('获取打印页面失败:', error) | 102 | console.error('获取打印页面失败:', error) |
src/views/fee/payFeeOrderList.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="pay-fee-order-container"> | 2 | <div class="pay-fee-order-container"> |
| 3 | <el-card class="box-card"> | 3 | <el-card class="box-card"> |
| 4 | - <div slot="header" class="clearfix"> | 4 | + <div slot="header" class="flex justify-between"> |
| 5 | <span>{{ $t('payFeeOrder.title') }}</span> | 5 | <span>{{ $t('payFeeOrder.title') }}</span> |
| 6 | <el-button type="primary" size="small" style="float: right;" @click="goBack"> | 6 | <el-button type="primary" size="small" style="float: right;" @click="goBack"> |
| 7 | <i class="el-icon-close"></i> | 7 | <i class="el-icon-close"></i> |
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | 11 | ||
| 12 | <el-row :gutter="20"> | 12 | <el-row :gutter="20"> |
| 13 | <el-col :span="14" style="border-right: 1px solid #f4f4f4; padding-left: 30px;"> | 13 | <el-col :span="14" style="border-right: 1px solid #f4f4f4; padding-left: 30px;"> |
| 14 | - <el-form label-width="120px"> | 14 | + <el-form label-width="120px" class="text-left"> |
| 15 | <el-row> | 15 | <el-row> |
| 16 | <el-col :span="12"> | 16 | <el-col :span="12"> |
| 17 | <el-form-item :label="$t('payFeeOrder.feeId')"> | 17 | <el-form-item :label="$t('payFeeOrder.feeId')"> |
| @@ -378,6 +378,7 @@ export default { | @@ -378,6 +378,7 @@ export default { | ||
| 378 | param.params.customStartTime = this.payFeeOrderInfo.customStartTime | 378 | param.params.customStartTime = this.payFeeOrderInfo.customStartTime |
| 379 | } | 379 | } |
| 380 | const listRoomData = await listFeeObj(param) | 380 | const listRoomData = await listFeeObj(param) |
| 381 | + console.log('listRoomData', listRoomData) | ||
| 381 | //发送get请求 | 382 | //发送get请求 |
| 382 | 383 | ||
| 383 | if (Object.prototype.hasOwnProperty.call(listRoomData.data, 'custEndTime')) { | 384 | if (Object.prototype.hasOwnProperty.call(listRoomData.data, 'custEndTime')) { |
src/views/layout/layout.vue
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <el-menu mode="horizontal" :default-active="activeMenu" class="header-menu" background-color="#1e2132" | 7 | <el-menu mode="horizontal" :default-active="activeMenu" class="header-menu" background-color="#1e2132" |
| 8 | text-color="#fff" active-text-color="#409EFF"> | 8 | text-color="#fff" active-text-color="#409EFF"> |
| 9 | <el-menu-item :index="item.caId" v-for="(item, index) in catalogs" :key="index" | 9 | <el-menu-item :index="item.caId" v-for="(item, index) in catalogs" :key="index" |
| 10 | - @click="_changeMenuCatalog(item)">{{ item.name }}</el-menu-item> | 10 | + @click="_changeMenuCatalog(item, true)">{{ item.name }}</el-menu-item> |
| 11 | </el-menu> | 11 | </el-menu> |
| 12 | </div> | 12 | </div> |
| 13 | <div class="header-right"> | 13 | <div class="header-right"> |
| @@ -150,7 +150,7 @@ export default { | @@ -150,7 +150,7 @@ export default { | ||
| 150 | this.loading = false | 150 | this.loading = false |
| 151 | } | 151 | } |
| 152 | }, | 152 | }, |
| 153 | - _changeMenuCatalog(_catalog) { | 153 | + _changeMenuCatalog(_catalog, _isJump) { |
| 154 | this.activeMenu = _catalog.caId; | 154 | this.activeMenu = _catalog.caId; |
| 155 | 155 | ||
| 156 | if (_catalog.caId === '1') { | 156 | if (_catalog.caId === '1') { |
| @@ -166,7 +166,7 @@ export default { | @@ -166,7 +166,7 @@ export default { | ||
| 166 | return; | 166 | return; |
| 167 | } | 167 | } |
| 168 | console.log(_catalog) | 168 | console.log(_catalog) |
| 169 | - if (_catalog.url != '#') { | 169 | + if (_catalog.url != '#' && _isJump) { |
| 170 | this._gotoPage(_catalog.url, _catalog.name) | 170 | this._gotoPage(_catalog.url, _catalog.name) |
| 171 | //return; | 171 | //return; |
| 172 | } | 172 | } |