Browse Source

Merge branch 'developer' of http://git.caimei365.com/zhengjinyi/caimei-applets-mcare into developer

xiebaomin 2 years ago
parent
commit
4ef6aa73b1

+ 20 - 16
components/cm-module/modelAlert/shareAlert.vue

@@ -2,11 +2,13 @@
 	<view class="alert spec" :class="specClass">
 	<view class="alert spec" :class="specClass">
 		<view class="model-warp">
 		<view class="model-warp">
 			<view class="content">
 			<view class="content">
+				<view class="title-image">
+					<image :src="staticUrl + 'icon_share_modal@2x.png'" mode=""></image>
+				</view>
 				<view class="text-content">
 				<view class="text-content">
-					<view class="title">分享订单</view>
 					<view class="share">您的分享码:<text class="txt">{{shareCode}}</text></view>
 					<view class="share">您的分享码:<text class="txt">{{shareCode}}</text></view>
 					<view class="text">
 					<view class="text">
-						<text>有效期为24小时。如果对方不是您机构的运营人员,需要输入该分享码才能查看本订单</text>
+						<text>有效期为24小时。需要输入该分享码才能查看本订单</text>
 					</view>
 					</view>
 				</view>				
 				</view>				
 				<view class="alert-btn">
 				<view class="alert-btn">
