Commit a6fd2b64 authored by 罗超's avatar 罗超

完成详情页面的VIP绑定

parent 728cbc7d
......@@ -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" : "订单中心"
}
}
]
},
......
......@@ -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