提交 af5275e1 authored 作者: 黄旭新's avatar 黄旭新

xin

...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
<!-- 未填写end --> <!-- 未填写end -->
<!-- 已填写 --> <!-- 已填写 -->
<view class="completed" v-if="isAuthenticate != 0"> <view class="unauthorized" v-if="isAuthenticate != 0">
<!-- 基本信息start --> <!-- 基本信息start -->
<view class="authentication_basic"> <view class="authentication_basic">
<view class="title_common"> <view class="title_common">
...@@ -351,12 +351,11 @@ ...@@ -351,12 +351,11 @@
<!-- 电费通知单 --> <!-- 电费通知单 -->
<view class="img_common_img"> <view class="img_common_img">
<view class="title"><text>*</text>电费通知单</view> <view class="title"><text>*</text>电费通知单</view>
<view class="uploadImg_box" @click="chooseImg(4)"> <view class="uploadImg_box">
<!-- <image v-if="electricityBill" :src="electricityBill" mode="" ></image> --> <!-- <image v-if="electricityBill" :src="electricityBill" mode="" ></image> -->
<image v-for="(item,index) in imgList" :key="index" :src="item" mode=""></image> <image v-for="(item,index) in imgList" :key="index" :src="item" mode=""></image>
<image v-if="!hide" src="../../static/images/upload_bg.png" mode=""></image> <image v-if="!hide" src="../../static/images/upload_bg.png" mode=""></image>
</view> </view>
<view class="border_bottom"></view>
</view> </view>
</view> </view>
<!-- 用电信息end --> <!-- 用电信息end -->
...@@ -1012,6 +1011,7 @@ ...@@ -1012,6 +1011,7 @@
.img_common { .img_common {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
position: relative;
padding: 32rpx; padding: 32rpx;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #f4f5f7; border-bottom: 1px solid #f4f5f7;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</view> </view>
<view class="hexian"></view> <view class="hexian"></view>
</view> </view>
<view class="myInfo_items" @click="linktoSwitchIdentity"> <view class="myInfo_items" v-if="isCreated" @click="linktoSwitchIdentity">
切换身份 切换身份
<view class="text"><text>点击切换为{{type==1?'"电客"':'"用电企业"'}}</text> <view class="text"><text>点击切换为{{type==1?'"电客"':'"用电企业"'}}</text>
<image src="../../static/images/right.png" mode=""></image> <image src="../../static/images/right.png" mode=""></image>
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
data() { data() {
return { return {
type: null, // 用户类型 type: null, // 用户类型
isCreated: false, // 只有高级,游客,电客可以拥有切换身份的功能
enterpriseId: '', //企业id enterpriseId: '', //企业id
isAuthenticate: '', isAuthenticate: '',
earningsList: [], earningsList: [],
...@@ -118,7 +119,7 @@ ...@@ -118,7 +119,7 @@
limit: 'accountManagement', limit: 'accountManagement',
url: '/pages/Account/AccountSetting' url: '/pages/Account/AccountSetting'
}, },
], ],
// 平台区域 // 平台区域
terracelist: [{ terracelist: [{
...@@ -179,6 +180,7 @@ ...@@ -179,6 +180,7 @@
roleObj = user.tenterpriseRole roleObj = user.tenterpriseRole
// console.log(roleObj) // console.log(roleObj)
if (userType == 1 || userType == 5) { if (userType == 1 || userType == 5) {
that.isCreated = true
if (creatById && roleObj) { if (creatById && roleObj) {
that.earningsList_gaoji.pop() that.earningsList_gaoji.pop()
that.earningsList = that.earningsList_gaoji.map(item => { that.earningsList = that.earningsList_gaoji.map(item => {
...@@ -219,6 +221,7 @@ ...@@ -219,6 +221,7 @@
} }
} }
} else { } else {
that.isCreated = true
that.earningsList = that.earningsList_dianke that.earningsList = that.earningsList_dianke
} }
console.log(statustext) console.log(statustext)
...@@ -235,7 +238,7 @@ ...@@ -235,7 +238,7 @@
}) })
}, },
methods: { methods: {
// 跳转页面 // 跳转页面
linkto(url) { linkto(url) {
// console.log(this.isAuthenticate) // console.log(this.isAuthenticate)
...@@ -272,15 +275,15 @@ ...@@ -272,15 +275,15 @@
}) })
}, },
// 切换身份 // 切换身份
linktoSwitchIdentity(){ linktoSwitchIdentity() {
uni.navigateTo({ uni.navigateTo({
url:'/pagesA/switchIdentity/switchIdentity' url: '/pagesA/switchIdentity/switchIdentity'
}) })
}, },
// 退出登录 // 退出登录
quit() { quit() {
let user = uni.getStorageSync('user') let user = uni.getStorageSync('user')
if(user.userType&&(user.userType == 2 ||user.userType == 3)) { if (user.userType && (user.userType == 2 || user.userType == 3)) {
// 如果是普通会员,存量企业退出登录,无法选择用户类型 // 如果是普通会员,存量企业退出登录,无法选择用户类型
let inviteType = user.userType == 2 ? 2 : 1 let inviteType = user.userType == 2 ? 2 : 1
uni.reLaunch({ uni.reLaunch({
......
...@@ -39,8 +39,19 @@ ...@@ -39,8 +39,19 @@
userId: userId, userId: userId,
packageId: packageId packageId: packageId
}).then(res => { }).then(res => {
console.log(res) if (res.code == 200) {
this.takeCompanyList = res.data let data = res.data
this.takeCompanyList = data.map(item => {
// console.log(item.certificationName)
(function(str) {
console.log(str)
item.certificationName = str.substring(0, 2) + '***有限公司'
}(item.certificationName))
item.createTime = item.createTime.substr(5, 11)
return item
})
}
}) })
}, },
} }
......
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
<view class="item_content"> <view class="item_content">
<view class="item_content_top" @click="linkToGroupInfo(item.id)"> <view class="item_content_top" @click="linkToGroupInfo(item.id)">
<view class="img"> <view class="img">
<text class="text_red" v-if="tabIndex == 2">
{{item.type == 4 ?'固定价差':'分时价差'}} <image src="https://fire.huoshitou.net/profile/icon/tcicon.png"></image>
</text>
<image src="https://fire.huoshitou.net/profile/icon/tcicon.png" mode=""></image>
</view> </view>
<view class="top_text"> <view class="top_text">
<text class="text_one"> <text class="text_one">
<text v-if="item.commissionRate" class="text_one_brokerage">佣金</text> <text v-if="type==2&&item.commissionRate" class="text_one_brokerage">佣金</text>
<text class="text_one_priceTime" v-if="item.type == 4">分时价差</text>
<text class="text_one_priceTime" v-if="item.type == 5">固定价差</text>
{{item.name}} {{item.name}}
</text> </text>
<text v-if="item.type == 1"> <text v-if="item.type == 1">
...@@ -58,8 +58,7 @@ ...@@ -58,8 +58,7 @@
<text v-if="item.intermediateProfitCeiling&&rangli&&(item.type==4||item.type==5)"> <text v-if="item.intermediateProfitCeiling&&rangli&&(item.type==4||item.type==5)">
居间让利上限: <text class="text_item">{{item.intermediateProfitCeiling}}</text> 居间让利上限: <text class="text_item">{{item.intermediateProfitCeiling}}</text>
</text> </text>
<view v-if="!item.intermediateProfitCeiling&&rangli&&(item.type==4||item.type==5)" <view v-if="!item.intermediateProfitCeiling&&rangli&&(item.type==4||item.type==5)"style="height: 38rpx;"></view>
style="height: 38rpx;"></view>
<view v-if="!rangli&&(item.type==4||item.type==5)" style="height: 38rpx;"></view> <view v-if="!rangli&&(item.type==4||item.type==5)" style="height: 38rpx;"></view>
<text style="margin-bottom: 0;">{{item.year}} <text style="margin-bottom: 0;">{{item.year}}
<text v-if="!remainder2[index]||remainder2[index] == 0" class="count">拼团已结束</text> <text v-if="!remainder2[index]||remainder2[index] == 0" class="count">拼团已结束</text>
...@@ -571,16 +570,7 @@ ...@@ -571,16 +570,7 @@
height: 110rpx; height: 110rpx;
margin-right: 32rpx; margin-right: 32rpx;
.text_red {
position: absolute;
left: 0;
top: 4rpx;
padding: 0 4rpx;
color: #ec6045;
font-size: 20rpx;
border: 2rpx solid #ec6045;
border-radius: 10rpx;
}
} }
.top_text { .top_text {
...@@ -593,15 +583,23 @@ ...@@ -593,15 +583,23 @@
font-weight: 500; font-weight: 500;
color: #333; color: #333;
.text_one_brokerage { text {
display: inline-block; display: inline-block;
padding: 0 8rpx; padding: 0 8rpx;
margin-right: 10rpx; margin-right: 10rpx;
}
.text_one_brokerage {
color: #ec6045; color: #ec6045;
border: 2rpx solid #ec6045; border: 2rpx solid #ec6045;
border-radius: 10rpx; border-radius: 10rpx;
} }
.text_one_priceTime {
color: #1989fa;
border: 2rpx solid #1989fa;
border-radius: 10rpx;
}
} }
text { text {
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<view class="groupInfo_combo_title common_title">套餐详情</view> <view class="groupInfo_combo_title common_title">套餐详情</view>
<view class="groupInfo_combo_item common_item"> <view class="groupInfo_combo_item common_item">
<view class="groupInfo_combo_item_company" @click="linktoCompanyInfo(groupDetails.userId)"> <view class="groupInfo_combo_item_company" @click="linktoElectriCompanyDetail(groupDetails.userId)">
{{groupDetails.ename}} {{groupDetails.ename}}
<image src="../../static/images/right.png"></image> <image src="../../static/images/right.png"></image>
</view> </view>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
v-if="groupDetails.intermediateProfitCeiling&&type==2&&(groupDetails.type==4||groupDetails.type==5)"> v-if="groupDetails.intermediateProfitCeiling&&type==2&&(groupDetails.type==4||groupDetails.type==5)">
居间让利上限:{{groupDetails.intermediateProfitCeiling}}</view> 居间让利上限:{{groupDetails.intermediateProfitCeiling}}</view>
<view>拼团电量上限:{{groupDetails.powerLimit}}万kWh</view> <view>拼团电量上限:{{groupDetails.powerLimit}}万kWh</view>
<view v-if="groupDetails.commissionRate">佣金:{{groupDetails.commissionRate}}% <view v-if="type==2&&groupDetails.commissionRate">佣金:{{groupDetails.commissionRate}}%
<image @click="settleShow = true" style="margin-left: 10rpx;" <image @click="settleShow = true" style="margin-left: 10rpx;"
src="../../static/images/icon_wenhao.png"></image> src="../../static/images/icon_wenhao.png"></image>
</view> </view>
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
{{remainder[0]==0?'拼团已结束':remainder[0]}} {{remainder[0]==0?'拼团已结束':remainder[0]}}
</view> </view>
<view class="btns"> <view class="btns">
<view class="shop" @click="linktoElectriCompanyDetail">进店看看</view> <view class="shop" @click="linktoElectriCompanyDetail(groupDetails.userId)">进店看看</view>
<view class="invite" @click="invitation">邀请企业</view> <view class="invite" @click="invitation">邀请企业</view>
<view v-if="isParticipated==1&&remainder[0]!=0" class="take" @click="exitGroup(groupDetails.id)">已参与 <view v-if="isParticipated==1&&remainder[0]!=0" class="take" @click="exitGroup(groupDetails.id)">已参与
</view> </view>
...@@ -427,7 +427,8 @@ ...@@ -427,7 +427,8 @@
} }
}, },
//跳往售电公司详情 //跳往售电公司详情
linktoCompanyInfo(id) { linktoElectriCompanyDetail(id) {
console.log(id)
uni.navigateTo({ uni.navigateTo({
url: '/pagesA/electriCompany/electriCompanyDetail?userId=' + id url: '/pagesA/electriCompany/electriCompanyDetail?userId=' + id
}) })
...@@ -459,7 +460,7 @@ ...@@ -459,7 +460,7 @@
type: this.type, type: this.type,
userId: this.userId userId: this.userId
}).then(res => { }).then(res => {
console.log(res) // console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.isAuthenticate = res.data.isAuthenticate this.isAuthenticate = res.data.isAuthenticate
//isAuthenticate 认证状态(0:未认证;1:认证失败;2:已认证;3:待审核) //isAuthenticate 认证状态(0:未认证;1:认证失败;2:已认证;3:待审核)
...@@ -513,17 +514,16 @@ ...@@ -513,17 +514,16 @@
userId: this.userId, userId: this.userId,
packageId: this.packageId packageId: this.packageId
}).then(res => { }).then(res => {
let data = res.data if (res.code == 200) {
console.log(data) let data = res.data
this.takeCompanyList = data.map(item => { this.takeCompanyList = data.map(item => {
// console.log(item.certificationName) (function(str) {
if (item.certificationName && item.certificationName.length > 6) { item.certificationName = str.substring(0, 2) + '***有限公司'
item.certificationName = item.certificationName.substring(0, 6) + '...' }(item.certificationName))
} item.createTime = item.createTime.substr(5, 11)
item.createTime = item.createTime.substr(5, 11) return item
return item })
}) }
this.takeCompanyList = data
}) })
}, },
// 退出拼团 // 退出拼团
...@@ -785,12 +785,6 @@ ...@@ -785,12 +785,6 @@
}) })
} }
}, },
// 进店看看
linktoElectriCompanyDetail() {
uni.navigateTo({
url: '/pagesA/electriCompany/electriCompanyDetail'
})
}
} }
} }
</script> </script>
...@@ -884,10 +878,11 @@ ...@@ -884,10 +878,11 @@
text { text {
flex: 1; flex: 1;
font-size: 24rpx;
} }
.groupInfo_cmp_item_time { .groupInfo_cmp_item_time {
font-size: 24rpx; font-size: 22rpx;
font-weight: 500; font-weight: 500;
color: #999; color: #999;
text-align: center; text-align: center;
......
...@@ -318,10 +318,11 @@ ...@@ -318,10 +318,11 @@
getAllPackageCompanies() { getAllPackageCompanies() {
get(api.allPackageCompanies).then(res => { get(api.allPackageCompanies).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.takePackgeList = res.data.map(item => { let data = res.data
if (item.enterpriseName.length > 6) { this.takePackgeList = data.map(item => {
item.enterpriseName = item.enterpriseName.slice(0, 6) + '...' (function(str) {
} item.enterpriseName = str.substring(0, 2) + '***有限公司'
}(item.enterpriseName))
return item return item
}) })
} }
...@@ -504,9 +505,9 @@ ...@@ -504,9 +505,9 @@
this.moreShow = !this.moreShow this.moreShow = !this.moreShow
}, },
// 跳往售电公司详情 // 跳往售电公司详情
linktoElectriCompany(){ linktoElectriCompany() {
uni.navigateTo({ uni.navigateTo({
url:'/pagesA/electriCompany/electriCompany' url: '/pagesA/electriCompany/electriCompany'
}) })
} }
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</view> </view>
</view> </view>
<view class="login_btn"> <view class="login_btn">
<button class="sq_button add" @click="getUserInfo">微信用户一键登录</button> <button class="sq_button add" @click="getUserInfo">微信用户一键登录</button>
<!-- <view @click="dialogShow"> <!-- <view @click="dialogShow">
微信用户一键登录 微信用户一键登录
</view> --> </view> -->
...@@ -48,43 +48,41 @@ ...@@ -48,43 +48,41 @@
export default { export default {
onLoad(options) { onLoad(options) {
uni.hideHomeButton() uni.hideHomeButton()
let that=this let that = this
console.log(options) console.log(options)
//有scene从分享海报邀请进来的 //有scene从分享海报邀请进来的
if(options.scene){ if (options.scene) {
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene // scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
let scene = decodeURIComponent(options.scene) let scene = decodeURIComponent(options.scene)
that.inviteType=scene.split('&&')[0] that.inviteType = scene.split('&&')[0]
let scene2=JSON.stringify(scene.split('&&')[1]) let scene2 = JSON.stringify(scene.split('&&')[1])
//ht=1 scene存量企业 //ht=1 scene存量企业
if(scene2.indexOf('ht=')>=0){ if (scene2.indexOf('ht=') >= 0) {
that.culiangcontractId=scene2.split('=')[1] that.culiangcontractId = scene2.split('=')[1]
uni.showToast({ uni.showToast({
title:that.culiangcontractId, title: that.culiangcontractId,
icon:'none', icon: 'none',
duration:3000 duration: 3000
}) })
}else{ } else {
that.userId=scene2 that.userId = scene2
//获取用户信息 //获取用户信息
get(api.getUserInformation,{ get(api.getUserInformation, {
type:'2', type: '2',
userId:that.userId userId: that.userId
}).then(res=>{ }).then(res => {
if(res.code==200){ if (res.code == 200) {
that.inviteCode=res.data.inviteCode that.inviteCode = res.data.inviteCode
}else{ } else {
uni.showToast({ uni.showToast({
title:res.msg, title: res.msg,
icon:'none', icon: 'none',
duration:1200 duration: 1200
}) })
} }
}) })
} }
} else {
}else{
that.inviteType = options.inviteType that.inviteType = options.inviteType
that.inviteCode = options.inviteCode that.inviteCode = options.inviteCode
} }
...@@ -101,7 +99,7 @@ ...@@ -101,7 +99,7 @@
// console.log('contractId:', this.contractId) // console.log('contractId:', this.contractId)
// console.log('inviterUserId:', this.inviterUserId) // console.log('inviterUserId:', this.inviterUserId)
// console.log('roleId:', this.roleId) // console.log('roleId:', this.roleId)
}, },
data() { data() {
return { return {
...@@ -114,7 +112,7 @@ ...@@ -114,7 +112,7 @@
type: '', //用户类型选择 type: '', //用户类型选择
openId: '', openId: '',
isCreated: true, isCreated: true,
culiangcontractId:'',//成为存量企业合同id culiangcontractId: '', //成为存量企业合同id
} }
}, },
methods: { methods: {
...@@ -133,15 +131,17 @@ ...@@ -133,15 +131,17 @@
if (that.inviterUserId) { if (that.inviterUserId) {
that.type = 1 that.type = 1
} }
if (that.inviteType==33) { if (that.inviteType == 33) {
that.type = 2 that.type = 2
} }
if (that.type) { if (that.type) {
uni.getUserProfile({ uni.getUserProfile({
desc: '用于完善会员资料', desc: '用于完善会员资料',
success:(resData)=>{ success: (resData) => {
// console.log(resData) // console.log(resData)
uni.setStorageSync('userInfo', resData.userInfo) // uni.setStorageSync('userInfo', resData.userInfo)
let nickName = resData.userInfo.nickName
let avatar = resData.userInfo.avatarUrl
// 登录 // 登录
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
success(result) { success(result) {
// console.log(result) // console.log(result)
let code = result.code let code = result.code
let nickName = uni.getStorageSync('userInfo').nickName // let nickName = uni.getStorageSync('userInfo').nickName
let avatar = uni.getStorageSync('userInfo').avatarUrl // let avatar = uni.getStorageSync('userInfo').avatarUrl
get(api.login, { get(api.login, {
type: that.type, type: that.type,
inviterUserId: that.inviterUserId, inviterUserId: that.inviterUserId,
...@@ -163,8 +163,8 @@ ...@@ -163,8 +163,8 @@
// console.log(res) // console.log(res)
if (res.code == 200) { if (res.code == 200) {
let openId = res.data.user.openId let openId = res.data.user.openId
that.openId = uni.getStorageSync('openId') // that.openId = uni.getStorageSync('openId')
uni.setStorageSync('openId', openId) // uni.setStorageSync('openId', openId)
uni.setStorageSync('type', that.type, ) uni.setStorageSync('type', that.type, )
uni.setStorageSync('user', res.data.user) uni.setStorageSync('user', res.data.user)
let flag = res.data.sign let flag = res.data.sign
...@@ -176,12 +176,17 @@ ...@@ -176,12 +176,17 @@
uni.hideLoading() uni.hideLoading()
} else { } else {
if (that.inviteType) { if (that.inviteType) {
let url='/pages/register/register?inviteType='+that.inviteType+'&inviteCode='+that.inviteCode let url =
'/pages/register/register?inviteType=' +
that.inviteType + '&inviteCode=' + that
.inviteCode
if (that.contractId) { if (that.contractId) {
url = url + '&contractId=' + that.contractId url = url + '&contractId=' + that
.contractId
} }
if(that.culiangcontractId){ if (that.culiangcontractId) {
url = url + '&culiangcontractId=' + that.culiangcontractId url = url + '&culiangcontractId=' +
that.culiangcontractId
} }
uni.reLaunch({ uni.reLaunch({
url: url url: url
......
差异被折叠。
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
let arr = that.companys.filter(item => { let arr = that.companys.filter(item => {
return item.eName == that.companyValue return item.eName == that.companyValue
}) })
console.log(arr) // console.log(arr)
that.userId = arr[0].userId that.userId = arr[0].userId
that.electricity = res.data.electricity that.electricity = res.data.electricity
that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/') that.contractStartTime = res.data.contractStartTime.replace(new RegExp('-', 'g'), '/')
...@@ -178,7 +178,6 @@ ...@@ -178,7 +178,6 @@
that.imgList = affix that.imgList = affix
} }
}) })
} }
}) })
}, },
...@@ -389,7 +388,7 @@ ...@@ -389,7 +388,7 @@
return '请选择合同的开始时间' return '请选择合同的开始时间'
} else if (this.contractEndTime == '') { } else if (this.contractEndTime == '') {
return '请选择合同的结束时间' return '请选择合同的结束时间'
} else if (this.onTemplate && this.pdFurl == '' && this.imgList.length == 0) { } else if (this.onTemplate&&this.pdFurl==''&&this.imgList.length==0) {
return '请上传合同附件' return '请上传合同附件'
} else { } else {
return false return false
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
</view> </view>
<view class="electriCompanyDetail_top_info"> <view class="electriCompanyDetail_top_info">
<text>{{companydata.eName}}</text> <text>{{companydata.eName}}</text>
<text style="font-size: 24rpx; color: #666;">已有{{companydata.enterpriseCount!=null?companydata.enterpriseCount:'0'}}家企业签订合同</text> <text
style="font-size: 24rpx; color: #666;">已有{{companydata.enterpriseCount!=null?companydata.enterpriseCount:'0'}}家企业签订合同</text>
</view> </view>
</view> </view>
<!-- 售电公司详情标题end --> <!-- 售电公司详情标题end -->
...@@ -30,23 +31,23 @@ ...@@ -30,23 +31,23 @@
</view> </view>
<view class="top_text"> <view class="top_text">
<text class="text_one">{{item.name}}</text> <text class="text_one">{{item.name}}</text>
<text v-if="item.type == 1"> <text v-if="item.type == 1">
最高月竞分成比例:<text class="text_item">{{item.maxShareRatio}}%</text> 最高月竞分成比例:<text class="text_item">{{item.maxShareRatio}}%</text>
</text> </text>
<text v-if="item.type == 2"> <text v-if="item.type == 2">
最高保底价差: <text class="text_item">{{item.maxGuaranteedSpread}}</text> 最高保底价差: <text class="text_item">{{item.maxGuaranteedSpread}}</text>
</text> </text>
<view v-if="item.type == 3" style="height: 38rpx;"></view> <view v-if="item.type == 3" style="height: 38rpx;"></view>
<text v-if="rangli&&(item.type==4||item.type==5)"> <text v-if="rangli&&(item.type==4||item.type==5)">
居间让利上限: <text class="text_item">{{item.intermediateProfitCeiling}}</text> 居间让利上限: <text class="text_item">{{item.intermediateProfitCeiling}}</text>
</text> </text>
<view v-if="!rangli&&(item.type==4||item.type==5)" style="height: 38rpx;"></view> <view v-if="!rangli&&(item.type==4||item.type==5)" style="height: 38rpx;"></view>
<text style="margin-bottom: 0;">{{item.year}} <text style="margin-bottom: 0;">{{item.year}}
<text v-if="!remainder3[index]||remainder3[index] == 0" <text v-if="!remainder3[index]||remainder3[index] == 0"
class="count">拼团已结束</text> class="count">拼团已结束</text>
<text v-else <text v-else
class="count">结束倒计时:{{remainder3[index]?remainder3[index]:''}}</text> class="count">结束倒计时:{{remainder3[index]?remainder3[index]:''}}</text>
</text> </text>
<!-- <text style="margin-bottom: 0;">{{item.year}} <!-- <text style="margin-bottom: 0;">{{item.year}}
<text class="count">结束倒计时:00:00:00</text> <text class="count">结束倒计时:00:00:00</text>
</text> --> </text> -->
...@@ -151,22 +152,22 @@ ...@@ -151,22 +152,22 @@
export default { export default {
data() { data() {
return { return {
companydata:'', companydata: '',
userId:'',//公司id userId: '', //公司id
eName:'',//公司名字 eName: '', //公司名字
Count:'',//签订合同数量 Count: '', //签订合同数量
tabIndex: 1, // tab栏索引 tabIndex: 1, // tab栏索引
moreIndex: null, // 展开索引 moreIndex: null, // 展开索引
moreShow: false, // 显示更多 moreShow: false, // 显示更多
setmealList: [], setmealList: [],
Companytimer:'',//定时器 Companytimer: '', //定时器
remainder3:'', remainder3: '',
} }
}, },
onLoad(options) { onLoad(options) {
let that=this let that = this
if(options){ if (options) {
that.userId=options.userId that.userId = options.userId
that.companyPackageList(that.userId) that.companyPackageList(that.userId)
that.companyProfile(that.userId) that.companyProfile(that.userId)
} }
...@@ -174,20 +175,21 @@ ...@@ -174,20 +175,21 @@
methods: { methods: {
// tab栏切换 // tab栏切换
tabClick(i) { tabClick(i) {
let that=this let that = this
this.tabIndex = i this.tabIndex = i
}, },
//查询售电公司拼团套餐 //查询售电公司拼团套餐
companyPackageList(userId){ companyPackageList(userId) {
let that=this let that = this
get(api.companyPackageList,{ get(api.companyPackageList, {
userId:userId userId: userId
}).then(res=>{ }).then(res => {
if(res.code==200){ if (res.code == 200) {
that.setmealList=res.data that.setmealList = res.data
let arr = [] let arr = []
let arrTime = [] let arrTime = []
res.data.map(item => { res.data.map(item => {
console.log(item.packageEndTime)
let time = item.packageEndTime.replace('T', ' ').replace('.000+0800', '') let time = item.packageEndTime.replace('T', ' ').replace('.000+0800', '')
.replace(/-/g, '/') .replace(/-/g, '/')
// let time = '2021/02/03 10:00:00' // let time = '2021/02/03 10:00:00'
...@@ -205,26 +207,26 @@ ...@@ -205,26 +207,26 @@
}) })
that.$forceUpdate() that.$forceUpdate()
}, 1000) }, 1000)
}else{ } else {
uni.showToast({ uni.showToast({
title:res.msg, title: res.msg,
icon:'none' icon: 'none'
}) })
} }
}) })
}, },
//查询公司简介 //查询公司简介
companyProfile(userId){ companyProfile(userId) {
let that=this let that = this
get(api.companyProfile,{ get(api.companyProfile, {
userId:userId userId: userId
}).then(res=>{ }).then(res => {
if(res.code==200){ if (res.code == 200) {
that.companydata=res.data that.companydata = res.data
}else{ } else {
uni.showToast({ uni.showToast({
title:res.msg, title: res.msg,
icon:'none' icon: 'none'
}) })
} }
}) })
...@@ -251,9 +253,9 @@ ...@@ -251,9 +253,9 @@
// } // }
}, },
// 独立询价 // 独立询价
linktoInquiry(){ linktoInquiry() {
uni.navigateTo({ uni.navigateTo({
url:'/pagesA/enquiry/Demand?eName='+this.companydata.eName url: '/pagesA/enquiry/Demand?eName=' + this.companydata.eName
}) })
} }
} }
...@@ -264,17 +266,18 @@ ...@@ -264,17 +266,18 @@
.electriCompanyDetail { .electriCompanyDetail {
position: relative; position: relative;
padding: 0 32rpx; padding: 0 32rpx;
padding-top: 32rpx;
width: 100%; width: 100%;
height: 100%; height: 100%;
.electriCompanyDetail_info{ .electriCompanyDetail_info {
padding-bottom: 200rpx; padding-bottom: 200rpx;
} }
// 售电公司头部 // 售电公司头部
.electriCompanyDetail_top { .electriCompanyDetail_top {
display: flex; display: flex;
margin: 32rpx 0; margin-bottom: 32rpx;
.electriCompanyDetail_top_img { .electriCompanyDetail_top_img {
margin-right: 32rpx; margin-right: 32rpx;
...@@ -309,12 +312,10 @@ ...@@ -309,12 +312,10 @@
// 售电公司套餐 // 售电公司套餐
.group_list_scroll { .group_list_scroll {
height: calc(100vh - 175rpx); height: calc(100vh - 380rpx);
// 拼团列表 // 拼团列表
.group_list { .group_list {
margin-bottom: 120rpx;
.group_list_item { .group_list_item {
padding-bottom: 16rpx; padding-bottom: 16rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
...@@ -471,6 +472,7 @@ ...@@ -471,6 +472,7 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.electriCompanyDetail_inquiry_btn { .electriCompanyDetail_inquiry_btn {
width: 686rpx; width: 686rpx;
height: 100rpx; height: 100rpx;
......
差异被折叠。
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<!-- 切换身份 --> <!-- 切换身份 -->
<view class="switchIdentity"> <view class="switchIdentity">
<view class="switchIdentity_img"> <view class="switchIdentity_img">
<image src="../../static/images/index/banner.jpg" mode=""></image> <image src="../../static/images/switch.png" mode="widthFix"></image>
</view> </view>
<view class="switchIdentity_hint"> <view class="switchIdentity_hint">
你当前的身份是{{type==1?'"用电企业"':'"电客"'}} 你当前的身份是{{type==1?'"用电企业"':'"电客"'}}
</view> </view>
<view class="switchIdentity_btns"> <view class="switchIdentity_btns">
<view class="switch" @click="switchIdentity">切换为{{type==1?'"电客"':'"用电企业"'}}身份</view> <button class="switch" @click="switchIdentity" type="default">切换为{{type==1?'"电客"':'"用电企业"'}}身份</button>
<view class="back" @click="linkBack">返回</view> <view class="back" @click="linkBack">返回</view>
</view> </view>
</view> </view>
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<script> <script>
import { import {
get, post,
post get
} from '@/static/util/fun.js' } from '../../static/util/fun.js'
import api from '@/static/util/api.js' import api from '../../static/util/api.js'
export default { export default {
created() { created() {
this.type = uni.getStorageSync('type') this.type = uni.getStorageSync('type')
...@@ -38,18 +38,66 @@ ...@@ -38,18 +38,66 @@
methods: { methods: {
// 切换身份 // 切换身份
switchIdentity() { switchIdentity() {
let params = { uni.removeStorageSync('user')
uni.removeStorageSync('type')
uni.showLoading({
title: '切换中'
})
get(api.switchIdentit, {
type: this.type, type: this.type,
userId: this.userId userId: this.userId
} }).then(res => {
get(api.switchIdentit, params).then(res => { if (res.data.registered) {
console.log(res) let type = this.type == 1 ? 2 : 1
if (res.code == 200) { uni.setStorageSync('user', res.data.user)
uni.setStorageSync('type', type)
uni.reLaunch({
url: '/pages/index/index'
})
uin.hideLoading()
} }
}) })
// uni.getUserProfile({
// desc: '用于完善会员资料',
// success: (resData) => {
// uni.setStorageSync('userInfo', resData.userInfo)
// // 登录
// uni.showLoading({
// title: '加载中'
// })
// uni.login({
// success: result => {
// let type = this.type == 1 ? 2 : 1
// let code = result.code
// let nickName = uni.getStorageSync('userInfo').nickName
// let avatar = uni.getStorageSync('userInfo').avatarUrl
// get(api.login, {
// type: type,
// inviterUserId: '',
// roleId: '',
// code: code,
// nickName: nickName,
// avatar: avatar
// }).then(res => {
// if (res.code == 200) {
// uni.setStorageSync('type', type, )
// uni.setStorageSync('openId', res.data.user.openId)
// uni.setStorageSync('user', res.data.user)
// let flag = res.data.sign
// if (flag) {
// // that.WebSocket()
// uni.setStorageSync('user', res.data.user)
// uni.reLaunch({
// url: '/pages/index/index'
// })
// uni.hideLoading()
// }
// }
// })
// }
// })
// }
// })
}, },
// 返回上一页 // 返回上一页
linkBack() { linkBack() {
...@@ -57,6 +105,7 @@ ...@@ -57,6 +105,7 @@
delta: 1 delta: 1
}) })
} }
} }
} }
...@@ -71,14 +120,13 @@ ...@@ -71,14 +120,13 @@
.switchIdentity_img { .switchIdentity_img {
padding: 32rpx; padding: 32rpx;
height: 368rpx;
} }
.switchIdentity_hint { .switchIdentity_hint {
margin-top: 60rpx;
text-align: center; text-align: center;
font-size: 34rpx; font-size: 34rpx;
color: #000000 font-weight: bold;
color: #333333;
} }
.switchIdentity_btns { .switchIdentity_btns {
...@@ -87,24 +135,21 @@ ...@@ -87,24 +135,21 @@
bottom: 32rpx; bottom: 32rpx;
width: 100%; width: 100%;
view { .switch,
.back {
margin-left: 32rpx; margin-left: 32rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
width: 686rpx; width: 686rpx;
height: 80rpx; height: 100rpx;
line-height: 80rpx; line-height: 100rpx;
text-align: center; text-align: center;
font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
background-color: #ccc;
}
.switch {
background-color: #1989fa; background-color: #1989fa;
} }
.back { .back {
color: #000000; background-color: #3caff6;
} }
} }
} }
......
...@@ -150,5 +150,5 @@ erp.electricitySalesCompanies = HOST + 'common/electricitySalesCompanies' // 入 ...@@ -150,5 +150,5 @@ erp.electricitySalesCompanies = HOST + 'common/electricitySalesCompanies' // 入
erp.companyProfile = HOST + 'common/companyProfile' // 入驻公司公司简介 erp.companyProfile = HOST + 'common/companyProfile' // 入驻公司公司简介
erp.companyPackageList = HOST + 'common/companyPackageList' // 售电公司详情---拼团套餐 erp.companyPackageList = HOST + 'common/companyPackageList' // 售电公司详情---拼团套餐
erp.verifiedBefore = HOST + 'enterprise/verifiedBefore' // 企业认证提交前校验接口 erp.verifiedBefore = HOST + 'enterprise/verifiedBefore' // 企业认证提交前校验接口
erp.switchIdentit = HOST + 'common/switchIdentit' // 身份切换 erp.switchIdentit = HOST + 'common/switchIdentity' // 身份切换
export default erp; export default erp;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论