@@ -31,6 +33,7 @@
 		data() {
 		data() {
 			return{
 			return{
 				shareCode:'',
 				shareCode:'',
+				staticUrl: this.global.staticUrl,
 			}
 			}
 		},
 		},
 		created() {
 		created() {
@@ -80,8 +83,8 @@
 			display: block;
 			display: block;
 		}
 		}
 		.content{
 		.content{
-			width: 518rpx;
-			height: 418rpx;
+			width: 580rpx;
+			height: 540rpx;
 			position: absolute;
 			position: absolute;
 			background: $bg-color;
 			background: $bg-color;
 			left: 0;
 			left: 0;
@@ -90,19 +93,20 @@
 			top: 0;
 			top: 0;
 			margin: auto;
 			margin: auto;
 			border-radius: 24rpx;
 			border-radius: 24rpx;
+			.title-image{
+				width: 580rpx;
+				height: 210rpx;
+				image{
+					width: 580rpx;
+					height: 210rpx;
+					display: block;
+				}
+			}
 			.text-content{
 			.text-content{
-				width: 448rpx;
-				height: 264rpx;
+				width: 580rpx;
+				height: auto;
 				padding: 20rpx 35rpx;
 				padding: 20rpx 35rpx;
-				float: left;
-				.title{
-					line-height: 40rpx;
-					font-size: $font-size-28;
-					color: $text-color;
-					text-align: center;
-					font-weight: bold;
-					margin-bottom: 36rpx;
-				}
+				box-sizing: border-box;
 				.share{
 				.share{
 					line-height: 36rpx;
 					line-height: 36rpx;
 					font-size: $font-size-26;
 					font-size: $font-size-26;
@@ -127,7 +131,7 @@
 				width: 80%;
 				width: 80%;
 				height: 70rpx;
 				height: 70rpx;
 				display: flex;
 				display: flex;
-				margin: 0 auto;
+				margin: 15rpx auto;
 				.btn{
 				.btn{
 					flex: 1;
 					flex: 1;
 					line-height: 70rpx;
 					line-height: 70rpx;

+ 1 - 7
components/cm-module/orderDetails/orderButton.vue

@@ -5,7 +5,7 @@
 			<!-- <view class="btn btn-payment" v-if="order.affirmPaymentFlag == 10" @click.stop="btnConfirm('payment',order)">确认打款<text>供应商</text></view> -->
 			<!-- <view class="btn btn-payment" v-if="order.affirmPaymentFlag == 10" @click.stop="btnConfirm('payment',order)">确认打款<text>供应商</text></view> -->
 			<!-- <view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
 			<!-- <view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
-			<view class="btn btn-upload" v-if="btnState.isUpload" @click.stop="btnConfirm('pay',order)">上传凭证</view>
+			<view class="btn btn-cancel" v-if="btnState.isUpload" @click.stop="btnConfirm('upload',order)">上传凭证</view>
 			<view class="btn btn-share" @click.stop="onShareCode">
 			<view class="btn btn-share" @click.stop="onShareCode">
 				<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
 				<view class="tips" v-if="shareCode">分享码:{{shareCode}}</view>
 				分享订单
 				分享订单
@@ -175,12 +175,6 @@
 				border: 2rpx solid $btn-confirm;
 				border: 2rpx solid $btn-confirm;
 				color: #fff;
 				color: #fff;
 			}
 			}
-			.btn-upload{
-				background:#0ABC64;
-				margin-right: 0;
-				border: 2rpx solid #0ABC64;
-				color: #fff;
-			}
 			.btn-firm{
 			.btn-firm{
 				position:relative;
 				position:relative;
 				.tips{
 				.tips{

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

@@ -3,7 +3,7 @@
 		<!-- 底部按钮 -->
 		<!-- 底部按钮 -->
 		<view class="button-content">
 		<view class="button-content">
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
 			<view class="btn btn-pay" v-if="btnState.isPay" @click.stop="btnConfirm('pay',order)">付款</view>
-			<view class="btn btn-upload" v-if="btnState.isUpload" @click.stop="btnConfirm('pay',order)">上传凭证</view>
+			<view class="btn btn-cancel" v-if="btnState.isUpload" @click.stop="btnConfirm('upload',order)">上传凭证</view>
 			<!-- <view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
 			<!-- <view class="btn btn-confirm" v-if="btnState.isConfirmation" @click.stop="btnConfirm('confirmation',order)">确认订单</view> -->
 			<view class="btn btn-share"  @click.stop="onShareCode(order.orderId)">分享订单</view>
 			<view class="btn btn-share"  @click.stop="onShareCode(order.orderId)">分享订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
 			<view class="btn btn-cancel" v-if="btnState.isCancel" @click.stop="btnConfirm('cancel',order)">取消订单</view>
@@ -181,12 +181,6 @@
 				border: 2rpx solid $btn-confirm;
 				border: 2rpx solid $btn-confirm;
 				color: #fff;
 				color: #fff;
 			}
 			}
-			.btn-upload{
-				background:#0ABC64;
-				margin-right: 0;
-				border: 2rpx solid #0ABC64;
-				color: #fff;
-			}
 			.btn-firm{
 			.btn-firm{
 				position:relative;
 				position:relative;
 				.tips{
 				.tips{

+ 6 - 0
pages.json

@@ -204,6 +204,12 @@
 						"navigationStyle": "custom"
 						"navigationStyle": "custom"
 					}
 					}
 				},
 				},
+				{
+					"path": "order/order-addpay",
+					"style": {
+						"navigationBarTitleText": "上传支付凭证"
+					}
+				},
 				{
 				{
 					"path": "order/order-sharedetails",
 					"path": "order/order-sharedetails",
 					"style": {
 					"style": {

+ 6 - 6
pages/goods/components/cm-unit-popup.vue

@@ -25,9 +25,9 @@
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="sku-unit-nunbox">
 					<view class="sku-unit-nunbox">
-						<view class="sku-unit-nunbox" v-if="skuProduct.step === 2">
+<!-- 						<view class="sku-unit-nunbox" v-if="skuProduct.step === 2">
 							<view class="text">*该商品只能以起订量的整数倍购买</view>
 							<view class="text">*该商品只能以起订量的整数倍购买</view>
-						</view>
+						</view> -->
 						<view class="sku-unit-nunbox-t">
 						<view class="sku-unit-nunbox-t">
 							<view class="sku-unit-nunbox-text">购买数量:</view>
 							<view class="sku-unit-nunbox-text">购买数量:</view>
 							<view class="sku-unit-nunbox-num">
 							<view class="sku-unit-nunbox-num">
@@ -164,10 +164,10 @@ export default {
 			this.productCount = this.skuList[0].minBuyNumber
 			this.productCount = this.skuList[0].minBuyNumber
 			this.handleMinNumber = this.skuList[0].minBuyNumber
 			this.handleMinNumber = this.skuList[0].minBuyNumber
 			this.handleStock = this.skuList[0].stock
 			this.handleStock = this.skuList[0].stock
-			if (this.skuList[0].ladderPriceList) {
-				this.isShowLadder = true
-				this.ladderPriceList = this.skuList[0].ladderPriceList
-			}
+			// if (this.skuList[0].ladderPriceList) {
+			// 	this.isShowLadder = true
+			// 	this.ladderPriceList = this.skuList[0].ladderPriceList
+			// }
 		},
 		},
 		//popup弹窗数量增加按钮
 		//popup弹窗数量增加按钮
 		changeCountAdd() {
 		changeCountAdd() {

+ 1 - 1
pages/tabBar/home/index.vue

@@ -61,7 +61,7 @@ export default {
 			// 来自页面内转发按钮
 			// 来自页面内转发按钮
 		}
 		}
 		return {
 		return {
-			title: '生美医美正品采购服务平台',
+			title: '联合丽格集采商城',
 			path: 'pages/tabBar/home/index',
 			path: 'pages/tabBar/home/index',
 			imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
 			imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
 		}
 		}

+ 219 - 0
pages/user/order/order-addpay.vue

@@ -0,0 +1,219 @@
+<template>
+	<view class="container qualifications">
+		<view class="qualifications-content">
+			<view class="list-view-title"><text class="none">*</text>支付凭证图片:</view>
+			<view class="list-view-upload clearfix">
+				<view class="photo-item" v-for="(item, imageIndex) in imageList" :key="imageIndex">
+					<image :src="item" mode="aspectFill" @click.stop="previewImg(item)"></image>
+					<text class="iconfont icon-iconfontguanbi" @click.stop="deletePhotoFn(imageIndex)"></text>
+				</view>
+				<view class="photo-item add" @click.stop="uploadPhotoFn" v-if="imageList.length<5 || imageList.length == 0">
+					<text class="iconfont icon-jiahao"></text>
+				</view>
+			</view>
+			<view class="list-view-title">备注:</view>
+			<view class="list-view-text">
+				<textarea class="textarea" v-model="params.remarks" placeholder="请输入备注信息" />
+			</view>
+		</view>
+		<view class="card-mains-btn">
+			<button
+				class="add-btn"
+				:disabled="disabled"
+				:class="[disabled ? 'disabled' : '']"
+				@click="orderInsertVoucher"
+			>
+				提交
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { mapState,mapMutations } from 'vuex'
+	import { uploadFileImage  } from '@/services/public.js'
+	export default{
+		data() {
+			return{
+				isIphoneX:this.$store.state.isIphoneX,
+				isPreviewImg:false,
+				imageList:[],
+				params:{
+					id:0,
+					orderId:0,
+					remarks:'',
+					voucherImgs:''
+				},
+			}
+		},
+		onLoad(option) {
+			console.log(option)
+			this.params.orderId = option.orderId
+		},
+		computed: {
+			disabled() {
+				return !(this.imageList.length > 0)
+			}
+		},
+		methods:{
+			async orderInsertVoucher(){
+				try{
+					this.params.voucherImgs = this.imageList.join('##')
+					console.log('params',this.params)
+					const res = await this.OrderService.orderInsertVoucher(this.params)
+					this.$util.msg('保存成功', 2000, true, 'success')
+					setTimeout(()=>{
+						this.$api.navigateBack(1)
+					},2000)
+				}catch(error){
+					console.log('error',error)
+				}
+			},
+			async uploadPhotoFn(){//添加图片
+				try{
+					const res = await uploadFileImage()
+					const data = JSON.parse(res.data).data
+					this.imageList.push(data)
+					console.log('imageList',this.imageList)
+				}catch(e){
+					console.log('1111111111')
+				}
+			},
+			deletePhotoFn(index){//删除图片
+				this.imageList.splice(index, 1)
+			},
+			previewImg (image) {//顶部商品图片预览
+				this.isPreviewImage = true
+				let urls = []
+				urls.push(image)
+				uni.previewImage({
+					urls: urls,
+					current: 0
+				})
+			},
+		},
+		onShow() {
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+page {
+	height: auto;
+	background:#FFFFFF;
+}
+.qualifications-content{
+	width: 100%;
+	height: auto;
+	box-sizing: border-box;
+	padding: 0 24rpx;
+	.list-view-title{
+		width: 100%;
+		height: 92rpx;
+		line-height: 92rpx;
+		font-size: $font-size-30;
+		color: #333333;
+		text-align: left;
+		.none{
+			color: #F85050;
+		}
+	}
+	.list-view-text{
+		width: 100%;
+		height: 216rpx;
+		box-sizing: border-box;
+		border: 1px solid #e1e1e1;
+		padding: 20rpx;
+		border-radius: 6rpx;
+		.textarea{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.list-view-upload{
+		width: 100%;
+		height: auto;	
+		padding: 10rpx 0;
+		.photo-item{
+			display: inline-block;
+			width: 150rpx;
+			height: 150rpx;
+			margin: 10rpx 0;
+			margin-right: 25rpx;
+			border-radius: 10rpx;
+			border:1px dashed #B8BFCA;
+			position: relative;
+			float: left;
+			&.add{
+				width: 150rpx;
+				height: 150rpx;
+				border-color: #b2b2b2;
+				text-align: center;
+				line-height: 150rpx;
+				margin-right: 0rpx;
+				.icon-jiahao{
+					font-size: $font-size-44;
+					color:#b2b2b2 ;
+					font-weight: bold;
+				}
+			}
+			.icon-iconfontguanbi{
+				width: 30rpx;
+				height: 30rpx;
+				border-radius:50%;
+				display: block;
+				position: absolute;
+				right: -10rpx;
+				top: -10rpx;
+				background: #f94b4b;
+				text-align: center;
+				line-height: 30rpx;
+				color: #FFFFFF;
+				font-size: $font-size-22;
+			}
+			image{
+				width: 100%;
+				height: 100%;
+				border-radius: 10rpx;
+				display: block;
+			}
+		}	
+		.photo-list{
+			width: 100%;
+			height: 116rpx;
+			overflow: hidden;
+			white-space: nowrap;
+			display: flex;
+			align-items: flex-start;
+		}
+		.scoll-wrapper{
+			display:flex;
+			align-items: flex-start;
+		}
+	}
+}
+.card-mains-btn {
+	width: 100%;
+	height: auto;
+	box-sizing: border-box;
+	padding: 0 75rpx;
+	margin-top: 180rpx;
+	.add-btn {
+		width: 100%;
+		height: 90rpx;
+		font-size: $font-size-30;
+		line-height: 90rpx;
+		color: #ffffff;
+		text-align: center;
+		background: $btn-confirm;
+		border-radius: 45rpx;
+		border-radius: 44rpx;
+		margin-top: 80rpx;
+		&.disabled {
+			background: #e1e1e1;
+			border-radius: 44rpx;
+		}
+	}
+}
+</style>

+ 4 - 1
pages/user/order/order-details.vue

@@ -95,7 +95,7 @@ export default {
 	},
 	},
 	data() {
 	data() {
 		return {
 		return {
-			skeletonShow:false,
+			skeletonShow: false,
 			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 			headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
 			systeminfo: this.setSysteminfo(), //获取设备信息
 			systeminfo: this.setSysteminfo(), //获取设备信息
 			isIphoneX: this.$store.state.isIphoneX,
 			isIphoneX: this.$store.state.isIphoneX,
@@ -237,6 +237,9 @@ export default {
 				case 'query':
 				case 'query':
 					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.orderId)
 					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.orderId)
 					break
 					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.orderId)
+					break
 				case 'confirm':
 				case 'confirm':
 					//确认收货
 					//确认收货
 					this.modal = true
 					this.modal = true

+ 3 - 0
pages/user/order/order-list.vue

@@ -407,6 +407,9 @@ export default {
 				case 'query':
 				case 'query':
 					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.handleOrderId)
 					this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + this.handleOrderId)
 					break
 					break
+				case 'upload':
+					this.$api.navigateTo('/pages/user/order/order-addpay?orderId=' + this.handleOrderId)
+					break
 				case 'confirm':
 				case 'confirm':
 					//确认收货
 					//确认收货
 					this.modal = true
 					this.modal = true

+ 114 - 71
pages/user/order/order-sharelogin.vue

@@ -1,31 +1,52 @@
 <template>
 <template>
-	<view class="container login" v-if="isShareStatus">
-		<view class="container-main clearfix">
-			<view class="main-title">此订单包含如下商品:</view>
-			<view class="main-list clearfix">
-				<view class="main-list-item" v-for="(item, index) in productList" :key="index">
-					<view class="item-image"> <image :src="item.image" mode="scaleToFill"></image> </view>
-					<view class="item-mesage">
-						<view class="item-name">{{ item.name }}</view>
-						<view class="item-num"><text>X</text>{{ item.num }}</view>
+	<view class="container login">
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="5"
+		></tui-skeleton>
+		<template v-else>
+			<view class="container-main clearfix">
+				<view class="main-title">此订单包含如下商品:</view>
+				<view class="main-list clearfix">
+					<view class="main-list-item" v-for="(item, index) in productList" :key="index">
+						<view class="item-image"> <image :src="item.image" mode="scaleToFill"></image> </view>
+						<view class="item-mesage">
+							<view class="item-name">{{ item.name }}</view>
+							<view class="item-num"><text>X</text>{{ item.num }}</view>
+						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-		</view>
-		<view class="container-footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
-			<view class="login-btn" v-if="btnState.isPay" @click.stop="btnConfirmPay">立即支付</view>
-			<view class="login-sub">
-				<view class="btn" @click.stop="goLogin(1)">账号登录查看</view>
-				<view class="btn" @click.stop="goLogin(2)">使用分享码查看</view>
-			</view>
-			<view class="pay-statustext">
-				<view class="pay-statustext-inner">
-					<view class="pay-text">
-						<text>使用账号登录支持确认订单和直接付款,使用分享码只支持查看订单,不能操作</text>
+			<view class="container-footer" :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }">
+				<view class="login-btn" v-if="btnState.isPay" @click.stop="btnConfirmPay">立即支付</view>
+				<view class="login-sub">
+					<view class="btn" @click.stop="goLogin(1)">账号登录查看</view>
+					<view class="btn" @click.stop="goLogin(2)">使用分享码查看</view>
+				</view>
+				<view class="pay-statustext">
+					<view class="pay-statustext-inner">
+						<view class="pay-text">
+							<text>使用账号登录支持确认订单和直接付款,使用分享码只支持查看订单,不能操作</text>
+						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-		</view>
+		</template>
+		<!-- 提示弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		>
+		</tui-modal>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
@@ -36,7 +57,7 @@ export default {
 			isIphoneX: this.$store.state.isIphoneX,
 			isIphoneX: this.$store.state.isIphoneX,
 			shareCode: '', //获取用户登录的邀请码
 			shareCode: '', //获取用户登录的邀请码
 			isUserInfo: false, //控制显示授权弹窗
 			isUserInfo: false, //控制显示授权弹窗
-			isShareStatus: false,
+			skeletonShow: true,
 			productList: [],
 			productList: [],
 			params: {
 			params: {
 				code: '',
 				code: '',
@@ -51,6 +72,18 @@ export default {
 			},
 			},
 			mapStateArr: [
 			mapStateArr: [
 				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23, 111], status: true }
 				{ label: 'isPay', val: [11, 12, 13, 21, 22, 23, 111], status: true }
+			],
+			modal:false,
+			contentModalText: '', //操作文字提示语句
+			modalButton: [
+				{
+					text: '确定',
+					customStyle: {
+						color: '#fff',
+						bgColor: '#F3B574'
+					},
+					plain: false
+				}
 			]
 			]
 		}
 		}
 	},
 	},
@@ -65,26 +98,26 @@ export default {
 	},
 	},
 	methods: {
 	methods: {
 		async initQueryUser() {
 		async initQueryUser() {
-			const getUserInfo = await authorize.getUserInfo('weixin')
-			this.params.code = await authorize.getCode('weixin')
-			this.params.iv = getUserInfo.iv
-			this.params.encryptedData = getUserInfo.encryptedData
-			this.OrderService.OrderShareCodeIdentity(this.params).then(response => {
-				if (response.code == 0) {
+			try{
+				const getUserInfo = await authorize.getUserInfo('weixin')
+				this.params.code = await authorize.getCode('weixin')
+				this.params.iv = getUserInfo.iv
+				this.params.encryptedData = getUserInfo.encryptedData
+				const res = await this.OrderService.OrderShareCodeIdentity(this.params)
+				if(res.code === 0){
 					// 初始化订单商品数据
 					// 初始化订单商品数据
-					console.log(response.msg)
 					this.getOrderCommodityData()
 					this.getOrderCommodityData()
-				} else if (response.code == 1) {
+				}else if (res.code === 1) {
 					// 同为会所运营人员查看订单详情
 					// 同为会所运营人员查看订单详情
 					this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.params.orderId}`)
 					this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderId=${this.params.orderId}`)
-				} else if (response.code == 2) {
+				} else if (res.code === 2) {
 					// 协销查看分享订单
 					// 协销查看分享订单
 					this.$api.navigateTo(
 					this.$api.navigateTo(
 						`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}&userId=${
 						`/pages/seller/order/order-details?type=share&orderId=${this.params.orderId}&userId=${
 							this.params.userId
 							this.params.userId
 						}`
 						}`
 					)
 					)
-				} else if (response.code == 3) {
+				} else if (res.code === 3) {
 					// 游客第二次查看订单详情
 					// 游客第二次查看订单详情
 					this.$api.redirectTo(
 					this.$api.redirectTo(
 						`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${
 						`/pages/user/order/order-sharedetails?orderId=${this.params.orderId}&userId=${
@@ -92,29 +125,54 @@ export default {
 						}`
 						}`
 					)
 					)
 				} else {
 				} else {
-					// 错误信息返回
-					this.$util.modal('提示', response.msg, '确定', '', false, () => {})
+					this.modal = true
+					this.contentModalText = res.msg
 				}
 				}
-			})
+			}catch(error){
+				// 错误信息返回
+				console.log(error)
+			}
 		},
 		},
-		getOrderCommodityData() {
+		async getOrderCommodityData() {
 			//查询订单商品信息s
 			//查询订单商品信息s
-			this.OrderService.OrderCommodityData({ orderId: this.params.orderId })
-				.then(response => {
-					const data =  response.data
-					this.productList = data.productList
-					this.mapStateArr.forEach(el => {
-						el.val.forEach(value => {
-							if (!data.payButton && data.orderStatus === value) {
-								this.btnState[el.label] = el.status
-							}
-						})
+			try{
+				const res = await this.OrderService.OrderCommodityData({ orderId: this.params.orderId })
+				const data =  res.data
+				this.productList = data.productList
+				this.mapStateArr.forEach(el => {
+					el.val.forEach(value => {
+						if (!data.payButton && data.orderStatus === value) {
+							this.btnState[el.label] = el.status
+						}
 					})
 					})
-					this.isShareStatus = true
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
 				})
 				})
+				this.skeletonShow = false
+			}catch(error){
+				console.log('查询订单商品信息失败')
+			}
+		},
+		btnConfirmPay() {
+			// 待支付订单
+			this.getOrderPaymentValidation(this.params.orderId)
+		},
+		async getOrderPaymentValidation(orderId) {
+			//监听根据付款状态做操作
+			try{
+				const res = await this.OrderService.OrderPaymentValidation({ orderId: orderId })
+				const data = res.data
+				if(data.code == -1){
+					this.modal = true
+					this.contentModalText ='订单已申请全部退款,无需再付款!'
+				}else{
+					if (data.onlinePayFlag === 1) {// 只能线下
+						this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${orderId}`)
+					} else {
+						this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`)
+					}
+				}
+			}catch(error){
+				this.$util.msg(error.msg, 2000)
+			}
 		},
 		},
 		goLogin(index) {
 		goLogin(index) {
 			switch (index) {
 			switch (index) {
@@ -130,27 +188,12 @@ export default {
 					break
 					break
 			}
 			}
 		},
 		},
-		btnConfirmPay() {
-			// 待支付订单
-			this.getOrderPaymentValidation(this.params.orderId)
-		},
-		getOrderPaymentValidation(orderId) {
-			//监听根据付款状态做操作
-			this.OrderService.OrderPaymentValidation({ orderId: orderId })
-				.then(response => {
-					if(response.data.code == -1){
-						this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
-					}else{
-						if (response.data.onlinePayFlag === 1) {// 只能线下
-							this.$api.navigateTo(`/pages/user/pay/card-under?orderId=${orderId}`)
-						} else {
-							this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${orderId}`)
-						}
-					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+		handleClick(e){
+			//确认操作
+			if (e.index == 1) {
+				this.modal = false
+			}
+			this.modal = false
 		},
 		},
 	},
 	},
 	onShow() {}
 	onShow() {}

+ 13 - 2
services/order.service.js

@@ -101,9 +101,8 @@ export default class OrderService {
         return this.AjaxService.get({ 
         return this.AjaxService.get({ 
             url:'/order/club/share/code/identity', 
             url:'/order/club/share/code/identity', 
             data, 
             data, 
-            isLoading: true,
+            isLoading: false,
             isStatus: true ,
             isStatus: true ,
-              
         })
         })
     }
     }
     /**
     /**
@@ -305,4 +304,16 @@ export default class OrderService {
               
               
         })
         })
     }
     }
+    /**
+	 * @订单保存支付凭证
+	 * @param:userId 用户ID(必填)
+	 */
+    orderInsertVoucher (data = {}) {
+        return this.AjaxService.post({ 
+            url:'/order/club//insertVoucher', 
+            data, 
+            isLoading: false ,
+              
+        })
+    }
 }
 }