新联系咨询

This commit is contained in:
A1300399510 2025-02-21 19:04:24 +08:00
parent 3e52da9b75
commit d733bb6aa3
8 changed files with 163 additions and 27 deletions

View File

@ -937,7 +937,7 @@ Page({
wx.chooseImage({
count: 9 - that.data.imgs.length,
sizeType: ['compressed'],
success: function (res) {
success: (res) => {
let isLt10M = true;
let isSvg = true
var imgList = [];
@ -947,7 +947,26 @@ Page({
let suffix = res.tempFiles[i].path.slice(suffixIndex + 1, res.tempFiles[i].path.length)
if (size < 5 && !limitSuffix.includes(suffix.toLowerCase())) {
// 小于3M且照片数量<6的时候才触发上传
that.upload_picnew(res.tempFiles[i].path, "image")
// that.data.imgs.push({
// url: data.url,
// aid: data.aid
// })
// that.setData({
// imgs: that.data.imgs
// })
let imgs = this.data.imgs || []
imgs.push({
isImgLoad: true,
path: res.tempFiles[i].path,
progress: 0,
})
this.setData({
imgs,
})
that.upload_picnew(res.tempFiles[i].path, this.data.imgs.length)
} else if (size >= 5) isLt10M = false;
else if (limitSuffix.includes(suffix.toLowerCase())) isSvg = false
@ -976,10 +995,9 @@ Page({
},
// 上传图片
upload_picnew: function (imgUrl, type) {
console.log("imgUrl", imgUrl);
upload_picnew: function (imgUrl, index) {
var that = this;
console.log("uploadData",this.data.uploadData);
// console.log("uploadData", this.data.uploadData);
const uploadTask = wx.uploadFile({
url: `https://oss.gter.net/upload`,
filePath: imgUrl,
@ -987,7 +1005,7 @@ Page({
formData: {
uniqid: that.data.uniqid,
session: app.globalData.session,
type,
type: "image",
data: this.data.uploadData,
},
header: app.globalData.header,
@ -998,20 +1016,19 @@ Page({
data = data.data
if (data.aid > 0) {
// 长度<6个的时候再push
if (that.data.imgs.length < 9) {
that.data.imgs.push({
url: data.url,
aid: data.aid
})
that.setData({
imgs: that.data.imgs
})
} else {
wx.showToast({
title: '最多可上传9张',
icon: 'none'
})
}
let imgs = that.data.imgs
imgs.forEach((element, index) => {
if (element.path == imgUrl) {
element['isImgLoad'] = false
element['url'] = data.url
element['aid'] = data.aid
}
})
that.setData({
imgs,
})
} else {
wx.showModal({
title: data.state,
@ -1038,6 +1055,19 @@ Page({
})
}
})
uploadTask.onProgressUpdate(res => {
let imgs = this.data.imgs
console.log("imgs", imgs, "imgUrl", imgUrl);
// imgs[index - 1]['progress'] = res.progress
imgs.forEach((element, index) => {
if (element.path == imgUrl) element['progress'] = res.progress
})
this.setData({
imgs
})
})
console.log("uploadTask", uploadTask);
},
// 选择mp4

View File

@ -299,7 +299,12 @@
<view class="homePhoto-boxes">
<view class="homePhoto-box-chunk {{ item['aid'] == newinfo['aid'] ? imgs.length != 1 ? 'homePhoto-pitch' : '' : ''}} flexflex" wx:for="{{ imgs }}" wx:key="aid">
<view class="homePhoto-add" bindtap="get_img">
<image class="homePhoto-add-img" mode="aspectFill" src="{{ item.url || item.image }}"></image>
<image class="homePhoto-add-img" mode="aspectFill" src="{{ item.path || item.url || item.image }}"></image>
<view class="img-loading flexcenter" wx:if="{{ item.isImgLoad }}">
<view class="progress">
<view class="progress-value" style="width: {{ (item.progress || 0) + '%' }};"></view>
</view>
</view>
</view>
<view class="close-btn" catchtap="del_pic" data-box="img" data-index="{{ index }}">
<image src="/img/plusf.png"></image>
@ -345,7 +350,8 @@
<text class="last-step-text">{{popUpSubtitle}}</text>
<view class="twoLines-option option-box">
<view wx:for="{{ item.choices }}" wx:key="index" class="twoLines-option-item option-item {{item.field}} {{ m1.fn([newinfo[item.field]],item.value, item.field ).indexOf ? 'option-hover':'' }}" hover-class="option-hover" wx:key="index" data-key="{{ item.key}}" bindtap="selectOption" data-key="{{ it.key }}" data-field="{{ it.field }}" data-choices="{{ it.choices }}" data-value="{{ item.value }}">
{{ item.value }}</view>
{{ item.value }}
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
@ -413,7 +419,8 @@
<picker-view indicator-class="picker" indicator-style="height: 50px;" style="width: 100%; height: 670rpx;margin: 80rpx 0;" immediate-change="{{ true }}" value="{{floorValue}}" bindchange="bindChange1">
<picker-view-column style="text-align: center;margin: 0 75rpx 200rpx;">
<view wx:for="{{ 103 }}" wx:key="key" class="{{ index == floorValue ? 'pickerpitch' : ''}}" style="line-height: 50px;" data-item="{{ item-3 }}">
{{ item - 3 >= 0 ? item - 2 : item - 3}} {{ index == floorValue ? '楼' : '' }}</view>
{{ item - 3 >= 0 ? item - 2 : item - 3}} {{ index == floorValue ? '楼' : '' }}
</view>
</picker-view-column>
</picker-view>
@ -479,8 +486,13 @@
<view class="pop-up-homePhoto-image-box">
<view class="homePhoto-box-chunk {{ item['aid'] == newinfo['aid'] ? imgs.length != 1 ? 'homePhoto-pitch' : '' : ''}} flexflex" wx:for="{{ imgs }}" wx:key="index" style="width: 178rpx; margin: 0 30rpx 60rpx;">
<view class="pop-up-homePhoto-image">
<image mode="aspectFit" class="pop-up-homePhoto-image-item" src="{{ item.url || item.image }}">
<image mode="aspectFit" class="pop-up-homePhoto-image-item" src="{{ item.path || item.url || item.image }}">
</image>
<view class="img-loading flexcenter" wx:if="{{ item.isImgLoad }}">
<view class="progress">
<view class="progress-value" style="width: {{ (item.progress || 0) + '%' }};"></view>
</view>
</view>
</view>
<view class="close-btn" catchtap="del_pic" data-box="img" data-index="{{ index }}">
<image src="/img/plusf.png"></image>
@ -698,7 +710,8 @@
<view class="ofDate-date">
<view class="ofDate-blank" wx:for="{{ s.week }}" wx:key="index"></view>
<view wx:for="{{ s.monthDayCount }}" wx:for-index="i" wx:key="i" class="ofDate-number {{(pitchyear == s.year) && (pitchmonth == s.month) && (pitchday == i + 1) ? 'pitchdate' : ''}}" bindtap="selectOfDate" data-year="{{ s.year }}" data-month="{{ s.month }}" data-day="{{ i + 1 }}">
{{ i + 1 }} </view>
{{ i + 1 }}
</view>
</view>
</view>
</view>

View File

@ -427,7 +427,7 @@
align-items: center;
overflow: hidden;
margin-bottom: 20rpx;
position: relative;
}
.homePhoto-add-icon {
@ -440,6 +440,30 @@
max-height: 100%;
}
.img-loading {
width: 100%;
height: 100%;
position: absolute;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.6);
}
.img-loading .progress {
width: 80%;
height: 20rpx;
background-color: rgb(235, 235, 235);
border-radius: 40rpx;
}
.img-loading .progress .progress-value {
width: 10%;
height: 100%;
background-color: rgb(9, 187, 7);
border-radius: 40rpx;
transition: all .3s;
}
.red-dot {
position: absolute;
top: -16rpx;
@ -764,6 +788,7 @@
.pop-up-homePhoto-image .pop-up-homePhoto-image-item {
width: 178rpx;
height: 178rpx;
position: relative;
}
.pop-up-homePhoto-image.pop-up-homePhoto-image-kong {

View File

@ -170,7 +170,6 @@ Page({
},
copy(e) {
let value = e.currentTarget.dataset.value
miucms.copy(this.data.wechat.wechat)
},

View File

@ -100,6 +100,7 @@
<view class="query-btn flexcenter" bindtap="copy" data-value="{{ wechat['wechat'] }}">复制微信号</view>
</view>
<!-- 关注 -->
<view class="popup-bj" wx:if="{{ popupState }}" bindtap="attention">
<view class="popup-box" catchtap="popup-box">
<image catchtap="attention" class="close-icon" src="/img/plusgrey.png"></image>
@ -109,4 +110,20 @@
<view class="popup-hint">长按扫码即可关注</view>
</view>
</view>
<!-- 咨询 -->
<view class="popup-bj consult-pop flexflex">
<view class="box flexacenter">
<image class="title" mode="widthFix" src="https://app.gter.net/image/miniApp/HKRenting/consult-title.png"></image>
<view class="hint flexacenter">
<image class="icon" mode="widthFix"></image>
寄托方同学的小助手
</view>
<view class="QR-code">
<!-- <image class="" mode="widthFix"></image> -->
<view class="text"></view>
</view>
</view>
</view>
</view>

View File

@ -1,5 +1,6 @@
/* pages/messageCenter/messageCenter.wxss */
@import '/pages/common/common.wxss';
@import './messageCenterLess.wxss';
.container {
background-color: rgba(246, 246, 246, 1);

View File

@ -0,0 +1,28 @@
.consult-pop {
align-items: flex-end;
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
.box {
width: 100%;
height: 891rpx;
background: linear-gradient(180deg, rgba(244, 244, 244, 1) -1%, rgba(247, 250, 255, 1) 100%);
border-radius: 30rpx 30rpx 0 0;
flex-direction: column;
.title {
width: 331.5rpx;
height: 72rpx;
}
.hint {
.icon {
width: 33rpx;
height: 33rpx;
}
font-size: 27rpx;
color: #333333;
}
}
}

View File

@ -0,0 +1,23 @@
.consult-pop {
align-items: flex-end;
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
}
.consult-pop .box {
width: 100%;
height: 891rpx;
background: linear-gradient(180deg, #f4f4f4 -1%, #f7faff 100%);
border-radius: 30rpx 30rpx 0 0;
flex-direction: column;
}
.consult-pop .box .title {
width: 331.5rpx;
height: 72rpx;
}
.consult-pop .box .hint {
font-size: 27rpx;
color: #333333;
}
.consult-pop .box .hint .icon {
width: 33rpx;
height: 33rpx;
}