ソースを参照

美博会页面开发

yuwenjun 4 年 前
コミット
1d16bd2f60
70 ファイル変更2389 行追加2506 行削除
  1. 5 5
      App.vue
  2. 0 277
      api/use.js
  3. 0 174
      api/utils.js
  4. 47 43
      common/config/addressdata.js
  5. 25 5
      common/config/authorize.js
  6. 1 1
      components/cm-module/listTemplate/commodityList.vue
  7. 0 1
      components/cm-module/modelAlert/supplierRegisreAlert.vue
  8. 0 1
      components/cm-module/modelAlert/upgradeAlert.vue
  9. 4 2
      components/cm-module/pageFloorTemplate/templateA.vue
  10. 4 2
      components/cm-module/pageFloorTemplate/templateB.vue
  11. 4 2
      components/cm-module/pageFloorTemplate/templateC.vue
  12. 4 2
      components/cm-module/pageFloorTemplate/templateD.vue
  13. 4 2
      components/cm-module/pageFloorTemplate/templateE.vue
  14. 4 2
      components/cm-module/pageFloorTemplate/templateF.vue
  15. 7 5
      components/cm-module/pageTemplate/templateA.vue
  16. 4 2
      components/cm-module/pageTemplate/templateB.vue
  17. 4 2
      components/cm-module/pageTemplate/templateC.vue
  18. 4 2
      components/cm-module/pageTemplate/templateD.vue
  19. 4 2
      components/cm-module/pageTemplate/templateE.vue
  20. 4 2
      components/cm-module/pageTemplate/templateF.vue
  21. 4 2
      components/cm-module/pageTemplate/templateG.vue
  22. 2 0
      components/cm-module/pageTemplate/templateH.vue
  23. 4 6
      h5/pages/activity/activity_mid.vue
  24. 4 3
      pages/authorization/authorization.vue
  25. 5 6
      pages/goods/cart.vue
  26. 6 8
      pages/goods/good-floor.vue
  27. 8 8
      pages/goods/goods-classify.vue
  28. 7 8
      pages/goods/instrument-details.vue
  29. 34 36
      pages/goods/product.vue
  30. 1 1
      pages/login/apply-supplier.vue
  31. 1 1
      pages/login/apply.vue
  32. 25 26
      pages/login/bindOperator.vue
  33. 5 6
      pages/login/binding.vue
  34. 0 1
      pages/login/bindwechat.vue
  35. 1 1
      pages/login/information.vue
  36. 9 11
      pages/login/login.vue
  37. 11 0
      pages/login/logincode.vue
  38. 109 53
      pages/login/password.vue
  39. 5 6
      pages/login/register-supplier.vue
  40. 5 7
      pages/login/register.vue
  41. 1551 1552
      pages/tabBar/cart/cart.vue
  42. 8 45
      pages/tabBar/home/index.vue
  43. 10 12
      pages/tabBar/user/user.vue
  44. 20 6
      pages/user/account/account.vue
  45. 57 28
      pages/user/setting/phone.vue
  46. 7 4
      search/pages/search/search-instrument.vue
  47. 7 4
      search/pages/search/search-supplier.vue
  48. 7 4
      search/pages/search/search.vue
  49. 1 1
      second/pages/form/form.vue
  50. 11 8
      second/pages/product/product-details.vue
  51. 6 7
      second/pages/product/product-list.vue
  52. 0 2
      seller/pages/club/addoperator.vue
  53. 1 1
      seller/pages/login/apply.vue
  54. 1 1
      seller/pages/login/information.vue
  55. 11 12
      seller/pages/login/login.vue
  56. 1 1
      seller/pages/login/register-member.vue
  57. 1 1
      seller/pages/login/register.vue
  58. 1 0
      services/ajax.env.js
  59. 2 1
      services/config.env.js
  60. 59 0
      services/public.js
  61. 23 0
      services/public.service.js
  62. 44 0
      services/user.service.js
  63. 1 0
      store/index.js
  64. 1 1
      supplier/pages/deliver/add-logistics.vue
  65. 4 3
      supplier/pages/login/bind-operator.vue
  66. 13 10
      supplier/pages/login/share-info.vue
  67. 1 1
      supplier/pages/user/information.vue
  68. 7 4
      supplier/pages/user/my-shop.vue
  69. 101 45
      supplier/pages/user/setting/password.vue
  70. 57 28
      supplier/pages/user/setting/phone.vue

+ 5 - 5
App.vue

