Commit 0e0e2c34c46bdcc0639c2d85855f8bf1c3987479
Merge branch 'f-dev' into 'main'
fix:DEFECT-389 修改摄像头能同时播放多个问题和fix:移除意见反馈底部tabbar See merge request huang/thingskit-app!53
Showing
9 changed files
with
167 additions
and
174 deletions
| @@ -30,13 +30,13 @@ export default { | @@ -30,13 +30,13 @@ export default { | ||
| 30 | @import './style/iconfont.scss'; | 30 | @import './style/iconfont.scss'; |
| 31 | @import './style/common.scss'; | 31 | @import './style/common.scss'; |
| 32 | page { | 32 | page { |
| 33 | - background-color: #f5f5f5; | ||
| 34 | -} | ||
| 35 | -::-webkit-scrollbar { | ||
| 36 | - display: none; | ||
| 37 | - width: 0 !important; | ||
| 38 | - height: 0 !important; | ||
| 39 | - -webkit-appearance: none; | ||
| 40 | - background: transparent; | 33 | + background: #ffffff; |
| 34 | +} | ||
| 35 | +::-webkit-scrollbar { | ||
| 36 | + display: none; | ||
| 37 | + width: 0 !important; | ||
| 38 | + height: 0 !important; | ||
| 39 | + -webkit-appearance: none; | ||
| 40 | + background: transparent; | ||
| 41 | } | 41 | } |
| 42 | </style> | 42 | </style> |
| @@ -29,17 +29,17 @@ | @@ -29,17 +29,17 @@ | ||
| 29 | <u-line length="90%" margin="0 auto" v-if="commandDetail.additionalInfo.cmdType"></u-line> | 29 | <u-line length="90%" margin="0 auto" v-if="commandDetail.additionalInfo.cmdType"></u-line> |
| 30 | <view class="detail-item"> | 30 | <view class="detail-item"> |
| 31 | <view class="detail-label">响应类型</view> | 31 | <view class="detail-label">响应类型</view> |
| 32 | - <view class="detail-value">{{commandDetail.request.oneway?'oneway':'towway'}}</view> | 32 | + <view class="detail-value">{{ commandDetail.request.oneway ? 'oneway' : 'towway' }}</view> |
| 33 | </view> | 33 | </view> |
| 34 | <u-line length="90%" margin="0 auto"></u-line> | 34 | <u-line length="90%" margin="0 auto"></u-line> |
| 35 | <view class="detail-item"> | 35 | <view class="detail-item"> |
| 36 | <view class="detail-label">下发结果</view> | 36 | <view class="detail-label">下发结果</view> |
| 37 | - <view class="detail-value">{{commandDetail.status==='SUCCESSFUL'?'成功':'失败'}}</view> | 37 | + <view class="detail-value">{{ commandDetail.status === 'SUCCESSFUL' ? '成功' : '失败' }}</view> |
| 38 | </view> | 38 | </view> |
| 39 | <u-line length="90%" margin="0 auto"></u-line> | 39 | <u-line length="90%" margin="0 auto"></u-line> |
| 40 | <view class="detail-item"> | 40 | <view class="detail-item"> |
| 41 | <view class="detail-label">响应结果</view> | 41 | <view class="detail-label">响应结果</view> |
| 42 | - <view class="detail-value">{{commandDetail.response?'成功':'失败'}}</view> | 42 | + <view class="detail-value">{{ commandDetail.response ? '成功' : '失败' }}</view> |
| 43 | </view> | 43 | </view> |
| 44 | </view> | 44 | </view> |
| 45 | <view class="command">命令内容</view> | 45 | <view class="command">命令内容</view> |
| @@ -70,14 +70,13 @@ export default { | @@ -70,14 +70,13 @@ export default { | ||
| 70 | format(date) { | 70 | format(date) { |
| 71 | return formatToDate(date, 'YYYY-MM-DD HH:mm:ss'); | 71 | return formatToDate(date, 'YYYY-MM-DD HH:mm:ss'); |
| 72 | }, | 72 | }, |
| 73 | - formatValue(value){ | ||
| 74 | - return JSON.stringify(value) | 73 | + formatValue(value) { |
| 74 | + return JSON.stringify(value); | ||
| 75 | } | 75 | } |
| 76 | }, | 76 | }, |
| 77 | onLoad(options) { | 77 | onLoad(options) { |
| 78 | const { data } = options; | 78 | const { data } = options; |
| 79 | this.commandDetail = JSON.parse(data); | 79 | this.commandDetail = JSON.parse(data); |
| 80 | - console.log(this.commandDetail, '---------'); | ||
| 81 | } | 80 | } |
| 82 | }; | 81 | }; |
| 83 | </script> | 82 | </script> |
| @@ -19,7 +19,25 @@ | @@ -19,7 +19,25 @@ | ||
| 19 | </view> | 19 | </view> |
| 20 | <view v-if="item.statusName"> | 20 | <view v-if="item.statusName"> |
| 21 | 命令状态: | 21 | 命令状态: |
| 22 | - <text style="margin-left: 16rpx;">{{ item.statusName }}</text> | 22 | + <text |
| 23 | + :style="{ | ||
| 24 | + color: | ||
| 25 | + item.status == 'EXPIRED' | ||
| 26 | + ? 'red' | ||
| 27 | + : item.status == 'DELIVERED' | ||
| 28 | + ? 'blue' | ||
| 29 | + : item.status == 'QUEUED' | ||
| 30 | + ? '#00C9A7' | ||
| 31 | + : item.status == 'TIMEOUT' | ||
| 32 | + ? 'red' | ||
| 33 | + : item.status == 'SENT' | ||
| 34 | + ? '#00C9A7' | ||
| 35 | + : '' | ||
| 36 | + }" | ||
| 37 | + style="margin-left: 16rpx;" | ||
| 38 | + > | ||
| 39 | + {{ item.statusName }} | ||
| 40 | + </text> | ||
| 23 | </view> | 41 | </view> |
| 24 | <view class="time">{{ format(item.createTime) }}</view> | 42 | <view class="time">{{ format(item.createTime) }}</view> |
| 25 | </view> | 43 | </view> |
| @@ -141,7 +159,6 @@ export default { | @@ -141,7 +159,6 @@ export default { | ||
| 141 | .then(res => { | 159 | .then(res => { |
| 142 | this.total = res.total; | 160 | this.total = res.total; |
| 143 | uni.stopPullDownRefresh(); | 161 | uni.stopPullDownRefresh(); |
| 144 | - console.log('获取后端数据', res); | ||
| 145 | //方法一(推荐): 后台接口有返回列表的总页数 totalPage | 162 | //方法一(推荐): 后台接口有返回列表的总页数 totalPage |
| 146 | this.mescroll.endByPage(res.items.length, res.total); //必传参数(当前页的数据个数, 总页数) | 163 | this.mescroll.endByPage(res.items.length, res.total); //必传参数(当前页的数据个数, 总页数) |
| 147 | if (pageNo == 1) { | 164 | if (pageNo == 1) { |
| @@ -225,6 +242,9 @@ export default { | @@ -225,6 +242,9 @@ export default { | ||
| 225 | margin: 20rpx auto; | 242 | margin: 20rpx auto; |
| 226 | color: #333; | 243 | color: #333; |
| 227 | .item { | 244 | .item { |
| 245 | + .delivered-color { | ||
| 246 | + color: blue; | ||
| 247 | + } | ||
| 228 | padding: 30rpx; | 248 | padding: 30rpx; |
| 229 | view { | 249 | view { |
| 230 | font-size: 14px; | 250 | font-size: 14px; |
| @@ -257,7 +277,7 @@ export default { | @@ -257,7 +277,7 @@ export default { | ||
| 257 | .item.success { | 277 | .item.success { |
| 258 | color: #00c9a7; | 278 | color: #00c9a7; |
| 259 | background-color: #00c9a725; | 279 | background-color: #00c9a725; |
| 260 | - } | 280 | + } |
| 261 | } | 281 | } |
| 262 | } | 282 | } |
| 263 | } | 283 | } |
| @@ -279,4 +299,4 @@ export default { | @@ -279,4 +299,4 @@ export default { | ||
| 279 | } | 299 | } |
| 280 | } | 300 | } |
| 281 | } | 301 | } |
| 282 | -</style> | 302 | +</style> |
| @@ -39,7 +39,15 @@ | @@ -39,7 +39,15 @@ | ||
| 39 | }" | 39 | }" |
| 40 | > | 40 | > |
| 41 | {{ | 41 | {{ |
| 42 | - item.severity === 'CRITICAL' ? '危险' : item.severity === 'MAJOR' ? '重要' : item.severity === 'MINOR' ? '次要' : item.severity === 'WARNING' ? '警告' : '不确定' | 42 | + item.severity === 'CRITICAL' |
| 43 | + ? '危险' | ||
| 44 | + : item.severity === 'MAJOR' | ||
| 45 | + ? '重要' | ||
| 46 | + : item.severity === 'MINOR' | ||
| 47 | + ? '次要' | ||
| 48 | + : item.severity === 'WARNING' | ||
| 49 | + ? '警告' | ||
| 50 | + : '不确定' | ||
| 43 | }} | 51 | }} |
| 44 | </text> | 52 | </text> |
| 45 | </view> | 53 | </view> |
| @@ -50,7 +58,13 @@ | @@ -50,7 +58,13 @@ | ||
| 50 | </view> | 58 | </view> |
| 51 | <view v-if="item.status"> | 59 | <view v-if="item.status"> |
| 52 | 告警状态:{{ | 60 | 告警状态:{{ |
| 53 | - item.status === 'CLEARED_UNACK' ? '清除未确认' : item.status === 'CLEARED_ACK' ? '清除已确认' : item.status === 'ACTIVE_UNACK' ? '激活未确认' : '激活已确认' | 61 | + item.status === 'CLEARED_UNACK' |
| 62 | + ? '清除未确认' | ||
| 63 | + : item.status === 'CLEARED_ACK' | ||
| 64 | + ? '清除已确认' | ||
| 65 | + : item.status === 'ACTIVE_UNACK' | ||
| 66 | + ? '激活未确认' | ||
| 67 | + : '激活已确认' | ||
| 54 | }} | 68 | }} |
| 55 | </view> | 69 | </view> |
| 56 | <view class="time">{{ item.createdTime }}</view> | 70 | <view class="time">{{ item.createdTime }}</view> |
| @@ -261,7 +275,6 @@ export default { | @@ -261,7 +275,6 @@ export default { | ||
| 261 | .then(res => { | 275 | .then(res => { |
| 262 | this.total = res.total; | 276 | this.total = res.total; |
| 263 | uni.stopPullDownRefresh(); | 277 | uni.stopPullDownRefresh(); |
| 264 | - console.log('获取后端数据', res); | ||
| 265 | //方法一(推荐): 后台接口有返回列表的总页数 totalPage | 278 | //方法一(推荐): 后台接口有返回列表的总页数 totalPage |
| 266 | this.mescroll.endByPage(res.items.length, res.total); //必传参数(当前页的数据个数, 总页数) | 279 | this.mescroll.endByPage(res.items.length, res.total); //必传参数(当前页的数据个数, 总页数) |
| 267 | if (pageNo == 1) { | 280 | if (pageNo == 1) { |
| @@ -116,9 +116,7 @@ export default { | @@ -116,9 +116,7 @@ export default { | ||
| 116 | // 隐藏原生的tabbar | 116 | // 隐藏原生的tabbar |
| 117 | uni.hideTabBar(); | 117 | uni.hideTabBar(); |
| 118 | }, | 118 | }, |
| 119 | - mounted() { | ||
| 120 | - console.log(this.deviceDetail); | ||
| 121 | - }, | 119 | + mounted() {}, |
| 122 | methods: { | 120 | methods: { |
| 123 | showModal() { | 121 | showModal() { |
| 124 | this.showModel = true; | 122 | this.showModel = true; |
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | </u-form-item> | 22 | </u-form-item> |
| 23 | <view class="info"> | 23 | <view class="info"> |
| 24 | <view class="info-contain"> | 24 | <view class="info-contain"> |
| 25 | - <u-form-item label="反馈" prop="feedbackInfo.message" borderBottom ref="item1"> | 25 | + <u-form-item required label="反馈" prop="feedbackInfo.message" borderBottom ref="item1"> |
| 26 | <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count></u--textarea> | 26 | <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count></u--textarea> |
| 27 | </u-form-item> | 27 | </u-form-item> |
| 28 | </view> | 28 | </view> |
| @@ -48,20 +48,15 @@ | @@ -48,20 +48,15 @@ | ||
| 48 | <!-- #endif --> | 48 | <!-- #endif --> |
| 49 | </view> | 49 | </view> |
| 50 | <view style="height: 20rpx;"></view> | 50 | <view style="height: 20rpx;"></view> |
| 51 | - <f-tabbar></f-tabbar> | ||
| 52 | </view> | 51 | </view> |
| 53 | </view> | 52 | </view> |
| 54 | </template> | 53 | </template> |
| 55 | 54 | ||
| 56 | <script> | 55 | <script> |
| 57 | -import fTabbar from '@/components/module/f-tabbar/f-tabbar'; | ||
| 58 | import baseUrl from '@/config/baseUrl.js'; | 56 | import baseUrl from '@/config/baseUrl.js'; |
| 59 | import { mapState } from 'vuex'; | 57 | import { mapState } from 'vuex'; |
| 60 | 58 | ||
| 61 | export default { | 59 | export default { |
| 62 | - components: { | ||
| 63 | - fTabbar | ||
| 64 | - }, | ||
| 65 | data() { | 60 | data() { |
| 66 | return { | 61 | return { |
| 67 | feedbackData: { | 62 | feedbackData: { |
| @@ -77,105 +72,45 @@ export default { | @@ -77,105 +72,45 @@ export default { | ||
| 77 | }, | 72 | }, |
| 78 | fileList1: [], | 73 | fileList1: [], |
| 79 | rules: { | 74 | rules: { |
| 80 | - 'feedbackInfo.title': [ | ||
| 81 | - { | ||
| 82 | - type: 'string', | ||
| 83 | - required: true, | ||
| 84 | - message: '请填写主题', | ||
| 85 | - trigger: ['blur', 'change'] | ||
| 86 | - }, | ||
| 87 | - { | ||
| 88 | - validator: (rule, value, callback) => { | ||
| 89 | - return uni.$u.test.chinese(value); | ||
| 90 | - }, | ||
| 91 | - message: '主题必须为中文', | ||
| 92 | - trigger: ['change', 'blur'] | ||
| 93 | - } | ||
| 94 | - ], | ||
| 95 | - 'feedbackInfo.name': [ | ||
| 96 | - { | ||
| 97 | - type: 'string', | ||
| 98 | - required: true, | ||
| 99 | - message: '请填写姓名', | ||
| 100 | - trigger: ['blur', 'change'] | ||
| 101 | - }, | ||
| 102 | - { | ||
| 103 | - validator: (rule, value, callback) => { | ||
| 104 | - return uni.$u.test.chinese(value); | ||
| 105 | - }, | ||
| 106 | - message: '姓名必须为中文', | ||
| 107 | - trigger: ['change', 'blur'] | ||
| 108 | - } | ||
| 109 | - ], | ||
| 110 | - 'feedbackInfo.phone': [ | ||
| 111 | - { | ||
| 112 | - type: 'number', | ||
| 113 | - required: true, | ||
| 114 | - message: '请填写手机号码', | ||
| 115 | - trigger: ['blur', 'change'] | ||
| 116 | - }, | ||
| 117 | - { | ||
| 118 | - validator: (rule, value, callback) => { | ||
| 119 | - const pattern=/^[0-11]*$/g | ||
| 120 | - if(pattern.test(value)){ | ||
| 121 | - }else{ | ||
| 122 | - return uni.$u.toast('手机号只能是数字且为11位数') | ||
| 123 | - } | ||
| 124 | - }, | ||
| 125 | - message: '手机号码不正确', | ||
| 126 | - trigger: ['change', 'blur'] | ||
| 127 | - } | ||
| 128 | - ], | ||
| 129 | - 'feedbackInfo.qq': [ | ||
| 130 | - { | ||
| 131 | - type: 'number', | ||
| 132 | - required: true, | ||
| 133 | - message: '请填写qq号码', | ||
| 134 | - trigger: ['blur', 'change'] | ||
| 135 | - }, | ||
| 136 | - { | ||
| 137 | - validator: (rule, value, callback) => { | ||
| 138 | - const pattern=/^[0-10]*$/g | ||
| 139 | - if(pattern.test(value)){ | ||
| 140 | - }else{ | ||
| 141 | - return uni.$u.toast('qq号只能是数字') | ||
| 142 | - } | ||
| 143 | - }, | ||
| 144 | - message: 'qq号码不正确', | ||
| 145 | - trigger: ['change', 'blur'] | ||
| 146 | - } | ||
| 147 | - ], | ||
| 148 | - 'feedbackInfo.email': [ | ||
| 149 | - { | ||
| 150 | - type: 'string', | ||
| 151 | - required: true, | ||
| 152 | - message: '请填写邮箱', | ||
| 153 | - trigger: ['blur', 'change'] | ||
| 154 | - }, | ||
| 155 | - { | ||
| 156 | - validator: (rule, value, callback) => { | ||
| 157 | - return uni.$u.test.email(value); | ||
| 158 | - }, | ||
| 159 | - message: '邮箱不正确', | ||
| 160 | - trigger: ['change', 'blur'] | ||
| 161 | - } | ||
| 162 | - ], | ||
| 163 | - 'feedbackInfo.message': [ | ||
| 164 | - { | ||
| 165 | - type: 'string', | ||
| 166 | - required: true, | ||
| 167 | - message: '请填写意见反馈', | ||
| 168 | - trigger: ['blur', 'change'] | ||
| 169 | - }, | ||
| 170 | - { | ||
| 171 | - validator: (rule, value, callback) => { | ||
| 172 | - return uni.$u.test.chinese(value); | ||
| 173 | - }, | ||
| 174 | - message: '意见反馈必须为中文', | ||
| 175 | - trigger: ['change', 'blur'] | ||
| 176 | - } | ||
| 177 | - ] | ||
| 178 | - } | 75 | + 'feedbackInfo.title': { |
| 76 | + type: 'string', | ||
| 77 | + required: true, | ||
| 78 | + message: '请填写主题或者主题格式错误', | ||
| 79 | + pattern:/^[\u4e00-\u9fa5]+$/, | ||
| 80 | + trigger: ['blur', 'change'] | ||
| 81 | + }, | ||
| 82 | + 'feedbackInfo.name': { | ||
| 83 | + type: 'string', | ||
| 84 | + required: true, | ||
| 85 | + pattern:/^[\u4e00-\u9fa5]+$/, | ||
| 86 | + message: '请填写姓名或者姓名格式错误', | ||
| 87 | + trigger: ['blur', 'change'] | ||
| 88 | + }, | ||
| 89 | + 'feedbackInfo.phone': { | ||
| 90 | + type: 'number', | ||
| 91 | + min: 11, | ||
| 92 | + message: '请填写手机或者手机格式错误', | ||
| 93 | + trigger: ['blur', 'change'] | ||
| 94 | + }, | ||
| 95 | + 'feedbackInfo.qq': { | ||
| 96 | + type: 'number', | ||
| 97 | + min: 8, | ||
| 98 | + message: '请填写qq或者qq格式错误', | ||
| 99 | + trigger: ['blur', 'change'] | ||
| 100 | + }, | ||
| 101 | + 'feedbackInfo.email': { | ||
| 102 | + type: 'email', | ||
| 103 | + message: '请填写邮箱或者邮箱格式错误', | ||
| 104 | + trigger: ['blur', 'change'] | ||
| 105 | + }, | ||
| 106 | + 'feedbackInfo.message': { | ||
| 107 | + type: 'string', | ||
| 108 | + required: true, | ||
| 109 | + message: '请填写意见反馈或者意见反馈格式错误', | ||
| 110 | + trigger: ['blur', 'change'] | ||
| 111 | + }, | ||
| 112 | + | ||
| 113 | + }, | ||
| 179 | }; | 114 | }; |
| 180 | }, | 115 | }, |
| 181 | onReady() { | 116 | onReady() { |
| @@ -255,37 +190,39 @@ export default { | @@ -255,37 +190,39 @@ export default { | ||
| 255 | this.$refs.myfeedBackFormRef | 190 | this.$refs.myfeedBackFormRef |
| 256 | .validate() | 191 | .validate() |
| 257 | .then(res => { | 192 | .then(res => { |
| 258 | - let contactInfo = { | ||
| 259 | - qq: this.feedbackData.feedbackInfo?.qq, | ||
| 260 | - email: this.feedbackData.feedbackInfo?.email, | ||
| 261 | - phone: this.feedbackData.feedbackInfo?.phone | ||
| 262 | - }; | ||
| 263 | - let httpData = { | ||
| 264 | - title: this.feedbackData.feedbackInfo.title, | ||
| 265 | - name: this.feedbackData.feedbackInfo.name, | ||
| 266 | - contact: JSON.stringify(contactInfo), | ||
| 267 | - images: this.feedbackData.feedbackInfo.images.length == 0 ? '' : JSON.stringify(this.feedbackData.feedbackInfo.images), | ||
| 268 | - message: this.feedbackData.feedbackInfo.message | ||
| 269 | - }; | ||
| 270 | - uni.$u.http | ||
| 271 | - .post('/yt/opinion', httpData) | ||
| 272 | - .then(res => { | ||
| 273 | - if (res) { | ||
| 274 | - uni.showToast({ | ||
| 275 | - title: '意见反馈提交成功~', | ||
| 276 | - icon: 'none' | ||
| 277 | - }); | ||
| 278 | - setTimeout(() => { | ||
| 279 | - uni.navigateBack(); | ||
| 280 | - }, 500); | ||
| 281 | - } | ||
| 282 | - }) | ||
| 283 | - .catch(e => { | ||
| 284 | - uni.$u.toast(e.data?.message); | ||
| 285 | - }); | 193 | + if(res){ |
| 194 | + let contactInfo = { | ||
| 195 | + qq: this.feedbackData.feedbackInfo?.qq, | ||
| 196 | + email: this.feedbackData.feedbackInfo?.email, | ||
| 197 | + phone: this.feedbackData.feedbackInfo?.phone | ||
| 198 | + }; | ||
| 199 | + let httpData = { | ||
| 200 | + title: this.feedbackData.feedbackInfo.title, | ||
| 201 | + name: this.feedbackData.feedbackInfo.name, | ||
| 202 | + contact: JSON.stringify(contactInfo), | ||
| 203 | + images: this.feedbackData.feedbackInfo.images.length == 0 ? '' : JSON.stringify(this.feedbackData.feedbackInfo.images), | ||
| 204 | + message: this.feedbackData.feedbackInfo.message | ||
| 205 | + }; | ||
| 206 | + uni.$u.http | ||
| 207 | + .post('/yt/opinion', httpData) | ||
| 208 | + .then(res => { | ||
| 209 | + if (res) { | ||
| 210 | + uni.showToast({ | ||
| 211 | + title: '意见反馈提交成功~', | ||
| 212 | + icon: 'none' | ||
| 213 | + }); | ||
| 214 | + setTimeout(() => { | ||
| 215 | + uni.navigateBack(); | ||
| 216 | + }, 500); | ||
| 217 | + } | ||
| 218 | + }) | ||
| 219 | + .catch(e => { | ||
| 220 | + uni.$u.toast(e.data?.message); | ||
| 221 | + }); | ||
| 222 | + } | ||
| 286 | }) | 223 | }) |
| 287 | .catch(errors => { | 224 | .catch(errors => { |
| 288 | - uni.$u.toast('校验失败'); | 225 | + uni.$u.toast('请填写或者请填写正确格式的数据'); |
| 289 | }); | 226 | }); |
| 290 | } | 227 | } |
| 291 | } | 228 | } |
| @@ -17,16 +17,24 @@ | @@ -17,16 +17,24 @@ | ||
| 17 | <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> | 17 | <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> |
| 18 | <view class="camera-container"> | 18 | <view class="camera-container"> |
| 19 | <view class="container-item"> | 19 | <view class="container-item"> |
| 20 | - <view @click="openCameraDetail(item.url)" v-for="(item, index) in list" :key="index" class="item"> | ||
| 21 | - <video class="video" :src="item.videoUrl" controls></video> | 20 | + <view v-for="(item, index) in list" :key="index" class="item"> |
| 21 | + <video | ||
| 22 | + :data-id="item.id" | ||
| 23 | + :key="item.id" | ||
| 24 | + :id="'video' + item.id" | ||
| 25 | + class="video" | ||
| 26 | + :src="item.videoUrl" | ||
| 27 | + controls | ||
| 28 | + webkit-playsinline | ||
| 29 | + x5-video-player-type="h5" | ||
| 30 | + x5-video-orientation="portraint" | ||
| 31 | + show-mute-btn | ||
| 32 | + :poster="item.avatar" | ||
| 33 | + @play="playVideo" | ||
| 34 | + ></video> | ||
| 22 | <view class="bottom-text"> | 35 | <view class="bottom-text"> |
| 23 | <text class="text">{{ item.name }}</text> | 36 | <text class="text">{{ item.name }}</text> |
| 24 | </view> | 37 | </view> |
| 25 | - <!-- #ifdef MP --> | ||
| 26 | - <view @click="hideImageUrl(item, index)" :style="[index == current ? { display: 'none' } : { display: 'block' }]" class="avatar-cover"> | ||
| 27 | - <image class="image" :src="item.avatar"></image> | ||
| 28 | - </view> | ||
| 29 | - <!-- #endif --> | ||
| 30 | </view> | 38 | </view> |
| 31 | </view> | 39 | </view> |
| 32 | </view> | 40 | </view> |
| @@ -56,7 +64,8 @@ export default { | @@ -56,7 +64,8 @@ export default { | ||
| 56 | current: 0, | 64 | current: 0, |
| 57 | cameraTotal: 0, | 65 | cameraTotal: 0, |
| 58 | list: [], | 66 | list: [], |
| 59 | - ordId: '' | 67 | + ordId: '', |
| 68 | + videoContext: null | ||
| 60 | }; | 69 | }; |
| 61 | }, | 70 | }, |
| 62 | onShow() { | 71 | onShow() { |
| @@ -65,6 +74,9 @@ export default { | @@ -65,6 +74,9 @@ export default { | ||
| 65 | this.loadData(1, this.ordId); | 74 | this.loadData(1, this.ordId); |
| 66 | } | 75 | } |
| 67 | }, | 76 | }, |
| 77 | + onReady() { | ||
| 78 | + this.videoContext = uni.createVideoContext('myVideo', this); | ||
| 79 | + }, | ||
| 68 | onHide() { | 80 | onHide() { |
| 69 | this.ordId = ''; | 81 | this.ordId = ''; |
| 70 | this.loadData(1, null); | 82 | this.loadData(1, null); |
| @@ -72,7 +84,6 @@ export default { | @@ -72,7 +84,6 @@ export default { | ||
| 72 | onLoad() { | 84 | onLoad() { |
| 73 | // 隐藏原生的tabbar | 85 | // 隐藏原生的tabbar |
| 74 | uni.hideTabBar(); | 86 | uni.hideTabBar(); |
| 75 | - this.getcameraTotalData(); | ||
| 76 | }, | 87 | }, |
| 77 | methods: { | 88 | methods: { |
| 78 | /*下拉刷新的回调 */ | 89 | /*下拉刷新的回调 */ |
| @@ -113,8 +124,23 @@ export default { | @@ -113,8 +124,23 @@ export default { | ||
| 113 | hideImageUrl(item, index) { | 124 | hideImageUrl(item, index) { |
| 114 | this.current = index; | 125 | this.current = index; |
| 115 | }, | 126 | }, |
| 116 | - openCameraDetail(e) { | ||
| 117 | - console.log(e); | 127 | + playVideo(e) { |
| 128 | + /** | ||
| 129 | + * 播放当前视频,暂停其余视频 | ||
| 130 | + */ | ||
| 131 | + let currentId = 'video' + e.currentTarget.dataset.id; | ||
| 132 | + this.videoContent = uni.createVideoContext(currentId, this); | ||
| 133 | + this.videoContext.requestFullScreen({ direction: 90 }); | ||
| 134 | + // 获取视频列表 | ||
| 135 | + let trailer = this.list; | ||
| 136 | + trailer.forEach((item, index) => { | ||
| 137 | + if (item.videoUrl != null && item.videoUrl != '') { | ||
| 138 | + let temp = 'video' + item.id; | ||
| 139 | + if (temp != currentId) { | ||
| 140 | + uni.createVideoContext(temp, this).pause(); | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + }); | ||
| 118 | }, | 144 | }, |
| 119 | openOrg() { | 145 | openOrg() { |
| 120 | uni.navigateTo({ | 146 | uni.navigateTo({ |
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | <view class="form-row u-flex"> | 17 | <view class="form-row u-flex"> |
| 18 | <u-input v-model="loginForm.password" :password="showPassword" placeholder="请输入登录密码" border="bottom"> | 18 | <u-input v-model="loginForm.password" :password="showPassword" placeholder="请输入登录密码" border="bottom"> |
| 19 | <template slot="suffix" @click="showPasswordMode"> | 19 | <template slot="suffix" @click="showPasswordMode"> |
| 20 | - <view style="padding:10rpx"><u-icon :name="showPassword ? '/static/eye-hide.png' : '/static/eye.png'"></u-icon></view> | 20 | + <view style="padding:10rpx"><u-icon width="18" height="14" :name="showPassword ? '/static/eye-hide.png' : '/static/eye.png'"></u-icon></view> |
| 21 | </template> | 21 | </template> |
| 22 | </u-input> | 22 | </u-input> |
| 23 | </view> | 23 | </view> |
| @@ -211,7 +211,7 @@ export default { | @@ -211,7 +211,7 @@ export default { | ||
| 211 | token: true, //token用于判断是否登录 | 211 | token: true, //token用于判断是否登录 |
| 212 | 212 | ||
| 213 | isThirdLogin: false, | 213 | isThirdLogin: false, |
| 214 | - isThirdLoginAndNoDind:false | 214 | + isThirdLoginAndNoDind: false |
| 215 | }; | 215 | }; |
| 216 | 216 | ||
| 217 | if (userInfo.token) { | 217 | if (userInfo.token) { |
| @@ -259,4 +259,4 @@ export default { | @@ -259,4 +259,4 @@ export default { | ||
| 259 | /deep/ button { | 259 | /deep/ button { |
| 260 | background: rgba(0, 0, 0, 0); | 260 | background: rgba(0, 0, 0, 0); |
| 261 | } | 261 | } |
| 262 | -</style> | 262 | +</style> |
| @@ -3,12 +3,12 @@ | @@ -3,12 +3,12 @@ | ||
| 3 | <!-- 公共组件-每个页面必须引入 --> | 3 | <!-- 公共组件-每个页面必须引入 --> |
| 4 | <public-module></public-module> | 4 | <public-module></public-module> |
| 5 | <view style="width: 750rpx;height:53rpx;background-color: #f8f9fa;position:fixed;top:0;z-index: 99999;"> | 5 | <view style="width: 750rpx;height:53rpx;background-color: #f8f9fa;position:fixed;top:0;z-index: 99999;"> |
| 6 | - <view @click="openTypeClick" style="background-color: #f8f9fa;width: 700rpx;position: relative;top: 16rpx;"> | 6 | + <view @click="openTypeClick" style="background-color: #f8f9fa;width: 700rpx;position: relative;top: 35rpx;"> |
| 7 | <u--input suffixIcon="arrow-down" shape="circle" disabled v-model="model1.userInfo.type" placeholder="请选择类型" border="surround"></u--input> | 7 | <u--input suffixIcon="arrow-down" shape="circle" disabled v-model="model1.userInfo.type" placeholder="请选择类型" border="surround"></u--input> |
| 8 | <u-action-sheet :show="showType" :actions="actions" title="请选择类型" @close="showType = false" @select="typeSelect"></u-action-sheet> | 8 | <u-action-sheet :show="showType" :actions="actions" title="请选择类型" @close="showType = false" @select="typeSelect"></u-action-sheet> |
| 9 | </view> | 9 | </view> |
| 10 | </view> | 10 | </view> |
| 11 | - <view style="height: 76rpx;"></view> | 11 | + <view style="height: 110rpx;"></view> |
| 12 | <view class="notify-main"> | 12 | <view class="notify-main"> |
| 13 | <!-- 无数据图片 --> | 13 | <!-- 无数据图片 --> |
| 14 | <view v-if="list.length == 0" style="position: relative;top: 100rpx;flex-direction: column;" class="u-flex"> | 14 | <view v-if="list.length == 0" style="position: relative;top: 100rpx;flex-direction: column;" class="u-flex"> |