ZZ 1 month ago
parent
commit
2246bfe706

+ 7 - 0
mer_uniapp/pages.json

@@ -576,6 +576,13 @@
 					"navigationStyle": "custom",
 					"enablePullDownRefresh": false
 				}
+			},{
+				"path": "components/take_fast_mail/index",
+				"style": {
+					"navigationBarTitleText": "添加快递",
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": false
+				}
 			}]
 		},
 		{

+ 107 - 84
mer_uniapp/pages/substitute_fast_mail/home/index.vue

@@ -6,8 +6,8 @@
 			</nav-bar>
 		</view>
 		<!-- #endif -->
-		<view class='newsList tui-skeleton flex-col' style="background-color: #fff;flex: 1;">
-			<view class='nav'>
+		<!-- <view class='newsList tui-skeleton flex-col' style="background-color: #fff;flex: 1;"> -->
+		<!-- <view class='nav'>
 				<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
 					<block v-for="(item,index) in navList" :key="index">
 						<view class='item borRadius14 tui-skeleton-rect' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
@@ -16,26 +16,60 @@
 						</view>
 					</block>
 				</scroll-view>
+			</view> -->
+		<view class="fast-top">送至:XXXXXXXXXXXXXXXXXXX <text>XXX</text> 收 19992837748<text class="iconfont icon-zhankai"></text></view>
+		<navigator url="/pages/substitute_fast_mail/take_fast_mail/index">
+			<view class="flex-center fast-top">
+				<view class="fast-jia flex-center">
+					+
+				</view>
+				<view>添加代取快递信息</view>
+			</view>
+		</navigator>
+		<scroll-view scroll-y scroll-with-animation style="flex: 1;overflow: hidden;">
+			<view class="fast-box">
+				<view class="flex-between-center">
+					<view>
+						<view class="fast-yz">XXXXXXXXXXXXXX驿站</view>
+						<view class="fast-xx">XXXXXXXXXXXXXXXXXXXXXXXX宿舍</view>
+					</view>
+					<view class="flex-y-center">
+						<image src="/static/img/phone.png" class="image2" /><text>联系驿站</text>
+					</view>
+				</view>
+				<view class="flex-around-center fast-item">
+					<radio class="radio" value="" color="#FF6702" />
+					<image style="width: 135rpx; height: 135rpx;border-radius: 30rpx;" src="/static/img/ic-qu-chengse.png"></image>
+					<view>
+						<view class="fast-yz">取件码 <text>9-9-9999</text></view>
+						<view class="fast-xx">圆通快递 YT1208768435738849</view>
+					</view>
+					<view>
+						<view class="fast-yz">134m</view>
+						<view class="bg-color-cash">¥<text class="fast-cash">2.50</text></view>
+					</view>
+				</view>
 			</view>
-			<view class='list' style="flex: 1;">
+		</scroll-view>
+		<!-- <view class='list' style="flex: 1;">
 				<template v-if="active == 1">
 					<take-fast-mail ref="takeFastMailRef" :addressObj="addressItem" :addressExpressObj="addressExpressItem"></take-fast-mail>
 				</template>
 				<template v-if="active == 2">
 					<send-fast-mail></send-fast-mail>
 				</template>
+			</view> -->
+		<!-- 购物车栏 begin -->
+		<view class="cart-box">
+			<view class="mark-box">
+				<view class="mark">应付 ¥ <text style="font-size: 31rpx;">{{orderPrice}}</text></view>
+				<view class="tips">普通用户 | 查看明细 》</view>
 			</view>
-			<!-- 购物车栏 begin -->
-			<view class="cart-box">
-				<view class="mark-box">
-					<view class="mark">应付 ¥ <text style="font-size: 31rpx;">{{orderPrice}}</text></view>
-					<view class="tips">普通用户 | 查看明细 》</view>
-				</view>
-				<button type="primary" class="pay-btn" @tap="toPay">
-					提交订单
-				</button>
-			</view>
+			<button type="primary" class="pay-btn" @tap="toPay">
+				提交订单
+			</button>
 		</view>
+		<!-- </view> -->
 		<fast-mail-order v-if="isOrder" @onCancel="onCanCel"></fast-mail-order>
 	</view>
 </template>
@@ -54,13 +88,8 @@
 	import animationType from '@/utils/animationType.js'
 	import tuiSkeleton from '@/components/base/tui-skeleton.vue';
 	import sendFastMail from '../components/send_fast_mail/index.vue'
-	import takeFastMail from '../components/take_fast_mail/index.vue'
 	import fastMailOrder from '../components/fast_mail_order/index.vue'
 	import {
-		getAddressDefault,
-		getAddressExpressDefault
-	} from '@/api/user.js';
-	import {
 		preExpressApi
 	} from '@/api/fastMail.js';
 	let app = getApp();
@@ -69,12 +98,11 @@
 			tuiSkeleton,
 			navBar,
 			sendFastMail,
-			takeFastMail,
 			fastMailOrder
 		},
 		data() {
 			return {
-				isOrder: false,
+				isOrder: false, // 提交快递订单弹窗
 				winHeight: 0,
 				isNodes: 0, //控制什么时候开始抓取元素节点,只要数值改变就重新抓取
 				autoplay: true,
@@ -88,7 +116,7 @@
 					preOrderType: 'send'
 				}],
 				navListIndex: 0,
