Browse Source

11111

master
guoxing 1 year ago
parent
commit
cf39946c0b
  1. 13
      pages.json
  2. 88
      pages/bind/bind_pickUpCard2.vue
  3. 3
      pages/good/shoppCart.vue
  4. 180
      pages/home/cloudCard2.vue
  5. 149
      pages/home/myCellar.vue
  6. 58
      pages/home/myHome.vue
  7. 32
      pages/home/newUserPlay.vue
  8. 1
      pages/login/login.vue
  9. 60
      pages/records/recommendRecords.vue
  10. 8
      pages/records/reservationRecords3.vue
  11. 10
      pages/records/reservationRecords4.vue

13
pages.json

@ -366,6 +366,19 @@
"navigationBarTitleText": "转赠亲友",
"disableScroll": true
}
},
{
"path" : "pages/home/newUserPlay",
"style": {
"navigationStyle": "custom"
}
},
{
"path" : "pages/records/recommendRecords",
"style": {
"navigationStyle": "custom",
"disableScroll": true
}
}

88
pages/bind/bind_pickUpCard2.vue

@ -95,50 +95,50 @@
})
},
onLoad(options) {
// let _this = this;
// wx.login({
// success: function(res) {
// uni.request({
// //
// url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
// method: "GET",
// header: {
// 'content-type': "application/x-www-form-urlencoded"
// },
// data: {
// "wxCode": res.code
// },
// success: res => {
// if (res.statusCode == 200) {
// if (!res.data.success) {
// if (res.data.code == "110") {
// //
// uni.reLaunch({
// url: '/pages/index/BindPhone?openid=' +
// res.data.data.wxMpOpenid
// })
// } else {
// // _this.status = 'more'
// }
// } else {
// //
// getApp().globalData.sid = res.data.data.sid
// _this.page.customerSid = getApp().globalData.sid
// console.log("sid", getApp().globalData.sid)
// }
// } else {
// // _this.status = 'more'
// }
// },
// fail: (err) => {
// // _this.status = 'more'
// }
// });
// },
// fail: function(res) {
// // _this.status = 'more'
// }
// });
let _this = this;
wx.login({
success: function(res) {
uni.request({
//
url: getApp().globalData.wxSilentLoginURL + "?wxCode=" + res.code,
method: "GET",
header: {
'content-type': "application/x-www-form-urlencoded"
},
data: {
"wxCode": res.code
},
success: res => {
if (res.statusCode == 200) {
if (!res.data.success) {
if (res.data.code == "110") {
//
uni.reLaunch({
url: '/pages/index/BindPhone?openid=' +
res.data.data.wxMpOpenid
})
} else {
// _this.status = 'more'
}
} else {
//
getApp().globalData.sid = res.data.data.sid
_this.page.customerSid = getApp().globalData.sid
console.log("用户sid", getApp().globalData.sid)
}
} else {
// _this.status = 'more'
}
},
fail: (err) => {
// _this.status = 'more'
}
});
},
fail: function(res) {
// _this.status = 'more'
}
});
if (options) {
console.log("options", options)

3
pages/good/shoppCart.vue

@ -218,6 +218,9 @@
that.data.splice(index, 1)
// that.getallPrice()
// that.getweight()
that.notData = that.data.length == 0
that.upDateShoppCart(item)
} else if (res.cancel) {

180
pages/home/cloudCard2.vue

@ -223,15 +223,90 @@
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal'></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
<image :src="modalUrl" style="width:80vw; height: 80vh;" mode="scaleToFill"></image>
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_gift.png" mode="aspectFill"
style="margin-left: 5vw;margin-right: 5vw;margin-top: -50px;"></image>
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_btn.png" mode="aspectFill"
style="width: 180px;height: 50px;margin-top: 20px;" @click="showGift()"></image>
<image src="../../static/close.png" mode="aspectFill" style="width: 28px;height: 28px;margin-top: 10px;"
@click="colseDialog()"></image>
</view>
</view>
<!-- 礼包列表弹框 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2'></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal2'>
<view style="display: flex;flex-direction: column;
background: #fff; width: 80%; border-radius: 20px; height: 80vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_top.png" mode="scaleToFill"
style="width: 100%; height: 15vw; flex-shrink: 0;"></image>
<scroll-view scroll-y="true" style="display: flex;flex-direction: column;height: calc(100% - 30vw);"
bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<radio-group @change="radioChange" style="overflow: hidden;box-sizing: border-box;">
<view v-for="(item,index) in newPerGiftList" class="device-list" style="overflow-y: auto;">
<view style="">
<radio :value="item.sid" style="transform:scale(0.8)" color="#FF9900" />
</view>
<view
style="margin-left: 5px; margin-right: 10px; display: flex;flex-direction: row;align-items: center;flex: 1; ">
<image :src="item.iconUrl" mode="aspectFill"
style="border-radius: 8px;width: 46px;height: 46px;"></image>
<view style="display: flex;flex-direction: column; margin-left: 10px; flex: 1;">
<view
style="display: flex;flex-direction: row;align-items: center;box-sizing: border-box;">
<text style="font-size: 14px;color: #101010;margin-right: 10px;
flex: 1; ">{{item.name}}</text>
<text
style="font-size: 16px;color: #FF5006;font-weight: 600; flex-shrink:0;">{{item.prefPrice}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
<text style="font-size: 12px;color: #666;flex: 1;">{{item.weight}}</text>
<text
style="font-size: 12px;color: #999;text-decoration:line-through;margin-left: 10px;">{{item.price}}</text>
</view>
</view>
</view>
</view>
</radio-group>
</scroll-view>
<view
style=" height: 15vw; flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;"
class="newpor_bom">
<text style="background: #FF9900;color: #fff;text-align: center;border-radius: 20px;
padding:8px 25px ;" @click="newporGift">确认结算</text>
</view>
</view>
<image src="../../static/close.png" mode="aspectFill" style="width: 28px;height: 28px;margin-top: 10px;"
@click="colseDialog2()"></image>
</view>
</view>
</template>
@ -240,10 +315,13 @@
export default {
data() {
return {
showModal: false,
modalUrl: "https://supervise.yxtsoft.com/lpk/image/banner.png",
imgList: [],
notData: false,
showModal: false,
showModal2: false,
newPerGiftList: [
],
dialogContent: "这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容,这里是协议内容这里是协议内容,这里是协议内容",
confirmText: "我知道了(5s)",
dialogBeforeClose: false,
@ -300,6 +378,12 @@
if (this.baseDataSuccess) {
this.getgoods()
}
console.log("isPurchase", getApp().globalData.isPurchase);
if (getApp().globalData.isPurchase == '1')
this.showModal = true
},
onLoad(options) {
@ -319,6 +403,58 @@
},
methods: {
showGift() {
let _this = this
_this.$api.newUserQuota().then((resp) => {
// console.log("--------", resp);
_this.newPerGiftList = resp
_this.showModal = false
_this.showModal2 = true
}).catch(e => {
})
},
radioChange(event) {
// console.log("radioChange", event.detail.value);
this.newporGiftSid = event.detail.value
},
newporGift() {
// console.log("radioChange", this.newporGiftSid);
if (!this.newporGiftSid) {
this.shortToast('请先选择优惠礼包')
return
}
var params = {
customerSid: getApp().globalData.sid,
bagSid: this.newporGiftSid,
}
// console.log("params", params);
let _this = this
_this.$api.createNewUserBagOrder(params).then((resp) => {
// console.log("resp", resp);
_this.$pay(resp)
_this.showModal2 = false
getApp().globalData.isPurchase = '0'
console.log("isPurchase", getApp().globalData.isPurchase);
}).catch(e => {})
},
colseDialog() {
this.showModal = false
},
colseDialog2() {
this.showModal2 = false
},
getBannerList() {
let _this = this
_this.$api.bannerList().then((resp) => {
@ -328,9 +464,10 @@
},
swiperClick(item) {
console.log("swiperClick======", item);
this.modalUrl = item.contentUrl
if (item.contentUrl != '') {
this.showModal = true
uni.navigateTo({
url: "/pages/home/newUserPlay?url=" + encodeURIComponent(JSON.stringify(item.contentUrl))
})
}
},
@ -756,6 +893,39 @@
align-items: center;
}
.modalDlg2 {
/* 设置超出滚动 */
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 {
box-sizing: border-box;
padding: 26rpx 6%;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 1px solid #eee;
width: 100%;
}
.newpor_bom {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/newpor_bom.png);
/* background-image: url(../../static/clound_bj1.png); */
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.top {

149
pages/home/myCellar.vue

@ -165,92 +165,7 @@
</loading-state>
<!-- 弹窗蒙版 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal'></view>
<view class="modalDlg" catchtouchmove='preventTouchMove' v-if='showModal'>
<view style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_gift.png" mode="aspectFill"
style="margin-left: 5vw;margin-right: 5vw;margin-top: -50px;"></image>
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_btn.png" mode="aspectFill"
style="width: 180px;height: 50px;margin-top: 20px;" @click="showGift()"></image>
<image src="../../static/close.png" mode="aspectFill" style="width: 28px;height: 28px;margin-top: 10px;"
@click="colseDialog()"></image>
</view>
</view>
<!-- 礼包列表弹框 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal2'></view>
<view class="modalDlg2" catchtouchmove='preventTouchMove' v-if='showModal2'>
<view style="display: flex;flex-direction: column;
background: #fff; width: 80%; border-radius: 20px; height: 80vw;">
<image src="https://supervise.yxtsoft.com/lpk/image/newpor_top.png" mode="scaleToFill"
style="width: 100%; height: 15vw; flex-shrink: 0;"></image>
<scroll-view scroll-y="true" style="display: flex;flex-direction: column;height: calc(100% - 30vw);"
bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll">
<radio-group @change="radioChange" style="overflow: hidden;box-sizing: border-box;">
<view v-for="(item,index) in newPerGiftList" class="device-list" style="overflow-y: auto;">
<view style="">
<radio :value="item.sid" style="transform:scale(0.8)" color="#FF9900" />
</view>
<view
style="margin-left: 5px; margin-right: 10px; display: flex;flex-direction: row;align-items: center;flex: 1; ">
<image :src="item.iconUrl" mode="aspectFill"
style="border-radius: 8px;width: 46px;height: 46px;"></image>
<view style="display: flex;flex-direction: column; margin-left: 10px; flex: 1;">
<view
style="display: flex;flex-direction: row;align-items: center;box-sizing: border-box;">
<text style="font-size: 14px;color: #101010;margin-right: 10px;
flex: 1; ">{{item.name}}</text>
<text
style="font-size: 16px;color: #FF5006;font-weight: 600; flex-shrink:0;">{{item.prefPrice}}</text>
</view>
<view
style="display: flex;flex-direction: row;align-items: center;margin-top: 15px;">
<text style="font-size: 12px;color: #666;flex: 1;">{{item.weight}}</text>
<text
style="font-size: 12px;color: #999;text-decoration:line-through;margin-left: 10px;">{{item.price}}</text>
</view>
</view>
</view>
</view>
</radio-group>
</scroll-view>
<view
style=" height: 15vw; flex-shrink: 0;display: flex;flex-direction: row;align-items: center;justify-content: center;"
class="newpor_bom">
<text style="background: #FF9900;color: #fff;text-align: center;border-radius: 20px;
padding:8px 25px ;" @click="newporGift">确认结算</text>
</view>
</view>
<image src="../../static/close.png" mode="aspectFill" style="width: 28px;height: 28px;margin-top: 10px;"
@click="colseDialog2()"></image>
</view>
<!-- 转赠弹框 -->
<view class="model" catchtouchmove='preventTouchMove' v-if='showModal3' @click="colseDialog3()"></view>
<view class="modalDlg3" catchtouchmove='preventTouchMove' v-if='showModal3'>
@ -404,8 +319,6 @@
butdisabled: true,
transferNotData: true,
notData: false,
showModal: false,
showModal2: false,
showModal3: false,
showModal4: false,
scrollHeight: "",
@ -461,8 +374,7 @@
created() {
// console.log("==========", getApp().globalData.isNewUser);
if (getApp().globalData.isPurchase == '1')
this.showModal = true
},
onShow() {
if (typeof this.$mp.page.getTabBar === 'function' && this.$mp.page.getTabBar()) {
@ -708,54 +620,7 @@
}
},
showGift() {
let _this = this
_this.$api.newUserQuota().then((resp) => {
// console.log("--------", resp);
_this.newPerGiftList = resp
_this.showModal = false
_this.showModal2 = true
}).catch(e => {
})
},
radioChange(event) {
// console.log("radioChange", event.detail.value);
this.newporGiftSid = event.detail.value
},
newporGift() {
// console.log("radioChange", this.newporGiftSid);
if (!this.newporGiftSid) {
this.shortToast('请先选择优惠礼包')
return
}
var params = {
customerSid: getApp().globalData.sid,
bagSid: this.newporGiftSid,
}
// console.log("params", params);
let _this = this
_this.$api.createNewUserBagOrder(params).then((resp) => {
// console.log("resp", resp);
_this.$pay(resp)
_this.showModal2 = false
}).catch(e => {})
},
colseDialog() {
this.showModal = false
},
colseDialog2() {
this.showModal2 = false
},
colseDialog3() {
this.showModal3 = false
},
@ -876,14 +741,6 @@
border: 0;
}
.newpor_bom {
/* 加载背景图 */
background-image: url(https://supervise.yxtsoft.com/lpk/image/newpor_bom.png);
/* background-image: url(../../static/clound_bj1.png); */
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
}
.top {
width: 100vw;

58
pages/home/myHome.vue

@ -18,13 +18,15 @@
style="width: 30px;height: 30px;margin-right: 10px;flex-shrink: 0;" :rotate="0"></image>
</view>
<view style="display: flex;flex-direction: row;align-items: center; width: 100%;
position: absolute;bottom: 8vw; " >
position: absolute;bottom: 8vw; ">
<view style="flex: 1;"></view>
<view style="margin-right: 20px;display: flex;flex-direction: row;align-items: center;" @click="makePhoneCall()">
<image src="../../static/userService.png" style="width: 25px;height: 25px;margin-right: 5px;"></image>
<view style="margin-right: 20px;display: flex;flex-direction: row;align-items: center;"
@click="makePhoneCall()">
<image src="../../static/userService.png" style="width: 25px;height: 25px;margin-right: 5px;">
</image>
<text style="color: #fff;font-size: 16px;">客服电话</text>
</view>
</view>
</view>
<view class="view" style="z-index: 2;">
@ -137,7 +139,7 @@
<view style="display: flex;flex-direction: row;align-items: center; margin-top: 10px;"
v-if="recommend.vos.length>0">
<!-- <image :src="recommend.iconUrl" style="width: 30%;height: 100px; border-radius: 10px;"
<!-- <image :src="recommend.iconUrl" style="width: 30%;height: 100px; border-radius: 10px;"
mode="aspectFill">
</image> -->
@ -147,7 +149,8 @@
<view v-for="(child,pos) in recommend.vos" :key="pos" @click="recommendClick(child)"
style="display: flex;flex-direction: column;width: 100%;box-sizing: border-box;">
<text style="color: #424242; font-size: 13px;line-height: 25px;">* {{child.remarks}}</text>
<text style="color: #424242; font-size: 13px;line-height: 25px;">*
{{child.remarks}}</text>
</view>
@ -189,7 +192,7 @@
},
headImage: "",
recommend: {
vos:[]
vos: []
},
banKInfo: null
}
@ -217,10 +220,10 @@
},
methods: {
makePhoneCall() {
wx.makePhoneCall({
phoneNumber: '15503115233',
})
wx.makePhoneCall({
phoneNumber: '15503115233',
})
},
getUserInfo() {
let _this = this
@ -254,6 +257,10 @@
},
recommendClick(item) {
console.log("recommendClick>>>", item)
// uni.navigateTo({
// url: '/pages/records/recommendRecords'
// })
},
showDiaLog() {
uni.navigateTo({
@ -363,21 +370,21 @@
switch (type) {
case "待提菜":
uni.navigateTo({
url: '/pages/records/reservationRecords',
})
// uni.navigateTo({
// url: '/pages/records/reservationRecords3',
// url: '/pages/records/reservationRecords',
// })
uni.navigateTo({
url: '/pages/records/reservationRecords3',
})
break;
case "已提菜":
uni.navigateTo({
url: '/pages/records/reservationRecords2',
})
// uni.navigateTo({
// url: '/pages/records/reservationRecords4',
// url: '/pages/records/reservationRecords2',
// })
uni.navigateTo({
url: '/pages/records/reservationRecords4',
})
break;
case "我的订单":
uni.navigateTo({
@ -430,8 +437,9 @@
background-image: url(https://supervise.yxtsoft.com/lpk/image/my_bj.png);
/* 让背景图基于容器大小伸缩 */
background-size: 100% 100%;
position: relative;/*父元素位置要设置为相对*/
position: relative;
/*父元素位置要设置为相对*/
}
/* 顶部-用户信息 */
@ -465,9 +473,11 @@ position: relative;/*父元素位置要设置为相对*/
/* 视图 */
.view {
box-sizing: border-box;margin-top: -15px;
box-sizing: border-box;
margin-top: -15px;
background: #F7F7F7;
height: calc(100vh - 45px - 65vw);;
height: calc(100vh - 45px - 65vw);
;
width: 100%;
border-radius: 15px;
}

32
pages/home/newUserPlay.vue

@ -0,0 +1,32 @@
<template>
<view style="display: flex;flex-direction: column;width: 100%;height: 100%;box-sizing: border-box;">
<NavBar ref="nav" navTitle=" " :showIcon="true" >
</NavBar>
<image :src="page.url" style="width: 100%;height: 100vh;" mode="scaleToFill"></image>
</view>
</template>
<script>
export default {
data() {
return {
page:{
url:"",
}
}
},
onLoad(options) {
console.log("options",options)
this.page.url = JSON.parse(decodeURIComponent(options.url))
console.log("as",this.page.url)
},
methods: {
}
}
</script>
<style>
</style>

1
pages/login/login.vue

@ -48,6 +48,7 @@
this.status = "loading"
let _this = this;
wx.login({
success: function(res) {

60
pages/records/recommendRecords.vue

@ -0,0 +1,60 @@
<template>
<view style="display: flex;flex-direction: column; background: #F9F9F8;">
<NavBar ref="nav" navTitle=" " :showIcon="true">
</NavBar>
<image src="https://supervise.yxtsoft.com/lpk/image/recommend_icon.png" style="width: 100%;height: 60vw;">
</image>
<view style="margin-bottom: 50px; min-height: 70vh; background: #fff; margin-left: 15px;margin-right: 15px;margin-top: -20vw;
border-radius: 15px;">
<!-- 滚动视图 -->
<scroll-view scroll-y="true" style="padding: 10px; width: 100%; height: 100%;" bindscrolltoupper="upper" bindscrolltolower="lower"
bindscroll="scroll">
</scroll-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
styleObject: {
'padding-top': '10px',
'padding-bottom': '10px',
'border-radius': '15px',
'background': '#f2f2f2'
},
}
},
methods: {
//
queryList(pageNo, pageSize) {
let _this = this
_this.$api.myOrderListByUserSid({
"current": pageNo,
"size": pageSize,
"params": {
"customerSid": getApp().globalData.sid,
"state": '1', //0 1
}
}).then((resp) => {
//
this.$refs.paging.complete(resp.records)
}).catch(e => {
//
_this.$refs.paging.complete(false);
})
},
}
}
</script>
<style>
</style>

8
pages/records/reservationRecords3.vue

@ -44,8 +44,8 @@
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 12px;color: #999; margin-right: 5px;">预约时间</text>
<text style="font-size: 12px;color: #333;">{{item.createTime}}</text>
<text style="font-size: 12px;color: #999; margin-right: 5px;">预约日期</text>
<text style="font-size: 12px;color: #333;">{{item.reserveDate}}</text>
</view>
@ -76,12 +76,12 @@
</view>
<view class="item_btn" v-if="item.showLsit" @click="showList(item)">
<view class="item_btn" v-if="!item.showLsit" @click="showList(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">展开</text>
<image src="../../static/zhankai.png" style="width: 15px;height: 15px;"></image>
</view>
<view class="item_btn" v-if="!item.showLsit" @click="showList(item)">
<view class="item_btn" v-if="item.showLsit" @click="showList(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">收起</text>
<image src="../../static/shouqi.png" style="width: 15px;height: 15px;"></image>
</view>

10
pages/records/reservationRecords4.vue

@ -35,7 +35,7 @@
<image src="../../static/time.png" style="width: 15px;height: 15px;margin-right: 5px;">
</image>
<text style="font-size: 12px;color: #BBBBBB; margin-right: 5px;">提菜日期</text>
<text style="font-size: 12px;color: #BBBBBB;">{{item.endTime}}</text>
<text style="font-size: 12px;color: #BBBBBB;">{{item.reserveDate}}</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 20px;">
@ -46,8 +46,8 @@
</view>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 8px;">
<text style="font-size: 12px;color: #BBBBBB; margin-right: 5px;">预约时间</text>
<text style="font-size: 12px;color: #BBBBBB;">{{item.createTime}}</text>
<text style="font-size: 12px;color: #BBBBBB; margin-right: 5px;">预约日期</text>
<text style="font-size: 12px;color: #BBBBBB;">{{item.reserveDate}}</text>
</view>
@ -82,12 +82,12 @@
</view>
<view class="item_btn" v-if="item.showLsit" @click="showList(item)">
<view class="item_btn" v-if="!item.showLsit" @click="showList(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">展开</text>
<image src="../../static/zhankai.png" style="width: 15px;height: 15px;"></image>
</view>
<view class="item_btn" v-if="!item.showLsit" @click="showList(item)">
<view class="item_btn" v-if="item.showLsit" @click="showList(item)">
<text style="font-size: 12px;color: #999; margin-right: 5px;">收起</text>
<image src="../../static/shouqi.png" style="width: 15px;height: 15px;"></image>
</view>

Loading…
Cancel
Save