Browse Source

Merge branch 'dev' into id1370

privacy
刘嘉炜 2 years ago
parent
commit
ae1e1a7a7d
  1. 6
      src/components/end_billing_modal/end_billing_modal.vue
  2. 2
      src/components/order_list/club_rental/club_rental.vue
  3. 2
      src/components/order_list/competition/competition.vue
  4. 2
      src/components/order_list/curriculum/curriculum.vue
  5. 2
      src/components/order_list/device/device.vue
  6. 2
      src/components/order_list/locker/locker.vue
  7. 2
      src/components/order_list/mall/mall.vue
  8. 2
      src/components/order_list/rent_and_sale/rent_and_sale.vue
  9. 2
      src/components/order_list/spectacular_monent/spectacular_monent.vue
  10. 2
      src/components/reservation_order/reservation_order.vue
  11. 85
      src/components/site/order_modal/order_modal.vue
  12. 3
      src/js/api.js
  13. 6
      src/pages/employee/manage/manage.vue
  14. 2
      src/pages/employee/review_list/review_list.vue
  15. 29
      src/pages/index/index.vue
  16. 2
      src/pages/login/login.vue
  17. 16
      src/pages/site/confirm/confirm.vue
  18. 16
      src/pages/site/manage/manage.vue
  19. 2
      src/pages/site/occupy_share/occupy_share.vue
  20. 4
      src/pages/site/occupy_success/occupy_success.vue
  21. 8
      src/pages/site/order_list/order_list.vue
  22. 10
      src/pages/write_off/mall/confirm/confirm.vue
  23. 4
      src/pages/write_off/mall/success/success.vue
  24. 2
      src/pages/write_off/operate/operate.vue
  25. 2
      src/pages/write_off/search_result/search_result.vue
  26. 4
      src/pages/write_off/success/success.vue
  27. 4
      src/pages/write_off/ym_card_gated/ym_card_gated.vue
  28. 4
      src/pages/write_off/ym_confirm/ym_confirm.vue
  29. 1
      src/store/actions.js
  30. 8
      src/store/device.js
  31. 4
      src/subpackage/common/components/card_search.vue
  32. 2
      src/subpackage/course/components/cancel_class_modal/cancel_class_modal.vue
  33. 2
      src/subpackage/course/pages/manage_list/manage_list.vue
  34. 2
      src/subpackage/device/components/device_name/device_name.vue
  35. 6
      src/subpackage/device/components/order/organize_detail/organize_detail.vue
  36. 12
      src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
  37. 4
      src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
  38. 2
      src/subpackage/device/components/store_name/store_name.vue
  39. 10
      src/subpackage/device/js/device_api.js
  40. 26
      src/subpackage/device/pages/air_conditioner/detail/detail.vue
  41. 538
      src/subpackage/device/pages/audio_manage/audio_manage.vue
  42. 4
      src/subpackage/device/pages/coffee_manage/coffee_manage.vue
  43. 6
      src/subpackage/device/pages/coffee_test/coffee_test.vue
  44. 48
      src/subpackage/device/pages/device_manage/device_manage.vue
  45. 439
      src/subpackage/device/pages/index/index.vue
  46. 2
      src/subpackage/device/pages/locker_manage/locker_manage.vue
  47. 8
      src/subpackage/device/pages/order_details/order_details.vue
  48. 4
      src/subpackage/device/pages/order_manage/order_manage.vue
  49. 6
      src/subpackage/device/pages/pad_manage/pad_manage.vue
  50. 4
      src/subpackage/device/pages/sell_box_manage/sell_box_manage.vue
  51. 6
      src/subpackage/device/pages/sell_box_test/sell_box_test.vue
  52. 147
      src/subpackage/device/pages/switch_manage/switch_manage.vue
  53. BIN
      src/subpackage/device/static/images/air_conditioner/nw_close.png
  54. BIN
      src/subpackage/device/static/images/air_conditioner/nw_open.png
  55. BIN
      src/subpackage/device/static/images/arrow_1a.png
  56. BIN
      src/subpackage/device/static/images/close.png
  57. BIN
      src/subpackage/device/static/images/electrify.png
  58. BIN
      src/subpackage/device/static/images/i_txt.png
  59. BIN
      src/subpackage/device/static/images/i_voice_1.png
  60. BIN
      src/subpackage/device/static/images/icon_clock.png
  61. BIN
      src/subpackage/device/static/images/in.png
  62. BIN
      src/subpackage/device/static/images/index_bg.png
  63. BIN
      src/subpackage/device/static/images/longOpen.png
  64. BIN
      src/subpackage/device/static/images/no-info.png
  65. BIN
      src/subpackage/device/static/images/open.png
  66. BIN
      src/subpackage/device/static/images/out.png
  67. BIN
      src/subpackage/device/static/images/outage.png
  68. BIN
      src/subpackage/device/static/images/page_bg.jpg
  69. BIN
      src/subpackage/device/static/images/timing.png
  70. 4
      src/subpackage/order/components/club_rental/end_billing/end_billing.vue
  71. 2
      src/subpackage/order/pages/club_rental/detail/detail.vue
  72. 4
      src/subpackage/order/pages/curriculum/detail/detail.vue
  73. 4
      src/subpackage/order/pages/devices/detail/detail.vue
  74. 6
      src/subpackage/order/pages/events/member_list/member_list.vue
  75. 12
      src/subpackage/order/pages/locker/detail/detail.vue
  76. 4
      src/subpackage/order/pages/mall/detail/detail.vue
  77. 2
      src/subpackage/order/pages/mall/refund_operate/refund_operate.vue
  78. 2
      src/subpackage/order/pages/mall/send_out/send_out.vue
  79. 4
      src/subpackage/order/pages/rent_and_sale/detail/detail.vue
  80. 8
      src/subpackage/order/pages/retail/detail/detail.vue
  81. 2
      src/subpackage/order/pages/stored_value_card/detail/detail.vue
  82. 6
      src/subpackage/order/pages/value_card/detail/detail.vue
  83. 4
      src/subpackage/order/pages/value_card/xpense_tracker/xpense_tracker.vue
  84. 4
      src/subpackage/order/pages/ym_card/detail/detail.vue
  85. 4
      src/subpackage/order/pages/ym_card/use_record/use_record.vue
  86. 4
      src/subpackage/retail/components/store_card_select/store_card_select.vue

6
src/components/end_billing_modal/end_billing_modal.vue

