Commit a321732b authored by youjie's avatar youjie

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents ca1876e2 171a41af
......@@ -72,6 +72,7 @@ export default {
pid:u.erpBaseInfo?u.erpBaseInfo.employeeId:u.pid,
erpBaseInfo: u.erpBaseInfo,
count: 0,
isVip:u.isVip,
customerType: 1, //直客,2-同行
directCustomerId: u.directCustomerId //直客Id
}
......
......@@ -237,6 +237,7 @@
pid:u.erpBaseInfo?u.erpBaseInfo.employeeId:u.pid,
erpBaseInfo: u.erpBaseInfo,
count: 0,
isVip:u.isVip,
customerType: 1, //直客,2-同行
directCustomerId: u.directCustomerId //直客Id
}
......@@ -291,6 +292,7 @@
b2bResult.createBy = b2bData.createBy;
b2bResult.salesBaseInfo = b2bData.salesBaseInfo;
b2bResult.groupId = b2bData.groupId;
b2bResult.isVip=b2bData.isVip;
b2bResult.contactNumber = b2bData.contactNumber;
uni.setStorageSync('b2b_user', b2bResult)
that.$emit("changeuserinfo");
......
<template>
<view class="vip-box">
<template v-if="vipInfo && vipInfo.FinishOrderCount>0 && vipInfo.FinishOrderCount<vipInfo.OrderCount">
<view class="vip-box-unactive row">
<view style="margin-top: 25rpx;" class="col">
<view class="remark row items-center">
再完成{{vipInfo.OrderCount-vipInfo.FinishOrderCount}}单即可成为VIP,享永久折扣!
<image style="width: 21rpx;height: 21rpx;margin-left: 10rpx;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638732528690203686.png"></image>
</view>
<view class="step-box row items-center">
<view class="line" :style="{width:`${(vipInfo.FinishOrderCount/vipInfo.OrderCount)*100}%`}"></view>
<view class="step-item" :class="{'active':x<vipInfo.FinishOrderCount}" v-for="x in vipInfo.OrderCount">
{{x+1}}
</view>
</view>
</view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638732528736165089.png" class="vip-logo"></image>
</view>
</template>
</view>
</template>
<script>
export default {
name:"vip",
props:{
lineId:{
type:Number
}
},
data() {
return {
user:{},
vipInfo:null,
userVipRights:{}
};
},
mounted() {
this.user = uni.getStorageSync('b2b_user')
this.user = this.user?this.user:{customerId:0},
this.getUserVipInfo()
},
methods:{
getUserVipInfo(){
const parameter = {
VipCusType:1,
CustomerId:this.user.customerId
}
// #ifdef MP-DI
parameter.VipCusType = 2
// #endif
this.apipost( "vip_post_CheckCustomerIsVip", parameter,(r) => {
this.vipInfo = r.data
const v = r.data
this.$emit('setUserOrder',v.FinishOrderCount)
if(v.FinishOrderCount == v.OrderCount){
let rule = v.RuleList.find(x=>x.LineId==this.lineId)
if(!rule) rule = v.RuleList.find(x=>x.LineId==0)
if(rule) {
this.userVipRights = rule
this.$emit('change',this.userVipRights)
}
}
})
}
}
}
</script>
<style>
@import url('../../asset/css/flex.css');
@font-face {
font-family: "dinAli";
src: url("//at.alicdn.com/wf/webfont/MQHUV6e56ce5/BFOHNMvFqM80.woff2") format("woff2");
font-display: swap;
}
.vip-box-unactive{
margin: 25rpx 0rpx;
padding:0rpx 34rpx 0rpx 34rpx;
height: 120rpx;
background: linear-gradient(90deg, #3F423F, #313131);
position: relative;
border-radius: 18rpx;
}
.vip-box-unactive .vip-logo{
right: 34rpx;
width: 87rpx;
height: 99rpx;
top: 15rpx;
position: absolute;
z-index: 4;
}
.vip-box-unactive .remark{
font-size: 24rpx;
color: #E2C27A;
line-height: 1;
margin-bottom: 16rpx;
}
.vip-box-unactive .step-box{
position: relative;
justify-content: space-between;
}
.vip-box-unactive .step-box::after,
.vip-box-unactive .step-box .line{
height: 10rpx;
background: #C99E59;
border-radius: 5rpx;
left: 0;
top: 10rpx;
position: absolute;
z-index: 2;
}
.vip-box-unactive .step-box::after{
z-index: 1;
background: #2E2E2E;
border-radius: 0;
right: 0;
content: ' ';
display: block;
}
.vip-box-unactive .step-item{
/* font-weight: 400; */
font-size: 24rpx;
color: #494949;
width: 30rpx;
height: 30rpx;
background: #2E2E2E;
border-radius: 50%;
position: relative;
z-index: 3;
text-align: center;
font-family: dinAli;
text-align: center;
line-height: 30rpx;
font-weight: bolder;
}
.vip-box-unactive .step-item.active{
background: linear-gradient(270deg, #C99E59, #FFFFB3);
color: #583F2C;
}
</style>
\ No newline at end of file
......@@ -332,6 +332,13 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path" : "aggregation/aggregation",
"style" :
{
"navigationBarTitleText" : "订单中心"
}
}
]
},
......
<template>
<view class="content">
<scroll-view :scroll-y="true" style="height: 100%; flex: 1; box-sizing: border-box">
<scroll-view :scroll-y="true" class="sign-scroll" scroll-with-animation="true" style="height: 100%; flex: 1; box-sizing: border-box" :scroll-top="scrollTop">
<view class="header">
<!-- <view class="bar"></view>
<view class="set text-gray">
<text @click="close" style="font-size:40upx;">返回</text>
<text @click="reset" style="font-size:35upx;color:#DDDDDD">清空</text>
</view> -->
<!-- <view class="in-and-out">
<view class="item" v-if="start.length > 0">
<view style="font-size:30upx;color:#C0C0C0">入住日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ startDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ startWeek }}</view>
</view>
<view class="item text" v-if="start.length == 0">
<view>入住日期</view>
</view>
<view class="item">
<view class="count-border" :class="day == 0 ? 'gray' : 'orange'">
<view class="count" style="font-size:26upx;line-height:26upx;">{{ day }}</view>
</view>
</view>
<view class="item text" v-if="end.length == 0">
<view>离店日期</view>
</view>
<view class="item" v-if="end.length > 0">
<view style="font-size:30upx;color:#C0C0C0">离店日期</view>
<view style="font-weight: bold;margin-top:10upx;font-size:36upx">{{ endDay }}</view>
<view style="font-size:24upx;margin-top:10upx">{{ endWeek }}</view>
</view>
</view> -->
<view style="
font-size: 32rpx;
color: #111;
......@@ -150,27 +123,7 @@
computed: {
//房间是否能预订
isSub() {
// if (this.priceStauts.length > 0) {
// for (var i = this.start[0]; i <= this.end[0]; i++) {
// if (i == this.start[0]) {
// for (var j = this.start[1]; j < this.date[i].length; j++) {
// if (this.priceStauts[i][j] == -1) return false
// }
// } else if (this.end[0] == this.start[0]) {
// for (var j = this.start[1]; j < this.end[1]; j++) {
// if (this.priceStauts[i][j] == -1) return false
// }
// } else if (i == this.end[0]) {
// for (var j = 0; j < this.end[1]; j++) {
// if (this.priceStauts[i][j] == -1) return false
// }
// } else {
// for (var j = 0; j < this.priceStauts[i].length; j++) {
// if (this.priceStauts[i][j] == -1) return false
// }
// }
// }
// }
return this.start.length == 2;
},
//计算日历里的节假日
......@@ -217,7 +170,9 @@
day: 0, //多少晚
priceStauts: [], //价格状态
lastNot: [0, 10], //前置的无房操作
userDefaultDate: "",
userDefaultDate: "",
scrollTop:0,
scrollHeight:0
};
},
mounted() {
......@@ -236,21 +191,23 @@
this.start = this.setDefaultDate(this.userDefaultDate);
}
this.priceStauts = this.initPrice();
// #ifdef MP-ALIPAY
uni.setNavigationBarTitle({
title: "",
});
// #endif
setTimeout(()=>{
const that =this
const query = uni.createSelectorQuery().in(this);
query.selectAll('.sign-scroll').boundingClientRect((rects) => {
that.scrollHeight = rects[0].height
that.calcDefautlOffset()
}).exec();
},200)
},
watch: {
watch: {
defaultDate(newVal) {
this.userDefaultDate = newVal;
if (this.userDefaultDate != "") {
this.start = this.setDefaultDate(this.userDefaultDate);
}
this.priceStauts = this.initPrice();
console.log(this.priceStauts)
},
//入住日期
start(newVal) {
......@@ -269,13 +226,11 @@
}
if (this.priceStauts.length > 0) {
console.log(this.lastNot);
for (var i = newVal[0]; i < this.priceStauts.length; i++) {
if (i == newVal[0]) {
for (var j = newVal[1]; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j];
console.log(this.lastNot);
return;
}
}
......@@ -283,7 +238,6 @@
for (var j = 0; j < this.priceStauts[i].length; j++) {
if (this.priceStauts[i][j] == -1) {
this.lastNot = [i, j];
console.log(this.lastNot);
return;
}
}
......@@ -294,14 +248,22 @@
}
},
},
methods: {
methods: {
calcDefautlOffset(){
const that =this
const query = uni.createSelectorQuery().in(this);
query.selectAll('.select-style').boundingClientRect((rects) => {
const top = rects[0].top-(that.scrollHeight) - 20
that.scrollTop = top>0?top:0
}).exec();
},
initPrice() {
//年份
var year = new Date().getFullYear();
let data = [];
//月份
var month = new Date().getMonth();
console.log('执行。。。。')
for (let i = 0; i < this.count; i++) {
var days = [];
var week = 0;
......@@ -562,7 +524,6 @@
//月份
var month = new Date().getMonth();
console.log("执行了...");
for (let i = 0; i < this.count; i++) {
var day = [];
var week = 0;
......@@ -618,7 +579,6 @@
};
let tempPrice = {};
this.priceList.forEach((x, i) => {
console.log(x.startDate, obj.start);
if (obj.start == x.startDate) {
obj.priceObj = i;
}
......
......@@ -345,11 +345,11 @@
'active2':msg.teamType==2}">
<headerLine></headerLine>
<view class="search-box" style="margin-top: 24rpx;">
<view class="date" @click="showBranch=true">
<view class="date" @click="showBranch=true" v-if="branchVisible">
<u-icon name="location" color="#B99846" size="24"></u-icon>
<text style="margin-left: 20rpx;color: #B99846;">{{currentBrachName}}</text>
</view>
<view style="width: 1px;height: 26rpx;margin-right: 10rpx; background: #E5E3E1;flex-shrink: 0;">
<view v-if="branchVisible" style="width: 1px;height: 26rpx;margin-right: 10rpx; background: #E5E3E1;flex-shrink: 0;">
<view style="opacity: 0;">
1
</view>
......@@ -633,6 +633,7 @@
branchList: [],
currentBrachName: "",
showBranch: false,
branchVisible:false,
optionsTitle: [
"推荐排序",
"线路玩法",
......@@ -650,6 +651,9 @@
uni.setNavigationBarTitle({
title: "精品旅游线路"
})
// #ifdef MP-DI
this.branchVisible=false
// #endif
},
onLoad(option) {
console.log("option", option);
......
This diff is collapsed.
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
......@@ -76,7 +76,7 @@
that.request2({
url: '/api/AppletUser/GetWeiXinQRCodeForApplet',
data: {
Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId+'&storeId=' + this.storeId+'&id=' + this.ID+'&JumpType=8',
Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId+'&storeId=' + this.storeId+'&id=' + this.ID+'&JumpType=8'+this.$uiConfig.DIRECT_PARAMETER,
With: that.qrcode.QrCodeSize,
}
},
......
......@@ -91,7 +91,7 @@
that.request2({
url: '/api/AppletUser/GetWeiXinQRCodeForApplet',
data: {
Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId,
Path: '/pages/index/index?user_id=' + that.UserInfo.UserId + '&SmallShopId=' + SmallShopId+this.$uiConfig.DIRECT_PARAMETER,
With: that.qrcode.QrCodeSize,
}
},
......
......@@ -74,6 +74,7 @@
</view>
</view>
</view>
</view>
</template>
......
......@@ -108,6 +108,7 @@
pid:u.erpBaseInfo?u.erpBaseInfo.employeeId:u.pid,
erpBaseInfo: u.erpBaseInfo,
count: 0,
isVip:u.isVip,
customerType: 1, //直客,2-同行
directCustomerId: u.directCustomerId //直客Id
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -27,6 +27,7 @@ export default {
Vue.prototype.host3 = "http://192.168.5.214"
//Vue.prototype.host2 = "https://erpmallapi.oytour.com"
//Vue.prototype.host3 = "https://reborn.oytour.com"
console.log(process.env)
Vue.prototype.request = function(param, success, failed) {
//网络请求
......
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