1111111
This commit is contained in:
1
App.vue
1
App.vue
@@ -8,6 +8,7 @@
|
|||||||
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
|
wxSilentLoginURL: config.baseUrl + "/lpkcustomer/wxSilentLogin",
|
||||||
sid: "",
|
sid: "",
|
||||||
token: "",
|
token: "",
|
||||||
|
mobile: "",
|
||||||
isNewUser: "", //是否新人 0 否 1 是 邀请新人助力
|
isNewUser: "", //是否新人 0 否 1 是 邀请新人助力
|
||||||
isPurchase: "", //是否购买过 1否 0是 首页新人礼包弹框
|
isPurchase: "", //是否购买过 1否 0是 首页新人礼包弹框
|
||||||
navInfo: {
|
navInfo: {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||||
<text style="font-size: 12px;color: #FF5006;">剩余:</text>
|
<text style="font-size: 12px;color: #FF5006;">存量:</text>
|
||||||
<text
|
<text
|
||||||
style="font-size: 14px;color: #FF5006;">{{item.goodsNumber}}{{item.unitName}}</text>
|
style="font-size: 14px;color: #FF5006;">{{item.goodsNumber}}{{item.unitName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -97,6 +97,9 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<text
|
||||||
|
style="font-size: 10px;color: #E36443;margin-top: 8px;">提货截止日:{{item.periodValidity}}</text>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 15px;
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 15px;
|
||||||
margin-right: 15px;">
|
margin-right: 15px;">
|
||||||
<text
|
<text
|
||||||
@@ -303,7 +306,36 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 获取手机号弹框 -->
|
||||||
|
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal1' @click="colseDialog1()"></view>
|
||||||
|
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal1'>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;
|
||||||
|
">
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100%;margin-top: 20px;">
|
||||||
|
<image src="../../static/logo_icon.png" style="width: 10vw;height: 10vw;" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<text style="margin-top: 5px;color: #999;">(云菜窖)</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view style="display: flex;margin-top: 10px;margin-left: 20px; margin-right: 20px;">
|
||||||
|
<text style="color: #999;text-indent:2em;">小程序需要获取您的手机号,方便与您联系。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 20px;">
|
||||||
|
<button class="button1" @click="colseDialog1()">拒绝</button>
|
||||||
|
<button class="button2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">同意</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -316,6 +348,7 @@
|
|||||||
imgList: [],
|
imgList: [],
|
||||||
notData: false,
|
notData: false,
|
||||||
showModal: false,
|
showModal: false,
|
||||||
|
showModal1: false,
|
||||||
showModal2: false,
|
showModal2: false,
|
||||||
newPerGiftList: [
|
newPerGiftList: [
|
||||||
|
|
||||||
@@ -382,6 +415,10 @@
|
|||||||
if (getApp().globalData.isPurchase == '1')
|
if (getApp().globalData.isPurchase == '1')
|
||||||
this.showModal = true
|
this.showModal = true
|
||||||
|
|
||||||
|
|
||||||
|
if (getApp().globalData.mobile == '')
|
||||||
|
this.showModal1 = true
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@@ -450,6 +487,9 @@
|
|||||||
colseDialog() {
|
colseDialog() {
|
||||||
this.showModal = false
|
this.showModal = false
|
||||||
},
|
},
|
||||||
|
colseDialog1() {
|
||||||
|
this.showModal1 = false
|
||||||
|
},
|
||||||
colseDialog2() {
|
colseDialog2() {
|
||||||
this.showModal2 = false
|
this.showModal2 = false
|
||||||
},
|
},
|
||||||
@@ -839,12 +879,46 @@
|
|||||||
imageUrl: '/static/logo_icon.png', // 分享出去的图片,默认为当前页面的截图。图片路径可以是本地文件路径或者网络图片路径。支持PNG及JPG。
|
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);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
.button1 {
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #666;
|
||||||
|
flex: 1;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-left-radius: 20px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button2 {
|
||||||
|
background: #fff;
|
||||||
|
color: #FF9900;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-right-radius: 20px;
|
||||||
|
flex: 1;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background: #FF9900;
|
background: #FF9900;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -906,6 +980,21 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modalDlg4 {
|
||||||
|
/* 设置超出滚动 */
|
||||||
|
overflow: auto;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 100000;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.device-list {
|
.device-list {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 26rpx 6%;
|
padding: 26rpx 6%;
|
||||||
|
|||||||
@@ -86,15 +86,19 @@
|
|||||||
v-if="item.type=='2'">企业菜!</text>
|
v-if="item.type=='2'">企业菜!</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 15px;
|
<text :style="{color:(item.state == '1' ? '#999' : '#E36443')}"
|
||||||
|
style="font-size: 10px;color: #E36443;margin-top: 8px;">提货截止日:{{item.periodValidity}}</text>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between; margin-top: 10px;
|
||||||
margin-right: 15px;">
|
margin-right: 15px;">
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
<view style="display: flex;flex-direction: row;align-items: center;">
|
||||||
<text style="font-size: 12px;color: #666;">存量:</text>
|
<text style="font-size: 12px;color: #666;">存量:</text>
|
||||||
<text
|
<text :style="{color:(item.state == '1' ? '#999' : '#FF5006')}"
|
||||||
style="font-size: 14px;color: #FF5006;">{{item.goodsNumber}}{{item.unitName}}</text>
|
style="font-size: 14px;color: #FF5006;">{{item.goodsNumber}}{{item.unitName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="display: flex;flex-direction: row;align-items: center;">
|
<view style="display: flex;flex-direction: row;align-items: center;"
|
||||||
|
:class="item.state=='0'?'oragin':'gray'" >
|
||||||
|
|
||||||
<image src="../../static/jian_icon.png" mode="aspectFill"
|
<image src="../../static/jian_icon.png" mode="aspectFill"
|
||||||
style="width: 20px;height: 20px;" @click.stop="jian(item)"></image>
|
style="width: 20px;height: 20px;" @click.stop="jian(item)"></image>
|
||||||
@@ -307,6 +311,40 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 获取手机号弹框 -->
|
||||||
|
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal1' @click="colseDialog1()"></view>
|
||||||
|
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal1'>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;
|
||||||
|
">
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100%;margin-top: 20px;">
|
||||||
|
<image src="../../static/logo_icon.png" style="width: 10vw;height: 10vw;" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<text style="margin-top: 5px;color: #999;">(云菜窖)</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view style="display: flex;margin-top: 10px;margin-left: 20px; margin-right: 20px;">
|
||||||
|
<text style="color: #999;text-indent:2em;">小程序需要获取您的手机号,方便与您联系。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 20px;">
|
||||||
|
<button class="button1" @click="colseDialog1()">拒绝</button>
|
||||||
|
<button class="button2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">同意</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -320,6 +358,7 @@
|
|||||||
butdisabled: true,
|
butdisabled: true,
|
||||||
transferNotData: true,
|
transferNotData: true,
|
||||||
notData: false,
|
notData: false,
|
||||||
|
showModal1: false,
|
||||||
showModal3: false,
|
showModal3: false,
|
||||||
showModal4: false,
|
showModal4: false,
|
||||||
scrollHeight: "",
|
scrollHeight: "",
|
||||||
@@ -385,6 +424,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("mobile>>>", getApp().globalData.mobile);
|
||||||
|
|
||||||
|
if (getApp().globalData.mobile == '')
|
||||||
|
this.showModal1 = true
|
||||||
|
|
||||||
this.request()
|
this.request()
|
||||||
this.getNotice()
|
this.getNotice()
|
||||||
this.page.count = 0
|
this.page.count = 0
|
||||||
@@ -524,19 +568,29 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
jian(item) {
|
jian(item) {
|
||||||
if (Number(item.count) > 0) {
|
|
||||||
item.count = Number(item.count) - 1
|
if (item.state == '0') {
|
||||||
this.addGoods(item)
|
if (Number(item.count) > 0) {
|
||||||
|
item.count = Number(item.count) - 1
|
||||||
|
this.addGoods(item)
|
||||||
|
}
|
||||||
|
this.getcount()
|
||||||
|
} else {
|
||||||
|
this.shortToast('商品已过提货日期')
|
||||||
}
|
}
|
||||||
this.getcount()
|
|
||||||
|
|
||||||
},
|
},
|
||||||
jia(item) {
|
jia(item) {
|
||||||
if (item.count < item.goodsNumber)
|
if (item.state == '0') {
|
||||||
item.count = Number(item.count) + 1
|
if (item.count < item.goodsNumber)
|
||||||
|
item.count = Number(item.count) + 1
|
||||||
this.getcount()
|
|
||||||
this.addGoods(item)
|
|
||||||
|
|
||||||
|
this.getcount()
|
||||||
|
this.addGoods(item)
|
||||||
|
} else {
|
||||||
|
this.shortToast('商品已过提货日期')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getcount() {
|
getcount() {
|
||||||
@@ -621,7 +675,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
colseDialog1() {
|
||||||
|
this.showModal1 = false
|
||||||
|
},
|
||||||
colseDialog3() {
|
colseDialog3() {
|
||||||
this.showModal3 = false
|
this.showModal3 = false
|
||||||
},
|
},
|
||||||
@@ -697,6 +753,19 @@
|
|||||||
return promise
|
return promise
|
||||||
|
|
||||||
},
|
},
|
||||||
|
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);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -704,6 +773,18 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
.gray {
|
||||||
|
filter: grayscale(100%);
|
||||||
|
-webkit-filter: grayscale(100%);
|
||||||
|
transition: filter 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.oragin {}
|
||||||
|
|
||||||
|
|
||||||
.swiper-box {
|
.swiper-box {
|
||||||
margin-top: -55px;
|
margin-top: -55px;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
@@ -726,6 +807,25 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button1 {
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #666;
|
||||||
|
flex: 1;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-left-radius: 20px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button2 {
|
||||||
|
background: #fff;
|
||||||
|
color: #FF9900;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-right-radius: 20px;
|
||||||
|
flex: 1;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background: #FF9900;
|
background: #FF9900;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|||||||
@@ -164,6 +164,39 @@
|
|||||||
<!-- </loading-state> -->
|
<!-- </loading-state> -->
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 获取手机号弹框 -->
|
||||||
|
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal1' @click="colseDialog1()"></view>
|
||||||
|
<view class="modalDlg4" catchtouchmove='preventTouchMove' v-if='showModal1'>
|
||||||
|
|
||||||
|
<view style="display: flex;flex-direction: column;background: #fff; width: 80%; border-radius: 20px;
|
||||||
|
">
|
||||||
|
<view
|
||||||
|
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100%;margin-top: 20px;">
|
||||||
|
<image src="../../static/logo_icon.png" style="width: 10vw;height: 10vw;" mode="scaleToFill">
|
||||||
|
</image>
|
||||||
|
<text style="margin-top: 5px;color: #999;">(云菜窖)</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view style="display: flex;margin-top: 10px;margin-left: 20px; margin-right: 20px;">
|
||||||
|
<text style="color: #999;text-indent:2em;">小程序需要获取您的手机号,方便与您联系。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view
|
||||||
|
style="flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 20px;">
|
||||||
|
<button class="button1" @click="colseDialog1()">拒绝</button>
|
||||||
|
<button class="button2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">同意</button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -171,6 +204,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showModal1: false,
|
||||||
butdisabled: true,
|
butdisabled: true,
|
||||||
page: {
|
page: {
|
||||||
startHeight: 0,
|
startHeight: 0,
|
||||||
@@ -203,6 +237,11 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getApp().globalData.mobile == '')
|
||||||
|
this.showModal1 = true
|
||||||
|
|
||||||
|
|
||||||
this.getUserInfo()
|
this.getUserInfo()
|
||||||
this.myRecommend()
|
this.myRecommend()
|
||||||
},
|
},
|
||||||
@@ -266,6 +305,23 @@
|
|||||||
url: '/pages/me/base_info'
|
url: '/pages/me/base_info'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
colseDialog1() {
|
||||||
|
this.showModal1 = false
|
||||||
|
},
|
||||||
|
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);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
onShareAppMessage: function(res) {
|
onShareAppMessage: function(res) {
|
||||||
// console.log("res", res)
|
// console.log("res", res)
|
||||||
// console.log("data", res.target.dataset)
|
// console.log("data", res.target.dataset)
|
||||||
@@ -427,6 +483,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 顶部 */
|
/* 顶部 */
|
||||||
.top {
|
.top {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
@@ -576,4 +633,69 @@
|
|||||||
.sharebtn::after {
|
.sharebtn::after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 弹窗样式 */
|
||||||
|
.model {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #000;
|
||||||
|
z-index: 100000;
|
||||||
|
opacity: 0.7;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.modalDlg4 {
|
||||||
|
/* 设置超出滚动 */
|
||||||
|
overflow: auto;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 100000;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button1 {
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #666;
|
||||||
|
flex: 1;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-left-radius: 20px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button2 {
|
||||||
|
background: #fff;
|
||||||
|
color: #FF9900;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom-right-radius: 20px;
|
||||||
|
flex: 1;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: #FF9900;
|
||||||
|
color: #fff;
|
||||||
|
margin-top: 20px;
|
||||||
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
button::after {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -81,9 +81,11 @@
|
|||||||
getApp().globalData.token = res.data.data.token
|
getApp().globalData.token = res.data.data.token
|
||||||
getApp().globalData.isNewUser = res.data.data.isNewUser
|
getApp().globalData.isNewUser = res.data.data.isNewUser
|
||||||
getApp().globalData.isPurchase = res.data.data.isPurchase
|
getApp().globalData.isPurchase = res.data.data.isPurchase
|
||||||
|
getApp().globalData.mobile = res.data.data.mobile
|
||||||
uni.setStorageSync("satoken", res.data.data.token)
|
uni.setStorageSync("satoken", res.data.data.token)
|
||||||
console.log("人员sid", res.data.data.sid);
|
console.log("人员sid", res.data.data.sid);
|
||||||
console.log("token", res.data.data.token);
|
console.log("token", res.data.data.token);
|
||||||
|
console.log("mobile", res.data.data.mobile);
|
||||||
|
|
||||||
|
|
||||||
console.log("middleware>>>>>>>>>>>>", _this.middleware);
|
console.log("middleware>>>>>>>>>>>>", _this.middleware);
|
||||||
|
|||||||
@@ -59,7 +59,8 @@
|
|||||||
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
|
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
|
||||||
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
|
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
|
||||||
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
|
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
|
||||||
:selected="selected" :checkHover="range" @change="choiceDate" @handleMouse="handleMouse" :disabledDate="disabledDate">
|
:selected="selected" :checkHover="range" @change="choiceDate" @handleMouse="handleMouse"
|
||||||
|
:disabledDate="disabledDate">
|
||||||
</calendar-item>
|
</calendar-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -347,10 +348,12 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
timepickerStartTime() {
|
timepickerStartTime() {
|
||||||
|
console.log("timepickerStartTime", this.calendar);
|
||||||
const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
|
const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
|
||||||
return activeDate === this.startDate ? this.selectableTimes.start : ''
|
return activeDate === this.startDate ? this.selectableTimes.start : ''
|
||||||
},
|
},
|
||||||
timepickerEndTime() {
|
timepickerEndTime() {
|
||||||
|
console.log("timepickerEndTime", this.calendar);
|
||||||
const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
|
const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
|
||||||
return activeDate === this.endDate ? this.selectableTimes.end : ''
|
return activeDate === this.endDate ? this.selectableTimes.end : ''
|
||||||
},
|
},
|
||||||
@@ -565,9 +568,31 @@
|
|||||||
* @param {Object} name
|
* @param {Object} name
|
||||||
*/
|
*/
|
||||||
setEmit(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.range) {
|
||||||
if (!this.calendar.fullDate) {
|
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
|
this.tempSingleDate = this.calendar.fullDate
|
||||||
}
|
}
|
||||||
if (this.hasTime && !this.time) {
|
if (this.hasTime && !this.time) {
|
||||||
@@ -598,8 +623,8 @@
|
|||||||
*/
|
*/
|
||||||
choiceDate(weeks) {
|
choiceDate(weeks) {
|
||||||
if (weeks.disable)
|
if (weeks.disable)
|
||||||
return
|
return
|
||||||
if(this.disabledDate.includes(weeks.fullDate)){
|
if (this.disabledDate.includes(weeks.fullDate)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,12 +662,13 @@
|
|||||||
* @param {Object} date
|
* @param {Object} date
|
||||||
*/
|
*/
|
||||||
setDate(date) {
|
setDate(date) {
|
||||||
console.log("this.weeks88 ", date)
|
console.log("this.date ", date)
|
||||||
this.cale.setDate(date)
|
this.cale.setDate(date)
|
||||||
console.log("this.weeks88 ", this.cale)
|
console.log("this.cale ", this.cale)
|
||||||
this.weeks = this.cale.weeks
|
this.weeks = this.cale.weeks
|
||||||
console.log("this.weeks88 ", this.weeks)
|
console.log("this.weeks ", this.weeks)
|
||||||
this.nowDate = this.cale.getInfo(date)
|
this.nowDate = this.cale.getInfo(date)
|
||||||
|
console.log("this.nowDate ", this.nowDate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user