Browse Source

commit -m 采美豆

zhengjinyi 4 years ago
parent
commit
5d8d3824c8

+ 4 - 3
components/cm-module/activity/activityBean.vue

@@ -1,4 +1,4 @@
-<template>
+ <template>
 	<view>
 	<view>
 		<view class="tui-alert-class tui-alert-box" :class="[show?'tui-alert-show':'tui-alert-hide']"  @touchmove.stop.prevent="discard">
 		<view class="tui-alert-class tui-alert-box" :class="[show?'tui-alert-show':'tui-alert-hide']"  @touchmove.stop.prevent="discard">
 			<view class="tui-alert-content" :style="{'background-image': 'url('+bgImagePath+')'}">
 			<view class="tui-alert-content" :style="{'background-image': 'url('+bgImagePath+')'}">
@@ -49,7 +49,7 @@
 				type: String,
 				type: String,
 				default: ""
 				default: ""
 			},
 			},
-			beanType:{//根据类型设置背景图片:1注册机构,2升级会员机构,3普通机构修改资料,4会员机构修改资料,5下单成功,6线上支付成功,7确认收货成功
+			beansType:{//根据类型设置背景图片:1注册机构,2升级会员机构,3普通机构修改资料,4会员机构修改资料,5下单成功,6线上支付成功,7确认收货成功
 				type: Number,
 				type: Number,
 				default: 1
 				default: 1
 			},
 			},
