From 10e42047e6629f9e313ff8bedef7235721aefa4e Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Thu, 8 Feb 2024 13:55:41 +0800
Subject: [PATCH] 1111111
---
App.vue | 19 +--
pages/good/reservation.vue | 2 +-
pages/home/cloudCard2.vue | 89 +++++++++++++
pages/home/myCellar.vue | 126 ++++++++++++++++--
pages/home/myHome.vue | 122 +++++++++++++++++
pages/login/login.vue | 2 +
.../uni-datetime-picker/calendar.vue | 44 ++++--
7 files changed, 372 insertions(+), 32 deletions(-)
diff --git a/App.vue b/App.vue
index 3f24c58..37dc5ca 100644
--- a/App.vue
+++ b/App.vue
@@ -8,6 +8,7 @@
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
sid: "",
token: "",
+ mobile: "",
isNewUser: "", //是否新人 0 否 1 是 邀请新人助力
isPurchase: "", //是否购买过 1否 0是 首页新人礼包弹框
navInfo: {
@@ -15,16 +16,16 @@
}
},
onLaunch: function() {
-
+
wx.hideTabBar()
-
+
const updateManager = uni.getUpdateManager();
-
+
updateManager.onCheckForUpdate(function(res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate);
});
-
+
updateManager.onUpdateReady(function(res) {
uni.showModal({
title: '更新提示',
@@ -36,16 +37,16 @@
}
}
});
-
+
});
-
+
updateManager.onUpdateFailed(function(res) {
// 新的版本下载失败
});
-
-
+
+
this.globalData.navInfo = navParams()
-
+
// let _this = this;
// wx.login({
// success: function(res) {
diff --git a/pages/good/reservation.vue b/pages/good/reservation.vue
index 4750dc9..e87f59f 100644
--- a/pages/good/reservation.vue
+++ b/pages/good/reservation.vue
@@ -155,7 +155,7 @@
- 剩余:
+ 存量:
{{item.goodsNumber}}{{item.unitName}}
diff --git a/pages/home/cloudCard2.vue b/pages/home/cloudCard2.vue
index ddd3817..d98ea9e 100644
--- a/pages/home/cloudCard2.vue
+++ b/pages/home/cloudCard2.vue
@@ -96,6 +96,9 @@
font-size: 10px;color: #EE752F; margin-left: 10px; margin-right: 10px; ">{{item.weight}}{{item.specificationUnit}}/{{item.unitName}}
+
+ 提货截止日:{{item.periodValidity}}
@@ -303,7 +306,36 @@
+
+
+
+
+
+
+
+
+ (云菜窖)
+
+
+
+ 小程序需要获取您的手机号,方便与您联系。
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -316,6 +348,7 @@
imgList: [],
notData: false,
showModal: false,
+ showModal1: false,
showModal2: false,
newPerGiftList: [
@@ -382,6 +415,10 @@
if (getApp().globalData.isPurchase == '1')
this.showModal = true
+
+ if (getApp().globalData.mobile == '')
+ this.showModal1 = true
+
},
onLoad(options) {
@@ -450,6 +487,9 @@
colseDialog() {
this.showModal = false
},
+ colseDialog1() {
+ this.showModal1 = false
+ },
colseDialog2() {
this.showModal2 = false
},
@@ -839,12 +879,46 @@
imageUrl: '/static/logo_icon.png', // 分享出去的图片,默认为当前页面的截图。图片路径可以是本地文件路径或者网络图片路径。支持PNG及JPG。
};
},
+ getPhoneNumber(e) {
+ let _this = this
+ console.log(e.detail.code)
+ _this.$api.getPhone({
+ userSid: getApp().globalData.sid,
+ code: e.detail.code
+ }).then((resp) => {
+ _this.showModal1 = false
+ getApp().globalData.mobile = resp
+ }).catch(e => {
+ console.log(e);
+ })
+ },
+
}
}
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 1c26405..b6663f9 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -81,9 +81,11 @@
getApp().globalData.token = res.data.data.token
getApp().globalData.isNewUser = res.data.data.isNewUser
getApp().globalData.isPurchase = res.data.data.isPurchase
+ getApp().globalData.mobile = res.data.data.mobile
uni.setStorageSync("satoken", res.data.data.token)
console.log("人员sid", res.data.data.sid);
console.log("token", res.data.data.token);
+ console.log("mobile", res.data.data.mobile);
console.log("middleware>>>>>>>>>>>>", _this.middleware);
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
index 5d63002..70f73bb 100644
--- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
@@ -59,7 +59,8 @@
+ :selected="selected" :checkHover="range" @change="choiceDate" @handleMouse="handleMouse"
+ :disabledDate="disabledDate">
@@ -347,10 +348,12 @@
},
computed: {
timepickerStartTime() {
+ console.log("timepickerStartTime", this.calendar);
const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
return activeDate === this.startDate ? this.selectableTimes.start : ''
},
timepickerEndTime() {
+ console.log("timepickerEndTime", this.calendar);
const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
return activeDate === this.endDate ? this.selectableTimes.end : ''
},
@@ -565,9 +568,31 @@
* @param {Object} name
*/
setEmit(name) {
+ console.log("setEmit ", name)
+ console.log("calendar ", this.calendar)
+ console.log("cale ", this.cale)
+
+ console.log("this.calendar ", this.calendar)
+ console.log("getFullYear ", new Date().getFullYear())
+ console.log("getMonth", new Date().getMonth() + 1)
+ console.log("getDate", new Date().getDate())
+
+ var nowDate = new Date()
+ var time = {
+ year: nowDate.getFullYear(),
+ month: nowDate.getMonth() + 1,
+ day: nowDate.getDate()
+ }
+ var applyDate = time.year + '-' + (time.month >= 10 ? time.month : '0' + time.month) + '-' + (time.day >=
+ 10 ? time.day : '0' + time.day)
+
+ console.log("applyDate", applyDate)
+
if (!this.range) {
if (!this.calendar.fullDate) {
- this.calendar = this.cale.getInfo(new Date())
+ this.calendar.fullDate = applyDate
+ // this.calendar = this.cale.getInfo(applyDate)
+ // console.log("calendar222 ", this.calendar)
this.tempSingleDate = this.calendar.fullDate
}
if (this.hasTime && !this.time) {
@@ -597,12 +622,12 @@
* @param {Object} weeks
*/
choiceDate(weeks) {
- if (weeks.disable)
- return
- if(this.disabledDate.includes(weeks.fullDate)){
+ if (weeks.disable)
+ return
+ if (this.disabledDate.includes(weeks.fullDate)) {
return
}
-
+
this.calendar = weeks
this.calendar.userChecked = true
// 设置多选
@@ -637,12 +662,13 @@
* @param {Object} date
*/
setDate(date) {
- console.log("this.weeks88 ", date)
+ console.log("this.date ", date)
this.cale.setDate(date)
- console.log("this.weeks88 ", this.cale)
+ console.log("this.cale ", this.cale)
this.weeks = this.cale.weeks
- console.log("this.weeks88 ", this.weeks)
+ console.log("this.weeks ", this.weeks)
this.nowDate = this.cale.getInfo(date)
+ console.log("this.nowDate ", this.nowDate)
}
}
}