@@ -66,7 +66,7 @@
 			// }
 		},
 		methods:{
-			...mapMutations(['login','logout']),
+			...mapMutations(['login','logout','isWxAuthorize']),
 			async getWxAuthorize(){
 				const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 				const getUserInfo = await authorize.getUserInfo('weixin');
@@ -90,12 +90,12 @@
 			refresh(){
 				let TIME = (20*60)*1000;
 				setInterval(()=>{
-					authorize.checkLogin().then(res => {
+					if(uni.getStorageSync('_WX_State')){
 						this.getWxAuthorize()
-					})
-					.catch(err => {
+					}else{
 						console.log(new Date +'用户未授权微信信息')
-					})
+						this.$api.navigateTo('/pages/authorization/authorization')
+					}	
 				},TIME)
 			},
 			diffTime(t){

+ 0 - 277
api/use.js

@@ -1,277 +0,0 @@
-/**
- *@des 用户模块接口
- *@author zhengjinyi
- *@date 2020/03/19 14:56:57
- *@param registerByPass
- */
-import request from '@/common/config/caimeiApi.js'
-import $reg from '@/common/config/common.js'
-/**
- *机构普通注册
- */
-export function organizationVerifyRegisterFirst(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.userName == ''){
-			uni.showToast({title: '请输入联系人名称',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.bindMobile == ''){
-			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.bindMobile)){
-			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.activationCode == ''){
-			uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.activationCode)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.password == ''){
-			uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.checkPwd(params.password)){
-			uni.showToast({title: '密码必须为8-16位字母数字的组合',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.passWordConfirm == ''){
-			uni.showToast({title: '请再次确认密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.passWordConfirm !== params.password){
-			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(params.isAgreed == 0){
-			uni.showToast({title: '请勾选同意协议',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/club/common',params,true,res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *绑定邮箱
- */
-export function bindingEmail(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.email == ''){
-			uni.showToast({title: '请输入邮箱地址',duration: 2000,mask:true, icon:'none'})
-			return
-		}
-		if(!$reg.isEmail(params.email)){
-			uni.showToast({title: '请输入正确的邮箱地址',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.code == ''){
-			uni.showToast({title: '请输入邮箱验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isEmailCode(params.code)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/user/binding',params,true, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *绑定微信
- */
-export function bindingWechat(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/club/bindingWx',params,true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *获取个人中心信息
- */
-export function personalInfo(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet('/personalCenter/myCentre',params, res => {
-			resolve(res)
-		})
-	})
-}
-/**
- *获取账户余额明细
- */
-export function accountInfo(params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet('/personalCenter/touchBalance',params, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-
-/**
- *用户状态初始化
- */
-export function userInfoLogin(params) {
-	return new Promise(function(resolve,reject) {
-		request.post('/club/authorization',params,false, res => {
-			if(res.code == 0 || res.code == 4){
-				resolve(res)
-			}else if(res.code == -6){
-				reject(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *手机修改密码
- */
-export function mobilePassword(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.mobileOrEmail == ''){
-			uni.showToast({title: '请输入手机号',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.mobileOrEmail)){
-			uni.showToast({title: '手机格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.activateCode == ''){
-			uni.showToast({title: '请输入手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.activateCode)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.passWord == ''){
-			uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.checkPwd(params.passWord)){
-			uni.showToast({title: '密码必须为8-16位字母数字的组合',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.confirmPwd == ''){
-			uni.showToast({title: '请再次确认密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.confirmPwd !== params.passWord){
-			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/user/findCompanyPwd',params, true,res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *邮箱修改密码
- */
-export function emailPassword(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.mobileOrEmail == ''){
-			uni.showToast({title: '请输入邮箱',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isEmail(params.mobileOrEmail)){
-			uni.showToast({title: '请输入正确的邮箱地址',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.activateCode == ''){
-			uni.showToast({title: '请输入邮箱验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isEmailCode(params.activateCode)){
-			uni.showToast({title: '验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.passWord == ''){
-			uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.checkPwd(params.passWord)){
-			uni.showToast({title: '密码必须为8-16位字母数字的组合',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.confirmPwd == ''){
-			uni.showToast({title: '请再次确认密码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.confirmPwd !== params.passWord){
-			uni.showToast({title: '两次输入的密码不一致',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/user/findCompanyPwd',params,true, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}
-/**
- *修改手机号
- */
-export function changeMobile(params) {
-	return new Promise(function(resolve,reject) {
-		if( params.contractMobile == ''){
-			uni.showToast({title: '请输入新的手机号码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobile(params.contractMobile)){
-			uni.showToast({title: '请输入正确的手机号码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.mobileCode == ''){
-			uni.showToast({title: '请输入旧手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.mobileCode)){
-			uni.showToast({title: '旧手机验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if( params.newMobileCode == ''){
-			uni.showToast({title: '请输入新手机验证码',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		if(!$reg.isMobileCode(params.newMobileCode)){
-			uni.showToast({title: '新手机验证码格式不正确',duration: 2000,mask:true,icon:'none'})
-			return
-		}
-		request.post('/club/changeMobile',params,true, res => {
-			if(res.code == 0){
-				resolve(res)
-			}else{
-				reject(res)
-			}
-		})
-	})
-}

+ 0 - 174
api/utils.js

@@ -1,174 +0,0 @@
-/**
- *@des 公共接口
- *@author zhengjinyi
- *@date 2020/03/19 14:56:57
- *@param registerByPass
- */
-import requestUrl from '@/services/ajax.env.js'
-import request from '@/common/config/caimeiApi.js'
-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){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- * @新分类下的商品列表
- * @param:tinyTypeID 三级分类ID
- * @param:pageNum	页码
- * @param:pageSize	每页显示条数
- */
-export function searchQueryTinyType(url,params) {
-	return new Promise(function(resolve,reject) {
-		request.lodingGet(url,params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *获取协议
- */
-export function queryProtocol() {
-	return new Promise(function(resolve,reject) {
-		request.get("/club/protocol",{}, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *获取邮箱验证码
- */
-export function getEmailCode(params) {
-	return new Promise(function(resolve,reject) {		
-		request.get("/user/mailbox",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *注册专用获取验证码
- */
-export function getRegisterMobileCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/club/captcha",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *会所资料修改手机号
- *旧手机号获取验证码
- */
-export function getClubMobileCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/club/modifyPhoneNumber",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *会所资料修改手机号
- *新手机号获取验证码
- */
-export function getClubNewMobileCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/club/modifyPhoneNumber",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *小程序机构账号绑定微信,PC微信绑定机构账号
- */
-export function getbindWechatCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/user/note",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *通过邀请链接绑定运营人员获取手机短信
- */
-export function getbindOperatorCode(params) {
-	return new Promise(function(resolve,reject) {
-		request.get("/seller/note",params, res => {
-			if(res.code == 0){
-				resolve(res);
-			}else{
-				reject(res)
-			}
-		})
-	});
-}
-/**
- *上传图片
- */
-export function uploadFileImage() {
-	return new Promise(function(resolve,reject) {
-		uni.chooseImage({
-			count: 1, //默认1
-			sizeType: ['original','compressed'], //可以指定是原图还是压缩图,默认二者都有
-			sourceType: ['album'], //从相册选择
-			success: (res) => {
-				const tempFilePaths = res.tempFilePaths;
-				const uploadTask = uni.uploadFile({
-					url : requestUrl+'/formData/MultiPictareaddData',
-					filePath: tempFilePaths[0],
-					name: 'file',
-					header: {
-					    "Content-Type": "multipart/form-data",
-					},
-					formData: {
-						'user': 'test'
-					},
-					success: function (res) {
-						resolve(res);
-					},
-					error : function(e){
-						reject(res)
-					}
-				})
-			}
-		});
-	});
-}

+ 47 - 43
common/config/addressdata.js

@@ -2,12 +2,16 @@
  *请求获取省市区
  *已提供给地区选择picker组件使用
  */ 
-import { queryAddressInformation } from '@/api/utils.js';
+import ajaxService from '@/services/ajax.service.js'
+import PublicService from '@/services/public.service'
+
+const _PublicService = new PublicService(ajaxService)
+
 const provinceData=[];
 const cityData=[];
 const areaData=[];
 
-queryAddressInformation().then(res =>{
+_PublicService.GetAllAddressData().then(res =>{
 	let list = res.data;
 	list.forEach(item => {
 		let xxx = handleCitys(item);
@@ -15,48 +19,48 @@ queryAddressInformation().then(res =>{
 		cityData.push(xxx.e);
 		areaData.push(xxx.f);
 	})
-})
-//获取市后继续处理
-function handleCitys(data) {
-    const x = [];
-    const s = [];
-    if (data.cityList.length) {
-        data.cityList.forEach(item => {
-			let xxx = handleTowns(item);
-			s.push(xxx);
-			x.push(item)
-        })
-    }else{
-		s.push([{name:''}]);
-		x.push([{name:''}]);
+	//获取市后继续处理
+	function handleCitys(data) {
+	    const x = [];
+	    const s = [];
+	    if (data.cityList.length) {
+	        data.cityList.forEach(item => {
+				let xxx = handleTowns(item);
+				s.push(xxx);
+				x.push(item)
+	        })
+	    }else{
+			s.push([{name:''}]);
+			x.push([{name:''}]);
+		}
+	    return {
+	        e: x,
+	        f: s,
+	    };
 	}
-    return {
-        e: x,
-        f: s,
-    };
-}
-//获取区后继续处理
-function handleTowns(data) {
-    const x = [];
-    data.townList.forEach(item => {
-        x.push(item)
-    })
-    return x;
-}
-
-function handleData3(data) {
-    const xxx = [];
-    data.forEach(item => {
-        const ooo = []
-        item.forEach(opt => {
-           opt.forEach(z => {
-               ooo.push(z);
-           })
-        })
-        xxx.push(ooo)
-    })
-    return xxx;
-}
+	//获取区后继续处理
+	function handleTowns(data) {
+	    const x = [];
+	    data.townList.forEach(item => {
+	        x.push(item)
+	    })
+	    return x;
+	}
+	
+	function handleData3(data) {
+	    const xxx = [];
+	    data.forEach(item => {
+	        const ooo = []
+	        item.forEach(opt => {
+	           opt.forEach(z => {
+	               ooo.push(z);
+	           })
+	        })
+	        xxx.push(ooo)
+	    })
+	    return xxx;
+	}
+})
 module.exports = {
 	provinceData,
 	cityData,

+ 25 - 5
common/config/authorize.js

@@ -72,7 +72,6 @@ const getCode = provider => {
         uni.login({
             provider: provider,
             success: function(loginRes) {
-				console.log(loginRes)
                 if (loginRes && loginRes.code) { 
 					resolve(loginRes.code) 
 				} else {
@@ -83,7 +82,7 @@ const getCode = provider => {
 				}
             },
 			fail:function(error){ 
-				console.log(err)
+				console.log('获取code失败',)
 				reject("获取code失败")
 			}
         });
@@ -122,6 +121,7 @@ const getUserInfo = (provider)=>{
 				}
 			}
 			,fail: (error) => {
+				console.log('获取用户信息失败')
 				reject(0); //如果用户拒绝过授权 直接走fail
 			}
 		});
@@ -132,16 +132,35 @@ const checkLogin = () => {
 	return new Promise((resolve, reject) => {
 		uni.checkSession({
 			success() {
-				resolve(1)
 				console.log('登录成功')
+				resolve(1)
 			},
-			fail(err) {
+			fail(error) {
+				console.log('获取用户信息失败',error)
 				reject(0)
 			}
 		})
 	})
 }
 
+// util.js
+const getUserProfile = () =>{
+	wx.getUserProfile({
+		desc: '用于完善个人资料',
+		success: function(res) {
+			var userInfo = res.userInfo
+			// console.log('userInfo==>', userInfo)
+			wx.setStorageSync('storage_info', 1);//本地标记
+			//下面将userInfo存入服务器中的用户个人资料
+			//...
+		  },
+		fail() {
+			console.log("用户拒绝授权")
+		}
+	})
+}
+  
+
 export default {
 	getProvider,
 	getSetting,
@@ -149,5 +168,6 @@ export default {
 	getCode,
 	login,
 	getUserInfo,
-	checkLogin
+	checkLogin,
+	getUserProfile
 }

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

@@ -109,7 +109,7 @@
 	import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
 	import modalLayer from "@/components/modal-layer"
 	import uniGrader from '@/components/uni-grade/uni-grade.vue'
-	import { searchQueryTinyType} from "@/api/utils.js"
+	import { searchQueryTinyType} from "@/services/public.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'CommodityList',

+ 0 - 1
components/cm-module/modelAlert/supplierRegisreAlert.vue

@@ -23,7 +23,6 @@
 </template>
 
 <script>
-	import { cancelPrompt } from "@/api/use.js"
 	export default{
 		name:'alert',
 		props:{

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

@@ -18,7 +18,6 @@
 </template>
 
 <script>
-	import { cancelPrompt } from "@/api/use.js"
 	export default{
 		name:'alert',
 		props:{

+ 4 - 2
components/cm-module/pageFloorTemplate/templateA.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateB.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateC.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateD.vue

@@ -190,11 +190,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateE.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageFloorTemplate/templateF.vue

@@ -154,11 +154,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 7 - 5
components/cm-module/pageTemplate/templateA.vue

@@ -149,12 +149,12 @@
 				return Number(text).toFixed(2);			
 			},		
 		},
-		created(){
-			this.initData(this.pageData)
-		},
 		computed: {
 			...mapState(['hasLogin','userInfo','isActivity'])
 		},
+		created(){
+			this.initData(this.pageData)
+		},
 		watch: {
 			pageData: {
 				handler: function (el) {//监听对象的变换使用 function,箭头函数容易出现this指向不正确
@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateB.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateC.vue

@@ -178,11 +178,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateD.vue

@@ -190,11 +190,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateE.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateF.vue

@@ -166,11 +166,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 4 - 2
components/cm-module/pageTemplate/templateG.vue

@@ -154,11 +154,13 @@
 		},
 		methods:{
 			initData(data){
+				this.floorData = data
+				// console.log(this.floorData)
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
-				this.floorData = data
-				// console.log(this.floorData)
 			},
 			PromotionsFormat(promo){//促销活动类型数据处理
 				if(promo!=null){

+ 2 - 0
components/cm-module/pageTemplate/templateH.vue

@@ -172,6 +172,8 @@
 			initData(data){
 				this.$api.getStorage().then((resolve) =>{
 					this.shopId = resolve.shopId ? resolve.shopId : 0
+				}).catch(err => {
+					console.log('err',err)
 				})
 				if(data.floorImageList.length>0){
 					this.productList.splice(0,this.productList.length);

+ 4 - 6
h5/pages/activity/activity_mid.vue

@@ -117,7 +117,7 @@
 			uni.setNavigationBarTitle({title:'年中大促'});
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
 		},
 		methods:{
 			getWinHeight() {
@@ -239,14 +239,12 @@
 				this.$api.navigateTo(`/pages/goods/product?id=${item.productID}&path=activity`)
 			},
 			navigator(){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.$store.commit('setLoginType',9)
 					this.$api.navigateTo('/pages/login/login?type=0')
-				})
-				.catch(err => {
+				}else{
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},	
 			toFixedFn(text){//处理小数点后两位数
 				return Number(text).toFixed(2);

+ 4 - 3
pages/authorization/authorization.vue

@@ -9,7 +9,7 @@
 			<text>您暂未授权采美采购小程序获取您的信息,将无法正常使用小程序的功能。如需正常使用,请点击“授权”按钮,并允许头像、昵称等信息的授权。</text>
 		</view>
 		<view class="login-form">
-			<button class="login-btn use" type="primary" open-type="getUserInfo" size="small" @click="getUserProfile" lang="zh_CN">微信授权</button>
+			<button class="login-btn use" type="primary" size="small" @click="getUserProfile" lang="zh_CN">微信授权</button>
 			<view class="login-btn back" @tap="undGetuserinfo">取消</view>
 		</view>
 	</view>
@@ -52,12 +52,12 @@
 				wx.getUserProfile({
 					desc: '采美采购商城小程序获取您的信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
 					success(res) {
-						console.log('新API',res)	
 						self.wxLogin(res.userInfo)		
 						uni.login({
 							provider: 'weixin',
 							scopes: 'auth_user',
-							success(res) {
+							success(loginres) {
+								console.log('新API',loginres)	
 								self.WxGetUserInfo()
 							},
 							fail(err) {
@@ -66,6 +66,7 @@
 						})
 					},
 					fail() {
+						console.log('授权失败')
 						self.$util.msg('授权失败', 2000)
 					}
 				})

+ 5 - 6
pages/goods/cart.vue

@@ -214,7 +214,7 @@
 			this.setScrollHeight();
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
 		},
 		filters:{
 			NumFormat(value) {//处理金额
@@ -236,13 +236,12 @@
 				})	
 			},
 			initLogin(){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.$api.redirectTo('/pages/login/login?type=4')
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				})
+				}	
 			},
 			clickPopupShow(pros,type){
 				this.popupShow = true;

+ 6 - 8
pages/goods/good-floor.vue

@@ -49,15 +49,16 @@
 				typeSort:'',
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','identity','isWxAuthorize'])
+		},
 		onLoad(option) {
 			if(option.type =='share'){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+				}	
 			}
 			this.pageId = option.linkId
 			this.$api.getComStorage('userInfo').then((resolve) =>{
@@ -72,9 +73,6 @@
 				this.skeletonShow = false
 			},2000)
 		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity'])
-		},
 		methods:{
 			GetInstrumentPageData(){//获取楼层数据
 				this.CommonService.GetInstrumentPageData({pageId:this.pageId,userId:this.userID,source:2}).then(response =>{

+ 8 - 8
pages/goods/goods-classify.vue

@@ -235,23 +235,23 @@
 				searchCheckedId:null
 			}	
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','identity','isWxAuthorize'])
+		},
 		onLoad(option) {
 			console.log(option)
 			if(option.type =='share'){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			this.SetScrollHeight()
 			this.InitOption(option)
 		},
-		computed: {
-			...mapState(['hasLogin','userInfo','identity'])
-		},
+		
 		filters: {
 			NumFormat:function(text) {//处理金额
 				return Number(text).toFixed(2);

+ 7 - 8
pages/goods/instrument-details.vue

@@ -194,6 +194,9 @@
 				popupShow:false//参数弹窗
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','isWxAuthorize'])
+		},
 		onLoad(option) {
 			this.equipmentId = option.id;//获取商品ID
 			this.isShareType = option.type
@@ -203,18 +206,14 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 		},
-		computed: {
-			...mapState(['hasLogin','isWxAuthorize'])
-		},
 		methods:{
 			initData(){// 初始化商品详情查询
 				this.ProductService.GetEquipmentDetails({equipmentId:this.equipmentId}).then(response =>{	

+ 34 - 36
pages/goods/product.vue

@@ -357,6 +357,9 @@
 				isNoneSupplier:false
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','isWxAuthorize','identity'])
+		},
 		onLoad(option) {
 			this.productID = option.id;//获取商品ID
 			this.isShareType = option.type
@@ -366,19 +369,15 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			this.getWinHeight()
 		},
-		computed: {
-			...mapState(['hasLogin','isWxAuthorize','identity'])
-		},
 		methods:{
 			initData(){// 初始化商品详情查询
 				this.ProductService.queryProductDetils({userId:this.userID,productID:this.productID,identity:this.identity}).then(response =>{	
@@ -388,8 +387,14 @@
 					this.shopId = response.data.shopID
 					this.product = response.data
 					//已删除/已冻结
-					if(this.product.validFlag === '0'){
+					if(this.product.validFlag === '0' || this.product.validFlag =='10'){
 						this.isInvalid = true
+					}else if(this.product.validFlag === '9'){
+						if(this.userIdentity == 1){
+							this.isInvalid = true
+						}else{
+							this.isInvalid = false
+						}
 					}
 					this.ladderPriceFlag = this.product.ladderPriceFlag;
 					this.html = this.product.productDetail == null ? this.html : this.$api.adaptRichTextImg(this.product.productDetail.detailInfo)
@@ -413,23 +418,19 @@
 						this.buyRetailPrice = this.product.retailPrice;
 					}
 					//处理下架商品和售罄商品
-					if(this.product.validFlag =='3' || this.product.validFlag =='10' || this.stock == 0 ){
+					if(this.product.validFlag =='3' || this.stock == 0 || this.product.price1TextFlag == "1"){
 						this.disabled = true
 						this.isNoneDisabled = true
-					}else{
-						this.disabled = false
-						this.isNoneDisabled = false
-						this.goodsData.disabledText = ''
-					}
-					if(this.product.price1TextFlag == "1"){
-						this.disabled = true
-					}
-					if(this.product.price1TextFlag == "2"){
-						if(this.userIdentity == 4){	
+					}else if(this.product.price1TextFlag == "2"){
+						if(this.userIdentity == 4){
 							this.disabled = true
 						}else{
 							this.disabled = false
 						}
+					}else{
+						this.disabled = false
+						this.isNoneDisabled = false
+						this.goodsData.disabledText = ''
 					}
 					this.goodsData.disabled = this.disabled
 					this.goodsData.isNoneDisabled = this.isNoneDisabled
@@ -484,30 +485,28 @@
 				console.log(e.detail.query)
 			},
 			buyProductCart(){//底部购物车按钮点击
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					if(this.hasLogin){
 						this.$api.navigateTo('/pages/goods/cart')
 					}else{					
 						this.$api.navigateTo('/pages/login/login?type=1')
 					}
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},
 			btnGetConfirm(type){//加入购物车&&立即购买点击
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					if(this.hasLogin){
 						this.showSpec(type);
-					}else{
+					}else{					
 						this.$api.navigateTo('/pages/login/login?type=1')
 					}
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},	
 			changeCountAdd(){//popup弹窗数量增加按钮
 				if(this.buyRetailPriceStep == 2){
@@ -602,15 +601,14 @@
 				})
 			},
 			navToLogin(){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.$store.commit('setLoginType',8)
 					this.$store.commit('setLoginProductId',this.productID)
 					this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息

+ 1 - 1
pages/login/apply-supplier.vue

@@ -204,7 +204,7 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { supplierList,supplierMedicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { uploadFileImage } from "@/api/utils.js" 
+	import { uploadFileImage } from "@/services/public.js" 
 	export default{
 		components:{
 			mpvueCityPicker

+ 1 - 1
pages/login/apply.vue

@@ -203,7 +203,7 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { uploadFileImage } from "@/api/utils.js" 
+	import { uploadFileImage } from "@/services/public.js" 
 	export default{
 		components:{
 			mpvueCityPicker

+ 25 - 26
pages/login/bindOperator.vue

@@ -80,7 +80,6 @@
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { getbindOperatorCode } from "@/api/utils.js"
 	export default{
 		data() {
 			return{
@@ -98,20 +97,20 @@
 				isUserInfo:false
 			}
 		},
+		computed: {
+			...mapState(['isWxAuthorize'])
+		},
 		onLoad(option) {
 			console.log(option)
 			uni.setStorageSync('bind_id', option.userID);
 			this.getVerificationCode()
-			authorize.checkLogin().then(res => {
+			if(uni.getStorageSync('_WX_State')){
 				this.getWxAuthorize()
-			})
-			.catch(err => {
-				this.$api.navigateTo('/pages/authorization/authorization')
+			}else{
+				console.log(new Date +'用户未授权微信信息')
+				this.$api.navigateTo('/pages/authorization/authorization?type=0')
 				this.isUserInfo = true
-			})
-		},
-		computed: {
-			...mapState(['isWxAuthorize'])
+			}	
 		},
 		methods:{
 			...mapMutations(['login','logout']),
@@ -168,12 +167,12 @@
 					this.$util.msg('验证码格式不正确',2000)
 					return
 				}
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.bindingWechatLogin()
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization')
-				})
+				}	
 			},
 			getVerificationCode(){//图形验证
 				this.PublicService.GetImgVerifyCode().then(res => {
@@ -207,21 +206,21 @@
 					.then(res =>{
 						const TIME_COUNT = 60;
 						this.$util.msg('验证短信已发送',2000)
-				     	if (!this.codeTime) {
-				       		this.count = TIME_COUNT;
+				     	if (!this.codeTime) {
+				       		this.count = TIME_COUNT;
 							this.isMobileDisabled = true;
-				       		this.codeTime = setInterval(() => {
-				       			if (this.count > 1 && this.count <= TIME_COUNT) {
-				         			this.count--
-				         			this.mobileCodeText = this.count +'s重新发送'
-				        		} else {
-					         		this.isMobileDisabled = false;
-					         		clearInterval(this.codeTime)
-					         		this.codeTime = null
+				       		this.codeTime = setInterval(() => {
+				       			if (this.count > 1 && this.count <= TIME_COUNT) {
+				         			this.count--
+				         			this.mobileCodeText = this.count +'s重新发送'
+				        		} else {
+					         		this.isMobileDisabled = false;
+					         		clearInterval(this.codeTime)
+					         		this.codeTime = null
 									this.mobileCodeText = '获取验证码'
-				        		}
-				       		},1000)
-				      	}
+				        		}
+				       		},1000)
+				      	}
 					})
 					.catch( error =>{
 						this.$util.msg(error.msg,2000)

+ 5 - 6
pages/login/binding.vue

@@ -111,7 +111,7 @@
 
 <script>
 	import { mapState,mapMutations } from 'vuex'
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	import authorize from '@/common/config/authorize.js'
 	import wxLogin from "@/common/config/wxLogin.js"
 	export default{
@@ -243,13 +243,12 @@
 			}
 		},
 		onShow() {
-			authorize.checkLogin().then(res => {
+			if(uni.getStorageSync('_WX_State')){
 				this.getWxAuthorize()
-			})
-			.catch(err => {
-				this.isRegisterShow= true
+			}else{
+				console.log(new Date +'用户未授权微信信息')
 				this.$api.navigateTo('/pages/authorization/authorization')
-			})
+			}	
 		}
 	}
 </script>

+ 0 - 1
pages/login/bindwechat.vue

@@ -72,7 +72,6 @@
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { getbindWechatCode } from "@/api/utils.js"
 	export default{
 		data() {
 			return{

+ 1 - 1
pages/login/information.vue

@@ -251,7 +251,7 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { getClubMobileCode,getClubNewMobileCode,uploadFileImage } from "@/api/utils.js" 
+	import { uploadFileImage } from "@/services/public.js" 
 	var self;
 	export default{
 		components:{

+ 9 - 11
pages/login/login.vue

@@ -63,13 +63,12 @@
 					this.$util.msg('请输入密码',2000)
 					return
 				}
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.AorganizationLogin()
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				})
+				}	
 			},
 			AorganizationLogin(){
 				this.UserService.AorganizationLogin(this.params)
@@ -96,18 +95,17 @@
 				this.isShowEye = !this.isShowEye;
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginQuick()
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				})
+				}	
 			}
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.params.unionId = resolve.unionId
+				this.params.unionId = resolve.unionId ?  resolve.unionId : 0
 			})
 			this.InitAuthorize()
 		}

+ 11 - 0
pages/login/logincode.vue

@@ -78,7 +78,18 @@
 					this.$util.msg(error.msg,2000)
 					this.isUserInfo = false
 				})
+			},
+			InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
+				if(uni.getStorageSync('_WX_State')){
+					wxLogin.wxLoginQuick()
+				}
 			}
+		},
+		onShow() {
+			this.$api.getStorage().then((resolve) =>{
+				this.params.unionId = resolve.unionId ? resolve.unionId : 0
+			})
+			this.InitAuthorize()
 		}
 	}
 </script>

+ 109 - 53
pages/login/password.vue

@@ -17,7 +17,7 @@
 		<view class="content" v-if="tabCurrentIndex === 1">
 			<view class="login-form clearfix">
 				<view class="login-input">
-					<input type="number" v-model="mobile"  maxlength="11" class="input" placeholder="请输入手机号" placeholder-class="placeholder"/>
+					<input type="number" v-model="phoneParams.mobileOrEmail"  maxlength="11" class="input" placeholder="请输入手机号" placeholder-class="placeholder"/>
 				</view>
 			</view>
 			<view class="login-form clearfix">
@@ -36,7 +36,7 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input code">
-					<input type="number" v-model="mobileCode"  maxlength="6" class="input" placeholder="请输入短信验证码"  placeholder-class="placeholder"/>
+					<input type="number" v-model="phoneParams.smsCode"  maxlength="6" class="input" placeholder="请输入短信验证码"  placeholder-class="placeholder"/>
 				</view>
 				<view class="login-input btn" :class="[isMobileDisabled  ? 'disabled' : '']" >
 					<button type="button"
@@ -49,15 +49,15 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEye" type="text" v-model="password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEye" type="text" v-model="phoneParams.password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEye" type="password" v-model="phoneParams.password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEye ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEye"></view>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEyes" type="text" v-model="phoneParams.passwordConfirm"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEyes" type="password" v-model="phoneParams.passwordConfirm"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEyes ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEyes"></view>
 				</view>
 			</view>
@@ -69,12 +69,12 @@
 		<view class="content" v-else>
 			<view class="login-form clearfix">
 				<view class="login-input">
-					<input class="input" type="text" v-model="email"  maxlength="30" placeholder="请输入邮箱地址"  placeholder-class="placeholder"/>
+					<input class="input" type="text" v-model="emailParams.mobileOrEmail"  maxlength="30" placeholder="请输入邮箱地址"  placeholder-class="placeholder"/>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input code">
-					<input class="input" type="number" v-model="emailCode" maxlength="4"  placeholder="请输入邮箱验证码"  placeholder-class="placeholder"/>
+					<input class="input" type="number" v-model="emailParams.smsCode" maxlength="6"  placeholder="请输入邮箱验证码"  placeholder-class="placeholder"/>
 				</view>
 				<view class="login-input btn" :class="[isEmialDisabled ? 'disabled' : '']">
 					<button class="input"  
@@ -87,15 +87,15 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEye" type="text" v-model="password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEye" type="text" v-model="emailParams.password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEye" type="password" v-model="emailParams.password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEye ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEye"></view>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEyes" type="text" v-model="emailParams.passwordConfirm"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEyes" type="password" v-model="emailParams.passwordConfirm"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEyes ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEyes"></view>
 				</view>
 			</view>
@@ -108,19 +108,11 @@
 
 <script>
 	import authorize from '@/common/config/authorize.js' 
-	import { mobilePassword , emailPassword } from "@/api/use.js"
-	import { getEmailCode } from "@/api/utils.js"
 	
 	export default{
 		data() {
 			return{
 				tabCurrentIndex: 1,
-				mobile:'',  		//用户手机号
-				email:'',			//邮箱地址
-				emailCode:'',		//油箱验证码
-				mobileCode:'',  	//手机验证码
-				password:'',		//新密码
-				passwordCheck:'',   //二次校验新密码
 				isShowEye:false,	//控显
 				isShowEyes:false,	//控显
 				iconEyes:'icon-yanjing_yincang_o',
@@ -134,6 +126,20 @@
 				emailCodeText: '获取验证码',
 				mobileCodeText: '获取验证码',
 				codeTime: null,
+				phoneParams: {
+					mobileOrEmail :'',
+					smsCode : '',
+					password : '',
+					passwordConfirm : '',
+					status:1
+				},
+				emailParams: {
+					mobileOrEmail :'',
+					smsCode : '',
+					password : '',
+					passwordConfirm : '',
+					status:2
+				},
 			}
 		},
 		onLoad(option) {
@@ -141,15 +147,40 @@
 		},
 		methods:{
 			confirmMobilePassword(){//手机号修改
-				let params = {
-						mobileOrEmail : this.mobile,
-						activateCode : this.mobileCode,
-						passWord : this.password,
-						confirmPwd : this.passwordCheck,
-						status:1
-					}
-				mobilePassword(params).then(res =>{
-					this.$util.msg(res.msg,2000);
+				if( this.phoneParams.mobileOrEmail == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.phoneParams.mobileOrEmail)){
+					this.$util.msg('手机格式不正确',2000);
+					return
+				}
+				if( this.phoneParams.smsCode == ''){
+					this.$util.msg('请输入手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.phoneParams.smsCode)){
+					this.$util.msg('验证码格式不正确',2000);
+					return
+				}
+				if( this.phoneParams.password == ''){
+					this.$util.msg('请输入密码',2000);
+					return
+				}
+				if(!this.$reg.checkPwd(this.phoneParams.password)){
+					this.$util.msg('密码必须为8-16位字母数字的组合',2000);
+					return
+				}
+				if( this.phoneParams.passwordConfirm == ''){
+					this.$util.msg('请再次确认密码',2000);
+					return
+				}
+				if( this.phoneParams.passwordConfirm !== this.phoneParams.password){
+					this.$util.msg('两次输入的密码不一致',2000);
+					return
+				}
+				this.UserService.ModifyMobilePassword(this.phoneParams).then(res =>{
+					this.$util.msg(res.msg,2000,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({
 							delta: 1
@@ -160,23 +191,48 @@
 				})
 			},
 			confirmEmailPassword(){//邮箱修改密码
-				 let params = {
-						mobileOrEmail : this.email,
-						activateCode : this.emailCode,
-						passWord : this.password,
-						confirmPwd : this.passwordCheck,
-						status:2
-					}
-				emailPassword(params).then(res =>{
-					this.$util.msg(res.msg,2000);
-					setTimeout(()=>{
-						uni.navigateBack({
-							delta: 1
-						});
-					},2000)
-				}).catch( error =>{
-					this.$util.msg(error.msg,2000);
-				})
+				 if( this.emailParams.mobileOrEmail == ''){
+				 	this.$util.msg('请输入邮箱',2000);
+				  	return
+				  }
+				  if(!this.$reg.isEmail(this.emailParams.mobileOrEmail)){
+				 	this.$util.msg('请输入正确的邮箱地址',2000);
+				  	return
+				  }
+				  if( this.emailParams.smsCode == ''){
+				 	this.$util.msg('请输入邮箱验证码',2000);
+				  	return
+				  }
+				  if(!this.$reg.isMobileCode(this.emailParams.smsCode)){
+				 	this.$util.msg('验证码格式不正确',2000);
+				  	return
+				  }
+				  if( this.emailParams.password == ''){
+				 	this.$util.msg('请输入密码',2000);
+				  	return
+				  }
+				  if(!this.$reg.checkPwd(this.emailParams.password)){
+				 	this.$util.msg('密码必须为8-16位字母数字的组合',2000);
+				  	return
+				  }
+				  if( this.emailParams.passwordConfirm == ''){
+				 	this.$util.msg('请再次确认密码',2000);
+				  	return
+				  }
+				  if( this.emailParams.passwordConfirm !== this.emailParams.password){
+				 	this.$util.msg('两次输入的密码不一致',2000);
+				  	return
+				  }
+				 this.UserService.ModifyMobilePassword(this.emailParams).then(res =>{
+				 	this.$util.msg(res.msg,2000,true,'success')
+				 	setTimeout(()=>{
+				 		uni.navigateBack({
+				 			delta: 1
+				 		});
+				 	},2000)
+				 }).catch( error =>{
+				 	this.$util.msg(error.msg,2000);
+				 })
 			},
 			getVerificationCode(){//图形验证
 				this.PublicService.GetImgVerifyCode().then(res => {
@@ -185,16 +241,16 @@
 				})
 			},
 			getEmailCodeFn(){//获取邮箱验证码
-				if( this.email == ''){
+				if( this.emailParams.mobileOrEmail == ''){
 					this.$util.msg('请输入邮箱地址',2000);
 					return
 				}
-				if(!this.$reg.isEmail(this.email)){
+				if(!this.$reg.isEmail(this.emailParams.mobileOrEmail)){
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
 				this.isEmialDisabled = true;
-				getEmailCode({email:this.email,status:3}).then(res =>{
+				this.PublicService.GetUserEmailCode({email:this.emailParams.mobileOrEmail,status:3}).then(res =>{
 					this.$util.msg('邮箱验证码已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -218,11 +274,11 @@
 				})
 			},
 			getMobileCodeFn(){//获取手机验证码
-				if( this.mobile == ''){
+				if( this.phoneParams.mobileOrEmail == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.mobile)){
+				if(!this.$reg.isMobile(this.phoneParams.mobileOrEmail)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
@@ -231,14 +287,14 @@
 					return
 				}
 				let params = {
-						mobile:this.mobile,
+						mobile:this.phoneParams.mobileOrEmail,
 						activateCodeType:1,
 						platformType:2,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 					}
 				this.isMobileDisabled = true;
-				this.PublicService.GetMobileCode(params).then(res =>{
+				this.PublicService.GetRegisterMobileCode(params).then(res =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {

+ 5 - 6
pages/login/register-supplier.vue

@@ -270,7 +270,7 @@
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import supplierAlert from '@/components/cm-module/modelAlert/supplierRegisreAlert.vue'
 	import { supplierList,supplierMedicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	export default{
 		components:{
 			mpvueCityPicker,
@@ -645,13 +645,12 @@
 			}
 		},
 		onShow() {
-			authorize.checkLogin()
-			.then(res => {
+			if(uni.getStorageSync('_WX_State')){
 				wxLogin.wxLoginQuick()
-			})
-			.catch(err => {
+			}else{
+				console.log(new Date +'用户未授权微信信息')
 				this.$api.navigateTo('/pages/authorization/authorization?type=0')
-			})
+			}	
 		}
 	}
 </script>

+ 5 - 7
pages/login/register.vue

@@ -71,8 +71,7 @@
 	import wxLogin from "@/common/config/wxLogin.js"
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { organizationVerifyRegisterFirst } from "@/api/use.js"
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	export default{
 		components:{
 			mpvueCityPicker
@@ -231,13 +230,12 @@
 				}
 			},
 			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginQuick()
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				})
+				}	
 			}
 		},
 		onShow() {

+ 1551 - 1552
pages/tabBar/cart/cart.vue

@@ -1,1553 +1,1552 @@
-<template>
-	<view class="container cart clearfix" v-if="hasLogin"> 	
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
-			<view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0">
-				<view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
-				<view class="delBtn" @tap.stop="showDelManager">删除</view>
-			</view>
-			<view v-if="!isEmpty" class="container-cart"> 
-				<view class="cart-content" :style="{paddingBottom :isIphoneX ? '130rpx' : '100rpx'}">
-					<view class="goods-list">
-						<view v-for="(item, index) in goodsList" :key="index" class="goods-item clearfix">
-							<view class="shoptitle">
-								<!--选择商店的全部商品"-->
-								<view class="checkbox-box" @click.stop="checkShop(item)">
-									<view class="checkbox iconfont" :class="[item.checked ?'icon-yixuanze':'icon-weixuanze']"></view>
-								</view>
-								<view v-if="item.promotions" class="floor-item-act">
-									<view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>	
-								</view>
-								<view class="text">{{item.name}}</view> 
-							</view>
-							<view class="productlist">
-								<view 	class="goods-pros" v-for="(pros,idx) in item.cartList" :key="idx" >
-									<view class="goods-pros-t">
-										<!--选择商品-->
-										<view class="checkbox-box" @click.stop="ischeck(item,pros)">
-											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-yixuanze':'icon-weixuanze']"></view>
-										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.image ? pros.image:''" alt="" /></view>
-										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.name}}</view>
-											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
-											<view class="productprice">
-												<!--使用过滤器对总价改变-->
-												<view class="price" :class="PromotionsFormat(pros.promotions) ? 'disabled' : ''">
-													<text>¥</text>
-													{{ (PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)  | NumFormat }}
-												</view>
-												<view class="count" v-if="pros.validFlag == 2 "  :class="[isshowDelbtn ? 'none':'show']">
-													<text class="count-tips" v-if="pros.number<pros.min">起订量:{{pros.min}}</text>
-													<text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
-													<view class="number-box">
-														<view  class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
-														<input class="btn-input" type="number" maxlength='4' v-model="pros.number" @blur="changeNnmber($event,item,pros)" @focus="changeInput(pros)">
-														<view  class="iconfont icon-jiahao"  @click="changeCountAdd(item,pros)"></view>
-													</view>
-												</view>
-											</view>
-											<view v-show="pros.actStatus==1" class="floor-item-act">
-												<view v-if="PromotionsFormat(pros.promotions)"  class="floor-tags" @click.stop="clickPopupShow(pros,1)">
-													{{pros.promotions.name}}
-													<text v-if ="pros.promotions!=null && pros.promotions.type!=3">
-														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
-													</text>
-												</view>
-												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
-											</view>
-											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
-												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
-											</view>
-										</view>	
-									</view>
-								</view>
-							</view>	
-							<view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none':'show']" >
-								<view class="sum-none" v-if="item.reducedPrice>0">
-									<text class="money-sign">¥</text>
-									<text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
-									<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
-								</view>
-								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice | NumFormat}}</text></view>
-							</view>
-						</view>
-					</view>	
-					<view class="failure-list" v-if="failureList.length>0">
-						<view class="failure-title">
-							<view class="title-txt">失效商品<text>{{failureList.length}}件</text></view>
-							<view class="title-btn" @click.stop="deletefailureList"><text class="butto">清空失效商品</text></view>
-						</view>
-						<view class="productlist">
-							<view class="goods-pros" v-for="(failure,failureIdx) in failureList" :key="failureIdx" >
-								<view class="goods-pros-t" @click.stop="failureToProduct(failure)">
-									<!--选择商品-->
-									<view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
-										<button class="checkbox iconfont" 
-												:class="[ failure.productsChecked ? 'icon-yixuanze':'icon-weixuanze']">
-										</button>
-									</view>
-									<text class="img-tip">失效</text>
-									<view class="pros-img">
-										<image :src="failure.image ? failure.image:''" alt="" />
-									</view>
-									<view class="pros-product">
-										<view class="producttitle">{{failure.name}}</view>
-										<view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
-										<view class="productstate">{{failureStateText(failure.status)}}</view>
-									</view>
-									<view class="pros-marks" v-if="failure.isFailureLayer"></view>
-								</view>
-							</view>
-						</view>	
-					</view>
-				</view>
-				<!-- 脚部菜单 -->
-				<view class="footer">
-					<view class="footer-le">
-						<view class="foot-check checkbox-box" @tap.stop="checkAll()">
-							<button class="checkbox iconfont" :class="[isCheckAll?'icon-yixuanze':'icon-weixuanze']"></button> 
-							<view class="text">全选</view>
-						</view>
-	
-						<view class="sum">
-							<view class="sum-none"  v-if="reducedPrice>0">
-								<text class="money-sign">¥</text>
-								<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
-								<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
-							</view>
-							<view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
-								总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
-							</view>
-						</view>
-					</view>
-					<view v-if="!isshowDelbtn" class="footer-ri" >
-						<view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
-					</view>
-					<view v-else class="footer-del">
-						<view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
-						<view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
-					</view>
-				</view>
-			</view>
-			<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>
-					<view class="login-btn"  @click="goIndex">去商城</view>
-				</view>
-			</view>
-		</view>
-		<!-- 促销活动弹窗 -->
-		<activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
-		<!-- 透明模态层 -->
-		<modal-layer v-if='modallayer'></modal-layer>
-	</view>
-</template>
-<script>
-	import authorize from '@/common/config/authorize.js'
-	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 activiPopup from "@/components/cm-module/productDetails/cm-activipopu"
-	import modalLayer from "@/components/modal-layer"
-	import { mapState,mapMutations } from 'vuex';
-	
-	export default{
-		components:{
-			tuiSkeleton,
-			tuiLoadmore,
-			tuiNomore,
-			activiPopup,
-			modalLayer
-		},
-		data(){
-			return{
-				CustomBar:this.CustomBar,// 顶部导航栏高度
-				isIphoneX:this.$store.state.isIphoneX,
-				userID:'',
-				alertType:'',
-				isStock:'',
-				popupShow:false,
-				handlerPros:{},//监听单挑促销商品
-				failureList:[],	//失效商品列表
-				goodsList:[],	//购物车的商品
-				promotionsList:[],//促销列表
-				delGoodsList:'',//要删除的商品
-				setGoodData:'', //确认订单的商品
-				isCheckAll:false,//是否全选
-				kindCount:0,//购物车宝贝数量
-				allPrice:0,//所有价格
-				totalOriginalPrice:0,//所有原价价
-				reducedPrice:0,//满减
-				allCount:0,//被选中的产品数量
-				isModallayer:false,
-				skeletonShow:true,
-				isshowDelbtn:false,
-				isDisabled: false, // 供应商/店铺全选是否禁用状态
-				isNoConfim:false,
-				isEmpty:false,//显示空购物车
-				scrollHeight: 'auto',
-				nomoreText: '上拉显示更多',
-				hasNextPage: false,
-				loadding: false,
-				pullUpOn: true,
-				pullFlag: true,
-				pageSize: 10,
-				pageNum: 1,
-				submitIds:[]
-			}
-		},
-		onLoad(){
-			this.setScrollHeight();
-		},
-		computed: {
-			...mapState(['hasLogin','userInfo'])
-		},
-		filters:{
-			NumFormat(value) {//处理金额
-				return Number(value).toFixed(2);
-			},
-		    totalprice(val,count){//单件商品的价格 × 数量
-		        return (val * count).toFixed(2)
-		    }
-		},	
-		methods:{
-			initData(){
-				this.isModallayer = false //遮罩层 防止多次点击
-				this.skeletonShow = true //预加载圆圈
-				this.isCheckAll=false//是否全选
-				this.submitIds = []
-				this.$api.getStorage().then((resolve) => {
-					this.userID = resolve.userId;
-					this.initGetCartGoodsList();
-				})	
-			},
-			initLogin(){
-				authorize.checkLogin()
-				.then(res => {
-					this.$api.redirectTo('/pages/login/login?type=4')
-				})
-				.catch(err =>{
-					this.$api.navigateTo('/pages/authorization/authorization?type=0')
-				})
-			},
-			clickPopupShow(pros,type){
-				this.popupShow = true;
-				this.handlerPros = pros;
-			},
-			setScrollHeight() {
-				// 窗口高度-footer高度
-				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
-				setTimeout(()=> {
-					const query = uni.createSelectorQuery().in(this);
-					query.selectAll('.footer').boundingClientRect();
-					query.exec(res => {
-						this.windowHeight = windowHeight;
-						if(res[0][0]) {
-							this.scrollHeight = windowHeight - res[0][0].height;
-						}
-					})
-				}, 500)
-			},
-			initGetCartGoodsList(){//初始化购物车 index:1
-				this.ProductService.QueryShoppingCartList({userId:this.userID}).then(response =>{
-					this.skeletonShow = false
-					let data = response.data
-					this.kindCount = data.kindCount
-					this.promotionsList = data.promotions
-					this.$store.commit('updateAllNum',data.kindCount)
-					if( data.list.length > 0 || data.invalid.length > 0){
-						this.isEmpty =false
-					}else{
-						this.isEmpty =true
-					}
-					if(data.list && data.list.length > 0 ){
-						this.goodsList = data.list;
-						this.goodsList.forEach((item,index) => {
-							item.cartList.forEach(pros => {
-								pros.shopID = item.shopID;
-								pros.isStep = false
-								if(pros.step === 2){ 
-									if(pros.number % pros.min != 0){
-										pros.number = pros.min
-										this.totalShopPeice()
-										this.updateShoppogNum(pros)
-									}
-								}
-							})
-						})
-						this.totalShopPeice()
-					} else {
-						this.goodsList = [];
-					}
-					if( data.invalid && data.invalid.length > 0){
-						let newFailureList = [],isFailureLayer;
-						data.invalid.forEach((failure,index) => {
-							if(failure.status == 1 || failure.status == 2) {
-								isFailureLayer = true
-							}else{
-								isFailureLayer = false
-							}
-							newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
-						})
-						this.failureList = newFailureList
-					} else {
-						this.failureList = [];
-					}
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			},		
-			ischeckFailure(failure){
-				failure.productsChecked = !failure.productsChecked
-				this.updateCheckAllBtn()
-			},
-			ischeck(item,pro){//为未选中的时候改变为true,反之为true
-				pro.productsChecked = !pro.productsChecked;
-				if(pro.productsChecked) {
-					if(!this.submitIds.includes(pro.productID*1)){
-						this.submitIds.push(pro.productID);
-					}
-				} else {
-					var lent = this.submitIds.indexOf(pro.productID*1);
-					if(lent >=0 ){
-						this.submitIds.splice(lent, 1);
-					}
-				}
-				this.updateProductCheckedAllBtn(item);
-				this.updateCheckAllBtn();
-				
-			},
-			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
-				let productsList = item.cartList,
-					productsCheckedLength = 0,
-					disabledLength = 0;
-				if(this.isshowDelbtn) {
-					productsList.forEach(pros => {
-						if(pros.productsChecked) {
-							productsCheckedLength++;
-						}
-					})
-				} else {
-					productsList.forEach(pros => {
-						if(pros.productsChecked) {
-							productsCheckedLength++;
-						}
-					})
-				}
-				item.checked = productsCheckedLength === productsList.length;
-			},
-			updateCheckAllBtn() {// 全选勾选判断
-				let goodsCheckedLength = 0,
-					goodsList = this.goodsList,
-					failureList = this.failureList;
-				goodsList.forEach(item => {
-					if(item.checked) {
-						goodsCheckedLength++;
-					}
-				})
-				failureList.forEach(failureItem=>{
-					if(failureItem.productsChecked){
-						goodsCheckedLength++;
-					}
-				})
-				if(this.isshowDelbtn){
-					this.isCheckAll = goodsCheckedLength === goodsList.length + failureList.length;
-				}else{
-					this.isCheckAll = goodsCheckedLength === goodsList.length;
-				}
-			},
-			checkShop(item){//与单选商品类似
-				item.checked = !item.checked;
-				this.setProductChecked(item);
-				this.updateCheckAllBtn();
-			},
-			setProductChecked(item) {
-				item.cartList.forEach(pros=>{
-					if(item.checked) {
-						pros.productsChecked = true;
-						if(!this.submitIds.includes(pros.productId*1)){
-							this.submitIds.push(pros.productId);
-						}
-					} else {
-						pros.productsChecked = false;
-						var lent = this.submitIds.indexOf(pros.productId*1);
-						if(lent >=0 ){
-							this.submitIds.splice(lent, 1);
-						}
-					}
-				})
-			},
-			updateBothCheckBtn() {
-				if(this.isshowDelbtn) {
-					// 当管理删除按钮出现时,失效的商品可被选择
-					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll;
-						this.setProductChecked(item);
-					})
-					//删除按钮 全选包括失效商品勾选
-					this.failureList.forEach(failureItem=>{
-						failureItem.productsChecked = this.isCheckAll;
-					})
-				} else {
-					this.goodsList.forEach((item)=>{
-						item.checked = this.isCheckAll && !item.isDisabled;
-						this.setProductChecked(item);
-					})
-				}
-			},
-			checkAll(){//全选方法内调用方法
-			    this.isCheckAll = !this.isCheckAll;
-				this.updateBothCheckBtn();     
-			},
-			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
-				let touchPrice = 0;
-				let reducedPrice = 0;//商铺合计满减价
-				this.goodsList.map((item,index)=>{
-					//计算店铺满减后店铺合计
-					if(item.promotions && item.promotions.mode == 2){
-						let prosPrice=0;
-						let totalOriginalPrice = 0;//商铺合计原价
-						item.cartList.forEach(pros=>{
-							prosPrice += pros.price*pros.number
-							totalOriginalPrice += pros.originalPrice*pros.number
-						})
-						if(prosPrice >= item.promotions.touchPrice){
-							item.totalPrice = prosPrice - item.promotions.reducedPrice  
-							item.reducedPrice = item.promotions.reducedPrice
-							item.totalOriginalPrice = totalOriginalPrice
-						}else{
-							item.reducedPrice = 0  //统计合计价格
-							item.totalPrice = prosPrice
-						}
-					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
-						let _totalPrice = 0;
-						let _reducedPrice = 0;
-						let _totalOriginalPrice =0;
-						item.cartList.forEach(pros=>{
-							let _price = pros.price*pros.number
-							_totalOriginalPrice += pros.price*pros.number;
-							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
-								if(_price >= pros.promotions.touchPrice){
-									_price = _price - pros.promotions.reducedPrice
-									_reducedPrice += pros.promotions.reducedPrice
-								}
-								_totalPrice +=  _price
-							}else{
-								_reducedPrice = 0;
-								_totalPrice += pros.price*pros.number;
-							}
-						})
-						item.reducedPrice = _reducedPrice
-						item.totalOriginalPrice = _totalOriginalPrice
-						item.totalPrice = _totalPrice
-					}
-				})
-			},
-			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
-				let totalPrice = 0;
-				let reducedPrice = 0;
-				let originalPrice = 0;
-				this.goodsList.forEach((item,index)=>{
-					let supplierPrice = 0;
-					let supplierReducedPrice = 0;
-					item.totalprice = 0;
-					item.reducedprice = 0;
-					item.originalprice = 0;
-					item.cartList.forEach(pros=>{	
-						if(pros.productsChecked){								
-							supplierPrice += pros.price*pros.number;
-							// 单品满减
-							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
-								// 单品满减-重新计算供应商总价/满减金额
-								if(pros.price*pros.number >= pros.promotions.touchPrice){
-									supplierPrice -= pros.promotions.reducedPrice;
-									supplierReducedPrice += pros.promotions.reducedPrice;
-								}
-							}
-						}	
-					})
-					// 店铺满减
-					if(item.promotions && item.promotions.mode*1===2){
-						// 店铺满减-计算供应商总价/满减金额
-						if(supplierPrice >= item.promotions.touchPrice){
-							supplierPrice -= item.promotions.reducedPrice;
-							supplierReducedPrice += item.promotions.reducedPrice;
-						}
-					}
-					item.totalprice = supplierPrice;
-					item.reducedprice = supplierReducedPrice;
-					item.originalprice = (supplierPrice+supplierReducedPrice);
-					totalPrice += item.totalprice;
-					reducedPrice += item.reducedprice;
-					originalPrice += item.originalprice;
-				})
-				 //总促销计算
-				this.promotionsList.forEach(promotions =>{
-					// 凑单满减
-					if(promotions.mode*1===2 && promotions.type*1===2){
-						let total = 0;
-						 promotions.productList.forEach(pros=>{
-							if (this.submitIds.includes(pros.productId*1)){
-								total += pros.number * pros.price;
-							}
-						});
-						if(total>=promotions.touchPrice){
-							totalPrice -= promotions.reducedPrice;
-							reducedPrice += promotions.reducedPrice;
-						}
-					}
-				});
-				//最后统计商品原价
-				this.totalOriginalPrice = originalPrice;
-				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
-				this.reducedPrice = reducedPrice;
-				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
-				this.allPrice = totalPrice ;
-			},
-			totalCount(){//计算总数量
-			    this.allCount = 0
-				let prosAllCount=0
-				let validCount = 0
-				let validList =[];
-				let productsList =[];
-			    this.goodsList.forEach(item=>{
-					productsList = item.cartList
-					productsList.forEach(pros=>{
-						if(pros.productsChecked){
-							prosAllCount+=parseInt(pros.number);
-							this.allCount = prosAllCount
-						}
-					})
-			    })
-			},		
-			changeCountAdd(item,pros){//商品数量加加
-				if(pros.step === 2){
-					pros.isStep = false
-					pros.number += pros.min
-					this.processActivityPrice(pros)
-					this.isStock = false
-				}else{
-					pros.number++
-					this.processActivityPrice(pros)
-					this.isStock = false
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			changeCountSub(item,pros){//商品数量减减
-				if(pros.number<=pros.min){
-					pros.number= pros.min
-					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
-					return
-				}else{
-					if(pros.step === 2){
-						pros.isStep = false
-						pros.number -= pros.min
-					}else{
-						pros.number--
-					}
-					this.processActivityPrice(pros)
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			changeInput(pros){//输入商品数量更新
-				pros.isStep = false
-			},
-			changeNnmber(e,item,pros){//输入商品数量更新
-				let _value = Number(e.detail.value);
-				if(!this.$api.isNumber(_value)){
-					pros.number = pros.min
-				}else if(_value < pros.min){	
-					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
-					pros.number = pros.min
-				}else if(_value % pros.min != 0){
-					pros.isStep = true
-					pros.number = pros.min
-				}else{
-					pros.isStep = false
-					pros.number = e.detail.value
-					this.processActivityPrice(pros)
-				}
-				this.updateShoppogNum(pros)
-				this.totalShopPeice();
-			},
-			processActivityPrice(pros){//单独处理活动价格和阶梯价格
-				let ladderPriceList = pros.ladderPrices;
-				if(pros.ladderFlag == '0' || pros.actStatus == 1){
-					pros.price = pros.price
-				}else{
-					ladderPriceList.forEach((item,index)=>{
-						if(pros.number>=item.buyNum){
-							pros.price = item.buyPrice
-						}
-					})
-				}
-			},
-			updateShoppogNum(pros){//加减购物车商品更新到后台
-				let params ={userID:this.userID,productID:pros.productId,productCount:pros.number}
-				this.ProductService.ShoppingCartUpdate(params).then(response =>{
-					this.isshowDelbtn = false;
-					this.initGetCartGoodsList();
-				}).catch(error =>{
-					this.$util.msg(error.msg,2000);
-				})
-			 },
-			toConfirmation(){//跳转确认订单页面
-				let setGoodsList=[];
-				this.goodsList.forEach(res=>{
-					let products = res.cartList
-					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    setGoodsList.push(pros.productId)
-						}
-					})
-				})
-				if(setGoodsList == ''){
-					this.$util.msg("请先选择结算商品~",2000);
-					return
-				}else{
-					this.isNoConfim = false
-					this.goodsList.forEach(el=>{
-						el.cartList.forEach(pros=>{
-							if(pros.productsChecked){
-							   if(pros.number<pros.min){
-								   this.isNoConfim = true
-							   }
-							}
-						})
-					})
-					if(this.isNoConfim){
-						this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
-						return;
-					}
-					let productID = '';
-					this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
-						el.cartList.forEach(pros=>{
-							if(pros.productsChecked){
-							   productID += pros.productId+','
-							}
-						})
-					})
-					let cartPramsData={
-							allPrice:this.allPrice,
-							allCount:this.allCount,
-							productID:productID.substring(0,productID.lastIndexOf(',')),
-							productCount:''
-						}
-					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
-				}
-			},
-			showDelManager(){//显示删除商品管理
-				this.isshowDelbtn = true;
-				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
-				} else {
-					this.goodsList.forEach(item => {
-						if(item.checked) {
-							item.cartList.forEach(pros => {
-								pros.productsChecked = true;
-							})
-						}
-					})
-					this.updateCheckAllBtn();
-				}
-				// 失效也被勾选
-				this.failureList.forEach(failureItem => {
-					if(failureItem.isFailureLayer){
-						failureItem.isFailureLayer = false
-					}
-				})
-			},
-			hideDelManage(){//隐藏删除商品管理			
-				this.isshowDelbtn = false;
-				let isFailureLayer,newFailureList =[];
-				if(this.isCheckAll) {
-					this.updateBothCheckBtn();	
-				} else {
-					// 失效商品取消勾选
-					this.goodsList.forEach(item => {
-						if(item.isDisabled) {
-							item.checked = false;
-						}
-						item.cartList.forEach(pros => {
-							if(pros.validFlag == 3) {
-								pros.productsChecked = false;
-							}
-						})
-					})
-					this.updateCheckAllBtn();
-				}
-				this.failureList.forEach((failure,index) => {
-					if(failure.failureState == 1 || failure.failureState == 2) {
-						isFailureLayer = true
-					}else{
-						isFailureLayer = false
-					}
-					newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
-				})
-				this.failureList = newFailureList;
-			},		
-			deleteList(){//删除购物车商品	
-				this.delGoodsList=[];
-				this.goodsList.forEach(delitem=>{
-					let products = delitem.cartList
-					products.forEach(pros=>{
-						if(pros.productsChecked){
-						    this.delGoodsList += pros.productId+','
-						}
-					})
-				})
-				this.failureList.forEach(failure=>{
-					if(failure.productsChecked){
-						this.delGoodsList += failure.productId+','
-					}
-				})
-				if(this.delGoodsList.length == 0){
-					this.$util.msg("请选择要删除的商品~",2000);
-					return
-				}else{			
-					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
-						this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
-							this.$util.msg('删除成功',2000);
-							setTimeout(()=>{
-								this.isshowDelbtn = false;
-								this.initGetCartGoodsList();
-							},2000)
-						}).catch(error =>{
-							this.$util.msg(error.msg,2000)
-						})
-					})
-				}
-			},
-			deletefailureList(){
-				this.failureList.forEach(failure=>{ this.delGoodsList += failure.productId+',' })
-				this.$util.modal('','确定清空全部失效商品吗?','确定','取消',true,() =>{
-					this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
-						this.$util.msg('删除成功',2000);
-						setTimeout(()=>{
-							this.isshowDelbtn = false;
-							this.initGetCartGoodsList();
-						},2000)
-					}).catch(error =>{
-						this.$util.msg(error.msg,2000)
-					})
-				})
-			},
-			goIndex(){
-				uni.switchTab({
-				    url: '/pages/tabBar/home/index'
-				});
-			},
-			goNavto(url){
-				uni.navigateTo ({
-					url
-				})
-			},
-			navToListPage(id){
-				this.isModallayer = true;
-				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
-			},
-			failureToProduct(failure){
-				if(failure.status == 1){
-					this.$util.msg('商品已丢失,不能查看',2000)
-					return
-				}else if(failure.status == 2){
-					this.$util.msg('商品已停售,不能查看',2000)
-					return
-				}else{
-					this.isModallayer = true;
-					this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
-				}
-			},
-			failureStateText(state){
-				let stateText = '',
-					stateTextObject={
-						1:'商品已丢失',
-						2:'商品已停售',
-						3:'商品已下架',
-						4:'商品已售罄',
-						5:'价格仅会员可见,您不能购买',
-						6:'未公开价格',
-						7:'库存不足'
-					}
-				Object.keys(stateTextObject).forEach(key => {
-					if(key == state){
-						stateText = stateTextObject[key]
-					}
-				})
-				return stateText;
-			},
-			setHeaderBtnPosi(){
-				// 获得胶囊按钮位置信息
-				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
-				return headerBtnPosi
-			},
-			setSysteminfo(){
-				let systeminfo;
-				uni.getSystemInfo({ // 获取设备信息
-					success: (res) => {
-						systeminfo = res
-					},
-				})
-				return systeminfo
-			},
-			PromotionsFormat(promo){//促销活动类型数据处理
-				if(promo!=null){
-					if(promo.type == 1 && promo.mode == 1){
-						return true
-					}else{
-						return false
-					}
-				}
-				return false
-			}
-		},
-		watch:{//深度监听所有数据,每次改变重新计算总价和总数
-		    goodsList:{
-		        deep:true,
-		        handler(val,oldval){
-		            this.totalPeice()
-		            this.totalCount()
-		        }
-		    }
-		},
-		onPullDownRefresh() {//下拉刷新
-			this.initGetCartGoodsList()
-			uni.stopPullDownRefresh()
-		},
-		onShow(){
-			if(this.hasLogin){
-				this.initData()
-			}else{
-				this.initLogin()
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background: #f7f7f7;
-		height: auto;
-	}
-	.cart-content{
-		position: relative;
-	}
-	.container-cart-main.none{
-		display: none;
-	}
-	.container-cart-main.show{
-		display: block;
-	}
-	.cart-content.empty.none{
-		display: none;
-	}
-	.cart-content.empty.show{
-		display: block;
-	}
-	.container-cart.show{
-		display: block;
-	}
-	.container-cart.none{
-		display: none;
-	}
-	.empty-container.none{
-		display: none;
-	}
-	.empty-container.show{
-		display: flex;
-	}
-	.foot-check-delbtn{
-		width: 100%;
-		height: 80rpx;
-		position: fixed;
-		top: 0;
-		left: 0;
-		box-sizing: border-box;
-		padding: 15rpx 24rpx;
-		background-color: #F7F7F7;
-		z-index: 990;
-		.foot-text{
-			font-size: $font-size-26;
-			height: 50rpx;
-			line-height: 50rpx;
-			color:#666666;
-			float: left;
-			padding-left: 10rpx;
-			text{
-				margin: 0 6rpx;
-			}
-		}
-		.delBtn{
-			width: 100rpx;
-			display: inline-block;
-			padding: 0 15rpx;
-			font-size: $font-size-26;
-			height: 50rpx;
-			line-height: 50rpx;
-			border-radius: 30rpx;
-			background:#FFFFFF;
-			border: 1px solid #e15616;
-			color: #E15616;
-			float: right;
-			text-align: center;
-			&.none{
-				display: none;	
-			}
-		}
-	}
-	.checkbox-box{
-		display: flex;
-		align-items: center;
-		.checkbox{
-			display: flex;
-			margin: 0;
-			padding: 5rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			box-sizing: border-box;
-			text-align: center;
-			text-decoration: none;
-			border-radius: 0;
-			-webkit-tap-highlight-color: transparent;
-			overflow: hidden;
-			background-color:#FFFFFF;
-			font-size: 36rpx;
-			color:#999999;
-			&.icon-yixuanze{
-				color: $color-system;
-			}
-		}
-		&.disabled{
-			.checkbox{
-				color:#999999
-			}
-		}
-		.text{
-			font-size: $font-size-24;
-			margin-left: 10rpx;
-		}
-	}
-	.goods-list{
-		width: 100%;
-		height: auto;
-		background-color: #F7F7F7;
-		.goods-item{
-			width: 702rpx;
-			padding: 0 24rpx;
-			background: #FFFFFF;
-			margin-bottom: 24rpx;
-		}
-		.shoptitle{
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			line-height: 80rpx;
-			.checkbox-box{
-				padding: 10rpx;
-			}
-			.text{
-				width: 450rpx;
-				display: block;
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
-				margin-left: 20rpx;
-				font-size: $font-size-28;
-				color: $text-color;
-				text-align: left;
-				font-weight: bold;
-			}
-			.floor-item-act{
-				height: 56rpx;
-				text-align: center;
-				box-sizing: border-box;
-				float: left;
-				padding:10rpx 0;
-				margin-left: 20rpx;
-				.floor-tags{
-					height: 28rpx;
-					border-radius: 6rpx;
-					background-color: #FFFFFF;
-					line-height: 28rpx;
-					color: $color-system;
-					text-align: center;
-					display: inline-block;
-					padding:0 16rpx;
-					font-size: $font-size-20;
-					border: 1px solid #E15616;
-					float: right;
-				}
-			}
-		}
-		.goods-pros{
-			width: 100%;
-			height: auto;
-			margin-bottom: 20rpx;
-		}	
-		.goods-pros-t{
-			display: flex;
-			align-items: center;
-			width: 100%;
-			height: 210rpx;
-			padding:0 0 26rpx 0;
-			.checkbox-box{
-				padding: 10rpx;
-			}
-			.pros-img{
-				width: 210rpx;
-				height: 100%;
-				border-radius: 10rpx;
-				margin:0 20rpx;
-				border:1px solid #f3f3f3;
-				image{
-					width: 100%;
-					height: 100%;
-					border-radius: 10rpx;
-				}
-			}
-		}
-		.goods-pros-b{
-			width:100%;
-			height: auto;
-			padding:0 0 24rpx 0;
-			box-sizing: border-box;
-			&.show{
-				display: block;
-			}
-			&.none{
-				display: none;
-			}
-			.sum-none{
-				width: 100%;
-				height: 48rpx;
-				line-height: 48rpx;
-				color: $text-color;
-				float: left;
-				text-align: right;
-				.money{
-					font-size: $font-size-26;
-					color: #999999;
-					text-decoration: line-through;
-				}
-				.money-sign{
-					font-size: $font-size-26;
-					color: #999999;
-					text-decoration: line-through;
-				}
-				.money-reduced{
-					margin-left: 10rpx;
-					font-size: $font-size-26;
-					color: $color-system;
-					.iconfont{
-						font-size: $font-size-34;
-					}
-				}
-			}
-			.sum{
-				width: 100%;
-				height: 40rpx;
-				font-size: $font-size-26;
-				line-height: 40rpx;
-				color: $text-color;
-				float: left;
-				display: flex;
-				justify-content: flex-end;
-				font-weight: bold;
-				.money{
-					color: #FF2A2A;
-					font-size: $font-size-26;
-				}
-				.money-sign{
-					font-size: $font-size-24;
-					color: #FF2A2A;
-				}
-			}
-		}
-		.pros-product{
-			width: 416rpx;
-			height: 100%;
-			line-height: 36rpx;
-			font-size: $font-size-28;	
-			position: relative;
-			.producttitle{
-				width: 100%;
-				display: inline-block;
-				height: auto;							
-				text-overflow:ellipsis;
-				display: -webkit-box;
-				word-break: break-all;
-				-webkit-box-orient: vertical;
-				-webkit-line-clamp: 2;
-				overflow: hidden;
-				margin-bottom: 15rpx;
-				.no-text{
-					display: inline-block;
-					height:36rpx;
-					padding: 0 12rpx;
-					line-height: 36rpx;
-					background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
-					border-radius:18rpx;
-					text-align: center;
-					color: #FFFFFF;
-					font-size:$font-size-28;
-					margin-right: 24rpx;
-				}
-			}
-			.productspec{
-				height: 36rpx;
-				color: #999999;
-				font-size: $font-size-26;
-			}
-			.productprice{
-				width: 100%;
-				height: 48rpx;
-				margin: 30rpx 0 0 0;
-				.price{
-					line-height: 48rpx;
-					font-size: $font-size-26;
-					width: 48%;
-					color: #FF2A2A;
-					float: left;
-					font-weight: bold;
-					&.disabled{
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #FF2A2A;
-					}
-				}
-				.count{
-					height: 100%;
-					float: right;
-					position: relative;
-					&.show{
-						display: block;
-					}
-					&.none{
-						display: none;
-					}
-					.count-tips{
-						width: auto;
-						display: inline-block;
-						padding: 0 15rpx;
-						line-height: 44rpx;
-						height: 44rpx;
-						border-radius: 22rpx;
-						background: $btn-confirm;
-						font-size: $font-size-24;
-						text-align: center;
-						color: #FFFFFF;
-						position: absolute;
-						top:-60rpx;
-						left: -5rpx; 
-						z-index: 5;
-						&.step{
-							left:-217rpx
-						}
-						&::before{
-							content: "";
-							position: absolute;
-							bottom: -30rpx;
-							right: 15rpx;
-							z-index:1;
-							width: 0; 
-							height: 0;
-							border-width: 18rpx;
-							border-style: solid;
-							border-color:$color-system transparent transparent transparent;
-						}
-					}
-					.number-box{
-						display: flex;
-						justify-content: center;
-						align-items: center;
-						border: 2rpx solid #ffe6dc;
-						border-radius: 30rpx;
-						.iconfont{
-							font-size: $font-size-24;
-							padding:0 18rpx;
-							color: #999999;
-							text-align: center;
-							line-height: 48rpx;
-							font-weight: bold;
-							background: #fef6f3;
-							&.icon-jianhao{
-								border-radius: 30rpx 0 0 30rpx;
-							}
-							&.icon-jiahao{
-								border-radius: 0 30rpx 30rpx 0;
-							}
-						}
-						.btn-input{
-							width: 62rpx;
-							height: 48rpx;
-							line-height: 48rpx;
-							background: #fff;
-							border-radius: 4rpx;
-							text-align: center;
-							font-size: $font-size-24;
-						}
-					}
-					.uni-numbox{
-						position: absolute;
-						left: 45rpx;
-						bottom: 0;
-						.uni-numbox-minus, .uni-numbox-plus{
-							width: 50rpx;
-							line-height: 40rpx;
-						}
-						.uni-numbox-value {
-							font-size: $font-size-28;
-							width: 60rpx;
-						}
-					}
-				}
-			}
-			.floor-item-act{
-				width: 100%;
-				height: 56rpx;
-				text-align: center;
-				box-sizing: border-box;
-				float: left;
-				padding:0 0 10rpx 0;
-				margin-left: 10rpx;
-				.floor-tags{
-					height: 28rpx;
-					border-radius: 6rpx;
-					background-color: #FFFFFF;
-					line-height: 28rpx;
-					color: $color-system;
-					text-align: center;
-					display: inline-block;
-					padding:0 16rpx;
-					font-size: $font-size-20;
-					border: 1px solid #E15616;
-					float: left;
-				}
-			}
-		}
-	}
-	.failure-list{
-		width: 702rpx;
-		height: auto;
-		padding: 0 24rpx;
-		margin-top: 20rpx;
-		background: #FFFFFF;
-		.failure-title{
-			width: 100%;
-			height: 82rpx;
-			line-height: 82rpx;
-			font-size: $font-size-28;
-			border-bottom: 1px solid #EBEBEB;
-			.title-txt{
-				float: left;
-				color:#666666;
-				text-align: left;
-			}
-			.title-btn{
-				float: right;
-				color: $color-system;
-				text-align: right;
-				line-height: 80rpx;
-				.butto{
-					display: inline-block;
-					padding: 0 15rpx;
-					font-size: $font-size-26;
-					height: 50rpx;
-					line-height: 50rpx;
-					border-radius: 30rpx;
-					background:#FFFFFF;
-					// border: 1px solid #C9C9C9;
-					// color: #999999;
-					margin-top: 15rpx;
-				}
-			}
-		}
-		.productlist{
-			padding-top: 10rpx;
-			.goods-pros{
-				width: 100%;
-				height: auto;
-				padding: 20rpx 0;
-			}	
-			.goods-pros-t{
-				display: flex;
-				align-items: center;
-				width: 100%;
-				height: 210rpx;
-				position: relative;
-				.img-tip{
-					display: block;
-					width: 72rpx;
-					height: 36rpx;
-					line-height: 36rpx;
-					font-size: $font-size-24;
-					text-align: center;
-					color: #FFFFFF;
-					border-radius: 24rpx;
-					background:rgba(51,51,51,0.3);
-					// position: absolute;
-					// left: 0;
-					// top: 0;
-				}
-				.checkbox-box{
-					padding: 10rpx;
-				}
-				.pros-img{
-					width: 180rpx;
-					height: 100%;
-					border-radius: 10rpx;
-					margin:0 20rpx;
-					border:1px solid #f3f3f3;
-					position: relative;
-					image{
-						width: 100%;
-						height: 100%;
-						border-radius: 10rpx;
-					}
-				}
-				.pros-marks{
-					width: 730rpx;
					height: 250rpx;
-					z-index: 90;
-					background: rgba(0,0,0,.05);
-					position: absolute;
-					left:-20rpx;
-					top: -20rpx;
-				}
-			}
-			.goods-pros-b{
-				width:622rpx;
-				margin-left: 84rpx;
-				height: 40rpx;
-				padding:0 0 26rpx 0;
-				// border-top: 1px solid #EBEBEB;
-				&.show{
-					display: block;
-				}
-				&.none{
-					display: none;
-				}
-				.sum{
-					font-size: $font-size-28;
-					line-height: 40rpx;
-					color: $text-color;
-					display: flex;
-					justify-content: flex-end;
-					.money{
-						color: #FF2A2A;
-						font-size: $font-size-28;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #FF2A2A;
-					}
-				}
-			}
-			.pros-product{
-				width: 402rpx;
-				height: 100%;
-				line-height: 36rpx;
-				font-size: $font-size-28;	
-				position: relative;
-				.producttitle{
-					width: 100%;
-					display: inline-block;
-					height: auto;							
-					text-overflow:ellipsis;
-					display: -webkit-box;
-					word-break: break-all;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-					overflow: hidden;
-					margin-bottom: 8rpx;
-					.no-text{
-						display: inline-block;
-						height:36rpx;
-						padding: 0 12rpx;
-						line-height: 36rpx;
-						background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
-						border-radius:18rpx;
-						text-align: center;
-						color: #FFFFFF;
-						font-size: $font-size-28;
-						margin-right: 24rpx;
-					}
-				}
-				.productspec{
-					height: 36rpx;
-					color: #999999;
-					font-size: $font-size-26;
-					margin-top: 20rpx;
-				}
-				.productstate{
-					font-size: $font-size-28;
-					height: 44rpx;
-					color: #FF2A2A;
-					position: absolute;
-					bottom: 0;
-					left: 0;
-				}
-			}
-		}
-	}
-	.footer{
-		width: 100%;
-		background-color: #FFFFFF;
-		height: 110rpx;
-		position: fixed;
-		bottom: 0rpx;
-		z-index: 100;
-		.footer-le{
-			width: 520rpx;
-			height: 100%;
-			padding:0 24rpx;
-			float: left;
-			box-sizing: border-box;
-			.foot-check{
-				width: 100rpx;
-				float: left;
-				line-height: 110rpx;
-				font-size: $font-size-24;
-				.checkbox{
-					width: 40rpx;
-					text-align: center;
-				}
-				.text{
-					width: 60rpx;
-					float: right;
-				}
-			}
-			.sum{
-				width: 360rpx;
-				height: 110rpx;
-				float: right;
-				box-sizing: border-box;
-				padding: 10rpx;
-				.sum-none{
-					width: 100%;
-					height: 45rpx;
-					line-height: 45rpx;
-					color: $text-color;
-					float: left;
-					text-align: right;
-					.money{
-						font-size: $font-size-24;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #999999;
-						text-decoration: line-through;
-					}
-					.money-reduced{
-						margin-left: 10rpx;
-						font-size: $font-size-24;
-						color: $color-system;
-					}
-				}
-				.sum-price{
-					text-align: right;
-					width: 100%;
-					height: 45rpx;
-					line-height: 45rpx;
-					font-size: $font-size-30;
-					color: $text-color;
-					float: left;
-					font-weight: normal;
-					&.none{
-						height: 90rpx;
-						line-height: 90rpx;
-					}
-					.money{
-						color: #FF2A2A;
-					}
-					.money-sign{
-						font-size: $font-size-24;
-						color: #FF2A2A;
-					}
-				}
-			}
-		}
-		.footer-ri{
-			width: 230rpx;
-			height: 100%;
-			float: right;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			z-index: 999;
-			box-sizing: border-box;
-			padding: 13rpx 15rpx;
-			&.none{
-				display: none;
-			}
-			.btn{
-				width: 200rpx;
-				height: 100%;
-				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
-				font-size: $font-size-28;
-				line-height: 84rpx;
-				color: #FFFFFF;
-				display: flex;
-				border-radius: 42rpx;
-				justify-content: center;
-				align-items: center;
-			}
-		}
-		.footer-del{
-			width: 400rpx;
-			height: 110rpx;
-			position: absolute;
-			padding-left: 200rpx;
-			background: #FFFFFF;
-			right: 0;
-			top: 0;
-			z-index: 1000;
-			&.show{
-				animation: showDelbtn 0s linear both;
-			}
-			&.none{
-				animation: hideDelbtn 0s linear both;
-			}
-			.btn{
-				width: 50%;
-				height: 100%;
-				line-height: 110rpx;
-				font-size: $font-size-28;
-				color: #FFFFFF;
-				text-align: center;
-				float: left;
-			}
-			.btn.btn-cancel{
-				background:#EEC1AB;
-			}
-			.btn.btn-confirm{
-				background:#FF2A2A;
-			}
-			@keyframes showDelbtn {
-				0% {
-					transform: translateX(0);
-				}
-				100% {
-					transform: translateX(-100%);
-				}
-			}
-			@keyframes hideDelbtn {
-				0% {
-					transform: translateX(-100%);
-				}
-				100% {
-					transform: translateX(0);
-				}
-			}
-		}
-	}
+<template>
+	<view class="container cart clearfix" v-if="hasLogin"> 	
+		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
+		<view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
+			<view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0">
+				<view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
+				<view class="delBtn" @tap.stop="showDelManager">删除</view>
+			</view>
+			<view v-if="!isEmpty" class="container-cart"> 
+				<view class="cart-content" :style="{paddingBottom :isIphoneX ? '130rpx' : '100rpx'}">
+					<view class="goods-list">
+						<view v-for="(item, index) in goodsList" :key="index" class="goods-item clearfix">
+							<view class="shoptitle">
+								<!--选择商店的全部商品"-->
+								<view class="checkbox-box" @click.stop="checkShop(item)">
+									<view class="checkbox iconfont" :class="[item.checked ?'icon-yixuanze':'icon-weixuanze']"></view>
+								</view>
+								<view v-if="item.promotions" class="floor-item-act">
+									<view class="floor-tags" @click.stop="clickPopupShow(item,2)">{{item.promotions.name}}</view>	
+								</view>
+								<view class="text">{{item.name}}</view> 
+							</view>
+							<view class="productlist">
+								<view 	class="goods-pros" v-for="(pros,idx) in item.cartList" :key="idx" >
+									<view class="goods-pros-t">
+										<!--选择商品-->
+										<view class="checkbox-box" @click.stop="ischeck(item,pros)">
+											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-yixuanze':'icon-weixuanze']"></view>
+										</view>
+										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.image ? pros.image:''" alt="" /></view>
+										<view class="pros-product">
+											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.name}}</view>
+											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
+											<view class="productprice">
+												<!--使用过滤器对总价改变-->
+												<view class="price" :class="PromotionsFormat(pros.promotions) ? 'disabled' : ''">
+													<text>¥</text>
+													{{ (PromotionsFormat(pros.promotions) ? pros.originalPrice : pros.price)  | NumFormat }}
+												</view>
+												<view class="count" v-if="pros.validFlag == 2 "  :class="[isshowDelbtn ? 'none':'show']">
+													<text class="count-tips" v-if="pros.number<pros.min">起订量:{{pros.min}}</text>
+													<text class="count-tips step" v-if="pros.isStep">购买量必须为起订量的整数倍</text>
+													<view class="number-box">
+														<view  class="iconfont icon-jianhao" @click="changeCountSub(item,pros)"></view>
+														<input class="btn-input" type="number" maxlength='4' v-model="pros.number" @blur="changeNnmber($event,item,pros)" @focus="changeInput(pros)">
+														<view  class="iconfont icon-jiahao"  @click="changeCountAdd(item,pros)"></view>
+													</view>
+												</view>
+											</view>
+											<view v-show="pros.actStatus==1" class="floor-item-act">
+												<view v-if="PromotionsFormat(pros.promotions)"  class="floor-tags" @click.stop="clickPopupShow(pros,1)">
+													{{pros.promotions.name}}
+													<text v-if ="pros.promotions!=null && pros.promotions.type!=3">
+														:¥{{ pros.promotions == null ? '0.00' : pros.promotions.touchPrice | NumFormat}}
+													</text>
+												</view>
+												<view v-else-if="pros.promotions.type!=3" class="floor-tags" @click.stop="clickPopupShow(pros,2)">{{pros.promotions.name}}</view>	
+											</view>
+											<view  v-if="pros.actStatus == null  &&  pros.ladderFlag == 1" class="floor-item-act">
+												<view class="floor-tags" @click.stop="clickPopupShow(pros,2)">阶梯价格</view>	
+											</view>
+										</view>	
+									</view>
+								</view>
+							</view>	
+							<view class="goods-pros-b clearfix" :class="[isshowDelbtn ? 'none':'show']" >
+								<view class="sum-none" v-if="item.reducedPrice>0">
+									<text class="money-sign">¥</text>
+									<text class="money">{{ item.totalOriginalPrice | NumFormat }}</text>
+									<text class="money-reduced">减<text>¥{{ item.reducedPrice | NumFormat}}</text></text>
+								</view>
+								<view class="sum">合计:<text class="money"><text class="money-sign">¥</text>{{item.totalPrice | NumFormat}}</text></view>
+							</view>
+						</view>
+					</view>	
+					<view class="failure-list" v-if="failureList.length>0">
+						<view class="failure-title">
+							<view class="title-txt">失效商品<text>{{failureList.length}}件</text></view>
+							<view class="title-btn" @click.stop="deletefailureList"><text class="butto">清空失效商品</text></view>
+						</view>
+						<view class="productlist">
+							<view class="goods-pros" v-for="(failure,failureIdx) in failureList" :key="failureIdx" >
+								<view class="goods-pros-t" @click.stop="failureToProduct(failure)">
+									<!--选择商品-->
+									<view class="checkbox-box" @click.stop="ischeckFailure(failure)" v-if="isshowDelbtn">
+										<button class="checkbox iconfont" 
+												:class="[ failure.productsChecked ? 'icon-yixuanze':'icon-weixuanze']">
+										</button>
+									</view>
+									<text class="img-tip">失效</text>
+									<view class="pros-img">
+										<image :src="failure.image ? failure.image:''" alt="" />
+									</view>
+									<view class="pros-product">
+										<view class="producttitle">{{failure.name}}</view>
+										<view class="productspec">规格:{{failure.unit ? failure.unit : ''}}</view>
+										<view class="productstate">{{failureStateText(failure.status)}}</view>
+									</view>
+									<view class="pros-marks" v-if="failure.isFailureLayer"></view>
+								</view>
+							</view>
+						</view>	
+					</view>
+				</view>
+				<!-- 脚部菜单 -->
+				<view class="footer">
+					<view class="footer-le">
+						<view class="foot-check checkbox-box" @tap.stop="checkAll()">
+							<button class="checkbox iconfont" :class="[isCheckAll?'icon-yixuanze':'icon-weixuanze']"></button> 
+							<view class="text">全选</view>
+						</view>
+	
+						<view class="sum">
+							<view class="sum-none"  v-if="reducedPrice>0">
+								<text class="money-sign">¥</text>
+								<text class="money">{{ totalOriginalPrice | NumFormat }}</text>
+								<text class="money-reduced">减<text>¥{{ reducedPrice | NumFormat}}</text></text>
+							</view>
+							<view class="sum-price" :class="reducedPrice == 0 ? 'none' : ''">
+								总价:<text class="money-sign">¥</text><text class="money">{{allPrice | NumFormat}}</text>
+							</view>
+						</view>
+					</view>
+					<view v-if="!isshowDelbtn" class="footer-ri" >
+						<view class="btn hanld-btn" @tap="toConfirmation">去结算({{allCount}})</view>
+					</view>
+					<view v-else class="footer-del">
+						<view class="btn btn-cancel" @tap.stop="hideDelManage">取消</view>
+						<view class="btn btn-confirm" @tap.stop="deleteList">删除</view>
+					</view>
+				</view>
+			</view>
+			<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>
+					<view class="login-btn"  @click="goIndex">去商城</view>
+				</view>
+			</view>
+		</view>
+		<!-- 促销活动弹窗 -->
+		<activi-popup :product="handlerPros" :popupShow="popupShow"></activi-popup>
+		<!-- 透明模态层 -->
+		<modal-layer v-if='modallayer'></modal-layer>
+	</view>
+</template>
+<script>
+	import authorize from '@/common/config/authorize.js'
+	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 activiPopup from "@/components/cm-module/productDetails/cm-activipopu"
+	import modalLayer from "@/components/modal-layer"
+	import { mapState,mapMutations } from 'vuex';
+	
+	export default{
+		components:{
+			tuiSkeleton,
+			tuiLoadmore,
+			tuiNomore,
+			activiPopup,
+			modalLayer
+		},
+		data(){
+			return{
+				CustomBar:this.CustomBar,// 顶部导航栏高度
+				isIphoneX:this.$store.state.isIphoneX,
+				userID:'',
+				alertType:'',
+				isStock:'',
+				popupShow:false,
+				handlerPros:{},//监听单挑促销商品
+				failureList:[],	//失效商品列表
+				goodsList:[],	//购物车的商品
+				promotionsList:[],//促销列表
+				delGoodsList:'',//要删除的商品
+				setGoodData:'', //确认订单的商品
+				isCheckAll:false,//是否全选
+				kindCount:0,//购物车宝贝数量
+				allPrice:0,//所有价格
+				totalOriginalPrice:0,//所有原价价
+				reducedPrice:0,//满减
+				allCount:0,//被选中的产品数量
+				isModallayer:false,
+				skeletonShow:true,
+				isshowDelbtn:false,
+				isDisabled: false, // 供应商/店铺全选是否禁用状态
+				isNoConfim:false,
+				isEmpty:false,//显示空购物车
+				scrollHeight: 'auto',
+				nomoreText: '上拉显示更多',
+				hasNextPage: false,
+				loadding: false,
+				pullUpOn: true,
+				pullFlag: true,
+				pageSize: 10,
+				pageNum: 1,
+				submitIds:[]
+			}
+		},
+		onLoad(){
+			this.setScrollHeight();
+		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
+		filters:{
+			NumFormat(value) {//处理金额
+				return Number(value).toFixed(2);
+			},
+		    totalprice(val,count){//单件商品的价格 × 数量
+		        return (val * count).toFixed(2)
+		    }
+		},	
+		methods:{
+			initData(){
+				this.isModallayer = false //遮罩层 防止多次点击
+				this.skeletonShow = true //预加载圆圈
+				this.isCheckAll=false//是否全选
+				this.submitIds = []
+				this.$api.getStorage().then((resolve) => {
+					this.userID = resolve.userId;
+					this.initGetCartGoodsList();
+				})	
+			},
+			initLogin(){
+				if(uni.getStorageSync('_WX_State')){
+					this.$api.redirectTo('/pages/login/login?type=4')
+				}else{
+					console.log(new Date +'用户未授权微信信息')
+					this.$api.navigateTo('/pages/authorization/authorization?type=0')
+				}	
+			},
+			clickPopupShow(pros,type){
+				this.popupShow = true;
+				this.handlerPros = pros;
+			},
+			setScrollHeight() {
+				// 窗口高度-footer高度
+				const {windowHeight, pixelRatio} = uni.getSystemInfoSync();
+				setTimeout(()=> {
+					const query = uni.createSelectorQuery().in(this);
+					query.selectAll('.footer').boundingClientRect();
+					query.exec(res => {
+						this.windowHeight = windowHeight;
+						if(res[0][0]) {
+							this.scrollHeight = windowHeight - res[0][0].height;
+						}
+					})
+				}, 500)
+			},
+			initGetCartGoodsList(){//初始化购物车 index:1
+				this.ProductService.QueryShoppingCartList({userId:this.userID}).then(response =>{
+					this.skeletonShow = false
+					let data = response.data
+					this.kindCount = data.kindCount
+					this.promotionsList = data.promotions
+					this.$store.commit('updateAllNum',data.kindCount)
+					if( data.list.length > 0 || data.invalid.length > 0){
+						this.isEmpty =false
+					}else{
+						this.isEmpty =true
+					}
+					if(data.list && data.list.length > 0 ){
+						this.goodsList = data.list;
+						this.goodsList.forEach((item,index) => {
+							item.cartList.forEach(pros => {
+								pros.shopID = item.shopID;
+								pros.isStep = false
+								if(pros.step === 2){ 
+									if(pros.number % pros.min != 0){
+										pros.number = pros.min
+										this.totalShopPeice()
+										this.updateShoppogNum(pros)
+									}
+								}
+							})
+						})
+						this.totalShopPeice()
+					} else {
+						this.goodsList = [];
+					}
+					if( data.invalid && data.invalid.length > 0){
+						let newFailureList = [],isFailureLayer;
+						data.invalid.forEach((failure,index) => {
+							if(failure.status == 1 || failure.status == 2) {
+								isFailureLayer = true
+							}else{
+								isFailureLayer = false
+							}
+							newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
+						})
+						this.failureList = newFailureList
+					} else {
+						this.failureList = [];
+					}
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			},		
+			ischeckFailure(failure){
+				failure.productsChecked = !failure.productsChecked
+				this.updateCheckAllBtn()
+			},
+			ischeck(item,pro){//为未选中的时候改变为true,反之为true
+				pro.productsChecked = !pro.productsChecked;
+				if(pro.productsChecked) {
+					if(!this.submitIds.includes(pro.productID*1)){
+						this.submitIds.push(pro.productID);
+					}
+				} else {
+					var lent = this.submitIds.indexOf(pro.productID*1);
+					if(lent >=0 ){
+						this.submitIds.splice(lent, 1);
+					}
+				}
+				this.updateProductCheckedAllBtn(item);
+				this.updateCheckAllBtn();
+				
+			},
+			updateProductCheckedAllBtn(item) {// 单独每个供应商的勾选判断
+				let productsList = item.cartList,
+					productsCheckedLength = 0,
+					disabledLength = 0;
+				if(this.isshowDelbtn) {
+					productsList.forEach(pros => {
+						if(pros.productsChecked) {
+							productsCheckedLength++;
+						}
+					})
+				} else {
+					productsList.forEach(pros => {
+						if(pros.productsChecked) {
+							productsCheckedLength++;
+						}
+					})
+				}
+				item.checked = productsCheckedLength === productsList.length;
+			},
+			updateCheckAllBtn() {// 全选勾选判断
+				let goodsCheckedLength = 0,
+					goodsList = this.goodsList,
+					failureList = this.failureList;
+				goodsList.forEach(item => {
+					if(item.checked) {
+						goodsCheckedLength++;
+					}
+				})
+				failureList.forEach(failureItem=>{
+					if(failureItem.productsChecked){
+						goodsCheckedLength++;
+					}
+				})
+				if(this.isshowDelbtn){
+					this.isCheckAll = goodsCheckedLength === goodsList.length + failureList.length;
+				}else{
+					this.isCheckAll = goodsCheckedLength === goodsList.length;
+				}
+			},
+			checkShop(item){//与单选商品类似
+				item.checked = !item.checked;
+				this.setProductChecked(item);
+				this.updateCheckAllBtn();
+			},
+			setProductChecked(item) {
+				item.cartList.forEach(pros=>{
+					if(item.checked) {
+						pros.productsChecked = true;
+						if(!this.submitIds.includes(pros.productId*1)){
+							this.submitIds.push(pros.productId);
+						}
+					} else {
+						pros.productsChecked = false;
+						var lent = this.submitIds.indexOf(pros.productId*1);
+						if(lent >=0 ){
+							this.submitIds.splice(lent, 1);
+						}
+					}
+				})
+			},
+			updateBothCheckBtn() {
+				if(this.isshowDelbtn) {
+					// 当管理删除按钮出现时,失效的商品可被选择
+					this.goodsList.forEach((item)=>{
+						item.checked = this.isCheckAll;
+						this.setProductChecked(item);
+					})
+					//删除按钮 全选包括失效商品勾选
+					this.failureList.forEach(failureItem=>{
+						failureItem.productsChecked = this.isCheckAll;
+					})
+				} else {
+					this.goodsList.forEach((item)=>{
+						item.checked = this.isCheckAll && !item.isDisabled;
+						this.setProductChecked(item);
+					})
+				}
+			},
+			checkAll(){//全选方法内调用方法
+			    this.isCheckAll = !this.isCheckAll;
+				this.updateBothCheckBtn();     
+			},
+			totalShopPeice(){//每次所属会所下的商品增减重新计算合计价格&减去含有下架的商品
+				let touchPrice = 0;
+				let reducedPrice = 0;//商铺合计满减价
+				this.goodsList.map((item,index)=>{
+					//计算店铺满减后店铺合计
+					if(item.promotions && item.promotions.mode == 2){
+						let prosPrice=0;
+						let totalOriginalPrice = 0;//商铺合计原价
+						item.cartList.forEach(pros=>{
+							prosPrice += pros.price*pros.number
+							totalOriginalPrice += pros.originalPrice*pros.number
+						})
+						if(prosPrice >= item.promotions.touchPrice){
+							item.totalPrice = prosPrice - item.promotions.reducedPrice  
+							item.reducedPrice = item.promotions.reducedPrice
+							item.totalOriginalPrice = totalOriginalPrice
+						}else{
+							item.reducedPrice = 0  //统计合计价格
+							item.totalPrice = prosPrice
+						}
+					}else{//以下为计算除店铺满减以外的单品满减以及正常商品合计
+						let _totalPrice = 0;
+						let _reducedPrice = 0;
+						let _totalOriginalPrice =0;
+						item.cartList.forEach(pros=>{
+							let _price = pros.price*pros.number
+							_totalOriginalPrice += pros.price*pros.number;
+							if(pros.promotions && pros.promotions.type != 2 && pros.promotions.mode == 2){
+								if(_price >= pros.promotions.touchPrice){
+									_price = _price - pros.promotions.reducedPrice
+									_reducedPrice += pros.promotions.reducedPrice
+								}
+								_totalPrice +=  _price
+							}else{
+								_reducedPrice = 0;
+								_totalPrice += pros.price*pros.number;
+							}
+						})
+						item.reducedPrice = _reducedPrice
+						item.totalOriginalPrice = _totalOriginalPrice
+						item.totalPrice = _totalPrice
+					}
+				})
+			},
+			totalPeice(){//计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
+				let totalPrice = 0;
+				let reducedPrice = 0;
+				let originalPrice = 0;
+				this.goodsList.forEach((item,index)=>{
+					let supplierPrice = 0;
+					let supplierReducedPrice = 0;
+					item.totalprice = 0;
+					item.reducedprice = 0;
+					item.originalprice = 0;
+					item.cartList.forEach(pros=>{	
+						if(pros.productsChecked){								
+							supplierPrice += pros.price*pros.number;
+							// 单品满减
+							if(pros.promotions && pros.promotions.type*1===1 && pros.promotions.mode*1===2){
+								// 单品满减-重新计算供应商总价/满减金额
+								if(pros.price*pros.number >= pros.promotions.touchPrice){
+									supplierPrice -= pros.promotions.reducedPrice;
+									supplierReducedPrice += pros.promotions.reducedPrice;
+								}
+							}
+						}	
+					})
+					// 店铺满减
+					if(item.promotions && item.promotions.mode*1===2){
+						// 店铺满减-计算供应商总价/满减金额
+						if(supplierPrice >= item.promotions.touchPrice){
+							supplierPrice -= item.promotions.reducedPrice;
+							supplierReducedPrice += item.promotions.reducedPrice;
+						}
+					}
+					item.totalprice = supplierPrice;
+					item.reducedprice = supplierReducedPrice;
+					item.originalprice = (supplierPrice+supplierReducedPrice);
+					totalPrice += item.totalprice;
+					reducedPrice += item.reducedprice;
+					originalPrice += item.originalprice;
+				})
+				 //总促销计算
+				this.promotionsList.forEach(promotions =>{
+					// 凑单满减
+					if(promotions.mode*1===2 && promotions.type*1===2){
+						let total = 0;
+						 promotions.productList.forEach(pros=>{
+							if (this.submitIds.includes(pros.productId*1)){
+								total += pros.number * pros.price;
+							}
+						});
+						if(total>=promotions.touchPrice){
+							totalPrice -= promotions.reducedPrice;
+							reducedPrice += promotions.reducedPrice;
+						}
+					}
+				});
+				//最后统计商品原价
+				this.totalOriginalPrice = originalPrice;
+				//最后满减金额 = 店铺减去金额 + 单品减去金额 + 凑单减去金额
+				this.reducedPrice = reducedPrice;
+				//最终合计价格 = 	店铺满减合计 + 单品满减  + 正常合计 + 凑单满减			
+				this.allPrice = totalPrice ;
+			},
+			totalCount(){//计算总数量
+			    this.allCount = 0
+				let prosAllCount=0
+				let validCount = 0
+				let validList =[];
+				let productsList =[];
+			    this.goodsList.forEach(item=>{
+					productsList = item.cartList
+					productsList.forEach(pros=>{
+						if(pros.productsChecked){
+							prosAllCount+=parseInt(pros.number);
+							this.allCount = prosAllCount
+						}
+					})
+			    })
+			},		
+			changeCountAdd(item,pros){//商品数量加加
+				if(pros.step === 2){
+					pros.isStep = false
+					pros.number += pros.min
+					this.processActivityPrice(pros)
+					this.isStock = false
+				}else{
+					pros.number++
+					this.processActivityPrice(pros)
+					this.isStock = false
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			changeCountSub(item,pros){//商品数量减减
+				if(pros.number<=pros.min){
+					pros.number= pros.min
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
+					return
+				}else{
+					if(pros.step === 2){
+						pros.isStep = false
+						pros.number -= pros.min
+					}else{
+						pros.number--
+					}
+					this.processActivityPrice(pros)
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			changeInput(pros){//输入商品数量更新
+				pros.isStep = false
+			},
+			changeNnmber(e,item,pros){//输入商品数量更新
+				let _value = Number(e.detail.value);
+				if(!this.$api.isNumber(_value)){
+					pros.number = pros.min
+				}else if(_value < pros.min){	
+					this.$util.msg(`该商品最小起订量为${pros.min}`,2000);
+					pros.number = pros.min
+				}else if(_value % pros.min != 0){
+					pros.isStep = true
+					pros.number = pros.min
+				}else{
+					pros.isStep = false
+					pros.number = e.detail.value
+					this.processActivityPrice(pros)
+				}
+				this.updateShoppogNum(pros)
+				this.totalShopPeice();
+			},
+			processActivityPrice(pros){//单独处理活动价格和阶梯价格
+				let ladderPriceList = pros.ladderPrices;
+				if(pros.ladderFlag == '0' || pros.actStatus == 1){
+					pros.price = pros.price
+				}else{
+					ladderPriceList.forEach((item,index)=>{
+						if(pros.number>=item.buyNum){
+							pros.price = item.buyPrice
+						}
+					})
+				}
+			},
+			updateShoppogNum(pros){//加减购物车商品更新到后台
+				let params ={userID:this.userID,productID:pros.productId,productCount:pros.number}
+				this.ProductService.ShoppingCartUpdate(params).then(response =>{
+					this.isshowDelbtn = false;
+					this.initGetCartGoodsList();
+				}).catch(error =>{
+					this.$util.msg(error.msg,2000);
+				})
+			 },
+			toConfirmation(){//跳转确认订单页面
+				let setGoodsList=[];
+				this.goodsList.forEach(res=>{
+					let products = res.cartList
+					products.forEach(pros=>{
+						if(pros.productsChecked){
+						    setGoodsList.push(pros.productId)
+						}
+					})
+				})
+				if(setGoodsList == ''){
+					this.$util.msg("请先选择结算商品~",2000);
+					return
+				}else{
+					this.isNoConfim = false
+					this.goodsList.forEach(el=>{
+						el.cartList.forEach(pros=>{
+							if(pros.productsChecked){
+							   if(pros.number<pros.min){
+								   this.isNoConfim = true
+							   }
+							}
+						})
+					})
+					if(this.isNoConfim){
+						this.$util.modal('','有商品的购买量没达到最小起订量,请修改数量后再次提交结算','去修改','',false,() =>{})
+						return;
+					}
+					let productID = '';
+					this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
+						el.cartList.forEach(pros=>{
+							if(pros.productsChecked){
+							   productID += pros.productId+','
+							}
+						})
+					})
+					let cartPramsData={
+							allPrice:this.allPrice,
+							allCount:this.allCount,
+							productID:productID.substring(0,productID.lastIndexOf(',')),
+							productCount:''
+						}
+					this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({data:cartPramsData})}`)
+				}
+			},
+			showDelManager(){//显示删除商品管理
+				this.isshowDelbtn = true;
+				if(this.isCheckAll) {
+					this.updateBothCheckBtn();	
+				} else {
+					this.goodsList.forEach(item => {
+						if(item.checked) {
+							item.cartList.forEach(pros => {
+								pros.productsChecked = true;
+							})
+						}
+					})
+					this.updateCheckAllBtn();
+				}
+				// 失效也被勾选
+				this.failureList.forEach(failureItem => {
+					if(failureItem.isFailureLayer){
+						failureItem.isFailureLayer = false
+					}
+				})
+			},
+			hideDelManage(){//隐藏删除商品管理			
+				this.isshowDelbtn = false;
+				let isFailureLayer,newFailureList =[];
+				if(this.isCheckAll) {
+					this.updateBothCheckBtn();	
+				} else {
+					// 失效商品取消勾选
+					this.goodsList.forEach(item => {
+						if(item.isDisabled) {
+							item.checked = false;
+						}
+						item.cartList.forEach(pros => {
+							if(pros.validFlag == 3) {
+								pros.productsChecked = false;
+							}
+						})
+					})
+					this.updateCheckAllBtn();
+				}
+				this.failureList.forEach((failure,index) => {
+					if(failure.failureState == 1 || failure.failureState == 2) {
+						isFailureLayer = true
+					}else{
+						isFailureLayer = false
+					}
+					newFailureList.push(Object.assign({},failure,{isFailureLayer:isFailureLayer}))
+				})
+				this.failureList = newFailureList;
+			},		
+			deleteList(){//删除购物车商品	
+				this.delGoodsList=[];
+				this.goodsList.forEach(delitem=>{
+					let products = delitem.cartList
+					products.forEach(pros=>{
+						if(pros.productsChecked){
+						    this.delGoodsList += pros.productId+','
+						}
+					})
+				})
+				this.failureList.forEach(failure=>{
+					if(failure.productsChecked){
+						this.delGoodsList += failure.productId+','
+					}
+				})
+				if(this.delGoodsList.length == 0){
+					this.$util.msg("请选择要删除的商品~",2000);
+					return
+				}else{			
+					this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
+						this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
+							this.$util.msg('删除成功',2000);
+							setTimeout(()=>{
+								this.isshowDelbtn = false;
+								this.initGetCartGoodsList();
+							},2000)
+						}).catch(error =>{
+							this.$util.msg(error.msg,2000)
+						})
+					})
+				}
+			},
+			deletefailureList(){
+				this.failureList.forEach(failure=>{ this.delGoodsList += failure.productId+',' })
+				this.$util.modal('','确定清空全部失效商品吗?','确定','取消',true,() =>{
+					this.ProductService.ShoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
+						this.$util.msg('删除成功',2000);
+						setTimeout(()=>{
+							this.isshowDelbtn = false;
+							this.initGetCartGoodsList();
+						},2000)
+					}).catch(error =>{
+						this.$util.msg(error.msg,2000)
+					})
+				})
+			},
+			goIndex(){
+				uni.switchTab({
+				    url: '/pages/tabBar/home/index'
+				});
+			},
+			goNavto(url){
+				uni.navigateTo ({
+					url
+				})
+			},
+			navToListPage(id){
+				this.isModallayer = true;
+				this.$api.navigateTo(`/pages/goods/product?id=${id}`)
+			},
+			failureToProduct(failure){
+				if(failure.status == 1){
+					this.$util.msg('商品已丢失,不能查看',2000)
+					return
+				}else if(failure.status == 2){
+					this.$util.msg('商品已停售,不能查看',2000)
+					return
+				}else{
+					this.isModallayer = true;
+					this.$api.navigateTo(`/pages/goods/product?id=${failure.productId}`)
+				}
+			},
+			failureStateText(state){
+				let stateText = '',
+					stateTextObject={
+						1:'商品已丢失',
+						2:'商品已停售',
+						3:'商品已下架',
+						4:'商品已售罄',
+						5:'价格仅会员可见,您不能购买',
+						6:'未公开价格',
+						7:'库存不足'
+					}
+				Object.keys(stateTextObject).forEach(key => {
+					if(key == state){
+						stateText = stateTextObject[key]
+					}
+				})
+				return stateText;
+			},
+			setHeaderBtnPosi(){
+				// 获得胶囊按钮位置信息
+				let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
+				return headerBtnPosi
+			},
+			setSysteminfo(){
+				let systeminfo;
+				uni.getSystemInfo({ // 获取设备信息
+					success: (res) => {
+						systeminfo = res
+					},
+				})
+				return systeminfo
+			},
+			PromotionsFormat(promo){//促销活动类型数据处理
+				if(promo!=null){
+					if(promo.type == 1 && promo.mode == 1){
+						return true
+					}else{
+						return false
+					}
+				}
+				return false
+			}
+		},
+		watch:{//深度监听所有数据,每次改变重新计算总价和总数
+		    goodsList:{
+		        deep:true,
+		        handler(val,oldval){
+		            this.totalPeice()
+		            this.totalCount()
+		        }
+		    }
+		},
+		onPullDownRefresh() {//下拉刷新
+			this.initGetCartGoodsList()
+			uni.stopPullDownRefresh()
+		},
+		onShow(){
+			if(this.hasLogin){
+				this.initData()
+			}else{
+				this.initLogin()
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background: #f7f7f7;
+		height: auto;
+	}
+	.cart-content{
+		position: relative;
+	}
+	.container-cart-main.none{
+		display: none;
+	}
+	.container-cart-main.show{
+		display: block;
+	}
+	.cart-content.empty.none{
+		display: none;
+	}
+	.cart-content.empty.show{
+		display: block;
+	}
+	.container-cart.show{
+		display: block;
+	}
+	.container-cart.none{
+		display: none;
+	}
+	.empty-container.none{
+		display: none;
+	}
+	.empty-container.show{
+		display: flex;
+	}
+	.foot-check-delbtn{
+		width: 100%;
+		height: 80rpx;
+		position: fixed;
+		top: 0;
+		left: 0;
+		box-sizing: border-box;
+		padding: 15rpx 24rpx;
+		background-color: #F7F7F7;
+		z-index: 990;
+		.foot-text{
+			font-size: $font-size-26;
+			height: 50rpx;
+			line-height: 50rpx;
+			color:#666666;
+			float: left;
+			padding-left: 10rpx;
+			text{
+				margin: 0 6rpx;
+			}
+		}
+		.delBtn{
+			width: 100rpx;
+			display: inline-block;
+			padding: 0 15rpx;
+			font-size: $font-size-26;
+			height: 50rpx;
+			line-height: 50rpx;
+			border-radius: 30rpx;
+			background:#FFFFFF;
+			border: 1px solid #e15616;
+			color: #E15616;
+			float: right;
+			text-align: center;
+			&.none{
+				display: none;	
+			}
+		}
+	}
+	.checkbox-box{
+		display: flex;
+		align-items: center;
+		.checkbox{
+			display: flex;
+			margin: 0;
+			padding: 5rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			box-sizing: border-box;
+			text-align: center;
+			text-decoration: none;
+			border-radius: 0;
+			-webkit-tap-highlight-color: transparent;
+			overflow: hidden;
+			background-color:#FFFFFF;
+			font-size: 36rpx;
+			color:#999999;
+			&.icon-yixuanze{
+				color: $color-system;
+			}
+		}
+		&.disabled{
+			.checkbox{
+				color:#999999
+			}
+		}
+		.text{
+			font-size: $font-size-24;
+			margin-left: 10rpx;
+		}
+	}
+	.goods-list{
+		width: 100%;
+		height: auto;
+		background-color: #F7F7F7;
+		.goods-item{
+			width: 702rpx;
+			padding: 0 24rpx;
+			background: #FFFFFF;
+			margin-bottom: 24rpx;
+		}
+		.shoptitle{
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			line-height: 80rpx;
+			.checkbox-box{
+				padding: 10rpx;
+			}
+			.text{
+				width: 450rpx;
+				display: block;
+				overflow: hidden;
+				text-overflow:ellipsis;
+				white-space: nowrap;
+				margin-left: 20rpx;
+				font-size: $font-size-28;
+				color: $text-color;
+				text-align: left;
+				font-weight: bold;
+			}
+			.floor-item-act{
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding:10rpx 0;
+				margin-left: 20rpx;
+				.floor-tags{
+					height: 28rpx;
+					border-radius: 6rpx;
+					background-color: #FFFFFF;
+					line-height: 28rpx;
+					color: $color-system;
+					text-align: center;
+					display: inline-block;
+					padding:0 16rpx;
+					font-size: $font-size-20;
+					border: 1px solid #E15616;
+					float: right;
+				}
+			}
+		}
+		.goods-pros{
+			width: 100%;
+			height: auto;
+			margin-bottom: 20rpx;
+		}	
+		.goods-pros-t{
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 210rpx;
+			padding:0 0 26rpx 0;
+			.checkbox-box{
+				padding: 10rpx;
+			}
+			.pros-img{
+				width: 210rpx;
+				height: 100%;
+				border-radius: 10rpx;
+				margin:0 20rpx;
+				border:1px solid #f3f3f3;
+				image{
+					width: 100%;
+					height: 100%;
+					border-radius: 10rpx;
+				}
+			}
+		}
+		.goods-pros-b{
+			width:100%;
+			height: auto;
+			padding:0 0 24rpx 0;
+			box-sizing: border-box;
+			&.show{
+				display: block;
+			}
+			&.none{
+				display: none;
+			}
+			.sum-none{
+				width: 100%;
+				height: 48rpx;
+				line-height: 48rpx;
+				color: $text-color;
+				float: left;
+				text-align: right;
+				.money{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-sign{
+					font-size: $font-size-26;
+					color: #999999;
+					text-decoration: line-through;
+				}
+				.money-reduced{
+					margin-left: 10rpx;
+					font-size: $font-size-26;
+					color: $color-system;
+					.iconfont{
+						font-size: $font-size-34;
+					}
+				}
+			}
+			.sum{
+				width: 100%;
+				height: 40rpx;
+				font-size: $font-size-26;
+				line-height: 40rpx;
+				color: $text-color;
+				float: left;
+				display: flex;
+				justify-content: flex-end;
+				font-weight: bold;
+				.money{
+					color: #FF2A2A;
+					font-size: $font-size-26;
+				}
+				.money-sign{
+					font-size: $font-size-24;
+					color: #FF2A2A;
+				}
+			}
+		}
+		.pros-product{
+			width: 416rpx;
+			height: 100%;
+			line-height: 36rpx;
+			font-size: $font-size-28;	
+			position: relative;
+			.producttitle{
+				width: 100%;
+				display: inline-block;
+				height: auto;							
+				text-overflow:ellipsis;
+				display: -webkit-box;
+				word-break: break-all;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+				margin-bottom: 15rpx;
+				.no-text{
+					display: inline-block;
+					height:36rpx;
+					padding: 0 12rpx;
+					line-height: 36rpx;
+					background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
+					border-radius:18rpx;
+					text-align: center;
+					color: #FFFFFF;
+					font-size:$font-size-28;
+					margin-right: 24rpx;
+				}
+			}
+			.productspec{
+				height: 36rpx;
+				color: #999999;
+				font-size: $font-size-26;
+			}
+			.productprice{
+				width: 100%;
+				height: 48rpx;
+				margin: 30rpx 0 0 0;
+				.price{
+					line-height: 48rpx;
+					font-size: $font-size-26;
+					width: 48%;
+					color: #FF2A2A;
+					float: left;
+					font-weight: bold;
+					&.disabled{
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
+				}
+				.count{
+					height: 100%;
+					float: right;
+					position: relative;
+					&.show{
+						display: block;
+					}
+					&.none{
+						display: none;
+					}
+					.count-tips{
+						width: auto;
+						display: inline-block;
+						padding: 0 15rpx;
+						line-height: 44rpx;
+						height: 44rpx;
+						border-radius: 22rpx;
+						background: $btn-confirm;
+						font-size: $font-size-24;
+						text-align: center;
+						color: #FFFFFF;
+						position: absolute;
+						top:-60rpx;
+						left: -5rpx; 
+						z-index: 5;
+						&.step{
+							left:-217rpx
+						}
+						&::before{
+							content: "";
+							position: absolute;
+							bottom: -30rpx;
+							right: 15rpx;
+							z-index:1;
+							width: 0; 
+							height: 0;
+							border-width: 18rpx;
+							border-style: solid;
+							border-color:$color-system transparent transparent transparent;
+						}
+					}
+					.number-box{
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						border: 2rpx solid #ffe6dc;
+						border-radius: 30rpx;
+						.iconfont{
+							font-size: $font-size-24;
+							padding:0 18rpx;
+							color: #999999;
+							text-align: center;
+							line-height: 48rpx;
+							font-weight: bold;
+							background: #fef6f3;
+							&.icon-jianhao{
+								border-radius: 30rpx 0 0 30rpx;
+							}
+							&.icon-jiahao{
+								border-radius: 0 30rpx 30rpx 0;
+							}
+						}
+						.btn-input{
+							width: 62rpx;
+							height: 48rpx;
+							line-height: 48rpx;
+							background: #fff;
+							border-radius: 4rpx;
+							text-align: center;
+							font-size: $font-size-24;
+						}
+					}
+					.uni-numbox{
+						position: absolute;
+						left: 45rpx;
+						bottom: 0;
+						.uni-numbox-minus, .uni-numbox-plus{
+							width: 50rpx;
+							line-height: 40rpx;
+						}
+						.uni-numbox-value {
+							font-size: $font-size-28;
+							width: 60rpx;
+						}
+					}
+				}
+			}
+			.floor-item-act{
+				width: 100%;
+				height: 56rpx;
+				text-align: center;
+				box-sizing: border-box;
+				float: left;
+				padding:0 0 10rpx 0;
+				margin-left: 10rpx;
+				.floor-tags{
+					height: 28rpx;
+					border-radius: 6rpx;
+					background-color: #FFFFFF;
+					line-height: 28rpx;
+					color: $color-system;
+					text-align: center;
+					display: inline-block;
+					padding:0 16rpx;
+					font-size: $font-size-20;
+					border: 1px solid #E15616;
+					float: left;
+				}
+			}
+		}
+	}
+	.failure-list{
+		width: 702rpx;
+		height: auto;
+		padding: 0 24rpx;
+		margin-top: 20rpx;
+		background: #FFFFFF;
+		.failure-title{
+			width: 100%;
+			height: 82rpx;
+			line-height: 82rpx;
+			font-size: $font-size-28;
+			border-bottom: 1px solid #EBEBEB;
+			.title-txt{
+				float: left;
+				color:#666666;
+				text-align: left;
+			}
+			.title-btn{
+				float: right;
+				color: $color-system;
+				text-align: right;
+				line-height: 80rpx;
+				.butto{
+					display: inline-block;
+					padding: 0 15rpx;
+					font-size: $font-size-26;
+					height: 50rpx;
+					line-height: 50rpx;
+					border-radius: 30rpx;
+					background:#FFFFFF;
+					// border: 1px solid #C9C9C9;
+					// color: #999999;
+					margin-top: 15rpx;
+				}
+			}
+		}
+		.productlist{
+			padding-top: 10rpx;
+			.goods-pros{
+				width: 100%;
+				height: auto;
+				padding: 20rpx 0;
+			}	
+			.goods-pros-t{
+				display: flex;
+				align-items: center;
+				width: 100%;
+				height: 210rpx;
+				position: relative;
+				.img-tip{
+					display: block;
+					width: 72rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					font-size: $font-size-24;
+					text-align: center;
+					color: #FFFFFF;
+					border-radius: 24rpx;
+					background:rgba(51,51,51,0.3);
+					// position: absolute;
+					// left: 0;
+					// top: 0;
+				}
+				.checkbox-box{
+					padding: 10rpx;
+				}
+				.pros-img{
+					width: 180rpx;
+					height: 100%;
+					border-radius: 10rpx;
+					margin:0 20rpx;
+					border:1px solid #f3f3f3;
+					position: relative;
+					image{
+						width: 100%;
+						height: 100%;
+						border-radius: 10rpx;
+					}
+				}
+				.pros-marks{
+					width: 730rpx;					height: 250rpx;
+					z-index: 90;
+					background: rgba(0,0,0,.05);
+					position: absolute;
+					left:-20rpx;
+					top: -20rpx;
+				}
+			}
+			.goods-pros-b{
+				width:622rpx;
+				margin-left: 84rpx;
+				height: 40rpx;
+				padding:0 0 26rpx 0;
+				// border-top: 1px solid #EBEBEB;
+				&.show{
+					display: block;
+				}
+				&.none{
+					display: none;
+				}
+				.sum{
+					font-size: $font-size-28;
+					line-height: 40rpx;
+					color: $text-color;
+					display: flex;
+					justify-content: flex-end;
+					.money{
+						color: #FF2A2A;
+						font-size: $font-size-28;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
+				}
+			}
+			.pros-product{
+				width: 402rpx;
+				height: 100%;
+				line-height: 36rpx;
+				font-size: $font-size-28;	
+				position: relative;
+				.producttitle{
+					width: 100%;
+					display: inline-block;
+					height: auto;							
+					text-overflow:ellipsis;
+					display: -webkit-box;
+					word-break: break-all;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+					margin-bottom: 8rpx;
+					.no-text{
+						display: inline-block;
+						height:36rpx;
+						padding: 0 12rpx;
+						line-height: 36rpx;
+						background:linear-gradient(315deg,rgba(231,0,0,1) 0%,rgba(255,104,1,1) 100%);
+						border-radius:18rpx;
+						text-align: center;
+						color: #FFFFFF;
+						font-size: $font-size-28;
+						margin-right: 24rpx;
+					}
+				}
+				.productspec{
+					height: 36rpx;
+					color: #999999;
+					font-size: $font-size-26;
+					margin-top: 20rpx;
+				}
+				.productstate{
+					font-size: $font-size-28;
+					height: 44rpx;
+					color: #FF2A2A;
+					position: absolute;
+					bottom: 0;
+					left: 0;
+				}
+			}
+		}
+	}
+	.footer{
+		width: 100%;
+		background-color: #FFFFFF;
+		height: 110rpx;
+		position: fixed;
+		bottom: 0rpx;
+		z-index: 100;
+		.footer-le{
+			width: 520rpx;
+			height: 100%;
+			padding:0 24rpx;
+			float: left;
+			box-sizing: border-box;
+			.foot-check{
+				width: 100rpx;
+				float: left;
+				line-height: 110rpx;
+				font-size: $font-size-24;
+				.checkbox{
+					width: 40rpx;
+					text-align: center;
+				}
+				.text{
+					width: 60rpx;
+					float: right;
+				}
+			}
+			.sum{
+				width: 360rpx;
+				height: 110rpx;
+				float: right;
+				box-sizing: border-box;
+				padding: 10rpx;
+				.sum-none{
+					width: 100%;
+					height: 45rpx;
+					line-height: 45rpx;
+					color: $text-color;
+					float: left;
+					text-align: right;
+					.money{
+						font-size: $font-size-24;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #999999;
+						text-decoration: line-through;
+					}
+					.money-reduced{
+						margin-left: 10rpx;
+						font-size: $font-size-24;
+						color: $color-system;
+					}
+				}
+				.sum-price{
+					text-align: right;
+					width: 100%;
+					height: 45rpx;
+					line-height: 45rpx;
+					font-size: $font-size-30;
+					color: $text-color;
+					float: left;
+					font-weight: normal;
+					&.none{
+						height: 90rpx;
+						line-height: 90rpx;
+					}
+					.money{
+						color: #FF2A2A;
+					}
+					.money-sign{
+						font-size: $font-size-24;
+						color: #FF2A2A;
+					}
+				}
+			}
+		}
+		.footer-ri{
+			width: 230rpx;
+			height: 100%;
+			float: right;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			z-index: 999;
+			box-sizing: border-box;
+			padding: 13rpx 15rpx;
+			&.none{
+				display: none;
+			}
+			.btn{
+				width: 200rpx;
+				height: 100%;
+				background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
+				font-size: $font-size-28;
+				line-height: 84rpx;
+				color: #FFFFFF;
+				display: flex;
+				border-radius: 42rpx;
+				justify-content: center;
+				align-items: center;
+			}
+		}
+		.footer-del{
+			width: 400rpx;
+			height: 110rpx;
+			position: absolute;
+			padding-left: 200rpx;
+			background: #FFFFFF;
+			right: 0;
+			top: 0;
+			z-index: 1000;
+			&.show{
+				animation: showDelbtn 0s linear both;
+			}
+			&.none{
+				animation: hideDelbtn 0s linear both;
+			}
+			.btn{
+				width: 50%;
+				height: 100%;
+				line-height: 110rpx;
+				font-size: $font-size-28;
+				color: #FFFFFF;
+				text-align: center;
+				float: left;
+			}
+			.btn.btn-cancel{
+				background:#EEC1AB;
+			}
+			.btn.btn-confirm{
+				background:#FF2A2A;
+			}
+			@keyframes showDelbtn {
+				0% {
+					transform: translateX(0);
+				}
+				100% {
+					transform: translateX(-100%);
+				}
+			}
+			@keyframes hideDelbtn {
+				0% {
+					transform: translateX(-100%);
+				}
+				100% {
+					transform: translateX(0);
+				}
+			}
+		}
+	}
 </style>

+ 8 - 45
pages/tabBar/home/index.vue

@@ -13,7 +13,7 @@
 		</view>	
 		<!-- 楼层 -->
 		<view class="container-section tui-skeleton">
-			<page-floor :list="pageList" :userIdentity="userIdentity" :pageType='1' v-if="isRequest"></page-floor>
+			<page-floor :list="pageList" :pageType='1' v-if="isRequest"></page-floor>
 			<!-- <supplier-list :supplierObj="supplierObj" v-if="isRequest"></supplier-list> -->
 		</view>
 		<!-- 侧边 -->
@@ -63,7 +63,7 @@
 				modallayer:false,
 				isLogin:false,
 				skeletonShow: true,
-				userIdentity:'',
+				userIdentity:0,
 				flootData:[],//楼层
 				bannerImageList:[],//轮播
 				navBarsList:[],//导航分类
@@ -80,45 +80,11 @@
 			
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo','identity','isActivity'])
+			...mapState(['hasLogin','userInfo','identity','isActivity','isWxAuthorize'])
 		},
 		methods: {
 			...mapMutations(['login','logout']),
-			GetWxAuthorize(){
-				authorize.getCode('weixin').then(wechatcode =>{// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
-					authorize.getUserInfo('weixin').then(getUserInfo =>{
-						this.UserService.UserLoginAuthApplets({ 
-							code:wechatcode,
-							encryptedData:getUserInfo.encryptedData,
-							iv:getUserInfo.iv ,
-						})
-						.then(response =>{
-							this.isLogin = true;
-							this.userID = response.data.userId;						
-							this.userIdentity = response.data.userIdentity;						
-							this.clubStatus = response.data.clubStatus;						
-							this.$store.commit('updateStatus',response.data)
-							this.login(response.data);
-							uni.setStorageSync('token',response.data.token)
-							uni.setStorageSync('unionId',response.data.unionId)
-							if(response.data.userIdentity ==1){
-								this.$api.redirectTo('/seller/pages/index/index')
-							}else if(response.data.userIdentity === 3){
-								this.$api.redirectTo('/supplier/pages/index/index')
-							}
-							this.getHomeInformation()
-						})
-						.catch(error =>{
-							this.isLogin = false;
-							this.logout()
-							uni.setStorageSync('unionId',error.data.unionId)
-							this.$store.commit('updateStatus',error.data)
-							this.getHomeInformation()
-						})
-					})
-				})						
-			},
-			async getWxAuthorize(){
+			async GetWxAuthorize(){
 				const wechatCode = await authorize.getCode('weixin');// 根据微信的code获取用户登录状态:1已登录过 -1未登录过
 				const getUserInfo = await authorize.getUserInfo('weixin');
 				this.UserService.UserLoginAuthApplets({ 
@@ -171,7 +137,6 @@
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
 					let data = response.data;
-					this.liveList = data.liveList;
 					this.pageList = data.homePageFloor;
 					this.supplierObj = data.supplierImage;
 					this.isRequest = true;
@@ -204,19 +169,17 @@
 				uni.setStorageSync('lockTime',Date.now())
 				uni.setStorageSync('isActivityStatus',true)	
 			},
-			async InitAuthorize(){ //是否已授权 0:为取消授权 1:为已授权 2:为未操作
-				authorize.checkLogin()
-				.then(res => {
+			InitAuthorize(){ //是否已授权 
+				if(uni.getStorageSync('_WX_State')){
 					this.GetWxAuthorize()
-				})
-				.catch(err => {
+				}else{
 					this.$api.getComStorage('userInfo').then((resolve) =>{
 						this.userID = resolve.userId ? resolve.userId :0;
 						this.getHomeInformation()
 					}).catch(error =>{
 						this.getHomeInformation()
 					})
-				})
+				}
 			}
 		},
 		onPageScroll(e){//实时获取到滚动的值

+ 10 - 12
pages/tabBar/user/user.vue

@@ -152,7 +152,6 @@
 	import upgradeAlert from '@/components/cm-module/modelAlert/upgradeAlert.vue'
 	import authorize from '@/common/config/authorize.js'
 	import { mapState,mapMutations } from 'vuex'
-	import { cancelPrompt } from "@/api/use.js"
 	
 	
 	export default{
@@ -205,7 +204,7 @@
 			
 		},
 		computed: {
-			...mapState(['hasLogin','userInfo'])
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
 		},
 		methods:{
 			getUserInfo(){
@@ -278,28 +277,27 @@
 				})
 			},
 			navigator(url){
-				authorize.checkLogin()
-				.then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					if(this.hasLogin){
 						this.$api.navigateTo(url)
 					}else{
 						this.$api.navigateTo('/pages/login/login?type=0')
 					}
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},	
 			navigatorNex(url,type){
-				authorize.checkLogin()
-				.then(res => {
+				console.log(this.isWxAuthorize)
+				if(uni.getStorageSync('_WX_State')){
 					if(!this.hasLogin){
 						this.$api.navigateTo(url)
 					}
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo(`/pages/authorization/authorization?type=${type}`)
-				})
+				}	
 			},		
 			showBadge(n){
 				let num ='';

+ 20 - 6
pages/user/account/account.vue

@@ -69,7 +69,6 @@
 	import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
 	import tuiNomore from "@/components/tui-components/nomore/nomore"
 	import uniCalendar from '@/components/uni-calendar/uni-calendar.vue'
-	import { accountInfo } from "@/api/use.js"
 	var date = new Date();
 	export default{
 		components: {
@@ -147,8 +146,16 @@
 					  * @param:pageSize(每页条数)
 					  * @param:userId(用户ID)
 					  */ 
-					let params = {year:year,month:month,userId:this.userID,pageNum:1,pageSize:this.pageSize, type:this.balanceType,}
-					accountInfo(params).then(response =>{
+					this.UserService.GetAccountInfo(
+						{
+							year:year,
+							month:month,
+							userId:this.userID,
+							pageNum:1,
+							pageSize:this.pageSize,
+							 type:this.balanceType,
+						})
+						.then(response =>{
 						let infoData = response.data
 						this.initAbleUserMoney(infoData.ableUserMoney)
 						let resultsData = infoData.pageDate.results
@@ -176,9 +183,16 @@
 				})	
 			},	
 			getOnReachBottomData(index,year,month){//上拉加载
-				this.pageNum+=1
-				let params = {year:year,month:month,userId:this.userID,pageNum:this.pageNum,pageSize:this.pageSize,type:this.balanceType}
-				accountInfo(params).then(response =>{
+				this.UserService.GetAccountInfo(
+					{
+						year:year,
+						month:month,
+						userId:this.userID,
+						pageNum:this.pageNum+=1,
+						pageSize:this.pageSize,
+						type:this.balanceType,
+					})
+					.then(response =>{
 					let infoData = response.data
 					this.initAbleUserMoney(infoData.ableUserMoney)
 					let resultsData = infoData.pageDate.results

+ 57 - 28
pages/user/setting/phone.vue

@@ -4,12 +4,12 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">原手机号:</view>
-					<view class="row-input">{{bindMobile}}</view>
+					<view class="row-input">{{ params.mobile }}</view>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
-					<input class="row-input" type="number" v-model="mobileCode" placeholder="请输入原手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
+					<input class="row-input" type="number" v-model="params.smsCode" placeholder="请输入原手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
 				</view>
 				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
 					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
@@ -17,12 +17,12 @@
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
-					<input class="row-input" type="number" v-model="contractMobile" placeholder="请输入新手机号" placeholder-class="place-holder" maxlength="11"/>
+					<input class="row-input" type="number" v-model="params.newMobile" placeholder="请输入新手机号" placeholder-class="place-holder" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
-					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
+					<input class="row-input" type="number" v-model="params.newSmsCode" placeholder="请输入新手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
 				</view>
 				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
 					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
@@ -40,40 +40,57 @@
 
 <script>
 	import { mapMutations } from 'vuex';
-	import { getClubMobileCode,getClubNewMobileCode } from "@/api/utils.js" 
-	import { changeMobile } from "@/api/use.js" 
 	var self;
 	export default{
 		data() {
 			return{
-				userID:'',					//用户ID
 			    count: '',					//倒计时
 			    newCount: '',				//倒计时
 			    codeTime: null,
 			    codeTimeNew: null,
-				bindMobile:'',				//联系人手机号
-				contractMobile:'',			//新联系人手机号
-				mobileCode:'',				//手机号验证码
-				newMobileCode:'',			//新手机号手机验证码
 				mobileCodeText: '获取验证码',
 				newMobileCodeText: '获取验证码',
 				isMobileDisabled: false,	//手机验证码按钮控制
 				isNewMobileDisabled: false,	//手机验证码按钮控制
+				params:{
+					mobile:'',  //旧联系人手机号
+					newMobile:'', //新联系人手机号
+					smsCode:'',   //原手机号验证码
+					newSmsCode:'',//新手机号手机验证码
+					userId:0
+				},
 			}	
 		},
 		onLoad(option) {
-			this.bindMobile = option.phone
+			this.params.mobile = option.phone
 		},
 		methods:{
 			bindMobileCheck(){
-				let params = {
-						contractMobile2:this.bindMobile,
-						contractMobile:this.contractMobile,
-						mobileCode:this.mobileCode,
-						newMobileCode:this.newMobileCode,
-						userID:this.userID
+				if( this.params.newMobile == ''){
+					this.$util.msg('请输入新的手机号码',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.newMobile)){
+					this.$util.msg('请输入正确的手机号码',2000);
+					return
+				}
+				if( this.params.smsCode == ''){
+					this.$util.msg('请输入旧手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.params.smsCode)){
+					this.$util.msg('旧手机验证码格式不正确',2000);
+					return
 				}
-				changeMobile(params).then(response =>{
+				if( this.params.newSmsCode == ''){
+					this.$util.msg('请输入新手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.params.newSmsCode)){
+					this.$util.msg('新手机验证码格式不正确',2000);
+					return
+				}
+				this.UserService.UserUpdateMobile(this.params).then(response =>{
 					this.$util.msg('修改成功',1500,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({delta: 1})
@@ -83,17 +100,23 @@
 				})
 			},
 			getMobileCodeFn(){
-				if( this.bindMobile == ''){
+				if( this.params.mobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.bindMobile)){
+				if(!this.$reg.isMobile(this.params.mobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				let params = { mobile : this.bindMobile }
 				this.isMobileDisabled = true;
-				getClubMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(
+					{
+						mobile:this.params.mobile,
+						isCheckCaptcha:1,
+						activateCodeType:4,
+						platformType:0
+					}
+				).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -117,17 +140,23 @@
 				})
 			},
 			getNewMobileCodeFn(){
-				if( this.contractMobile == ''){
+				if( this.params.newMobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.contractMobile)){
+				if(!this.$reg.isMobile(this.params.newMobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				let params = { newMobile : this.contractMobile }
 				this.isNewMobileDisabled = true;
-				getClubNewMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(
+					{
+						mobile:this.params.newMobile,
+						isCheckCaptcha:1,
+						activateCodeType:5,
+						platformType:0
+					}
+				).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTimeNew) {
@@ -153,7 +182,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userId ? resolve.userId : 0
+				this.params.userId = resolve.userId ? resolve.userId : 0
 			})
 		}
 	}

+ 7 - 4
search/pages/search/search-instrument.vue

@@ -68,14 +68,17 @@
 				total:0
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
 		onLoad(option){
 			if(option.type =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			if(option.keyWord){
 				this.listQuery.keyword = option.keyWord

+ 7 - 4
search/pages/search/search-supplier.vue

@@ -107,14 +107,17 @@
 				total:0
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
 		onLoad(option){
 			if(option.type =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			if(option.keyWord){
 				console.log(option.keyWord)

+ 7 - 4
search/pages/search/search.vue

@@ -209,15 +209,18 @@
 				total:0
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
 		onLoad(option) {
 			console.log(option)
 			if(option.type =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			this.$api.getStorage().then((resolve) =>{
 				this.userID = resolve.userId ? resolve.userId : 0;

+ 1 - 1
second/pages/form/form.vue

@@ -239,7 +239,7 @@
 <script>
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	import authorize from '@/common/config/authorize.js'
 	import $reg from '@/common/config/common.js'
 	import { mapState,mapMutations } from 'vuex';

+ 11 - 8
second/pages/product/product-details.vue

@@ -211,6 +211,9 @@
 				winHeight:''
 			}
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
 		onLoad(option) {
 			this.productID = option.id;//获取商品ID
 			this.isShareType = option.type
@@ -220,12 +223,12 @@
 				this.backPage = option.page
 			}
 			if(this.isShareType =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 		},
 		computed: {
@@ -283,14 +286,14 @@
 
 			},
 			navToLogin(){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.$store.commit('setLoginType',8)
 					this.$store.commit('setLoginProductId',this.productID)
 					this.$api.navigateTo(`/pages/login/login?id=${this.productID}`)
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},
 			setHeaderBtnPosi(){
 				// 获得胶囊按钮位置信息

+ 6 - 7
second/pages/product/product-list.vue

@@ -147,19 +147,18 @@
 			 this.gettabList();
 			 this.isFocus = true;
 		},
+		computed: {
+			...mapState(['hasLogin','userInfo','isWxAuthorize'])
+		},
 		onLoad(option) {
 			if(option.type =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+				}
 			}
 		},
-		computed: {
-			...mapState(['hasLogin','userInfo'])
-		},
 		methods:{
 			scrolltolower() {
 				if(this.hasNextPage && this.pullFlag) {

+ 0 - 2
seller/pages/club/addoperator.vue

@@ -73,8 +73,6 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
-	import { bindingWechat } from "@/api/use.js"
-	import { getbindWechatCode } from "@/api/utils.js"
 	export default{
 		data() {
 			return{

+ 1 - 1
seller/pages/login/apply.vue

@@ -270,7 +270,7 @@
 import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { uploadFileImage } from "@/api/utils.js" 
+	import { uploadFileImage } from "@/services/public.js" 
 	export default{
 		components:{
 			mpvueCityPicker

+ 1 - 1
seller/pages/login/information.vue

@@ -251,7 +251,7 @@
 	import { mapMutations } from 'vuex';
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
-	import { uploadFileImage } from "@/api/utils.js" 
+	import { uploadFileImage } from "@/services/public.js" 
 	export default{
 		components:{
 			mpvueCityPicker

+ 11 - 12
seller/pages/login/login.vue

@@ -54,13 +54,7 @@
 			}
 		},
 		onLoad() {
-			authorize.checkLogin().then(res => {
-				this.getWxAuthorize()
-			})
-			.catch(err => {
-				this.$api.navigateTo('/pages/authorization/authorization')
-				this.isSeller= true
-			})
+			
 		},
 		computed: {
 			...mapState(['isWxAuthorize'])
@@ -101,12 +95,12 @@
 					this.$util.msg('请输入密码',2000)
 					return
 				}
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					this.SellerLogin()
-				})
-				.catch(err => {
+				}else{
+					console.log(new Date +'用户未授权微信信息')
 					this.$api.navigateTo('/pages/authorization/authorization?type=1')
-				})
+				}	
 			},
 			SellerLogin(){
 				this.SellerService.SellerLogin(this.params)
@@ -141,7 +135,12 @@
 			},
 		},
 		onShow() {
-			
+			if(uni.getStorageSync('_WX_State')){
+				this.getWxAuthorize()
+			}else{
+				this.$api.navigateTo('/pages/authorization/authorization')
+				this.isSeller= true
+			}	
 		}
 	}
 </script>

+ 1 - 1
seller/pages/login/register-member.vue

@@ -256,7 +256,7 @@
 	
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import shareModel from '@/components/cm-module/modelAlert/shareModel.vue'			 //分享弹窗
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	export default{
 		components:{
 			shareModel

+ 1 - 1
seller/pages/login/register.vue

@@ -238,7 +238,7 @@
 	import { beautyList,mentuzCampNullList,medicaCampNullList } from '@/common/json/data.json.js' //本地数据
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
 	import authorize from '@/common/config/authorize.js' 
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	var self;
 	export default{
 		components:{

+ 1 - 0
services/ajax.env.js

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

+ 2 - 1
services/config.env.js

@@ -4,7 +4,8 @@ if(process.env.NODE_ENV === 'development'){
     // URL_CONFIG = 'http://192.168.2.75:18002'	 //采美测试地址
 	// URL_CONFIG = 'http://192.168.2.67:18002'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.68:8008'
-	URL_CONFIG = 'https://core-b.caimei365.com'
+	// URL_CONFIG = 'https://core-b.caimei365.com'
+	URL_CONFIG = 'https://core.caimei365.com'
 }else{
     // 生产环境
 	// URL_CONFIG = 'https://core-b.caimei365.com'

+ 59 - 0
services/public.js

@@ -0,0 +1,59 @@
+/**
+ *@des 公共接口
+ *@author zhengjinyi
+ *@date 2020/03/19 14:56:57
+ *@param registerByPass
+ */
+import requestUrl from '@/services/ajax.env.js'
+import request from '@/common/config/caimeiApi.js'
+import $reg from '@/common/config/common.js'
+
+/**
+ * @新分类下的商品列表
+ * @param:tinyTypeID 三级分类ID
+ * @param:pageNum	页码
+ * @param:pageSize	每页显示条数
+ */
+export function searchQueryTinyType(url,params) {
+	return new Promise(function(resolve,reject) {
+		request.lodingGet(url,params, res => {
+			if(res.code == 0){
+				resolve(res);
+			}else{
+				reject(res)
+			}
+		})
+	});
+}
+/**
+ *上传图片
+ */
+export function uploadFileImage() {
+	return new Promise(function(resolve,reject) {
+		uni.chooseImage({
+			count: 1, //默认1
+			sizeType: ['original','compressed'], //可以指定是原图还是压缩图,默认二者都有
+			sourceType: ['album'], //从相册选择
+			success: (res) => {
+				const tempFilePaths = res.tempFilePaths;
+				const uploadTask = uni.uploadFile({
+					url : requestUrl+'/formData/MultiPictareaddData',
+					filePath: tempFilePaths[0],
+					name: 'file',
+					header: {
+					    "Content-Type": "multipart/form-data",
+					},
+					formData: {
+						'user': 'test'
+					},
+					success: function (res) {
+						resolve(res);
+					},
+					error : function(e){
+						reject(res)
+					}
+				})
+			}
+		});
+	});
+}

+ 23 - 0
services/public.service.js

@@ -6,6 +6,16 @@ export default class PublicService {
 		Object.assign(this, { AjaxService })
 		this.name = 'PublicService'
 	}
+	/**
+	 * 获取地址
+	 */
+	GetAllAddressData (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/club/address', 
+			data, 
+			isLoading: true ,
+		})
+	}
 	/**
 	 * 获取图形验证码
 	 * platformType:小程序 2  WWW 0  CRM 1 
@@ -57,6 +67,19 @@ export default class PublicService {
 			isHost:true
 		})
 	}
+	/**
+	 * 获取邮箱短信验证码
+	 * email 	邮箱
+	 * status	1:绑定邮箱,2邮箱注册,3邮箱找回秘密
+	 */
+	GetUserEmailCode (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/user/mail/code', 
+			data, 
+			isLoading: true,
+			isHost:true
+		})
+	}
 	/**
 	 * 获取手机短信验证码
 	 * bindMobile 		机构手机号

+ 44 - 0
services/user.service.js

@@ -132,6 +132,38 @@ export default class UserService {
 			isHost:true
 		})
 	}
+	/**
+	 * 找回密码&修改密码
+	 * @param: mobileOrEmail	手机号或邮箱	
+	 * @param: password			密码
+	 * @param: passwordConfirm	用户确认密码
+	 * @param: smsCode			短信验证码
+	 * @param: status			1:手机号找回,2:邮箱找回
+	*/
+	ModifyMobilePassword (data = {}) {
+		return this.AjaxService.post({ 
+			url:'/user/update/password', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
+	}
+	/**
+	 * 更换手机号
+	 * @param: mobile			原手机号	
+	 * @param: newMobile		新手机号
+	 * @param: smsCode			原手机号验证码
+	 * @param: newSmsCode		新手机号验证码
+	 * @param: userId			用户userId
+	*/
+	UserUpdateMobile (data = {}) {
+		return this.AjaxService.post({ 
+			url:'/user/update/mobile', 
+			data, 
+			isLoading: true ,
+			isHost:true
+		})
+	}
 	/**
 	 * @机构-地址列表
 	 * @param:userId 用户ID(必传),
@@ -180,6 +212,17 @@ export default class UserService {
 			isLoading: false ,
 		})
 	}
+	/**
+	 * @机构-获取账户余额明细
+	 * @param:userId 用户ID(必传),
+	 */
+	GetAccountInfo (data = {}) {
+		return this.AjaxService.get({ 
+			url:'/personalCenter/touchBalance', 
+			data, 
+			isLoading: true ,
+		})
+	}
 	/* 运营人员管理-列表 */
 	QueryOperatorList (data = {}) {
 		return this.AjaxService.get({ 
@@ -212,4 +255,5 @@ export default class UserService {
 			isLoading: true ,
 		})
 	}
+	
 }

+ 1 - 0
store/index.js

@@ -44,6 +44,7 @@ const store = new Vuex.Store({
 			    key: 'wechatUserInfo',
 			    data: provider
 			})
+			uni.setStorageSync('_WX_State',1)
 		},
 		updateStatus(state,provider){
 			let TIME = api.formatDate()

+ 1 - 1
supplier/pages/deliver/add-logistics.vue

@@ -55,7 +55,7 @@
 <script>
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	var isPreviewImg;
 	export default{
 		data() {

+ 4 - 3
supplier/pages/login/bind-operator.vue

@@ -70,7 +70,6 @@
 	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	import wxLogin from "@/common/config/wxLogin.js"
-	import { getbindOperatorCode } from "@/api/utils.js"
 	export default{
 		data() {
 			return{
@@ -140,14 +139,16 @@
 					return
 				}
 				let params = {
-						userId:this.bind_supplierInfo.userId,
 						mobile:this.bindLinkPhone,
+						userId:this.bind_supplierInfo.userId,
 						platformType:2,
+						isCheckCaptcha:0,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 					}
 				this.isMobileDisabled = true;
-				getbindOperatorCode(params).then(res =>{
+				this.PublicService.GetBindMobileCode(params)
+					.then(res =>{
 					const TIME_COUNT = 60;
 					this.$util.msg('验证短信已发送',2000)
 			     	if (!this.codeTime) {

+ 13 - 10
supplier/pages/login/share-info.vue

@@ -7,6 +7,7 @@
 	</view>
 </template>
 <script>
+	import { mapState,mapMutations } from 'vuex'
 	import authorize from '@/common/config/authorize.js' 
 	export default{
 		data() {
@@ -21,6 +22,9 @@
 				authority:'',//用户权限
 			}
 		},
+		computed: {
+			...mapState(['isWxAuthorize'])
+		},
 		onLoad(option) {
 			// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
 			console.log(option);
@@ -35,15 +39,14 @@
 					this.source = 3
 				}
 			}
-			authorize.checkLogin().then(res => {
+			if(uni.getStorageSync('_WX_State')){
+				this.infoMiniShipments();
+			}else{
 				this.$api.navigateTo('/pages/authorization/authorization?type=4')
 				setTimeout(()=>{
 					this.isRequest = true
 				},2000)
-			})
-			.catch(err => {
-				this.infoMiniShipments();
-			})
+			}	
 		},
 		methods:{
 			infoMiniShipments(){
@@ -87,13 +90,13 @@
 			}
 		},
 		onShow() {
-			authorize.checkLogin().then(res => {
+			if(uni.getStorageSync('_WX_State')){
 				this.isRequest = false;
 				this.infoMiniShipments();
-			})
-			.catch(err => {
-				console.log('用户未授权')
-			})
+			}else{
+				console.log(new Date +'用户未授权微信信息')
+				this.$api.navigateTo('/pages/authorization/authorization')
+			}	
 		}
 	}
 </script>

+ 1 - 1
supplier/pages/user/information.vue

@@ -251,7 +251,7 @@
 
 <script>
 	import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
-	import { uploadFileImage } from "@/api/utils.js"
+	import { uploadFileImage } from "@/services/public.js"
 	import { mapState,mapMutations } from 'vuex';
 	export default{
 		name:'information',

+ 7 - 4
supplier/pages/user/my-shop.vue

@@ -272,14 +272,17 @@
 				total:0
 			}
 		},
+		computed: {
+			...mapState(['isWxAuthorize'])
+		},
 		onLoad(option) {
 			if(option.type =='share'){
-				authorize.checkLogin().then(res => {
+				if(uni.getStorageSync('_WX_State')){
 					wxLogin.wxLoginAuthorize()
-				})
-				.catch(err => {
+				}else{
 					console.log(new Date +'用户未授权微信信息')
-				})
+					this.$api.navigateTo('/pages/authorization/authorization')
+				}	
 			}
 			this.listQuery.id = this.supplierId = option.shopId
 			this.$api.getStorage().then((resolve) =>{

+ 101 - 45
supplier/pages/user/setting/password.vue

@@ -17,7 +17,7 @@
 		<view class="content" v-if="tabCurrentIndex === 1">
 			<view class="login-form clearfix">
 				<view class="login-input">
-					<input type="number" v-model="mobile"  maxlength="11" class="input" placeholder="请输入手机号" placeholder-class="placeholder"/>
+					<input type="number" v-model="phoneParams.mobileOrEmail"  maxlength="11" class="input" placeholder="请输入手机号" placeholder-class="placeholder"/>
 				</view>
 			</view>
 			<view class="login-form clearfix">
@@ -36,7 +36,7 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input code">
-					<input type="number" v-model="mobileCode"  maxlength="6" class="input" placeholder="请输入短信验证码"  placeholder-class="placeholder"/>
+					<input type="number" v-model="phoneParams.smsCode"  maxlength="6" class="input" placeholder="请输入短信验证码"  placeholder-class="placeholder"/>
 				</view>
 				<view class="login-input btn" :class="[isMobileDisabled  ? 'disabled' : '']" >
 					<button type="button"
@@ -49,15 +49,15 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEye" type="text" v-model="password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEye" type="text" v-model="phoneParams.password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEye" type="password" v-model="phoneParams.password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEye ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEye"></view>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEyes" type="text" v-model="phoneParams.passwordConfirm"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEyes" type="password" v-model="phoneParams.passwordConfirm"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEyes ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEyes"></view>
 				</view>
 			</view>
@@ -69,12 +69,12 @@
 		<view class="content" v-else>
 			<view class="login-form clearfix">
 				<view class="login-input">
-					<input class="input" type="text" v-model="email"  maxlength="30" placeholder="请输入邮箱地址"  placeholder-class="placeholder"/>
+					<input class="input" type="text" v-model="emailParams.mobileOrEmail"  maxlength="30" placeholder="请输入邮箱地址"  placeholder-class="placeholder"/>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input code">
-					<input class="input" type="number" v-model="emailCode" maxlength="4"  placeholder="请输入邮箱验证码"  placeholder-class="placeholder"/>
+					<input class="input" type="number" v-model="emailParams.smsCode" maxlength="6"  placeholder="请输入邮箱验证码"  placeholder-class="placeholder"/>
 				</view>
 				<view class="login-input btn" :class="[isEmialDisabled ? 'disabled' : '']">
 					<button class="input"  
@@ -87,15 +87,15 @@
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEye" type="text" v-model="password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEye" type="password" v-model="password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEye" type="text" v-model="emailParams.password"  maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEye" type="password" v-model="emailParams.password"  :password="true" maxlength="16" class="input" placeholder="请输入新密码,必须为8-16位字母数字的组合" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEye ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEye"></view>
 				</view>
 			</view>
 			<view class="login-form clearfix">
 				<view class="login-input pwd">
-					<input v-show="isShowEyes" type="text" v-model="passwordCheck"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
-					<input v-show="!isShowEyes" type="password" v-model="passwordCheck"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="isShowEyes" type="text" v-model="emailParams.passwordConfirm"  maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
+					<input v-show="!isShowEyes" type="password" v-model="emailParams.passwordConfirm"  :password="true" maxlength="16" class="input" placeholder="请确认密码" autocomplete="new-password"  placeholder-class="placeholder"/>
 					<view class="iconfont" :class="isShowEyes ? 'icon-kejian1' : 'icon-bukejian'"  @click="passwordEyes"></view>
 				</view>
 			</view>
@@ -108,19 +108,11 @@
 
 <script>
 	import authorize from '@/common/config/authorize.js' 
-	import { mobilePassword , emailPassword } from "@/api/use.js"
-	import { getEmailCode } from "@/api/utils.js"
 	
 	export default{
 		data() {
 			return{
 				tabCurrentIndex: 1,
-				mobile:'',  		//用户手机号
-				email:'',			//邮箱地址
-				emailCode:'',		//油箱验证码
-				mobileCode:'',  	//手机验证码
-				password:'',		//新密码
-				passwordCheck:'',   //二次校验新密码
 				isShowEye:false,	//控显
 				isShowEyes:false,	//控显
 				iconEyes:'icon-yanjing_yincang_o',
@@ -134,6 +126,20 @@
 				emailCodeText: '获取验证码',
 				mobileCodeText: '获取验证码',
 				codeTime: null,
+				phoneParams: {
+					mobileOrEmail :'',
+					smsCode : '',
+					password : '',
+					passwordConfirm : '',
+					status:1
+				},
+				emailParams: {
+					mobileOrEmail :'',
+					smsCode : '',
+					password : '',
+					passwordConfirm : '',
+					status:2
+				},
 			}
 		},
 		onLoad(option) {
@@ -141,15 +147,40 @@
 		},
 		methods:{
 			confirmMobilePassword(){//手机号修改
-				let params = {
-						mobileOrEmail : this.mobile,
-						activateCode : this.mobileCode,
-						passWord : this.password,
-						confirmPwd : this.passwordCheck,
-						status:1
-					}
-				mobilePassword(params).then(res =>{
-					this.$util.msg(res.msg,2000);
+				if( this.phoneParams.mobileOrEmail == ''){
+					this.$util.msg('请输入手机号',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.phoneParams.mobileOrEmail)){
+					this.$util.msg('手机格式不正确',2000);
+					return
+				}
+				if( this.phoneParams.smsCode == ''){
+					this.$util.msg('请输入手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.phoneParams.smsCode)){
+					this.$util.msg('验证码格式不正确',2000);
+					return
+				}
+				if( this.phoneParams.password == ''){
+					this.$util.msg('请输入密码',2000);
+					return
+				}
+				if(!this.$reg.checkPwd(this.phoneParams.password)){
+					this.$util.msg('密码必须为8-16位字母数字的组合',2000);
+					return
+				}
+				if( this.phoneParams.passwordConfirm == ''){
+					this.$util.msg('请再次确认密码',2000);
+					return
+				}
+				if( this.phoneParams.passwordConfirm !== this.phoneParams.password){
+					this.$util.msg('两次输入的密码不一致',2000);
+					return
+				}
+				this.UserService.ModifyMobilePassword(this.phoneParams).then(res =>{
+					this.$util.msg(res.msg,2000,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({
 							delta: 1
@@ -160,15 +191,40 @@
 				})
 			},
 			confirmEmailPassword(){//邮箱修改密码
-				 let params = {
-						mobileOrEmail : this.email,
-						activateCode : this.emailCode,
-						passWord : this.password,
-						confirmPwd : this.passwordCheck,
-						status:2
-					}
-				emailPassword(params).then(res =>{
-					this.$util.msg(res.msg,2000);
+				 if( this.emailParams.mobileOrEmail == ''){
+					this.$util.msg('请输入邮箱',2000);
+				 	return
+				 }
+				 if(!this.$reg.isEmail(this.emailParams.mobileOrEmail)){
+					this.$util.msg('请输入正确的邮箱地址',2000);
+				 	return
+				 }
+				 if( this.emailParams.smsCode == ''){
+					this.$util.msg('请输入邮箱验证码',2000);
+				 	return
+				 }
+				 if(!this.$reg.isMobileCode(this.emailParams.smsCode)){
+					this.$util.msg('验证码格式不正确',2000);
+				 	return
+				 }
+				 if( this.emailParams.password == ''){
+					this.$util.msg('请输入密码',2000);
+				 	return
+				 }
+				 if(!this.$reg.checkPwd(this.emailParams.password)){
+					this.$util.msg('密码必须为8-16位字母数字的组合',2000);
+				 	return
+				 }
+				 if( this.emailParams.passwordConfirm == ''){
+					this.$util.msg('请再次确认密码',2000);
+				 	return
+				 }
+				 if( this.emailParams.passwordConfirm !== this.emailParams.password){
+					this.$util.msg('两次输入的密码不一致',2000);
+				 	return
+				 }
+				this.UserService.ModifyMobilePassword(this.emailParams).then(res =>{
+					this.$util.msg(res.msg,2000,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({
 							delta: 1
@@ -185,16 +241,16 @@
 				})
 			},
 			getEmailCodeFn(){//获取邮箱验证码
-				if( this.email == ''){
+				if( this.emailParams.mobileOrEmail == ''){
 					this.$util.msg('请输入邮箱地址',2000);
 					return
 				}
-				if(!this.$reg.isEmail(this.email)){
+				if(!this.$reg.isEmail(this.emailParams.mobileOrEmail)){
 					this.$util.msg('请输入正确的邮箱地址',2000);
 					return
 				}
 				this.isEmialDisabled = true;
-				getEmailCode({email:this.email,status:3}).then(res =>{
+				this.PublicService.GetUserEmailCode({email:this.emailParams.mobileOrEmail,status:3}).then(res =>{
 					this.$util.msg('邮箱验证码已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -218,11 +274,11 @@
 				})
 			},
 			getMobileCodeFn(){//获取手机验证码
-				if( this.mobile == ''){
+				if( this.phoneParams.mobileOrEmail == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.mobile)){
+				if(!this.$reg.isMobile(this.phoneParams.mobileOrEmail)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
@@ -231,14 +287,14 @@
 					return
 				}
 				let params = {
-						mobile:this.mobile,
+						mobile:this.phoneParams.mobileOrEmail,
 						activateCodeType:1,
 						platformType:2,
 						imgCode:this.imageCode,
 						token:this.imageCodetoken,
 					}
 				this.isMobileDisabled = true;
-				this.PublicService.GetMobileCode(params).then(res =>{
+				this.PublicService.GetRegisterMobileCode(params).then(res =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {

+ 57 - 28
supplier/pages/user/setting/phone.vue

@@ -4,12 +4,12 @@
 			<view class="register-row clearfix">
 				<view class="register-from">
 					<view class="label">原手机号:</view>
-					<view class="row-input">{{bindMobile}}</view>
+					<view class="row-input">{{ params.mobile }}</view>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
-					<input class="row-input" type="number" v-model="mobileCode" placeholder="请输入原手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
+					<input class="row-input" type="number" v-model="params.smsCode" placeholder="请输入原手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
 				</view>
 				<view class="register-from btn" :class="[isMobileDisabled  ? 'disabled' : '']">
 					<button class="row-input"  type="button" @click.stop="getMobileCodeFn" :disabled="isMobileDisabled">{{ mobileCodeText }}</button>
@@ -17,12 +17,12 @@
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from">
-					<input class="row-input" type="number" v-model="contractMobile" placeholder="请输入新手机号" placeholder-class="place-holder" maxlength="11"/>
+					<input class="row-input" type="number" v-model="params.newMobile" placeholder="请输入新手机号" placeholder-class="place-holder" maxlength="11"/>
 				</view>
 			</view>
 			<view class="register-row clearfix">
 				<view class="register-from code">
-					<input class="row-input" type="number" v-model="newMobileCode" placeholder="请输入新手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
+					<input class="row-input" type="number" v-model="params.newSmsCode" placeholder="请输入新手机号的验证码" placeholder-class="place-holder" maxlength="6"/>
 				</view>
 				<view class="register-from btn" :class="[isNewMobileDisabled  ? 'disabled' : '']" >
 					<button class="row-input"  type="button" @click.stop="getNewMobileCodeFn" :disabled="isNewMobileDisabled">{{ newMobileCodeText }}</button>
@@ -40,40 +40,57 @@
 
 <script>
 	import { mapMutations } from 'vuex';
-	import { getClubMobileCode,getClubNewMobileCode } from "@/api/utils.js" 
-	import { changeMobile } from "@/api/use.js" 
 	var self;
 	export default{
 		data() {
 			return{
-				userID:'',					//用户ID
 			    count: '',					//倒计时
 			    newCount: '',				//倒计时
 			    codeTime: null,
 			    codeTimeNew: null,
-				bindMobile:'',				//联系人手机号
-				contractMobile:'',			//新联系人手机号
-				mobileCode:'',				//手机号验证码
-				newMobileCode:'',			//新手机号手机验证码
 				mobileCodeText: '获取验证码',
 				newMobileCodeText: '获取验证码',
 				isMobileDisabled: false,	//手机验证码按钮控制
 				isNewMobileDisabled: false,	//手机验证码按钮控制
+				params:{
+					mobile:'',  //旧联系人手机号
+					newMobile:'', //新联系人手机号
+					smsCode:'',   //原手机号验证码
+					newSmsCode:'',//新手机号手机验证码
+					userId:0
+				},
 			}	
 		},
 		onLoad(option) {
-			this.bindMobile = option.phone
+			this.params.mobile = option.phone
 		},
 		methods:{
 			bindMobileCheck(){
-				let params = {
-						contractMobile2:this.bindMobile,
-						contractMobile:this.contractMobile,
-						mobileCode:this.mobileCode,
-						newMobileCode:this.newMobileCode,
-						userID:this.userID
+				if( this.params.newMobile == ''){
+					this.$util.msg('请输入新的手机号码',2000);
+					return
+				}
+				if(!this.$reg.isMobile(this.params.newMobile)){
+					this.$util.msg('请输入正确的手机号码',2000);
+					return
+				}
+				if( this.params.smsCode == ''){
+					this.$util.msg('请输入旧手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.params.smsCode)){
+					this.$util.msg('旧手机验证码格式不正确',2000);
+					return
 				}
-				changeMobile(params).then(response =>{
+				if( this.params.newSmsCode == ''){
+					this.$util.msg('请输入新手机验证码',2000);
+					return
+				}
+				if(!this.$reg.isMobileCode(this.params.newSmsCode)){
+					this.$util.msg('新手机验证码格式不正确',2000);
+					return
+				}
+				this.UserService.UserUpdateMobile(this.params).then(response =>{
 					this.$util.msg('修改成功',1500,true,'success')
 					setTimeout(()=>{
 						uni.navigateBack({delta: 1})
@@ -83,17 +100,23 @@
 				})
 			},
 			getMobileCodeFn(){
-				if( this.bindMobile == ''){
+				if( this.params.mobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.bindMobile)){
+				if(!this.$reg.isMobile(this.params.mobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				let params = { mobile : this.bindMobile }
 				this.isMobileDisabled = true;
-				getClubMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(
+					{
+						mobile:this.params.mobile,
+						isCheckCaptcha:1,
+						activateCodeType:4,
+						platformType:0
+					}
+				).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTime) {
@@ -117,17 +140,23 @@
 				})
 			},
 			getNewMobileCodeFn(){
-				if( this.contractMobile == ''){
+				if( this.params.newMobile == ''){
 					this.$util.msg('请输入手机号',2000);
 					return
 				}
-				if(!this.$reg.isMobile(this.contractMobile)){
+				if(!this.$reg.isMobile(this.params.newMobile)){
 					this.$util.msg('请输入正确的手机号',2000);
 					return
 				}
-				let params = { newMobile : this.contractMobile }
 				this.isNewMobileDisabled = true;
-				getClubNewMobileCode(params).then(response =>{
+				this.PublicService.GetRegisterMobileCode(
+					{
+						mobile:this.params.newMobile,
+						isCheckCaptcha:1,
+						activateCodeType:5,
+						platformType:0
+					}
+				).then(response =>{
 					this.$util.msg('验证短信已发送',2000);
 					const TIME_COUNT = 60;
 			     	if (!this.codeTimeNew) {
@@ -153,7 +182,7 @@
 		},
 		onShow() {
 			this.$api.getStorage().then((resolve) =>{
-				this.userID = resolve.userId ? resolve.userId : 0
+				this.params.userId = resolve.userId ? resolve.userId : 0
 			})
 		}
 	}