@@ -64,10 +64,11 @@
 			}
 			}
 		},
 		},
 		created() {
 		created() {
-			this.handInitType(this.beanType)
+			this.handInitType(this.beansType)
 		},
 		},
 		methods: {
 		methods: {
 			handInitType(type){
 			handInitType(type){
+				console.log('type================》',type)
 				this.bgImagePath = `https://static.caimei365.com/app/img/icon/bean-icon-${type}@2x.png`
 				this.bgImagePath = `https://static.caimei365.com/app/img/icon/bean-icon-${type}@2x.png`
 				console.log(this.bgImagePath)
 				console.log(this.bgImagePath)
 			},
 			},

+ 0 - 155
components/cm-module/modelAlert/upgradeAlert.vue

@@ -1,155 +0,0 @@
-<template name="alert">
-	<view class="alert spec" :class="specClass">
-		<!-- 运费弹窗说明 -->
-		<view class="freight-alert"  @click.stop="unBindUpgrade">
-			<view class="content clearfix">
-				<view class="title"><text class="iconfont icon-iconfontguanbi" @click.stop="unBindUpgrade"></text></view>
-				<view class="text-content">
-					<view class="text-h1">您目前为<text class="col">普通机构用户</text></view>
-					<view class="text-h1">可以升级<text class="col">会员机构</text>享受更多更好的服务</view>
-				</view>
-				<view class="text-btn">
-					<view class="btn" @click.stop="GoApply">去升级</view>
-					<view class="btn-none" @click.stop="unBindUpgrade">暂不升级</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		name:'alert',
-		props:{
-			clubStatus:{
-				type:Number
-			}
-		},
-		data() {
-			return{
-				status:""
-			}
-		},
-		created() {
-			this.status = this.clubStatus
-		},
-		onLoad(){
-			
-		},
-		methods:{
-			GoApply(){
-				this.$emit('GoApply')
-			},
-			unBindUpgrade(){
-				this.$emit('unBindUpgrade')
-			}
-		},
-		onShow(){
-	
-		}
-	}
-</script>
-
-<style lang="scss">
-	/*弹窗*/
-	.model-warp.none{
-		display: none;
-	}
-	.model-warp.show{
-		display: block;
-	}
-	.freight-alert{
-		width: 100%;
-		height: 100%;
-		background: rgba(0,0,0,.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 8888;
-		transition: all 0.4s;
-		&.none{
-			display: none;			
-		}
-		&.show{
-			display: block;
-		}
-		.content{
-			width: 492rpx;
-			height: 710rpx;
-			position: absolute;
-			background: url(https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9BSAERyCAAG9lz_TNN0938.png) no-repeat;
-			background-size: contain;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			top: 0;
-			margin: auto;
-			padding:0 24rpx 20rpx 24rpx;
-			border-radius: 12rpx;
-			.title{
-				width: 100%;
-				height: 68rpx;
-				line-height: 68rpx;
-				text-align: center;
-				position: relative;
-				.icon-iconfontguanbi{
-					width: 50rpx;
-					height: 50rpx;
-					text-align: center;
-					line-height: 50rpx;
-					border-radius: 50%;
-					border: 1px solid #FFFFFF;
-					position: absolute;
-					right: -20rpx;
-					top: 0;
-					font-size: $font-size-32;
-					color: #FFFFFF;
-				}
-			}
-			.text-content{
-				width: 100%;
-				height: auto;
-				margin-top: 280rpx;
-				.text-h1{
-					line-height: 60rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: justify;
-					.col{
-						color: $color-system;
-						margin: 0 6rpx;
-					}
-				}
-			}
-			.text-btn{
-				width: 100%;
-				height: auto;
-				margin-top: 40rpx;
-				.btn{
-					width: 100%;
-					height: 88rpx;
-					float: left;
-					background: $btn-confirm;
-					line-height: 88rpx;
-					font-size: $font-size-28;
-					text-align: center;
-					color: #FFFFFF;
-					border-radius: 44rpx;
-					padding: 0;
-				}
-				.btn-none{
-					width: 100%;
-					height: 88rpx;
-					float: left;
-					line-height: 88rpx;
-					font-size: $font-size-28;
-					text-align: center;
-					color: #666666;
-					padding: 0;
-					margin-top: 20rpx;
-				}
-			}
-		}
-	}
-	
-</style>

+ 0 - 1
components/cm-module/pageTemplate/templateA.vue

@@ -153,7 +153,6 @@
 			...mapState(['hasLogin','userInfo','isActivity'])
 			...mapState(['hasLogin','userInfo','isActivity'])
 		},
 		},
 		created(){
 		created(){
-			console.log(this.userIdentity)
 			this.initData(this.pageData)
 			this.initData(this.pageData)
 		},
 		},
 		watch: {
 		watch: {

+ 2 - 0
main.js

@@ -62,6 +62,8 @@ Vue.prototype.$store = store
 Vue.prototype.$util = {msg,prePage,modal}
 Vue.prototype.$util = {msg,prePage,modal}
 Vue.prototype.$api = Api
 Vue.prototype.$api = Api
 Vue.prototype.$reg = Regs
 Vue.prototype.$reg = Regs
+Vue.prototype.$Static = 'https://static.caimei365.com/app/img/'
+
 
 
 App.mpType = 'app'
 App.mpType = 'app'
 
 

+ 2 - 6
pages/login/apply.vue

@@ -199,11 +199,7 @@
 		<!-- 提交审核提示弹窗 -->
 		<!-- 提交审核提示弹窗 -->
 		<view class="tui-alert-box" v-if="isConfirmShow">
 		<view class="tui-alert-box" v-if="isConfirmShow">
 			<view class="tui-alert-content">
 			<view class="tui-alert-content">
-				<view class="tui-alert-main">
-					升级信息提交成功,审核通过后您的身份将
-					成为会员机构,并且获得<text class="red">100</text>
-					采美豆的奖励
-				</view>
+				<view class="tui-alert-main">升级信息提交成功,审核通过后您的身份将成为会员机构,并且获得<text class="red">100</text>采美豆的奖励</view>
 				<view class="tui-alert-btn" @click="handleClick">知道了</view>
 				<view class="tui-alert-btn" @click="handleClick">知道了</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -243,7 +239,7 @@
 				isDisabled:true,
 				isDisabled:true,
 				isShowInput:true,
 				isShowInput:true,
 				textareaFocus:false,
 				textareaFocus:false,
-				businessLicense:'',	//营业执照图片
+				businessLicense:'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1306508493,2006189766&fm=26&gp=0.jpg',	//营业执照图片
 				shopPhoto:'',  	//门头照图片
 				shopPhoto:'',  	//门头照图片
 				medicalPracticeLicense:'', 	//资质照图片
 				medicalPracticeLicense:'', 	//资质照图片
 				department:'',			//科室
 				department:'',			//科室

+ 3 - 1
pages/login/information.vue

@@ -137,7 +137,7 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="register-row clearfix" v-show="isDepartment">
+			<view class="register-row clearfix" v-show="firstClubType == 1 && isDepartment">
 				<view class="register-from bordernone" >
 				<view class="register-from bordernone" >
 					<view class="kes-title" >科室</view>
 					<view class="kes-title" >科室</view>
 					<textarea class="keshi"  placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="department" maxlength="16"></textarea>
 					<textarea class="keshi"  placeholder="请填写经营的科室,至少三个,用逗号隔开" placeholder-style="placeholder" v-model="department" maxlength="16"></textarea>
@@ -364,7 +364,9 @@
 						this.addressData.address =  organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
 						this.addressData.address =  organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
 						this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
 						this.businessLicense = this.$reg.checkData(organizationClub.businessLicense)
 						this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
 						this.medicalPracticeLicense = this.$reg.checkData(organizationClub.medicalPracticeLicense)
+						this.medicalPracticeLicense = 'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1306508493,2006189766&fm=26&gp=0.jpg'
 						this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
 						this.shopPhoto = this.$reg.checkData(organizationClub.shopPhoto)
+						this.shopPhoto = 'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1306508493,2006189766&fm=26&gp=0.jpg'
 						this.department = organizationClub.department						
 						this.department = organizationClub.department						
 						this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
 						this.clubTelePhone = this.$reg.checkData(organizationClub.contractPhone)
 						this.clubFax = this.$reg.checkData(organizationClub.fax)
 						this.clubFax = this.$reg.checkData(organizationClub.fax)

+ 1 - 1
pages/login/register.vue

@@ -190,7 +190,7 @@
 				this.UserService.UserRegisterClub(params).then(response =>{
 				this.UserService.UserRegisterClub(params).then(response =>{
 					wxLogin.wxLoginAuthorize()
 					wxLogin.wxLoginAuthorize()
 					setTimeout(() =>{
 					setTimeout(() =>{
-						this.$api.switchTabTo('/pages/tabBar/user/user')
+						this.$api.switchTabTo('/pages/tabBar/user/user?beanType=1')
 					},2000)
 					},2000)
 				}).catch(error =>{
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000);
 					this.$util.msg(error.msg,2000);

+ 2 - 4
pages/service/organagree.vue

@@ -13,19 +13,17 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
-				type: ''
+				
 			}
 			}
 		},
 		},
 		onLoad(){
 		onLoad(){
-			this.type = 'afterSale';
 			this.initData();
 			this.initData();
 		},
 		},
 		methods:{
 		methods:{
 			initData(){
 			initData(){
-				let self = this;
 				this.OtherService.QueryClubProtocol({helpPageID:1036}).then(response =>{
 				this.OtherService.QueryClubProtocol({helpPageID:1036}).then(response =>{
 					let data =response.data.content
 					let data =response.data.content
-					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+					this.$refs.childTemplate.html = this.$api.adaptRichTextImg(data);
 				}).catch(error =>{
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})

+ 2 - 4
pages/service/privacyagree.vue

@@ -13,19 +13,17 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
-				type: ''
+				
 			}
 			}
 		},
 		},
 		onLoad(){
 		onLoad(){
-			this.type = 'afterSale';
 			this.initData();
 			this.initData();
 		},
 		},
 		methods:{
 		methods:{
 			initData(){
 			initData(){
-				let self = this;
 				this.OtherService.QueryClubProtocol({helpPageID:1013}).then(response =>{
 				this.OtherService.QueryClubProtocol({helpPageID:1013}).then(response =>{
 					let data =response.data.content
 					let data =response.data.content
-					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+					this.$refs.childTemplate.html = this.$api.adaptRichTextImg(data);
 				}).catch(error =>{
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})

+ 2 - 4
pages/service/supplieragree.vue

@@ -13,19 +13,17 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
-				type: ''
+				
 			}
 			}
 		},
 		},
 		onLoad(){
 		onLoad(){
-			this.type = 'afterSale';
 			this.initData();
 			this.initData();
 		},
 		},
 		methods:{
 		methods:{
 			initData(){
 			initData(){
-				let self = this;
 				this.OtherService.QueryClubProtocol({helpPageID:1035}).then(response =>{
 				this.OtherService.QueryClubProtocol({helpPageID:1035}).then(response =>{
 					let data =response.data.content
 					let data =response.data.content
-					self.$refs.childTemplate.html = self.$api.adaptRichTextImg(data);
+					this.$refs.childTemplate.html = this.$api.adaptRichTextImg(data);
 				}).catch(error =>{
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})

+ 14 - 2
pages/tabBar/home/index.vue

@@ -21,7 +21,7 @@
 		<!-- 活动弹窗 -->
 		<!-- 活动弹窗 -->
 		<!-- <activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert> -->
 		<!-- <activityAlert :show="isActivity" @click="handleClick" @cancel="handleCancelClick"></activityAlert> -->
 		<!-- 采美豆提示弹窗 -->
 		<!-- 采美豆提示弹窗 -->
-		<activityBean :show="isActivityBean" :beanType="2" @cancel="handleBeanlClick"></activityBean>
+		<activityBean v-if="isActivityBean" :show="isActivityBean" :beansType="beansType" @cancel="handleBeanlClick" ></activityBean>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -78,7 +78,9 @@
 				isRequest:false,
 				isRequest:false,
 				isNavRequest:false,
 				isNavRequest:false,
 				isLiveRequest:false,
 				isLiveRequest:false,
-				isActivityBean:true,
+				isActivityBean:false,
+				beansType:1,
+				beanNumber:50,
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
@@ -111,6 +113,7 @@
 					}else if(response.data.userIdentity === 3){
 					}else if(response.data.userIdentity === 3){
 						this.$api.redirectTo('/supplier/pages/index/index')
 						this.$api.redirectTo('/supplier/pages/index/index')
 					}
 					}
+					this.GetInitBeansInfo()
 					this.getHomeInformation()
 					this.getHomeInformation()
 				})
 				})
 				.catch(error =>{
 				.catch(error =>{
@@ -149,6 +152,15 @@
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})
 			},
 			},
+			GetInitBeansInfo(){//初始化采美豆信息
+				this.UserService.GetHomeObtainBeans({userId:this.userID}).then(response =>{
+					this.beansType = response.data.beansType
+					this.beanNumber = response.data.num
+					this.isActivityBean = true
+				}).catch(error =>{
+					console.log('用户暂无采美豆推送~')
+				})
+			},
 			getHomeInformation(){//初始化首页数据	
 			getHomeInformation(){//初始化首页数据	
 				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
 				this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
 					let data = res.data;
 					let data = res.data;

+ 34 - 39
pages/tabBar/user/user.vue

@@ -46,7 +46,7 @@
 								<view class="main-account-text">账户余额</view>
 								<view class="main-account-text">账户余额</view>
 							</view>
 							</view>
 							<view class="main-account-ri-view" @click="navigator('/pages/user/account/account-bean')">
 							<view class="main-account-ri-view" @click="navigator('/pages/user/account/account-bean')">
-								<view class="main-account-icon">{{ userMoney }}</view>
+								<view class="main-account-icon">{{ userBeans }}</view>
 								<view class="main-account-text">采美豆</view>
 								<view class="main-account-text">采美豆</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -148,7 +148,7 @@
 						<text class="cell-icon"><text class="iconfont" :class="item.icon"></text></text>
 						<text class="cell-icon"><text class="iconfont" :class="item.icon"></text></text>
 						<text class="cell-tit">
 						<text class="cell-tit">
 							{{item.name}}
 							{{item.name}}
-							<text class="cell-tips" v-if="index == 2 && isPerfect">采美豆</text>
+							<text class="cell-tips" v-if="index == 2 && isModify">采美豆</text>
 						</text>
 						</text>
 						<text class="cell-more iconfont icon-xiayibu"></text>
 						<text class="cell-more iconfont icon-xiayibu"></text>
 					</view>
 					</view>
@@ -172,15 +172,12 @@
 				</view>	
 				</view>	
 			</view>
 			</view>
 		</view>	
 		</view>	
-		<!-- 普通机构升级弹窗 -->
-		<upgrade-alert v-if="isUpgradeAlert" :clubStatus="clubStatus" @unBindUpgrade="hanldUnBindUpgrade" @GoApply="hanldGoApply"></upgrade-alert>
 		<!-- 采美豆提示弹窗 -->
 		<!-- 采美豆提示弹窗 -->
-		<activityBean :show="isActivityBean" :beanType="beanType"  @cancel="handleBeanlClick"></activityBean>
+		<activityBean v-if="isActivityBean" :show="isActivityBean" :beansType="beansType" :beanNumber="beanNumber"  @cancel="handleBeanlClick"></activityBean>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
-	import upgradeAlert from '@/components/cm-module/modelAlert/upgradeAlert.vue'
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
 	import activityBean from '@/components/cm-module/activity/activityBean.vue'
 	import authorize from '@/common/config/authorize.js'
 	import authorize from '@/common/config/authorize.js'
 	import { mapState,mapMutations } from 'vuex'
 	import { mapState,mapMutations } from 'vuex'
@@ -189,7 +186,6 @@
 	export default{
 	export default{
 		components: {
 		components: {
 			uniBadge,
 			uniBadge,
-			upgradeAlert,
 			activityBean
 			activityBean
 		},
 		},
 		data() {
 		data() {
@@ -205,15 +201,16 @@
 				},
 				},
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				StatusBar: this.StatusBar,
 				StatusBar: this.StatusBar,
-				beanType:1,
-				isPerfect:true,
-				isActivityBean:true,
+				beanNumber:50,
+				beansType:0,
+				isModify:false,
+				isActivityBean:false,
 				isCmcustom:false,
 				isCmcustom:false,
-				isUpgradeAlert:false,
 				bgImgUrl:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z_i6ASHobAAhl69yz3SM078.png',
 				bgImgUrl:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z_i6ASHobAAhl69yz3SM078.png',
 				name:'',
 				name:'',
 				userType:"",
 				userType:"",
 				headpic:'',
 				headpic:'',
+				userBeans:0,
 				userMoney:'0.00',
 				userMoney:'0.00',
 				contactNumber:'',
 				contactNumber:'',
 				openid:'',
 				openid:'',
@@ -235,7 +232,7 @@
 				]
 				]
 			}
 			}
 		},
 		},
-		onLoad(){
+		onLoad(option){
 			
 			
 		},
 		},
 		computed: {
 		computed: {
@@ -247,47 +244,55 @@
 				this.UserService.PersonalInfo({userID:this.userID}).then(response =>{
 				this.UserService.PersonalInfo({userID:this.userID}).then(response =>{
 					this.$store.commit('updateAllNum',response.data.count)
 					this.$store.commit('updateAllNum',response.data.count)
 					let data =response.data
 					let data =response.data
-					let $userData = data.user
-					let $clubData = data.club
-					if($userData.ableUserMoney == 0 || $userData.ableUserMoney ==null){
+					let _userData = data.user
+					let _clubData = data.club
+					if(_userData.ableUserMoney == 0 || _userData.ableUserMoney ==null){
 						this.userMoney = '0.00';
 						this.userMoney = '0.00';
 					}else{
 					}else{
-						let i =  $userData.ableUserMoney.toString().lastIndexOf('.');
+						let i =  _userData.ableUserMoney.toString().lastIndexOf('.');
 						let money;
 						let money;
 						if(i==-1){
 						if(i==-1){
-							money = this.$api.FormatMoney($userData.ableUserMoney); //会所剩余余额
+							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money +'.00'
 							this.userMoney = money +'.00'
 						}else{
 						}else{
-							money = this.$api.FormatMoney($userData.ableUserMoney); //会所剩余余额
+							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
 							this.userMoney = money
 							this.userMoney = money
 						}
 						}
 					}
 					}
-					this.userIdentity = $userData.userIdentity //机构等级
+					this.userIdentity = _userData.userIdentity //机构等级
 					if(this.userIdentity == 2){
 					if(this.userIdentity == 2){
-						this.name = $clubData.name //会员机构名称
+						this.name = _clubData.name //会员机构名称
 						this.userType = '会员机构'
 						this.userType = '会员机构'
 					}else{
 					}else{
-						this.name = $userData.userName //普通机构名称
+						this.name = _userData.userName //普通机构名称
 						this.userType = '普通机构'
 						this.userType = '普通机构'
 					}		
 					}		
-					if($userData.guideFlag == 0){
-						this.isUpgradeAlert = true
-					}
-					this.headpic = $userData.image //会所头像
-					this.bindMobile = $userData.bindMobile//登录手机号
-					this.clubStatus = $userData.clubStatus //机构审核状态
+					this.userBeans =_userData.userBeans//采美豆数量
+					this.headpic = _userData.image //会所头像
+					this.bindMobile = _userData.bindMobile//登录手机号
+					this.clubStatus = _userData.clubStatus //机构审核状态
+					this.isModify =  data.isModify
 					this.contactNumber = data.organize.contactNumber //联系电话		
 					this.contactNumber = data.organize.contactNumber //联系电话		
 					this.confirmedCount = this.showBadge(data.confirmedCount)//待确认
 					this.confirmedCount = this.showBadge(data.confirmedCount)//待确认
 					this.paymentCount = this.showBadge(data.paymentCount)//待付款
 					this.paymentCount = this.showBadge(data.paymentCount)//待付款
 					this.waitShipmentsCount = this.showBadge(data.waitShipmentsCount)//待收货		
 					this.waitShipmentsCount = this.showBadge(data.waitShipmentsCount)//待收货		
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.shipmentsCount = this.showBadge(data.shipmentsCount)//已发货	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
 					this.salesReturnCount = this.showBadge(data.salesReturnCount)//退货/款	
-					let clubInfo ={name:this.name,image:this.headpic,userId:$userData.userID}
+					let clubInfo ={name:this.name,image:this.headpic,userId:_userData.userID}
 					uni.setStorage({key: 'clubInfo',data: clubInfo}) 
 					uni.setStorage({key: 'clubInfo',data: clubInfo}) 
 				}).catch(error =>{
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})
 			},
 			},
+			GetInitBeansInfo(){//初始化采美豆信息
+				this.UserService.GetHomeObtainBeans({userId:this.userID}).then(response =>{
+					this.beansType = response.data.beansType
+					this.beanNumber = response.data.num
+					this.isActivityBean = true
+				}).catch(error =>{
+					console.log('用户暂无采美豆推送~')
+				})
+			},
 			getPhone(){
 			getPhone(){
 				this.CommonService.QueryAfterSale().then(response =>{
 				this.CommonService.QueryAfterSale().then(response =>{
 					this.contactNumber = response.data.contactNumber
 					this.contactNumber = response.data.contactNumber
@@ -300,17 +305,6 @@
 				    phoneNumber:this.contactNumber //仅为示例
 				    phoneNumber:this.contactNumber //仅为示例
 				});
 				});
 			},
 			},
-			hanldUnBindUpgrade(){//普通用户不升级会员机构
-				this.UserService.CancelPrompt({ userId:this.userID}).then(response =>{
-					this.isUpgradeAlert = false
-				})
-			},
-			hanldGoApply(){//操作升级会员机构弹窗
-				this.UserService.CancelPrompt({ userId:this.userID}).then(response =>{
-					this.isUpgradeAlert = false
-					this.$api.navigateTo(`/pages/login/apply?clubStatus=${this.clubStatus}`);
-				})
-			},
 			handleBeanlClick(){//关闭采美豆弹窗
 			handleBeanlClick(){//关闭采美豆弹窗
 				this.isActivityBean = false
 				this.isActivityBean = false
 			},
 			},
@@ -388,6 +382,7 @@
 				this.$api.getComStorage('userInfo').then((resolve) =>{
 				this.$api.getComStorage('userInfo').then((resolve) =>{
 					this.userID = resolve.userId ? resolve.userId : 0
 					this.userID = resolve.userId ? resolve.userId : 0
 					this.getUserInfo()
 					this.getUserInfo()
+					this.GetInitBeansInfo()
 				}).catch(reject =>{
 				}).catch(reject =>{
 					console.log('异常处理=========>',reject)
 					console.log('异常处理=========>',reject)
 				})
 				})

+ 93 - 111
pages/user/account/account-bean.vue

@@ -5,7 +5,7 @@
 			<view class="h-account" :style="{paddingTop:CustomBar+'px',backgroundImage: 'url('+account_bg+')'}">
 			<view class="h-account" :style="{paddingTop:CustomBar+'px',backgroundImage: 'url('+account_bg+')'}">
 				<view class="m-account">
 				<view class="m-account">
 					<view class="m-m money">
 					<view class="m-m money">
-						<text class="m-t b">{{showIndexOfMoney}}</text>
+						<text class="m-t b">{{ userBeans }}</text>
 					</view>
 					</view>
 					<view class="m-m title">
 					<view class="m-m title">
 						<text class="m-p">可用数量</text>
 						<text class="m-p">可用数量</text>
@@ -33,21 +33,21 @@
 		<scroll-view class="h-swiper-content"  scroll-y :style="{paddingTop:CustomBar+234+'px'}">	
 		<scroll-view class="h-swiper-content"  scroll-y :style="{paddingTop:CustomBar+234+'px'}">	
 			<!-- 空白页 -->
 			<!-- 空白页 -->
 			<view v-if="isEmpty" class="empty-account">
 			<view v-if="isEmpty" class="empty-account">
-				<image class="empty-account-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6ADg5RAABQ9EmRCGk830.png" mode="aspectFit"></image>
+				<image class="empty-account-image" :src="StaticUrl+'icon/icon-empty-account.png'" mode="aspectFit"></image>
 				<text class="error-text">{{errorText}}</text>
 				<text class="error-text">{{errorText}}</text>
 			</view>
 			</view>
 			<!-- 余额明细列表 -->
 			<!-- 余额明细列表 -->
 			<view v-else class="list-account">
 			<view v-else class="list-account">
-				<view v-for="(item,index) in accountList" :key="index" class="list-item">
+				<view v-for="(item,index) in beansList" :key="index" class="list-item">
 					<view class="list-t">
 					<view class="list-t">
-						<view class="t-t">{{cheakType(item.balanceType)}}</view>
+						<view class="t-t">{{ item.beansType | BeansStatusFilter }}</view>
 						<view class="t-t bold" :style="{color:item.type == '1' ? '#ff2a2a' : '#15C47A'}">
 						<view class="t-t bold" :style="{color:item.type == '1' ? '#ff2a2a' : '#15C47A'}">
-							<text class="txt">{{item.type =='1'? '+' : '-'}}</text>
-							<text class="txt">¥{{item.amount}}</text>
+							<text class="txt">{{item.type == 1 ? '+' : '-'}}</text>
+							<text class="txt">¥{{item.num}}</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="list-b">
 					<view class="list-b">
-						<view class="t-t">{{item.addDate}}</view>
+						<view class="t-t">{{item.addTime}}</view>
 						<view class="t-t">{{item.type =='1'? '收入' : '支出'}}</view>
 						<view class="t-t">{{item.type =='1'? '收入' : '支出'}}</view>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -76,6 +76,7 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
+				StaticUrl:this.$Static,
 				nvabarData: {		//顶部自定义导航
 				nvabarData: {		//顶部自定义导航
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
 					showSearch: 0,
@@ -87,18 +88,18 @@
 				account_bg:'https://img.caimei365.com/group1/M00/03/D0/Cmis21-PpUqAbubBAADf1kTyhjs098.png',
 				account_bg:'https://img.caimei365.com/group1/M00/03/D0/Cmis21-PpUqAbubBAADf1kTyhjs098.png',
 				isIphoneX:this.$store.state.isIphoneX,
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				CustomBar:this.CustomBar,// 顶部导航栏高度
-				year: date.getFullYear(),					//年
-				month: date.getMonth()+1,					//月
-				userID: '',		 							//用户ID
-				pageNum:1,    								//页数
-				pageSize:10,   								//加载条
-				balanceType: '', 							//查询余额类型
-				showIndexOfMoney:20000,
-				ableUserMoney:58656.65,		//可用余额
-				balanceTypeText:'',			//根据类型显示文字
+				listQuery:{
+					year: date.getFullYear(),					//年
+					month: date.getMonth()+1,					//月
+					userId: '',		 							//用户ID
+					pageNum:1,    								//页
+					pageSize:10,   								//加载条数
+					type: 0, 							//查询余额类型
+				},
+				userBeans:0,
 				tabCurrentIndex: 0,			//标签选择索引
 				tabCurrentIndex: 0,			//标签选择索引
 				infoData: {selected: []}, 		//日期选择
 				infoData: {selected: []}, 		//日期选择
-				accountList: [],			//余额列表
+				beansList: [],			//余额列表
 				isShowAccounExp:false,		//控制明细说明文字显示
 				isShowAccounExp:false,		//控制明细说明文字显示
 				isRefreshing:false,
 				isRefreshing:false,
 				isNomore:false,
 				isNomore:false,
@@ -115,86 +116,84 @@
 					{state: 2,text: '支出'},
 					{state: 2,text: '支出'},
 				],
 				],
 				isCheckObject:{
 				isCheckObject:{
-					0:['','本月没有任何余额收支记录'],
-					1:[1, '本月没有余额收入记录!'],
-					2:[2, '本月没有余额支出记录!'],
+					0:['','本月没有采美豆收支记录'],
+					1:[1, '本月没有采美豆收入记录!'],
+					2:[2, '本月没有采美豆支出记录!'],
 				},
 				},
 			}
 			}
 		},
 		},
 		onLoad() {
 		onLoad() {
-			this.getAccountInitData(this.tabCurrentIndex,this.year,this.month)
+			this.$api.getStorage().then((resolve) =>{
+				 this.listQuery.userId =resolve.userId ? resolve.userId : 0
+				 this.GetAccountInitData()
+			})
+		},
+		filters: {
+			BeansStatusFilter: function(state){
+				let stateText = ''
+				let	stateTextObject={
+						1:'注册机构',
+						2:'升级会员机构',
+						3:'普通机构完善资料',
+						4:'会员机构完善资料',
+						5:'下单',
+						6:'线上支付订单',
+						7:'确认收货',
+						8:'系统发放',
+						9:'抵用退回',
+						10:'抵用运费',
+						11:'退款回收'
+					};
+				Object.keys(stateTextObject).forEach(function(key){
+					if(key == state){
+						stateText = stateTextObject[key]
+					}
+				});
+				return stateText;
+},
 		},
 		},
 		methods: {
 		methods: {
-			getAccountInitData(index,year,month){//获取余额明细数据列表
+			GetAccountInitData(index){//获取余额明细数据列表
 				Object.keys(this.isCheckObject).forEach(key => {
 				Object.keys(this.isCheckObject).forEach(key => {
 					 if (+key === +index) {
 					 if (+key === +index) {
-						this.balanceType = this.isCheckObject[key][0]
+						this.listQuery.type = this.isCheckObject[key][0]
 						this.errorText = this.isCheckObject[key][1]
 						this.errorText = this.isCheckObject[key][1]
 					 }
 					 }
 				})
 				})
-				this.$api.getStorage().then((resolve) =>{
-					 this.userID =resolve.userId ? resolve.userId : 0
-					 /**
-					  * @余额明细初始化加载  仅加载第一页码
-					  * @param:type(查询余额类型:0全部,1收入,2支出)
-					  * @param:year(查询年份)
-					  * @param:month(查询月份)
-					  * @param:index(页码数)
-					  * @param:pageSize(每页条数)
-					  * @param:userId(用户ID)
-					  */ 
-					this.UserService.GetAccountInfo(
-						{
-							year:year,
-							month:month,
-							userId:this.userID,
-							pageNum:1,
-							pageSize:this.pageSize,
-							 type:this.balanceType,
-						})
-						.then(response =>{
-						let infoData = response.data
-						this.initAbleUserMoney(infoData.ableUserMoney)
-						let resultsData = infoData.pageDate.results
-						this.hasNextPage =  infoData.pageDate.hasNextPage;
-						if(resultsData && resultsData.length > 0){
-							this.isEmpty = false;
-							this.accountList = [...resultsData];
+				this.UserService.GetUserClubBeansList(this.listQuery).then(response =>{
+					let data = response.data
+					let list = data.pageInfo.list
+					this.userBeans = data.userBeans
+					this.hasNextPage =  data.pageInfo.hasNextPage;
+					if(list && list.length > 0){
+						this.isEmpty = false;
+						this.beansList = [...list];
+					}else{
+						this.isEmpty = true
+					}
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						if(this.beansList.length < 10){
+							this.pullUpOn = true
 						}else{
 						}else{
-							this.isEmpty = true
-						}
-						if(this.hasNextPage){
 							this.pullUpOn = false
 							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						}else{
-							if(this.accountList.length < 2){
-								this.pullUpOn = true
-							}else{
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
+							this.nomoreText = '已至底部'
 						}
 						}
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
-					})
-				})	
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
 			},	
 			},	
-			getOnReachBottomData(index,year,month){//上拉加载
-				this.UserService.GetAccountInfo(
-					{
-						year:year,
-						month:month,
-						userId:this.userID,
-						pageNum:this.pageNum+=1,
-						pageSize:this.pageSize,
-						type:this.balanceType,
-					})
-					.then(response =>{
-					let infoData = response.data
-					this.initAbleUserMoney(infoData.ableUserMoney)
-					let resultsData = infoData.pageDate.results
-					this.hasNextPage =  infoData.pageDate.hasNextPage;
-					this.accountList = this.accountList.concat(resultsData)
+			GetOnReachBottomData(index){//上拉加载
+				this.listQuery.pageNum += 1
+				this.UserService.GetUserClubBeansList(this.listQuery).then(response =>{
+					let data = response.data
+					let list = data.pageInfo.list
+					this.userBeans = data.userBeans
+					this.hasNextPage =  data.pageInfo.hasNextPage;
+					this.beansList = this.beansList.concat(list)
 					this.pullFlag = false;// 防上拉暴滑
 					this.pullFlag = false;// 防上拉暴滑
 					setTimeout(()=>{this.pullFlag = true;},500)
 					setTimeout(()=>{this.pullFlag = true;},500)
 					if(this.hasNextPage){
 					if(this.hasNextPage){
@@ -209,36 +208,18 @@
 					this.$util.msg(error.msg,2000)
 					this.$util.msg(error.msg,2000)
 				})
 				})
 			},
 			},
-			initAbleUserMoney(money){//拆分金额并转千分位格式显示
-				if(money == 0){
-					this.showIndexOfMoney ='0';
-					this.smallMoney=".00"
-				}else{
-					this.ableUserMoney = this.$api.FormatMoney(money) ;
-					let i =  this.ableUserMoney.toString().lastIndexOf('.');
-					if(i==-1){
-						this.showIndexOfMoney=this.$api.FormatMoney( this.ableUserMoney)
-						this.smallMoney=".00"
-					}else{
-						this.smallMoney = this.ableUserMoney.toString().substring(i);
-						this.showIndexOfMoney= this.$api.FormatMoney(this.ableUserMoney.toString().substring(0,i))
-					}
-				}
-			},
 			tabClick(index){//tab点击
 			tabClick(index){//tab点击
 				this.tabCurrentIndex = index;
 				this.tabCurrentIndex = index;
+				this.listQuery.type = index;
 				this.pageNum = 1
 				this.pageNum = 1
-				this.accountList = []
+				this.beansList = []
 				this.pullUpOn = true //隐藏
 				this.pullUpOn = true //隐藏
-				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month);
+				this.GetAccountInitData();
 			},			
 			},			
-			bindDateChange: function(e) {
-				this.date = e.target.value
-			},
 			monthSwitch(e) {
 			monthSwitch(e) {
-				this.year = e.year;
-				this.month = e.month;
-				this.getAccountInitData(this.tabCurrentIndex,this.year,this.month);
+				this.listQuery.year = e.year;
+				this.listQuery.month = e.month;
+				this.GetAccountInitData();
 			},
 			},
 			cheakType(type){
 			cheakType(type){
 				let typeTextHtml,
 				let typeTextHtml,
@@ -276,15 +257,16 @@
 			if(this.hasNextPage){
 			if(this.hasNextPage){
 				this.loadding = true
 				this.loadding = true
 				this.pullUpOn = true
 				this.pullUpOn = true
-				this.getOnReachBottomData(this.tabCurrentIndex,this.year,this.month)
+				this.GetOnReachBottomData()
 			}	
 			}	
 		},
 		},
 		onPullDownRefresh() {//下拉刷新
 		onPullDownRefresh() {//下拉刷新
-			this.getAccountInitData(this.tabCurrentIndex,this.year,this.month)
+			this.listQuery.pageNum = 1;
+			this.GetAccountInitData()
 			uni.stopPullDownRefresh()
 			uni.stopPullDownRefresh()
 		},
 		},
 		onShow() {
 		onShow() {
-			// this.accountList = []
+			// this.beansList = []
 		}
 		}
 	}
 	}
 </script>
 </script>
@@ -570,8 +552,8 @@ page, .container{
 	background: $bg-color;
 	background: $bg-color;
 	min-height: 800rpx;
 	min-height: 800rpx;
 	&-image {
 	&-image {
-		width: 160rpx;
-		height: 158rpx;
+		width: 260rpx;
+		height: 260rpx;
 	}
 	}
 	.error-text{
 	.error-text{
 		font-size: $font-size-28;
 		font-size: $font-size-28;

+ 4 - 3
pages/user/account/account.vue

@@ -35,7 +35,7 @@
 		<scroll-view class="h-swiper-content"  scroll-y :style="{paddingTop:CustomBar+234+'px'}">	
 		<scroll-view class="h-swiper-content"  scroll-y :style="{paddingTop:CustomBar+234+'px'}">	
 			<!-- 空白页 -->
 			<!-- 空白页 -->
 			<view v-if="isEmpty" class="empty-account">
 			<view v-if="isEmpty" class="empty-account">
-				<image class="empty-account-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6ADg5RAABQ9EmRCGk830.png" mode="aspectFit"></image>
+				<image class="empty-account-image" :src="StaticUrl+'icon/icon-empty-account.png'" mode="aspectFit"></image>
 				<text class="error-text">{{errorText}}</text>
 				<text class="error-text">{{errorText}}</text>
 			</view>
 			</view>
 			<!-- 余额明细列表 -->
 			<!-- 余额明细列表 -->
@@ -78,6 +78,7 @@
 		},
 		},
 		data() {
 		data() {
 			return{
 			return{
+				StaticUrl:this.$Static,
 				nvabarData: {		//顶部自定义导航
 				nvabarData: {		//顶部自定义导航
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
 					showSearch: 0,
@@ -573,8 +574,8 @@ page, .container{
 	background: $bg-color;
 	background: $bg-color;
 	min-height: 800rpx;
 	min-height: 800rpx;
 	&-image {
 	&-image {
-		width: 160rpx;
-		height: 158rpx;
+		width: 260rpx;
+		height: 260rpx;
 	}
 	}
 	.error-text{
 	.error-text{
 		font-size: $font-size-28;
 		font-size: $font-size-28;

+ 2 - 2
services/ajax.env.js

@@ -2,10 +2,10 @@ let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // 开发环境
 	// URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
 	// URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
-	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.81:8008'
 	// URL_CONFIG = 'http://192.168.2.81:8008'
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'
 	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
 }else{
     // 生产环境
     // 生产环境

+ 2 - 2
services/config.env.js

@@ -2,8 +2,8 @@ let URL_CONFIG = ''
 if(process.env.NODE_ENV === 'development'){
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
     // 开发环境
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //超超联调地址
-	// URL_CONFIG = 'http://192.168.2.67:18002'	 //裴裴联调地址
-	URL_CONFIG = 'https://core-b.caimei365.com'
+	URL_CONFIG = 'http://192.168.2.67:18002'	 //裴裴联调地址
+	// URL_CONFIG = 'https://core-b.caimei365.com'
 	// URL_CONFIG = 'https://core.caimei365.com'
 	// URL_CONFIG = 'https://core.caimei365.com'
 }else{
 }else{
     // 生产环境
     // 生产环境

+ 29 - 0
services/user.service.js

@@ -303,4 +303,33 @@ export default class UserService {
 			isHost:true
 			isHost:true
 		})
 		})
 	}
 	}
+	/**
+	 *@获取采美豆状态 删除操作
+	 *@userId userId
+	 */
+	GetHomeObtainBeans (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/club/obtain/beans', 
+			data, 
+			isLoading: false,
+			isHost:true
+		})
+	}
+	/**
+	 *@机构采美豆收支明细 
+	 *@param userId	机构用户userId
+	 *@param year 年份
+	 *@param month 月份
+	 *@param type 收支类型:全部0  1收入  2支出
+	 *@param pageNum 页码
+	 *@param pageSize 条数
+	 */
+	GetUserClubBeansList (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/club/beans/history', 
+			data, 
+			isLoading: false,
+			isHost:true
+		})
+	}
 }
 }