@ -110,14 +110,14 @@ export default {
}
}
.oem-tit {
color: #333;
color: #1A1A1A;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 34rpx;
}
.oem-line{
width: 456rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
line-height: 48rpx;
.ol-txt1{
@ -173,7 +173,7 @@ export default {
& input {
flex-grow: 1;
height: 88rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
padding: 0rpx 20rpx;
}

2
src/components/order_list/club_rental/club_rental.vue

@ -108,7 +108,7 @@ export default {
.vt-view{
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.vv-text{
font-weight: 400;

2
src/components/order_list/competition/competition.vue

@ -81,7 +81,7 @@ export default {
.ct-view{
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.cv-text{
font-weight: 400;

2
src/components/order_list/curriculum/curriculum.vue

@ -64,7 +64,7 @@ export default {
.vt-view{
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.vv-text{
font-weight: 400;

2
src/components/order_list/device/device.vue

@ -94,7 +94,7 @@ export default {
color: #9A9A9D;
@include textHide(1);
.dt-txt{
color: #333;
color: #1A1A1A;
font-weight: 400;
}
}

2
src/components/order_list/locker/locker.vue

@ -73,7 +73,7 @@ export default {
line-height: 40upx;
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.lt-txt{
font-weight: 400;

2
src/components/order_list/mall/mall.vue

@ -122,7 +122,7 @@ export default {
width: 152upx;
line-height: 34upx;
font-size: 24upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&:not(:last-child){

2
src/components/order_list/rent_and_sale/rent_and_sale.vue

@ -105,7 +105,7 @@ export default {
.rt-view{
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.rv-text{
font-weight: 400;

2
src/components/order_list/spectacular_monent/spectacular_monent.vue

@ -82,7 +82,7 @@ export default {
.vt-view{
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.vv-text{
font-weight: 400;

2
src/components/reservation_order/reservation_order.vue

@ -195,7 +195,7 @@ export default {
font-size: 24upx;
color: #9c9c9f;
>.rv-text{
color: #333;
color: #1A1A1A;
}
}
.rl-view{

85
src/components/site/order_modal/order_modal.vue

@ -135,6 +135,16 @@
<view class="ob-view gray" v-else>已收款</view>
</view>
</view>
<!-- 弹框 取消占用退款异常提示 -->
<view class="ox-dark-mask" v-if="isShowFail" @touchmove.stop.prevent="moveHandle" @click="okChange">
<view class="odm-select-modal">
<view class="osm-line">
<view>场地已释放退款交易正在处理中退款结果请在后台管理交易订单对应订单详情查看~</view>
</view>
<view class="osm-btn" hover-class="hover-active" @click="okChange">知道了</view>
</view>
</view>
</view>
</template>
@ -173,13 +183,19 @@ export default {
},
data(){
return {
orderInfo: {}
orderInfo: {},
isShowFail: false
}
},
mounted(){
this.getOrderInfo();
},
methods: {
okChange() {
this.isShowFail = false;
this.$emit('refresh');
},
moveHandle(){},
toCollections(){
this.$emit('btn:toCollections', this.orderInfo);
},
@ -329,7 +345,39 @@ export default {
})
.then(res=>{
if(res.data.code == 0){
setTimeout(_=>this.$emit('refresh'), 1200);
if (orderInfo.stadium_order && orderInfo.stadium_order.pay_type_text === '付款码支付') {
servers.get({
url: API.venue.refundOrderCheck,
data: {
transNo: orderInfo.order_no
// transNo: 'ZY20230720170701856196'
},
isDefaultGet: false,
})
.then(res => {
if (res.data.code == 0 && res.data.data && res.data.data.data) {
let result = JSON.parse(res.data.data.data[res.data.data.data.length - 1].result);
res.data.data.data.forEach(item => {
const resultTemp = JSON.parse(item.result);
if (resultTemp && resultTemp.orderStatus === 'SUCCESS') {
result = resultTemp;
}
});
console.log(result);
if (!(result && result.orderStatus === 'SUCCESS')) {
this.isShowFail = true;
} else {
this.$emit('refresh');
}
} else {
this.isShowFail = true;
}
}).catch(() => {
this.$emit('refresh');
})
} else {
setTimeout(_=>this.$emit('refresh'), 1200);
}
util.showNone(res.data.message || '操作成功!');
}else{
util.showNone(res.data.message || '操作失败!');
@ -503,4 +551,37 @@ export default {
}
}
}
.odm-select-modal{
position: absolute;
left: 65rpx;
top: 16%;
background-color: #fff;
width: 620rpx;
padding: 80rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.osm-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
.osm-line{
width: 504rpx;
margin-bottom: 26rpx;
>view{
color: #333333;
font-size: 28rpx;
line-height: 48rpx;
}
}
}
</style>

3
src/js/api.js

@ -108,7 +108,8 @@ API['venue'] = {
// 20220921
releaseVenue: `${ORIGIN}/admin/stadium/order/releaseVenue`, // 【1000995】释放场地
// 20230728
refundOrderCheck: `${ORIGIN}/pay/huishouqian/refundOrderCheck`, // 惠收钱退款-查询订单
}
// 2.1 核销

6
src/pages/employee/manage/manage.vue

@ -382,7 +382,7 @@ export default {
@include centerFlex(space-between);
>text{
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
>view{
@include centerFlex(flex-end);
@ -423,7 +423,7 @@ export default {
max-width: 40%;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.eu-tag{
@ -537,7 +537,7 @@ export default {
margin-bottom: 2upx;
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.ei-author{

2
src/pages/employee/review_list/review_list.vue

@ -233,7 +233,7 @@ export default {
flex-grow: 1;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}

29
src/pages/index/index.vue

@ -7,18 +7,20 @@
<image src="/static/images/icon/arrow_ff.png" mode="aspectFit"></image>
</view>
<view v-else class="ih-btn" hover-class="hover-active" @click="showAuthor">点击登陆</view>
<view class="ih-tip">今日总收入</view>
<view class="ih-price"><text>{{loginStatus?'¥':''}}</text>{{loginStatus?(indexData.amount || '0'):'***'}}</view>
<view class="ih-amount">
<view>
<view>收款笔数</view>
<view>{{loginStatus?(indexData.in_count || '0'):'**'}}</view>
</view>
<view>
<view>退款笔数</view>
<view>{{loginStatus?(indexData.out_count || '0'):'**'}}</view>
<block v-if="isPermissionShowTab({ serverKey: 1001 })">
<view class="ih-tip">今日总收入</view>
<view class="ih-price"><text>{{loginStatus?'¥':''}}</text>{{loginStatus?(indexData.amount || '0'):'***'}}</view>
<view class="ih-amount">
<view>
<view>收款笔数</view>
<view>{{loginStatus?(indexData.in_count || '0'):'**'}}</view>
</view>
<view>
<view>退款笔数</view>
<view>{{loginStatus?(indexData.out_count || '0'):'**'}}</view>
</view>
</view>
</view>
</block>
<image class="ih-bg-icon" style="left: 0;" mode="aspectFit" src="/static/images/icon/index/header_bg_a.png"></image>
<image class="ih-bg-icon" mode="aspectFit" src="/static/images/icon/index/header_bg_b.png"></image>
</view>
@ -375,11 +377,12 @@
}
.ic-header{
position: relative;
height: 476upx;
height: auto;
margin-bottom: 24upx;
padding: 38upx 24upx 0;
padding: 38upx 24upx 30upx;
border-radius: 14upx;
background-color: $themeColor;
overflow: hidden;
.ih-address{
margin-bottom: 26upx;
@include centerFlex(center);

2
src/pages/login/login.vue

@ -190,7 +190,7 @@ export default {
height: 100%;
text-align: center;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
&:last-child{
margin-bottom: 0;

16
src/pages/site/confirm/confirm.vue

@ -237,7 +237,7 @@ export default {
line-height: 44upx;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
@include textHide(1);
>image{
margin-right: 2upx;
@ -284,7 +284,7 @@ export default {
>view{
font-size: 28upx;
line-height: 52upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -295,7 +295,7 @@ export default {
text-align: right;
font-size: 28upx;
line-height: 52upx;
color: #333;
color: #1A1A1A;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -312,7 +312,7 @@ export default {
@include centerFlex(space-between);
>view{
font-size: 32upx;
color: #333;
color: #1A1A1A;
>text{
color: #EA5061;
}
@ -336,7 +336,7 @@ export default {
margin-right: 28upx;
line-height: 40upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
>.red{
color: #EA5061;
}
@ -362,14 +362,14 @@ export default {
flex-grow: 0;
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
}
>input{
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
}
}
@ -429,7 +429,7 @@ export default {
border-radius: 10upx;
font-size: 28upx;
line-height: 40upx;
color: #333;
color: #1A1A1A;
}
}
}

16
src/pages/site/manage/manage.vue

@ -641,7 +641,7 @@ export default {
line-height: 44upx;
font-weight: 500;
font-size: 32upx;
color: #333;
color: #1A1A1A;
>image{
margin-left: 12upx;
vertical-align: middle;
@ -662,7 +662,7 @@ export default {
line-height: 50upx;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
>image{
margin-left: 18upx;
width: 24upx;
@ -700,7 +700,7 @@ export default {
@include centerFlex(center);
>text{
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>view{
flex-shrink: 0;
@ -796,7 +796,7 @@ export default {
text-align: center;
line-height: 84upx;
font-size: 24upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&::after{
@ -870,7 +870,7 @@ export default {
text-overflow: ellipsis;
overflow: hidden;
background-color: #fff;
color: #333;
color: #1A1A1A;
}
}
.sl-time-ls{
@ -897,7 +897,7 @@ export default {
text-align: center;
line-height: 84upx;
font-size: 24upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&::after{
@ -1015,7 +1015,7 @@ export default {
line-height: 34upx;
color: #9a9a9d;
>text{
color: #333;
color: #1A1A1A;
}
&+view{
flex-shrink: 0;
@ -1051,7 +1051,7 @@ export default {
line-height: 38upx;
text-align: center;
font-size: 32upx;
color: #333;
color: #1A1A1A;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

2
src/pages/site/occupy_share/occupy_share.vue

@ -115,7 +115,7 @@ export default {
>view{
line-height: 52upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
>text{
color: $themeColor;
}

4
src/pages/site/occupy_success/occupy_success.vue

@ -74,7 +74,7 @@ export default {
line-height: 90upx;
border-bottom: 2upx solid #D8D8D8;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.os-code{
@ -87,7 +87,7 @@ export default {
margin-bottom: 128upx;
text-align: center;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.os-btn{

8
src/pages/site/order_list/order_list.vue

@ -205,7 +205,7 @@ export default {
>input{
flex-grow: 1;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>image{
flex-shrink: 0;
@ -245,7 +245,7 @@ export default {
line-height: 40upx;
font-size: 28upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
@include textHide(1);
>image{
margin-right: 10upx;
@ -279,7 +279,7 @@ export default {
>view{
line-height: 52upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -297,7 +297,7 @@ export default {
min-width: 40%;
font-size: 24upx;
line-height: 34upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
&:nth-child(2){
text-align: right;

10
src/pages/write_off/mall/confirm/confirm.vue

@ -162,7 +162,7 @@ export default {
line-height: 44upx;
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
border-bottom: 2upx solid #F2F2F7;
}
.mm-top{
@ -171,7 +171,7 @@ export default {
>view{
font-size: 28upx;
line-height: 60upx;
color: #333;
color: #1A1A1A;
&:first-child{
margin-right: 60upx;
flex-shrink: 0;
@ -197,7 +197,7 @@ export default {
margin-bottom: 14upx;
font-size: 28upx;
line-height: 40upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.mi-addr{
@ -210,7 +210,7 @@ export default {
padding-top: 30upx;
font-weight: 500;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
}
.mm-goods{
@ -239,7 +239,7 @@ export default {
font-size: 28upx;
line-height: 40upx;
min-height: 80upx;
color: #333;
color: #1A1A1A;
@include textHide(2);
}
.mi-spec{

4
src/pages/write_off/mall/success/success.vue

@ -68,7 +68,7 @@ export default {
line-height: 66upx;
font-size: 48upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
}
.cs-goods{
@ -105,7 +105,7 @@ export default {
margin-bottom: 12upx;
font-size: 28upx;
line-height: 40upx;
color: #333;
color: #1A1A1A;
@include textHide(2);
}
.mi-spec{

2
src/pages/write_off/operate/operate.vue

@ -240,7 +240,7 @@ export default {
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>image{
flex-shrink: 0;

2
src/pages/write_off/search_result/search_result.vue

@ -228,7 +228,7 @@ export default {
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>image{
flex-shrink: 0;

4
src/pages/write_off/success/success.vue

@ -132,7 +132,7 @@ export default {
line-height: 66upx;
font-size: 48upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.wm-btn{
@ -163,7 +163,7 @@ export default {
.wi-name{
flex-grow: 1;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.wi-btn{

4
src/pages/write_off/ym_card_gated/ym_card_gated.vue

@ -77,7 +77,7 @@ export default {
text-align: center;
line-height: 60upx;
font-size: 50upx;
color: #333;
color: #1A1A1A;
}
.ycg-back-btn{
margin: 0 auto 50upx;
@ -106,7 +106,7 @@ export default {
flex-grow: 1;
font-size: 28upx;
line-height: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.yi-btn{

4
src/pages/write_off/ym_confirm/ym_confirm.vue

@ -137,7 +137,7 @@ export default {
.yui-line{
font-size: 28upx;
line-height: 52upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -168,7 +168,7 @@ export default {
.ycm-line{
line-height: 52upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}

1
src/store/actions.js

@ -3,6 +3,7 @@ import { servers } from '../js/server';
import { API } from '../js/api';
export default {
getBrandInfo({commit, state}){
if(state?.brandInfo?.brand?.id)return Promise.resolve(state.brandInfo);
return servers.get({
url: API.calc,
data: {},

8
src/store/device.js

@ -17,7 +17,7 @@ export default {
}
},
actions: { // 小程序模块化访问失败 this.$store.dispatch('device/getStoreList')
getStoreList({ commit, state , rootState}){
getStoreList({ commit, state , rootState}, { stadium_id = '', storeChange = false } = {}){
return deviceServer.get({
url: deviceApi.stadiumList,
data: { brand_id: rootState.brandInfo.brand.id },
@ -26,7 +26,11 @@ export default {
.then(res=>{
let _list = res.list || [];
commit('setStoreList', _list);
if(JSON.stringify(state.curStoreInfo) == '{}'&&_list.length)commit('setStoreInfo', _list[0]);
if(stadium_id&&_list.some(item=>item.id===stadium_id)){
commit('setStoreInfo', _list.find(item=>item.id===stadium_id));
}else{
if(storeChange || !state?.curStoreInfo?.id)commit('setStoreInfo', _list?.[0] || {});
}
return res;
})
}

4
src/subpackage/common/components/card_search.vue

@ -150,7 +150,7 @@ export default {
width: 100%;
height: 100%;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
}
.cc-list{
@ -170,7 +170,7 @@ export default {
.cc-line{
line-height: 40upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
.cc-txt{
color: #9C9C9F;

2
src/subpackage/course/components/cancel_class_modal/cancel_class_modal.vue

@ -110,7 +110,7 @@ export default {
margin: 24rpx 20rpx;
width: 498rpx;
height: 102rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
line-height: 40rpx;
}

2
src/subpackage/course/pages/manage_list/manage_list.vue

@ -317,7 +317,7 @@ page{
}
.mv-ipt{
flex-grow: 1;
color: #333;
color: #1A1A1A;
font-size: 32rpx;
line-height: 44rpx;
}

2
src/subpackage/device/components/device_name/device_name.vue

@ -49,7 +49,7 @@ export default {
margin-bottom: 6upx;
line-height: 40upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

6
src/subpackage/device/components/order/organize_detail/organize_detail.vue

@ -439,14 +439,14 @@ export default {
}
}
.oem-tit {
color: #333;
color: #1A1A1A;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 34rpx;
}
.oem-line{
width: 456rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
line-height: 48rpx;
.ol-txt1{
@ -472,7 +472,7 @@ export default {
& input {
flex-grow: 1;
height: 88rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
padding: 0rpx 20rpx;
}

12
src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue

@ -777,7 +777,7 @@ export default {
}
}
.oim-tit {
color: #333;
color: #1A1A1A;
font-size: 32rpx;
font-weight: 700;
margin-top: 16rpx;
@ -810,7 +810,7 @@ export default {
height: 48rpx;
padding: 0rpx 20rpx;
font-size: 28rpx;
color: #333;
color: #1A1A1A;
flex-grow: 1;
border-left: 2rpx solid #D8D8D8;
}
@ -836,7 +836,7 @@ export default {
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
@ -875,7 +875,7 @@ export default {
}
}
.osm-tit {
color: #333;
color: #1A1A1A;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 38rpx;
@ -893,7 +893,7 @@ export default {
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
color: #1A1A1A;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
@ -936,7 +936,7 @@ export default {
}
.osm-title{
margin: 48rpx 0rpx 34rpx;
color: #333;
color: #1A1A1A;
font-size: 32rpx;
font-weight: 700;
}

4
src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue

@ -288,10 +288,10 @@ export default {
}
}
.rl-code2{
color: #333;
color: #1A1A1A;
font-size: 28rpx;
>text{
color: #333;
color: #1A1A1A;
}
}
.rl-code3{

2
src/subpackage/device/components/store_name/store_name.vue

@ -17,7 +17,7 @@ export default {
curStoreInfo: state => state.device.curStoreInfo,
}),
getThemeIcon(){
return ()=> {return (this.theme=='light')?'../../static/images/arrow_b2_light.png':'../../static/images/arrow_b2.png';}
return ()=> {return (this.theme=='light')?'../../static/images/arrow_b2_light.png':'../../static/images/arrow_1a.png';}
},
getThemeColor(){
return ()=> {return (this.theme=='light')?'#FFFFFF':'#1a1a1a';}

10
src/subpackage/device/js/device_api.js

@ -62,8 +62,14 @@ export const DEVICE_API = {
// 【ID1000841】 20220516 小程序-商家助手菜单入口权限优化
hardwareTypeList:`${ORIGIN}/admin/stadium/hardwareType/list`, // 设备权限列表
// 【ID1001350】 20230815 小程序-商家助手小程序设备管理优化
ouxuanacList:`${ORIGIN}/admin/ouxuanac/list`, // 获取中控信息
// 20230816 新增品牌切换按钮
currentUser:`${ORIGIN}/admin/assistant/currentUser`, // 获取用户信息
brandList:`${ORIGIN}/stadium/brand/all`, // 获取品牌列表
brandInfo:`${ORIGIN}/stadium/brand/get`, // 获取品牌信息
}
export default DEVICE_API;

26
src/subpackage/device/pages/air_conditioner/detail/detail.vue

@ -26,11 +26,11 @@
</view>
<view class="ap-btns">
<view class="ab-item" @click="operateBtn({ op: 'on' })">
<image mode="aspectFit" :src="getIconPath('open')"></image>
<image mode="aspectFit" :src="getIconPath('nw_open')"></image>
<view></view>
</view>
<view class="ab-item" @click="operateBtn({ op: 'off' })">
<image mode="aspectFit" :src="getIconPath('close')"></image>
<image mode="aspectFit" :src="getIconPath('nw_close')"></image>
<view></view>
</view>
</view>
@ -315,19 +315,35 @@ export default {
<style lang="scss">
@import '~style/public.scss';
page{
&::after{
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../../../static/images/page_bg.jpg) repeat-y;
background-size: 100%;
z-index: -1;
}
}
.air-conditioner-detail{
padding: 40upx;
.acd-tit{
margin-bottom: 40upx;
font-size: 44upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.acd-panel{
margin-bottom: 60upx;
padding: 24upx 14upx 50upx;
border-radius: 10upx;
background-color: #fff;
border: .5px solid #fff;
box-shadow: 0 4upx 12upx 0 #00987454, inset 0 0 40upx 0 #ffffff80;
background-image: linear-gradient(180deg, #eff6f44d 0%, #FFFFFF 100%);
.ap-top-info{
margin-bottom: 64upx;
flex-wrap: nowrap;
@ -420,7 +436,7 @@ export default {
margin-bottom: 28upx;
line-height: 40upx;
font-size: 28upx;
color: #9c9c9f;
color: #fff;
}
.abl-ls{
display: flex;

538
src/subpackage/device/pages/audio_manage/audio_manage.vue

@ -4,16 +4,16 @@
<view class="sm-tit">
<text>{{pageInfo.name || '-'}}</text>
<text>{{pageInfo.tips || ''}}</text>
</view>
<view class="slider-box">
<text>音量</text>
<slider :value="voiceLevel" activeColor="#009874" block-color="#009874" block-size="22" @change="sliderChange" min="0" max="100" />
<view class="">
<text>0%</text>
<text>100%</text>
</view>
</view>
</view>
<view class="slider-box">
<text>音量</text>
<slider :value="voiceLevel" activeColor="#009874" block-color="#009874" block-size="22" @change="sliderChange" min="0" max="100" />
<view class="">
<text>0%</text>
<text>100%</text>
</view>
</view>
<view class="sm-list">
<view class="sl-item" v-for="(e, i) in deviceList" :key="i">
@ -117,7 +117,7 @@
mapState
} from 'vuex';
import util from '../../../../utils/util';
import DEVICE_FUN from '../../js/device_fun.js';
export default {
@ -132,7 +132,7 @@
return i => {
return `../../static/images/i_voice_${i}.png`
}
},
},
getVoiceTxt() {
return i => {
return [,'请按住说话','录音中...','录音已完成','播放中...'][i]
@ -146,7 +146,7 @@
this.getDeviceList({
stadium_id: newVal.id,
hardware_type: this.pageInfo.hardware_type
})
})
}
},
@ -160,237 +160,237 @@
txt: "",
voicePath: "",
voiceUrl: "",
},
},
voiceLevel:0
}
},
onLoad(options) {
this.initAudio();
this.initPage(options);
this.initPage(options);
},
methods: {
//
initAudio(){
let self = this;
recorderManager.onStop(function(res) {
console.log('recorder stop' + JSON.stringify(res));
self.voicePadConfig.voicePath = res.tempFilePath;
});
innerAudioContext.onPlay(function(res) {
console.log('play voice onPlay' + JSON.stringify(res));
if(self.voicePadConfig.step==3)self.voicePadConfig.step = 4
});
innerAudioContext.onEnded(function(res) {
console.log('play voice onEnded' + JSON.stringify(res));
if(self.voicePadConfig.step == 4)self.voicePadConfig.step = 3
});
},
initPage(options){
let _pageInfo = showArr[`s${options.sid}`] || {};
this.pageInfo = _pageInfo;
uni.setNavigationBarTitle({
title: _pageInfo.name
});
this.getDeviceList({
stadium_id: this.curStoreInfo.id,
hardware_type: _pageInfo.hardware_type
})
this.updateVoiceSlider();
},
//
sliderChange(e) {
console.log('value 发生变化:' + e.detail.value)
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player-volume",
"value": {
"volume": e.detail.value.toString()
}
},
}
//
this.operateReq({
data: _data,
isTip:true
})
},
//
updateVoiceSlider(){
let that = this
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player-volume",
"value": {
"volume": "-1"
}
},
}
//
this.operateReq({
data: _data,
succFun: (res) => {
console.log("操作结果:",res);
that.voiceLevel = res.data
},
isTip:false
})
methods: {
//
initAudio(){
let self = this;
recorderManager.onStop(function(res) {
console.log('recorder stop' + JSON.stringify(res));
self.voicePadConfig.voicePath = res.tempFilePath;
});
innerAudioContext.onPlay(function(res) {
console.log('play voice onPlay' + JSON.stringify(res));
if(self.voicePadConfig.step==3)self.voicePadConfig.step = 4
});
innerAudioContext.onEnded(function(res) {
console.log('play voice onEnded' + JSON.stringify(res));
if(self.voicePadConfig.step == 4)self.voicePadConfig.step = 3
});
},
initPage(options){
let _pageInfo = showArr[`s${options.sid}`] || {};
this.pageInfo = _pageInfo;
uni.setNavigationBarTitle({
title: _pageInfo.name
});
this.getDeviceList({
stadium_id: this.curStoreInfo.id,
hardware_type: _pageInfo.hardware_type
})
this.updateVoiceSlider();
},
//
sliderChange(e) {
console.log('value 发生变化:' + e.detail.value)
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player-volume",
"value": {
"volume": e.detail.value.toString()
}
},
}
//
this.operateReq({
data: _data,
isTip:true
})
},
//
updateVoiceSlider(){
let that = this
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player-volume",
"value": {
"volume": "-1"
}
},
}
//
this.operateReq({
data: _data,
succFun: (res) => {
console.log("操作结果:",res);
that.voiceLevel = res.data
},
isTip:false
})
},
longPressHandle(e) {
console.log("长按开始...");
this.voicePadConfig.step = 2
console.log('开始录音');
recorderManager.start({
format: "wav"
console.log("长按开始...");
this.voicePadConfig.step = 2
console.log('开始录音');
recorderManager.start({
format: "wav"
});
},
touchEndHandle(e) {
console.log("触摸结束...");
this.voicePadConfig.step = 3
console.log('录音结束');
this.voicePadConfig.step = 3
console.log('录音结束');
recorderManager.stop();
},
//
HandleVoiceOperate({
switchInfo,
status
}) {
console.log(switchInfo, status);
if (status === 1) { //
console.log("文字转语音");
this.voicePadConfig.showVoicePad = true
this.voicePadConfig.step = 0
} else { //
console.log("语音发送");
this.voicePadConfig.showVoicePad = true
this.voicePadConfig.step = 1
}
},
//
async sendVoice() {
let that = this
console.log(deviceApi.ORIGIN)
//
let _url = ""; //
if(this.voicePadConfig.step==0){
let txt = this.voicePadConfig.txt
if(!txt)return util.showNone("请先输入您要说的话后重试")
_url = `${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`;
}
//
if(this.voicePadConfig.step==3){
console.log("本地录音path:",that.voicePadConfig.voicePath);
let e = await deviceServer.uploadFile({
url: deviceApi.uploadAudio,
filePath: that.voicePadConfig.voicePath
});
let _res = util.jsonPar(e.data);
if (_res.code == 0) {
that.voicePadConfig.voiceUrl = _res.data.url
console.log("上传成功后path:", that.voicePadConfig.voiceUrl);
_url = _res.data.url //
} else {
console.error('上传录音失败--->', _res);
util.showNone(_res.message || '上传录音失败,请重试!')
return
}
}
//data
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player",
"value": {
"url": _url
}
},
// "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464"
}
//
},
//
HandleVoiceOperate({
switchInfo,
status
}) {
console.log(switchInfo, status);
if (status === 1) { //
console.log("文字转语音");
this.voicePadConfig.showVoicePad = true
this.voicePadConfig.step = 0
} else { //
console.log("语音发送");
this.voicePadConfig.showVoicePad = true
this.voicePadConfig.step = 1
}
},
//
async sendVoice() {
let that = this
console.log(deviceApi.ORIGIN)
//
let _url = ""; //
if(this.voicePadConfig.step==0){
let txt = this.voicePadConfig.txt
if(!txt)return util.showNone("请先输入您要说的话后重试")
_url = `${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`;
}
//
if(this.voicePadConfig.step==3){
console.log("本地录音path:",that.voicePadConfig.voicePath);
let e = await deviceServer.uploadFile({
url: deviceApi.uploadAudio,
filePath: that.voicePadConfig.voicePath
});
let _res = util.jsonPar(e.data);
if (_res.code == 0) {
that.voicePadConfig.voiceUrl = _res.data.url
console.log("上传成功后path:", that.voicePadConfig.voiceUrl);
_url = _res.data.url //
} else {
console.error('上传录音失败--->', _res);
util.showNone(_res.message || '上传录音失败,请重试!')
return
}
}
//data
let _data = {
"device": this.curStoreInfo.device_name,
"data": {
"name": "audio-player",
"value": {
"url": _url
}
},
// "token": "f0d5c19b-b87e-11eb-bc7d-5254005df464"
}
//
if(_url)this.operateReq({
data: _data
})
},
/// /
async listenVoice() {
let self = this
if(this.voicePadConfig.step==0){
//,
let txt = this.voicePadConfig.txt;
if(!txt)return util.showNone("请先输入您要说的话后重试")
let url =`${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`;
let updated_url = await this.getDownloadUrl(url)
innerAudioContext.src = updated_url
}
if(this.voicePadConfig.step==3){
innerAudioContext.src = this.voicePadConfig.voicePath;
}
console.log('播放录音文件:', innerAudioContext.src);
if(innerAudioContext.src)innerAudioContext.play();
},
getDownloadUrl(url) {
console.log('下载录音');
util.showLoad()
return new Promise((rs,rj)=>{
uni.downloadFile({
url: url, //e
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功',res);
util.hideLoad()
rs(res.tempFilePath)
}
},
fail: (e) => {
console.log('文字转录音文件下载失败',e);
util.hideLoad()
rj(e)
},
complete: (e) => {
util.hideLoad()
},
});
})
},
getDeviceList({
stadium_id,
hardware_type,
limit = 100,
page = 1
}) {
util.showLoad();
deviceServer.get({
url: deviceApi.hardwareList,
data: {
'filter[hardware_type]': hardware_type,
'filter[stadium_id]': stadium_id,
'limit': limit,
'page': page,
},
failMsg: '加载失败!'
})
.then(res => {
util.hideLoad();
let _list = res.list || [];
//线
let deviceInfo = uni.getStorageSync("deviceInfo");
_list = _list.map((e,i)=>{
e['defineStatusCode'] = deviceInfo.Online==1? 1 : 0;
return e
})
this.deviceList = _list;
console.log(res)
this.updateVoiceSlider();
})
.catch(util.hideLoad)
})
},
/// /
async listenVoice() {
let self = this
if(this.voicePadConfig.step==0){
//,
let txt = this.voicePadConfig.txt;
if(!txt)return util.showNone("请先输入您要说的话后重试")
let url =`${deviceApi.ORIGIN}/ouxuanac/tts/textToVoice.wav?text=${txt}&voice_type=4&speed=-1&volume=10`;
let updated_url = await this.getDownloadUrl(url)
innerAudioContext.src = updated_url
}
if(this.voicePadConfig.step==3){
innerAudioContext.src = this.voicePadConfig.voicePath;
}
console.log('播放录音文件:', innerAudioContext.src);
if(innerAudioContext.src)innerAudioContext.play();
},
getDownloadUrl(url) {
console.log('下载录音');
util.showLoad()
return new Promise((rs,rj)=>{
uni.downloadFile({
url: url, //e
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功',res);
util.hideLoad()
rs(res.tempFilePath)
}
},
fail: (e) => {
console.log('文字转录音文件下载失败',e);
util.hideLoad()
rj(e)
},
complete: (e) => {
util.hideLoad()
},
});
})
},
getDeviceList({
stadium_id,
hardware_type,
limit = 100,
page = 1
}) {
util.showLoad();
deviceServer.get({
url: deviceApi.hardwareList,
data: {
'filter[hardware_type]': hardware_type,
'filter[stadium_id]': stadium_id,
'limit': limit,
'page': page,
},
failMsg: '加载失败!'
})
.then(res => {
util.hideLoad();
let _list = res.list || [];
//线
let deviceInfo = uni.getStorageSync("deviceInfo");
_list = _list.map((e,i)=>{
e['defineStatusCode'] = deviceInfo.Online==1? 1 : 0;
return e
})
this.deviceList = _list;
console.log(res)
this.updateVoiceSlider();
})
.catch(util.hideLoad)
},
// status 0 -> 1 ->
operateBtn: util.debounce(function({
@ -405,9 +405,9 @@
let _data = this.getOperateReqData({
switchInfo,
status
})
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
})
_data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
//->& 20201224 5
if (switchInfo.hardware_type === 'AccessControl' && status == 1) {
@ -457,13 +457,13 @@
},
//
operateReq({
data,
data,
succFun,
isTip = true,
isLoad = true
}) {
}) {
let that = this
if (isLoad) util.showLoad();
if (isLoad) util.showLoad();
deviceServer.post({
url: deviceApi.ouxuanac,
@ -472,9 +472,9 @@
})
.then(res => {
if (isLoad) util.hideLoad();
if (res.data.code == 0) {
if (res.data.code == 0) {
succFun(res.data);
if (isTip) util.showNone(res.data.message || '操作成功!');
if (isTip) util.showNone(res.data.message || '操作成功!');
that.voicePadConfig.showVoicePad = false; //voicePad
} else {
if (isTip) util.showNone(res.data.message || '操作失败!');
@ -516,12 +516,12 @@
// this.getStatusReq({
// data: this.getSwitchStatusQuery(switchInfo),
// index,
// })
//TODO ,
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
util.showLoad();
setTimeout(()=>util.hideLoad(),1000)
// })
//TODO ,
// _data = DEVICE_FUN.AC_filterCloudACData(data,switchInfo);
util.showLoad();
setTimeout(()=>util.hideLoad(),1000)
}, 300, 300),
//
getStatusReq({
@ -674,7 +674,7 @@
let _obj = {
'Gpio': 'get-rpio', //
'SerialPort485': 'zzio404d-gpio-status',
'Tcp': 'zzio404d-gpio-status-tcp',
'Tcp': 'zzio404d-gpio-status-tcp',
'YZK':'zzio404d-gpio-status'
};
@ -689,7 +689,7 @@
let _obj = {
'Gpio': 'set-rpio', //
'SerialPort485': 'zzio404d-gpio',
'Tcp': 'zzio404d-gpio-tcp',
'Tcp': 'zzio404d-gpio-tcp',
'YZK':'zzio404d-gpio'
};
@ -707,7 +707,7 @@
let _obj = {
'acmelec': 'acmelec',
'zhongnan': 'zhongnan',
'jianda': 'ray-air-rs',
'jianda': 'ray-air-rs',
"XiaoHuiXiong":"xhx-lora-air-tcp"
};
return _obj[this.changeLowerCase(hardware_model)] || '';
@ -726,20 +726,25 @@
<style lang="scss">
@import '~style/public.scss';
.slider-box{
margin-bottom: 40rpx;
> text {
margin-left: 30rpx;
font-size: 24rpx;
color: #9C9C9F;
}
> view{
width: 100%;
color: #9C9C9F;
font-size: 28rpx;
@include centerFlex(space-between);
padding: 0 34rpx;
}
page{
background:url(../../static/images/page_bg.jpg) repeat-y;
background-size: 100%;
background-attachment: fixed;
}
.slider-box{
margin-bottom: 40rpx;
> text {
margin-left: 30rpx;
font-size: 24rpx;
color: #fff;
}
> view{
width: 100%;
color: #fff;
font-size: 28rpx;
@include centerFlex(space-between);
padding: 0 34rpx;
}
}
.sm-tit {
padding-left: 40upx;
@ -753,12 +758,12 @@
line-height: 60upx;
font-size: 44upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
text:last-child {
width: 466rpx;
color: #9C9C9F;
color: #fff;
font-size: 24rpx;
}
}
@ -773,8 +778,9 @@
margin-bottom: 30upx;
width: 328upx;
border-radius: 10upx;
background-color: #fff;
border: .5px solid #fff;
box-shadow: 0 4upx 12upx 0 #00987454, inset 0 0 40upx 0 #ffffff80;
background-image: linear-gradient(180deg, #eff6f44d 0%, #FFFFFF 100%);
.si-top {
padding: 20upx 20upx 30upx;
display: flex;
@ -795,7 +801,7 @@
margin-bottom: 8upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
@ -848,7 +854,7 @@
padding-bottom: 30upx;
display: flex;
justify-content: center;
border-top: 2upx solid #F2F2F7;
border-top: .5px solid #fff;
>view {
flex-shrink: 0;
@ -973,4 +979,4 @@
}
}
</style>
</style>

4
src/subpackage/device/pages/coffee_manage/coffee_manage.vue

@ -152,7 +152,7 @@ export default {
margin-bottom: 12upx;
line-height: 50upx;
font-size: 36upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.cc-num{
@ -165,7 +165,7 @@ export default {
text-align: center;
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
&.active{
color: #FF4F00;
}

6
src/subpackage/device/pages/coffee_test/coffee_test.vue

@ -141,7 +141,7 @@ export default {
font-size: 44upx;
font-weight: 500;
line-height: 60upx;
color: #333;
color: #1A1A1A;
}
.ct-tip{
padding: 0 40upx;
@ -190,7 +190,7 @@ export default {
line-height: 50upx;
text-align: center;
font-size: 36upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -206,7 +206,7 @@ export default {
font-size: 28upx;
border: 2upx solid #009874;
border-radius: 40upx;
color: #333;
color: #1A1A1A;
&.active{
background-color: rgba($color: $themeColor, $alpha: .12);
color: $themeColor;

48
src/subpackage/device/pages/device_manage/device_manage.vue

@ -109,7 +109,10 @@ export default {
curStoreInfo(newVal, oldVal){
let { pageInfo } = this;
this.deviceList = [];
this.getDeviceList(pageInfo)
this.getDeviceList({
stadium_id: newVal.id,
hardware_type: pageInfo.deviceType,
})
}
},
components: {
@ -126,7 +129,10 @@ export default {
let _pageInfo = dmObj[`d${options.sid}`] || {};
this.pageInfo = _pageInfo;
uni.setNavigationBarTitle({ title: _pageInfo.name });
this.getDeviceList(_pageInfo)
this.getDeviceList({
stadium_id: options.stadium_id,
hardware_type: _pageInfo.deviceType,
})
},
methods: {
refreshBtn: util.debounce(function({deviceInfo, index}){
@ -209,7 +215,7 @@ export default {
},
changeDeviceStatus({info, status}){
let { pageInfo } = this;
let { pageInfo, curStoreInfo } = this;
util.showLoad();
deviceServer.get({
url: deviceApi.hardwareSave,
@ -222,20 +228,22 @@ export default {
.then(res=>{
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!')
setTimeout(_=>this.getDeviceList(pageInfo),1200);
setTimeout(_=>this.getDeviceList({
hardware_type: pageInfo.deviceType,
stadium_id: curStoreInfo.id
}),1200);
}else{
util.showNone(res.data.message || '操作失败!');
}
})
},
getDeviceList(pageInfo){
let { curStoreInfo } = this;
getDeviceList({ stadium_id, hardware_type }){
util.showLoad();
deviceServer.get({
url: deviceApi.hardwareList,
data: {
'filter[stadium_id]': curStoreInfo.id,
'filter[hardware_type]': pageInfo.deviceType,
'filter[stadium_id]': stadium_id,
'filter[hardware_type]': hardware_type,
},
failMsg: '加载设备失败!'
})
@ -284,24 +292,41 @@ export default {
<style lang="scss">
@import '~style/public.scss';
page{
&::after{
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../../static/images/page_bg.jpg) repeat-y;
background-size: 100%;
z-index: -1;
}
}
.dm-tit{
padding: 50upx 40upx 30upx;
line-height: 60upx;
font-weight: 500;
font-size: 44upx;
color: #333;
color: #1A1A1A;
}
.dm-list{
padding: 0 40upx;
.dl-item{
margin-bottom: 30upx;
background-color: #fff;
border-radius: 10upx;
border: .5px solid #fff;
box-shadow: 0 4upx 12upx 0 #00987454, inset 0 0 40upx 0 #ffffff80;
background-image: linear-gradient(180deg, #eff6f44d 0%, #FFFFFF 100%);
}
.di-header{
padding: 24upx 20upx;
display: flex;
justify-content: space-between;
border-bottom: 2upx solid #D8D8D8;
border-bottom: .5px solid #FFFFFF;
>image{
flex-shrink: 0;
flex-grow: 0;
@ -316,6 +341,7 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #1a1a1a;
}
.dh-test-btn{
flex-shrink: 0;

439
src/subpackage/device/pages/index/index.vue

@ -1,20 +1,51 @@
<template>
<view class="index-container">
<view class="ic-top-box">
<image class="custom-back" @click="goBack()" src="../../static/images/arrow_back.png" :style="{top:getTop(18) + 'px'}" mode=""></image>
<view class="brand-name" :style="{marginTop:getTop(30) + 'px'}">{{curStoreInfo.brand_name}}</view>
<view class="ic-header">
<view class="ih-bar" :style="'padding-top:'+headerInfo.statusBarHeight+'px'">
<view class="ib-title-bar" :style="titleStyle">
<image class="itb-back-icon" @click="goBack()" src="../../static/images/arrow_back.png"></image>
<text>欧轩智能商家助手</text>
</view>
</view>
<store-name :theme="'light'"></store-name>
<view class="device-info">
<text class="device-name">欧轩智能中控</text>
<text @click="copyDeviceID">设备id: {{curStoreInfo.device_name||"-"}} <text class="id-copy" >复制</text></text>
<text>最后上线时间{{deviceInfo.LastOfflineTimeStr||"-"}} </text>
<view class="">
<view class="">状态{{deviceInfo.Online==1?'在线':'离线'}}</view>
<view class="" @click="goTimingList">
<image src="../../static/images/icon_clock.png" mode=""></image>
定时列表</view>
<view class="ih-container">
<view class="ic-title">欧轩智能中控</view>
<view class="ic-info">
<view class="ii-veiw">
<view class="iv-view">
<veiw class="iv-txt">设备id{{ curStoreInfo.device_name || "-" }}</veiw>
<view class="iv-btn" @click="copyDeviceID">复制</view>
</view>
<view class="iv-view">
<veiw class="iv-txt">状态{{ deviceInfo.Online == 1 ? '在线' : '离线' }}</veiw>
</view>
</view>
<view class="ii-veiw">
<view class="iv-view">
<veiw class="iv-txt">最后上线时间{{ deviceInfo.LastOfflineTimeStr || "-" }}</veiw>
</view>
<view class="iv-view" @click="goTimingList">
<image class="iv-img" src="../../static/images/icon_clock.png" mode="aspectFit"></image>
<veiw class="iv-txt" >定时列表</veiw>
</view>
</view>
</view>
<view class="ic-btn-box">
<view
v-if="oxAcInfo.extension&&oxAcInfo.extension.switch_device_name"
class="ic-btn"
hover-class="hover-active"
@click="restartBtn"
>重启</view>
<picker mode="selector" :range="brandList" range-key="name" @change="brandChange">
<view
v-if="isBrandSwitch"
class="ic-btn select-brand"
hover-class="hover-active"
>切换品牌</view>
</picker>
</view>
</view>
</view>
@ -69,30 +100,39 @@ export default {
...mapState({
storeList: state => state.device.storeList,
curStoreInfo: state => state.device.curStoreInfo,
brandInfo: state => state.brandInfo,
}),
getTop(){
return (lineHeight)=>{
// #ifdef MP-WEIXIN
let wxBtn = wx.getMenuButtonBoundingClientRect()
// #endif
let txt_line_height = lineHeight //brand_name lineHeight
let top = (wxBtn?wxBtn.top:30 ) + (wxBtn.height-txt_line_height )/2
return top
}
},
//
showHardwareIdLs(){
let { hardwareTypeList } = this;
let _ls = hardwareTypeList || [];
let _fls = _ls.filter(ele=>ele.stadium_has);
let _fls = _ls.filter(ele => ele.stadium_has);
let _idLs = _fls.map(el => el.mini_local_menu_id);
return _idLs || [];
},
titleStyle(){
let { statusBarHeight, titleBarHeight } = this.headerInfo;
let _styleStr = `
line-height:${titleBarHeight}px;
`
return _styleStr
},
},
watch: {
curStoreInfo(nw, od){
console.warn(od.id, nw.id);
this.getHardwareTypeList();
async curStoreInfo(nw, od){
this.getOuxuanacInfo(nw.device_name);
this.getHardwareTypeList(nw.id);
this.updateAC(nw.device_name);
console.log('curStoreInfo', nw, od);
},
isBrandSwitch(nw, od){
if(nw)this.getBrandList();
},
switchBrandInfo(nw, od){
if(nw?.id === od?.id)return;
let { brandInfo } = this;
this.$store.commit('setBrandInfo', { ...brandInfo, brand: nw });
this.$store.dispatch('getStoreList', { storeChange: true });
}
},
data(){
@ -100,39 +140,97 @@ export default {
tabArr: [],
deviceInfo:"",
hardwareTypeList: [],
headerInfo: {
statusBarHeight: 0,
titleBarHeight: 0
},
oxAcInfo: {},
isBrandSwitch: false,
brandList: [],
switchBrandInfo: {},
}
},
async onLoad(){
async onLoad(options){
try{
util.showLoad();
let _brandInfo = await this.$store.dispatch('getBrandInfo');
await this.$store.dispatch('getStoreList');
this.updateAC();
await this.getHardwareTypeList();
await this.$store.dispatch('getStoreList', { stadium_id: +options.stadium_id || '', storeChange: true });
let { curStoreInfo } = this;
this.getHardwareTypeList(curStoreInfo.id);
this.getOuxuanacInfo(curStoreInfo.device_name);
this.getBrandSwitch();
util.hideLoad();
}catch(err){
console.warn('onLoad err--->', err)
util.hideLoad();
}
},
onShow() {
this.updateAC() //
let { curStoreInfo } = this;
if(curStoreInfo?.device_name)this.updateAC(curStoreInfo.device_name); //
},
onReady() {
this.initSysBarInfo();
},
methods: {
//
brandChange(e){
let { brandList } = this;
let { value } = e.detail;
this.switchBrandInfo = brandList?.[value] || {};
this.getBrandInfo(brandList?.[value]?.id);
},
//
getBrandList(){
return deviceServer.get({
url: deviceApi.brandList,
data: {},
failMsg: '加载品牌列表失败!'
})
.then(res=>{
console.log('getBrandList --->', res);
this.brandList = res || [];
})
},
getBrandInfo(bid){
return deviceServer.get({
url: deviceApi.brandInfo + `/${bid}`,
data: {},
failMsg: '加载品牌信息失败!'
})
.then(res=>{
console.log('getBrandInfo --->', res);
this.switchBrandInfo = res || {};
})
},
initSysBarInfo(){
let wxBtn = uni.getMenuButtonBoundingClientRect();
let sysInfo = uni.getSystemInfoSync();
let statusBarHeight = sysInfo.statusBarHeight || 0;
let titleBarHeight = (wxBtn?.height || 0) + (((wxBtn?.top || 0) - statusBarHeight) *2);
this.headerInfo = {
statusBarHeight,
titleBarHeight,
}
},
isShowHardwareTab(e){
let { showHardwareIdLs } = this;
if(!showHardwareIdLs || !showHardwareIdLs.length)return false;
return showHardwareIdLs.includes(e.id);
},
getHardwareTypeList(){
let { curStoreInfo } = this;
getHardwareTypeList(stadium_id){
if(!stadium_id)console.log('getHardwareTypeList stadium_id is null');
this.tabArr = [];
this.hardwareTypeList = [];
util.showLoad();
return deviceServer.get({
url: deviceApi.hardwareTypeList,
data: { stadium_id: curStoreInfo.id },
data: { stadium_id: stadium_id },
failMsg: '加载设备类型列表失败!'
})
.then(res=>{
util.hideLoad();
let _ls = res || [];
if(_ls&&_ls.length)this.tabArr = tabArr;
return this.hardwareTypeList = _ls || [];
@ -148,26 +246,25 @@ export default {
}
});
},
updateAC(){
if(!this.curStoreInfo.device_name)return
updateAC(device_name){
this.deviceInfo = {};
if(!device_name)return console.log('updateAC device_name is null');
uni.removeStorageSync("deviceInfo");
util.showLoad();
// id:"00-de-47-e9-3a-fc"
deviceServer.get({
url: deviceApi.acUpdate,
data: {id:this.curStoreInfo.device_name},
data: { id: device_name },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
this.deviceInfo = res
util.hideLoad();
this.deviceInfo = res || {};
uni.setStorageSync("deviceInfo",res)
})
.catch(util.hideLoad)
},
goBack(){
uni.navigateBack({
delta:1
})
uni.navigateBack({ delta:1 });
},
goTimingList(){
let timing_list = "/subpackage/device/pages/timing/timing_list"
@ -178,102 +275,194 @@ export default {
return `/subpackage/device/static/images/devices/${id || 14}.png`
},
routeTo(e){
let { curStoreInfo } = this;
if(e.path == '')return util.showNone('开发中!');
if(
e.id == 1 || //
e.id == 2 || //
e.id == 3 || //
e.id == 4 || //
e.id == 5 ||  //
e.id == 6 ||  //
e.id == 8 ||  //
e.id == 9 ||  //
e.id == 10 ||  //
e.id == 11 ||  //
e.id == 13 ||  //
e.id == 14 ||  //
e.id == 17 ||  //
e.id == 18 ||  //
e.id == 19 ||  //
e.id == 7   //
)return util.routeTo(`${rootPage}${e.path}?sid=${e.id}`, 'nT');
util.showNone(`开发中!`);
}
util.routeTo(`${rootPage}${e.path}?sid=${e?.id || ''}&stadium_id=${curStoreInfo?.id || ''}`, 'nT');
},
//
getOuxuanacInfo(id_ouxuanac){
this.oxAcInfo = {};
if(!id_ouxuanac)return console.log('getOuxuanacInfo id_ouxuanac is null');
util.showLoad();
return deviceServer.get({
url: deviceApi.ouxuanacList,
data: { id_ouxuanac },
failMsg: '加载中控信息失败!'
})
.then(res=>{
util.hideLoad();
this.initOuxuancInfo({ oxacLs: res?.list || [], id_ouxuanac });
return res
})
},
//
initOuxuancInfo({ oxacLs, id_ouxuanac }){
this.oxAcInfo = oxacLs.find(e=>e.id_ouxuanac == id_ouxuanac) || {};
},
restartBtn(){
let { oxAcInfo } = this;
let _dvName = oxAcInfo?.extension?.switch_device_name;
this.operateReq({ deviceName: _dvName, op: 'off', })
.then(code=>{
if(code === 0){
setTimeout(_=>{ this.operateReq({ deviceName: _dvName, op: 'on', isTip: true }) }, 1000)
}
})
},
//
operateReq({deviceName, op, isTip=false}){
let _query = {
"device": deviceName,
"data": {
"name": "gate-switch",
"value":{ "op": op },
"is_async":true
}
}
util.showLoad();
return deviceServer.post({
url: deviceApi.ouxuanac,
data: _query,
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
if(isTip)util.showNone(res.data.message || '操作成功!');
return 0
}else{
util.showModal({
title: '提示',
content: res.data.message || '操作失败!',
showCancel: false,
})
return 1
}
})
.catch(err=>{
util.hideLoad();
return Promise.reject(err);
})
},
//
getBrandSwitch(){
return deviceServer.get({
url: deviceApi.currentUser,
data: {},
isDefaultGet: false,
})
.then(res=>{
if(res.data.code == 0){
console.warn('getBrandSwitch--->', res.data);
this.isBrandSwitch = res?.data?.data?.extension?.ESP?.all_brand || false
}
})
},
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.ic-top-box{
position: fixed;
top: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
background-color: lightgray;
background-image:url(../../static/images/index_bg.png);
background-size: 100% 100%;
.ic-header{
width: 100%;
height: 560rpx;
.custom-back{
width: 18px;
height: 18px;
padding:0 20rpx;
position: fixed;
left: 10rpx;
}
.brand-name{
line-height: 30px;
font-size: 32rpx;
text-align: center;
color: white;
}
store-name{
align-self: flex-start;
}
.device-info{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.id-copy{
margin-left: 20rpx;
font-size: 28rpx;
}
> text:first-child{
font-weight: 900;
margin-top: 20rpx;
}
> text:nth-child(2){
margin-top: 30rpx;
color: #FFFFFF;font-size: 24rpx;
background-image: linear-gradient(160deg, #89D499 0%, #33CCA9 81%);
.ih-bar{
.ib-title-bar{
position: relative;
padding: 0 12px;
text-align: center;
font-size: 19px;
font-weight: 500;
color: #fff;
.itb-back-icon{
position: absolute;
left: 12px;
top: 50%;
margin-top: -10px;
width: 20px;
height: 20px;
}
}
> text:nth-child(3){
margin-top: 20rpx;
font-size: 24rpx;
}
.ih-container{
padding: 4upx 50upx 38upx;
.ic-title{
text-align: center;
line-height: 56upx;
font-size: 40upx;
font-weight: 500;
color: #1A1A1A;
}
.ic-info{
margin-top: 42upx;
.ii-veiw{
@include centerFlex(space-between);
&:not(:first-child){
margin-top: 14upx;
> view:last-child{
margin-top: 55rpx;
width: 100%;font-size: 28rpx;
@include centerFlex(space-between);
> view{
@include centerFlex(center);
image{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.iv-view{
min-width: 30%;
@include centerFlex(flex-start);
.iv-img{
flex-shrink: 0;
flex-grow: 0;
margin-right: 8upx;
height: 24upx;
width: 24upx;
}
.iv-txt{
font-size: 24upx;
line-height: 34upx;
color: #1A1A1A;
@include textHide(1);
}
.iv-btn{
flex-shrink: 0;
margin-left: 14upx;
line-height: 28upx;
font-size: 20upx;
padding: 2upx 6upx;
border-radius: 4upx;
background-color: rgba($color: #ADFF2C, $alpha: .5);
color: $themeColor;
}
&+.iv-view{
@include centerFlex(flex-end);
}
}
}
}
.ic-btn-box{
margin-top: 44upx;
@include centerFlex(center);
}
.ic-btn{
margin: 0 10upx;
width: 200upx;
height: 68upx;
line-height: 68upx;
text-align: center;
border: .5px solid #fff;
background-image: linear-gradient(180deg, #ffffff6b 0%, #ffffffc9 100%);
box-shadow: 0 6upx 16upx 0 #18b48fb0, inset 0 2upx 12upx 0 #ffffff80;
border-radius: 6upx;
font-size: 28upx;
font-weight: 500;
color: $themeColor;
text-shadow: 0 0.3upx 1upx rgba($color: #005F49, $alpha: .5);
&.select-brand{
color: #0042fd;
text-shadow: 0 0.3upx 1upx rgba($color: #0042fd, $alpha: .5);
}
}
}
}
.ic-section{
padding: 60upx 30upx 0;
margin-top: 560rpx;//.ic-top-box
padding: 54upx 30upx 0;
.is-list{
display: flex;
flex-wrap: wrap;
@ -300,7 +489,7 @@ export default {
line-height: 40upx;
text-align: center;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}

2
src/subpackage/device/pages/locker_manage/locker_manage.vue

@ -365,7 +365,7 @@ export default {
margin-bottom: 18upx;
line-height: 50upx;
font-size: 36upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.lc-price{

8
src/subpackage/device/pages/order_details/order_details.vue

@ -246,7 +246,7 @@
text-align: center;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.rc-info{
margin-bottom: 34upx;
@ -257,7 +257,7 @@
@include textHide(1);
&:first-child{
font-weight: 500;
color: #333;
color: #1A1A1A;
}
}
}
@ -267,7 +267,7 @@
margin-bottom: 8upx;
font-size: 28upx;
line-height: 48upx;
color: #333;
color: #1A1A1A;
.rn-txt{
color: #EA5061;
}
@ -281,7 +281,7 @@
width: 100%;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
}
.rp-tip{

4
src/subpackage/device/pages/order_manage/order_manage.vue

@ -151,7 +151,7 @@ export default {
font-size: 32upx;
font-weight: 700;
line-height: 44upx;
color: #333;
color: #1A1A1A;
}
.os-tabs{
display: flex;
@ -172,7 +172,7 @@ export default {
line-height: 32upx;
text-align: center;
font-size: 22upx;
color: #333;
color: #1A1A1A;
}
}

6
src/subpackage/device/pages/pad_manage/pad_manage.vue

@ -33,7 +33,7 @@ export default {
line-height: 60upx;
font-size: 44upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.pm-list{
padding: 0 32upx;
@ -64,7 +64,7 @@ export default {
.ci-title{
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.ci-bot{
@ -76,7 +76,7 @@ export default {
text-align: center;
border-radius: 20upx;
border: 2upx solid #9A9A9D;
color: #333;
color: #1A1A1A;
&::before{
content: '';
margin-top: -2upx;

4
src/subpackage/device/pages/sell_box_manage/sell_box_manage.vue

@ -203,7 +203,7 @@ export default {
font-size: 28upx;
font-weight: 500;
line-height: 40upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
>text{
margin-left: 14upx;
@ -308,7 +308,7 @@ export default {
line-height: 40upx;
text-align: center;
font-size: 28upx;
color: #333;
color: #1A1A1A;
+view{
color: #fff;
background-color: $themeColor;

6
src/subpackage/device/pages/sell_box_test/sell_box_test.vue

@ -129,7 +129,7 @@ export default {
line-height: 60upx;
font-size: 44upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.sbt-tip{
padding-left: 40upx;
@ -152,7 +152,7 @@ export default {
.si-tit{
font-size: 28upx;
line-height: 40upx;
color: #333;
color: #1A1A1A;
}
.si-ipt{
margin-top: 40upx;
@ -164,7 +164,7 @@ export default {
>input{
flex-grow: 1;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>view{
flex-shrink: 0;

147
src/subpackage/device/pages/switch_manage/switch_manage.vue

@ -2,9 +2,9 @@
<view class="switch-manage">
<store-name></store-name>
<view class="sm-tit">{{pageInfo.name || '-'}}</view>
<view class="sm-tip" v-if="pageInfo.longOpenName">*长开表示不再被系统智能控制只有手动关闭后才会被智能控制请谨慎操作</view>
<view class="sm-tip" v-if="pageInfo.longOpenName"><text>*</text>长开表示不再被系统智能控制只有手动关闭后才会被智能控制请谨慎操作</view>
<view class="sm-list">
<view class="sl-item" v-for="(e, i) in deviceList" :key="i" :style="{width:getViewWidth()}">
<view v-for="(e, i) in deviceList" :key="i" :class="[ 'sl-item', pageInfo.iconNum<=2?'sl-limit':'' ]">
<view class="si-top" >
<image mode="aspectFit" :src="getIcon()" ></image>
@ -25,23 +25,31 @@
</view>
<!-- 不同设备的可操作按钮区分,目前无明显规律,so 按需求单独 if 判断 -->
<view class="si-bottom" v-if="pageInfo.isOpen || pageInfo.isClose || pageInfo.isDetail||pageInfo.isTiming">
<view v-if="pageInfo.isOpen" @click="operateBtn({ switchInfo: e, status: 1 })" :style="{width:getIconWidth()}">
<view class="si-bottom" v-if="pageInfo.isOpen || pageInfo.isClose || pageInfo.isDetail||pageInfo.isTiming || pageInfo.isElectrify || pageInfo.isOutage">
<view v-if="pageInfo.isOpen" @click="operateBtn({ switchInfo: e, status: 1 })">
<image mode="aspectFit" :src="pageInfo.openIcon || ''"></image>
<view>{{pageInfo.openName || '-'}}</view>
</view>
<view v-if="pageInfo.isClose" @click="operateBtn({ switchInfo: e, status: 0 })" :style="{width:getIconWidth()}">
<view v-if="pageInfo.isClose" @click="operateBtn({ switchInfo: e, status: 0 })">
<image mode="aspectFit" :src="pageInfo.closeIcon || ''"></image>
<view>{{pageInfo.closeName || '-'}}</view>
</view>
<view v-if="pageInfo.isLongOpen" @click="operateBtn({ switchInfo: e, status: 2 })" :style="{width:getIconWidth()}">
<view v-if="pageInfo.isLongOpen" @click="operateBtn({ switchInfo: e, status: 2 })">
<image mode="aspectFit" :src="pageInfo.longOpenIcon || ''"></image>
<view>{{pageInfo.longOpenName || '-'}}</view>
</view>
<view v-if="pageInfo.isTiming" @click="operateBtn({ switchInfo: e, status: 3 })" :style="{width:getIconWidth()}">
<view v-if="pageInfo.isTiming" @click="operateBtn({ switchInfo: e, status: 3 })">
<image mode="aspectFit" :src="pageInfo.timingIcon || ''"></image>
<view>{{pageInfo.timingName || '-'}}</view>
</view>
<view v-if="pageInfo.isElectrify" @click="operateBtn({ switchInfo: e, status: 5 })">
<image mode="aspectFit" :src="pageInfo.electrifyIcon || ''"></image>
<view>{{pageInfo.electrifyName || '-'}}</view>
</view>
<view v-if="pageInfo.isOutage" @click="operateBtn({ switchInfo: e, status: 6 })">
<image mode="aspectFit" :src="pageInfo.outageIcon || ''"></image>
<view>{{pageInfo.outageName || '-'}}</view>
</view>
<view v-if="pageInfo.isDetail" @click="operateBtn({ switchInfo: e, status: 4 })" class="btn-detail">
<view >{{pageInfo.detailName || '-'}}</view>
</view>
@ -76,9 +84,7 @@ export default {
curStoreInfo: state => state.device.curStoreInfo,
}),
getIconWidth(){//icon
return ()=>{
return 100/this.pageInfo.iconNum+'%'
}
return ''
},
getLotStatus(){//sim, 0 :
return (e)=>{
@ -107,29 +113,42 @@ export default {
deviceList: [],
}
},
/**
*
* @param {Object} options
* @param {Object} options.sid // id
* @param {Object} options.stadium_id // id
*/
onLoad(options){
let _pageInfo = getShowArr(`s${options.sid}`) || {};
this.pageInfo = _pageInfo;
uni.setNavigationBarTitle({ title: _pageInfo.name });
this.getDeviceList({
stadium_id: this.curStoreInfo.id,
hardware_type: this.pageInfo.hardware_type
stadium_id: options.stadium_id || this.curStoreInfo.id,
hardware_type: _pageInfo.hardware_type
})
setTimeout(_=>{
this.$nextTick(_=>{
uni.createSelectorQuery().selectAll(".si-bottom > view")
.boundingClientRect(data => {
console.warn('createSelectorQuery', data)
}).exec();
})
}, 1000)
},
methods: {
isDetailBtn(e){
if(e&&e.toString() === "[object Object]"){
return e.hardware_model == 'XiaoHuiXiong'
return e.hardware_model == 'XiaoHuiXiong' && e.hardware_type === 'Air';
}
return false;
},
toDeviceDetail(e){
console.warn(e);
console.warn(this.getSwitchStatusQuery(e));
let _queryObj = this.getSwitchStatusQuery(e) || {};
if(!_queryObj.data || !_queryObj.data.name || !_queryObj.data.value)return;
_queryObj.data.value&&_queryObj.data.value.op&&(_queryObj.data.value.op = 'info');
if(!_queryObj?.data?.name || !_queryObj?.data?.value)return;
_queryObj?.data?.value?.op&&(_queryObj.data.value.op = 'info');
let _qrStr = util.jsonStr(_queryObj);
if(e.hardware_type == "Air")return util.routeTo(`/subpackage/device/pages/air_conditioner/detail/detail?qrstr=${_qrStr}&name=${e.hardware_name || '-'}`, 'nT');
},
@ -230,7 +249,9 @@ export default {
// 20220507 GateControl hardware_mac_addr device_name hardware_mac_addr
// "hardware_id":id
if(switchInfo.hardware_type === 'GateControl'&&!!switchInfo.hardware_mac_addr)_data['device'] = switchInfo.hardware_mac_addr;
// if(switchInfo.hardware_type === 'GateControl')_data['hardware_id'] = switchInfo.id;
// 20230815 id1001355 gate-switch
if(switchInfo.hardware_type === 'GateControl'&&_data?.data?.name === 'gate-switch')_data['device'] = switchInfo?.extension?.switch_device_name || '';
return _data;
},
@ -247,7 +268,11 @@ export default {
if(res.data.code == 0){
if(isTip)util.showNone(res.data.message || '操作成功!');
}else{
if(isTip)util.showNone(res.data.message || '操作失败!');
if(isTip)util.showModal({
title: '提示',
content: res.data.message || '操作失败!',
showCancel: false
})
}
})
.catch(err=>{if(isLoad)util.hideLoad()})
@ -258,7 +283,7 @@ export default {
// ID |-> enter_id -> leave_id|
let _cid = status === 1 ? enter_id :
status === 0 ? leave_id : '';
return {
let _data = {
// hardware_id: switchInfo.id,
name: 'gate',
value: {
@ -268,6 +293,12 @@ export default {
is_delay: true,
queue_group: 'gate'
}
// 20230731 id1001350
if(status === 5 || status === 6){
_data['name'] = 'gate-switch';
_data['value']['op'] = status === 5 ? 'on' : 'off';
}
return _data
},
//
refreshStatusBtn: util.debounce(function({switchInfo, index}){
@ -490,26 +521,33 @@ function getShowArr(key){
id: 4, name: '门禁管理', isOpen: true, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'AccessControl',iconNum:2
openName: '开', closeName: '关', hardware_type: 'AccessControl',iconNum: 1
},
's5': {
id: 5, name: '门闸管理', isOpen: true, isClose: true,
id: 5, name: '门闸管理', isOpen: true, isClose: true, isElectrify: true, isOutage: true,
hardware_type: 'GateControl',iconNum: 4,
openIcon: '/subpackage/device/static/images/in.png',
openName: '进',
closeIcon: '/subpackage/device/static/images/out.png',
openName: '进', closeName: '出', hardware_type: 'GateControl',iconNum:2
closeName: '出',
electrifyIcon: '/subpackage/device/static/images/electrify.png',
electrifyName: '通电',
outageIcon: '/subpackage/device/static/images/outage.png',
outageName: '断电',
},
's6': {//TODO
id: 6, name: '平板管理', isOpen: false, isClose: false,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关', hardware_type: 'Router4G',iconNum:2
openName: '开', closeName: '关', hardware_type: 'Router4G',iconNum:1
},
's11': {
id: 11, name: '水阀管理', isOpen: true, isClose: true,isLongOpen:true, isTiming:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长开', timingName: '定时',iconNum:4,
longOpenIcon: '/subpackage/device/static/images/longOpen.png',
timingIcon: '/subpackage/device/static/images/timing.png',
openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长开', timingName: '定时',iconNum:4,
},
's12': {
id: 12, name: '互动设备管理', isOpen: true, isClose: true,
@ -521,25 +559,25 @@ function getShowArr(key){
id: 13, name: '监控管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:1
},
's17': {//TODO
id: 17, name: '窗帘管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:1
},
's18': {
id: 18, name: '路由器管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:2
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'Router4G',iconNum:1
},
's19': {
id: 19, name: '物联卡管理', isOpen: false, isClose: false, isDetail:true,
openIcon: '/subpackage/device/static/images/open.png',
closeIcon: '/subpackage/device/static/images/close.png',
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:2
openName: '开', closeName: '关',detailName:"详情", hardware_type: 'IotSim',iconNum:1
},
@ -550,6 +588,20 @@ function getShowArr(key){
<style lang="scss">
@import '~style/public.scss';
page{
&::after{
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(../../static/images/page_bg.jpg) repeat-y;
background-size: 100%;
z-index: -1;
}
}
.sm-tit{
padding-left: 40upx;
padding-top: 52upx;
@ -557,13 +609,17 @@ function getShowArr(key){
line-height: 60upx;
font-size: 44upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.sm-tip{
padding: 0 40upx;
font-size: 28upx;
color: #979797;
color: #fff;
margin-bottom: 24upx;
>text{
color: #EA5061;
}
}
.sm-list{
padding: 0 32upx;
@ -571,10 +627,16 @@ function getShowArr(key){
justify-content: space-between;
flex-wrap: wrap ;
.sl-item{
flex-grow: 1;
margin-bottom: 30upx;
width: 328upx;
border-radius: 10upx;
background-color: #fff;
border: .5px solid #fff;
box-shadow: 0 4upx 12upx 0 #00987454, inset 0 0 40upx 0 #ffffff80;
background-image: linear-gradient(180deg, #eff6f44d 0%, #FFFFFF 100%);
&.sl-limit{
flex-grow: 0;
width: 328upx !important;
}
.si-top{
padding: 20upx 20upx 30upx;
display: flex;
@ -592,12 +654,12 @@ function getShowArr(key){
margin-bottom: 8upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
.sr-bot-router{
font-size: 20rpx;
color: #9C9C9F;
color: #fff;
text{
margin-left: 15rpx;
color: black;
@ -646,12 +708,11 @@ function getShowArr(key){
padding-bottom: 30upx;
display: flex;
justify-content: center;
border-top: 2upx solid #F2F2F7;
border-top: .5px solid #fff;
>view{
flex-shrink: 0;
flex-grow: 0;
width: 50%;
padding: 0 30upx;
>image{
display: block;
margin: 0 auto 20upx;
@ -668,13 +729,15 @@ function getShowArr(key){
.btn-detail{
width:auto;
> view{
margin: 30upx 0;
width: 204rpx;
height: 88rpx;
background: #009874;
border-radius: 10rpx;
text-align: center;
line-height: 88rpx;
color: white;
color: #fff;
font-size: 32upx;
}
}
@ -684,8 +747,8 @@ function getShowArr(key){
line-height: 82upx;
text-align: center;
font-size: 28upx;
color: #333;
border-top: 2upx solid #F2F2F7;
color: #1A1A1A;
border-top: .5px solid rgba($color: #82D7C1, $alpha: .50);
>image{
margin-left: 10upx;
width: 24upx;

BIN
src/subpackage/device/static/images/air_conditioner/nw_close.png

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/device/static/images/air_conditioner/nw_open.png

After

Width: 100  |  Height: 100  |  Size: 2.3 KiB

BIN
src/subpackage/device/static/images/arrow_1a.png

After

Width: 28  |  Height: 28  |  Size: 225 B

BIN
src/subpackage/device/static/images/close.png

Before

Width: 100  |  Height: 100  |  Size: 816 B

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/device/static/images/electrify.png

After

Width: 100  |  Height: 100  |  Size: 2.6 KiB

BIN
src/subpackage/device/static/images/i_txt.png

Before

Width: 200  |  Height: 200  |  Size: 11 KiB

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/device/static/images/i_voice_1.png

Before

Width: 200  |  Height: 200  |  Size: 2.4 KiB

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/device/static/images/icon_clock.png

Before

Width: 14  |  Height: 14  |  Size: 512 B

After

Width: 24  |  Height: 24  |  Size: 594 B

BIN
src/subpackage/device/static/images/in.png

Before

Width: 100  |  Height: 100  |  Size: 950 B

After

Width: 100  |  Height: 100  |  Size: 2.2 KiB

BIN
src/subpackage/device/static/images/index_bg.png

Before

Width: 187  |  Height: 155  |  Size: 16 KiB

BIN
src/subpackage/device/static/images/longOpen.png

Before

Width: 100  |  Height: 100  |  Size: 6.3 KiB

After

Width: 100  |  Height: 100  |  Size: 2.8 KiB

BIN
src/subpackage/device/static/images/no-info.png

Before

Width: 380  |  Height: 380  |  Size: 55 KiB

After

Width: 380  |  Height: 380  |  Size: 9.0 KiB

BIN
src/subpackage/device/static/images/open.png

Before

Width: 100  |  Height: 100  |  Size: 924 B

After

Width: 100  |  Height: 100  |  Size: 2.3 KiB

BIN
src/subpackage/device/static/images/out.png

Before

Width: 100  |  Height: 100  |  Size: 1.0 KiB

After

Width: 100  |  Height: 100  |  Size: 2.4 KiB

BIN
src/subpackage/device/static/images/outage.png

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/device/static/images/page_bg.jpg

After

Width: 750  |  Height: 1448  |  Size: 17 KiB

BIN
src/subpackage/device/static/images/timing.png

Before

Width: 100  |  Height: 100  |  Size: 1.3 KiB

After

Width: 100  |  Height: 100  |  Size: 2.7 KiB

4
src/subpackage/order/components/club_rental/end_billing/end_billing.vue

@ -86,7 +86,7 @@ export default {
text-align: center;
font-weight: 500;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.em-line{
@ -115,7 +115,7 @@ export default {
.ef-ipt{
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
}

2
src/subpackage/order/pages/club_rental/detail/detail.vue

@ -469,7 +469,7 @@ export default {
margin-bottom: 14upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.cr-rent-info{

4
src/subpackage/order/pages/curriculum/detail/detail.vue

@ -176,7 +176,7 @@ export default {
&:first-child{
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&+view{
@ -190,7 +190,7 @@ export default {
.cu-line{
line-height: 48upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}

4
src/subpackage/order/pages/devices/detail/detail.vue

@ -127,7 +127,7 @@ export default {
margin-bottom: 20upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.rent-info{
.ri-line{
@ -141,7 +141,7 @@ export default {
line-height: 40upx;
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
>text{
font-weight: 400;

6
src/subpackage/order/pages/events/member_list/member_list.vue

@ -76,7 +76,7 @@ export default {
margin-bottom: 10upx;
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
}
.ml-header{
padding: 30upx;
@ -96,7 +96,7 @@ export default {
margin-right: 20upx;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
&+text{
color: #9a9a9d;
@ -113,7 +113,7 @@ export default {
>view{
&:first-child{
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&+view{

12
src/subpackage/order/pages/locker/detail/detail.vue

@ -224,7 +224,7 @@ export default {
margin-bottom: 18upx;
font-size: 32upx;
line-height: 44upx;
color: #333;
color: #1A1A1A;
}
.lb-section{
margin-bottom: 24upx;
@ -247,7 +247,7 @@ export default {
.over-price{
line-height: 40upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
>text{
color: #fe873d;
}
@ -278,7 +278,7 @@ export default {
@include textHide(1);
>text{
font-weight: 400;
color: #333;
color: #1A1A1A;
}
}
}
@ -339,7 +339,7 @@ export default {
line-height: 44upx;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.lc-info{
margin-bottom: 34upx;
@ -350,7 +350,7 @@ export default {
margin-bottom: 8upx;
font-size: 28upx;
line-height: 40upx;
color: #333;
color: #1A1A1A;
>text{
color: #EA5061;
}
@ -364,7 +364,7 @@ export default {
width: 100%;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
}
}

4
src/subpackage/order/pages/mall/detail/detail.vue

@ -287,7 +287,7 @@ export default {
flex-grow: 1;
line-height: 40upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(2);
}
&+view{
@ -362,7 +362,7 @@ export default {
&+view{
@include textHide(1);
font-size: 24upx;
color: #333;
color: #1A1A1A;
}
}
}

2
src/subpackage/order/pages/mall/refund_operate/refund_operate.vue

@ -209,7 +209,7 @@ export default {
width: 152upx;
line-height: 34upx;
font-size: 24upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
&:not(:last-child){

2
src/subpackage/order/pages/mall/send_out/send_out.vue

@ -623,7 +623,7 @@ export default {
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>image{
flex-shrink: 0;

4
src/subpackage/order/pages/rent_and_sale/detail/detail.vue

@ -219,7 +219,7 @@ export default {
margin-bottom: 20upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.ras-border{
@ -233,7 +233,7 @@ export default {
text-align: right;
font-size: 28upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
>text{
color: #9A9A9D;
font-weight: 400;

8
src/subpackage/order/pages/retail/detail/detail.vue

@ -230,7 +230,7 @@ export default {
flex-shrink: 0;
}
>text {
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -263,7 +263,7 @@ export default {
display: flex;
justify-content: space-between;
margin-bottom: 20upx;
color: #333;
color: #1A1A1A;
}
.rgl-item-sku {
margin-bottom: 10upx;
@ -273,7 +273,7 @@ export default {
justify-content: space-between;
align-items: flex-end;
>text {
color: #333;
color: #1A1A1A;
}
}
.rgl-item-bottom-line {
@ -321,7 +321,7 @@ export default {
margin-bottom: 16upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
}
.rc-refund-info{

2
src/subpackage/order/pages/stored_value_card/detail/detail.vue

@ -210,7 +210,7 @@ export default {
margin-bottom: 14upx;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.sci-pay-info{
margin-top: 32upx;

6
src/subpackage/order/pages/value_card/detail/detail.vue

@ -440,7 +440,7 @@ export default {
line-height: 40upx;
font-weight: 500;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
@ -536,7 +536,7 @@ export default {
line-height: 44upx;
font-weight: 500;
font-size: 32upx;
color: #333;
color: #1A1A1A;
}
.vr-info{
margin-bottom: 26upx;
@ -711,7 +711,7 @@ export default {
text-align: center;
font-size: 32upx;
font-weight: 500;
color: #333;
color: #1A1A1A;
}
.tm-info{
padding: 0 30upx;

4
src/subpackage/order/pages/value_card/xpense_tracker/xpense_tracker.vue

@ -161,7 +161,7 @@ export default {
>view{
flex-shrink: 0;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
.xh-picker{
height: 88upx;
@ -174,7 +174,7 @@ export default {
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
color: #1A1A1A;
}
>view{
flex-shrink: 0;

4
src/subpackage/order/pages/ym_card/detail/detail.vue

@ -219,7 +219,7 @@ export default {
>view{
line-height: 48upx;
font-size: 28upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -283,7 +283,7 @@ export default {
font-size: 28upx;
font-weight: 500;
line-height: 40upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
>text{
color: #9A9A9D;

4
src/subpackage/order/pages/ym_card/use_record/use_record.vue

@ -89,7 +89,7 @@ export default {
flex-grow: 1;
line-height: 44upx;
font-size: 32upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
}
}
@ -98,7 +98,7 @@ export default {
>view{
font-size: 28upx;
line-height: 50upx;
color: #333;
color: #1A1A1A;
@include textHide(1);
>text{
color: #9A9A9D;

4
src/subpackage/retail/components/store_card_select/store_card_select.vue

@ -166,7 +166,7 @@
}
> text {
width: 100%;
color: #333;
color: #1A1A1A;
font-size: 32rpx;
text-align: center;
margin-bottom: 54rpx;
@ -256,7 +256,7 @@
margin-bottom: 5rpx;
> text {
color: #333;
color: #1A1A1A;
font-size: 28rpx;
}
}

Loading…
Cancel
Save