zhengjinyi 5 vuotta sitten
vanhempi
commit
4361165bc9

+ 164 - 22
api/seller.js

@@ -7,12 +7,27 @@
 import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
 
+/**
+ *@协销微信授权登录
+ *@param code 微信Code
+ */
+export function sellerWxLogin(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/seller/wxLogin',params, true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
 /**
  *@协销登录
  *@param mobile 手机号
- *@param	password 密码
+ *@param password 密码
  */
-export function SellerLogin(params) {
+export function sellerLogin(params) {
 	return new Promise(function(resolve,reject) {
 		if( params.mobile == ''){
 			uni.showToast({title: '请输入账户名',duration: 2000,mask:true, icon:'none'})
@@ -22,7 +37,19 @@ export function SellerLogin(params) {
 			uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
 			return
 		}
-		request.post('/SellerLogin/login',params, true,res => {
+		request.post('/seller/login',params, true,res => {
+			resolve(res)
+		})
+	})
+}
+
+/**
+ *@协销账户中心
+ *@param userID 协销ID
+ */
+export function getSellerHome(params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet('/seller/home',params,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -32,12 +59,40 @@ export function SellerLogin(params) {
 	})
 }
 /**
- *@协销微信授权登录
- *@param code 微信Code
+ *@协销拉机构上线
+ *@param userID 协销ID
  */
-export function SellerWxLogin(params) {
+export function sellerClubRegister(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/SellerLogin/wxLogin',params, true,res => {
+		if( params.email == ''){
+			uni.showToast({title: '请输入邮箱地址',duration: 2000,mask:true, icon:'none'})
+			return
+		}
+		if(!$reg.isEmail(params.email)){
+			uni.showToast({title: '请输入正确的邮箱地址',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if( params.name == ''){
+			uni.showToast({title: '请输入机构名称',duration: 2000,mask:true, icon:'none'})
+			return
+		}
+		if( params.linkMan == ''){
+			uni.showToast({title: '请输入联系人名称',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if( params.bindMobile == ''){
+			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		if(!$reg.isMobile(params.bindMobile)){
+			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
+			return
+		}		
+		if(params.isAgreed == 0){
+			uni.showToast({title: '请勾选同意协议',duration: 2000,mask:true,icon:'none'})
+			return
+		}
+		request.post('/seller/club/register',params,true,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -46,17 +101,52 @@ export function SellerWxLogin(params) {
 		})
 	})
 }
+/**
+ *@协销修改机构资料
+ *@param userID 协销ID
+ */
+export function sellerClubUpdate(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/seller/club/update',params,true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@协销机构列表
+ *@param name 	  机构名字关键字(搜索用)
+ *@param pageNum  页码
+ *@param pageSize 条数
+ *@param spId 	  协销ID
+ *@param status   机构状态
+ */
+export function getSellerClubList(params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet('/seller/club/list',params,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+
 /**
  *@协销订单列表
  *@param listType 订单类型
- *@param orderNo 密码
- *@param pageNum 页码
+ *@param orderNo  密码
+ *@param pageNum  页码
  *@param pageSize 条数
  *@param serviceProviderId 密码
  */
 export function getSellerOrderList(params) {
 	return new Promise(function(resolve,reject) {
-		request.lodingGet('/seller/order/list',params,res => {
+		request.get('/seller/order/list',params,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -66,13 +156,14 @@ export function getSellerOrderList(params) {
 	})
 }
 /**
- *@协销加入购物车
- *@param mobile 手机号
- *@param Password 密码
+ *@协销下机构订单列表
+ *@param clubID   机构ID
+ *@param pageNum  页码
+ *@param pageSize 条数
  */
-export function SellerAddCart(params) {
+export function getSellerClubOrderList(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/seller/addCart',params, true,res => {
+		request.get('/seller/clubOrder',params,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -82,15 +173,64 @@ export function SellerAddCart(params) {
 	})
 }
 /**
- *@协销商品搜索
- *@param clubUserId 协销ID
- *@param pageNum 页码
- *@param pageSize 条数
+ *@协销帮机构下单购物车商品加减数量
+ *@param clubId 机构的clubId
+ *@param serviceProviderId 	协销ID
+ */
+export function sellerAddProductNum(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/seller/addProductNum',params,true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@协销帮机构下单获取购物车数量
+ *@param clubId 机构的clubId
+ *@param serviceProviderId 	协销ID
+ */
+export function getSellerProductNum(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/seller/productNum',params,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@协销帮机构下单获取购物车数量
+ *@param clubId 	机构ID
+ *@param serviceProviderId 协销ID
+ *@param productIds 	商品ID
+ */
+export function sellerSettlement(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/seller/settlement',params,true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@协销帮机构下单商品搜索
+ *@param clubUserId 机构的userID
+ *@param pageNum 	页码
+ *@param pageSize 	条数
  *@param searchWord 搜索关键词
  */
 export function getSellerProduct(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/seller/product/search',params,res => {
+		request.lodingGet('/seller/product/search',params,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -122,7 +262,7 @@ export function getSellerShoppingInfo(params) {
  */
 export function shoppingCartAddCart(params) {
 	return new Promise(function(resolve,reject) {
-		request.post('/shoppingCart/addCart',params, true,res => {
+		request.post('/seller/addCart',params, true,res => {
 			if(res.code == 0){
 				resolve(res)
 			}else{
@@ -178,4 +318,6 @@ export function shoppingCartUpdate(params) {
 			}
 		})
 	})
-}
+}
+
+

+ 2 - 2
common/config/config.js

@@ -1,9 +1,9 @@
 let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
-    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 }else{
     // 生产环境
     URL_CONFIG = 'https://spi.caimei365.com'

+ 1 - 78
components/module/listTemplate/buyagainList.vue

@@ -1,16 +1,6 @@
 <template>
 	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
 		<list-skeleton v-if="showSkeleton"></list-skeleton>
-		<view class="good-search clearfix" v-if="searchStatus">
-			<view class="search-from name">
-				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
-				<input class="input" type="text" v-model="searchInputVal" placeholder="请输入商品名称" @input="onShowClose" maxlength="20"/>
-				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
-			</view>
-			<view class="search-btn">
-				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
-			</view>
-		</view>
 		<view class="product-container" v-if="!isShowEmpty" :style="{paddingTop:searchStatus?'112rpx':''}">
 			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="productList.length > 0">
 				<view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)">
@@ -41,7 +31,6 @@
 						</view>
 					</view>
 				</view>
-				<button class="show-more-btn" v-if="showRegularBtn" @click="getListFromServer(true)">查看更多</button>
 				<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
 					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
 					<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
@@ -77,12 +66,6 @@
 			modalLayer,
 			uniStars
 		},
-		props: {
-			searchStatus:{
-				type:Boolean,
-				default:false
-			}
-		},
 		data(){
 			return{
 				isShowClose:false,
@@ -242,66 +225,6 @@
 			margin-left: -138rpx;
 		}
 	}
-	.good-search{
-		height: 64rpx;
-		width: 702rpx;
-		padding: 24rpx;
-		background: #FFFFFF;
-		display: flex;
-		align-items: center;
-		margin-bottom: 20rpx;
-		position: fixed;
-		top: 0;
-		left: 0;
-		z-index: 999;
-		.search-from{
-			width: 582rpx;
-			height: 64rpx;
-			background: #F7F7F7;
-			border-radius: 14rpx;
-			float: left;
-			position: relative;
-			.input{
-				width: 500rpx;
-				height: 64rpx;
-				float: left;
-				line-height: 64rpx;
-				color: $text-color;
-				font-size: $font-size-24;
-			}
-			.icon-iconfonticonfontsousuo1{
-				width: 64rpx;
-				height: 64rpx;
-				line-height: 64rpx;
-				text-align: center;
-				display: block;
-				font-size: $font-size-38;
-				float: left;
-				color: #999999;
-			}
-			.icon-shanchu1{
-				font-size: $font-size-32;
-				color: #999999;
-				position: absolute;
-				width: 64rpx;
-				height: 64rpx;
-				line-height: 64rpx;
-				top: 0;
-				right: 0;
-				text-align: center;
-				z-index: 10;
-			}
-		}
-		.search-btn{
-			width: 120rpx;
-			line-height: 64rpx;
-			text-align: center;
-			font-size: $font-size-28;
-			color: $color-system;
-			float: left;
-			background: #FFFFFF;
-		}
-	}
 	.all-type-list-content {
 		height: 240rpx;
 		padding: 24rpx;
@@ -450,7 +373,7 @@
 		background: rgba(255, 147, 0, 0.5);
 		position: fixed;
 		right: 24rpx;
-		bottom: 30%;
+		bottom: 28%;
 		display: flex;
 		align-items: center;
 		justify-content: center;

+ 1 - 1
components/module/listTemplate/commodityList.vue

@@ -18,7 +18,7 @@
 								<text class="txt">该商品尚未公开价格</text>
 								<text class="txt">购买请致电:0755-22907771</text>
 							</view>
-							<text v-else>¥<text class="price-larger">{{item.retailPrice.toFixed(2)}}</text></text>
+							<text v-else>¥<text class="price-larger">{{item.retailPrice?item.retailPrice.toFixed(2):'0.00'}}</text></text>
 						</view>
 						<button v-if="fromRegularPurchasePage" class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
 					</view>

+ 466 - 0
components/module/listTemplate/immediatelyList.vue

@@ -0,0 +1,466 @@
+<template>
+	<view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
+		<view class="good-search clearfix" v-if="searchStatus">
+			<view class="search-from name">
+				<text class="iconfont icon-iconfonticonfontsousuo1"></text>
+				<input class="input" type="text" v-model="searchInputVal" placeholder="请输入商品关键词" @input="onShowClose" maxlength="20"/>
+				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
+			</view>
+			<view class="search-btn">
+				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
+			</view>
+		</view>
+		<list-skeleton v-if="showSkeleton"></list-skeleton>
+		<view class="empty-container" v-if="isShowEmpty" >
+			<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"></image>
+			<text class="error-text">{{isShowEmptyText}}</text>
+		</view>
+		<view class="product-container" v-else :style="{paddingTop:searchStatus?'112rpx':''}">
+			<scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower" scroll-y v-if="productList.length > 0">
+				<view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)">
+					<image mode='widthFix' :src="item.mainImage"  class="list-img" alt="list-img"></image>
+					<view class="list-details-info">
+						<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 class="price-small">购买请致电:0755-22907771</view>
+							</view>
+						</view>
+						<view class="list-details-price" v-else>
+							<view class="list-shop">
+								<view class="list-price" >
+									<text class="price-view activity" v-if="item.isShowActFlg">活动价</text>
+									<text class="price-view ladder" v-if="item.ladderPriceFlag == 1">阶梯价</text>
+									<text class="price-larger">¥{{item.retailPrice.toFixed(2)}}</text>
+								</view>
+								<view class="list-price-none" v-if="item.repurchasePriceState">
+									<text class="price-none">¥{{item.discountPrice}}</text>
+									<text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
+								</view>
+							</view>
+							<button class="add-cart-btn" @click.stop="operationHanld(item)">选择数量</button>
+						</view>
+					</view>
+				</view>
+				<view v-if="showLoading && productList.length > 4 && !showRegularBtn">
+					<view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
+					<view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view class="cart-icon" @click="toCartPage">
+			<text v-if="cartQuantity > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
+				{{cartQuantity >= 100 ? '99+' : cartQuantity}}
+			</text>
+			<image src='../../../static/icon-cart-active@3x.png' mode="widthFix"></image>
+		</view>
+		<!-- 透明模态层 -->
+		<modal-layer v-if='isModallayer'></modal-layer>
+	</view>
+</template>
+
+<script>
+	import listSkeleton from '@/components/module/listTemplate/listSkeleton'
+	import modalLayer from "@/components/modal-layer"
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
+	import { getSellerProduct  } from "@/api/seller.js"
+	import { mapState,mapMutations } from 'vuex';
+	export default{
+		name:'productList',
+		components:{
+			listSkeleton,
+			modalLayer,
+			uniStars
+		},
+		props: {
+			searchStatus:{
+				type:Boolean,
+				default:false
+			},
+			getUserId:{
+				type:Number
+			}
+		},
+		data(){
+			return{
+				isShowClose:false,
+				searchInputVal:'',
+				isModallayer:false,
+				windowHeight: '',
+				showSkeleton: false,
+				isShowEmpty: true,
+				isShowEmptyText: '搜索相关商品',
+				clubUserId: '',
+				scrollHeight: '',
+				productList: [],
+				showLoading: false,
+				loadingNow: true,
+				loadingText: '上拉加载更多',
+				pageSize: 10,
+				pageNum: 1,
+				hasNextPage: false,
+				pullFlag: true,
+				fromRegularPurchasePage: false,
+				cartQuantity: 0,
+				showRegularBtn: false,
+				isPrecedence:false,
+			}
+		},
+		created() {
+			this.setScrollHeight();		
+			this.clubUserId = this.getUserId
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
+		methods:{
+			scrolltolower() {
+				if(this.hasNextPage && this.pullFlag) {
+					this.getProductAgainInfo(true);
+				}
+			},
+			setScrollHeight() {
+				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
+				this.windowHeight = windowHeight - 1;
+				this.scrollHeight = windowHeight - 1;
+			},
+			
+			getProductAgainInfo(loadMore) {
+				this.showLoading = true;
+				this.loadingNow = true;
+				this.loadingText = '加载中';
+				this.isShowEmpty = false;				
+				if(loadMore) {this.pageNum += 1;}
+				let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.pageSize,searchWord:this.searchInputVal}
+				getSellerProduct(params).then(response =>{
+					this.isShowWrapper = true
+					const responseData = response.data;
+					if(responseData.results && responseData.results.length > 0){
+						this.hasNextPage = responseData.hasNextPage;
+						this.isShowEmpty = false;
+						if(loadMore) {
+							this.productList = [...this.productList,...responseData.results];
+						} else {
+							this.productList = [...responseData.results];
+							this.showSkeleton = false;
+						}
+						//价格显示处理
+						let isActFlg,newProductList=[];
+						this.productList.map((item, index)=> {
+							if(item.actFlag == 1){
+								isActFlg = true
+							}else if(item.actFlag == 1 && item.ladderPriceFlag == 1){
+								isActFlg = true
+							}else{
+								isActFlg = false
+							}
+							newProductList.push(Object.assign({},item,{isShowActFlg:isActFlg}))
+						})
+						this.productList = newProductList
+						// 防上拉暴滑
+						this.pullFlag = false;
+						setTimeout(()=>{
+							this.pullFlag = true;
+						},500)
+						// 底部提示文案
+						if(this.hasNextPage) {
+							this.loadingText = '上拉加载更多';
+						} else {
+							this.showLoading = true;
+							this.loadingNow = false;
+						}
+					} else {
+						this.isShowEmpty = true;
+						this.isShowEmptyText ='暂无相关商品'
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,3000);
+				})
+			},
+			searchOpertor(){//搜索商品
+				if(this.searchInputVal == ''){
+					this.$util.msg('请输入商品关键词',3000)
+					return
+				}
+				this.pageNum = 1
+				this.showSkeleton = true;
+				this.getProductAgainInfo();
+			},
+			operationHanld(prop){
+				this.$emit('operationConfim',prop)
+			},
+			navToDetailPage(id) {
+				this.isModallayer = true;
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`);
+				this.isModallayer = false;
+			},
+			toCartPage() {
+				this.$emit('goCartPage')
+			},
+			repurchModel(){
+				this.$util.modal('','此商品成本有变化原来的购买价已不适用','知道了','',false,() =>{})
+			},
+			onShowClose () {//输入框失去焦点时触发
+				if(this.searchInputVal != ''){
+					this.isShowClose = true
+				}else{					
+					this.isShowClose = false
+				}
+			},
+			delInputText(){//清除输入框内容
+				this.searchInputVal = ''
+				this.isShowClose = false
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.commodity-list-wrapper {
+		scroll-view {
+			height: 100%;
+		}
+		.empty-container-image {
+			margin-top: -300rpx;
+		}
+		.show-more-btn {
+			width: 276rpx;
+			height: 52rpx;
+			line-height: 52rpx;
+			border: 2rpx solid #D8D8D8;
+			background: #F7F7F7;
+			font-size: 26rpx;
+			margin: 26rpx 0;
+			position: absolute;
+			left: 50%;
+			margin-left: -138rpx;
+		}
+	}
+	.good-search{
+		height: 64rpx;
+		width: 702rpx;
+		padding: 24rpx;
+		background: #FFFFFF;
+		display: flex;
+		align-items: center;
+		margin-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
+		.search-from{
+			width: 582rpx;
+			height: 64rpx;
+			background: #F7F7F7;
+			border-radius: 14rpx;
+			float: left;
+			position: relative;
+			.input{
+				width: 500rpx;
+				height: 64rpx;
+				float: left;
+				line-height: 64rpx;
+				color: $text-color;
+				font-size: $font-size-24;
+			}
+			.icon-iconfonticonfontsousuo1{
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				text-align: center;
+				display: block;
+				font-size: $font-size-38;
+				float: left;
+				color: #999999;
+			}
+			.icon-shanchu1{
+				font-size: $font-size-32;
+				color: #999999;
+				position: absolute;
+				width: 64rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				top: 0;
+				right: 0;
+				text-align: center;
+				z-index: 10;
+			}
+		}
+		.search-btn{
+			width: 120rpx;
+			line-height: 64rpx;
+			text-align: center;
+			font-size: $font-size-28;
+			color: $color-system;
+			float: left;
+			background: #FFFFFF;
+		}
+	}
+	.all-type-list-content {
+		height: 240rpx;
+		padding: 24rpx;
+		background: #fff;
+		margin-bottom: 2rpx;
+		display: flex;
+		flex-direction: row;
+		box-sizing: content-box;
+		.list-img {
+			width: 240rpx;
+			height: 240rpx !important;
+			margin-right: 26rpx;
+			border-radius: 10rpx;
+			border: 2rpx solid #f3f3f3;
+		}
+	}
+	.list-details-info {
+		width: 442rpx;
+		flex-direction: column;
+		font-size: 26rpx;
+		position: relative;
+		.list-details-title {
+			line-height: 38rpx;
+			text-overflow: ellipsis;
+			overflow: hidden;
+			display: -webkit-box;
+			-webkit-line-clamp: 2;
+			line-clamp: 2;
+			-webkit-box-orient: vertical;
+		}
+		.list-details-specs {
+			width: 100%;
+			display: inline-block;
+			margin-top: 8rpx;
+			color: #999999;
+		}
+		.list-details-miniQuantity {
+			width: 100%;
+			display: inline-block;
+			margin-top: 7rpx;
+		}
+	}
+	.list-details-price {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;		
+		.price-icon {
+			width: 22rpx;
+			height: 28rpx;
+			vertical-align: middle;
+			margin-right: 10rpx;
+		}
+		.price-icon + text {
+			font-size: 25rpx;
+			vertical-align: middle;
+		}
+		.list-login-now {
+			width: 375rpx;
+			color: #F8C499;
+			position: absolute;
+			bottom: 0;
+			.p-no{
+				float: left;
+				font-size: $font-size-24;
+				color: $color-system;
+				margin-right: 10rpx;
+			}
+		}
+		.login-now {
+			padding: 10rpx 10rpx 10rpx 0;
+		}
+		.list-none{
+			margin-top: 30rpx;
+			.price-small{
+				font-size:$font-size-24;
+				line-height: 40rpx;
+				color: #FF2A2A;
+			}
+		}
+		
+		.list-shop{
+			width: 100%;
+			height: auto;
+			flex: 6;
+			.list-price {
+				width: 100%;
+				color: #FF2A2A;
+				float: left;
+				line-height:36rpx ;
+				align-items: center;
+				justify-content: center;
+				.price-larger {
+					margin-top: 20rpx;
+					font-size: $font-size-30;
+					display: inline-block;
+				}
+				.price-view{
+					display: inline-block;
+					width: 78rpx;
+					border-radius: 18rpx;
+					font-size: $font-size-20;
+					text-align: center;
+					color: #FFFFFF;
+					height: 36rpx;
+					line-height: 36rpx;
+					margin-right: 8rpx;
+					&.ladder{
+						background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
+					}
+					&.activity{
+						background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
+					}
+				}
+			}
+			.list-price-none{
+				width: 100%;
+				.price-none{
+					text-decoration: line-through;
+					color: #999999;
+					display: inline-block;
+				}
+				.icon-wenhao{
+					font-size: $font-size-32;
+					color: #0091FF;
+					margin-left: 6rpx;
+				}
+			}
+		}
+		.add-cart-btn {
+			flex: 4;
+			width: 156rpx;
+			height: 64rpx;
+			line-height: 64rpx;
+			border-radius: 32rpx;
+			color: #fff;
+			font-size: 26rpx;
+			margin-right: 0;
+			background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+		}
+	}
+	.cart-icon {
+		width: 92rpx;
+		height: 92rpx;
+		border-radius: 50%;
+		background: rgba(255, 147, 0, 0.5);
+		position: fixed;
+		right: 24rpx;
+		bottom: 37%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		cursor: pointer;
+		image {
+			width: 58rpx;
+			height: 58rpx;
+		}
+		text {
+			font-size: 28rpx;
+			position: absolute;
+			top: -10rpx;
+			right: 0;
+		}
+	}
+</style>

+ 1 - 1
components/module/orderDetails/orderListButton.vue

@@ -20,7 +20,7 @@
 			},
 			orderID: {
 				type:Number
-			},
+			}
 		},
 		data() {
 			return{

+ 177 - 0
components/module/orderDetails/sellerOrderButton.vue

@@ -0,0 +1,177 @@
+<template name="button">
+	<view class="button-template">
+		<!-- 底部按钮 -->
+		<view class="button-content">
+			<view class="btn btn-share"  @click.stop="onShareCode(orderID)">分享订单</view>	
+			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',orderID)">取消订单</view>
+			<view class="btn btn-confirm" v-if="btnState.isConfirm" @click.stop="btnConfirm('confirm',orderID)">立即确认</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		name:"button",
+		props:{
+			status: {
+				type:Number
+			},
+			orderID: {
+				type:Number
+			}
+		},
+		data() {
+			return{
+				isShare:true,
+				shareCode:'',
+				btnState:this.initStatus(),
+				mapStateArr:[
+					{label:'isCancel',val:[111],status: true},
+					{label:'isConfirm',val:[33],status: true},
+				]
+			}
+		},
+		created(){
+			this.initData(this.status)
+		},
+		computed: {
+			
+		},
+		watch:{
+			status:{
+				handler:function(val){
+					// console.log(val)
+					this.initData(val)
+				},
+				deep:true//对象内部的属性监听,也叫深度监听
+			}
+		},
+		methods:{
+			initData(resVal) {
+				/**
+				 * @分享按钮统一显示
+				 * @按钮根据状态显示
+				 * @(4、5、7、12、22、23、32)显示[查看物流]按钮,其他隐藏
+				 * @(6)显示[删除订单],其他隐藏
+				 * @(11)显示[取消订单],其他隐藏
+				 * @(21,31)只显示分享
+				 * @(13,33)显示[确认收货]和[查看物流]
+				 */
+				this.btnState = this.initStatus()
+				this.mapStateArr.forEach(el => {
+					el.val.forEach(value => {
+						if(resVal === value){
+							this.btnState[el.label] = el.status
+						}
+					})
+				})
+			},
+			initStatus(){
+				let btnState= {
+						isQuery: false,
+						isDelete: false,
+						isCancel: false,
+						isConfirm: false,
+						isShare: true
+					}
+				return 	btnState
+			},
+			getShareCode(code){
+				this.shareCode = code
+			},
+			onShareCode(orderId){
+				this.$parent.isShareModal = true
+				this.$parent.btnoRderID = orderId
+				this.$emit('shareConfirm')
+			},
+			btnConfirm(type,id){
+				let data = {
+						type:type,
+						orderId:id
+					}
+				this.$emit('buttonConfirm',data)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.button-template{
+		width: 100%;
+		height: auto;
+		float: left;
+		background: #FFFFFF;
+		.button-content{
+			width: 702rpx;
+			height: auto;
+			float: left;
+			position: relative;
+			.share-code{
+				width: 200rpx;
+				height:  64rpx;
+				line-height: 64rpx;
+				color: #2A45FF;
+				text-align: left;
+				position: absolute;
+				font-size: $font-size-28;
+				font-weight: bold;
+				left: 24rpx;
+				top: 24rpx;
+			}
+			.btn{
+				width: 160rpx;
+				height:  64rpx;
+				margin:22rpx;
+				line-height: 64rpx;
+				font-size:$font-size-26;
+				color: #FFFFFF;
+				text-align: center;
+				border-radius: 10rpx;
+				float: right;
+			}
+			.btn-cancel{
+				background:linear-gradient(135deg,rgba(104,104,104,1) 0%,rgba(181,181,181,1) 100%);
+			}
+			.btn-delete{
+				background:linear-gradient(315deg,rgba(255,163,3,1) 0%,rgba(255,53,1,1) 100%);
+			}
+			.btn-query{
+				background:linear-gradient(135deg,rgba(255,212,129,1) 0%,rgba(198,129,0,1) 100%);
+			}
+			.btn-confirm{
+				background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
+			}
+			.btn-share{
+				background:linear-gradient(315deg,rgba(0,212,150,1) 0%,rgba(126,243,174,1) 100%);
+				margin-right: 0;
+				position: relative;
+				.tips{
+					width: 160rpx;
+					height: 34rpx;
+					padding: 10rpx 10rpx;
+					background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+					box-shadow:0px 2px 4px 0px rgba(0,0,0,0.2);
+					border-radius: 8rpx;
+					position: absolute;
+					color: #FFFFFF;
+					line-height: 34rpx;
+					font-size: $font-size-24;
+					text-align: left;
+					right: 0;
+					top: -65rpx;
+					&:before{
+						content: "";
+						width: 25rpx;
+						height: 25rpx;
+						background:linear-gradient(45deg,rgba(0,0,0,1) 0%,rgba(87,87,87,1) 100%);
+						position: absolute;
+						bottom: -8rpx;
+						right: 30rpx;
+						z-index: -1;
+						transform:rotate(45deg);
+					}
+				}
+			}
+		}
+	}
+</style>

+ 1 - 21
market/pages/cart/buyagain.vue

@@ -28,7 +28,6 @@
 					</view>
 				</view>
 				<view class="btn">
-					<view class="button buy" @click="toConfirmation">立即购买</view>
 					<view class="button add" @click="getAddProductCart">加入购物车</view>
 				</view>
 			</view>
@@ -116,19 +115,6 @@
 					this.number = e.detail.value
 				}
 			},
-			toConfirmation(){//跳转确认订单页面
-				this.specClass = 'hide';
-				let productStp ={
-						allPrice:this.number*this.buyRetailPrice,
-						allCount:this.number,
-						id:this.handleData.productID,
-						productCount:this.number
-				}	
-				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
 				console.log(this.number)
 				shoppingAddCart({productID:this.handleData.productID,userID:this.userID,productCount:this.number}).then(response => {
@@ -261,13 +247,7 @@
 					justify-content: center;
 					font-size: $font-size-28;
 					border-radius: 14rpx;
-					&.buy{
-						background: $btn-confirm;
-					}
-					&.add{
-						background: rgba(239, 175, 0, 1);
-						margin-left: 20rpx;
-					}
+					background: $btn-confirm;
 				}
 			}
 		}

+ 20 - 20
market/pages/cart/cart.vue

@@ -30,17 +30,18 @@
 													@click.stop="ischeck(item,pros,idx)">
 											</button>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage ? pros.mainImage :''" alt="" /></view>
 										<view class="pros-product">
 											<view class="producttitle" @click.stop="navToListPage(pros.id)"	>
 												<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
 											</view>
-											<view class="productspec">规格:{{pros.unit}}</view>
+											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
 												<view 	class="price" 
 														:class="[pros.validFlag == '3' ?'disabled' : '']">
-														<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>{{pros.retailPrice.toFixed(2)}}
+														<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>
+														{{pros.retailPrice ? pros.retailPrice.toFixed(2) : ''}}
 												</view>
 												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
 													<view class="number-box">
@@ -103,7 +104,7 @@
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
 	import modalLayer from "@/components/modal-layer"
 	import { mapState,mapMutations } from 'vuex';
-	import { queryShoppingCartList,shoppingCartUpdate,shoppingCartDelete } from "@/api/cart.js" 
+	import { getSellerShoppingInfo,sellerAddProductNum } from "@/api/seller.js" 
 	
 	export default{
 		components:{
@@ -114,8 +115,8 @@
 		},
 		data(){
 			return{
-				userID:'',
-				alertType:'',
+				clubId:'',	//机构ID
+				serviceProviderId:'',//协销ID
 				isStock:'',
 				goodsList:[],	//购物车的商品
 				delGoodsList:'',//要删除的商品
@@ -139,8 +140,10 @@
 				pageNum: 1,
 			}
 		},
-		onLoad(){
+		onLoad(option){
+			this.clubId = option.clubId
 			this.setScrollHeight();
+			this.initData()
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -156,7 +159,7 @@
 				this.skeletonShow = true //预加载圆圈
 				this.isCheckAll=false//是否全选
 				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userID;
+					this.serviceProviderId = resolve.serviceProviderID;
 					this.initGetCartGoodsList();
 				})	
 			},
@@ -178,8 +181,8 @@
 				}, 500)
 			},
 			initGetCartGoodsList(){//初始化购物车 index:1
-				let params = {userID:this.userID,pageNum:1,pageSize:this.pageSize}
-				queryShoppingCartList(params).then(response =>{
+				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize}
+				getSellerShoppingInfo(params).then(response =>{
 					this.skeletonShow = false
 					this.$store.commit('updateAllNum',response.data.cartQuantity)
 					const resultsData = response.data.pageDate;	
@@ -219,8 +222,8 @@
 			},		
 			getOnReachBottomData(){//上拉加载
 				this.pageNum+=1
-				let params = {userID:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
-				queryShoppingCartList(params).then(response =>{
+				let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
+				getSellerShoppingInfo(params).then(response =>{
 					let resultsData = response.data.pageDate
 					this.hasNextPage = resultsData.hasNextPage;
 					this.goodsList = this.goodsList.concat(resultsData.results)
@@ -438,8 +441,8 @@
 				}
 			},
 			updateShoppogNum(pros){//加减购物车商品更新到后台
-				let params ={userID:this.userID,productID:pros.productID,productCount:pros.productCount}
-				shoppingCartUpdate(params).then(response =>{
+				let params ={id:pros.sellerCartId,productID:pros.productID,num:pros.productCount}
+				sellerAddProductNum(params).then(response =>{
 					this.isshowDelbtn = false;
 					this.initGetCartGoodsList();
 				}).catch(response =>{
@@ -473,12 +476,13 @@
 						})
 					})
 					let cartPramsData={
+							clubId:this.clubId,
 							allPrice:this.allPrice,
 							allCount:this.allCount,
 							productID:productID.substring(0,productID.lastIndexOf(',')),
 							productCount:''
 					}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
+					this.$api.navigateTo(`/market/pages/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
 				}
 			},
 			setOrderGoods(){//本地获取勾选商品信息***暂时丢弃***
@@ -602,11 +606,7 @@
 			uni.stopPullDownRefresh()
 		},
 		onShow(){
-			if(!this.hasLogin){
-				this.initLogin()
-			}else{
-				this.initData()
-			}
+		
 		},
 	}
 </script>

+ 41 - 36
market/pages/cart/immediately.vue

@@ -1,6 +1,11 @@
 <template>
 	<view class="container all-type-list-wrapper">
-		<buyagain-list ref="productList" :search-status="true" @operationConfim="hanldOperationConfim"></buyagain-list>
+		<immediately-list ref="productList" 
+						  :search-status="true" 
+						  :get-userId="clubUserId" 
+						  @operationConfim="hanldOperationConfim"
+						  @goCartPage="hanldToCartPage">
+		</immediately-list>
 		<!--底部选择模态层弹窗组件 -->
 		<view class="popup spec" :class="specClass"  @touchmove.stop.prevent="discard" @tap="hideSpec">
 			<!-- 遮罩层 -->
@@ -28,7 +33,6 @@
 					</view>
 				</view>
 				<view class="btn">
-					<view class="button buy" @click="toConfirmation">立即购买</view>
 					<view class="button add" @click="getAddProductCart">加入购物车</view>
 				</view>
 			</view>
@@ -37,15 +41,17 @@
 </template>
 
 <script>
-	import buyagainList from '@/components/module/listTemplate/buyagainList'
-	import { shoppingAddCart } from "@/api/cart.js" 
+	import immediatelyList from '@/components/module/listTemplate/immediatelyList'
+	import { getSellerProductNum ,shoppingCartAddCart} from "@/api/seller.js" 
 	export default{
 		components:{
-			buyagainList
+			immediatelyList
 		},
 		data(){
 			return{
-				userID: '',
+				clubID:'',		//机构ID
+				clubUserId: '',	//机构用户ID
+				serviceProviderId:'',//协销ID
 				serverUrl: '',
 				emptyText: '',
 				lastPageType: '',
@@ -59,10 +65,22 @@
 				buyRetailPrice:0
 			}
 		},
-		onLoad() {
-
+		onLoad(option) {
+			this.clubUserId = option.userID
+			this.clubID = option.clubID
+			console.log(this.clubID)
+			console.log(this.clubUserId)
+			this.$api.getStorage().then((resolve) =>{
+				this.serviceProviderId = resolve.serviceProviderID
+				this.getClubProductNum()
+			})
 		},
 		methods:{
+			getClubProductNum(){
+				getSellerProductNum({clubId:this.clubID,serviceProviderId:this.serviceProviderId}).then(response =>{
+					this.$refs.productList.cartQuantity = response.data
+				})
+			},
 			hanldOperationConfim(data){//显示选择数量确认弹窗
 				console.log(data)
 				this.specClass = 'show';
@@ -116,39 +134,32 @@
 					this.number = e.detail.value
 				}
 			},
-			toConfirmation(){//跳转确认订单页面
-				this.specClass = 'hide';
-				let productStp ={
-						allPrice:this.number*this.buyRetailPrice,
-						allCount:this.number,
-						id:this.handleData.productID,
-						productCount:this.number
-				}	
-				this.$api.navigateTo(`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({data:productStp})}`)
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 200);
-			},
 			getAddProductCart(){//增加购物车成功和toast弹窗提示成功
 				console.log(this.number)
-				shoppingAddCart({productID:this.handleData.productID,userID:this.userID,productCount:this.number}).then(response => {
+				console.log(this.handleData)
+				let params ={
+						productId:this.handleData.productID,
+						clubId:this.clubID,
+						serviceProviderId:this.serviceProviderId,
+						num:this.number
+				}
+				shoppingCartAddCart(params).then(response => {
 					this.specClass = 'hide';
-					this.$util.msg(response.msg,1500,true,'success')
-					setTimeout(() => {this.specClass = 'none'}, 200)
+					this.$util.msg('加入购物车成功',1500,true,'success')
 					this.$refs.productList.cartQuantity = response.data
+					setTimeout(() => {this.specClass = 'none'}, 200)
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000);
 				})
 			},
+			hanldToCartPage(){
+				this.$api.navigateTo(`/market/pages/cart/cart?clubId=${this.clubID}`)
+			},
 			discard(){
 				//丢弃
 			}
 		},
 		onShow() {
-			let pages = getCurrentPages(),thisPage = pages[pages.length - 1];
-			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userID
-			})
 		},
 	}
 </script>
@@ -253,7 +264,7 @@
 				height: 88rpx;
 				display: flex;
 				.button {
-					width: 340rpx;
+					width: 702rpx;
 					height: 88rpx;
 					color: #fff;
 					display: flex;
@@ -261,13 +272,7 @@
 					justify-content: center;
 					font-size: $font-size-28;
 					border-radius: 14rpx;
-					&.buy{
-						background: $btn-confirm;
-					}
-					&.add{
-						background: rgba(239, 175, 0, 1);
-						margin-left: 20rpx;
-					}
+					background: $btn-confirm;
 				}
 			}
 		}

+ 39 - 40
market/pages/club/club-list.vue

@@ -11,20 +11,20 @@
 		</view>
 		<view class="club-main">
 			<view v-if="isEmpty" class="empty-container">
-				<view class="txt">暂无数据</view>
+				<view class="txt">暂无机构数据</view>
 			</view>
 			<view v-else class="club-list">
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in clubList" :key="index">
 						<view class="list-left">
-							<view class="list-head"><image :src="item.headimgurl ? item.headimgurl : '../../../static/temp/logo@3x.png'" mode=""></image></view>
+							<view class="list-head"><image :src="item.medicalPracticeLicenseImg ? item.medicalPracticeLicenseImg : '../../../static/temp/logo@3x.png'" mode=""></image></view>
 						</view>
 						<view class="list-item">
 							<view class="list-title">
 								<text>{{item.name}}</text>
 							</view>
 							<view class="list-opea">
-								<view class="btn org" @click.stop="_goImmediately(item.clubID)">
+								<view class="btn org" @click.stop="_goImmediately(item)">
 									<text>立即下单</text>
 								</view>
 								<view class="btn gre" @click.stop="_goBuyagain(item.clubID)">
@@ -33,6 +33,8 @@
 								<view class="btn yel" @click.stop="_goHistory(item.clubID)">
 									<text>订单列表</text>
 								</view>
+							</view>
+							<view class="list-opea">
 								<view class="btn yel" @click.stop="_goOperator(item.clubID)">
 									<text>邀请运营人员</text>
 								</view>
@@ -53,7 +55,7 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryclubList, deleteclub , updateCode } from "@/api/operator.js"
+	import { getSellerClubList } from "@/api/seller.js"
 	export default {
 		components:{
 			tuiLoadmore,
@@ -61,33 +63,21 @@
 		},
 		data() {
 			return {
-				clubID:'',
-				clubName:'',
-				clubImage:'',
-				linkman:'',
-				clubMobile:'',
+				serviceProviderId:'',
+				isShowClose:false,
+				searchInputVal:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
-				userID:'',
 				pageNum:1,
 				pageSize:10,
 				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
 				pullFlag: true,
-				allowDataStatus:true,
-				wrapperHeight:'100%',
 				scrollHeight:'',
-				deleteAddressId:'',
 				currPage:'',//当前页面
 				prevPage:'',//上一个页面
-				tabCurrentIndex:0,
-				clubList:[
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:123},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:321},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:456},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:567},
-				],
+				clubList:[],
 			}
 		},
 		onLoad(){				
@@ -108,13 +98,9 @@
 					})
 				}, 500)
 			},
-			searchOpertor(){
-				this.pageNum=1
-				this.initclubList()
-			},
-			initclubList(){	
-				let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryclubList(params).then(response =>{
+			initclubList(){
+				let params = {name:this.searchInputVal,pageNum:1,pageSize:this.pageSize,spId:this.serviceProviderId,status:90}
+				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -139,8 +125,8 @@
 			},	
 			getOnReachBottomData(){
 				this.pageNum+=1
-				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryclubList(params).then(response =>{
+				let params = {name:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,spId:this.serviceProviderId,status:90}
+				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -160,8 +146,19 @@
 					this.$util.msg(response.msg,2000)
 				})
 			},
-			_goImmediately(id){
-				this.$api.navigateTo(`/market/pages/order/order-immediately?id=${id}`)
+			onShowClose () {//输入框失去焦点时触发
+				if(this.searchInputVal != ''){
+					this.isShowClose = true
+				}else{					
+					this.isShowClose = false
+				}
+			},
+			delInputText(){//清除输入框内容
+				this.searchInputVal = ''
+				this.isShowClose = false
+			},
+			_goImmediately(item){
+				this.$api.navigateTo(`/market/pages/cart/immediately?userID=${item.userID}&clubID=${item.clubID}`)
 			},
 			_goBuyagain(id){
 				this.$api.navigateTo(`/market/pages/cart/buyagain?id=${id}`)
@@ -181,13 +178,11 @@
 			}	
 		},
 		onShow() {
-			this.$api.getCommonStorage('clubInfo').then(response =>{
+			this.$api.getStorage().then(response =>{
 				console.log(response)
-				this.clubID = response.clubID
-				this.clubName = response.name
-				this.clubImage = response.image
+				this.serviceProviderId = response.serviceProviderID
 				this.pageNum = 1;
-				// this.initclubList();
+				this.initclubList();
 			})
 		}
 	}
@@ -212,7 +207,10 @@
 		background: #FFFFFF;
 		display: flex;
 		align-items: center;
-		margin-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
 		.search-from{
 			width: 582rpx;
 			height: 64rpx;
@@ -249,6 +247,7 @@
 		}
 	}
 	.club-main{
+		padding-top: 122rpx;
 		.list{
 			align-items: center;
 			width: 702rpx;
@@ -271,7 +270,7 @@
 				}
 			}
 			.list-item{
-				height: 140rpx;
+				height: 200rpx;
 				flex: 8;
 				display: flex;
 				flex-direction:column ;
@@ -282,15 +281,15 @@
 					font-size: $font-size-28;
 					color: $text-color;
 					text-align: left;
-					padding-left: 24rpx;
+					padding-left: 11rpx;
 				}
 				.list-opea{
 					width: 100%;
 					display: flex;
+					flex: 4;
 					color: #166CE1;
 					flex-direction: row;
 					align-items: center;
-					justify-content: center;
 					.btn{
 						width: 156rpx;
 						height: 60rpx;

+ 37 - 48
market/pages/club/list.vue

@@ -7,25 +7,25 @@
 				<text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
 			</view>
 			<view class="search-btn">
-				<button class="search-btn" type="default" @click.stop="searchOpertor">搜索</button>
+				<button class="search-btn" type="default" @click.stop="searchClubList">搜索</button>
 			</view>
 		</view>
 		<view class="club-main">
 			<view v-if="isEmpty" class="empty-container">
-				<view class="txt">暂无数据</view>
+				<view class="txt">暂无机构数据</view>
 			</view>
 			<view v-else class="club-list">
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in clubList" :key="index">
 						<view class="list-left">
-							<view class="list-head"><image :src="item.headimgurl ? item.headimgurl : '../../../static/temp/logo@3x.png'" mode=""></image></view>
+							<view class="list-head"><image :src="item.medicalPracticeLicenseImg ? item.medicalPracticeLicenseImg : '../../../static/temp/logo@3x.png'" mode=""></image></view>
 							<view class="list-tel">
 								<text class="txt">{{item.name}}</text>
-								<text class="txt sm"><text class="txt-le">{{item.linkName}}</text>{{item.mobile}}</text>
+								<text class="txt sm"><text class="txt-le">{{item.linkMan}}</text>{{item.contractMobile}}</text>
 							</view>
 						</view>
 						<view class="list-opea" v-if="tabCurrentIndex===2">
-							<view class="opea-type-dell" @click.stop="checkData(item.clubID)">
+							<view class="opea-type-dell" @click.stop="checkData(item.userID)">
 								<text class="iconfont icon-xieboke"></text>
 								<text>修改资料</text>
 							</view>
@@ -35,7 +35,7 @@
 							</view>
 						</view>
 						<view class="list-opea" v-else>
-							<view class="opea-type-cell" @click.stop="checkData(item.clubID)">
+							<view class="opea-type-cell" @click.stop="checkData(item.userID)">
 								<text class="iconfont icon-xieboke"></text>
 								<text>修改资料</text>
 							</view>
@@ -71,7 +71,7 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryclubList, deleteclub , updateCode } from "@/api/operator.js"
+	import { getSellerClubList } from "@/api/seller.js"
 	export default {
 		components:{
 			tuiLoadmore,
@@ -79,16 +79,11 @@
 		},
 		data() {
 			return {
-				clubID:'',
-				clubName:'',
-				clubImage:'',
-				linkman:'',
-				clubMobile:'',
+				serviceProviderId:'',
 				isShowClose:false,
 				searchInputVal:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
-				userID:'',
 				pageNum:1,
 				pageSize:10,
 				hasNextPage:false,
@@ -102,12 +97,8 @@
 				currPage:'',//当前页面
 				prevPage:'',//上一个页面
 				tabCurrentIndex:0,
-				clubList:[
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:123},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:321},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:456},
-					{headimgurl:'../../../static/temp/logo@3x.png',name:'上海默默美容会所管理机构',linkName:'郑先生',mobile:'13979770617',clubID:567},
-				],
+				listStatus:1,
+				clubList:[],
 				isIphoneX:this.$store.state.isIphoneX,
 				show_index:0,//控制显示那个组件
 			}
@@ -130,13 +121,13 @@
 					})
 				}, 500)
 			},
-			searchOpertor(){
+			searchClubList(){
 				this.pageNum=1
 				this.initclubList()
 			},
 			initclubList(){	
-				let params = {clubID:this.clubID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryclubList(params).then(response =>{
+				let params = {name:this.searchInputVal,pageNum:1,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
+				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -161,8 +152,8 @@
 			},	
 			getOnReachBottomData(){
 				this.pageNum+=1
-				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.clubMobile}
-				queryclubList(params).then(response =>{
+				let params = {name:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize,spId:this.serviceProviderId,status:this.listStatus}
+				getSellerClubList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -182,24 +173,20 @@
 					this.$util.msg(response.msg,2000)
 				})
 			},
-			rexpStautsColor(status) {
-			  let textColor = ''
-			  switch (status) {
-				case '1':
-				  textColor = '#55BB00'
-				  break
-				case '2':
-				  textColor = '#0056BB'
-				  break
-				case '3':
-				  textColor = '#BB0000'
-				  break
-			  }
-			  return textColor
-			},  
-			tabClick(index) {//商品详情&&供应商信息tab切换
+			tabClick(index) {//tab切换
 				this.tabCurrentIndex = index;
-				console.log(this.tabCurrentIndex)
+				switch(index){
+					case 0:
+						this.listStatus = 1
+						break;
+					case 1:
+						this.listStatus = 92
+						break;
+					case 2:
+						this.listStatus = 90
+						break;
+				}
+				this.initclubList()
 			},
 			checkData(id){
 				switch(this.tabCurrentIndex){
@@ -215,7 +202,7 @@
 				}
 			},
 			orderHistory(id){
-				this.$api.navigateTo(`/market/pages/order/order-history?id=${id}`)
+				this.$api.navigateTo(`/market/pages/order/order-history?clubID=${id}`)
 			},
 			onShowClose () {//输入框失去焦点时触发
 				if(this.searchInputVal != ''){
@@ -237,13 +224,11 @@
 			}	
 		},
 		onShow() {
-			this.$api.getCommonStorage('clubInfo').then(response =>{
+			this.$api.getStorage().then(response =>{
 				console.log(response)
-				this.clubID = response.clubID
-				this.clubName = response.name
-				this.clubImage = response.image
+				this.serviceProviderId = response.serviceProviderID
 				this.pageNum = 1;
-				// this.initclubList();
+				this.initclubList();
 			})
 		}
 	}
@@ -268,7 +253,10 @@
 		background: #FFFFFF;
 		display: flex;
 		align-items: center;
-		margin-bottom: 20rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 999;
 		.search-from{
 			width: 582rpx;
 			height: 64rpx;
@@ -318,6 +306,7 @@
 		}
 	}
 	.club-main{
+		padding-top: 122rpx;
 		.list{
 			display: flex;
 			align-items: center;

+ 10 - 36
market/pages/home/home.vue

@@ -66,7 +66,7 @@
 								<view class="title tui-skeleton-rect">
 									<text class="mclap">{{item.name}}</text>
 								</view>
-								<view class="" v-if="isLogin">
+								<view class="" v-if="!hasLogin">
 									<view class="title-none" v-if="item.price1TextFlag == '1'">
 										<text class="p big">尚未公开价格</text>
 									</view>
@@ -135,7 +135,7 @@
 	import cuTabbar from '@/components/cu-tabbar.vue'
 	import btSearch from '@/components/uni-search/bt-search.vue'
 	import uniStars from '@/components/uni-stars/uni-stars.vue'
-	import { userInfoLogin, queryHomeInfo } from "@/api/use.js"
+	import { queryHomeInfo } from "@/api/use.js"
 	import { queryPreferred } from "@/api/product.js"
 	import { mapMutations} from 'vuex';
 	export default {
@@ -160,7 +160,6 @@
 				current:0,
 				mode:'round',
 				modallayer:false,
-				isLogin:false,
 				bannerImageList:[],
 				hotGoodsList:[],
 				skeletonShow: true,
@@ -188,36 +187,15 @@
 			this.initData()
 		},
 		methods: {
-			...mapMutations(['login','logout']),
+			...mapMutations(['hasLogin']),
 			async initData(){
 				this.skeletonShow = true;
 				let hotGoodsList = await this.$util.json('hotGoodsList'); 
 				this.hotGoodsList = hotGoodsList;
 			},	
 			getCheekeyCode(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					// console.log(wechatcode);
-					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					userInfoLogin({code:wechatcode}).then(response =>{
-						this.isLogin = true;
-						this.userID = response.data.userID;						
-						this.$store.commit('updateStatus',response.data)
-						this.login(response.data);
-						uni.setStorageSync('token',response.data.token)
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.getHomeInformation()
-						this.getOrganizeProducts()
-					}).catch(response =>{
-						this.isLogin = false;
-						this.logout()
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',response.data)
-						this.getHomeInformation()
-						this.getOrganizeProducts()
-					})
-				})
+				this.getHomeInformation()
+				this.getOrganizeProducts()
 			},		
 			getHomeInformation(){		
 				queryHomeInfo({}).then(res =>{
@@ -292,7 +270,7 @@
 			},
 			telPhoneTo(){
 				let self = this;
-				this.$api.get('/home/afterSale',{organizeID:this.userOrganizeID}, 
+				this.$api.get('/home/afterSale',{}, 
 					response => {
 						console.log(response.data.contactNumber)
 						uni.makePhoneCall({
@@ -327,14 +305,10 @@
 		},
 		onShow(){
 			this.modallayer = false;
-			//查看此微信用户是否已经授权过
-			authorize.getSetting().then(res =>{// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
-				if(res == 1){
-					this.getCheekeyCode()
-				}else{
-					this.$api.redirectTo('/pages/authorization/authorization')
-				}
-			})				
+			this.$api.getStorage().then((resolve) =>{
+				this.userID = resolve.userID
+				this.getCheekeyCode()
+			})
 		}
 	}
 </script>

+ 80 - 219
market/pages/login/information.vue

@@ -1,15 +1,6 @@
 <template>
 	<view class="container register">
 		<view class="register-main first clearfix">
-			<view class="register-row">
-				<view class="register-title">账户信息</view>
-			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">邮箱:</view>
-					<view class="row-input">{{ email }}</view>
-				</view>
-			</view>
 			<view class="register-row">
 				<view class="register-title">基本信息</view>
 			</view>
@@ -25,34 +16,6 @@
 					<input class="row-input" type="text" v-model="clubContact" placeholder="请输入联系姓名" maxlength="6"/>
 				</view>
 			</view>
-			<view class="register-row clearfix">
-				<view class="register-from">
-					<view class="label">手机号:</view>
-					<input class="row-input" type="number" disabled="true" v-model="mobile" placeholder="请输入手机号" maxlength="11"/>
-					<view class="row-btn" @click="showCheckPhone">{{ isShowCheckPhone ? '取消修改' : '修改手机号' }}</view>
-				</view>
-			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from code">
-					<input class="row-input" type="number" v-model="mobileCode" placeholder="请输入上述手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
-					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
-				</view>
-			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from">
-					<input class="row-input" type="number" v-model="newMobile" placeholder="请输入新手机号" maxlength="11"/>
-				</view>
-			</view>
-			<view class="register-row clearfix" v-show="isShowCheckPhone">
-				<view class="register-from code">
-					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
-				</view>
-				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
-					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
-				</view>
-			</view>
 		</view>
 		<view class="register-main clearfix" >
 			<view class="register-row">
@@ -127,10 +90,6 @@
 					<view class="label">机构类型:</view>
 					<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
 					<text class="iconfont icon-xiayibu"></text>
-<!-- 				<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
-						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
-					</picker>
- -->					
 				</view>
 			</view>
 			<view class="register-row clearfix" v-if="isOrganizationType == 1">
@@ -273,8 +232,9 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import { organizationUpdateModifyInfo , organizationUpdate  } from "@/api/use.js"
-	import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js" 
+	import { organizationUpdateModifyInfo } from "@/api/use.js"
+	import { uploadFileImage } from "@/api/utils.js" 
+	import { sellerClubUpdate } from "@/api/seller.js" 
 	var self;
 	export default{
 		components:{
@@ -282,27 +242,13 @@
 		},
 		data() {
 			return{
-				isShowCheckPhone:false,		//是否显示修改手机
-				tabCurrentIndex:3,	
-				isPreviewImage:false,   	//预览图片开关
-				isMobileDisabled: false,	//手机验证码按钮控制
-				isNewMobileDisabled: false,	//手机验证码按钮控制
-				userID:'',					//用户ID
-				clubID:'',					//会所ID
-				email:'',					//邮箱
-			    count: '',					//倒计时
-			    newCount: '',					//倒计时
-			    codeTime: null,
-			    codeTimeNew: null,
-				clubName:'',	 			//机构名称
-				abbreviation:'',	 		//机构简称
-				clubContact:'',	 			//联系人
-				mobile:'',					//联系人手机号
-				newMobile:'',				//新联系人手机号
-				mobileCode:'',				//手机号验证码
-				newMobileCode:'',			//新手机号手机验证码
-				mobileCodeText: '获取验证码',
-				newMobileCodeText: '获取验证码',
+				isPreviewImage:false,   //预览图片开关
+				userID:'',				//机构的userID
+				clubID:'',				//会所ID
+				email:'',				//邮箱
+				clubName:'',	 		//机构名称
+				abbreviation:'',	 	//机构简称
+				clubContact:'',	 		//联系人
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
@@ -340,85 +286,77 @@
 			}	
 		},
 		onLoad(option) {
+			console.log(option)
+			this.userID = option.id
 			this.organizationInfo()
 		},
 		methods:{
-			hanldNavigateBack(){
-				this.$util.modal('','确定放弃本次修改吗?','确定','取消',true,() =>{
-					uni.navigateBack({
-						delta: 1
-					});
-				})
-			},
 			organizationInfo(){
-				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
-						let organizationClub = response.data.club
-						let organizationUser = response.data.user
-						this.email = organizationUser.email	
-						this.clubID = organizationUser.clubID
-						this.clubName = organizationClub.name
-						this.clubContact = organizationClub.linkMan
-						this.mobile = organizationUser.bindMobile
-						this.abbreviation = organizationClub.sname
-						if( organizationClub.provinceID == null ){
-							this.addressData.provinceID = ''
-						}else{
-							this.addressData.provinceID = organizationClub.provinceID
-						}
-						if( organizationClub.cityID == null ){
-							this.addressData.cityID = ''
-						}else{
-							this.addressData.cityID = organizationClub.cityID
-						}
-						if( organizationClub.townID == null ){
-							this.addressData.townID = ''
+				organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
+					let organizationClub = response.data.club
+					let organizationUser = response.data.user
+					this.email = organizationUser.email	
+					this.clubID = organizationUser.clubID
+					this.clubName = organizationClub.name
+					this.clubContact = organizationClub.linkMan
+					this.mobile = organizationUser.bindMobile
+					this.abbreviation = organizationClub.sname
+					if( organizationClub.provinceID == null ){
+						this.addressData.provinceID = ''
+					}else{
+						this.addressData.provinceID = organizationClub.provinceID
+					}
+					if( organizationClub.cityID == null ){
+						this.addressData.cityID = ''
+					}else{
+						this.addressData.cityID = organizationClub.cityID
+					}
+					if( organizationClub.townID == null ){
+						this.addressData.townID = ''
+					}else{
+						this.addressData.townID = organizationClub.townID
+					}
+					this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
+					this.socialCreditCode = organizationClub.socialCreditCode
+					this.firstClubType = organizationClub.firstClubType
+					this.secondClubType = organizationClub.secondClubType
+					this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
+					this.uploadBusinessImage = organizationClub.businessLicenseImage
+					this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
+					this.uploadMentuzImage = organizationClub.headpic
+					this.department = organizationClub.department						
+					this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
+					this.clubFax = organizationClub.fax ? organizationClub.fax : ''
+					this.companyPprofile = organizationClub.info ? organizationClub.info : ''
+					//机构类型&&主营项目
+					switch(this.firstClubType){
+						case '1':
+							this.organizationTypeText = '医美'
+							this.isOrganizationType = 1
+							break;
+						case '2':
+							this.organizationTypeText = '生美'
+							this.isOrganizationType = 2
+							break;
+						case null:
+							this.organizationTypeText = '请选择机构类型'
+							this.isOrganizationType = 0
+							break;
+					}	
+					if(organizationClub.mainpro!=""){
+						if(this.firstClubType == '1'){
+							this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							console.log(this.mentuzCampList)
 						}else{
-							this.addressData.townID = organizationClub.townID
+							this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
 						}
-						this.addressData.addressDetail = organizationClub.address ? organizationClub.address : ''
-						this.socialCreditCode = organizationClub.socialCreditCode
-						this.firstClubType = organizationClub.firstClubType
-						this.secondClubType = organizationClub.secondClubType
-						this.addressData.address = organizationClub.provincialAddress ? organizationClub.provincialAddress : ''
-						this.uploadBusinessImage = organizationClub.businessLicenseImage
-						this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
-						this.uploadMentuzImage = organizationClub.headpic
-						this.department = organizationClub.department						
-						this.clubTelePhone = organizationClub.contractPhone ? organizationClub.contractPhone : ''
-						this.clubFax = organizationClub.fax ? organizationClub.fax : ''
-						this.companyPprofile = organizationClub.info ? organizationClub.info : ''
-						//机构类型&&主营项目
-						switch(this.firstClubType){
-							case '1':
-								this.organizationTypeText = '医美'
-								this.isOrganizationType = 1
-								break;
-							case '2':
-								this.organizationTypeText = '生美'
-								this.isOrganizationType = 2
-								break;
-							case null:
-								this.organizationTypeText = '请选择机构类型'
-								this.isOrganizationType = 0
-								break;
-						}	
-						if(organizationClub.mainpro!=""){
-							if(this.firstClubType == '1'){
-								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
-								console.log(this.mentuzCampList)
-							}else{
-								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
-							}
-						}
-						//机构类型
-						switch(this.secondClubType){
-							case '1':this.current = 0;break;
-							case '2':this.current = 1;this.isDepartment=true;break;
-							case '3':this.current = 2;this.isDepartment=true;break;
-						}
-					})
+					}
+					//机构类型
+					switch(this.secondClubType){
+						case '1':this.current = 0;break;
+						case '2':this.current = 1;this.isDepartment=true;break;
+						case '3':this.current = 2;this.isDepartment=true;break;
+					}
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000)
 				})
@@ -446,10 +384,6 @@
 						clubID:this.clubID,					//会所ID
 						name:this.clubName,
 						linkMan:this.clubContact,
-						contractMobile2:this.mobile,
-						contractMobile:this.newMobile,
-						mobileCode:this.mobileCode,
-						newMobileCode:this.newMobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -469,83 +403,17 @@
 						info : this.companyPprofile
 				}
 				console.log(params)
-				organizationUpdate(params).then(response =>{
-					this.$util.msg(response.msg,2000);
+				sellerClubUpdate(params).then(response =>{
+					this.$util.msg('修改成功',2000);
 					setTimeout(()=>{
-						this.$api.switchTabTo('/pages/tabBar/user/user')
+						uni.navigateBack({
+							delta: 1
+						});
 					},2000)
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000);
 				})
 			},
-			getMobileCodeFn(){
-				if( this.mobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.mobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { mobile : this.mobile }
-				this.isMobileDisabled = true;
-				getClubMobileCode(params).then(response =>{
-					this.$util.msg('验证短信已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
-			       		this.isMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.mobileCodeText = this.count +'s重新发送'
-			        		} else {
-				         		this.isMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.mobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}		
-				}).catch( response =>{
-					this.$util.msg(response.msg,2000);
-					this.isMobileDisabled = false;
-				})
-			},
-			getNewMobileCodeFn(){
-				if( this.newMobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.newMobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				let params = { newMobile : this.newMobile }
-				this.isNewMobileDisabled = true;
-				getClubNewMobileCode(params).then(response =>{
-					this.$util.msg('验证短信已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTimeNew) {
-			       		this.newCount = TIME_COUNT;
-			       		this.isNewMobileDisabled = true;
-			       		this.codeTimeNew = setInterval(() => {
-			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
-			         			this.newCount
-			         			this.newMobileCodeText = this.newCount +'s重新发送'
-			        		} else {
-				         		this.isNewMobileDisabled = false;
-				         		clearInterval(this.codeTimeNew)
-				         		this.codeTimeNew = null
-								this.newMobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( res =>{
-					this.$util.msg(response.msg,2000);
-					this.isNewMobileDisabled = false;
-				})
-			},
 			// 三级联动选择
 			showMulLinkageThreePicker() {
 				this.isShowInput = true
@@ -708,13 +576,6 @@
 					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
 					this.medicaCampList.push(item)
 				}
-			},
-			showCheckPhone(){//控制修改手机显隐
-				this.isShowCheckPhone = !this.isShowCheckPhone
-			},
-			steps(index) {//$attrstab切换
-				console.log(index)
-				this.tabCurrentIndex = index;
 			}
 		},
 		onShow() {

+ 22 - 21
market/pages/login/login.vue

@@ -31,7 +31,8 @@
 <script>
 	import { mapMutations } from 'vuex';
 	import authorize from '@/common/config/authorize.js' 
-	import { SellerLogin,SellerWxLogin } from '@/api/seller.js' 
+	import { sellerLogin } from '@/api/seller.js' 
+	import { userInfoLogin } from "@/api/use.js"
 	var self;
 	export default{
 		data() {
@@ -60,18 +61,23 @@
 			getCheekeyCode(){
 				authorize.getCode('weixin').then(wechatcode =>{
 					// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					SellerWxLogin({code:wechatcode}).then(response =>{
-						this.$store.commit('updateStatus',response.data)
-						this.login(response.data);
-						uni.setStorageSync('token',response.data.token)
-						uni.removeStorageSync('sessionid')
-						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
-						this.$api.navigateTo('market/pages/user/user')
+					userInfoLogin({code:wechatcode}).then(response =>{
+						if(response.data.userIdentity !=1){
+							this.logout()
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+						}else{
+							this.login(response.data);
+							this.$store.commit('updateStatus',response.data)
+							uni.setStorageSync('token',response.data.token)
+							uni.removeStorageSync('sessionid')
+							uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+							this.$api.navigateTo('/market/pages/user/user')
+						}
 					}).catch(response =>{
 						this.logout()
 						uni.removeStorageSync('sessionid')
 						uni.setStorageSync('sessionid','JSESSIONID='+response.data)
-						this.$store.commit('updateStatus',response.data)
 					})
 				})
 			},	
@@ -80,20 +86,15 @@
 						mobile:this.accountNumber,
 						password:this.password
 				}
-				SellerLogin(params).then(response =>{
+				sellerLogin(params).then(response =>{
 					console.log(response)
-					debugger
 					if(response.code == '0' ){
-						this.storeUpdataeStatus(response.data)
-						this.$api.navigateTo(`/pages/login/bindwechat?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
-					}else if(response.code == '4'){
-						this.storeUpdataeStatus(response.data)					
-						this.$api.navigateTo(`/pages/login/bindemail?data=${JSON.stringify(this.getOption)}&codeType=${response.code}`)
-					}else if(response.code == '-3'){
-						this.storeUpdataeStatus(response.data)
-						this.$util.modal('',response.msg,'前往修改','',false,() =>{
-							 this.$api.navigateTo('/pages/login/apply')
-						})
+						this.$store.commit('updateStatus',response.data)
+						this.login(response.data);
+						uni.setStorageSync('token',response.data.token)
+						uni.removeStorageSync('sessionid')
+						uni.setStorageSync('sessionid','JSESSIONID='+response.data.sessionId)
+						this.$api.navigateTo('/market/pages/user/user')
 					}else{
 						this.$util.msg(response.msg,2000);
 					}

+ 30 - 160
market/pages/login/register.vue

@@ -1,6 +1,9 @@
 <template>
 	<view class="container register">
 		<view class="register-main clearfix">
+			<view class="register-row clearfix">
+				<text class="register-title">账户信息</text>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
 					<view class="label">邮箱:</view>
@@ -12,6 +15,9 @@
 			</view>
 		</view>
 		<view class="register-main clearfix">
+			<view class="register-row clearfix">
+				<text class="register-title">基本信息</text>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构名称:</view>
@@ -27,14 +33,17 @@
 			<view class="register-row clearfix">
 				<view class="register-from code">
 					<view class="label">手机号:</view>
-					<input class="row-input phone" type="text" v-model="mobileCode" placeholder="请输入联系人手机号" maxlength="11"/>
+					<input class="row-input phone" type="text" v-model="registerMobile" placeholder="请输入联系人手机号" maxlength="11"/>
 				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" >
+				<view class="register-from btn">
 					<button class="row-input" type="button" @click.stop="checkMobileFn">检测</button>
 				</view>
 			</view>
 		</view>
 		<view class="register-main detailed clearfix">
+			<view class="register-row clearfix">
+				<text class="register-title">详细信息<text>(请尽量填写)</text></text>
+			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">机构简称:</view>
@@ -100,10 +109,7 @@
 			<view class="register-row clearfix">
 				<view class="register-from picker">
 					<view class="label">机构类型:</view>
-						<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
-<!-- 					<picker @change="bindPickerChange" :value="index" :range="organizationTypeList" range-key="name">
-						<view class="row-input" :class="[isOrganizationType == 0 ? 'none' : '']">{{organizationTypeList[typtIndex].name}}</view>
-					</picker> -->
+					<view class="row-input picker" @click="bindPickerChange">{{ organizationTypeText }}</view>
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 			</view>
@@ -223,8 +229,8 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import authorize from '@/common/config/authorize.js' 
-	import { organizationRegister , organizationVerifyRegisterFirst ,organizationVerifyRegisterTwo } from "@/api/use.js"
-	import { getImageCode, getEmailCode, getMobileCode, uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/api/utils.js"
+	import { sellerClubRegister } from "@/api/seller.js"
 	var self;
 	export default{
 		components:{
@@ -232,31 +238,12 @@
 		},
 		data() {
 			return{
-				nvabarData: {		//顶部自定义导航
-					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
-					showSearch: 0,
-					title: '注册', // 导航栏 中间的标题
-				},
-				CustomBar:this.CustomBar,// 顶部导航栏高度
 				isPreviewImage:false,   	//预览图片开关
-				isEmialDisabled: false,		//验证码按钮控制
-				isMobileDisabled: false,	//手机验证码按钮控制
-			    count: '',					//倒计时
-			    emailCodeText: '获取验证码',
-			    mobileCodeText: '获取验证码',
-			    codeTime: null,
 				registerEmail:'', 		//注册邮箱
-				regEmailCode:'',  		//邮箱验证码
-				password:'',			//密码
-				passwordCheck:'',		//校验密码
 				clubName:'',	 		//机构名称
 				abbreviation:'',	 	//机构简称
 				clubContact:'',	 		//联系人
 				registerMobile:'',		//联系人手机号
-				mobileCode:'',			//手机验证码
-				imageCode:'',			//图形验证码
-				imageCodeUrl:'',		//图形验证码图片
-				imageCodetoken:'',		//图形验证校验
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
@@ -301,56 +288,12 @@
 			console.log(option)
 		},
 		methods:{
-			hanldNavigateBack(){
-				this.$util.modal('','注册尚未完成,确定放弃注册吗?','确定','取消',true,() =>{
-					uni.navigateBack({
-						delta: 1
-					});
-				})
-			},
-			registerStepsfirst(){
-				let params ={
-						email:this.registerEmail,
-						mailboxCode:this.regEmailCode,
-						password:this.password,
-						passWordConfirm:this.passwordCheck,
-						whichStep:1,
-				}
-				organizationVerifyRegisterFirst(params).then(res =>{
-					console.log(res)
-					this.getVerificationCode()
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
-			registerStepsTwo(){
-				let params ={
-						name:this.clubName,
-						linkMan:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
-						whichStep:2,
-				}
-				organizationVerifyRegisterTwo(params).then(res =>{
-					console.log(res)
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
 			registerStepsSub(){
-				if(!this.isCheck){
-					this.$util.msg('请勾选同意协议',2000);
-					return
-				}
 				let params ={
 						email:this.registerEmail,
-						mailboxCode:this.regEmailCode,
-						password:this.password,
-						passWordConfirm:this.passwordCheck,
 						name:this.clubName,
 						linkMan:this.clubContact,
 						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -365,96 +308,16 @@
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
 						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
-						whichStep:3
-				}
-				organizationRegister(params).then(res =>{
-					this.$util.msg('您的机构账号已提交审核',2000);
-					this.$api.switchTabTo('/pages/tabBar/home/home')
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
-			getEmailCodeFn(){
-				if( this.registerEmail == ''){
-					this.$util.msg('请输入邮箱地址',2000);
-					return
-				}
-				if(!this.$reg.isEmail(this.registerEmail)){
-					this.$util.msg('请输入正确的邮箱地址',2000);
-					return
 				}
-				this.isEmialDisabled = true;
-				getEmailCode({email:this.registerEmail,status:2}).then(res =>{
-					this.$util.msg('邮箱验证码已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
-						this.isEmialDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.emailCodeText = this.count +'s重新发送'
-			        		} else {
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.emailCodeText = '获取验证码'
-								this.isEmialDisabled = false;
-			        		}
-			       		},1000)
-			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
-					this.isEmialDisabled = false;
-				})
-			},
-			getMobileCodeFn(){
-				if( this.registerMobile == ''){
-					this.$util.msg('请输入手机号',2000);
-					return
-				}
-				if(!this.$reg.isMobile(this.registerMobile)){
-					this.$util.msg('请输入正确的手机号',2000);
-					return
-				}
-				if( this.imageCode == ''){
-					this.$util.msg('请输入图形验证码',2000);
-					return
-				}
-				let params = {
-						mobile:this.registerMobile,
-						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
-					}
-				this.isMobileDisabled = true;
-				getMobileCode(params).then(res =>{
-					this.$util.msg('验证短信已发送',2000);
-					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
-			       		this.isMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.mobileCodeText = this.count +'s重新发送'
-			        		} else {
-				         		this.isMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
-								this.mobileCodeText = '获取验证码'
-			        		}
-			       		},1000)
-			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
-					this.isEmialDisabled = false;
-				})
-			},
-			getVerificationCode(){//获取图形验证
-				getImageCode().then(res => {
-					this.imageCodeUrl = res.data.baseImage
-					this.imageCodetoken = res.data.token
+				sellerClubRegister(params).then(response =>{
+					this.$util.msg('注册成功,已短息通知联系人',2000);
+					setTimeout(()=>{
+						uni.navigateBack({
+							delta: 1
+						});
+					},2000)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			showMulLinkageThreePicker() {//三级地址联动
@@ -683,6 +546,13 @@
 				height: auto;
 				padding: 0 24rpx;
 				margin-bottom: 20rpx;
+				.register-title{
+					font-size: $font-size-32;
+					color: $text-color;
+					text{
+						font-size: $font-size-24;
+					}
+				}
 				.register-text{
 					line-height: 44rpx;
 					margin-top: 100rpx;

+ 11 - 21
market/pages/order/create-order.vue

@@ -60,7 +60,7 @@
 	import freightAlert from '@/components/module/modelAlert/freightAlert'
 	import modalLayer from "@/components/modal-layer"
 	import { queryAddressList } from "@/api/cart.js" 
-	import { createOrderInfo,createOrderSubmit,getOrderPostage } from "@/api/order.js" 
+	import { sellerSettlement,createOrderSubmit,getOrderPostage } from "@/api/seller.js" 
 	
 	export default {
 		components:{
@@ -75,11 +75,12 @@
 			return {
 				modallayer:false,
 				orderID:0,
+				clubID:'',
 				productIds:'',			  //获取上一级页面商品信息
 				productCount:'',		  //获取上一级页面商品数量
 				classifyIDS:'',			  //获取上一级页面商品分类
-				userID:'',				  //用户ID
-				cartType:'',			  //购买类型(1购物车提交,2直接购买提交)
+				serviceProviderId:'',	  //协销ID
+				cartType:1,			  //购买类型(1购物车提交,2直接购买提交)
 				submitState:'',  		  //提交状态
 				balanceDeductionFlag:2,   //勾选余额的状态(1使用,2不使用)
 				allCount:1,				  //订单提交总数量
@@ -104,31 +105,20 @@
 		},
 		onLoad(option){//商品数据
 			let data = JSON.parse(option.data);
-			console.log(data)
 			this.allPrice = data.data.allPrice;
 			this.allCount = data.data.allCount;
 			this.payAllPrice = this.allPrice;
-			// console.log(data)
-			if(option.type =='prodcut'){
-				this.cartType = 2
-				this.productCount = data.data.productCount
-				this.productIds = data.data.productID
-				// this.classifyIDS =  data.data.classifyID
-			}else{
-				this.cartType = 1
-				this.productCount = data.data.productCount
-				this.productIds = data.data.productID
-				// this.classifyIDS =  data.data.classifyID
-			}
-			this.getInitCrearOrder(option);
-			// this.getAddressData()
+			this.clubId = data.data.clubId
+			this.productCount = data.data.productCount
+			this.productIds = data.data.productID
+			this.getInitCrearOrder();
 		},
 		methods: {
 			getInitCrearOrder(option){//获取订单商品信息&&邮费信息&&发票信息
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					let params ={userId:this.userID,count:this.productCount,productIds:this.productIds}
-					createOrderInfo(params).then(response =>{
+					this.serviceProviderId = resolve.serviceProviderID
+					let params ={clubId:this.clubId,serviceProviderId:this.serviceProviderId,count:this.productCount,productIds:this.productIds}
+					sellerSettlement(params).then(response =>{
 						let resData = response.data
 						this.isRequest = true
 						this.goodsData = resData.shopList

+ 1 - 1
market/pages/order/order-details.vue

@@ -43,7 +43,7 @@
 	import refundRecord from '@/components/module/orderDetails/refundRecord'		 //退款记录
 	import orderButton from '@/components/module/orderDetails/orderButton'			 //底部按钮
 	import shareAlert from '@/components/module/modelAlert/shareAlert.vue'			 //分享弹窗
-	import { queryOrderDetails,cancelOrder,deleteOrder,confirmReceipt } from "@/api/order.js" 
+	import { getSellerOrderList } from "@/api/seller.js" 
 	export default {
 		components:{
 			headerBack,

+ 26 - 48
market/pages/order/order-history.vue

@@ -8,13 +8,13 @@
 				<scroll-view scroll-y="true" >
 					<view class="list" v-for="(item, index) in historyList" :key="index">
 						<view class="list-left">
-							<view class="list-p">订单号:<text class="txt">{{item.number}}</text><text v-if="item.flag == 1" class="tag">协销</text></view>
-							<view class="list-p">总金额:<text class="txt">¥{{item.money}}</text></view>
-							<view class="list-p">数量(赠):<text class="txt">{{item.num}}</text></view>
+							<view class="list-p">订单号:<text class="txt">{{item.orderNo}}</text><text v-if="item.payStatus == 1" class="tag">协销</text></view>
+							<view class="list-p">总金额:<text class="txt">¥{{orderPriceToFixed(item.orderTotalFee)}}</text></view>
+							<view class="list-p">数量(赠):<text class="txt">{{item.productCount}}</text></view>
 						</view>
 						<view class="list-opea">
 							<view class="opea-p">{{orderStateExp(item.status)}}</view>
-							<view class="opea-type-dell" @click.stop="orderDetiles(item.historyID)">
+							<view class="opea-type-dell" @click.stop="orderDetiles(item.orderID)">
 								<text>查看详情</text>
 							</view>
 						</view>
@@ -33,7 +33,7 @@
 	import authorize from '@/common/config/authorize.js'	
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import { queryhistoryList, deletehistory , updateCode } from "@/api/operator.js"
+	import { getSellerClubOrderList } from "@/api/seller.js" 
 	export default {
 		components:{
 			tuiLoadmore,
@@ -41,14 +41,10 @@
 		},
 		data() {
 			return {
-				historyID:'',
-				historyName:'',
-				historyImage:'',
-				linkman:'',
-				historyMobile:'',
+				clubID:'',
+				serviceProviderId:'',
 				isEmpty:false,
 				nomoreText: '上拉显示更多',
-				userID:'',
 				pageNum:1,
 				pageSize:10,
 				hasNextPage:false,
@@ -62,41 +58,18 @@
 				currPage:'',//当前页面
 				prevPage:'',//上一个页面
 				tabCurrentIndex:0,
-				historyList:[
-					{
-						number:'CM65656566556566',
-						money:'23000.00',
-						num:'1',
-						status:4,
-						historyID:1,
-						flag:0
-					},
-					{
-						number:'CM65656566556566',
-						money:'23000.00',
-						num:'1',
-						status:5,
-						historyID:1,
-						flag:0
-					},
-					{
-						number:'CM65656566556566',
-						money:'23000.00',
-						num:'1',
-						status:6,
-						historyID:1,
-						flag:1
-					},
-				],
+				historyList:[],
 			}
 		},
 		onLoad(option){	
 			console.log(option)
+			this.clubID = option.clubID
+			
 		},
 		methods: {
 			inithistoryList(){	
-				let params = {historyID:this.historyID,pageNum:1,pageSize:this.pageSize,linkName:this.linkman,mobile:this.historyMobile}
-				queryhistoryList(params).then(response =>{
+				let params = {clubID:this.clubID,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize};
+				getSellerClubOrderList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.isEmpty = false
@@ -121,8 +94,8 @@
 			},	
 			getOnReachBottomData(){
 				this.pageNum+=1
-				let params = {pageNum:this.pageNum,pageSize:this.pageSize,linkName:this.linkman,mobile:this.historyMobile}
-				queryhistoryList(params).then(response =>{
+				let params = {clubID:this.clubID,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize};
+				getSellerClubOrderList(params).then(response =>{
 					let responseData = response.data
 					if(responseData.results&&responseData.results.length > 0){
 						this.hasNextPage = response.data.hasNextPage
@@ -142,6 +115,11 @@
 					this.$util.msg(response.msg,2000)
 				})
 			},
+			orderPriceToFixed (n){
+				let price ='';
+				price = n.toFixed(2);
+				return price
+			},
 			//订单状态文字和颜色
 			orderStateExp (state){
 				let stateText = '',
@@ -182,14 +160,12 @@
 			}	
 		},
 		onShow() {
-			this.$api.getCommonStorage('historyInfo').then(response =>{
-				console.log(response)
-				this.historyID = response.historyID
-				this.historyName = response.name
-				this.historyImage = response.image
+			this.$api.getStorage().then((resolve) =>{
+				console.log(resolve)
+				this.serviceProviderId = resolve.serviceProviderID
 				this.pageNum = 1;
-				// this.inithistoryList();
-			})
+				this.inithistoryList();
+			})	
 		}
 	}
 </script>
@@ -235,6 +211,8 @@
 						color: #FFFFFF;
 						background: $btn-confirm;
 						text-align: center;
+						border-radius: 14rpx;
+						margin-left: 20rpx;
 					}
 				}
 			}

+ 36 - 24
market/pages/order/order-list.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container" :style="{paddingTop:navbarHeight+'px'}">
 		<!-- 自定义返回 -->
-		<header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :isDelete="isDelete" @goSearchPath="handlSearchPath"></header-back>
+		<header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" @goSearchPath="handlSearchPath"></header-back>
 		<view class="order-section-top" :style="{marginTop:navbarHeight+'px'}">
 			<scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
 				<view v-for="(item,index) in orderTabBar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']"
@@ -22,7 +22,7 @@
 							<view  class="tui-order-item" v-for="(order,orderIndex) in tabItem.orderList" :key="orderIndex" @click.stop="detail(order.orderID)">
 								<view class="order-title">
 									<view class="order-title-t">
-										<view class="order-title-num tui-skeleton-fillet">订单号:{{order.orderNo}}</view>
+										<view class="order-title-num tui-skeleton-fillet"><text class="tag">协销</text>订单号:{{order.orderNo}}</view>
 										<view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
 									</view>
 									<view class="order-title-b">下单时间:{{order.orderTime}}</view>
@@ -90,11 +90,11 @@
 	import tuiListCell from "@/components/tui-components/list-cell/list-cell"
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
-	import orderButton from '@/components/module/orderDetails/orderListButton'		 //按钮
+	import orderButton from '@/components/module/orderDetails/sellerOrderButton'		 //按钮
 	import modalLayer from "@/components/modal-layer"
 	import empty from "@/components/empty";
 	import shareAlert from '@/components/module/modelAlert/shareAlert'			 //分享弹窗
-	import { queryOrderList,cancelOrder,deleteOrder,confirmReceipt } from "@/api/order.js" 
+	import { getSellerOrderList } from "@/api/seller.js" 
 	
 	export default {
 		components: {
@@ -111,12 +111,12 @@
 		},
 		data() {
 			return {
-				orderTabBar: [{state: 0,text: '全部订单',orderList: []},
-							  {state: 1,text: '待确认',orderList: []},
-							  {state: 2,text: '待付款',orderList: []},
-							  {state: 3,text: '待发货',orderList: []},
-							  {state: 4,text: '已发货',orderList: []},
-							  {state: 5,text: '退货/款',orderList: []},
+				orderTabBar: [{listType: 0,text: '全部订单',orderList: []},
+							  {listType: 1,text: '待确认',orderList: []},
+							  {listType: 2,text: '待付款',orderList: []},
+							  {listType: 3,text: '待发货',orderList: []},
+							  {listType: 4,text: '已发货',orderList: []},
+							  {listType: 5,text: '退货/款',orderList: []},
 							 ],
 				headerBtnPosi:	this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 				systeminfo:  this.setSysteminfo(),		 //获取设备信息
@@ -128,7 +128,7 @@
 				winHeight: "", //窗口高度
 				currentTab: 0, //预设当前项的值
 				scrollLeft: 0 ,//tab标题的滚动条位置
-				userID:0,
+				serviceProviderId:0,//协销用户ID
 				orderData: [],
 				btnoRderID: 0, //点击按钮传入的的订单ID
 				pageNum: 1,	  //页数
@@ -136,9 +136,9 @@
 				scrollTop: 0,
 				deteleType:'',
 				skeletonShow: true,
-				isDelete:false,
 				isClickChange: false,
 				isShareModal: false,//控制分享弹窗
+				isSeller:false,
 				isModalLayer: false,
 				loadding: false,
 				pullUpOn: true,
@@ -148,11 +148,10 @@
 				nomoreText: '上拉显示更多',
 			}
 		},
-		onLoad(e) {
+		onLoad(option) {
 			let that = this;
-			console.log(e)
-			if(e.type ==='detele'){that.isDelete = true}
-			that.currentTab = e.state
+			console.log(option)
+			that.currentTab = option.listType
 			that.getHeaderTopHeight()//设置自定义导航高度
 			//  高度自适应
 			uni.getSystemInfo({
@@ -214,19 +213,20 @@
 				 */ 
 				setTimeout(()=>{this.skeletonShow = false},1500)
 				let orderItem = this.orderTabBar[index];
-				let state = orderItem.state;
+				let listType = orderItem.listType;
 				if(source === 'tabChange' && orderItem.loaded === true){
 					//tab切换只有第一次需要加载数据
 					return;
 				}
 				setTimeout(()=>{
 					this.$api.getStorage().then((resolve) =>{
-						this.userID = resolve.userID
-						let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
-						queryOrderList(params).then(response =>{
+						console.log(resolve)
+						this.serviceProviderId = resolve.serviceProviderID
+						let params = {listType:index,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize};
+						getSellerOrderList(params).then(response =>{
 							let orderList = response.data.results.filter(item=>{
 								//添加不同状态下订单的表现形式
-								item = Object.assign(item, this.orderStateExp(item.state));
+								item = Object.assign(item, this.orderStateExp(item.listType));
 								return item;
 							});
 							orderItem.orderList =[];
@@ -255,8 +255,8 @@
 			}, 
 			getOnReachBottomData(index){//上拉加载
 				this.pageNum+=1
-				let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
-				queryOrderList(params).then(response =>{
+				let params = {listType:index,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize};
+				getSellerOrderList(params).then(response =>{
 					let orderItem = this.orderTabBar[index];
 					let resData = response.data.results
 					this.hasNextPage = response.data.hasNextPage;
@@ -285,7 +285,7 @@
 			detail(id) {//订单详情跳转
 				console.log(id)
 				this.isModalLayer = true;	
-				this.$api.navigateTo(`/market/pages/order/order-details?state=${this.currentTab}&orderID=${id}`)
+				this.$api.navigateTo(`/market/pages/order/order-details?listType=${this.currentTab}&orderID=${id}`)
 			},
 			handButtonConfirm(data) {//获取点击
 				console.log('点击按钮的类型是',data);
@@ -533,6 +533,18 @@
 				float: left;
 				text-align: left;
 				color: $color-system;
+				.tag{
+					display: inline-block;
+					width: 60rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					font-size: $font-size-20;
+					color: #FFFFFF;
+					background: $btn-confirm;
+					text-align: center;
+					border-radius: 18rpx;
+					margin-right: 15rpx;
+				}
 			}
 			.order-title-tip{
 				float: right;

+ 46 - 70
market/pages/user/user.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container user clearfix" :style="{paddingBottom:isIphoneX?'140rpx':'98rpx'}">
-		<view class="user-section" :class="[!isShowNoLogin  ? 'show' : 'none']">
+		<view class="user-section">
 			<view class="u-header">
 				<image src="https://admin-b.caimei365.com/userfiles/1/images/photo/2020/03/%E6%88%91%E7%9A%84%20%E2%80%93%201%403x.png" mode=""></image>
 				<view class="u-header-main">
@@ -17,59 +17,64 @@
 			</view>
 			<!-- 订单 -->
 			<view class="user-order">
-				<view class="tab-title" @click="navigator('/market/pages/order/order-list?state=0')">
+				<view class="tab-title" @click="navigator('/market/pages/order/order-list?listType=0')">
 					<text class="cell-tit">我的订单</text>
 					<text class="cell-more">查看更多</text>
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="order-section">
-					<view class="order-item" @click="navigator('/market/pages/order/order-list?state=1')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/market/pages/order/order-list?listType=1')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order1@3x.png" mode=""></image>
-							<text 	v-if="paymentCount >0" 
+							<text 	v-if="beforeConfirmCount >0" 
 									class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
-									:class="[paymentCount < 10 ? 'goleft':'']">
-									{{paymentCount == 99? '99+' : paymentCount}}
+									:class="[beforeConfirmCount < 10 ? 'goleft':'']">
+									{{beforeConfirmCount == 99? '99+' : beforeConfirmCount}}
 							</text>
 						</view>
 						<text class="order-t">待确认</text>
 					</view>
-					<view class="order-item" @click="navigator('/market/pages/order/order-list?state=2')"  hover-class="common-hover" :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/market/pages/order/order-list?listType=2')"  hover-class="common-hover" :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order2@3x.png" mode=""></image>
-							<text  v-if="waitShipmentsCount >0" 
+							<text  v-if="beforePayCount >0" 
 								   class="uni-badge uni-badge-error uni-small uni-badge--small icon-num " 
-								   :class="[waitShipmentsCount < 10 ? 'goleft':'']">
-								   {{waitShipmentsCount == 99? '99+' : waitShipmentsCount}}
+								   :class="[beforePayCount < 10 ? 'goleft':'']">
+								   {{beforePayCount == 99? '99+' : beforePayCount}}
 							</text>
 						</view>
 						<text class="order-t">待付款</text>
 					</view>
-					<view class="order-item" @click="navigator('/market/pages/order/order-list?state=3')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/market/pages/order/order-list?listType=3')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order3@3x.png" mode=""></image>
-							<text   v-if="shipmentsCount >0" 
+							<text   v-if="beforeShipCount >0" 
 									class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
-									:class="[shipmentsCount < 10 ? 'goleft':'']">
-									{{shipmentsCount == 99? '99+' : shipmentsCount}}
+									:class="[beforeShipCount < 10 ? 'goleft':'']">
+									{{beforeShipCount == 99? '99+' : beforeShipCount}}
 							</text>
 						</view>
 						<text class="order-t">待发货</text>
 					</view>
-					<view class="order-item" @click="navigator('/market/pages/order/order-list?state=5')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/market/pages/order/order-list?listType=4')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order4@3x.png" mode=""></image>
-							<text 	v-if="salesReturnCount >0" 
+							<text 	v-if="shippedCount >0" 
 									class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
-									:class="[salesReturnCount < 10 ? 'goleft':'']">
-									{{salesReturnCount == 99? '99+' : salesReturnCount}}
+									:class="[shippedCount < 10 ? 'goleft':'']">
+									{{shippedCount == 99? '99+' : shippedCount}}
 							</text>
 						</view>
 						<text class="order-t">已发货</text>
 					</view>
-					<view class="order-item" @click="navigator('/market/pages/order/order-list?state=4')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/market/pages/order/order-list?listType=5')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order5@3x.png" mode=""></image>
+							<text 	v-if="refundsCount >0"
+									class="uni-badge uni-badge-error uni-small uni-badge--small icon-num" 
+									:class="[refundsCount < 10 ? 'goleft':'']">
+									{{refundsCount == 99? '99+' : refundsCount}}
+							</text>
 						</view>
 						<text class="order-t">退货/款</text>
 					</view>
@@ -93,7 +98,7 @@
 	import cuTabbar from '@/components/cu-tabbar.vue'
 	import uniBadge from '@/components/uni-badge/uni-badge.vue'
 	import { mapState,mapMutations } from 'vuex'
-	import { personalInfo } from "@/api/use.js"
+	import { getSellerHome } from "@/api/seller.js"
 	
 	export default{
 		components: {
@@ -102,18 +107,17 @@
 		},
 		data() {
 			return{	
-				name:'采美采购商城',
+				name:'采美协销',
 				headpic:'',
 				userMoney:0.00,
-				contactNumber:'',
-				openid:'',
+				userId:'',
 				aboutHtml:'',
 				telPhone:'',
-				paymentCount:0, //待付款角标
-				waitShipmentsCount:0, //待收货角标
-				shipmentsCount:0,  //已发货角标
-				salesReturnCount:'',//退货/款角标
-				isShowNoLogin:false,
+				beforeConfirmCount:0,//待确认角标
+				beforePayCount:0, 	//待付款角标
+				beforeShipCount:0, //待发货角标
+				shippedCount:0,   //已发货角标
+				refundsCount:'', //退货/款角标
 				isIphoneX:this.$store.state.isIphoneX,
 				firstList:[
 					{name:'机构列表',path:'/market/pages/club/list'},
@@ -130,31 +134,15 @@
 		},
 		methods:{
 			initData(){
-				personalInfo({userID:this.userID}).then(response =>{
-					this.$store.commit('updateAllNum',response.data.count)
-					let user_data =response.data
-					let _userData = user_data.user
-					let _clubData = user_data.club
-					if(_userData.ableUserMoney == 0){
-						this.userMoney = '0.00';
-					}else{
-						let i =  _userData.ableUserMoney.toString().lastIndexOf('.');
-						let money;
-						if(i==-1){
-							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
-							this.userMoney = money +'.00'
-						}else{
-							money = this.$api.FormatMoney(_userData.ableUserMoney); //会所剩余余额
-							this.userMoney = money
-						}
-					}
-					this.name = _clubData.name //会所名称
-					this.headpic = _userData.image //会所头像
-					this.contactNumber = user_data.organize.contactNumber //联系电话		
-					this.paymentCount = this.showBadge(user_data.paymentCount)//待付款
-					this.waitShipmentsCount = this.showBadge(user_data.waitShipmentsCount)//待收货		
-					this.shipmentsCount = this.showBadge(user_data.shipmentsCount)//已发货	
-					this.salesReturnCount = this.showBadge(user_data.salesReturnCount)//退货/款	
+				getSellerHome({userId:this.userId}).then(response =>{
+					let sellerData = response.data
+					this.name = sellerData.seller.name 	//协销名称
+					this.headpic = sellerData.seller.logo //会所头像
+					this.beforeConfirmCount = this.showBadge(sellerData.beforeConfirmCount)//待付款
+					this.beforePayCount = this.showBadge(sellerData.beforePayCount)//待付款
+					this.beforeShipCount = this.showBadge(sellerData.beforeShipCount)//待发货		
+					this.shippedCount = this.showBadge(sellerData.shippedCount)//已发货	
+					this.refundsCount = this.showBadge(sellerData.refundsCount)//退货/款	
 					let clubInfo ={name:this.name,image:this.headpic,clubID:_clubData.clubID}
 					uni.setStorage({//缓存机构
 						key: 'clubInfo',  
@@ -164,11 +152,6 @@
 					this.$util.msg(response.msg,2000)
 				})
 			},
-			toPhone(){
-				uni.makePhoneCall({
-				    phoneNumber:this.contactNumber //仅为示例
-				});
-			},
 			navigator(url){
 				this.$api.navigateTo(url)
 			},			
@@ -182,18 +165,11 @@
 				uni.stopPullDownRefresh()
 			},
 			onShow(){
-				if(!this.hasLogin){
-					this.isShowNoLogin = true;
-					this.$api.navigateTo('/market/pages/login/login')
-					this.$store.commit('updateAllNum',0)
-				}else{
-					this.$api.getStorage().then((resolve) =>{
-						// console.log(resolve)
-						this.userID = resolve.userID
-						this.initData()
-						this.isShowNoLogin = false;
-					})
-				}
+				this.$api.getStorage().then((resolve) =>{
+					// console.log(resolve)
+					this.userId = resolve.userID
+					this.initData()
+				})
 			}
 		}
 	}

+ 2 - 2
pages/login/apply.vue

@@ -408,9 +408,9 @@ import { mapMutations } from 'vuex';
 							case '2':this.current = 1;this.isDepartment=true;break;
 							case '3':this.current = 2;this.isDepartment=true;break;
 						}
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
 					})
-				}).catch(response =>{
-					this.$util.msg(response.msg,2000)
 				})
 			},
 			organizationUpdateInfo(){//提交审核

+ 2 - 2
pages/login/information.vue

@@ -424,9 +424,9 @@
 							case '2':this.current = 1;this.isDepartment=true;break;
 							case '3':this.current = 2;this.isDepartment=true;break;
 						}
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
 					})
-				}).catch(response =>{
-					this.$util.msg(response.msg,2000)
 				})
 			},
 			organizationUpdateInfo(){//提交审核

+ 3 - 3
pages/tabBar/cart/cart.vue

@@ -30,17 +30,17 @@
 													@click.stop="ischeck(item,pros,idx)">
 											</button>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
 										<view class="pros-product">
 											<view class="producttitle" @click.stop="navToListPage(pros.id)"	>
 												<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
 											</view>
-											<view class="productspec">规格:{{pros.unit}}</view>
+											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
 												<view 	class="price" 
 														:class="[pros.validFlag == '3' ?'disabled' : '']">
-														<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>{{pros.retailPrice.toFixed(2)}}
+														<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>{{pros.retailPrice?pros.retailPrice.toFixed(2):''}}
 												</view>
 												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
 													<view class="number-box">

+ 6 - 6
pages/tabBar/user/user.vue

@@ -25,7 +25,7 @@
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="order-section">
-					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=5')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=1')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order1@3x.png" mode=""></image>
 							<text 	v-if="paymentCount >0" 
@@ -36,7 +36,7 @@
 						</view>
 						<text class="order-t">待确认</text>
 					</view>
-					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=1')"  hover-class="common-hover" :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=2')"  hover-class="common-hover" :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order2@3x.png" mode=""></image>
 							<text  v-if="waitShipmentsCount >0" 
@@ -45,9 +45,9 @@
 								   {{waitShipmentsCount == 99? '99+' : waitShipmentsCount}}
 							</text>
 						</view>
-						<text class="order-t">付款</text>
+						<text class="order-t">付款</text>
 					</view>
-					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=2')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=3')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order3@3x.png" mode=""></image>
 							<text   v-if="shipmentsCount >0" 
@@ -58,7 +58,7 @@
 						</view>
 						<text class="order-t">待发货</text>
 					</view>
-					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=3')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=4')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order4@3x.png" mode=""></image>
 							<text 	v-if="salesReturnCount >0" 
@@ -69,7 +69,7 @@
 						</view>
 						<text class="order-t">已发货</text>
 					</view>
-					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=4')" hover-class="common-hover"  :hover-stay-time="50">
+					<view class="order-item" @click="navigator('/pages/user/order/order-list?state=5')" hover-class="common-hover"  :hover-stay-time="50">
 						<view class="order-icon">
 							<image src="../../../static/temp/order5@3x.png" mode=""></image>
 						</view>