mo-bai 4 years ago
parent
commit
3a69e4e313
11 changed files with 54 additions and 27 deletions
  1. 1
      enums/index.js
  2. 2
      pages.json
  3. 2
      pages/client-detail/base-paper-deals.vue
  4. 2
      pages/client-detail/basic-information.vue
  5. 2
      pages/client-detail/equipment-information.vue
  6. 2
      pages/client-detail/no-data.vue
  7. 2
      pages/follow-up-records/index.vue
  8. 6
      pages/mall/no-data.vue
  9. 19
      pages/merchant-list/index.vue
  10. 14
      pages/order-detail/index.vue
  11. 29
      pages/page-view/index.vue

1
enums/index.js

@ -227,6 +227,7 @@ export const mallSupplierTypeMap = {
/** /**
* 申请单状态 0 待申请 1 已提交 2 重新提交 3 审核中 4 已驳回 5 待账户验证 6 待签约 7 开通权限中 8 已完成 9 申请单已被撤销 * 申请单状态 0 待申请 1 已提交 2 重新提交 3 审核中 4 已驳回 5 待账户验证 6 待签约 7 开通权限中 8 已完成 9 申请单已被撤销
*
*/ */
export const applyStatusEnum = { export const applyStatusEnum = {
WAIT_APPLY: '0', WAIT_APPLY: '0',

2
pages.json

@ -105,7 +105,7 @@
"path": "pages/order-detail/index", "path": "pages/order-detail/index",
"style": { "style": {
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },

2
pages/client-detail/base-paper-deals.vue

@ -149,7 +149,7 @@ export default {
} }
</script> </script>
<style lang="scss">
<style lang="scss" scoped>
.wrapper { .wrapper {
width: 750rpx; width: 750rpx;
.sum-box { .sum-box {

2
pages/client-detail/basic-information.vue

@ -213,7 +213,7 @@ export default {
} }
</script> </script>
<style lang="scss">
<style lang="scss" scoped>
.wrapper { .wrapper {
width: 750rpx; width: 750rpx;
height: 100%; height: 100%;

2
pages/client-detail/equipment-information.vue

@ -231,7 +231,7 @@ export default {
} }
</script> </script>
<style lang="scss">
<style lang="scss" scoped>
.wrapper { .wrapper {
.card-box { .card-box {
.header { .header {

2
pages/client-detail/no-data.vue

@ -22,7 +22,7 @@ export default {
} }
</script> </script>
<style lang="scss">
<style lang="scss" scoped>
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

2
pages/follow-up-records/index.vue

@ -146,7 +146,7 @@ export default {
} }
</script> </script>
<style lang="scss">
<style lang="scss" scoped>
.wrapper { .wrapper {
background-color: #ffffff; background-color: #ffffff;
.time { .time {

6
pages/mall/no-data.vue

@ -1,5 +1,5 @@
<template> <template>
<view class="wrapper">
<view class="empty-area">
<image class="icon" src="/static/imgs/client-detail/no-data-icon.png"></image> <image class="icon" src="/static/imgs/client-detail/no-data-icon.png"></image>
<view class="text-row"> <view class="text-row">
<view>还没有纸品快去</view> <view>还没有纸品快去</view>
@ -32,8 +32,8 @@ export default {
} }
</script> </script>
<style lang="scss">
.wrapper {
<style lang="scss" scoped>
.empty-area {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;

19
pages/merchant-list/index.vue

@ -6,9 +6,9 @@
<view class="flex-row group_4 justify-between"> <view class="flex-row group_4 justify-between">
<view class="flex-row"> <view class="flex-row">
<text class="text_4">{{ merchant.name }}</text> <text class="text_4">{{ merchant.name }}</text>
<image v-if="showIcon(merchant.applymentState).img" :src="showIcon(merchant.applymentState).img" class="image_4" />
<image v-if="showIcon(merchant).img" :src="showIcon(merchant).img" class="image_4" />
</view> </view>
<view v-if="showIcon(merchant.applymentState).text" class="button" @click="checkInfo(merchant)">{{ showIcon(merchant.applymentState).text }}</view>
<view v-if="showIcon(merchant).text" class="button" @click="checkInfo(merchant, showIcon(merchant).text)">{{ showIcon(merchant).text }}</view>
</view> </view>
<view class="flex-col group_5" v-if="infoShowStatus.indexOf(merchant.applymentState) < -1"> <view class="flex-col group_5" v-if="infoShowStatus.indexOf(merchant.applymentState) < -1">
<view class="top-section flex-col view_1"> <view class="top-section flex-col view_1">
@ -145,7 +145,8 @@ export default {
urls: [url] urls: [url]
}) })
}, },
showIcon(status) {
showIcon(merchant) {
let status = merchant.applymentState
if (this.cache[status]) { if (this.cache[status]) {
return this.cache[status] return this.cache[status]
} }
@ -158,6 +159,7 @@ export default {
text: '' text: ''
} }
let infoMap = [applyStatusEnum.RE_SUBMIT, applyStatusEnum.REJECTED, applyStatusEnum.CANCELED] let infoMap = [applyStatusEnum.RE_SUBMIT, applyStatusEnum.REJECTED, applyStatusEnum.CANCELED]
let verifyMap = [applyStatusEnum.AUDITING, applyStatusEnum.WAIT_VERIFY, applyStatusEnum.WAIT_SIGN]
if (status === applyStatusEnum.FINISHED) { if (status === applyStatusEnum.FINISHED) {
result.img = '/static/imgs/merchant/apply-finished-icon.png' result.img = '/static/imgs/merchant/apply-finished-icon.png'
} else if (status === applyStatusEnum.WAIT_APPLY) { } else if (status === applyStatusEnum.WAIT_APPLY) {
@ -167,12 +169,19 @@ export default {
result.text = '查看' result.text = '查看'
} else { } else {
result.img = '/static/imgs/merchant/apply-auditing-icon.png' result.img = '/static/imgs/merchant/apply-auditing-icon.png'
if (verifyMap.includes(status) && merchant.signUrl) {
result.text = '去验证'
}
} }
this.cache[status] = result this.cache[status] = result
return result return result
}, },
checkInfo(merchant) {
go2('merchant-setting', { info: JSON.stringify(merchant) })
checkInfo(merchant, text) {
if (text == '去验证') {
go2('page-view', { url: encodeURIComponent(merchant.signUrl) })
} else {
go2('merchant-setting', { info: JSON.stringify(merchant) })
}
} }
} }
} }

14
pages/order-detail/index.vue

@ -209,6 +209,7 @@ const showUploadStatus = [
export default { export default {
data() { data() {
return { return {
orderId: null,
orderInfo: { orderInfo: {
deliveryAddress: {}, deliveryAddress: {},
supplierOrder: [], supplierOrder: [],
@ -229,7 +230,8 @@ export default {
}, },
onLoad(option) { onLoad(option) {
if (option.orderId) { if (option.orderId) {
this.init(option.orderId)
this.orderId = option.orderId
// this.init(option.orderId)
} else { } else {
uni.showToast({ uni.showToast({
title: '订单信息错误', title: '订单信息错误',
@ -242,6 +244,16 @@ export default {
}) })
} }
}, },
onPullDownRefresh() {
console.log('下拉刷新')
this.init(this.orderId)
uni.stopPullDownRefresh()
},
onShow() {
if (this.orderId) {
this.init(this.orderId)
}
},
methods: { methods: {
go2, go2,
back, back,

29
pages/page-view/index.vue

@ -33,14 +33,25 @@ export default {
}) })
} }
}, },
created() {
makeSocket({ pageInfo: 'page-view', retry: true }).then((res) => {
this.destroySocket()
this.socket = res
this.socket.onMessage(this.getMessage)
})
onShow() {
this.initSocket()
},
onHide() {
console.log('onHide')
this.destroySocket()
},
onUnload() {
console.log('onUnload')
this.destroySocket()
}, },
methods: { methods: {
initSocket() {
makeSocket({ pageInfo: 'page-view', retry: true }).then((res) => {
this.destroySocket()
this.socket = res
this.socket.onMessage(this.getMessage)
})
},
/** /**
* @param {Object} data {data:{},type:''} * @param {Object} data {data:{},type:''}
*/ */
@ -68,12 +79,6 @@ export default {
this.socket = null this.socket = null
} }
} }
},
destroyed() {
this.destroySocket()
} }
// onHide() {
// this.destroySocket()
// }
} }
</script> </script>
Loading…
Cancel
Save