-				active: 1,
+				active: 0,
 				scrollLeft: 0,
 				addressItem: {},
 				orderPrice: 0,
@@ -102,19 +130,11 @@
 					that.winHeight = res.windowHeight
 				},
 			});
-			this.getaddressInfo()
 		},
 		/**
 		 * 生命周期函数--监听页面显示
 		 */
 		onShow: function() {
-			let that = this;
-			uni.$on('addressItem', function(res) {
-				that.$set(that, 'addressItem', res);
-			})
-			uni.$on('addressExpressItem', function(res) {
-				that.$set(that, 'addressExpressItem', res);
-			})
 		},
 		methods: {
 			tabSelect(active, e) {
@@ -122,26 +142,13 @@
 				this.navListIndex = e;
 				this.scrollLeft = e * 60;
 			},
-			/*
-			 * 获取默认收货地址或者获取某条地址信息
-			 */
-			getaddressInfo: function() {
-				getAddressDefault().then(res => {
-					console.log('地址', res)
-					this.addressItem = res.data || {}
-				})
-				getAddressExpressDefault().then(res => {
-					console.log('驿站地址', res)
-					this.addressExpressItem = res.data || {}
-				})
-			},
 			toPay() {
 				const refTake = this.$refs.takeFastMailRef;
 				// uni.showLoading({
 				// 	title: '保存中',
 				// 	mask: true
 				// })
-				this.orderPrice = +(refTake.fastMailObj.giveTips || 0) + +refTake.fastMailObj?.sepec?.fee || 0
+				this.orderPrice = +(refTake.fastMailObj.giveTips || 0) + +refTake.fastMailObj.sepec.fee || 0
 				let value = {
 					giveTips: refTake.fastMailObj.giveTips,
 					orderDetails: [{
@@ -151,7 +158,7 @@
 						orderNo: "",
 						price: this.orderPrice || 0,
 						remark: refTake.fastMailObj.remark || '',
-						sepec: +refTake.fastMailObj?.sepec?.fee || 0
+						sepec: +refTake.fastMailObj.sepec.fee || 0
 					}],
 					postAddressId: refTake.addressExpressObj.id,
 					preOrderType: this.navList[this.navListIndex].preOrderType,
@@ -203,61 +210,77 @@
 		}
 	}
 
-	.newsList .swiper {
+	.fast-top {
 		width: 100%;
-		position: relative;
-		box-sizing: border-box;
+		height: 80rpx;
 		padding: 0 30rpx;
+		line-height: 80rpx;
+		font-weight: 600;
+		font-size: 27rpx;
+		color: #141414;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+		border-radius: 20rpx;
 	}
 
-	.newsList .swiper swiper {
-		width: 100%;
-		height: 365rpx;
-		position: relative;
+	.image2 {
+		width: 42rpx;
+		height: 42rpx;
+		margin-right: 20rpx;
 	}
 
-	.newsList .swiper .slide-image {
-		width: 100%;
-		height: 335rpx;
-		border-radius: 14rpx;
+	.fast-jia {
+		width: 44rpx;
+		height: 44rpx;
+		color: #fff;
+		font-size: 40rpx;
+		border-radius: 50%;
+		background-color: $bg-color-primary;
+		margin-right: 20rpx;
 	}
 
-	// #ifdef MP-WEIXIN
-	.newsList .swiper .wx-swiper-dot {
-		width: 12rpx !important;
-		height: 12rpx !important;
-		border-radius: 0;
-		transform: rotate(-45deg);
-		transform-origin: 0 100%;
-	}
+	.fast-box {
+		padding: 30rpx;
+		background-color: #fff;
 
-	.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
-		margin-left: 5rpx;
-	}
+		.fast-item {
+			padding: 20rpx 0;
+			background-color: #F8F9FB;
+			margin-bottom: 10rpx;
+		}
 
-	.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
-		margin-bottom: -15rpx;
-	}
+		.flex-between-center {
+			margin-bottom: 20rpx;
+		}
 
-	// #endif
-	// #ifdef APP-PLUS || H5
-	.newsList .swiper .uni-swiper-dot {
-		width: 12rpx !important;
-		height: 12rpx !important;
-		border-radius: 0;
-		transform: rotate(-45deg);
-		transform-origin: 0 100%;
-	}
+		.fast-yz {
+			font-weight: 600;
+			font-size: 27rpx;
+			color: #141414;
 
-	.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
-		margin-left: 5rpx;
-	}
+			text {
+				color: #FF0000;
+			}
+		}
+
+		.fast-xx {
+			font-weight: 500;
+			font-size: 23rpx;
+			color: #646464;
+			margin-top: 10rpx;
+		}
 
-	.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
-		margin-bottom: -15rpx;
+		.bg-color-cash {
+			margin-top: 30rpx;
+			color: $bg-color-primary;
+
+			text {
+				font-weight: 500;
+				font-size: 25rpx;
+			}
+		}
 	}
 
-	// #endif
 	.newsList .nav {
 		padding: 0 24rpx;
 		width: 100%;

+ 35 - 112
mer_uniapp/pages/substitute_fast_mail/components/take_fast_mail/index.vue → mer_uniapp/pages/substitute_fast_mail/take_fast_mail/index.vue

@@ -1,7 +1,7 @@
 <template>
-	<view class="flex-col" :style="{height: winHeight + 'px', position: 'relative'}">
+	<view class="flex-col container" :style="{height: winHeight + 'px'}">
 		<view class='newsList tui-skeleton' style="background-color: #fff;flex: 1;">
-			<view class='nav'>
+			<!-- <view class='nav'>
 				<scroll-view class="scroll-view_x" scroll-x scroll-with-animation :scroll-left="scrollLeft" style="width:auto;overflow:hidden;">
 					<block v-for="(item,index) in navList" :key="index">
 						<view class='item borRadius14 tui-skeleton-rect' :class='active==item.id?"on":""' @click='tabSelect(item.id, index)'>
@@ -10,7 +10,7 @@
 						</view>
 					</block>
 				</scroll-view>
-			</view>
+			</view> -->
 			<view class='list flex-col' style="background-color: #F5F5F5;">
 				<view style="padding: 40rpx 24rpx;background-color: #fff;border-bottom-left-radius: 23rpx;">
 					<view class="flex-y-center flex-between-center" style="margin-bottom: 20rpx;">
@@ -139,10 +139,14 @@
 	// | Author: CRMEB Team <admin@crmeb.com>
 	// +----------------------------------------------------------------------
 	import animationType from '@/utils/animationType.js'
-	import fastMailTip from '../fast_mail_tip/index.vue'
-	import fastMailSpecs from '../fast_mail_specs/index.vue'
-	import fastMailFigure from '../fast_mail_figure/index.vue'
-	import fastMailPoint from '../fast_mail_point/index.vue'
+	import fastMailTip from '../components/fast_mail_tip/index.vue'
+	import fastMailSpecs from '../components/fast_mail_specs/index.vue'
+	import fastMailFigure from '../components/fast_mail_figure/index.vue'
+	import fastMailPoint from '../components/fast_mail_point/index.vue'
+	import {
+		getAddressDefault,
+		getAddressExpressDefault
+	} from '@/api/user.js';
 	let app = getApp();
 	export default {
 		components: {
@@ -151,16 +155,6 @@
 			fastMailFigure,
 			fastMailPoint
 		},
-		props: {
-			addressObj: {
-				type: Object,
-				default: {}
-			},
-			addressExpressObj: {
-				type: Object,
-				default: {}
-			}
-		},
 		data() {
 			return {
 				isTip: false, // 小费弹窗
@@ -169,6 +163,8 @@
 				isPoint: false, // 选择快递点弹窗
 				visible: false, // 送达时间弹窗
 				timeValue: [0, 0],
+				addressObj: {},
+				addressExpressObj: {},
 				fastMailObj: {},
 				hours: 0,
 				minutes: 0,
@@ -210,16 +206,28 @@
 		},
 		mounted() {
 			this.initTime()
-		},
-		watch: {
-			addressObj(val) {
-				this.addressObj = val
-			},
-			addressExpressObj(val) {
-				this.addressExpressObj = val
-			}
+			this.getaddressInfo()
+			uni.$on('addressItem', function(res) {
+				that.$set(this, 'addressObj', res);
+			})
+			uni.$on('addressExpressItem', function(res) {
+				that.$set(this, 'addressExpressObj', res);
+			})
 		},
 		methods: {
+			/*
+			 * 获取默认收货地址或者获取某条地址信息
+			 */
+			getaddressInfo: function() {
+				getAddressDefault().then(res => {
+					console.log('地址', res)
+					this.addressObj = res.data || {}
+				})
+				getAddressExpressDefault().then(res => {
+					console.log('驿站地址', res)
+					this.addressExpressObj = res.data || {}
+				})
+			},
 			initTime() {
 				let date = new Date();
 				date.setMinutes(date.getMinutes() + 39);
@@ -322,94 +330,9 @@
 </script>
 
 <style lang="scss" scoped>
-	.newsList .swiper {
-		width: 100%;
-		position: relative;
-		box-sizing: border-box;
-		padding: 0 30rpx;
-	}
-
-	.newsList .swiper swiper {
-		width: 100%;
-		height: 365rpx;
-		position: relative;
-	}
-
-	.newsList .swiper .slide-image {
+	.container {
 		width: 100%;
-		height: 335rpx;
-		border-radius: 14rpx;
-	}
-
-	// #ifdef MP-WEIXIN
-	.newsList .swiper .wx-swiper-dot {
-		width: 12rpx !important;
-		height: 12rpx !important;
-		border-radius: 0;
-		transform: rotate(-45deg);
-		transform-origin: 0 100%;
-	}
-
-	.newsList .swiper .wx-swiper-dot~.wx-swiper-dot {
-		margin-left: 5rpx;
-	}
-
-	.newsList .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
-		margin-bottom: -15rpx;
-	}
-
-	// #endif
-	// #ifdef APP-PLUS || H5
-	.newsList .swiper .uni-swiper-dot {
-		width: 12rpx !important;
-		height: 12rpx !important;
-		border-radius: 0;
-		transform: rotate(-45deg);
-		transform-origin: 0 100%;
-	}
-
-	.newsList .swiper .uni-swiper-dot~.uni-swiper-dot {
-		margin-left: 5rpx;
-	}
-
-	.newsList .swiper .uni-swiper-dots.uni-swiper-dots-horizontal {
-		margin-bottom: -15rpx;
-	}
-
-	// #endif
-	.newsList .nav {
-		padding: 0 24rpx;
-		width: 100%;
-		white-space: nowrap;
-		box-sizing: border-box;
-		padding-top: 43rpx;
-		border-top-right-radius: 23rpx;
-	}
-
-	.newsList .nav .item {
-		display: inline-block;
-		font-size: 32rpx;
-		color: #999;
-	}
-
-	.newsList .nav .item.on {
-		color: #282828;
-	}
-
-	.newsList .nav .item~.item {
-		margin-left: 46rpx;
-	}
-
-	.newsList .nav .item .line {
-		// width: 24rpx;
-		height: 10rpx;
-		border-radius: 6rpx;
-		margin: 10rpx auto 0 auto;
-		background-color: $bg-color-primary;
-	}
-
-	.newsList .nav .item .line1 {
-		color: $bg-color-primary;
+		position: fixed;
 	}
 
 	.send-name {