Jelajahi Sumber

用户体系优化V1.0.0

zhengjinyi 5 tahun lalu
induk
melakukan
1d7885be07

+ 27 - 12
api/cart.js

@@ -7,13 +7,28 @@
  */
 import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
+
+/**
+ *加入购物车
+ */
+export function shoppingAddCart(params) {
+	return new Promise(function(resolve,reject) {
+		request.post('/shoppingCart/addCart',params, true,res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
 /**
  *获取购物车列表
  */
 export function queryShoppingCartList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+		request.get('/shoppingCart/shoppingInfo',params, res => {
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -22,12 +37,12 @@ export function queryShoppingCartList(params) {
 	})
 }
 /**
- *购物车商品增减
+ *更新购物车商品增减
  */
-export function cartUpdate(params) {
+export function shoppingCartUpdate(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+		request.post('/shoppingCart/update',params, res => {
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -38,10 +53,10 @@ export function cartUpdate(params) {
 /**
  *购物车删除商品
  */
-export function cartDelete(params) {
+export function shoppingCartDelete(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+		request.post('/club/authorization',params, res => {
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -55,7 +70,7 @@ export function cartDelete(params) {
 export function queryAddressList(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/personalCenter/findAddress',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -69,7 +84,7 @@ export function queryAddressList(params) {
 export function addNewAddress(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/personalCenter/saveAddress',params,true, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -83,7 +98,7 @@ export function addNewAddress(params) {
 export function deleteNewAddress(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/findAddress/deleteAddress',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)

+ 4 - 4
api/operator.js

@@ -16,7 +16,7 @@ import $reg from '@/common/config/common.js'
 export function queryOperatorList(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/operation/list',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -30,7 +30,7 @@ export function queryOperatorList(params) {
 export function addOperator(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -44,7 +44,7 @@ export function addOperator(params) {
 export function deleteOperator(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/operation/delete',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -58,7 +58,7 @@ export function deleteOperator(params) {
 export function updateCode(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/operation/updateInvitationCode',params,true, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)

+ 29 - 11
api/order.js

@@ -8,13 +8,31 @@ import request from '@/common/config/caimeiApi.js'
 import $reg from '@/common/config/common.js'
 
 /**
- *获取订单区列表
- * @param
+ *@提交订单
+ *@param productIds 商品ID【”,”分割】
+ *@param count		立即购买商品数量,购物车count为nul
+ */
+export function createOrderInfo(params) {
+	return new Promise(function(resolve,reject) {
+		request.get('/order/confirm',params, res => {
+			if(res.code == 0){
+				resolve(res)
+			}else{
+				reject(res)
+			}
+		})
+	})
+}
+/**
+ *@获取订单列表
+ *@param orderState 订单状态 1 2 3 4
+ *@param pageNum	页码
+ *@param pageSize	条数
  */
 export function queryOrderList(params) {
 	return new Promise(function(resolve,reject) {
-		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+		request.get('/order/list',params, res => {
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -29,7 +47,7 @@ export function queryOrderList(params) {
 export function queryOrderShareCode(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -44,7 +62,7 @@ export function queryOrderShareCode(params) {
 export function cancelOrder(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -59,7 +77,7 @@ export function cancelOrder(params) {
 export function deleteOrder(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -74,7 +92,7 @@ export function deleteOrder(params) {
 export function confirmReceipt(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -89,7 +107,7 @@ export function confirmReceipt(params) {
 export function queryLogistics(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -104,7 +122,7 @@ export function queryLogistics(params) {
 export function queryOrderDetails(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -119,7 +137,7 @@ export function queryOrderDetails(params) {
 export function orderShareLogin(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/authorization',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)

+ 5 - 5
api/other.js

@@ -13,7 +13,7 @@ import request from '@/common/config/caimeiApi.js'
 export function queryMember(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/home/member',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -28,7 +28,7 @@ export function queryMember(params) {
 export function queryAfterSale(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/home/afterSale',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -43,7 +43,7 @@ export function queryAfterSale(params) {
 export function protocolAgree(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/club/protocol',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -58,7 +58,7 @@ export function protocolAgree(params) {
 export function queryInvoice(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/personalCenter/findInvoice',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -73,7 +73,7 @@ export function queryInvoice(params) {
 export function querySaveInvoice(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/personalCenter/invoice',params, true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)

+ 38 - 8
api/product.js

@@ -13,7 +13,7 @@ import $reg from '@/common/config/common.js'
 export function queryGoodscategory() {
 	return new Promise(function(resolve,reject) {
 		request.lodingGet("/product/classify",{}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -30,7 +30,7 @@ export function queryGoodscategory() {
 export function queryGoodslist(url,params) {
 	return new Promise(function(resolve,reject) {
 		request.get(url,params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -47,7 +47,7 @@ export function queryGoodslist(url,params) {
 export function querySearchProduct(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/search",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -62,7 +62,7 @@ export function querySearchProduct(params) {
 export function querySearchHistory() {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/searchHistory",{}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -77,7 +77,37 @@ export function querySearchHistory() {
 export function queryProductDetils(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/details",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
+/**
+ * @商品相关推荐
+ * @param:productID 商品ID
+ */
+export function queryRelevant(params) {
+	return new Promise(function(resolve,reject) {
+		request.get("/product/relevant",params, res => {
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
+/**
+ * @商品评价
+ * @param:productID 商品ID
+ */
+export function queryEvaluate(params) {
+	return new Promise(function(resolve,reject) {
+		request.get("/product/evaluate",params, res => {
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -94,7 +124,7 @@ export function queryProductDetils(params) {
 export function queryPreferred(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/preferred",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -111,7 +141,7 @@ export function queryPreferred(params) {
 export function queryAgaingoodslist(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product/preferred",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -128,7 +158,7 @@ export function queryAgaingoodslist(params) {
 export function addCart(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/product//preferred",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)

+ 16 - 24
api/use.js

@@ -45,7 +45,7 @@ export function organizationVerifyRegisterFirst(params) {
 			return
 		}
 		request.post('/club/verifyRegister',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -83,7 +83,7 @@ export function organizationVerifyRegisterTwo(params) {
 			return
 		}
 		request.post('/club/verifyRegister',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -101,7 +101,7 @@ export function organizationRegister(params) {
 	}
 	return new Promise(function(resolve,reject) {
 		request.post('/user/club/clubRegister',params,true, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -115,7 +115,7 @@ export function organizationRegister(params) {
 export function organizationUpdateModifyInfo(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/user/club/applicationData',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -129,7 +129,7 @@ export function organizationUpdateModifyInfo(params) {
 export function organizationModifyUpdate(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/user/club/updateCompanyInfo',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -143,7 +143,7 @@ export function organizationModifyUpdate(params) {
 export function organizationUpdate(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/operation/modifiedData',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -194,8 +194,8 @@ export function bindingEmail(params) {
 			return
 		}
 		request.post('/user/binding',params,true, res => {
-			if(res.code == '0'){
-				resolve(res)
+			if(res.code == 0){
+				resolve(res);
 			}else{
 				reject(res)
 			}
@@ -208,7 +208,7 @@ export function bindingEmail(params) {
 export function bindingWechat(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/club/bindingWx',params,true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -222,11 +222,7 @@ export function bindingWechat(params) {
 export function invitationCodeLogin(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/club/invitationCode',params,true, res => {
-			if(res.code == '0'){
-				resolve(res)
-			}else{
-				reject(res)
-			}
+			resolve(res)
 		})
 	})
 }
@@ -236,11 +232,7 @@ export function invitationCodeLogin(params) {
 export function personalInfo(params) {
 	return new Promise(function(resolve,reject) {
 		request.lodingGet('/personalCenter/myCentre',params, res => {
-			if(res.code == '0'){
-				resolve(res)
-			}else{
-				reject(res)
-			}
+			resolve(res)
 		})
 	})
 }
@@ -250,7 +242,7 @@ export function personalInfo(params) {
 export function accountInfo(params) {
 	return new Promise(function(resolve,reject) {
 		request.lodingGet('/personalCenter/touchBalance',params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -265,7 +257,7 @@ export function accountInfo(params) {
 export function queryHomeInfo(params) {
 	return new Promise(function(resolve,reject) {
 		request.get('/home/modules',{params}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -280,7 +272,7 @@ export function queryHomeInfo(params) {
 export function userInfoLogin(params) {
 	return new Promise(function(resolve,reject) {
 		request.post('/club/authorization',params,false, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -326,7 +318,7 @@ export function mobilePassword(params) {
 			return
 		}
 		request.post('/user/findCompanyPwd',params, true,res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)
@@ -372,7 +364,7 @@ export function emailPassword(params) {
 			return
 		}
 		request.post('/user/findCompanyPwd',params,true, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res)
 			}else{
 				reject(res)

+ 8 - 8
api/utils.js

@@ -13,7 +13,7 @@ import $reg from '@/common/config/common.js'
 export function queryAddressInformation() {
 	return new Promise(function(resolve,reject) {
 		request.get("/club/address",{}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -27,7 +27,7 @@ export function queryAddressInformation() {
 export function queryProtocol() {
 	return new Promise(function(resolve,reject) {
 		request.get("/club/protocol",{}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -41,7 +41,7 @@ export function queryProtocol() {
 export function getImageCode() {
 	return new Promise(function(resolve,reject) {
 		request.get("/user/getImgVerifyCode",{platformType:2}, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -63,7 +63,7 @@ export function getEmailCode(params) {
 			return
 		}
 		request.get("/user/mailbox",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -89,7 +89,7 @@ export function getMobileCode(params) {
 			return
 		}
 		request.get("/user/activateCodeByReg",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -104,7 +104,7 @@ export function getMobileCode(params) {
 export function getClubMobileCode(params) {
 	return new Promise(function(resolve,reject) {
 		request.get("/club/modifyPhoneNumber",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -127,7 +127,7 @@ export function getClubNewMobileCode(params) {
 			return
 		}
 		request.get("/club/modifyPhoneNumber",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)
@@ -153,7 +153,7 @@ export function getbindWechatCode(params) {
 			return
 		}
 		request.get("/user/note",params, res => {
-			if(res.code == '0'){
+			if(res.code == 0){
 				resolve(res);
 			}else{
 				reject(res)

+ 0 - 1
common/config/caimeiApi.js

@@ -76,7 +76,6 @@ const caimeiApi = {
 	 * @方法参数:请求地址,请求后台需要的参数字段,回调函数
 	 */
 	post:function(url,data,loadingStatus,callback){
-		console.log(data)
 		if(loadingStatus){uni.showLoading({mask: true,title:'加载中~'})}
 		uni.request({
 			url: requestUrl+url,

+ 25 - 1
common/css/iconfont.scss

@@ -4,7 +4,7 @@
 	font-family: iconfont;
 	font-weight: normal;
 	font-style: normal;
-	src: url('https://at.alicdn.com/t/font_1519039_upect5g4aj.ttf') format('truetype');
+	src: url('https://at.alicdn.com/t/font_1519039_wbaaxrlswa.ttf') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -13,6 +13,30 @@
 	-webkit-font-smoothing: antialiased;
 	-moz-osx-font-smoothing: grayscale;
 }
+.icon-dkw_jine:before {
+  content: "\e625";
+}
+
+.icon-ziyuan:before {
+  content: "\e626";
+}
+
+.icon-aixin:before {
+  content: "\e663";
+}
+
+.icon-qian:before {
+  content: "\e642";
+}
+
+.icon-qian1:before {
+  content: "\e62c";
+}
+
+.icon-xiaochengxu_tubiao-:before {
+  content: "\e624";
+}
+
 .icon-iconfontguanbi:before {
   content: "\e623";
 }

+ 1 - 1
components/module/headerNavbar/header-back.vue

@@ -135,7 +135,7 @@
 		 position: fixed;
 		 width: 100%;
 		 top: 0;
-		 z-index: 9999;
+		 z-index: 100000;
 		 box-sizing: border-box;
 		 background: #FFFFFF;
 	}

+ 1 - 1
components/module/headerNavbar/header-poduct.vue

@@ -116,7 +116,7 @@
 		 position: fixed;
 		 width: 100%;
 		 top: 0;
-		 z-index: 9999;
+		 z-index: 100000;
 		 box-sizing: border-box;
 		 &.bg-color{
 			animation: showColor 0.3s ease-in-out both;

+ 13 - 3
components/module/listTemplate/commodityList.vue

@@ -10,7 +10,8 @@
 					<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
 					<view class="list-details-price">
 						<view v-if="!hasLogin" class="list-login-now">
-							<text @click.stop="toLoginPage" class="login-now">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
+							<text class="p-no">价格:</text>
+							<uni-stars :stars="parseInt(item.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
 						</view>
 						<view class="list-price" v-else>
 							<text>¥<text class="price-larger">{{item.retailPrice.toFixed(2)}}</text></text>
@@ -48,13 +49,15 @@
 <script>
 	import listSkeleton from '@/components/module/listTemplate/listSkeleton'
 	import modalLayer from "@/components/modal-layer"
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import { queryGoodslist } from "@/api/product.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'CommodityList',
 		components:{
 			listSkeleton,
-			modalLayer
+			modalLayer,
+			uniStars
 		},
 		props: {
 			emptyText: {
@@ -125,7 +128,7 @@
 				if(self.$parent.lastPageType === '再次购买') {
 					self.fromRegularPurchasePage = true;
 				}
-				queryGoodslist(thisServerurl,{index:self.pageNum,pageSize:self.pageSize}).then(response=>{
+				queryGoodslist(thisServerurl,{userID:this.userID,pageNum:self.pageNum,pageSize:self.pageSize}).then(response=>{
 					const resData = self.fromRegularPurchasePage ?response.data.page :response.data;
 					const resList = resData.results,
 						  getCartNum = response.data.count;
@@ -270,9 +273,16 @@
 			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;

+ 1 - 0
components/module/orderDetails/orderButton.vue

@@ -132,6 +132,7 @@
 				font-size:$font-size-26;
 				color: #FFFFFF;
 				text-align: center;
+				border-radius: 10rpx;
 				float: right;
 			}
 			.btn-cancel{

+ 236 - 0
components/module/productDetails/evaluate.vue

@@ -0,0 +1,236 @@
+<template name="evaluate">
+	<!-- 供应商信息 -->
+	<view class="evaluate clearfix">
+		<view class="evaluate-header">评价({{evaluateList.length}})</view>
+		<view class="evaluate-empty" v-if="isEmpty">该商品暂无评价</view>
+		<view class="evaluate-list" v-else>
+			<scroll-view scroll-y :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower">
+				<view class="row-list" v-for="(item, index) in evaluateList" :key="index">
+					<view class="list-title">
+						<view class="name">{{item.name}}</view>
+						<view class="stars">
+							<uni-stars :stars="item.score2" :icon-class='iconClass' :icon-color='iconColor' :font-size='36' :width-info="178"></uni-stars>
+						</view>
+					</view>
+					<view class="list-content">
+						{{item.commentContent}}
+					</view>
+					<view class="list-time">
+						<text>{{item.postTime }}</text>
+					</view>
+				</view>
+				<!--加载loadding-->
+				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+				<tui-nomore :visible="!pullUpOn" bgcolor="#FFFFFF" :text='nomoreText'></tui-nomore>
+				<!--加载loadding-->
+			</scroll-view>	
+		</view>
+	</view>
+</template>
+
+<script>
+	import authorize from '@/common/config/authorize.js'
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
+	import { queryEvaluate } from "@/api/product.js" 
+	
+	export default{
+		name:'evaluate',
+		props:{
+			queryProductid: {
+				// Unistars类型
+				type: Number,
+				default: 0
+			}
+		},
+		components:{
+			tuiLoadmore,
+			tuiNomore,
+			uniStars
+		},
+		data() {
+			return{
+				evaluateList:[],
+				iconClass:'icon-aixin',
+				iconColor:'#FF7800',
+				isEmpty:false,
+				pageNum:1,
+				pageSize:10,
+				hasNextPage:false,
+				loadding: false,
+				pullUpOn: true,
+				nomoreText: '上拉显示更多',
+				productID:'',
+				scrollHeight: '',
+			}
+		},
+		created() {
+			console.log(this.queryProductid)
+			this.productID = this.queryProductid
+			this.infoEvaluate()
+			this.setScrollHeight();		
+		},
+		methods:{
+			infoEvaluate(){
+				queryEvaluate({productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
+						this.isEmpty = false
+						this.hasNextPage = responseData.hasNextPage
+						this.evaluateList =responseData.results
+						this.pullFlag = false;
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = true
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}else{
+						this.isEmpty = true
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			},
+			getOnReachBottomData(){
+				console.log('11111111111')
+				this.pageNum+=1
+				let params = {productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}
+				queryEvaluate(params).then(response =>{
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
+						this.hasNextPage = responseData.hasNextPage
+						this.evaluateList = this.evaluateList.concat(responseData.results) 
+						this.pullFlag = false;// 防上拉暴滑
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			},
+			scrolltolower() {
+				if(this.hasNextPage){
+					this.loadding = true
+					this.pullUpOn = true
+					this.getOnReachBottomData(this.currentTab);
+				}	
+			},
+			setScrollHeight() {
+				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
+				this.windowHeight = windowHeight - 1;
+				this.scrollHeight = windowHeight - 1;
+			}
+		},
+		
+	}
+</script>
+
+<style lang="scss">	
+.evaluate{
+	background: #FFFFFF;
+	width: 100%;
+	.scoll-y {
+		height: 100%;
+	}
+	.evaluate-empty{
+		width: 702rpx;
+		height: 100rpx;
+		line-height: 100rpx;
+		padding: 0 24rpx;
+		font-size: $font-size-32;
+		color: #999999;
+		text-align: center;
+	}
+	.evaluate-header{
+		width: 702rpx;
+		height: 88rpx;
+		line-height: 88rpx;
+		padding: 0 24rpx;
+		font-size: $font-size-32;
+		color: $text-color;
+		border-bottom: 1px solid #F2F2F2;
+		text-align: left;
+	}
+	.evaluate-list{
+		width: 702rpx;
+		height: auto;
+		padding: 24rpx;
+		.row-list{
+			width: 100%;
+			height: auto;
+			float: left;
+			padding: 15rpx 0;
+			border-bottom: 1px solid #F2F2F2;
+			&:last-child{
+				margin-bottom: 30rpx;
+			}
+			.list-title{
+				height: 40rpx;
+				line-height: 40rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				padding: 20rpx 0;
+				.name{
+					float: left;
+					margin-right: 30rpx;
+				}
+				.stars{
+					width: 178rpx;
+					float: right;
+				}
+			}
+			.list-content{
+				width: 100%;
+				min-height: 80rpx;
+				height: auto;
+				font-size: $font-size-24;
+				line-height: 30rpx;
+				text-align: justify;
+				padding: 10rpx 0;
+				color: #999999;
+			}
+			.list-time{
+				width: 100%;
+				height: 40rpx;
+				font-size: $font-size-24;
+				line-height: 40rpx;
+				text-align: right;
+				color: #999999;
+			}
+		}
+	}
+}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 186 - 0
components/module/productDetails/recommend.vue

@@ -0,0 +1,186 @@
+<template name="recommend">
+	<!-- 供应商信息 -->
+	<view class="recommend clearfix">
+		<view class="recommend-empty" v-if="isEmpty">暂无相关推荐商品</view>
+		<view class="recommend-list" v-else>
+			<scroll-view scroll-y="true" :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower">
+				<view class="row-list" v-for="(item, index) in recommendList" :key="index" @click.stop="navToDetailPage(item.productID)">
+					<view class="list-image"><image :src="item.mainImage" mode=""></image></view>
+					<view class="list-name">{{item.name}}</view>
+				</view>
+				<!--加载loadding-->
+				<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
+				<tui-nomore :visible="!pullUpOn" bgcolor="#FFFFFF" :text='nomoreText'></tui-nomore>
+				<!--加载loadding-->
+			</scroll-view>		
+		</view>
+	</view>
+</template>
+
+<script>
+	import authorize from '@/common/config/authorize.js'
+	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
+	import tuiNomore from "@/components/tui-components/nomore/nomore"
+	import { queryRelevant } from "@/api/product.js" 
+	
+	export default{
+		name:'recommend',
+		props:{
+			queryProductid: {
+				// Unistars类型
+				type: Number,
+				default: 0
+			}
+		},
+		components:{
+			tuiLoadmore,
+			tuiNomore,
+		},
+		data() {
+			return{
+				recommendList:[],
+				isEmpty:false,
+				pageNum:1,
+				pageSize:10,
+				hasNextPage:false,
+				loadding: false,
+				pullUpOn: true,
+				pullFlag: true,
+				nomoreText: '上拉显示更多',
+				productID:'',
+				scrollHeight: '',
+			}
+		},
+		created() {
+			console.log(this.queryProductid)
+			this.productID = this.queryProductid
+			this.infoRecommend(this.queryProductid)
+			this.setScrollHeight();		
+		},
+		methods:{
+			infoRecommend(id){
+				queryRelevant({productID:id,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+					console.log(response)
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
+						this.isEmpty = false
+						this.hasNextPage = responseData.hasNextPage
+						this.recommendList =responseData.results
+						this.pullFlag = false;
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}else{
+						this.isEmpty = true
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			},
+			getOnReachBottomData(){
+				this.pageNum+=1
+				queryRelevant({productID:this.productID,pageNum:this.pageNum,pageSize:this.pageSize}).then(response =>{
+					let responseData = response.data
+					if(responseData.results&&responseData.results.length > 0){
+						this.hasNextPage = responseData.hasNextPage
+						this.recommendList = this.recommendList.concat(responseData.results) 
+						this.pullFlag = false;// 防上拉暴滑
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000)
+				})
+			},
+			scrolltolower() {
+				if(this.hasNextPage){
+					this.loadding = true
+					this.pullUpOn = true
+					this.getOnReachBottomData(this.currentTab);
+				}	
+			},
+			setScrollHeight() {
+				const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
+				this.windowHeight = windowHeight - 1;
+				this.scrollHeight = windowHeight - 1;
+			},
+			navToDetailPage(id) {//跳转商品详情页
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">	
+.recommend{
+	background: #FFFFFF;
+	width: 100%;
+	.recommend-list{
+		width: 702rpx;
+		height: auto;
+		padding: 24rpx;
+		.row-list{
+			width: 340rpx;
+			height: auto;
+			float: left;
+			margin-right: 20rpx;
+			margin-bottom: 30rpx;
+			&:nth-child(2n){
+				margin-right: 0;
+			}
+			.list-image{
+				width: 100%;
+				height: 340rpx;
+				border-radius: 14rpx;
+				image{
+					width: 100%;
+					height: 340rpx;
+					border-radius: 14rpx;
+				}
+			}	
+			.list-name{
+				font-size: $font-size-28;
+				color: $text-color;
+				line-height: 44rpx;
+				overflow: hidden;
+				white-space: nowrap;
+				text-overflow: ellipsis;
+			}
+		}
+	}
+}
+</style>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 73 - 0
components/uni-stars/uni-stars.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="stars" :style="{ width:widthInfo + 'rpx' }">
+		<view class="stars-normal">
+			<view class="box" :style="{ width:widthInfo + 'rpx' }">
+				<block v-for="i_ in 5" :key="i_"><text class="iconfont" :class="iconClass" :style="{fontSize:fontSize+'rpx'}"></text></block>
+			</view>
+		</view>
+		<view class="stars-selected" :style="{ width: (stars / 5) * 100 + '%',color:iconColor}">
+			<view class="box" :style="{ width:widthInfo + 'rpx' }">
+				<block v-for="j_ in 5" :key="j_"><text class="iconfont" :class="iconClass" :style="{fontSize:fontSize+'rpx'}"></text></block>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "Unistars",
+		props: {
+			stars: {
+				// Unistars类型
+				type: Number,
+				default: 0
+			},
+			fontSize:{
+				// fontSize类型
+				type: Number,
+				default: 30
+			},
+			widthInfo:{
+				// fontSize类型
+				type: Number,
+				default: 146
+			},
+			iconClass:{
+				// fontSize类型
+				type: String,
+				default:'icon-qian1'
+			},
+			iconColor:{
+				// fontSize类型
+				type: String,
+				default:'#FFBD13'
+			}
+		},
+		methods: {
+			
+		}
+	};
+</script>
+
+<style scoped>
+	.stars {
+		height: 30upx;
+		position: relative;
+		float: left;
+	}
+	.stars-normal {
+		width: 100%;
+		position: absolute;
+		left: 0;
+		top: 0;
+		color: #EAEAEA;
+	}
+	.stars-selected {
+		position: absolute;
+		left: 0;
+		top: 0;
+		z-index: 1;
+		overflow: hidden;
+	}
+	
+</style>

+ 0 - 2
main.js

@@ -4,7 +4,6 @@ import App from './App'
 
 import * as Api from '@/common/config/caimeiApi.js'
 import * as Regs from '@/common/config/common.js'
-import validate from '@/common/utils/ys-validate.js'
 import Json from './json' //本地数据
 
 /**
@@ -59,7 +58,6 @@ Vue.prototype.$store = store;
 Vue.prototype.$util = {msg, json, prePage,modal};
 Vue.prototype.$api = Api;
 Vue.prototype.$reg = Regs;
-Vue.prototype.$validate = validate;
 
 
 

+ 187 - 149
pages/goods/product.vue

@@ -21,39 +21,45 @@
 					</uni-swiper-dot>
 				</view>
 				<view class="product-wrap clearfix">
-					<view class="wrap-top">
-						<view class="p-title tui-skeleton-rect">
+					<view class="wrap-top" :class="goodsData.disabled ? 'none' : ''">
+						<view class="p-title tui-skeleton-fillet">
 							{{product.name == undefined ? '' : product.name}}
 						</view>
-						<view v-if="!hasLogin" class="p-login tui-skeleton-rect">
-							<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
-						</view>
-						<view class="wrap-main" v-else>
-							<view class="p-main" v-if="ladderPriceFlag == '0'">
-								<view class="p-price tui-skeleton-fillet">
-									<text class="txt sm">¥</text>
-									<text class="txt big">{{retailPrice}}</text>
-									<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
-								</view>
-								<view class="p-minBuy">
-									起订量:
-									<text class="min-text">{{minBuyNumber}}</text>
-								</view>
+						<view class="wrap-top-price" v-if="!goodsData.disabled">
+							<view v-if="!hasLogin" class="p-login grade  tui-skeleton-fillet">
+								<text class="p-no">价格:</text>
+								<uni-stars :stars="parseInt(product.price1Grade)" :font-size='36' :width-info="180"></uni-stars>
+							</view>
+							<view v-if="!hasLogin" class="p-login tui-skeleton-fillet">
+								<text @click.stop="navToLogin">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 							</view>
-							<view class="wrap-ladder" v-else>
-								<view class="ladder-text">
-									<text class="ladder-h1">说明:</text>
-									<text class="ladder-p">本商品有以下优惠购物方案</text>
+							<view class="wrap-main" v-else>
+								<view class="p-main" v-if="ladderPriceFlag == '0'">
+									<view class="p-price tui-skeleton-fillet">
+										<text class="txt sm">¥</text>
+										<text class="txt big">{{retailPrice}}</text>
+										<text class="txt big">{{smallMoney== '0'?'.00':smallMoney}}</text>
+									</view>
+									<view class="p-minBuy">
+										起订量:
+										<text class="min-text">{{minBuyNumber}}</text>
+									</view>
 								</view>
-								<view class="ladder-main tui-skeleton-rect">
-									<view class="ladder-left">
-										<view class="ladder-b">起订量:</view>
-										<view class="ladder-b">价格:</view>
+								<view class="wrap-ladder" v-else>
+									<view class="ladder-text">
+										<text class="ladder-h1">说明:</text>
+										<text class="ladder-p">本商品有以下优惠购物方案</text>
 									</view>
-									<view class="ladder-right">
-										<view class="ladder-li" v-for="(ladder,index) in  productLadderPrices" :key="index">
-											<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
-											<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+									<view class="ladder-main tui-skeleton-fillet">
+										<view class="ladder-left">
+											<view class="ladder-b">起订量:</view>
+											<view class="ladder-b">价格:</view>
+										</view>
+										<view class="ladder-right">
+											<view class="ladder-li" v-for="(ladder,index) in  ladderPriceList" :key="index">
+												<view class="ladder-a">{{ladder.buyNumRangeShow}}</view>
+												<view class="ladder-a">¥{{ladder.buyPrice.toFixed(2)}}</view>
+											</view>
 										</view>
 									</view>
 								</view>
@@ -61,19 +67,18 @@
 						</view>
 					</view>
 					<view class="wrap-label" v-if="product.tagsList.length>0">
-						<view class="label-a tui-skeleton-rect" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
+						<view class="label-a tui-skeleton-fillet" v-for="(label,index) in  product.tagsList" :key="index">{{label}}</view>
+					</view>
+					<view class="wrap-label"  v-if="goodsData.disabled">
+						<view class="isLower">此商品已{{disabledText}},请浏览以下推荐商品~</view>
 					</view>
 					<view class="wrap-info">
-						<view class="info-viewT">
+						<view class="info-viewT" :class="goodsData.disabled ? 'none' : ''">
 							<view class="info-viewL tui-skeleton-fillet">品牌:<text>{{product.brandName == null? '其他' : product.brandName}}</text></view>
 							<view class="info-viewR tui-skeleton-fillet">包装规格:<text>{{product.unit}}</text></view>														
 						</view>
-<!-- 						<view class="info-viewB">
-							<view class="info-f tui-skeleton-fillet">库存:<text>{{product.stock}}</text></view>
-							<view class="info-f tui-skeleton-fillet">起订量:<text>{{minBuyNumber}}</text></view>
-						</view> -->
 					</view>
-					<view class="wrap-seve">
+					<view class="wrap-seve" :class="goodsData.disabled ? 'none' : ''">
 						<text class="tui-skeleton-rect">服务:</text>
 						<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">无忧退货</text></text>
 						<text class="iconfont icon-dui tui-skeleton-rect"><text class="text">快速退款</text></text>
@@ -83,31 +88,36 @@
 			</view>
 			<view class="product-details">
 				<!-- 头部 -->
-				<view class="navbar tui-skeleton-fillet">
-					<view class="nav-item" 
-						  :class="{ current: tabCurrentIndex === 1 }" 
-						  @click="tabClick(1)">
-						   <text class="line"></text>
-						  商品详情
+				<view  v-if="goodsData.disabled" class="navbar" :class="navbarFiexd"
+					 :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
+					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  disabledTabNavList" :key="index" :class="{ current: tabCurrentIndex === index+2 }" @click="tabClick(index+2)">
+						<text class="line"></text>
+						<text>{{item.name}}</text>
+					</view>					
+				</view>
+				<view v-else class="navbar" :class="navbarFiexd" 
+					 :style="{top:headerBtnPosi.bottom + (headerBtnPosi.bottom - headerBtnPosi.height - systeminfo.statusBarHeight) +'px'}">
+					<view class="nav-item tui-skeleton-fillet" v-for="(item,index) in  tabNavList" :key="index" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
+						<text class="line"></text>
+						<text>{{item.name}}</text>
 					</view>					
-					<view class="nav-item" 
-						  :class="{ current: tabCurrentIndex === 2 }" 
-						  @click="tabClick(2)">
-						  <text class="line"></text>
-						  供应商信息
-					</view>
 				</view>
-				<!-- 商品详情,供应商详情展示 -->
-				<view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 1">
+				<!-- 商品详情,供应商详情展示,相关推荐,评价-->
+				<view class="content tui-banner tui-skeleton-rect" v-if="tabCurrentIndex === 0">
 					<parser :html="html" :img-mode="widthFix"></parser>
 				</view>
-				<view class="content sup" v-else>
+				<view class="content sup" v-if="tabCurrentIndex === 1">
 					<supplier-details :shop="shop"></supplier-details>
 				</view>
+				<view class="content hot" v-if="tabCurrentIndex === 2">
+					<recommend :query-productid="product.productID" v-if="isRecommend"></recommend>
+				</view>
+				<view class="content hot" v-if="tabCurrentIndex === 3">
+					<evaluate :query-productid ="product.productID" v-if="isEvaluate"></evaluate>
+				</view>
 			</view>
 			<!-- 底部按钮 -->
 			<view class="menu">
-				<view class="isLower" v-if="goodsData.disabled">该商品已下架~</view>
 				<view class="bottom-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 					<view class="bottom-le">
 						<view class="item-bt" @click="this.$api.switchTabTo('/pages/tabBar/home/home')">
@@ -173,21 +183,24 @@
 							</view>
 						</view>
 					</view>
-					<view class="btn"><view class="button" @click="btnConfirm">确定</view></view>
+					<view class="btn"><view class="button" @click.stop="btnConfirm">确定</view></view>
 				</view>
 			</view>
-			<no-login v-if="isShowNoLogin" :productid="productID" :telPhone='telPhone' :alertType ='alertType'></no-login>
 		</view>
 	</view>
 </template>
 
 <script>
+	import { mapState,mapMutations } from 'vuex'
 	import headerBack from '@/components/module/headerNavbar/header-poduct' 		 //自定义导航
+	import uniStars from '@/components/uni-stars/uni-stars.vue'
 	import parser from "@/components/jyf-Parser/index" //富文本处理
 	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
 	import supplierDetails from "@/components/module/productDetails/supplierDetails" //供应商详情
+	import recommend from "@/components/module/productDetails/recommend" //供应商详情
+	import evaluate from "@/components/module/productDetails/evaluate" //供应商详情
 	import { queryProductDetils } from "@/api/product.js" 
-	import { mapState,mapMutations } from 'vuex'
+	import { shoppingAddCart } from "@/api/cart.js" 
 
 	var isPreviewImg;
 	export default{
@@ -195,26 +208,32 @@
 			headerBack,
 			parser,
 			tuiSkeleton,
-			supplierDetails
+			supplierDetails,
+			recommend,
+			evaluate
 		},
 		data(){
 			return{			
-				html:'<div style="text-align: center;color:#333333;">暂无内容</div>',	
+				html:'<div style="text-align: center;color:#333333;">暂无内容</div>',
+				tabNavList:[{name:'商品详情'},{name:'供应商细信息'},{name:'相关推荐'},{name:'评价'}],
+				disabledTabNavList:[{name:'相关推荐'},{name:'评价'}],
 				mode:'round',
 				specClass: '',//规格弹窗css类,控制开关动画
 				isBtnType:'',
 				current:0,
 				telPhone:'',
+				navbarFiexd:'none',
 				ladderPriceFlag:'',
-				productLadderPrices:'',
-				loginStatus:true,
+				ladderPriceList:'',
+				isRecommend:false,
+				isEvaluate:false,
 				isAnimation:false,
 				skeletonShow:true,
-				isShowNoLogin:false,
 				isQuantity:false,
 				isStock:false,
 				disabled:false,
-				tabCurrentIndex: 1,
+				disabledText:'',
+				tabCurrentIndex:0,
 				userID:'',
 				productID:0,
 				classifyID:'',//分类ID
@@ -227,7 +246,6 @@
 				stock:0,
 				number:0,
 				minBuyNumber:0,
-				alertType:'',
 				productsList:[],
 				goodListData:[],
 				headerBtnPosi:	this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
@@ -244,12 +262,10 @@
 		},
 		onLoad(option) {
 			let self = this;
-			console.log(option)
 			this.productID = option.id;//获取商品ID
 			if(option.page == 2){
 				this.backPage = option.page
 			}
-			this.tabCurrentIndex = 1;// 页面显示是默认选中第一个	
 		},
 		computed: {
 			...mapState(['hasLogin','userInfo'])
@@ -257,36 +273,46 @@
 		methods:{
 			initData(){// 初始化商品详情查询
 				queryProductDetils({productID:this.productID}).then(response =>{	
-					console.log(this.skeletonShow)
-					this.productData = response.data;
+					this.skeletonShow = false
 					this.productImage=[];
-					this.shop = response.data.shop;	
-					this.product = response.data.product;
-					this.ladderPriceFlag = response.data.ladderPriceFlag;
-					if(response.data.productLadderPrices!=null){
-						this.productLadderPrices = response.data.productLadderPrices;
-					}
-					this.html = response.data.productDetailInfo == null ? this.html : this.$api.adaptRichTextImg(response.data.productDetailInfo.detailInfo)
-					response.data.productImage.forEach(item =>{
+					this.shop = response.data.shop
+					this.product = response.data
+					this.ladderPriceFlag = this.product.ladderPriceFlag;
+					this.html = this.product.productDetail == null ? this.html : this.$api.adaptRichTextImg(this.product.productDetail.detailInfo)
+					this.stock = this.product.stock
+					this.number = this.product.minBuyNumber
+					this.minBuyNumber = this.product.minBuyNumber
+					this.classifyID = this.product.classifyID
+					//处理商品图片列表
+					this.product.imageList.forEach(item =>{
 						this.productImage.push(item.image);
 					})
-					console.log(this.skeletonShow)
+					this.goodsData.cartCount = this.product.productCount
+					//处理阶梯价格
+					if(this.product.ladderPriceList!=null){
+						this.ladderPriceList = this.product.ladderPriceList;
+					}
 					//拆分金额并转千分位格式显示
-					this.retailPrice = this.productData.retailPrice.toFixed(2);
-					this.buyRetailPrice = this.productData.retailPrice;
-					if(this.productData.validFlag =='2'){
+					this.retailPrice = this.product.retailPrice.toFixed(2);
+					this.buyRetailPrice = this.product.retailPrice;
+					//处理下架商品和售罄商品
+					if(this.product.validFlag =='3' || this.stock == 0){
 						this.disabled = true
+						this.tabCurrentIndex = 2;// 页面显示是默认选中第一
+						this.isRecommend = true
+						this.disabledText = '下架'
 					}else{
 						this.disabled = false
+						this.tabCurrentIndex = 0;// 页面显示是默认选中第三
+						this.disabledText = ''
+					}
+					this.goodsData.disabled = this.disabled
+					if(this.product.validFlag =='3'){
+						this.disabledText = '下架'
+					}
+					if(this.stock == 0){
+						this.disabledText = '售罄'
 					}
-					this.stock = this.productData.product.stock
-					this.number = this.productData.minBuyNumber
-					this.minBuyNumber = this.productData.minBuyNumber
-					this.classifyID = this.productData.classifyID
-					this.goodsData.disabled = this.disabled 
-					this.goodsData.cartCount = this.productData.cartCount
-					this.skeletonShow = false
-					console.log(this.skeletonShow)
 				}).catch(response =>{
 					this.$util.msg(response.msg,2000);
 				})
@@ -306,6 +332,13 @@
 			},
 			tabClick(index) {//商品详情&&供应商信息tab切换
 				this.tabCurrentIndex = index;
+				if(this.tabCurrentIndex == 2){
+					console.log(this.product.productID)
+					this.isRecommend = true
+				}
+				if(this.tabCurrentIndex == 3){
+					this.isEvaluate = true
+				}
 			},
 			changeTab(e) {
 				this.tabCurrentIndex = e.target.current;
@@ -315,31 +348,23 @@
 				console.log(e.detail.query)
 			},
 			buyProductCart(){//底部购物车按钮点击
-				if(!this.hasLogin){
-					this.alertType = '3'
-					this.isShowNoLogin =true
+				if(this.hasLogin){
+					this.$api.switchTabTo('/pages/tabBar/cart/cart')
 				}else{
-					this.isShowNoLogin =false
-					this.$api.switchTabTo('/pages/tabBar/cart/cart');
+					this.$api.navigateTo('/pages/user-module/login-accont?type=1')
 				}
 			},
 			btnGetConfirm(type){//加入购物车&&立即购买点击
-				if(!this.hasLogin){
-					if(type =='add'){
-						this.alertType = '1'
-					}else{
-						this.alertType = '2'
-					}
-					this.isShowNoLogin =true
-				}else{
-					this.isShowNoLogin =false
+				if(this.hasLogin){
 					this.showSpec(type);
+				}else{
+					this.$api.navigateTo('/pages/user-module/login-accont?type=1')
 				}
 			},	
 			changeCountAdd(){//popup弹窗数量增加按钮
 				this.number++
 				if(this.ladderPriceFlag == '1'){
-					this.productLadderPrices.forEach((item,index)=>{
+					this.ladderPriceList.forEach((item,index)=>{
 						if(this.number>=item.buyNum){
 							this.buyRetailPrice = item.buyPrice
 						}
@@ -355,7 +380,7 @@
 				}else{
 					this.number--
 					if(this.ladderPriceFlag == '1'){
-						this.productLadderPrices.forEach((item,index)=>{
+						this.ladderPriceList.forEach((item,index)=>{
 							if(this.number>=item.buyNum){
 								this.buyRetailPrice = item.buyPrice
 							}
@@ -387,10 +412,10 @@
 			},
 			btnConfirm() {//加入购物车&&立即购买跳转订单页并关闭弹窗
 				if(this.isBtnType == 'add'){				
-					// console.log(this.number)
+					console.log(this.isBtnType)
 					this.getAddProductCart()				
 				}else{
-					// console.log(this.number)
+					console.log(this.number)
 					this.toConfirmation()
 				}
 			},
@@ -399,50 +424,34 @@
 				let productStp ={
 						allPrice:this.number*this.buyRetailPrice,
 						allCount:this.number,
-						id:this.productData.id,
-						productCount:this.number,
-						classifyID:this.classifyID,
+						id:this.product.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弹窗提示成功		
-				this.$api.post('/details/addCart',
-					{
-						productID:this.productID,
-						userID:this.userID,
-						productCount:this.number,
-						organizeID:this.userOrganizeID
-					},
-					response => {
-						if (response.code == "1") {				
-							this.specClass = 'hide';
-							this.$util.msg(response.msg,1500,true,'success');
-							this.isAnimation = true
-							setTimeout(() => {
-								this.specClass = 'none';							
-							}, 200);
-							setTimeout(() => {
-								this.isAnimation = false;							
-							}, 2000);
-							this.goodsData.cartCount = response.data;
-						}else{
-							this.$util.msg(response.msg,2000);
-							setTimeout(function(){
-								this.$api.switchTabTo('/pages/tabBar/home/home')
-							},1000)
-						}
-					}	
-				)	
+			getAddProductCart(){//增加购物车成功和toast弹窗提示成功	
+				console.log(this.number)
+				shoppingAddCart({productID:this.productID,userID:this.userID,productCount:this.number}).then(response => {
+					this.specClass = 'hide';
+					this.$util.msg(response.msg,1500,true,'success')
+					this.isAnimation = true
+					setTimeout(() => {this.specClass = 'none'}, 200)
+					setTimeout(() => {this.isAnimation = false},2000)
+					this.goodsData.cartCount = this.product;
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},
 			navToLogin(){
-				this.$api.navigateTo(`/pages/user-module/login?type=detilType&id=${this.productID}`)
+				this.$api.navigateTo(`/pages/user-module/login-accont?type=detilType&id=${this.productID}`)
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息
 				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				// console.log(headerBtnPosi)
 				return headerBtnPosi
 			},
 			setSysteminfo(){
@@ -476,6 +485,11 @@
 					title: '', 		
 				}
 			}
+			if(e.scrollTop>700){
+				this.navbarFiexd = 'fixed'
+			}else{
+				this.navbarFiexd = 'none'
+			}
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) => {
@@ -554,6 +568,11 @@
 			float: left;
 			padding-bottom: 24rpx;
 			border-bottom: 1px solid #F8F8F8;
+			&.none{
+				.p-title{
+					color:#999999
+				}
+			}
 			.p-title{
 				line-height: 40rpx;
 				font-size: $font-size-28;
@@ -601,8 +620,16 @@
 			.p-login{
 				height: 44rpx;
 				line-height: 44rpx;
-				color: #F8C499;
+				color: $color-system;
 				font-size: $font-size-24;
+				&.grade{
+					margin-bottom: 20rpx;
+				}
+				.p-no{
+					float: left;
+					margin-right: 5rpx;
+					font-size: $font-size-28;
+				}
 			}
 		}
 		.wrap-ladder{
@@ -688,6 +715,9 @@
 				color: $text-color;
 				line-height: 40rpx;
 				text-align: left;
+				&.none{
+					color: #999999;
+				}
 				.info-viewL{
 					min-width: 350rpx;
 					float: left;
@@ -722,6 +752,12 @@
 			font-size: $font-size-28;
 			color: $text-color;
 			border-bottom: 1px solid #F8F8F8;
+			&.none{
+				color: #999999;
+				.text{
+					color: #999999;
+				}
+			}
 			.iconfont{
 				color: $color-system;
 				margin-left: 20rpx;
@@ -743,29 +779,34 @@
 			padding: 0 24rpx;
 			background: #fff;
 			z-index: 10;
+			display: flex;
+			&.fixed{
+				position: fixed;
+				left: 0;
+			}
 			.nav-item {
 				display: flex;
-				width: 142rpx;
+				flex: 1;
 				justify-content: center;
 				align-items: center;
 				height: 96rpx;
 				font-size: $font-size-28;
 				color: $text-color;
 				position: relative;
-				margin-right: 48rpx;
 				float: left;
 				position: relative;
 				.line{
-					width: 100%;
+					width: 60%;
 					height: 2px;
+					border-radius: 1px;
 					background: #FFFFFF;
 					position: absolute;
 					bottom: 0;
-					left: 0;
+					left: 50%;
+					margin-left: -30%;
 				}
 				&.current{
 					color:$color-system;
-					font-weight: bold;
 					.line{
 						background: $color-system;
 					}
@@ -779,15 +820,12 @@
 	}
 	.isLower{
 		width: 100%;
-		height: 90rpx;
-		background-color: rgba(255, 191, 162, 0.5);
-		line-height: 90rpx;
+		height: 116rpx;
+		line-height: 116rpx;
 		text-align: center;
-		color: #FFFFFF;
-		font-size: $font-size-28;
-		position: fixed;
-		bottom: 110rpx;
-		left: 0;
+		color: #000000;
+		font-size: $font-size-32;
+		font-weight: bold;
 	}
 	.bottom-btn{
 		width: 100%;

+ 51 - 71
pages/search/search.vue

@@ -29,7 +29,7 @@
 						<text class="list-details-specs">规格:{{item.unit}}</text>
 						<text class="list-details-miniQuantity" v-if="fromRegularPurchasePage">起订量:{{item.minBuyNumber}}</text>
 						<view class="list-details-price">
-							<view v-if="!loginStatus" class="list-login-now">
+							<view v-if="!hasLogin" class="list-login-now">
 								<text @click.stop="toLoginPage" class="login-now">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
 							</view>
 							<view class="list-price" v-else>
@@ -50,31 +50,27 @@
 		</view>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='isModallayer'></modal-layer>
-		<!-- 删除弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText' 
-					 @btnConfirm ='confirmDetele'>
-		</model-alert>
+	
 	</view>
 </template>
 
 <script>
+	import { mapState,mapMutations } from 'vuex'
 	import goSearch from '@/components/uni-search/go-search.vue'
-	import modelAlert from '@/components/module/modelAlert/modelAlert.vue'
 	import modalLayer from "@/components/modal-layer"
 	import authorize from '@/common/config/authorize.js'
+	import { querySearchProduct , querySearchHistory } from "@/api/product.js" 
+	
 	export default {
 		components: {
 			// goSearch,
 			modalLayer,
-			modelAlert
 		},
 		data() {
 			return {
+				userID:'',
 				themeClass: 'block',
 				searchInputVal:'',							//搜索关键词
-				alertText:'确定删除全部历史记录?',
-				isShowDelModal:false,						//控制显示删除弹窗
 				isShowClose:false,							//是否显示清空输入框图标
 				isSearchHistory:false,						//是都显示搜索历史
 				serachRecordList:[],						//历史搜索记录
@@ -82,8 +78,6 @@
 				isModallayer:false,
 				windowHeight: '',
 				showEmpty: false,
-				userID: '',
-				loginStatus: true,
 				scrollHeight: '',
 				commodityList: [],
 				showLoading: false,
@@ -102,20 +96,15 @@
 		onLoad() {
 		  this.initGetSerachRecord()
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo'])
+		},
 		methods:{
 			initGetSerachRecord(){
-				authorize.getCode('weixin').then(wechatcode =>{
-					// console.log(wechatcode);
-					this.$api.get('/search/record',{organizeID:this.userOrganizeID,code:wechatcode},
-						response =>{
-							// console.log(response);
-							if(response.code == '1'){
-								this.serachRecordList = response.data
-							}else{
-								this.$util.msg(response.msg,2000)
-							}							
-						}
-					)
+				querySearchHistory({userID:this.userID}).then(response =>{
+					this.serachRecordList = response.data
+				}).catch(response =>{
+					console.log('error:'+response.msg)
 				})
 			},
 			subMitSearch() {
@@ -140,48 +129,42 @@
 				if(loadMore) {
 					this.pageNum += 1;
 				}
-				authorize.getCode('weixin').then(wechatcode =>{
-					let params = {code:wechatcode,searchWord:this.searchInputVal,index:this.pageNum,pageSize:this.pageSize,organizeID:this.userOrganizeID}
-					this.$api.lodingGet('/search/product',params,
-						response => {
-							if(response.code == '1') {
-								this.isShowWrapper = true
-								const resData = response.data;
-								const resList = resData.results;
-								if(resList && resList.length > 0){
-									this.hasNextPage = resData.hasNextPage;
-									this.totalPage = resData.totalPage;
-									this.showEmpty = false;
-									if(loadMore) {
-										this.commodityList = [...this.commodityList,...resList];
-									} else {
-										this.commodityList = [...resList];
-									}
-									// 防上拉暴滑
-									this.pullFlag = false;
-									setTimeout(()=>{
-										this.pullFlag = true;
-									},500)
-									// 底部提示文案
-									if(this.hasNextPage) {
-										this.loadingText = '上拉加载更多';
-									} else {
-										this.showLoading = true;
-										this.loadingNow = false;
-									}
-								} else {
-									if(!loadMore) {
-										this.showEmpty = true;
-									}
-								}
-							} else {
-								this.$util.msg(response.msg,3000);
-							}
+				let params = {userID:this.userID,searchWord:this.searchInputVal,pageNum:this.pageNum,pageSize:this.pageSize}
+				querySearchProduct(params).then(response =>{
+					this.isShowWrapper = true
+					const resData = response.data;
+					const resList = resData.results;
+					if(resList && resList.length > 0){
+						this.hasNextPage = resData.hasNextPage;
+						this.totalPage = resData.totalPage;
+						this.showEmpty = false;
+						if(loadMore) {
+							this.commodityList = [...this.commodityList,...resList];
+						} else {
+							this.commodityList = [...resList];
 						}
-					)
+						// 防上拉暴滑
+						this.pullFlag = false;
+						setTimeout(()=>{
+							this.pullFlag = true;
+						},500)
+						// 底部提示文案
+						if(this.hasNextPage) {
+							this.loadingText = '上拉加载更多';
+						} else {
+							this.showLoading = true;
+							this.loadingNow = false;
+						}
+					} else {
+						if(!loadMore) {
+							this.showEmpty = true;
+						}
+					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,3000);
 				})
 			},
-			onShowClose () { //输入框失去焦点时触发
+			onShowClose () {//输入框失去焦点时触发
 				this.inputEmpty(this.searchInputVal)
 			},
 			onFocus () { //输入框获取焦点时触发
@@ -195,12 +178,12 @@
 				this.inputEmpty(this.searchInputVal)
 				this.initGetSerachRecord()
 			},
-			keywordsClick (item) {	//关键词搜索与历史搜索
+			keywordsClick (item) {//关键词搜索与历史搜索
 				this.searchInputVal = item;
 				this.isShowClose = true;
 				this.subMitSearch();
 			},
-			delhistory () {		//清空历史记录
+			delhistory () {//清空历史记录
 				this.isShowDelModal = true;				
 			},
 			confirmDetele() {
@@ -240,18 +223,15 @@
 			toLoginPage() {
 				let searchLoginType = 'search'
 				uni.navigateTo({
-					url:`/pages/user-module/login?type=${searchLoginType}`
+					url:`/pages/user-module/login-accont?type=${searchLoginType}`
 				})
 			}
 		},
 		onShow() {
+			this.setScrollHeight();
 			this.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userID
-			})
-			this.setScrollHeight();
-			this.$api.loginStatus().then((resolveData) => {
-				this.loginStatus = resolveData;
-			});		
+			})	
 		}
 	}
 </script>

+ 5 - 7
pages/service/aftersale.vue

@@ -14,25 +14,23 @@
 		data() {
 			return{
 				serverUrl: '',
-				type: ''
+				type: 'afterSale'
 			}
 		},
 		onLoad(){
-			this.type = 'afterSale';
 			this.initData();
 		},
 		methods:{
 			initData(){
-				let self = this;
 				queryAfterSale().then(response =>{
 					let _data =response.data,
-						type = self.type;
+						type = this.type;
 					if(type) {
-						let html = self.$api.adaptRichTextImg(_data[type]);
-						self.$refs.childTemplate.html = html;
+						let html = this.$api.adaptRichTextImg(_data[type]);
+						this.$refs.childTemplate.html = html;
 					}
 				}).catch(response =>{
-					this.$util.msg(res.msg,2000);
+					this.$util.msg(response.msg,2000);
 				})
 			}
 		}

+ 1 - 1
pages/service/shoppingnotice.vue

@@ -33,7 +33,7 @@
 						self.$refs.childTemplate.html = html;
 					}
 				}).catch(response =>{
-					this.$util.msg(res.msg,2000);
+					this.$util.msg(response.msg,2000);
 				})
 			}
 		}

+ 94 - 139
pages/tabBar/cart/cart.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="container cart clearfix">	
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="9"></tui-skeleton>
-		<view class="container-cart-main tui-skeleton" :class="[!hasLogin ? 'show' : 'none']">
-			<view class="container-cart" v-if="goodsList.length > 0" :class="showContentClass">
+		<view class="container-cart-main tui-skeleton">
+			<view v-if="goodsList.length > 0" class="container-cart">
 				<scroll-view class="cart-content"  scroll-y  @scrolltolower="toLower">
-					<view class="goods-list" v-if="isShowGoodsList">
+					<view class="goods-list">
 						<view v-for="(item, index) in goodsList" :key="index" class="goods-item">
 							<view class="shoptitle">
 								<!--选择商店的全部商品 :disabled="isNnder"-->
@@ -23,30 +23,30 @@
 								>
 									<view class="goods-pros-t">
 										<!--选择商品-->
-										<view class="checkbox-box" :class="[pros.validFlag == '2' && !isshowDelbtn ?'disabled' : '']">
+										<view class="checkbox-box" :class="[pros.validFlag == '3' && !isshowDelbtn ?'disabled' : '']">
 											<button class="checkbox iconfont" 
-													:disabled="pros.validFlag == '2' && !isshowDelbtn"
+													:disabled="pros.validFlag == '3' && !isshowDelbtn"
 													:class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']" 
 													@click.stop="ischeck(item,pros,idx)">
 											</button>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.id)"	><image :src="pros.mainImage" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productID)"	><image :src="pros.mainImage" alt="" /></view>
 										<view class="pros-product">
 											<view class="producttitle" @click.stop="navToListPage(pros.id)"	>
-												<text v-if="pros.validFlag == '2'" class="no-text">商品已下架</text>{{pros.name}}
+												<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
 											</view>
 											<view class="productspec">规格:{{pros.unit}}</view>
 											<view class="productprice">
 												<!--使用过滤器对总价改变-->
 												<view 	class="price" 
-														:class="[pros.validFlag == '2' ?'disabled' : '']">
-														<text :class="[pros.validFlag == '2' ?'disabled' : 'money-sign']">¥</text>{{pros.retailPrice.toFixed(2)}}
+														:class="[pros.validFlag == '3' ?'disabled' : '']">
+														<text :class="[pros.validFlag == '3' ?'disabled' : 'money-sign']">¥</text>{{pros.retailPrice.toFixed(2)}}
 												</view>
-												<view class="count" v-if="pros.validFlag == '1'"  :class="[isshowDelbtn ? 'none':'show']">
+												<view class="count" v-if="pros.validFlag == '2'"  :class="[isshowDelbtn ? 'none':'show']">
 													<view class="number-box">
-														<view  class="iconfont icon-jianhao" :class="[pros.validFlag == '2'?'disabled':'']" @click="changeCountSub(item,pros)"></view>
+														<view  class="iconfont icon-jianhao" :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountSub(item,pros)"></view>
 														<input class="btn-input" type="number" maxlength='4' v-model="pros.productCount" @blur="changeNnmber($event,item,pros)">
-														<view  class="iconfont icon-jiahao"  :class="[pros.validFlag == '2'?'disabled':'']" @click="changeCountAdd(item,pros)"></view>
+														<view  class="iconfont icon-jiahao"  :class="[pros.validFlag == '3'?'disabled':'']" @click="changeCountAdd(item,pros)"></view>
 													</view>
 												</view>
 											</view>
@@ -85,7 +85,7 @@
 					</view>
 				</view>
 			</view>
-			<view v-else class="cart-content empty" :class="showEmptyClass">
+			<view v-else class="cart-content empty">
 				<view  class="empty-container">
 					<image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AWdWzAAGlgAP0das422.png" mode="aspectFit"></image>
 					<text class="error-text">购物车空空如也,快去商城逛逛吧~</text>
@@ -93,25 +93,20 @@
 				</view>
 			</view>
 		</view>
-		<!-- 删除购物车提示弹窗 -->
-		<model-alert v-if="isShowDelModal"
-					 :alertText='alertText' 
-					 @btnConfirm ='deleteCart'>
-		</model-alert>
 		<!-- 透明模态层 -->
 		<modal-layer v-if='modallayer'></modal-layer>
 	</view>
 </template>
 <script>
-	import modelAlert from '@/components/module/modelAlert/modelAlert'
 	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	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" 
+	
 	export default{
 		components:{
-			modelAlert,
 			tuiSkeleton,
 			tuiLoadmore,
 			tuiNomore,
@@ -131,14 +126,10 @@
 				isNnder:true,
 				isModallayer:false,
 				skeletonShow:true,
-				isShowGoodsList:true,// 显示购物车
 				isshowDelbtn:false,
-				isShowDelModal:false,//删除商品确认弹窗
 				isDisabled: false, // 供应商/店铺全选是否禁用状态
-				showEmptyClass:'none',//显示空购物车
-				showContentClass:'show',//显示列表
+				isEmpty:false,//显示空购物车
 				scrollHeight: 'auto',
-				alertText:'确定删除选中的商品吗?',
 				nomoreText: '上拉显示更多',
 				hasNextPage: false,
 				loadding: false,
@@ -187,72 +178,65 @@
 				}, 500)
 			},
 			initGetCartGoodsList(){//初始化购物车 index:1
-				let param = {userID:this.userID,organizeID:this.userOrganizeID,index:1,pageSize:this.pageSize}
-				this.$api.get('/shopping/cart',param,
-					response =>{
-						this.$store.commit('updateAllNum',response.data.cartQuantity)
-						const results = response.data.page.results;	
-						if(results&&results.length > 0){
-							this.showEmptyClass ='none'
-							this.showContentClass ='show'
-							this.hasNextPage = response.data.page.hasNextPage;
-							this.goodsList = results;
-							this.goodsList.forEach((item,index) => {
-								let productsListLength = item.productsList.length,
-									invalidLength = 0;
-								item.productsList.forEach(pros => {
-									pros.shopID = item.shopID;
-									if(pros.validFlag == 2) {invalidLength++;}
-								})
-								item.isDisabled = invalidLength === productsListLength;
+				let params = {userID:this.userID,pageNum:1,pageSize:this.pageSize}
+				queryShoppingCartList(params).then(response =>{
+					this.skeletonShow = false
+					this.$store.commit('updateAllNum',response.data.cartQuantity)
+					const resultsData = response.data.pageDate;	
+					if(resultsData.results&&resultsData.results.length > 0){
+						this.isEmpty =false
+						this.hasNextPage = resultsData.hasNextPage;
+						this.goodsList = resultsData.results;
+						this.goodsList.forEach((item,index) => {
+							let productsListLength = item.productsList.length,
+								invalidLength = 0;
+							item.productsList.forEach(pros => {
+								pros.shopID = item.shopID;
+								if(pros.validFlag == '3') {invalidLength++;}
 							})
-							this.pullFlag = false;
-							setTimeout(()=>{this.pullFlag = true;},500)
-							if(this.hasNextPage){
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
+							item.isDisabled = invalidLength === productsListLength;
+						})
+						this.pullFlag = false;
+						setTimeout(()=>{this.pullFlag = true;},500)
+						if(this.hasNextPage){
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						}else{
+							if(this.goodsList.length < 4){
+								this.pullUpOn = true
 							}else{
-								if(this.goodsList.length < 4){
-									this.pullUpOn = true
-								}else{
-									this.pullUpOn = false
-									this.nomoreText = '已至底部'
-								}
+								this.pullUpOn = false
+								this.nomoreText = '已至底部'
 							}
-						} else {
-							this.goodsList = [];
-							this.showEmptyClass ='show'
-							this.showContentClass ='none'
 						}
-						this.skeletonShow = false
+					} else {
+						this.goodsList = [];
+						this.isEmpty =true
 					}
-				)	
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},		
 			getOnReachBottomData(){//上拉加载
 				this.pageNum+=1
-				console.log(this.pageNum)
-				let param = {userID:this.userID,organizeID:this.userOrganizeID,index:this.pageNum,pageSize:this.pageSize}
-				this.$api.get('/shopping/cart',param,
-					response => {
-						if(response.code === '1'){
-							let resData = response.data.page.results
-							this.hasNextPage = response.data.page.hasNextPage;
-							this.goodsList = this.goodsList.concat(resData)
-							this.pullFlag = false;// 防上拉暴滑
-							setTimeout(()=>{this.pullFlag = true;},500)
-							if(this.hasNextPage){
-								this.pullUpOn = false
-								this.nomoreText = '上拉显示更多'
-							}else{
-								this.loadding = false
-								this.pullUpOn = false
-								this.nomoreText = '已至底部'
-							}
-						}else{
-							this.$util.msg(response.msg,2000);
-						}
+				let params = {userID:this.userID,pageNum:this.pageNum,pageSize:this.pageSize}
+				queryShoppingCartList(params).then(response =>{
+					let resultsData = response.data.pageDate
+					this.hasNextPage = resultsData.hasNextPage;
+					this.goodsList = this.goodsList.concat(resultsData.results)
+					this.pullFlag = false;// 防上拉暴滑
+					setTimeout(()=>{this.pullFlag = true;},500)
+					if(this.hasNextPage){
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					}else{
+						this.loadding = false
+						this.pullUpOn = false
+						this.nomoreText = '已至底部'
 					}
-				)	
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			},
 			ischeck(item,pro){//为未选中的时候改变为true,反之为true
 				pro.productsChecked = !pro.productsChecked;
@@ -271,10 +255,10 @@
 					})
 				} else {
 					productsList.forEach(pros => {
-						if(pros.productsChecked && pros.validFlag != 2) {
+						if(pros.productsChecked && pros.validFlag != '3') {
 							productsCheckedLength++;
 						}
-						if(pros.validFlag == 2) {
+						if(pros.validFlag == '3') {
 							disabledLength++;
 						}
 					})
@@ -304,7 +288,7 @@
 				let products = item.productsList;
 				products.forEach(pros=>{
 					if(item.checked) {
-						if(pros.validFlag =='2'){
+						if(pros.validFlag =='3'){
 							// 无效
 							this.isNnder = true;
 							pros.productsChecked = this.isshowDelbtn ?true :false;
@@ -345,7 +329,7 @@
 					productsList=item.productsList;
 					prosPrice=productsList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
 					productsList.forEach(pros =>{
-						if(pros.validFlag =='2'){
+						if(pros.validFlag =='3'){
 							validList.push(pros)
 							validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
 							item.totalPrice = prosPrice - validPrice
@@ -355,8 +339,7 @@
 					})
 				})
 			},
-			//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-			totalPeice(){
+			totalPeice(){	//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
 			    this.allPrice = 0
 				let prosPrice=0;
 				let validPrice=0;
@@ -367,7 +350,7 @@
 					productsList.forEach(pros=>{	
 						if(pros.productsChecked){
 							prosPrice+=pros.retailPrice*pros.productCount;
-							if(pros.validFlag =='2'){
+							if(pros.validFlag =='3'){
 								validList.push(pros)
 								validPrice = validList.reduce((p,e)=>p+e.retailPrice*e.productCount,0);
 								this.allPrice = prosPrice - validPrice
@@ -389,7 +372,7 @@
 					productsList.forEach(pros=>{
 						if(pros.productsChecked){
 							prosAllCount+=parseInt(pros.productCount);
-							if(pros.validFlag =='2'){
+							if(pros.validFlag =='3'){
 								validList.push(pros)
 								validList.forEach(val =>{
 									validCount += val.productCount
@@ -442,7 +425,7 @@
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},
-			changeNnmber(e,item,pros){
+			changeNnmber(e,item,pros){//输入商品数量更新
 				let _value = e.detail.value;
 				if(!this.$api.isNumber(_value)){
 					pros.productCount = pros.minBuyNumber
@@ -456,24 +439,15 @@
 				this.totalShopPeice();
 			},
 			updateShoppogNum(pros){//加减购物车商品更新到后台
-			 	 this.$api.get('/shopping/update',
-			 	 	{
-			 	 		userID:this.userID,
-			 	 		productID:pros.id,
-			 			productCount:pros.productCount
-			 	 	},
-			 	 	response =>{
-			 	 		if(response.code ==='1'){
-			 	 			// console.log(response)
-			 	 			this.isShowDelModal = false
-			 	 			this.isshowDelbtn = false;
-			 	 			this.initGetCartGoodsList();
-			 	 		}
-			 	 	}
-			 	 )	
+				let params ={userID:this.userID,productID:pros.productID,productCount:pros.productCount}
+				shoppingCartUpdate(params).then(response =>{
+					this.isshowDelbtn = false;
+					this.initGetCartGoodsList();
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
+				})
 			 },
-			//跳转确认订单页面
-			toConfirmation(){
+			toConfirmation(){//跳转确认订单页面
 				let setGoodsList=[];
 				this.goodsList.forEach(res=>{
 					let products = res.productsList
@@ -531,8 +505,7 @@
 				}
 				return setGoodData
 			},
-			// 显示删除商品管理
-			showDelManager(){
+			showDelManager(){//显示删除商品管理
 				this.isshowDelbtn = true;
 				this.isNnder = true;
 				if(this.isCheckAll) {
@@ -549,7 +522,7 @@
 					this.updateCheckAllBtn();
 				}
 			},
-			hideDelManage(){
+			hideDelManage(){//隐藏删除商品管理			
 				this.isshowDelbtn = false;
 				if(this.isCheckAll) {
 					this.updateBothCheckBtn();	
@@ -560,7 +533,7 @@
 							item.checked = false;
 						}
 						item.productsList.forEach(pros => {
-							if(pros.validFlag == 2) {
+							if(pros.validFlag == '3') {
 								pros.productsChecked = false;
 							}
 						})
@@ -568,8 +541,7 @@
 					this.updateCheckAllBtn();
 				}
 			},
-			// 删除商品
-			deleteList(){	
+			deleteList(){//删除购物车商品	
 				this.delGoodsList=[];
 				this.goodsList.forEach(delitem=>{
 					let products = delitem.productsList
@@ -583,36 +555,19 @@
 				if(this.delGoodsList.length == 0){
 					this.$util.msg("请选择要删除的商品~",2000);
 					return
-				}else{					
-					this.isShowDelModal = true
-				}
-			},
-			deleteCart(data){//删除购物车商品
-				let self = this; 
-				this.$api.get('/shopping/delete',
-					{
-						userID:this.userID,
-						productIDs:this.delGoodsList
-					},
-					response =>{
-						if(response.code ==='1'){
-							// console.log(response)
+				}else{				
+					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
+						shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
 							this.$util.msg(response.msg,2000);
-							this.isShowDelModal = false
 							this.isshowDelbtn = false;
 							setTimeout(function(){
 								self.initGetCartGoodsList();
 							},2000)
-						}else{
-							this.$util.msg(response.msg,3000);
-							setTimeout(function(){
-								uni.switchTab({
-									url:'/pages/tabBar/home/home'
-								})
-							},1000)
-						}
-					}
-				)	
+						}).catch(response =>{
+							this.$util.msg(response.msg,2000)
+						})
+					})
+				}
 			},
 			goIndex(){
 				uni.switchTab({

+ 9 - 6
pages/tabBar/home/home.vue

@@ -69,8 +69,9 @@
 									<text class="p sm">¥</text>
 									<text class="p big">{{item.retailPrice.toFixed(2)}}</text>
 								</view>
-								<view v-else class="no-price">							
-									<text vi-else class="p-no tui-skeleton-rect" @click.stop="navto('/pages/user-module/login-accont?type=3')">登录查看价格<text class="iconfont icon-xiayibu" style="font-size: 22rpx;margin: 0 6rpx;"></text></text>
+								<view v-else class="no-price">		
+									<text class="p-no">价格:</text>
+									<uni-stars :stars="parseInt(item.price1Grade)"></uni-stars>
 								</view>		
 							</view>
 						</view>
@@ -124,6 +125,7 @@
 	import authorize from '@/common/config/authorize.js'
 	import modalLayer from "@/components/modal-layer"
 	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 { queryPreferred } from "@/api/product.js"
 	import { mapMutations} from 'vuex';
@@ -131,7 +133,8 @@
 		components:{
 			tuiSkeleton,
 			modalLayer,
-			btSearch
+			btSearch,
+			uniStars
 		},
 		data() {
 			return {
@@ -214,7 +217,7 @@
 				})
 			},
 			getOrganizeProducts(){//获取模块三商品
-				queryPreferred({preferredFlag:100,pageNum:1,pageSize:5}).then(res =>{
+				queryPreferred({userID:this.userID,preferredFlag:100,pageNum:1,pageSize:5}).then(res =>{
 					this.organizeProducts = res.data.results
 				})
 			},
@@ -538,8 +541,8 @@
 				margin-top: 8rpx;
 				.p-no{
 					font-size: $font-size-24;
-					color: #F8C499;
-					margin-left: 10rpx;
+					color: $color-system;
+					margin-right: 5rpx;
 				}
 				image{
 					width:30rpx;

+ 166 - 103
pages/user-module/apply.vue

@@ -10,7 +10,7 @@
 				<view class="error-main-list">
 					<view class="item" v-for="(item, index) in errorList" :key="index">
 						<text class="num">{{ index+1 }}.</text>
-						<text>{{ item.text }}</text>
+						<text>{{ item }}</text>
 					</view>
 				</view>
 			</view>
@@ -55,7 +55,7 @@
 				<view class="register-from code">
 					<input class="row-input" type="text" v-model="newMobileCode" placeholder="请输入新手机号的验证码" maxlength="6"/>
 				</view>
-				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
+				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" @click.stop="getNewMobileCodeFn">
 					<button class="row-input"  type="button" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
 				</view>
 			</view>
@@ -139,7 +139,7 @@
  -->					
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -155,7 +155,7 @@
 					<input class="row-input keshi" type="text" v-model="clubContact" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -169,7 +169,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -198,7 +198,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 2">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -238,7 +238,7 @@
 					</view>
 				</view>
 				<view class="register-row ">
-					<view class="register-btn sub">提交审核</view>
+					<view class="register-btn sub" @click.stop="organizationUpdateInfo">提交审核</view>
 				</view>
 			</view>
 			<mpvue-city-picker :themeColor="themeColor"
@@ -252,10 +252,10 @@
 </template>
 
 <script>
-	import { mapMutations } from 'vuex';
+import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import { organizationRegister , organizationModifyUpdate ,organizationUpdateModifyInfo } from "@/api/use.js"
-	import { getImageCode, getMobileCode, uploadFileImage } from "@/api/utils.js" 
+	import { organizationUpdateModifyInfo , organizationModifyUpdate  } from "@/api/use.js"
+	import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js" 
 	var self;
 	export default{
 		components:{
@@ -263,19 +263,19 @@
 		},
 		data() {
 			return{
-				errorList:[
-					{text:'图片模糊'},
-					{text:'营业执照错误'},
-					{text:'手机号码错误图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊图片模糊'}
-				],
-				isOpenError:false,			//审核不通过提示信息显隐
+				isOpenError:false,
+				errorList:[],
 				isShowCheckPhone:false,		//是否显示修改手机
 				tabCurrentIndex:3,	
 				isPreviewImage:false,   	//预览图片开关
 				isMobileDisabled: false,	//手机验证码按钮控制
 				isNewMobileDisabled: false,	//手机验证码按钮控制
+				userID:'',					//用户ID
+				clubID:'',					//会所ID
 			    count: '',					//倒计时
+			    newCount: '',				//倒计时
 			    codeTime: null,
+			    codeTimeNew: null,
 				clubName:'',	 			//机构名称
 				abbreviation:'',	 		//机构简称
 				clubContact:'',	 			//联系人
@@ -297,67 +297,131 @@
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
 				mainpro:'',				//主营内容
-				isOrganizationType:3,
+				clubTelePhone:'',		//固定电话
+				clubFax:'',				//传真
+				companyPprofile:'',		//公司简介
+				firstClubType:'',		//机构类型
+				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
-				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
-				medicaCampList:[
-					{value:'1',name:'美容'},
-					{value:'2',name:'美体'},
-					{value:'3',name:'美发'},
-					{value:'4',name:'皮肤管理'},
-					{value:'5',name:'光电'},
-					{value:'6',name:'综合类'},
-					{value:'7',name:'中医养生'},
-					{value:'8',name:'spa'}
-				],
+				mentuzCampList:[],
+				medicaCampList:[],
 				typtIndex:0,
 				organizationType:0,
 				current:0,
 				isShowAustomItem:false, //是否显示其他添加
 				customItemValue:'', 	//自定义项目
+				isMainproCheck:false,
 				addressData:{
 					address:'请选择机构所在地区',
 					townID:'',			//区ID
-					cityID:'',			//ID
-					provinceID:'',		//ID
-					addressDetail: '',	//地址
+					cityID:'',			//ID
+					provinceID:'',		//ID
+					addressDetail: '',	//地址详情
 				},
 			}	
 		},
 		onLoad(option) {
 			console.log(option)
-			this.organizationModifyInfo()
+			this.organizationInfo()
 		},
 		methods:{
-			organizationModifyInfo(){
-				organizationUpdateModifyInfo({userID:this.userID}).then(response =>{
-					console.log(response)
+			organizationInfo(){
+				this.$api.getStorage().then((resolve) =>{
+					this.userID = resolve.userID
+					organizationUpdateModifyInfo({userID:10283}).then(response =>{
+						let organizationClub = response.data.club
+						let organizationUser = response.data.user
+						this.errorList =organizationUser.auditNoteList
+						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.address = organizationClub.provincialAddress
+						this.addressData.addressDetail = organizationClub.address
+						this.socialCreditCode = organizationClub.socialCreditCode
+						this.firstClubType = organizationClub.firstClubType
+						this.secondClubType = organizationClub.secondClubType
+						this.uploadBusinessImage = organizationClub.businessLicenseImage
+						this.uploadMentuzImage = organizationClub.headpic
+						this.uploadMedicalImage = organizationClub.medicalPracticeLicenseImg
+						this.department = organizationClub.department						
+						this.clubTelePhone = organizationClub. contractPhone
+						this.clubFax = organizationClub.fax
+						this.companyPprofile = 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!=null){
+							if(this.firstClubType == '1'){
+								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							}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;
+						}
+					})
 				}).catch(response =>{
-					this.$util.msg(res.msg,2000);
+					this.$util.msg(response.msg,2000)
 				})
 			},
-			registerStepsTwo(){
-				let params ={
-						name:this.clubName,
-						linkMan:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
-						whichStep:2,
+			organizationUpdateInfo(){//提交审核
+				if(!this.isMainproCheck){
+					let mainproList = []
+					if(this.firstClubType == '1'){
+						this.mentuzCampList.forEach(item =>{
+							mainproList.push(item.name)
+						})
+					}else{
+						this.medicaCampList.forEach(item =>{
+							mainproList.push(item.name)
+						})
+					}
+					this.mainpro = mainproList.join('/')
 				}
-				organizationVerifyRegisterTwo(params).then(res =>{
-					console.log(res)
-					this.tabCurrentIndex = 3
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
-			registerStepsSub(){
 				let params ={
+						userID:this.userID,
+						clubID:this.clubID,					//会所ID
 						name:this.clubName,
 						linkMan:this.clubContact,
-						bindMobile:this.registerMobile,
-						activationCode:this.mobileCode,
+						contractMobile2:this.mobile,
+						contractMobile:this.newMobile,
+						mobileCode:this.mobileCode,
+						newMobileCode:this.newMobileCode,
 						sname:this.abbreviation,
 						provinceID:this.addressData.provinceID,
 						cityID:this.addressData.cityID,
@@ -367,29 +431,28 @@
 						businessLicenseImage:this.uploadBusinessImage,
 						headpic:this.uploadMentuzImage,
 						firstClubType:this.isOrganizationType, //机构类型分类 医美:0和生美:1
-						secondClubType:this.secondClubType,	//机构类型二级分类 诊所:1,门诊:2,医院:3
-						department:this.department,			//科室
+						secondClubType:this.secondClubType,		//机构类型二级分类 诊所:1,门诊:2,医院:3
+						department:this.department,				//科室
 						medicalPracticeLicenseImg:this.uploadMedicalImage,//资质图片
 						isAgreed:this.isAgreed,				//是否勾选协议	
 						mainpro:this.mainpro,
-						whichStep:3
+						fax:this.clubFax,
+						contractPhone:this.clubTelePhone,
+						info : this.companyPprofile
 				}
-				organizationRegister(params).then(res =>{
-					this.$util.msg('您的机构账号已提交审核',2000);
-					this.$api.switchTabTo('/pages/tabBar/home/home')
-				}).catch(res =>{
-					this.$util.msg(res.msg,2000);
+				console.log(params)
+				organizationModifyUpdate(params).then(response =>{
+					this.$util.msg(response.msg,2000);
+					setTimeout(()=>{
+						this.$api.switchTabTo('/pages/tabBar/home/home')
+					},2000)
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			getMobileCodeFn(){
-				let params = {
-						mobile:this.registerMobile,
-						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
-				}
-				getMobileCode(params).then(res =>{
+				let params = { mobile : this.mobile }
+				getClubMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -406,45 +469,33 @@
 								this.mobileCodeText = '获取验证码'
 			        		}
 			       		},1000)
-			      	}
-				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
+			      	}		
+				}).catch( response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			getNewMobileCodeFn(){
-				let params = {
-						mobile:this.registerMobile,
-						activateCodeType:2,
-						platformType:2,
-						imgCode:this.imageCode,
-						token:this.imageCodetoken,
-				}
-				getMobileCode(params).then(res =>{
+				let params = { newMobile : this.newMobile }
+				getClubNewMobileCode(params).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
-			     	if (!this.codeTime) {
-			       		this.count = TIME_COUNT;
+			     	if (!this.codeTimeNew) {
+			       		this.newCount = TIME_COUNT;
 			       		this.isNewMobileDisabled = true;
-			       		this.codeTime = setInterval(() => {
-			       			if (this.count > 1 && this.count <= TIME_COUNT) {
-			         			this.count--
-			         			this.newMobileCodeText = this.count +'s重新发送'
+			       		this.codeTimeNew = setInterval(() => {
+			       			if (this.newCount > 1 && this.newCount <= TIME_COUNT) {
+			         			this.newCount
+			         			this.newMobileCodeText = this.newCount +'s重新发送'
 			        		} else {
 				         		this.isNewMobileDisabled = false;
-				         		clearInterval(this.codeTime)
-				         		this.codeTime = null
+				         		clearInterval(this.codeTimeNew)
+				         		this.codeTimeNew = null
 								this.newMobileCodeText = '获取验证码'
 			        		}
 			       		},1000)
 			      	}
 				}).catch( res =>{
-					this.$util.msg(res.msg,2000);
-				})
-			},
-			getVerificationCode(){//图形验证
-				getImageCode().then(res => {
-					this.imageCodeUrl = res.data.baseImage
-					this.imageCodetoken = res.data.token
+					this.$util.msg(response.msg,2000);
 				})
 			},
 			// 三级联动选择
@@ -516,7 +567,7 @@
 					title:'标题',
 					itemList: ['医美', '生美'],
 					success: (e) => {
-						self.isOrganizationType = e.tapIndex
+						self.isOrganizationType = e.tapIndex+1
 						switch(e.tapIndex){
 							case 0:
 								this.organizationTypeText = '医美'
@@ -549,10 +600,12 @@
 				}
 			},
 			chooseMaleLike(e){
+				this.isMainproCheck = true
 				this.mainpro = this.checkLikes(e,this.mentuzCampList)
 				console.log(this.mainpro)
 			},
 			chooseMaleLikes(e){
+				this.isMainproCheck = true
 				this.mainpro = this.checkLikes(e,this.medicaCampList)
 				console.log(this.mainpro)
 			},
@@ -569,7 +622,7 @@
 						this.$set(item,'checked',false)
 					}
 				}
-				return arr.toString()
+				return arr.join('/')
 			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck
@@ -587,12 +640,20 @@
 			showAustomItem() {
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
+			setNewMainpro(arr){//回显处理主营内容
+				let _ARRAY = []
+				arr.split('/').forEach((item,index) =>{
+					let _OBJ = {value:index,name:item,checked:true}
+					_ARRAY.push(_OBJ)
+				})
+				return _ARRAY
+			},
 			addCustomItem(){
 				if(this.isOrganizationType == 0){
-					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
+					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue,checked:true}
 					this.mentuzCampList.push(item)
 				}else{
-					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue}
+					let item = {value:`${this.medicaCampList.length+1}`,name:this.customItemValue,checked:true}
 					this.medicaCampList.push(item)
 				}
 			},
@@ -640,6 +701,7 @@
 				height: 90rpx;
 				line-height: 90rpx;
 				background: #FF0000;
+				border-bottom: 1px solid #F7F7F7;
 				&.error-top--none{
 					background:#FFFFFF;
 					.name{
@@ -674,6 +736,7 @@
 				.icon-xiangxiajiantou-active{
 					transform: rotate(180deg);
 					color: #333333;
+				
 				}
 			}
 			.animation{
@@ -686,7 +749,6 @@
 				width: 702rpx;
 				height: auto;
 				padding: 24rpx;
-				border-top: 1px solid #F7F7F7;
 				overflow: hidden;
 				background: #FFFFFF;
 				.error-main-list{
@@ -705,7 +767,7 @@
 				}
 			}
 			.error-main--hide {
-				padding: 0 0;
+				padding: 0 24rpx;
 				height: 0px;
 				line-height: 0px;
 			}		
@@ -888,6 +950,7 @@
 						display: flex;
 						flex-flow: row wrap;
 						justify-content: space-between;
+						align-items: center;
 						&.btn{
 							margin: 0 auto;
 							margin-left: 126rpx;
@@ -917,12 +980,12 @@
 							}
 						}
 						.item {
-						  width: 156rpx;
+						  width: 155rpx;
 						  height: 60rpx;
 						  font-size:$font-size-28;
 						  line-height: 60rpx;
 						  border-radius:10rpx;
-						  margin-bottom: 20rpx;
+						  margin: 10rpx;
 						  text-align: center;
 						  box-sizing: border-box;
 						  border: 1rpx solid #EFEFEF;

+ 16 - 17
pages/user-module/bindemail.vue

@@ -34,7 +34,6 @@
 </template>
 
 <script>
-	import { mapMutations } from 'vuex';
 	import authorize from '@/common/config/authorize.js' 
 	import { bindingEmail } from '@/api/use.js' 
 	import { getEmailCode } from "@/api/utils.js"
@@ -52,28 +51,22 @@
 				codeType:'',		//用户状态 为4状态的跳绑定微信
 				getOption:'',			//储存上一级页面的option
 				loginType:'',		//跳转类型
+				loginPath:'',		//从哪个页面跳的
 				alertText:'',
-				listType: '',
-				listVal: '',
-				detilType:'',
 				id:''//商品ID
 			}
 		},
 		onLoad(option) {
-			let data = JSON.parse(option.data);
-			this.getOption = data
-			this.codeType = option.codeType
-			this.loginType = data.type;
-			this.id = data.id
-			if(data.listType) {
-				this.listType = data.listType;
-				this.listVal = data.listVal;
+			if(option.data){
+				let data = JSON.parse(option.data);
+				this.getOption = data
+				this.loginType = data.type;
 			}
-			console.log(this.codeType)
-			console.log(this.loginType)
+			this.loginPath = option.pathType
+			this.codeType = option.codeType
+			console.log(this.loginPath)
 		},
 		methods:{
-			...mapMutations(['login']),
 			bindEmailFrist(){
 				 let params = {
 						userID:this.userID,
@@ -81,19 +74,25 @@
 						code:this.bindEmailCode
 				}
 				bindingEmail(params).then(res =>{
-					this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
+					if(this.loginPath == 1){
+						uni.switchTab({
+							url:'/pages/tabBar/user/user'
+						})
+					}else{
+						this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
+					}
 				})
 			},
 			bindEmailNone(){
 				this.$api.navigateTo(`/pages/user-module/bindwechat?data=${JSON.stringify(this.getOption)}&type=${this.loginType}`)
 			},
 			getEmailCodeFn(){
-				this.isEmialDisabled = true;
 				getEmailCode({email:this.bindEmail,status:1}).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--

+ 12 - 12
pages/user-module/bindwechat.vue

@@ -77,7 +77,7 @@
 </template>
 
 <script>
-	import { mapMutations } from 'vuex';
+	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import { bindingWechat } from "@/api/use.js"
 	import { getImageCode, getbindWechatCode } from "@/api/utils.js"
@@ -168,10 +168,10 @@
 				}
 				getbindWechatCode(params).then(res =>{
 					const TIME_COUNT = 60;
-					this.isMobileDisabled = true;
 					this.$util.msg('验证短信已发送',2000)
 			     	if (!this.codeTime) {
 			       		this.count = TIME_COUNT;
+						this.isMobileDisabled = true;
 			       		this.codeTime = setInterval(() => {
 			       			if (this.count > 1 && this.count <= TIME_COUNT) {
 			         			this.count--
@@ -213,12 +213,12 @@
 			    }
 			 },
 			wxGetUserInfo(){
-				let self = this
 				authorize.getCode('weixin').then(wechatcode =>{
 					wx.getUserInfo({
 						success: res => {
 							console.log('useInfo:',res.userInfo)
-							self.userInfo = res.userInfo;
+							this.isUserInfo = false;
+							this.userInfo = res.userInfo;
 							let params ={
 									userID:this.userID,
 									mobile:this.bindLinkPhone,
@@ -227,11 +227,13 @@
 									nickName:res.userInfo.nickName,
 									headimgurl:res.userInfo.avatarUrl,
 							}
-							bindingWechat(params).then(res =>{
-								this.isUserInfo = false;
-								this.goUserLogininit()
-							}).catch(res =>{
-								this.$util.msg(res.msg,2000)
+							bindingWechat(params).then(response =>{
+								// this.login(response.data);
+								uni.switchTab({
+									url:'/pages/tabBar/user/user'
+								})
+							}).catch(response =>{
+								this.$util.msg(response.msg,2000)
 							})							
 						}
 					});	
@@ -251,9 +253,7 @@
 					}else {
 						url ='/pages/tabBar/home/home'
 					}
-					uni.switchTab({
-						url
-					})
+					
 				} else if(this.listType) {
 					this.$api.navToListPage({type:this.listType,value:this.listVal,lType:'4'});
 				}

+ 30 - 30
pages/user-module/information.vue

@@ -133,7 +133,7 @@
  -->					
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -149,7 +149,7 @@
 					<input class="row-input keshi" type="text" v-model="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -163,7 +163,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -192,7 +192,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 2">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -319,7 +319,7 @@
 				clubFax:'',				//传真
 				companyPprofile:'',		//公司简介
 				firstClubType:'',		//机构类型
-				isOrganizationType:2,
+				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
 				mentuzCampList:[],
@@ -340,7 +340,6 @@
 			}	
 		},
 		onLoad(option) {
-			console.log(option)
 			this.organizationInfo()
 		},
 		methods:{
@@ -387,30 +386,29 @@
 						switch(this.firstClubType){
 							case '1':
 								this.organizationTypeText = '医美'
-								this.isOrganizationType = 0
-								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+								this.isOrganizationType = 1
 								break;
 							case '2':
 								this.organizationTypeText = '生美'
-								this.isOrganizationType = 1
-								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+								this.isOrganizationType = 2
 								break;
 							case null:
 								this.organizationTypeText = '请选择机构类型'
-								this.isOrganizationType = 2
+								this.isOrganizationType = 0
 								break;
-						}						
+						}	
+						if(organizationClub.mainpro!=null){
+							if(this.firstClubType == '1'){
+								this.mentuzCampList = this.setNewMainpro(organizationClub.mainpro)
+							}else{
+								this.medicaCampList = this.setNewMainpro(organizationClub.mainpro)
+							}
+						}
 						//机构类型
 						switch(this.secondClubType){
-							case '1':
-								this.current = 0								
-								break;
-							case '2':
-								this.current = 1									
-								break;
-							case '3':
-								this.current = 2									
-								break;
+							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 =>{
@@ -422,15 +420,17 @@
 					let mainproList = []
 					if(this.firstClubType == '1'){
 						this.mentuzCampList.forEach(item =>{
-							mainproList.push(item).toString()
+							mainproList.push(item.name)
 						})
 					}else{
 						this.medicaCampList.forEach(item =>{
-							mainproList.push(item).toString()
+							mainproList.push(item.name)
 						})
 					}
-					this.mainpro = mainproList
+					this.mainpro = mainproList.join('/')
 				}
+				console.log(this.mainpro)
+				debugger
 				let params ={
 						userID:this.userID,
 						clubID:this.clubID,					//会所ID
@@ -487,7 +487,7 @@
 								this.mobileCodeText = '获取验证码'
 			        		}
 			       		},1000)
-			      	}
+			      	}		
 				}).catch( response =>{
 					this.$util.msg(response.msg,2000);
 				})
@@ -585,7 +585,7 @@
 					title:'标题',
 					itemList: ['医美', '生美'],
 					success: (e) => {
-						self.isOrganizationType = e.tapIndex
+						self.isOrganizationType = e.tapIndex+1
 						switch(e.tapIndex){
 							case 0:
 								this.organizationTypeText = '医美'
@@ -640,7 +640,7 @@
 						this.$set(item,'checked',false)
 					}
 				}
-				return arr.toString()
+				return arr.join('/')
 			},
 			agreeCheck() {
 				this.isCheck = !this.isCheck
@@ -660,7 +660,7 @@
 			},
 			setNewMainpro(arr){//回显处理主营内容
 				let _ARRAY = []
-				arr.split(',').forEach((item,index) =>{
+				arr.split('/').forEach((item,index) =>{
 					let _OBJ = {value:index,name:item,checked:true}
 					_ARRAY.push(_OBJ)
 				})
@@ -911,12 +911,12 @@
 							}
 						}
 						.item {
-						  width: 156rpx;
+						  width: 155rpx;
 						  height: 60rpx;
 						  font-size:$font-size-28;
 						  line-height: 60rpx;
 						  border-radius:10rpx;
-						  margin-bottom: 20rpx;
+						  margin: 10rpx;
 						  text-align: center;
 						  box-sizing: border-box;
 						  border: 1rpx solid #EFEFEF;

+ 3 - 2
pages/user-module/login-accont.vue

@@ -24,7 +24,7 @@
 			</view>
 		</view>
 		<view class="login-btn"  @click="confirmLogin">登录</view>
-		<view class="login-btn-last" @click.stop="this.$api.navigateTo('/pages/user-module/login')">授权登录</view>
+		<view class="login-btn-last" @click.stop="this.$api.navigateTo(`/pages/user-module/login?data=${getOption}`)">授权登录</view>
 	</view>
 </template>
 
@@ -54,7 +54,8 @@
 		},
 		onLoad(option) {
 			console.log(option)
-			this.getOption = option
+			this.getOption = JSON.stringify(option)
+			
 		},
 		methods:{
 			...mapMutations(['login']),

+ 26 - 35
pages/user-module/login.vue

@@ -13,19 +13,8 @@
 			/>
 		</view>
 		<view class="login-btn"  @click="goLogin">授权登录</view>
-		<view v-if="isToast" class="model-warp" >
-			<view class="model-alert clearfix">
-				<view class="alert-content">
-					<view class="t-h1">{{toestText}}</view>
-					<view class="t-p">请联系客服获取{{alertText}}后再登录,联系电话{{telPhone}}</view>
-				</view>
-				<view class="alert-btn">
-					<view class="btn btn-confirm" @click="hideToast">确定</view>
-				</view>
-			</view>
-		</view>
 		<!-- 授权按钮 -->
-		<view class="model-warp" :class="[isUserInfo===false ? 'none':'show']">
+		<view class="model-warp" :class="[isUserInfo ? 'show':'none']">
 			<view class="model-alert">
 				<view class="alert-content">
 					<view class="t-p">采美采购商城需要获取您的微信授权才能正常提供服务</view>
@@ -40,15 +29,13 @@
 </template>
 
 <script>
-	import { mapMutations } from 'vuex';
+	import {mapState,mapMutations } from 'vuex';
 	import authorize from '@/common/config/authorize.js' 
 	import { invitationCodeLogin  } from '@/api/use.js'
-	var self;
 	export default{
 		data() {
 			return{
 				invitationCode:'',  //获取用户登录的邀请码
-				isToast:false,		//控制显示未输入邀请码提示	
 				isUserInfo:false,	//控制显示授权弹窗
 				nickName:'',		//存储用户名
 				userInfo:'',		//存储微信用户授权信息
@@ -65,12 +52,13 @@
 		},
 		onLoad(option) {
 			console.log(option)
-			self = this;
-			self.loginType = option.type;
-			self.id = option.id
+			let data = JSON.parse(option.data);
+			this.getOption = data
+			this.loginType = option.type;
+			this.id = option.id
 			if(option.listType) {
-				self.listType = option.listType;
-				self.listVal = option.listVal;
+				this.listType = option.listType;
+				this.listVal = option.listVal;
 			}
 		},
 		methods:{
@@ -80,6 +68,7 @@
 					this.$util.msg('请输入邀请码',2000)
 					return
 				}
+				
 				//查看此微信用户是否已经授权过
 				authorize.getSetting().then(res =>{
 					// console.log('是否已授权',res);//0:为取消授权 1:为已授权 2:为未操作
@@ -94,7 +83,7 @@
 			//授权登录 
 			getuserinfo: function (e) {
 			    if (e.detail.userInfo) {
-					self.wxGetUserInfo()
+					this.wxGetUserInfo()
 			    }else{
 					//用户按了拒绝按钮
 					uni.showModal({
@@ -120,22 +109,28 @@
 				authorize.getCode('weixin').then(wechatcode =>{
 					wx.getUserInfo({
 						success: res => {
-							// console.log('useInfo:',res.userInfo)
-							self.userInfo = res.userInfo;
+							console.log('useInfo:',res.userInfo)
+							this.isUserInfo = false
+							this.userInfo = res.userInfo;
 							let params ={
-									userID:this.userID,
 									invitationCode:this.invitationCode,
 									nickName:res.userInfo.nickName,
 									headimgurl:res.userInfo.avatarUrl,
 							}							
 							invitationCodeLogin(params).then(response =>{
-								self.isUserInfo = false
-								this.goUserLogininit()
-							}).catch(response =>{
-								this.$util.msg(response.msg,2000)
-								this.isUserInfo = false
+								if(response.code == 0){
+									this.login(response.data)
+									uni.switchTab({
+										url:'/pages/tabBar/user/user'
+									})
+								}else if(response.code == 4){
+									this.login(response.data)
+									this.$api.navigateTo(`/pages/user-module/bindemail?data=${JSON.stringify(this.getOption)}&pathType=1`)
+								}else{
+									this.$util.msg(response.msg,2000)
+									this.isUserInfo = false
+								}
 							})
-							
 						}
 					});	
 				})
@@ -161,13 +156,9 @@
 					this.$api.navToListPage({type:this.listType,value:this.listVal,lType:'4'});
 				}
 			},
-			//关闭未填邀请码弹窗
-			hideToast(){
-				self.isToast = false;
-			},
 			//关闭未授权用户授权提示弹窗
 			hideModel(){
-				self.isUserInfo = false;
+				this.isUserInfo = false;
 			}
 		}
 	}

+ 1 - 1
pages/user-module/password.vue

@@ -195,7 +195,7 @@
 						platformType:2,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
-				}
+					}
 				getMobileCode(params).then(res =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;

+ 13 - 12
pages/user-module/register.vue

@@ -167,7 +167,7 @@
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0" >
+			<view class="register-row clearfix" v-if="isOrganizationType == 1" >
 				<view class="register-from radio">
 					<radio-group @change="radioChange">
 						<label class="row-input" v-for="(item, index) in beautyList" :key="item.value">
@@ -183,7 +183,7 @@
 					<input class="row-input keshi" type="text" v-model="department" placeholder="请填写经营的科室,至少三个,用逗号隔开" maxlength="16"/>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-picture">
 					<view class="label zz">医疗执业许可证:</view>
 					<view class="upload-picture">
@@ -197,7 +197,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 0">
+			<view class="register-row clearfix" v-if="isOrganizationType == 1">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLike" >
@@ -226,7 +226,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="register-row clearfix" v-if="isOrganizationType == 1">
+			<view class="register-row clearfix" v-if="isOrganizationType == 2">
 				<view class="register-from group">
 					<view class="label">主营内容:</view>
 					<checkbox-group class="content-class" @change="chooseMaleLikes">
@@ -295,7 +295,7 @@
 		},
 		data() {
 			return{
-				tabCurrentIndex:1,	
+				tabCurrentIndex:1,			//显示step
 				isPreviewImage:false,   	//预览图片开关
 				isEmialDisabled: false,		//验证码按钮控制
 				isMobileDisabled: false,	//手机验证码按钮控制
@@ -327,7 +327,7 @@
 				isDepartment:false,     //是否显示科室
 				secondClubType:'',		//机构类型二级分类
 				mainpro:'',				//主营内容
-				isOrganizationType:3,
+				isOrganizationType:0,
 				organizationTypeText:'请选择机构类型',
 				beautyList:[{value:'1',name:'诊所'},{value:'2',name:'门诊'},{value:'3',name:'医院'}],
 				mentuzCampList:[{value:'1',name:'整形'},{value:'2',name:'轻医美'},{value:'3',name:'皮肤科'}],
@@ -342,7 +342,7 @@
 					{value:'8',name:'spa'}
 				],
 				typtIndex:0,
-				organizationType:0,
+				organizationType:3,
 				current:0,
 				isShowAustomItem:false, //是否显示其他添加
 				customItemValue:'', 	//自定义项目
@@ -454,7 +454,7 @@
 						platformType:2,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
-				}
+					}
 				getMobileCode(params).then(res =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
@@ -552,7 +552,7 @@
 					title:'标题',
 					itemList: ['医美', '生美'],
 					success: (e) => {
-						self.isOrganizationType = e.tapIndex
+						self.isOrganizationType = e.tapIndex+1
 						switch(e.tapIndex){
 							case 0:
 								this.organizationTypeText = '医美'
@@ -624,7 +624,7 @@
 				this.isShowAustomItem = !this.isShowAustomItem
 			},
 			addCustomItem(){
-				if(this.isOrganizationType == 0){
+				if(this.isOrganizationType == 1){
 					let item = {value:`${this.mentuzCampList.length+1}`,name:this.customItemValue}
 					this.mentuzCampList.push(item)
 				}else{
@@ -894,6 +894,7 @@
 						display: flex;
 						flex-flow: row wrap;
 						justify-content: space-between;
+						align-items: center;
 						&.btn{
 							margin: 0 auto;
 							margin-left: 126rpx;
@@ -926,12 +927,12 @@
 							}
 						}
 						.item {
-						  width: 156rpx;
+						  width: 155rpx;
 						  height: 60rpx;
 						  font-size:$font-size-28;
 						  line-height: 60rpx;
 						  border-radius:10rpx;
-						  margin-bottom: 20rpx;
+						  margin: 10rpx;
 						  text-align: center;
 						  box-sizing: border-box;
 						  border: 1rpx solid #EFEFEF;

+ 11 - 25
pages/user/about/about.vue

@@ -6,6 +6,7 @@
 
 <script>
 	import richTextTemplate from '@/components/module/listTemplate/richTextTemplate'
+	import { queryAfterSale } from "@/api/other.js"
 	
 	var self;
 	export default{
@@ -15,38 +16,23 @@
 		data() {
 			return{
 				serverUrl: '',
-				type: ''
+				type: 'introduction'
 			}
 		},
 		onLoad(){
-			let self = this;
-			uni.getStorage({
-			    key: 'user_key',
-			    success: function (res) {
-			        const resData = res.data;
-					if(resData.code == '1'){
-						self.serverUrl = `/personal/myCentre?openid=${resData.openid}&userOrganizeID=${self.userOrganizeID}`;
-						self.type = 'introduction';
-						self.initData();
-					}
-			    }
-			});
-			
+			this.initData()
 		},
 		methods:{
 			initData(){
-				let self = this;
-				self.$api.get(self.serverUrl,{organizeID:self.userOrganizeID}, response => {
-					if (response.code == "1") {
-						let _data =response.data,
-							type = self.type;
-						if(type) {
-							let html = self.$api.adaptRichTextImg(_data[type]);
-							self.$refs.childTemplate.html = html;
-						}
-					} else {
-						self.$util.msg(response.msg,2000);
+				queryAfterSale().then(response =>{
+					let _data =response.data,
+						type = this.type;
+					if(type) {
+						let html = this.$api.adaptRichTextImg(_data[type]);
+						this.$refs.childTemplate.html = html;
 					}
+				}).catch(response =>{
+					this.$util.msg(response.msg,2000);
 				})
 			}
 		}

+ 3 - 3
pages/user/operator/list.vue

@@ -59,7 +59,7 @@
 				</scroll-view>
 			</view>
 		</view>
-		<div class="operator-btn">
+		<div class="operator-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '0rpx'}">
 			<view class="add-btn" @click="this.$api.navigateTo('/pages/user/operator/addoperator')">添加运营人员</view>
 		</div>
 		<view class="operator-model" v-if="isOperatorModel" @click.stop="closeModel">
@@ -98,8 +98,6 @@
 				clubMobile:'',
 				isSelect:false,
 				isEmpty:false,
-				isLoadMore:false,
-				alertText:'确定要删除该地址?',
 				nomoreText: '上拉显示更多',
 				userID:'',
 				pageNum:1,
@@ -108,6 +106,7 @@
 				hasNextPage:false,
 				loadding: false,
 				pullUpOn: true,
+				pullFlag: true,
 				allowDataStatus:true,
 				wrapperHeight:'100%',
 				scrollHeight:'',
@@ -116,6 +115,7 @@
 				prevPage:'',//上一个页面
 				isOperatorModel:false,
 				operatorList:[],
+				isIphoneX:this.$store.state.isIphoneX,
 				modelData:''
 			}
 		},

+ 32 - 38
pages/user/order/create-order.vue

@@ -59,6 +59,9 @@
 	import freight from '@/components/module/creatOrder/freight'
 	import freightAlert from '@/components/module/modelAlert/freightAlert'
 	import modalLayer from "@/components/modal-layer"
+	import { queryAddressList } from "@/api/cart.js" 
+	import { createOrderInfo } from "@/api/order.js" 
+	
 	export default {
 		components:{
 			choiceAddress,
@@ -72,7 +75,7 @@
 			return {
 				modallayer:false,
 				orderID:0,
-				productIDs:'',			  //获取上一级页面商品信息
+				productIds:'',			  //获取上一级页面商品信息
 				productCount:'',		  //获取上一级页面商品数量
 				classifyIDS:'',			  //获取上一级页面商品分类
 				cellPhone:'0755-88888888',//默认客服电话
@@ -101,6 +104,7 @@
 		},
 		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;
@@ -108,57 +112,47 @@
 			if(option.type =='prodcut'){
 				this.cartType = 2
 				this.productCount = data.data.productCount
-				this.productIDs = data.data.id
+				this.productIds = data.data.id
 				this.classifyIDS =  data.data.classifyID
 			}else{
 				this.cartType = 1
 				this.productCount = data.data.productCount
-				this.productIDs = data.data.id
+				this.productIds = data.data.id
 				this.classifyIDS =  data.data.classifyID
 			}
 			this.getInitCrearOrder(option);
-			this.getAddressData()
+			// this.getAddressData()
 		},
 		methods: {
 			getInitCrearOrder(option){//获取订单商品信息&&邮费信息&&发票信息
 				this.$api.getStorage().then((resolve) =>{
 					this.userID = resolve.userID
-					let params ={
-							userId:this.userID,
-							count:this.productCount,
-							organizeID:this.userOrganizeID,
-							classifyIDS:this.classifyIDS,
-							productIDs:this.productIDs
-						}
-					this.$api.lodingGet('/order/confirm',params,
-						response => {
-							// console.log(response)
-							let resData = response.data;
-							this.isRequest = true
-							this.goodsData = resData.shopList;
-							this.userMoney = resData.userMoney
-							this.freightData = {freePostFlag:resData.freight,cellPhone:resData.cellPhone}
-							this.invoiceData = resData.invoice
-							this.goodsData = resData.shopList
-						}
-					)
-				})	
+					let params ={userID:this.userID,count:this.productCount,productIds:this.productIds}
+					createOrderInfo(params).then(response =>{
+						let resData = response.data
+						this.isRequest = true
+						this.goodsData = resData.shopList
+						this.userMoney = resData.userMoney
+						this.freightData = {freePostFlag:resData.freight,cellPhone:resData.cellPhone}
+						this.invoiceData = resData.invoice
+						this.goodsData = resData.shopList
+					}).catch(response =>{
+						this.$util.msg(response.msg,2000)
+					})
+				})
 			},
 			getAddressData(){//获取地址信息
 				this.$api.getStorage().then((resolve) =>{
-					this.userID = resolve.userID
-					this.$api.lodingGet('/personal/findAddress',{index:1,pageSize:1,userID:this.userID},
-						response => {
-							this.isAddress = true
-							this.addressData = {}
-							if(response.results != ''){
-								this.addressID = response.results[0].addressID;
-								this.addressData = response.results[0];
-							}else{
-								this.addressData = this.addressData;
-							}
+					queryAddressList({index:1,pageSize:1,userID:resolve.userID}).then(response =>{
+						this.isAddress = true
+						this.addressData = {}
+						if(response.results != ''){
+							this.addressID = response.results[0].addressID;
+							this.addressData = response.results[0];
+						}else{
+							this.addressData = this.addressData;
 						}
-					)
+					})
 				})
 			},
 			handChangeInputGoodsList(data){//对应供应商的留言信息
@@ -167,7 +161,7 @@
 			},
 			submit(){//提交订单
 				if(this.addressID == ''){
-					this.$util.msg('请先添加收货地址~',3000);
+					this.$util.msg('请先添加收货地址~',3000)
 					return
 				}
 				this.orderInfo = this.goodsData.map(el => {
@@ -248,7 +242,7 @@
 			}	
 		},
 		onShow() {
-			// this.addressID = ''
+			// this.addressID = ''		
 			let pages = getCurrentPages();
 			let currPage = pages[pages.length-1];
 			if(currPage.data.select =='select'){

+ 1 - 0
pages/user/order/order-cashier.vue

@@ -325,6 +325,7 @@
 					margin: 0 22rpx;
 					line-height: 64rpx;
 					font-size:$font-size-26;
+					border-radius: 10rpx;
 					color: #FFFFFF;
 					text-align: center;
 				}

+ 1 - 0
store/index.js

@@ -16,6 +16,7 @@ const store = new Vuex.Store({
 		login(state, provider) {
 			state.hasLogin = true;
 			state.userInfo = provider;
+			// console.log(state.hasLogin)
 			uni.setStorage({//缓存用户登陆状态
 			    key: 'userInfo',  
 			    data: provider