Commit f92b0a37 authored by Mac's avatar Mac

1

parent 8a029836
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<u-radio-group v-model="currentChosen" > <u-radio-group v-model="currentChosen" >
<u-radio <u-radio
shape="circle" shape="circle"
:name="x.CouponId" :name="x.id"
:icon-size="36" :icon-size="36"
:active-color="mc" :active-color="mc"
></u-radio> ></u-radio>
......
...@@ -61,7 +61,6 @@ export default { ...@@ -61,7 +61,6 @@ export default {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.orderInfo = JSON.parse(res.data); this.orderInfo = JSON.parse(res.data);
} }
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
} }
); );
...@@ -78,9 +77,16 @@ export default { ...@@ -78,9 +77,16 @@ export default {
paySign: this.orderInfo.sign, paySign: this.orderInfo.sign,
success: function(res) { success: function(res) {
console.log('success', res); console.log('success', res);
uni.navigateTo({ if(that.payInfo.successType==1){
url: '/pages/order-submit/pay-success?payInfo='+JSON.stringify(that.payInfo) uni.navigateTo({
}); url: '/pages/reserve/offline-success?payInfo='+JSON.stringify(that.payInfo)
});
}else{
uni.navigateTo({
url: '/pages/order-submit/pay-success?payInfo='+JSON.stringify(that.payInfo)
});
}
}, },
fail: function(err) { fail: function(err) {
console.log('fail:', err); console.log('fail:', err);
......
...@@ -92,9 +92,7 @@ export default { ...@@ -92,9 +92,7 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + item.id });
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
...@@ -107,6 +105,9 @@ export default { ...@@ -107,6 +105,9 @@ export default {
this.showAuth = true; this.showAuth = true;
} else { } else {
//跳到结算页面 //跳到结算页面
uni.navigateTo({
url: "/pages/reserve/subscribe?GoodsId="+g.id,
})
} }
}, },
reloadUserinfo() { reloadUserinfo() {
......
...@@ -88,9 +88,7 @@ export default { ...@@ -88,9 +88,7 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + item.id });
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
...@@ -102,7 +100,11 @@ export default { ...@@ -102,7 +100,11 @@ export default {
}; };
this.showAuth = true; this.showAuth = true;
} else { } else {
//跳到结算页面 //跳到结算页面
uni.navigateTo({
url: "/pages/reserve/subscribe?GoodsId="+g.id,
})
} }
}, },
reloadUserinfo() { reloadUserinfo() {
......
...@@ -73,9 +73,7 @@ export default { ...@@ -73,9 +73,7 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + item.id });
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
...@@ -88,6 +86,9 @@ export default { ...@@ -88,6 +86,9 @@ export default {
this.showAuth = true; this.showAuth = true;
} else { } else {
//跳到结算页面 //跳到结算页面
uni.navigateTo({
url: "/pages/reserve/subscribe?GoodsId="+g.id,
})
} }
}, },
reloadUserinfo() { reloadUserinfo() {
......
...@@ -449,6 +449,8 @@ ...@@ -449,6 +449,8 @@
"path":"commentList" "path":"commentList"
},{ },{
"path":"share_qrcode" "path":"share_qrcode"
},{
"path":"offline-success"
} }
] ]
}, },
......
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
OrderId: 0, OrderId: 0,
storePosition: '', //线下服务获取经纬度 storePosition: '', //线下服务获取经纬度
storeInfo: {}, storeInfo: {},
fxstoreId:0,//分享过来的门店id
}; };
}, },
components: { components: {
...@@ -167,6 +168,10 @@ ...@@ -167,6 +168,10 @@
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;
options={
storeId:8,id:6,JumpType:8,
}
uni.getSystemInfo({ uni.getSystemInfo({
success(res) { success(res) {
that.titleStyle = { that.titleStyle = {
...@@ -240,6 +245,9 @@ ...@@ -240,6 +245,9 @@
//兼容之前小程序的调转 //兼容之前小程序的调转
this.getjump(options.scene); this.getjump(options.scene);
} }
if (options && options.storeId) {
this.fxstoreId = options.storeId
}
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
...@@ -329,6 +337,16 @@ ...@@ -329,6 +337,16 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/school/personal/payment-order?OrderId=" + that.OrderId url: "/pages/school/personal/payment-order?OrderId=" + that.OrderId
}); });
} else if (that.JumpType == 7) {
//线下服务门店详情
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+that.GoodsId,
});
} else if (that.JumpType == 8) {
//服务人员详情
uni.navigateTo({
url: "/pages/reserve/designerDetail?ID="+that.GoodsId+'&storeId='+that.fxstoreId,
})
} }
}, 500); }, 500);
} else { } else {
...@@ -572,6 +590,17 @@ ...@@ -572,6 +590,17 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/school/personal/payment-order?OrderId=" + that.OrderId url: "/pages/school/personal/payment-order?OrderId=" + that.OrderId
}); });
} else if (that.JumpType == 7) {
//线下服务门店详情
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+that.GoodsId,
});
} else if (that.JumpType == 8) {
//服务人员详情
uni.navigateTo({
url: "/pages/reserve/designerDetail?ID="+that.GoodsId+'&storeId='+that.fxstoreId,
})
} }
}, 500); }, 500);
...@@ -979,6 +1008,16 @@ ...@@ -979,6 +1008,16 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/school/personal/payment-order?OrderId=" + this.OrderId url: "/pages/school/personal/payment-order?OrderId=" + this.OrderId
}); });
} else if (this.JumpType == 7) {
//线下服务门店详情
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+this.GoodsId,
});
} else if (this.JumpType == 8) {
//服务人员详情
uni.navigateTo({
url: "/pages/reserve/designerDetail?ID="+this.GoodsId+'&storeId='+this.fxstoreId,
})
} }
}, 500); }, 500);
......
...@@ -671,7 +671,9 @@ ...@@ -671,7 +671,9 @@
//跳转至生成海报 //跳转至生成海报
goShare(){ goShare(){
uni.navigateTo({ uni.navigateTo({
url: "/pages/reserve/share_qrcode?ServiceLogo=" + this.personal.ServiceLogo+'&Name='+this.personal.Name url: "/pages/reserve/share_qrcode?ServiceLogo=" +
this.personal.ServiceLogo+'&Name='+this.personal.Name+
'&storeId='+this.storeId+'&ID='+this.ID
}) })
} }
}, },
......
<template>
<view class="paysuccess">
<view class="pd-box" :style="{'background':mainColor}">
<view
class="headStatus"
:style="[
headStyle,
]"
>
<view class="arrow" @click="goback">
<u-icon name="arrow-left" size="48" color="#000"></u-icon>
</view>
<view class="title" style="color: #000000;" >{{pageTitle}}</view>
<view class="arrow"></view>
</view>
<view class="pay-title">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pay-sicon.png" style="width: 49px;height: 49px;"></image>
<view class="pay-title-r">
<text style="font-size: 18px;font-weight: bold;">支付成功</text>
<text>不要忘记预约时间哟~</text>
</view>
</view>
<view class="pay-h">
<view class="pay-h-box">
<view class="pay-h-c">
<view style="display: flex;flex-direction: row;align-items: flex-end;">
<text style="margin-bottom: 5px;"></text>
<text style="font-size: 33px;">{{payInfo.total_price}}</text>
</view>
</view>
<!-- <view class="pay-item" style="margin-top: 10px;">
<text>订单编号:</text>
<text>5465464646</text>
</view>
<view class="pay-item">
<text>下单时间:</text>
<text>5465464646</text>
</view> -->
<view class="pay-item" style="margin-top: 10px;">
<text>支付方式:</text>
<text>微信</text>
</view>
</view>
</view>
</view>
<view class="btn" :style="{'background':mainColor}" @click="godingdan">
查看订单
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "交易成功",
mainColor: "",
headStyle:{},
payInfo:{}
};
},
onLoad(option) {
if (option.payInfo) {
this.payInfo = JSON.parse(option.payInfo)
}
this.mainColor = this.$uiConfig.mainColor;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
let nav = uni.getMenuButtonBoundingClientRect().top;
this.headStyle.paddingTop = nav +'px';
},
mounted() {
},
methods: {
goback(){
uni.navigateBack({})
},
godingdan(){
uni.reLaunch({
url: '/pages/reserve/personal/orderList?status=2'
});
}
},
};
</script>
<style>
.paysuccess {
height: 100%;
background: #FFF;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
.pd-box{
width: 100%;
height: 191px;
}
.paysuccess .headStatus {
overflow: hidden;
position: relative;
width: 140vw;
padding-right: 40vw;
padding-bottom: 10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.paysuccess .arrow {
height: 24px;
margin: 5px 10px;
width: 24px;
}
.paysuccess .pay-title{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 20px;
font-size: 14px;
color: #FFF;
}
.paysuccess .pay-title-r{
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 48px;
}
.paysuccess .pay-h{
width: calc(100vw - 20px);
height: 9px;
border-radius: 4.5px;
background: #F32931;
margin-top: 20px;
margin-left: 10px;
position: relative;
}
.paysuccess .pay-h-box{
width: calc(100vw - 30px);
height: 266px;
background: #FFF;
box-shadow:0 4px 10px 1px #D2D2D2;
position: absolute;
left: 5px;
top: 5px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
.pay-h-c{
height: 95px;
font-size: 16px;
color: #010101;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid rgba(170, 170, 170, 0.3);
}
.pay-item{
width: calc(100vw - 60px);
height: 45px;
display: flex;
flex-direction: row;
align-items: center;
font-size: 14px;
color: #9F9F9F;
margin-left: 15px;
}
.btn{
width: 185px;
height: 45px;
border-radius: 6px;
font-size: 14px;
color: #FFF;
display: flex;
align-items: center;
justify-content: center;
margin-top:290px;
}
</style>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<view class="c-d-store"> <view class="c-d-store">
<view class="title" >适用门店</view> <view class="title" >适用门店</view>
<view class="storebox"> <view class="storebox">
<view class="storeitem" v-for="(x, j) in cdetail.StoresList" :key="x"> <view class="storeitem" v-for="(x, j) in cdetail.StoresList" :key="x" @click="gostore(x)">
<image mode="aspectFill" :src="x.CoverImg" style="width: 75px;height: 75px;border-radius: 6px;" ></image> <image mode="aspectFill" :src="x.CoverImg" style="width: 75px;height: 75px;border-radius: 6px;" ></image>
<view class="storeitem-r"> <view class="storeitem-r">
<view class="storeitem-f"> <view class="storeitem-f">
...@@ -322,6 +322,12 @@ ...@@ -322,6 +322,12 @@
break; break;
} }
}, },
gostore(x){
uni.setStorageSync("storeId", {storeId:x.Id});
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+x.Id,
});
}
}, },
}; };
</script> </script>
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
UserInfo: '', UserInfo: '',
tempPic: '', tempPic: '',
ServiceLogo:'', //传递头像 ServiceLogo:'', //传递头像
Name:'' //传递name Name:'' ,//传递name
storeId:0,//门店id
ID:0,
} }
}, },
created() { created() {
...@@ -37,6 +39,9 @@ ...@@ -37,6 +39,9 @@
}); });
this.ServiceLogo = options.ServiceLogo; this.ServiceLogo = options.ServiceLogo;
this.Name = options.Name; this.Name = options.Name;
this.storeId = options.storeId;
this.ID = options.ID;
this.init() this.init()
} }
}, },
...@@ -71,7 +76,7 @@ ...@@ -71,7 +76,7 @@
that.request2({ that.request2({
url: '/api/AppletUser/GetWeiXinQRCodeForApplet', url: '/api/AppletUser/GetWeiXinQRCodeForApplet',
data: { data: {
Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId, Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId+'&storeId=' + this.storeId+'&id=' + this.ID+'&JumpType=8',
With: that.qrcode.QrCodeSize, With: that.qrcode.QrCodeSize,
} }
}, },
......
...@@ -477,7 +477,7 @@ ...@@ -477,7 +477,7 @@
</text> </text>
<u-icon name="arrow" :size="30" color="#666666"></u-icon> <u-icon name="arrow" :size="30" color="#666666"></u-icon>
</view> </view>
<view class="comment u-skeleton-rect"> <view class="comment u-skeleton-rect" v-if="comments.length>0">
<view class="content" v-for="(item, index) in comments" :key='index'> <view class="content" v-for="(item, index) in comments" :key='index'>
<view class="u-box"> <view class="u-box">
<view class="user"> <view class="user">
...@@ -507,8 +507,8 @@ ...@@ -507,8 +507,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="sku-box u-skeleton-rect" style="justify-content: center;" v-if="comments.length == 0 && setting.is_comment == 1"> <view v-if="comments.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" >
<view class="label">暂无评价信息</view> 暂无评价信息~
</view> </view>
<view class="title-c" > <view class="title-c" >
价目表 价目表
...@@ -649,6 +649,7 @@ ...@@ -649,6 +649,7 @@
let title =this.g.storeName; let title =this.g.storeName;
let imageUrl =this.g.storeCoverImg; let imageUrl =this.g.storeCoverImg;
let id = this.id; let id = this.id;
return { return {
title: title, title: title,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up, query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up,
...@@ -671,7 +672,7 @@ ...@@ -671,7 +672,7 @@
} }
return { return {
title: this.g.storeName, title: this.g.storeName,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5', path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=7',
imageUrl:this.g.storeCoverImg, imageUrl:this.g.storeCoverImg,
}; };
}, },
...@@ -871,9 +872,11 @@ ...@@ -871,9 +872,11 @@
// 1-分享,2-购买并付款 // 1-分享,2-购买并付款
this.request2( this.request2(
{ {
url: "/api/AppletUser/ShareCoupon", url: "/api/AppletStores/ShareEducationCoupon",
data: { data: {
TriggerType: 1, TriggerType: 1,
StoreId:this.id
}, },
}, },
(res) => { (res) => {
......
...@@ -330,10 +330,10 @@ ...@@ -330,10 +330,10 @@
<view class="info-item"> <view class="info-item">
<text class="info-i-l">套餐卡</text> <text class="info-i-l">套餐卡</text>
<view class="right" > <view class="right" >
<text class="content" v-if="courseList.length>0 && User_Coupon_Id==0" @click="showCourseHandler">选择套餐卡 <text class="content" v-if="courseList.length>0 && Use_Education_Id==0" @click="showCourseHandler">选择套餐卡
</text> </text>
<text class="content" v-else-if="courseList.length==0">暂无套餐卡</text> <text class="content" v-else-if="courseList.length==0">暂无套餐卡</text>
<text class="content" v-else :style="{ color: pricecolor }" @click="showCourseHandler">已优惠{{CouponMoney}}</text> <text class="content" v-else :style="{ color: pricecolor }" @click="showCourseHandler">已优惠{{goods.price*value}}</text>
<u-icon name="ellipsis" size="36" v-if="courseList.length > 0" @click="showCourseHandler"></u-icon> <u-icon name="ellipsis" size="36" v-if="courseList.length > 0" @click="showCourseHandler"></u-icon>
</view> </view>
</view> </view>
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
</view> </view>
</u-popup> </u-popup>
<packagecart v-if="courseList.length > 0 && showCourse" :list="courseList" :current="User_Coupon_Id" @close="closeCourseHandler"></packagecart> <packagecart v-if="courseList.length > 0 && showCourse" :list="courseList" :current="Use_Education_Id" @close="closeCourseHandler"></packagecart>
</view> </view>
</template> </template>
...@@ -448,14 +448,15 @@ ...@@ -448,14 +448,15 @@
OpenId: 'ow_7I5XC1-RGwwk8QANBmWKYKmOc', OpenId: 'ow_7I5XC1-RGwwk8QANBmWKYKmOc',
OrderId: '', OrderId: '',
OrderPayType: 1, OrderPayType: 1,
GoodsName: '' GoodsName: '',
successType:1,//是从线下服务跳转过去
}, },
courseList:[], courseList:[],
showCourse:false, showCourse:false,
User_Coupon_Id:0, Use_Education_Id:0,
Nosubmit:true, Nosubmit:true,
Income:0, Income:0,
CouponMoney:0, EduCationMoney:0,
}; };
}, },
...@@ -504,12 +505,12 @@ ...@@ -504,12 +505,12 @@
closeCourseHandler(e) {//套餐卡返回 closeCourseHandler(e) {//套餐卡返回
console.log(e) console.log(e)
if (e != -1) { if (e != -1) {
this.User_Coupon_Id = e; this.Use_Education_Id = e;
this.Income = 0; this.Income = 0;
this.CouponMoney = this.goods.price*this.value this.EduCationMoney = this.goods.price*this.value
// this.courseList.forEach(x=>{ // this.courseList.forEach(x=>{
// if(x.CouponId == e){ // if(x.id == e){
// this.CouponMoney = x.discount_limit // this.EduCationMoney = x.discount_limit
// } // }
// }) // })
} }
...@@ -533,7 +534,7 @@ ...@@ -533,7 +534,7 @@
this.dayList=[]; this.dayList=[];
this.timeList=[]; this.timeList=[];
this.designerList=[]; this.designerList=[];
this.User_Coupon_Id=0; this.Use_Education_Id=0;
if(this.OfflineGoods.length>0){ if(this.OfflineGoods.length>0){
this.GoodsId = this.OfflineGoods[0].id; this.GoodsId = this.OfflineGoods[0].id;
this.GetApplOGInfo() this.GetApplOGInfo()
...@@ -553,9 +554,9 @@ ...@@ -553,9 +554,9 @@
}; };
ProductList.push(obj); ProductList.push(obj);
//获取套餐卡的处理 //获取套餐卡的处理
this.User_Coupon_Id=0, this.Use_Education_Id=0,
this.Income = this.goods.price; this.Income = this.goods.price;
this.CouponMoney= 0; this.EduCationMoney= 0;
this.request2({ this.request2({
url: '/api/AppletStores/GetNoUseCouponList', url: '/api/AppletStores/GetNoUseCouponList',
...@@ -625,11 +626,12 @@ ...@@ -625,11 +626,12 @@
form.GoodsId = that.goods.id; form.GoodsId = that.goods.id;
form.StoresId = that.id; form.StoresId = that.id;
form.Mobile = that.Mobile; form.Mobile = that.Mobile;
form.Income = that.goods.price*that.value; form.Income = that.Income*that.value;
form.Remark = that.remarks; form.Remark = that.remarks;
form.User_Coupon_Id = this.User_Coupon_Id;//优惠券id form.Use_Education_Id = that.Use_Education_Id;//优惠券id
form.User_Coupon_Id = this.User_Coupon_Id;//优惠券id form.EduCationMoney = that.EduCationMoney;
form.CouponMoney = this.CouponMoney; form.User_Coupon_Id= 0;
form.CouponMoney= 0;
form.DetailList = []; form.DetailList = [];
let obj={ let obj={
GoodsId:that.goods.id, GoodsId:that.goods.id,
...@@ -647,10 +649,22 @@ ...@@ -647,10 +649,22 @@
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
that.submitOrder = false; if(form.Income>0){
that.payBtn = true; that.submitOrder = false;
that.payInfo.OrderId = res.data.OrderId; that.payBtn = true;
that.payInfo.total_price = form.Income; that.payInfo.OrderId = res.data.OrderId;
that.payInfo.total_price = form.Income;
}else{
uni.showToast({
title: '交易成功',
icon: 'none',
duration: 2000
});
setTimeout(()=>{
uni.redirectTo({ url: '/pages/reserve/personal/orderDetails?id='+res.data.OrderId})
},2000)
}
} }
else{ else{
that.$refs.uToast.show({ that.$refs.uToast.show({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment