Commit c04da2cb5b11f8217ea62be3e8b8e2e45923bb8e

Authored by yiren
1 parent 81076b41

提前点餐流程、验券和券列表页面

... ... @@ -103,7 +103,7 @@ Page({
recharge_id:this.data.opt.id,
sellerid:this.data.opt.sid,
number:this.data.num,
price:this.data.totalize,
price:this.data.detail.price,
type:'1',
}).then(res=>{
console.log(res);
... ... @@ -117,7 +117,7 @@ Page({
return
}
wx.navigateTo({
url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&orderId=${res.data.id}&totalize=${this.data.totalize}`,
url: `./confirmPayment?type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}`,
})
}else{
wx.showToast({
... ...
... ... @@ -9,7 +9,7 @@ Page({
data: {
opt:{
detail:{},
orderId:'',
combine_out_trade_no:'',
totalize:'',
},
type: '',
... ... @@ -44,7 +44,7 @@ Page({
this.setData({
opt:{
detail:options.detail?JSON.parse(options.detail):'',
orderId:options.orderId,
combine_out_trade_no:options.combine_out_trade_no,
totalize:options.totalize?options.totalize:'',
sellerid:options.sellerid?options.sellerid:'',
},
... ... @@ -71,8 +71,8 @@ Page({
this.modal.showModal() //调用组件中打开模态框方法
},
confirmPayment(){
App.PayOnline.CombineTransactionsByRecharge({
id:this.data.opt.orderId
App.PayOnline.CombineTransactionsByNewRecharge({
combine_out_trade_no:this.data.opt.combine_out_trade_no
}).then(res=>{
console.log(res.data);
let that=this;
... ...
... ... @@ -6,21 +6,21 @@ Page({
* 页面的初始数据
*/
data: {
id:'',
detail:{
qrcode:null,
id: '',
detail: {
qrcode: null,
},
sellerObj:{
sellername:'',
seller_image:'',
real_address:'',
cateStr:'',
sellerObj: {
sellername: '',
seller_image: '',
real_address: '',
cateStr: '',
},
certificateDetail:{},
exp_date:{},
is_time:false,//是否继续执行
timeList:[],//定时器列表
timers:null,
certificateDetail: {},
exp_date: {},
is_time: false, //是否继续执行
timeList: [], //定时器列表
timers: null,
},
stopWaiting() {
for (var i = 0; i < this.data.timeList.length; i++) {
... ... @@ -32,7 +32,7 @@ Page({
*/
onLoad(options) {
this.setData({
id:options.id
id: options.id
})
console.log(this.data.id);
this.getDetail('1')
... ... @@ -51,40 +51,40 @@ Page({
onShow() {
},
getDetail(num){
getDetail(num) {
App.Activity.GetOrderRechargeByid({
id:this.data.id
}).then(res=>{
let detail=res.data;
let exp_date=detail.exp_date?JSON.parse(detail.exp_date):'';
let date=Date.now()*1;
if(date>detail.etime){
detail.is_expire='0';
}else{
detail.is_expire='1';
id: this.data.id
}).then(res => {
let detail = res.data;
let exp_date = detail.exp_date ? JSON.parse(detail.exp_date) : '';
let date = Date.now() * 1;
if (date > detail.etime) {
detail.is_expire = '0';
} else {
detail.is_expire = '1';
}
this.setData({
detail,
exp_date
})
console.log('is_examine',detail.is_examine);
if(detail.is_examine=='0'){
console.log('is_examine', detail.is_examine);
if (detail.is_examine == '0') {
this.setData({
is_time:true,
is_time: true,
detail,
exp_date
})
this.myUpdate()
}else{
} else {
this.setData({
is_time:false,
is_time: false,
detail,
exp_date
})
wx.showModal({
title: '已核销',
cancelText:'取消',
confirmText:'朕知道了',
cancelText: '取消',
confirmText: '朕知道了',
content: '核销成功!',
success: function (res) {
if (res.confirm) { //这里是点击了确定以后
... ... @@ -95,78 +95,84 @@ Page({
}
})
}
if(num=='1'){
if (num == '1') {
this.getSeller(res.data.sellerid)
}
})
},
// 轮询查询是否核销
myUpdate() {
var is_time = this.data.is_time//是否继续执行
console.log('is_time',is_time)
var is_time = this.data.is_time //是否继续执行
console.log('is_time', is_time)
if (!is_time) {
console.log( '已核销!轮询停止')
console.log('已核销!轮询停止')
clearTimeout(this.timers)
} else {
console.log("继续轮询");
this.timers= setTimeout(() => {
this.timers = setTimeout(() => {
this.getDetail()
}, 5000);
}
},
// 获取商家信息
getSeller(sid){
getSeller(sid) {
App.Customer.GetSellerDetail({
sid,
}).then(res=>{
let data=res.data;
let cate=data.cate;
}).then(res => {
let data = res.data;
let cate = data.cate;
let cateStr;
if(cate && cate.length>0){
cateStr=[];
cate.some(cate=>{
cateStr.push(cate);
if(cateStr.length>2){return true}
if (cate && cate.length > 0) {
cateStr = [];
cate.some(cate => {
cateStr.push(cate);
if (cateStr.length > 2) {
return true
}
})
cateStr=cateStr.join('/')
cateStr = cateStr.join('/')
}
let sellerObj={
sellername:data.sellername,
seller_image:data.seller_image,
real_address:data.real_address,
let sellerObj = {
sellername: data.sellername,
seller_image: data.seller_image,
real_address: data.real_address,
cateStr
}
this.setData({
sellerObj
})
console.log('sellerObj',{...sellerObj});
console.log('sellerObj', {
...sellerObj
});
})
},
// 申请退款
subscribeDrawback() {
clearTimeout(this.timers)
wx.navigateTo({
url: '/pack-activity/pack/subscribeDrawback?id='+this.data.detail.orderid,
url: '/pack-activity/pack/subscribeDrawback?detail=' + JSON.stringify(this.data.detail),
})
},
// 跳转到商家详情
getReserve(){
wx.reLaunch({
url:'/pages/reserve/detail?id='+this.data.detail.sellerid
})
getReserve() {
clearTimeout(this.timers)
wx.reLaunch({
url: '/pages/reserve/detail?id=' + this.data.detail.sellerid
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.stopWaiting()
clearTimeout(this.timers)
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.stopWaiting()
clearTimeout(this.timers)
},
/**
... ...
... ... @@ -5,9 +5,9 @@ Page({
* 页面的初始数据
*/
data: {
number:'0',
checkName:'',
id:'',
number: '0',
checkName: '',
detail: {},
radioboxList: [{
value: '1',
name: '计划有变,没时间消费'
... ... @@ -67,7 +67,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.id=options.id;
let detail = JSON.parse(options.detail);
this.setData({
detail
})
this.modal = this.selectComponent("#drawbackModal"); //通过给组件所起的id调用组件
},
showModal() {
... ... @@ -76,33 +79,33 @@ Page({
closeModal() {
this.modal.closeModal() //调用组件中关闭模态框方法
},
// 关注公众号
wananchi() {
wx.navigateTo({
url: '/pages/me/wananchi'
})
},
// 关注公众号
wananchi() {
wx.navigateTo({
url: '/pages/me/wananchi'
})
},
//申请退款
subscribeDrawback() {
if(this.data.checkName==''){
if (this.data.checkName == '') {
return wx.showToast({
title:'请选择退款原因',
duration:2000,
icon:'none'
title: '请选择退款原因',
duration: 2000,
icon: 'none'
})
}
App.PayOnline.RechargeRefundApply({
reason:this.data.checkName,
id:this.data.id,
}).then(res=>{
reason: this.data.checkName,
id: this.data.detail.id,
}).then(res => {
console.log(res);
if(res.ret=='200'){
if (res.ret == '200') {
this.modal.showModal()
}
})
},
// 退款后跳转我的券页面
closeModalFun(){
closeModalFun() {
this.closeModal()
wx.reLaunch({
url: '/pages/me/coupon_news'
... ... @@ -112,16 +115,16 @@ Page({
radioChange(e) {
console.log('checkbox发生change事件,携带value值为:', e.detail)
let checkName;
checkName=this.data.radioboxList[(e.detail.value*1)-1].name;
checkName = this.data.radioboxList[(e.detail.value * 1) - 1].name;
this.setData({
checkName
})
},
bindTextAreaBlur(e){
let value = e.detail.value;//获取textarea的内容,
let len = value.length;//获取textarea的内容长度
bindTextAreaBlur(e) {
let value = e.detail.value; //获取textarea的内容,
let len = value.length; //获取textarea的内容长度
this.setData({
'number': len
'number': len
})
},
/**
... ...
... ... @@ -7,7 +7,7 @@
退款金额
</view>
<view class="info_right font32r">
100元
{{detail.price}}元
</view>
</view>
<view class="info">
... ...
... ... @@ -4,39 +4,56 @@ Page({
* 页面的初始数据
*/
data: {
checkList: [],
cookbooklist: [],
sellerName: '',
probablyPrice: '',
sellerid: '',
notes: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options);
this.setData({
checkList: JSON.parse(options.arr),
sellerName: options.sellerName,
sellerid: options.sellerid
})
console.log(this.data.checkList);
console.log('options', options);
let obj = JSON.parse(options.obj);
let cookbooklist = JSON.parse(options.cookbooklist);
let probablyPrice = 0;
this.data.checkList.forEach(items => {
items.arr.forEach(item => {
let price = item.quantum * 1 * (item.price * 1)
probablyPrice += price
cookbooklist.forEach(items => {
items.is_show = false
items.cookbooklist[0].forEach(item => {
let price = item.quantum * 1 * (item.price * 1);
probablyPrice += price;
if (item.quantum > 0) {
items.is_show = true
}
})
})
this.setData({
cookbooklist,
sellerName: obj.sellerName,
sellerid: obj.sellerid,
probablyPrice
})
},
// 确认下单
determineFun() {
console.log('sellerid', this.data.sellerid);
let obj = {
sellerName: this.data.sellerName,
sellerid: this.data.sellerid,
notes: this.data.notes
}
wx.navigateTo({
url: `/pack-cookbook/pages/success_new?arr=${JSON.stringify(this.data.checkList)}&sellerName=${this.data.sellerName}&sellerid=${this.data.sellerid}`,
url: `/pack-cookbook/pages/success_new?cookbooklist=${JSON.stringify(this.data.cookbooklist)}&obj=${JSON.stringify(obj)}`,
})
},
// 加
addDdish() {
},
// 减
reduceDdish() {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
... ... @@ -15,24 +15,26 @@
</view>
<view class="info flex-lr">
<view class="texts font28r">备注信息:</view>
<input type="text" placeholder="点击录入口味,偏好等要求" placeholder-style="color:#fff" />
<input type="text" model:value="{{notes}}" placeholder="点击录入口味,偏好等要求" placeholder-style="color:#fff" />
</view>
<view class="line"></view>
<view class="checkMenu">
<block wx:for="{{checkList}}" wx:key="{{item.id}}" wx:for-index="indexs">
<view class="title flex-lr">
<block wx:for="{{cookbooklist}}" wx:key="{{item.id}}" wx:for-index="indexs">
<view wx:if="{{item.is_show}}" class="title flex-lr">
<view class="leftTitle">{{item.class_name}}</view>
<view class="rightTitle">{{item.arr.length}}道</view>
</view>
<view class="content flex-lr" wx:for="{{item.arr}}" wx:key="{{item.id}}" wx:for-index="index">
<view class="single">{{item.name}}<text>({{item.practice}})</text></view>
<view class="price">{{item.price}}元/{{item.unit}}</view>
<view class="count">
<image src="https://qn.colorcun.com/WechatIMG809.png" class="img1" mode="" />
{{item.quantum}}
<image src="https://qn.colorcun.com/WechatIMG810.png" class="img2" mode="" />
<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
<view wx:if="{{item.quantum>0}}" class="content flex-lr">
<view class="single">{{item.name}}<text>({{item.practice}})</text></view>
<view class="price">{{item.price}}元/{{item.unit}}</view>
<view class="count flex-cc">
<image bindtap="reduceDdish" src="https://qn.colorcun.com/WechatIMG809.png" class="img1" mode="" />
{{item.quantum}}
<image bindtap="addDdish" src="https://qn.colorcun.com/WechatIMG810.png" class="img2" mode="" />
</view>
</view>
</view>
</block>
</block>
</view>
<view class="probably">预计金额:{{probablyPrice}}元</view>
... ...
... ... @@ -74,11 +74,13 @@ page {
.img1 {
width: 28rpx;
height: 24rpx;
padding: 20rpx;
}
.img2 {
width: 24rpx;
height: 24rpx;
padding: 20rpx 0 20rpx 20rpx;
}
.probably {
... ...
... ... @@ -9,12 +9,13 @@ Page({
*/
data: {
type: 'A', //样式A,B,C
status: 'inToView01',
scrollTop: 0,
options: {},
check1: '', //做法
check2: '', //规格
isloading: true,
toView: "",
toView: "inToView27",
countPirce: '',
countTotal: '',
hasEnter: false,
... ... @@ -78,26 +79,30 @@ Page({
},
// 已选菜单页面跳转
gotoShoppingCart() {
let arr = [];
this.data.cookbooklist.forEach(item => {
let obj = {
class_name: item.class_name,
id: item.id,
status: item.status,
class_type: item.class_type,
arr: [],
}
item.cookbooklist[0].forEach(i => {
if (i.quantum != '0') {
obj.arr.push(i)
}
})
arr.push(obj)
})
console.log(arr);
let sellerName = this.data.options.sellerName
// let arr = [];
// this.data.cookbooklist.forEach(item => {
// let obj = {
// class_name: item.class_name,
// id: item.id,
// status: item.status,
// class_type: item.class_type,
// arr: [],
// }
// item.cookbooklist[0].forEach(i => {
// if (i.quantum != '0') {
// obj.arr.push(i)
// }
// })
// arr.push(obj)
// })
// console.log(arr);
let cookbooklist = this.data.cookbooklist;
let obj = {
sellerName: this.data.options.sellerName,
sellerid: this.data.options.sid,
}
wx.navigateTo({
url: `/pack-cookbook/pages/cart_new?arr=${JSON.stringify(arr)}&sellerName=${sellerName}&sellerid=${this.data.options.sid}`,
url: `/pack-cookbook/pages/cart_new?cookbooklist=${JSON.stringify(cookbooklist)}&obj=${JSON.stringify(obj)}`,
})
},
// 选择规格
... ... @@ -127,7 +132,12 @@ Page({
// 选择菜品分类
checkItem(e) {
const item = e.currentTarget.dataset['item'];
console.log(item);
var _id = item.id;
this.closeClassifyModal()
this.setData({
toView: 'inToView' + _id
})
console.log(_id);
},
// 选择做法和规格后点击确定
determineFun() {
... ... @@ -218,6 +228,7 @@ Page({
})
})
},
// 过滤数据
formatCookList(list) {
//原栏目下显示
let hasShowClass = false;
... ... @@ -239,8 +250,8 @@ Page({
order: cate.order,
status: cate.status,
}
assortArr.push(obj)
if (cate.status == 1 && cate.cookbooklist[0].length > 0) {
assortArr.push(obj)
let cooks = [];
//let cooks_order=[];
cate.cookbooklist[0].forEach(function (cook, n) {
... ... @@ -344,6 +355,11 @@ Page({
this.selectComponent("#network").show('网络不给力,请检查网络后重试');
});
},
getStatus(e) {
this.setData({
status: e.currentTarget.dataset.index
})
},
/**
* 生命周期函数--监听页面显示
*/
... ... @@ -366,13 +382,6 @@ Page({
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
... ...
... ... @@ -2,81 +2,83 @@
<nav backgroundColor="#4d4e50" color="#fff">{{options.sellerName||'提前点菜'}}</nav>
<loading wx:if="{{isloading}}">数据加载中</loading>
<view wx:if="{{type=='A'}}" class="wrapIine"></view>
<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
<view class="dishWrap">
<block wx:if="{{type=='A'}}">
<view class="heand flex-vc flex-cc">
<view class="style_round flex-vc flex-cc">
<view class="round"></view>
<view class="line"></view>
</view>
<view class="title">{{item.class_name}}</view>
<view class="style_round flex-vc flex-cc">
<view class="line"></view>
<view class="round"></view>
</view>
</view>
</block>
<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
<view wx:if="{{item.type=='1'}}" class="dishWrap">
<view class="dishItem flex-lr">
<view class="dishLeft dishTexts">{{item.name}}</view>
<view class="dishTexts dishRight">{{item.first_name}}</view>
</view>
<view class="norms">{{item.first_name}}</view>
<block wx:if="{{type=='B'}}">
<view class="dishItem typeB">
<view class="dishLeft dishTexts">{{item.title}}</view>
<view class="dishTexts dishRight">{{item.first_name}}</view>
<scroll-view style="height:100vh;" class="content" scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true">
<block wx:for="{{cookbooklist}}" wx:key="cookbooklist-key" wx:for-index="indexs">
<view class="dishWrap" id="{{ 'inToView'+item.id}}">
<block wx:if="{{type=='A'}}">
<view class="heand flex-vc flex-cc">
<view class="style_round flex-vc flex-cc">
<view class="round"></view>
<view class="line"></view>
</view>
<view class="norms normsB">{{item.first_name}}</view>
</block>
<block wx:if="{{type=='C'}}">
<view class="dishItem">
<view class="dishLeft dishTexts">{{item.title}}</view>
<view class="title">{{item.class_name}}</view>
<view class="style_round flex-vc flex-cc">
<view class="line"></view>
<view class="round"></view>
</view>
</view>
</block>
<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
<view wx:if="{{item.type=='1'}}" class="dishWrap">
<view class="dishItem flex-lr">
<view class="dishLeft dishTexts">{{item.name}}</view>
<view class="dishTexts dishRight">{{item.first_name}}</view>
</view>
<view class="norms">{{item.first_name}}</view>
</block>
<image src="{{item.image}}" class="dishImg" mode="aspectFill" />
<view class="greens">
<view class="news">{{item.first_name}}</view>
</view>
<view wx:if="{{item.quantum!=0}}" class="algorithmImg flex-lr calculate">
<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
<view class="box flex-cc">
<view class="num flex-cc">
{{item.quantum}}<view>{{item.unit}}</view>
<block wx:if="{{type=='B'}}">
<view class="dishItem typeB">
<view class="dishLeft dishTexts">{{item.title}}</view>
<view class="dishTexts dishRight">{{item.first_name}}</view>
</view>
<view class="practice">{{item.practice}}</view>
</view>
<image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="algorithmImg flex-rr">
<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="wrapIine"></view>
</view>
<view wx:else class="twoBox flex-rs">
<view class="twoItem">
<view class="twoTitle">{{item.name}}</view>
<view class="twoInfo">{{item.info}}{{item.vip}}</view>{{item.quantum}}
<image src="{{item.image}}" mode="aspectFill" />
<view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">
<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
<view class="norms normsB">{{item.first_name}}</view>
</block>
<block wx:if="{{type=='C'}}">
<view class="dishItem">
<view class="dishLeft dishTexts">{{item.title}}</view>
<view class="dishTexts dishRight">{{item.first_name}}</view>
</view>
<view class="norms">{{item.first_name}}</view>
</block>
<image src="{{item.image}}" class="dishImg" mode="aspectFill" />
<view class="greens">
<view class="news">{{item.first_name}}</view>
</view>
<view wx:else class="algorithmImg flex-lr twoImgs">
<view wx:if="{{item.quantum!=0}}" class="algorithmImg flex-lr calculate">
<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
<view class="box flex-cc">
<view class="num flex-cc">{{item.quantum}}</view>
<view class="num flex-cc">
{{item.quantum}}<view>{{item.unit}}</view>
</view>
<view class="practice">{{item.practice}}</view>
</view>
<image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="algorithmImg flex-rr">
<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view class="wrapIine"></view>
</view>
</view>
</block>
</view>
</block>
<view wx:else class="twoBox flex-rs">
<view class="twoItem">
<view class="twoTitle">{{item.name}}</view>
<view class="twoInfo">{{item.info}}{{item.vip}}</view>{{item.quantum}}
<image src="{{item.image}}" mode="aspectFill" />
<view wx:if="{{item.quantum==0}}" class="algorithmImg flex-rr oneImg">
<image src="https://qn.colorcun.com/WechatIMG696.png" class="imgs" mode="aspectFill" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
<view wx:else class="algorithmImg flex-lr twoImgs">
<image src="https://qn.colorcun.com/WechatIMG697.png" mode="aspectFill" class="reduceImg" bindtap="subtraction" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
<view class="box flex-cc">
<view class="num flex-cc">{{item.quantum}}</view>
</view>
<image src="https://qn.colorcun.com/WechatIMG696.png" mode="aspectFill" class="imgs" bindtap="addition" data-item="{{item}}" data-key="{{index}}" data-indexs="{{indexs}}" />
</view>
</view>
</view>
</block>
</view>
</block>
</scroll-view>
<view class="fixedBox flex-lr">
<view class="left flex-cmc" bindtap="showClassifyModal">
<image src="https://qn.colorcun.com/WechatIMG700.png" mode="" />
... ... @@ -116,10 +118,11 @@
</my-modal>
<my-modal id="classifyModal" fadeStyle="slideDown" height="100%">
<view slot="modalContent" class="assortModel">
<!-- underline -->
<view wx:for="{{assortArr}}" class="assortItem font48r" data-item="{{item}}" bindtap="checkItem">
{{item.class_name}}
</view>
<scroll-view scroll-y="true" style="height: 70%;">
<view wx:for="{{assortArr}}" class="assortItem font48r {{toView==('inToView'+item.id)?'underline':''}}" data-item="{{item}}" bindtap="checkItem">
{{item.class_name}}
</view>
</scroll-view>
<image class="assortImg" bindtap="closeClassifyModal" src="https://qn.colorcun.com/WechatIMG807.png" mode="" />
</view>
</my-modal>
\ No newline at end of file
... ...
... ... @@ -297,15 +297,19 @@ page {
}
.assortModel {
height: 100%;
padding-top: 5%;
display: flex;
flex-direction: column;
align-items: center;
padding-top: 20%;
position: relative;
height: 100%;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
#classifyModal .mymodal .mymodal-content {
overflow: hidden !important;
}
.assortItem {
text-align: center;
color: #ffffff;
... ... @@ -319,8 +323,72 @@ page {
.assortImg {
position: absolute !important;
bottom: 30%;
bottom: 20%;
margin-top: 30rpx;
width: 100rpx;
height: 100rpx;
}
\ No newline at end of file
}
/* .tui-fixed-x{
width: 100%;
position: fixed;
top: 0;
left: 0;
}
.tui-city-scroll{
height: 220rpx;
line-height: 80rpx;
width: 100%;
white-space: nowrap;
}
.tui-city-scroll text{
height: 120rpx;
line-height: 80rpx;
width: 100%;
white-space: nowrap;
}
.tui-nav-li{
font-size: 33rpx;
padding: 0 10rpx;
}
.tui-nav-li:first-child{padding-left: 16rpx;}
.tui-nav-li:last-child{padding-right: 16rpx;}
.tui-nav-active{
color: red;
border-bottom: 3rpx solid red;
}
.tui-fixed-y{
width: 100%;
height: calc(100% - 80rpx);
position: fixed;
bottom: 0;
left: 0;
}
.tui-city-scroll-y{
padding: 0 20rpx;
height: 100%;
box-sizing: border-box;
}
.tui-list-head{
height: 50px;
line-height: 50px;
text-align: center;
font-size: 30rpx;
color: blue;
}
.tui-list-li{
height: 400px;
padding: 10rpx;
color: #fff;
font-size: 50rpx;
background-color: #2EB3FF;
} */
\ No newline at end of file
... ...
... ... @@ -5,33 +5,44 @@ Page({
* 页面的初始数据
*/
data: {
checkList: [],
cookbooklist: [],
sellerName: '',
sellerid: '',
probablyPrice: '',
discount: '',
stringifyUse: '',
priceInfo: '',
scoreInfo: '',
notes: '',
marketing: {},
recharge_data: {},
coupon_data: {},
dataStr: Date.now() * 1 / 1000,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('options', options);
this.setData({
checkList: JSON.parse(options.arr),
sellerName: options.sellerName,
sellerid: options.sellerid,
})
console.log(this.data.checkList);
let obj = JSON.parse(options.obj);
let cookbooklist = JSON.parse(options.cookbooklist);
let probablyPrice = 0;
this.data.checkList.forEach(items => {
items.arr.forEach(item => {
let price = item.quantum * 1 * (item.price * 1)
probablyPrice += price
cookbooklist.forEach(items => {
items.is_show = false
items.cookbooklist[0].forEach(item => {
let price = item.quantum * 1 * (item.price * 1);
probablyPrice += price;
if (item.quantum > 0) {
items.is_show = true
}
})
})
this.setData({
probablyPrice
cookbooklist,
sellerName: obj.sellerName,
sellerid: obj.sellerid,
probablyPrice,
notes: obj.notes
})
this.getSellerTemplateConfFun()
},
... ...
<!--pack-cookbook/pages/success_new.wxml-->
<nav backgroundColor="#4d4e50" color="#fff">{{sellerName||'提交订单'}}</nav>
<scroll-view class="main">
<view class="info flex-lr">
<view class="texts font28r">就餐时间:</view>
<view class="texts_right font28r">2023年4月18日 午餐</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right font28r">二楼包间 南京</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">就餐人数:</view>
<view class="texts font28r">8</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">备注信息:</view>
<input type="text" placeholder="点击录入口味,偏好等要求" placeholder-style="color:#fff" />
<view class="box">
<view class="info flex-lr">
<view class="texts font28r">就餐时间:</view>
<view class="texts_right font28r">2023年4月18日 午餐</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right font28r">二楼包间 南京</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">就餐人数:</view>
<view class="texts font28r">8</view>
</view>
<view class="info flex-lr">
<view class="texts font28r">备注信息:</view>
<view class="texts font28r">{{notes}}</view>
</view>
<image class="imgs" src="https://qn.colorcun.com/001.png" mode="" />
</view>
<view class="line"></view>
<view class="checkMenu">
<block wx:for="{{checkList}}" wx:key="{{item.id}}" wx:for-index="indexs">
<view class="title flex-lr">
<block wx:for="{{cookbooklist}}" wx:key="{{item.id}}" wx:for-index="indexs">
<view wx:if="{{item.is_show}}" class="title flex-lr">
<view class="leftTitle">{{item.class_name}}</view>
<view class="rightTitle">{{item.arr.length}}道</view>
</view>
<view class="content flex-lr" wx:for="{{item.arr}}" wx:key="{{item.id}}" wx:for-index="index">
<view class="single">{{item.name}}<text>({{item.practice}})</text></view>
<view class="price">{{item.price}}元/{{item.unit}}</view>
<view class="count">
<image src="https://qn.colorcun.com/WechatIMG809.png" class="img1" mode="" />
{{item.quantum}}
<image src="https://qn.colorcun.com/WechatIMG810.png" class="img2" mode="" />
<block wx:for="{{item.cookbooklist[0]}}" wx:key="{{item.id}}" wx:for-index="index">
<view wx:if="{{item.quantum>0}}" class="content flex-lr">
<view class="single">{{item.name}}<text>({{item.practice}})</text></view>
<view class="price">{{item.price}}元/{{item.unit}}</view>
<view class="count flex-cc">
{{item.quantum}}
</view>
</view>
</view>
</block>
</block>
<view class="probably flex-ll">
<view class="tariff font24r">预计金额:<text class="font32r">{{probablyPrice}}</text>元</view>
... ... @@ -41,9 +44,6 @@
<view class="information font36r">特别优惠</view>
<view class="poop font24r">根据您选择的菜品,我们推荐您参加以下活动,本次消费可用,预计可以节约大笔开销!</view>
<view class="preferential" wx:if="{{marketing && (marketing.is_coupon=='1' || marketing.is_recharge=='1')}}">
<view class="rubric rubric1">
特别优惠
</view>
<view class="preferentialItems" wx:if="{{marketing && marketing.is_coupon=='1' && dataStr<(coupon_data.etime*1)}}">
<view class="left">
<view class="top">
... ... @@ -91,9 +91,12 @@
</navigator>
</view>
</view>
<!-- <view wx:if="{{marketing.is_link}}" class="font24r favouredPolicy">
点击了解更多会员优惠政策
</view> -->
</view>
</scroll-view>
<view class="btns flex-cc">
<button class="font32r continue flex-cc" bindtap="continueOrdering">继续点菜</button>
<button class="font32r determine flex-cc" bindtap="determineFun">确认下单</button>
<button class="font32r continue flex-cc" bindtap="continueOrdering">菜品更换</button>
<button class="font32r determine flex-cc" bindtap="determineFun">分享菜单</button>
</view>
\ No newline at end of file
... ...
... ... @@ -39,6 +39,7 @@ page {
}
.checkMenu {
padding-bottom: 34rpx;
border-radius: 10rpx;
background: #ffffff;
}
... ... @@ -119,8 +120,21 @@ page {
border: 2rpx solid #094ba4;
}
.box {
position: relative;
}
.poop {
margin: 20rpx 40rpx;
text-indent: 50rpx;
}
.imgs {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 20%;
left: 31%;
}
.determine {
... ... @@ -128,11 +142,6 @@ page {
}
.orderingFood {
padding: 4rpx 20rpx;
color: #fff;
... ... @@ -157,9 +166,6 @@ page {
justify-content: space-between;
}
.rubric1 {
margin: 30rpx 0;
}
.left {
flex: 1;
... ... @@ -204,4 +210,15 @@ page {
.top .price {
color: #E34D59;
}
.favouredPolicy {
width: 60%;
color: #999999;
font-family: PingFang SC;
font-weight: 500;
border: 2rpx solid #0244a4;
border-radius: 22rpx;
text-align: center;
padding: 10rpx;
}
\ No newline at end of file
... ...
... ... @@ -11,9 +11,12 @@
<view class="font24r font-bold text1" wx:if="{{item.sellername}}">{{item.sellername}}</view>
<view class="font24r font-bold text1" wx:if="{{item.order_no}}">{{item.order_no}}</view>
</view>
<!-- status 状态 1 待支付 2 已支付 3 支付失败 4 退款中 5 已退款 is_expire 1未失效 -->
<image wx:if="{{item.is_examine=='1'}}" src="https://qn.colorcun.com/WechatIMG713.png" class="imgs1" mode="" />
<image wx:if="{{item.is_expire=='1'}}" src="https://qn.colorcun.com/WechatIMG714.png" class="imgs1" mode="" />
<button wx:if="{{item.is_examine=='1' || (item.is_expire=='0'&& item.is_examine=='0')}}" class="flex-cc card-info font30r font-bold smooth">{{item.is_examine=='1' ? '去评价' : (item.is_expire=='0'&& item.is_examine=='0') ?'去使用': ''}}</button>
<image wx:if="{{item.status=='4'}}" src="https://qn.colorcun.com/WechatIMG1.png" class="imgs1" mode="" />
<image wx:if="{{item.status=='5'}}" src="https://qn.colorcun.com/WechatIMG2.png" class="imgs1" mode="" />
<button wx:if="{{item.is_examine=='1' || (item.is_expire=='0'&& item.is_examine=='0' && item.status!='4' && item.status!='5')}}" class="flex-cc card-info font30r font-bold smooth">{{item.is_examine=='1' ? '去评价' : (item.is_expire=='0'&& item.is_examine=='0') ?'去使用': ''}}</button>
<view class="font24r texts smooth">有效时间:{{util.unixtoTime(item.stime,'YYYY-MM-DD')}} 至 {{util.unixtoTime(item.etime,'YYYY-MM-DD')}}</view>
</view>
</block>
... ...
... ... @@ -670,4 +670,9 @@ export default {
'App.PayOnline.RechargeRefundApply':{
openid:'openid'
},
// 新版券合单购买
'App.PayOnline.CombineTransactionsByNewRecharge':{
openid:'openid'
},
}
\ No newline at end of file
... ...