Browse Source

机构用户类型优化

zhengjinyi 5 years ago
parent
commit
651b508dff

+ 14 - 1
api/use.js

@@ -6,7 +6,20 @@
  */
 import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
-
+/**
+ *游客入驻咨询
+ */
+export function quickConsultation(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/club/advisory',params,false, res => {
+			if(res.code == 0 ){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
 /**
  *机构普通注册
  */

+ 14 - 0
api/utils.js

@@ -79,6 +79,20 @@ export function getMobileCode(params) {
 		})
 	});
 }
+/**
+ *注册专用获取验证码
+ */
+export function getRegisterMobileCode(params) {
+	return new Promise(function(resolve,reject) {
+		request.get("/club/captcha",params, res => {
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
 /**
  *会所资料修改手机号
  *旧手机号获取验证码

+ 1 - 0
common/config/config.js

@@ -4,6 +4,7 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.26:8008'	 //超超联调地址
     URL_CONFIG = 'https://spi-b.caimei365.com'//采美测试地址
+	 // URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 5 - 1
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_d70s0ku7d2e.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_uvnf5k2lnc.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,6 +13,10 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
+.icon-kefunv:before {
+  content: "\e672";
+}
+
 .icon-xiangshangjiantou:before {
   content: "\e661";
 }

+ 0 - 5
components/cm-module/listTemplate/buyagainList.vue

@@ -9,11 +9,6 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit}}</text>
 						<text class="list-details-miniQuantity">起订量:{{item.ladderPriceFlag == '1' ? item.maxBuyNumber : item.minBuyNumber}}</text>
- 					<!--<view class="list-details-price" v-if="item.price1TextFlag == 1">
-							<view class="list-none">
-								<view class="price-small">未公开价格</view>
-							</view>
-						</view> -->
 						<view class="list-details-price">
 							<view class="list-shop">
 								<view class="list-price" >

+ 5 - 2
components/cm-module/listTemplate/commodityList.vue

@@ -14,10 +14,13 @@
 								<text>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
 							</view>	
 							<view v-if="userIdentity == 4">
-								<view class="price-larger" v-if="item.price1TextFlag == '1' || item.price1TextFlag == '2'">
+								<view class="price-larger" v-if="item.price1TextFlag == '1'">
 									<text class="txt">未公开价格</text>
 								</view>
-								<text v-else>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
+								<view class="price-larger" v-if="item.price1TextFlag == '2'">
+									<text class="txt">价格仅会员可见</text>
+								</view>
+								<text v-if="item.price1TextFlag == '0'">¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
 							</view>
 							<view v-if="userIdentity == 2">
 								<view class="price-larger" v-if="item.price1TextFlag == '1'">

+ 7 - 10
components/cm-module/listTemplate/immediatelyList.vue

@@ -5,10 +5,12 @@
 				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
 				<input class="input" 
 					   type="text" 
+					   focus
 					   confirm-type="search" 
 					   v-model="searchInputVal" 
 					   placeholder="请输入商品关键词" 
 					   @input="onShowClose" 
+					   @confirm="searchOpertor"
 					   maxlength="20"/>
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
 			</view>
@@ -29,11 +31,6 @@
 						<text class="list-details-title">{{item.name}}</text>
 						<text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
 						<text class="list-details-miniQuantity">起订量:{{item.minBuyNumber}}</text>
- 					<!--<view class="list-details-price" v-if="item.price1TextFlag == 1">
-							<view class="list-none">
-								<view class="price-small">未公开价格</view>
-							</view>
-						</view>-->	
 						<view class="list-details-price">
 							<view class="list-shop">
 								<view class="list-price" >
@@ -93,7 +90,7 @@
 				isModallayer:false,
 				windowHeight: '',
 				showSkeleton: false,
-				isShowEmpty: true,
+				isShowEmpty: false,
 				isShowEmptyText: '搜索相关商品',
 				clubUserId: '',
 				scrollHeight: '',
@@ -186,11 +183,11 @@
 			searchOpertor(){//搜索商品
 				if(this.searchInputVal == ''){
 					this.$util.msg('请输入商品关键词',2000)
-					return
+				}else{
+					this.pageNum = 1
+					this.showSkeleton = true;
+					this.getProductAgainInfo();
 				}
-				this.pageNum = 1
-				this.showSkeleton = true;
-				this.getProductAgainInfo();
 			},
 			operationHanld(prop){
 				this.$emit('operationConfim',prop)

+ 13 - 9
components/cm-module/productDetails/cm-price.vue

@@ -5,7 +5,7 @@
 			<view class="wrap-main-price">
 				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
 					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+						<image class="icon-active" :src="iconActive" mode="" ></image>
 					</view>
 					<view class="p-price tui-skeleton-fillet">
 						<text class="txt sm">¥</text>
@@ -35,19 +35,19 @@
 			</view>	
 		</view>
 		<view class="" v-if="userIdentity == 4">
-			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 1">
+			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == '1'">
 				<text>未公开价格</text>
 			</view>
-			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == 2">
-				<text>未公开价格</text>
+			<view class="wrap-main-pricenone" v-if="product.price1TextFlag == '2'">
+				<text>价格仅会员可见</text>
 			</view>
-			<view class="wrap-main-none" v-if="product.price1TextFlag == 2" @click.stop="goUpgradeApply">
+			<view class="wrap-main-none" v-if="product.price1TextFlag == '2'" @click.stop="goUpgradeApply">
 				<text>上传营业执照升级为会员机构即可查看价格 >></text>
 			</view>
-			<view class="wrap-main-price" v-else>
+			<view class="wrap-main-price" v-if="product.price1TextFlag == '0'">
 				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
 					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+						<image class="icon-active" :src="iconActive" mode="" ></image>
 					</view>
 					<view class="p-price tui-skeleton-fillet">
 						<text class="txt sm">¥</text>
@@ -83,7 +83,7 @@
 			<view class="wrap-main-price" v-else>
 				<view class="p-main" v-if="product.ladderPriceFlag == '0' || product.actStatus == 1">
 					<view class="p-active" v-if="product.actStatus == 1">
-						<image class="icon-active" src="../../static/temp/icon-active.png" mode="" ></image>
+						<image class="icon-active" :src="iconActive" mode="" ></image>
 					</view>
 					<view class="p-price tui-skeleton-fillet">
 						<text class="txt sm">¥</text>
@@ -116,6 +116,7 @@
 </template>
 
 <script>
+	import iconActive from '@/static/temp/icon-active.png'
 	export default{
 		name:'cm-price',
 		props:{
@@ -146,13 +147,16 @@
 		},
 		data() {
 			return{
-				
+				iconActive:iconActive
 			}
 		},
 		created() {
 			
 		},
 		methods:{
+			goUpgradeApply(){
+				this.$api.navigateTo('/pages/login/apply')
+			}
 		},
 		
 	}

+ 5 - 0
pages.json

@@ -168,6 +168,11 @@
 				"navigationBarTitleText": "注册",
 				"navigationStyle":"custom"
 			}
+		},{
+			"path": "pages/login/consult",
+			"style": {
+				"navigationBarTitleText": "入驻咨询"
+			}
 		},{
 			"path": "pages/login/apply",
 			"style": {

+ 7 - 9
pages/goods/product.vue

@@ -52,7 +52,7 @@
 						</view>
 					</view>
 					<view class="attributes">
-						<cm-attributes v-if="isRequest":product="product" :goodsData="goodsData" />
+						<cm-attributes v-if="isRequest" :product="product" :goodsData="goodsData" />
 					</view>
 				</view>			
 			</view>
@@ -286,6 +286,7 @@
 						this.buyRetailPrice = this.product.retailPrice;
 					}
 					//处理下架商品和售罄商品
+
 					if(this.product.validFlag =='3' || this.stock == 0 ){
 						this.disabled = true
 						this.isNoneDisabled = true
@@ -298,16 +299,16 @@
 						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
 						this.goodsData.disabledText = ''
 					}
-					if(this.userIdentity == 4){
-						if(this.product.price1TextFlag == "2"){
+					if(this.product.price1TextFlag == "1"){
+						this.disabled = true
+					}
+					if(this.product.price1TextFlag == "2"){
+						if(this.userIdentity == 4){	
 							this.disabled = true
 						}else{
 							this.disabled = false
 						}
 					}
-					if(this.product.price1TextFlag == "1"){
-						this.disabled = true
-					}
 					this.goodsData.disabled = this.disabled
 					this.goodsData.isNoneDisabled = this.isNoneDisabled
 					if(this.product.validFlag =='3'){
@@ -465,9 +466,6 @@
 					}
 				})	
 			},
-			goUpgradeApply(){
-				this.$api.navigateTo('/pages/login/apply')
-			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();

+ 141 - 0
pages/login/consult.vue

@@ -0,0 +1,141 @@
+
+<template>
+	<view class="container consult">
+		<view class="consult-main">
+			<text class="main-text">注:若暂不方便入驻机构或无法入驻,您可以留下您的姓名和联系方式,采美工作人员会第一时间联系您</text>
+		</view>
+		<view class="consult-input">
+			<input type="text"  v-model="userName"  maxlength="6" class="input" placeholder="姓名"/>
+		</view>
+		<view class="consult-input">
+			<input type="number"  v-model="mobile"  maxlength="11" class="input" placeholder="手机号"/>
+		</view>
+		<view class="consult-btn"  @click="goconsult">提交</view>
+	</view>
+</template>
+
+<script>
+	import {mapState,mapMutations } from 'vuex';
+	import authorize from '@/common/config/authorize.js' 
+	import { quickConsultation  } from '@/api/use.js'
+	export default{
+		data() {
+			return{
+				userName:'',
+				mobile:''
+			}
+		},
+		onLoad(option) {
+			
+		},
+		methods:{
+			goconsult(){
+				if( this.userName == ''){
+					this.$util.msg('请输入姓名',2000);
+					return
+				}
+				if( this.mobile == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.mobile)){
+					this.$util.msg('手机号格式不正确',2000);
+					return
+				}
+				quickConsultation({name:this.userName,mobile:this.mobile}).then(response=>{
+					this.$util.modal('提交成功','您的信息已提交成功,采美工作人员会第一时间联系您','确定','',false,() =>{
+						this.$api.switchTabTo('/pages/tabBar/home/home')
+					})
+				}).catch(error=>{
+					this.$util.msg(error.msg,2000);
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.consult{
+		width: 100%;
+		height: auto;
+		.consult-main{
+			width: 100%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			height: auto;
+			padding: 260rpx 0 60rpx 0;
+			.main-text{
+				width: 654rpx;
+				display: block;
+				font-size: $font-size-28;
+				color: #999999;
+			}
+		}
+		.consult-input{
+			width: 654rpx;
+			height: 40rpx;
+			padding: 24rpx;
+			margin: 0 auto;
+			margin-bottom: 60rpx;
+			background: #F7F7F7;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			.input{
+				width: 100%;
+				height: 100%;
+				background: #F7F7F7;
+				font-size: $font-size-28;
+				line-height: 40rpx;
+				color: #333333;
+				border-radius: 14rpx;
+			}
+		}
+		.consult-btn{
+			width: 702rpx;
+			height: 88rpx;
+			border-radius: 14rpx;
+			font-size: $font-size-28;
+			line-height: 88rpx;
+			color: #FFFFFF;
+			margin: 0 auto;
+			text-align: center;
+			background: $btn-confirm;
+			margin-top: 80rpx;
+		}
+		.model-authorization{
+			width: 100%;
+			height: 100%;
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 999;
+			.authorization{
+				width: 518rpx;
+				height: 320rpx;
+				position: absolute;
+				background: rgba(255,255,255,.7);
+				left: 0;
+				right: 0;
+				bottom: 0;
+				top: 0;
+				margin: auto;
+				.to-btn{
+					position: absolute;
+					top: 0;
+					left: 0;
+					right: 0;
+					bottom: 0;
+					margin: auto;
+					width: 70%;
+					height: 88rpx;
+					font-size: $font-size-28;
+					line-height: 88rpx;
+					color: #FFFFFF;
+					text-align: center;
+					border-radius: 44rpx;
+				}
+			}
+		}
+	}
+</style>

+ 40 - 35
pages/login/register.vue

@@ -9,29 +9,13 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">联系人:</view>
-					<input class="row-input" type="text" name="input" v-model="userName" placeholder="请输入联系姓名" maxlength="6"/>
+					<input class="row-input" type="text" name="input" v-model="userName" placeholder="请输入机构联系姓名" maxlength="6"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">手机号:</view>
-					<input class="row-input" type="number" name="input" v-model="bindMobile" placeholder="请输入手机号" maxlength="11"/>
-				</view>
-				<!-- <view class="register-tip"><text>提示:手机号可用作登陆账号</text></view> -->
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from imgcode">
-					<view class="label">图形验证码:</view>
-					<input class="row-input" type="text" name="input" v-model="imageCode" placeholder="请输入图形验证码" maxlength="4"/>
-				</view>
-				<view class="register-from img-btn">
-					<view class="vscodeimg">
-						<image :src="imageCodeUrl" mode=""></image>
-					</view>
-					<view class="vscod-refresh" @click.stop="getVerificationCode">
-						<text class="iconfont icon-shuaxin"></text>
-						<text class="ref-text">刷新</text>
-					</view>
+					<input class="row-input" type="number" name="input" v-model="bindMobile" placeholder="请输入联系人常用手机号" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
@@ -73,6 +57,10 @@
 				<view class="register-row ">
 					<view class="register-btn sub" @click.stop="registerStepsfirst">注册</view>
 				</view>
+				<view class="register-consult"  @click.stop="goFastConsult">
+					<text class="iconfont icon-kefunv"></text>
+					<text class="text">入驻咨询</text>
+				</view>
 			</view>
 		</view>
 		<view class="register-main detailed clearfix" v-if="tabCurrentIndex === 2">
@@ -272,7 +260,7 @@
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import authorize from '@/common/config/authorize.js' 
 	import { organizationVerifyRegisterFirst,organizationRegister ,organizationLogin } from "@/api/use.js"
-	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
+	import { getImageCode, getRegisterMobileCode, uploadFileImage } from "@/api/utils.js"
 	export default{
 		components:{
 			mpvueCityPicker
@@ -454,19 +442,13 @@
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				if( this.imageCode == ''){
-					this.$util.msg('请输入图形验证码',2000);
-					return
-				}
 				let params = {
 						mobile:this.bindMobile,
 						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
+						platformType:2
 					}
 				this.isMobileDisabled = true;
-				getMobileCode(params).then(response =>{
+				getRegisterMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.mobilTime) {
@@ -489,12 +471,6 @@
 					this.isMobileDisabled = false;
 				})
 			},
-			getVerificationCode(){//获取图形验证
-				getImageCode().then(res => {
-					this.imageCodeUrl = res.data.baseImage
-					this.imageCodetoken = res.data.token
-				})
-			},
 			showMulLinkageThreePicker() {//三级地址联动
 				this.isShowInput = true
 				this.$refs.mpvueCityPicker.show()
@@ -638,10 +614,12 @@
 					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
 					this.medicaCampList.push(item)
 				}
+			},
+			goFastConsult(){
+				this.$api.navigateTo('/pages/login/consult')
 			}
 		},
 		onShow() {
-			this.getVerificationCode()
 			if(this.isPreviewImage){
 				this.isPreviewImage = false
 				return
@@ -657,11 +635,38 @@
 		.register-main{
 			width: 100%;
 			height: auto;
+			position: relative;
+			.register-consult{
+				width: 110rpx;
+				height: 68rpx;
+				background:linear-gradient(223deg,rgba(225,86,21,0.6) 0%,rgba(225,86,10,0.3) 100%);
+				border-radius: 34rpx 0 0 34rpx;
+				position: absolute;
+				right: 0;
+				top: -100rpx;
+				text-align: left;
+				line-height: 68rpx;
+				padding-left: 20rpx;
+				.icon-kefunv{
+					font-size: 48rpx;
+					color: #31313B;
+					float: left;
+				}
+				.text{
+					font-size: $font-size-24;
+					display: block;
+					float: left;
+					width: 60rpx;
+					line-height: 30rpx;
+					color: #FFFFFF;
+					margin-top: 6rpx;
+				}
+			}
 			.register-agree{
 				display: flex;
 				flex-direction: column;
 				align-items: center;
-				margin: 60rpx 0 40rpx 0;
+				margin: 150rpx 0 20rpx 0;
 				.agree-text{
 					.checkbox{
 						float: left;

+ 5 - 2
pages/tabBar/home/home.vue

@@ -73,10 +73,13 @@
 								</view>
 								<view class="" v-if="isLogin">
 									<view v-if="userIdentity == 4">
-										<view class="title-none" v-if="item.price1TextFlag == '1' || item.price1TextFlag == '2'">
+										<view class="title-none" v-show="item.price1TextFlag == '1'">
 											<text class="p big">未公开价格</text>
 										</view>
-										<view class="price tui-skeleton-rect" v-else>
+										<view class="title-none" v-show="item.price1TextFlag == '2'">
+											<text class="p big">价格仅会员可见</text>
+										</view>
+										<view class="price tui-skeleton-rect" v-show="item.price1TextFlag == '0'">
 											<text class="p sm">¥</text>
 											<text class="p big">{{item.retailPrice!=null ? item.retailPrice.toFixed(2):''}}</text>
 										</view>

+ 13 - 6
seller/pages/club/allClub-list.vue

@@ -177,7 +177,12 @@
 				this.initclubList()
 			},
 			hidePhone(val){
-				let phone = this.$reg.hidePhone(val) 
+				let phone
+				if(val==null || val==""){
+					phone = ""	
+				}else{
+					phone = this.$reg.hidePhone(val)
+				}
 				return phone
 			},
 			checkData (value){
@@ -288,7 +293,7 @@
 			display: flex;
 			align-items: center;
 			width: 702rpx;
-			height: 92rpx;
+			height: auto;
 			padding: 24rpx;
 			background: #FFFFFF;
 			position: relative;
@@ -298,8 +303,9 @@
 				flex: 8;
 				.list-head{
 					width: 92rpx;
-					height: 92rpx;
-					border-radius: 14rpx;
+					height: auto;
+					display: flex;
+					align-items: center;
 					image{
 						width: 92rpx;
 						height: 92rpx;
@@ -308,12 +314,13 @@
 				}
 				.list-tel{
 					margin: 0 15rpx;
+					width: 320rpx;
 					.txt{
 						display: flex;
 						flex: 1;
-						font-size: $font-size-28;
+						font-size: $font-size-26;
 						color: $text-color;
-						line-height: 46rpx;
+						line-height: 40rpx;
 						&.sm{
 							font-size: $font-size-24;
 							color: #666666;