diff --git a/components/its-calendar/its-calendar1.vue b/components/its-calendar/its-calendar1.vue new file mode 100644 index 0000000..0fae617 --- /dev/null +++ b/components/its-calendar/its-calendar1.vue @@ -0,0 +1,304 @@ + + + + + + {{item.weeks}} + {{item.days}} + + + + + {{ ((nowTimes < item.timeStamp) && (msformatArr.indexOf(item.hours) !== -1)) || (msformatArr.indexOf(item.hours) !== -1) ? '约满' : item.hours }} + + + 添加时间 + + + + + + + + \ No newline at end of file diff --git a/components/pretty-times/pretty-times.scss b/components/pretty-times/pretty-times.scss new file mode 100644 index 0000000..86bb771 --- /dev/null +++ b/components/pretty-times/pretty-times.scss @@ -0,0 +1,107 @@ +.container{ + view,text,image{ + box-sizing: border-box; + } + scroll-view{ + width: 100%; + white-space: nowrap; + height: 75px; + background-color: #fff; + position: relative; + padding-top: 10px; + + // margin-top:10px; + &::after{ + background: #e5e5e5; + content: ''; + display:block; + width: 100%; + height: 1px; + position: absolute; + bottom: 0; + left: 0; + transform:scaleY(0.5); + + } + .flex-box{ + display: inline-block; + height: 60px; + width: 25%; + margin: 0 7rpx 0 7rpx; + box-sizing: border-box; + + &.active{ + .date-box{ + border: none; + .days{ + font-weight: bold; + color: #818181; + } + .date{ + font-weight: bold; + color: #818181; + } + } + } + .date-box{ + border: none; + display: flex; + height: 50px; + flex-direction: column; + align-items: center; + justify-content: space-around; + font-size: 30upx; + color: rgba(129, 129, 129, 1); + .date{ + font-weight: bold; + color: #818181; + font-size: 30upx; + + } + } + } + + } + .time-box{ + padding:28upx 12upx 26upx; + display: flex; + flex-wrap: wrap; + // margin-top:10px; + background-color:#fff; + .item{ + width: 25%; + padding: 0 9upx; + margin:10px 0; + &-box{ + width: 100%; + height: 106upx; + padding:0 44upx; + background: #fff; + color: #333; + border: 1px solid #EEEEEE; + font-size: 28upx; + border-radius: 10upx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + &.disable{ + background: #F1F3F6 !important; + color: #999 !important; + // border: 1px solid #EEEEEE; + } + &.active{ + // background: #0094D7; + border: 1px solid #FB5D6B; + font-weight: bold; + } + .all{ + white-space: nowrap; + font-size: 22upx; + padding-top: 5px; + } + } + } + } + +} \ No newline at end of file diff --git a/components/pretty-times/pretty-times.vue b/components/pretty-times/pretty-times.vue new file mode 100644 index 0000000..7dffff8 --- /dev/null +++ b/components/pretty-times/pretty-times.vue @@ -0,0 +1,418 @@ + + + + + + + + + {{item.week}} + {{item.date}} + + + + + + + + + + + {{item.begin}}~{{item.end}} + {{item.time}} + {{item.disable?disableText:undisableText}} + + + + + + + + + + {{item.time}} + {{item.disable?disableText:undisableText}} + + + + + + + + 预约时间:{{orderDateTime}} + + + 保存 + + + + + + + + \ No newline at end of file diff --git a/manifest.json b/manifest.json index 176d6d0..bc1f885 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "盛安到家", "appid" : "__UNI__B37C795", "description" : "", - "versionName" : "2.1.3", - "versionCode" : 140, + "versionName" : "2.1.4", + "versionCode" : 150, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/my/order/revenueDetails.vue b/my/order/revenueDetails.vue index 1e772ee..83b4f6c 100644 --- a/my/order/revenueDetails.vue +++ b/my/order/revenueDetails.vue @@ -1553,8 +1553,7 @@ 联系客服 - + 联系客户 @@ -1882,6 +1881,39 @@ } }, methods: { + //绑定虚拟号 + bindPhone(){ + console.log('手机号是:',this.phone); + //调试时先写个假的 + //this.phone = '13080011344' + this.$Request.get('/app/user/insertVirtualPhoneAxN?phone=' + this.phone).then(res => { + console.log('返回的全部数据:',res); + if (res.code == 0) { + console.log('返回数据是:',res.data); + let middleNumber = res.data.middleNumber; + console.log('虚拟号是:',middleNumber); + if(res.data.result === '000000'){ + //弹出提示框,告知号码 + uni.showModal({ + title: '提示', + content: '绑定号码为:' + middleNumber + ",是否拨打该电话?", + success: function(res) { + if (res.confirm) { + //直接拨打号码(拨打到打电话页(未点击拨号)) + uni.makePhoneCall({ + phoneNumber: middleNumber, + }) + } else if (res.cancel) { + console.log('用户点击取消'); + } + } + }) + } else { + this.$queue.showToast('绑定虚拟号错误!'); + } + } + }); + }, getOrder() { let data = { ordersId: this.ordersId diff --git a/pages/my/index.vue b/pages/my/index.vue index f94f6bd..9c6755d 100644 --- a/pages/my/index.vue +++ b/pages/my/index.vue @@ -239,11 +239,11 @@ 视频圈 - - + + @@ -18,13 +20,20 @@ + + diff --git a/unpackage/release/apk/__UNI__B37C795__20240826174224.apk b/unpackage/release/apk/__UNI__B37C795__20240826174224.apk new file mode 100644 index 0000000..f91464e Binary files /dev/null and b/unpackage/release/apk/__UNI__B37C795__20240826174224.apk differ diff --git a/utils/date.js b/utils/date.js new file mode 100644 index 0000000..6609192 --- /dev/null +++ b/utils/date.js @@ -0,0 +1,93 @@ +//字符串拼接 +function strFormat(str) { + return str < 10 ? `0${str}` : str +} +// 获取当前时间 +export function currentTime() { + const myDate = new Date(); + const y = myDate.getFullYear() + const m = myDate.getMonth() + 1; + const d = myDate.getDate(); + const date = y + '-' + strFormat(m) + '-' + strFormat(d); + + const hour = myDate.getHours() + const min = myDate.getMinutes() + const secon = myDate.getSeconds() + const time = strFormat(hour) + ':' + strFormat(min) + ':' + strFormat(secon); + return { + date, + time + } +} + +//时间戳转日期 +export function timeStamp(time, isQuantum) { + const dates = new Date(time) + const year = dates.getFullYear() + const month = dates.getMonth() + 1 + const date = dates.getDate() + const day = dates.getDay() + const hour = dates.getHours() + const min = dates.getMinutes() + const days = ['日', '一', '二', '三', '四', '五', '六'] + return { + allDate: `${year}/${strFormat(month)}/${strFormat(date)}`, + date: `${strFormat(year)}-${strFormat(month)}-${strFormat(date)}`, //返回的日期 07-01 + day: `星期${days[day]}`, //返回的礼拜天数 星期一 + hour: strFormat(hour) + ':' + strFormat(min) + (isQuantum ? "" : ':00') //返回的时钟 08:00 + } +} + +//获取最近7天的日期和礼拜天数 +export function initData() { + const time = [] + const date = new Date() + + const now = date.getTime() //获取当前日期的时间戳 + let timeStr = 3600 * 24 * 1000 //一天的时间戳 + let obj = { + 0: "今天", + 1: "明天", + 2: "后天" + } + for (let i = 0; i < 7; i++) { + time.push({ + date: timeStamp(now + timeStr * i).date, //保存日期 + timeStamp: now + timeStr * i, //保存时间戳 + week: obj[i] ?? timeStamp(now + timeStr * i).day + }) + } + return time +} + +//时间数组 +export function initTime(startTime = '10:00:00', endTime = '21:00:00', timeInterval = 1, isQuantum = false) { + const time = [] + const date = timeStamp(Date.now()).allDate + const startDate = `${date} ${startTime}` + const endDate = `${date} ${endTime}` + const startTimeStamp = new Date(startDate).getTime() + const endTimeStamp = new Date(endDate).getTime() + const timeStr = 3600 * 1000 * timeInterval + const sum = (endTimeStamp - startTimeStamp) / timeStr + const count = sum % 2 == 0 ? sum : (sum - 1) + let num = 0 + for (let i = startTimeStamp; i <= endTimeStamp; i = i + timeStr) { + + if (isQuantum) { + num++ + time.push({ + begin: timeStamp(i, isQuantum).hour, + end: timeStamp(i + timeStr, isQuantum).hour, + disable: false + }) + } else { + time.push({ + time: timeStamp(i).hour, + disable: false + }) + } + if (isQuantum && num >= count) return time + } + return time +}