Browse Source

电表接口对接

fenbao
wangyx 1 month ago
parent
commit
f030a6dcba
  1. 27
      pagesA/sdPage/sfReport.vue
  2. 10
      pagesA/xjPage/xj.vue

27
pagesA/sdPage/sfReport.vue

@ -76,7 +76,7 @@
</view> </view>
</scroll-view> </scroll-view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="u-button--primary" @click="onSubmit">提交</view> <view class="btn" @click="onSubmit">提交</view>
</view> </view>
</template> </template>
@ -453,19 +453,22 @@ display: flex;
margin: 40rpx 0 0 0; margin: 40rpx 0 0 0;
} }
.u-button--primary { .btn {
display: flex; width: 414rpx;
align-items: center; height: 70rpx;
justify-content: center; line-height: 70rpx;
background: linear-gradient(90deg, #0DC6C6 0%, #13C2C2 100%) !important; border-radius: 600rpx;
font-size: 36rpx; background: linear-gradient(
border-radius: 48rpx !important; 86.25deg,
border: none; rgba(13, 198, 198, 1) 3.03%,
rgba(19, 194, 194, 1) 3.03%,
rgba(70, 219, 213, 1) 96.43%
);
color: rgba(255, 255, 255, 1);
font-size: 34rpx;
text-align: center;
margin: auto; margin: auto;
margin-top: 40rpx; margin-top: 40rpx;
width: 80%;
height: 88rpx;
color: rgba(255, 255, 255, 1);
} }
</style> </style>

10
pagesA/xjPage/xj.vue

@ -204,6 +204,16 @@ export default {
maxDuration: 60, maxDuration: 60,
camera: "back", camera: "back",
success: async (res) => { success: async (res) => {
//
const files = res.tempFiles;
//
const oversizeFiles = files.filter(
(file) => file.size > 10 * 1024 * 1024
);
if (oversizeFiles.length > 0) {
this.$u.toast("请选择10MB以内大小的图片/视频!");
return;
}
uni.showLoading({ title: "上传中...", mask: true }); uni.showLoading({ title: "上传中...", mask: true });
try { try {
const files = res.tempFiles; const files = res.tempFiles;

Loading…
Cancel
Save