Browse Source

2023-10-6

zhang 1 year ago
parent
commit
480295fb8f

+ 7 - 82
pages.json

@@ -8,7 +8,6 @@
 				"navigationStyle": "custom"
 			}
 		},
-		
 		// 质押
 		{
 				"path": "pages/index/pledge",
@@ -17,7 +16,6 @@
 					"navigationStyle": "custom"
 				}
 		},
-		
 		// 互娱
 		{
 				"path": "pages/index/entertainment",
@@ -26,7 +24,6 @@
 					"navigationStyle": "custom"
 				}
 		},
-		
 		// 资讯
 		{
 				"path": "pages/index/information",
@@ -35,11 +32,7 @@
 					"navigationStyle": "custom"
 				}
 		},
-		
-		
-		
-		{
-			"path": "pages/public/register",
+		{			"path": "pages/public/register",
 			"style": {
 				"navigationBarTitleText": "注册",
 				"app-plus": {
@@ -82,20 +75,12 @@
 				}
 			}
 		},
-		
-		
-		
-		
-		
-		{
-			"path": "pages/set/set",
-			"style": {
-				"navigationBarTitleText": "设置"
-			}
-		},
-		
-		
-		
+		// {
+		// 	"path": "pages/set/set",
+		// 	"style": {
+		// 		"navigationBarTitleText": "设置"
+		// 	}
+		// },
 		{
 			"path": "pages/set/phone",
 			"style": {
@@ -114,7 +99,6 @@
 				"navigationBarTitleText": "修改资料"
 			}
 		},
-		
 		{
 			"path": "pages/index/user",
 			"style": {
@@ -154,18 +138,6 @@
 				"navigationBarTitleText": "推廣海報"
 			}
 		},
-		{
-			"path": "pages/order/order",
-			"style": {
-				"navigationBarTitleText": "我的订单",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-		
-		
-		
 		
 		{
 			"path": "pages/money/paySuccess",
@@ -179,42 +151,6 @@
 				"navigationBarTitleText": "提现账号"
 			}
 		},
-		// {
-		// 	"path": "pages/money/withdrawal",
-		// 	"style": {
-		// 		"navigationBarTitleText": "提现"
-		// 	}
-		// },
-		// {
-		// 	"path": "pages/money/recharge",
-		// 	"style": {
-		// 		"navigationBarTitleText": "充值"
-		// 	}
-		// },
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				// "app-plus": {
-				// 	"bounce": "none",
-				// 	"titleNView": {
-				// 		"searchInput": {
-				// 			"backgroundColor": "rgba(231, 231, 231,.7)",
-				// 			"borderRadius": "16px",
-				// 			"placeholder": "商品搜索",
-				// 			"disabled": true,
-				// 			"placeholderColor": "#606266",
-				// 			"align": "left"
-				// 		}
-				// 	}
-				// },
-				// #endif
-				"navigationBarTitleText": "互娱共享"
-			}
-		},
 		{
 			"path": "pages/redirect/redirect",
 			"style": {
@@ -337,17 +273,6 @@
             }
             
         }
-		
-		// ,
-		// {
-		//     "path" : "pages/wallet /wallet ",
-		//     "style" :                                                                                    
-		//     {
-		//         "navigationBarTitleText": "錢包",
-		//         "enablePullDownRefresh": false
-		//     }
-		    
-		// }
     ],
 	"tabBar": {
 		"color": "#C0C4CC",

+ 0 - 217
pages/category/category.vue

@@ -1,217 +0,0 @@
-<template>
-	<view class="content">
-		<scroll-view scroll-y class="left-aside">
-			<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item)">{{ item.cate_name }}</view>
-		</scroll-view>
-		<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
-			<view v-for="item in flist" :key="item.id" class="s-list" :id="'main-' + item.id">
-				<text class="s-item">{{ item.cate_name }}</text>
-				<view class="t-list ">
-					<view @click="navToList(item.id, titem.id)" class="t-item" v-for="titem in item.children" :key="titem.id">
-						<image :src="titem.pic"></image>
-						<text>{{ titem.cate_name }}</text>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-import { getCategoryList } from '@/api/product.js';
-export default {
-	data() {
-		return {
-			sizeCalcState: false,
-			tabScrollTop: 0,
-			currentId: 9,
-			flist: [],
-		};
-	},
-	onLoad() {
-		this.loadData();
-	},
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		uni.navigateTo({
-			url: '/pages/product/search'
-		});
-	},
-	methods: {
-		// 载入数据
-		async loadData() {
-			let obj = this;
-			getCategoryList({})
-				.then(({ data }) => {
-					obj.flist = data.map(function(s) {
-						return s;
-					});
-				})
-				.catch(err => {
-					console.log(err);
-				});
-		},
-		//一级分类点击
-		tabtap(item) {
-			console.log(item);
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			// 获取当前点击的id
-			this.currentId = item.id;
-			console.log(item.top);
-			this.tabScrollTop = item.top;
-			console.log(this.tabScrollTop);
-		},
-		//右侧栏滚动
-		
-		asideScroll(e) {
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			let scrollTop = e.detail.scrollTop;
-			let box = 0; //列表包裹框高度初始化
-			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
-			// 查询当前页面对象
-			let view = uni.createSelectorQuery().select('.content');
-			view.fields(
-				{
-					id: true,
-					dataset: true,
-					rect: true,
-					size: true,
-					scrollOffset: true
-				},
-				function(e) {
-					// 保存包裹框高度
-					box = e.height;
-				}
-			).exec();
-			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
-			let tabs = this.flist.filter(item =>( item.top-10) <= scrollTop).reverse();
-			if (tabs.length > 0) {
-				// 判断是否已经到达滚轮底部
-				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
-					this.currentId = this.flist[this.flist.length - 1].id;
-				} else {
-					this.currentId = tabs[0].id;
-				}
-			}
-		},
-		//计算右侧栏每个tab的高度等信息
-		calcSize() {
-			let h = 0;
-			this.flist.forEach(item => {
-				let view = uni.createSelectorQuery().select('#main-' + item.id);
-				view.fields(
-					{
-						size: true
-					},
-					data => {
-						item.top = h;
-						h += data.height;
-						item.bottom = h;
-					}
-				).exec();
-			});
-			this.sizeCalcState = true;
-		},
-		navToList(sid, tid) {
-			// 点击导航跳转到详细页面
-			uni.navigateTo({
-				url: '/pages/product/list?fid='+this.currentId+'&sid='+sid+'&tid='+tid
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	height: 100%;
-	background-color: #f8f8f8;
-}
-
-.content {
-	display: flex;
-}
-.left-aside {
-	flex-shrink: 0;
-	width: 200rpx;
-	height: 100%;
-	background-color: #fff;
-}
-.f-item {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 100%;
-	height: 100rpx;
-	font-size: 32rpx;
-	color: $font-color-base;
-	position: relative;
-	&.active {
-		color: $base-color;
-		background: #f8f8f8;
-		&:before {
-			content: '';
-			position: absolute;
-			left: 0;
-			top: 50%;
-			transform: translateY(-50%);
-			height: 36rpx;
-			width: 8rpx;
-			background-color: $base-color;
-			border-radius: 0 4px 4px 0;
-			opacity: 0.8;
-		}
-	}
-}
-
-.right-aside {
-	flex: 1;
-	overflow: hidden;
-	padding-left: 20rpx;
-	padding-right: 20rpx;
-}
-.s-item {
-	display: flex;
-	align-items: center;
-	height: 70rpx;
-	padding-top: 8rpx;
-	font-size: 32rpx;
-	color: $font-color-dark;
-}
-.t-list {
-	display: flex;
-	flex-wrap: wrap;
-	border-radius: 15rpx;
-	width: 100%;
-	background: #fff;
-	padding-top: 12rpx;
-	&:after {
-		content: '';
-		flex: 99;
-		height: 0;
-	}
-}
-.t-item {
-	flex-shrink: 0;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	flex-direction: column;
-	width: 171rpx;
-	font-size: 28rpx;
-	color: #666;
-	padding-bottom: 20rpx;
-
-	image {
-		width: 140rpx;
-		height: 140rpx;
-	}
-}
-</style>

+ 0 - 38
pages/device/device.vue

@@ -1,38 +0,0 @@
-<template>
-	<scroll-view scroll-y="true" class="center">
-		<image class="img1" src="../../static/img/设备1.png" mode="aspectFill"></image>
-		<image class="img2" src="../../static/img/设备2.png" mode="aspectFill"></image>
-		<image class="img3" src="../../static/img/设备3.png" mode="aspectFill"></image>
-	</scroll-view>
-			
-</template>
-
-<script>
-export default {
-  data() {
-    return {};
-  },
-  methods: {}
-};
-</script>
-
-<style>
-
-.center{
-	width: 100%;
-	height: 100vh;
-
-}
-	.img1 {
-		width: 750rpx;
-		height: 1869rpx;
-	}
-	.img2 {
-		width: 750rpx;
-		height: 1729rpx;
-	}
-	.img3 {
-		width: 750rpx;
-		height: 1865rpx;
-	} 
-</style>

+ 0 - 34
pages/money/recharge.vue

@@ -1,34 +0,0 @@
-<template>
-	<view class="content">
-		123
-	</view>
-</template>
-
-<script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import {
-		getUserInfo
-	} from '@/api/login.js';
-	
-	export default {
-		data() {
-			return {
-				
-			};
-		},
-		onLoad() {
-			
-		},
-		
-		methods: {
-			
-		}
-	};
-</script>
-
-<style lang="scss">
-	
-</style>

File diff suppressed because it is too large
+ 0 - 178
pages/order/createOrder.vue


+ 0 - 405
pages/order/evaluate.vue

@@ -1,405 +0,0 @@
-<template>
-	<view class="content">
-		<view class="order-item">
-			<view class="goods-box-single">
-				<image class="goods-img" :src="productInfo.image" mode="aspectFill"></image>
-				<view class="right position-relative">
-					<view class="flex">
-						<text class="title">{{ productInfo.store_name }}</text>
-						<view class="title-right">
-							<view class="price">{{ productInfo.price }}</view>
-							<view class="attr-box">x{{ list.cart_num }}</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view>
-				<view class="flex_item zhil">
-					<view>商品质量</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
-				</view>
-				<view class="flex_item zhil">
-					<view>服务态度</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
-				</view>
-				<view class="equity_box">
-					<view class="text-box uni-textarea">
-						<textarea placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea>
-					</view>
-					<view class="">
-						<view class="add-img-box flex_item">
-							<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
-								<image class="add-img" @click.stop="imgInfo(index)" :src="item.url" mode="aspectFill"></image>
-								<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
-							</view>
-							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()">
-								<image class="add-img" src="/static/img/add.png"></image>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view @click.stop="submit" class="address-box submit-box"><text class="submit-btn">提交评论</text></view>
-	</view>
-</template>
-
-<script>
-import { product, upload, order_comment } from '@/api/order.js';
-import uniRate from '@/components/uni-rate/uni-rate.vue';
-export default {
-	components: {
-		uniRate
-	},
-	data() {
-		return {
-			list: '', //订单详情
-			productInfo: '',
-			text: '', //评论内容
-			placeholder: '商品满足你的期待么?说说你的想法,分享给想买的他们吧~',
-			imgList: [],
-			unique: '', //商品唯一标识码
-			cloudimgList: [],
-			rateValue1: '', //商品质量
-			rateValue2: '', //服务态度
-			imgCount: 6 //最多支持9张上传,可以修改
-		};
-	},
-	onLoad(option) {
-		this.unique = option.unique;
-		this.loadOrder();
-	},
-	onShow() {},
-	methods: {
-		//text
-		bindTextAreaBlur: function(e) {
-			this.text = e.detail.value;
-		},
-		//获取收入支出信息
-		async loadOrder() {
-			product({
-				unique: this.unique
-			}).then(e => {
-				this.list = e.data;
-				this.productInfo = e.data.productInfo;
-			});
-		},
-		//商品质量评分
-		rateChange1(val) {
-			this.rateValue1 = val.value;
-		},
-		//服务态度评分
-		rateChange2(val) {
-			this.rateValue2 = val.value;
-		},
-		//单张上传图片
-		scImg() {
-			let obj = this;
-			console.log(obj.imgCount, 11);
-			if (obj.imgCount == 0) {
-				uni.showToast({
-					title: '最多添加6张图片',
-					icon: 'none'
-				});
-				return;
-			}
-			upload({
-				file: ''
-			})
-				.then(e => {
-					console.log(e,'e')
-					obj.imgList = [...obj.imgList, ...e];
-					console.log(obj.imgList,'imgList')
-					obj.imgCount = 10 - obj.imgList.length;
-					console.log(obj.imgCount ,'imgCount ')
-				})
-				.catch(e => {});
-		},
-		//提交评论
-		submit(e) {
-			let obj = this;
-			if (obj.imgList.length < 1) {
-				uni.showToast({
-					title: '请添加图片',
-					icon: 'none'
-				});
-				return;
-			}
-			for (let i = 0; i < obj.imgList.length; i++) {
-				obj.cloudimgList.push(obj.imgList[i].url);
-			}
-			let arr = obj.cloudimgList.join(',');
-			order_comment({
-				pics: arr,
-				comment: obj.text,
-				product_score: obj.rateValue1,
-				service_score: obj.rateValue2,
-				unique: obj.unique,
-				
-			})
-				.then(e => {
-					uni.navigateTo({
-						url: '/pages/order/order?state=4'
-					});
-				})
-				.catch(e => {
-					uni.navigateTo({
-						url: '/pages/order/order?state=4'
-					});
-				});
-		},
-		//点击图片显示大图
-		imgInfo(i) {
-			let tempList = [];
-			console.log(111);
-			this.imgList.forEach(e => {
-				tempList.push(e.url);
-			});
-			console.log(tempList);
-			//显示图片
-			uni.previewImage({
-				current: i,
-				loop: false,
-				urls: tempList,
-				indicator: 'default'
-			});
-		},
-		//删除图片
-		delImg(i) {
-			uni.showModal({
-				content: '确定删除这张吗',
-				success: res => {
-					if (res.confirm) {
-						this.imgList.splice(i, 1);
-						this.imgCount++;
-					} else if (res.cancel) {
-					}
-				}
-			});
-		},
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-	.content {
-		background: #ffffff;
-		height: 100%;
-	}
-}
-/* 多条商品 */
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding: 0rpx 30rpx;
-	background: #fff;
-	margin-top: 20rpx;
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			height: 100%;
-			.title {
-				align-self: flex-start;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				height: 80rpx;
-				overflow:hidden; 
-				text-overflow:ellipsis;
-				display:-webkit-box; 
-				-webkit-box-orient:vertical;
-				-webkit-line-clamp:2; 
-			}
-			.title-right {
-				flex-shrink: 0;
-				text-align: right;
-				align-self: flex-start;
-			}
-			.attr-box {
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-	}
-}
-.equity_box {
-	background-color: #fafafa;
-	border-radius: 10rpx;
-	padding: 25rpx 25rpx;
-	margin: 25rpx 0rpx;
-	.text-box {
-		height: 200rpx;
-		textarea {
-			font-size: 25rpx;
-			width: 100%;
-			height: 100%;
-			overflow: hidden;
-			text-overflow: ellipsis;
-			display: -webkit-box;
-			-webkit-box-orient: vertical;
-			-webkit-line-clamp: 5;
-		}
-	}
-}
-.zhil {
-	font-size: 28rpx !important;
-	padding: 15rpx 15rpx;
-}
-.submit-box {
-	bottom: 0;
-	left: 0;
-	width: 750rpx;
-}
-.submit-btn {
-	margin-top: 10px;
-	display: inline-block;
-	width: 670rpx;
-	height: 96rpx;
-	line-height: 96rpx;
-	text-align: center;
-	background-color: #1BCC26 !important;
-	opacity: 1;
-	border-radius: 32rpx;
-	border-width: 8rpx;
-	border-color: rgba(255, 255, 255, 1);
-	box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
-	border-radius: 56rpx;
-	font-size: 39rpx;
-	font-weight: bold;
-	color: rgba(255, 255, 255, 1);
-}
-.submit-btn-txt {
-	font-size: 39rpx;
-	font-weight: bold;
-	line-height: 47rpx;
-	color: rgba(255, 255, 255, 1);
-	opacity: 1;
-}
-.map-box {
-	width: 484rpx;
-	height: 256rpx;
-	border-width: 4rpx;
-	border-color: rgba(255, 255, 255, 1);
-	box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.16);
-	/* border-radius: 12rpx; */
-	position: relative;
-}
-.map {
-	position: absolute;
-	top: 0;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	width: 476rpx;
-	height: 250rpx;
-}
-.map-img {
-	position: absolute;
-	top: 90rpx;
-	left: 156rpx;
-	width: 230rpx;
-	height: 68rpx;
-	background-color: rgba(51, 51, 51, 0.64);
-	border-width: 1rpx;
-	border-color: rgba(0, 0, 0, 0);
-	border-radius: 34px;
-
-	font-size: 28rpx;
-	font-weight: bold;
-	line-height: 66rpx;
-	color: rgba(255, 255, 255, 1);
-	text-align: center;
-}
-.address-box {
-	padding: 15rpx 40rpx;
-	margin-bottom: 10px;
-}
-.label {
-	font-size: 36rpx;
-	font-weight: bold;
-	line-height: 50rpx;
-	color: #222222;
-}
-.label-img {
-	padding-left: 40rpx;
-}
-
-.add-img-box {
-	width: 100%;
-	flex-direction: row;
-	flex-wrap: wrap;
-	margin-top: 50rpx;
-}
-.add-img-item {
-	width: 180rpx;
-	height: 180rpx;
-	border-radius: 24rpx;
-	position: relative;
-	margin: 0rpx 20rpx;
-	margin-bottom: 25rpx;
-	.add-img {
-		width: 100%;
-		height: 100%;
-		border-radius: 24rpx;
-	}
-}
-.add-img-camera {
-	flex: 1;
-}
-.add-img-del {
-	position: absolute;
-	width: 40rpx;
-	height: 40rpx;
-	left: 155rpx;
-	bottom: 155rpx;
-	//background-color: rgba(238, 0, 0, 1);
-	border-radius: 20rpx;
-}
-.address-time {
-	width: 484rpx;
-	height: 88rpx;
-	background-color: rgba(245, 245, 245, 1);
-	opacity: 1;
-	border-radius: 24rpx;
-	text-align: center;
-
-	font-size: 35rpx;
-	font-weight: 500;
-	color: rgba(51, 51, 51, 1);
-}
-.line {
-	width: 750rpx;
-	height: 1px;
-	transform: scaleY(0.3);
-	background-color: rgba(0, 0, 0, 0.5);
-}
-</style>

+ 0 - 74
pages/order/expressInfo.vue

@@ -1,74 +0,0 @@
-<template>
-	<view class="container">
-		<view class="express-box">
-			<view class="top-text">
-				<text class="top-com">{{expressList.com}}</text>
-				<text>{{ expressList.nu }}</text>
-			</view>
-			<view class="express-body">
-				<uni-steps :options="expressList.data" active-color="#007AFF" :active="active" direction="column"></uni-steps>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { express_query } from '@/api/order.js';
-import uniSteps from '@/components/uni-steps/uni-steps.vue';
-export default {
-	components: {
-		uniSteps
-	},
-	data() {
-		return {
-			id: '',
-			expressList: [],
-			active: 0
-		}
-	},
-	onLoad(option) {
-		this.id = option.id
-	},
-	onShow() {
-		this.loadData()
-	},
-	methods: {
-		loadData() {
-			express_query({
-				id: this.id,
-			}).then(({data}) => {
-				this.expressList = data;
-				console.log(this.expressList)
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.container {
-	padding: 40rpx;
-	.express-box {
-		border-radius: $border-radius-sm;
-		.top-text {
-			width: 100%;
-			height: 60rpx;
-			background: #FFFFFF;
-			padding-left: 20rpx;
-			font-size: $font-base;
-			border-radius: $border-radius-sm;
-			display: flex;
-			align-items: center;
-			.top-com {
-				margin-right: 10rpx;
-			}
-		}
-		.express-body {
-			margin-top: 20rpx;
-			background: #FFFFFF;
-			border-radius: $border-radius-sm;
-			padding: 20rpx 10rpx 20rpx 0;
-		}
-	}
-}
-</style>

+ 0 - 729
pages/order/order.vue

@@ -1,729 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
-						class="order-item">
-						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
-							<text class="state"
-								:style="{ color: item.stateTipColor }">{{ item._status._title  == '待评价'? '已完成': item._status._title}}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete"
-								@click="deleteOrder(index)"></text>
-						</view>
-
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
-							</view>
-						</view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo"
-							:key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
-								</view>
-								<view class="row flex">
-									<text
-										class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							实付款
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
-						</view>
-						<view class="action-box b-t" v-if="item.status != 5 ">
-							<button v-if="item._status._title == '未支付'" class="action-btn"
-								@click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)"
-								class="action-btn recom">立即支付</button>
-							<!-- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button> -->
-							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)"
-								class="action-btn">确认收货</button>
-							<!-- <button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import empty from '@/components/empty';
-	import {
-		orderList,
-		orderCancel,
-		orderDel,
-		orderTake
-	} from '@/api/order.js';
-	export default {
-		components: {
-			uniLoadMore,
-			empty
-		},
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-						state: 0,
-						text: '待付款',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 1,
-						text: '待发货',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '待收货',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 3,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					// {
-					// 	state: 4,
-					// 	text: '已完成',
-					// 	loadingType: 'more',
-					// 	orderList: [],
-					// 	page: 1, //当前页数
-					// 	limit: 10 //每次信息条数
-					// }
-				]
-			};
-		},
-
-		onLoad(options) {
-			/**
-			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-			 * 替换onLoad下代码即可
-			 */
-			this.tabCurrentIndex = +options.state;
-			// #ifndef MP
-			this.loadData();
-			// #endif
-			// #ifdef MP
-			if (options.state == 0) {
-				this.loadData();
-			}
-			// #endif
-		},
-		// #ifdef APP-PLUS || H5
-		onBackPress(e) {
-			uni.switchTab({
-				url: '/pages/user/user',
-			});
-			return true;
-		},
-		// #endif
-		methods: {
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			// 确认收货
-			orderTake(item, index) {
-				let obj = this;
-				uni.showModal({
-					title: '是否确认收货?',
-					success: () => {
-						orderTake({
-								uni: item.order_id
-							})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					}
-				});
-			},
-			//跳转到订单详情
-			goToOrderDetail(e) {
-				uni.navigateTo({
-					url: '/pages/order/orderDetail?id=' + e.order_id
-				});
-			},
-			// 申请退款
-			orderRefund(e) {
-				uni.navigateTo({
-					url: '/pages/order/orderRefund?id=' + e.order_id
-				});
-			},
-			// 订单支付
-			orderPay(e) {
-				uni.navigateTo({
-					url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
-				});
-			},
-			//获取订单列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-
-				orderList({
-						type: state,
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let arr = data.map(e => {
-							let b = this.orderStateExp(e.status);
-							e.stateTip = b.stateTip;
-							e.stateTipColor = b.stateTipColor;
-							return e;
-						});
-						navItem.orderList = navItem.orderList.concat(arr);
-						// console.log(navItem.orderList);
-						navItem.page++;
-						if (navItem.limit == data.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-			},
-			//删除订单
-			deleteOrder(index) {
-				uni.showLoading({
-					title: '请稍后'
-				});
-				setTimeout(() => {
-					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-					uni.hideLoading();
-				}, 600);
-			},
-			//取消订单
-			cancelOrder(item) {
-				uni.showModal({
-					title: '订单取消',
-					content: '是否取消订单?',
-					success: e => {
-						if (e.confirm) {
-							uni.showLoading({
-								title: '请稍后'
-							});
-							orderCancel({
-									id: item.order_id
-								})
-								.then(e => {
-									uni.showToast({
-										title: '取消成功',
-										duration: 2000,
-										position: 'top'
-									});
-								})
-								.catch(e => {
-									console.log(e);
-								});
-							//取消订单后删除待付款中该项
-							let list = this.navList[this.tabCurrentIndex].orderList;
-							let index = list.findIndex(val => val.id === item.id);
-							index !== -1 && list.splice(index, 1);
-							uni.hideLoading();
-						}
-					}
-				});
-			},
-
-			//订单状态文字和颜色
-			orderStateExp(state) {
-				let stateTip = '',
-					stateTipColor = '#fa436a';
-				switch (+state) {
-					case 0:
-						stateTip = '待付款';
-						break;
-					case 1:
-						stateTip = '待发货';
-						break;
-					case 2:
-						stateTip = '待收货';
-						break;
-					case 3:
-						stateTip = '已完成';
-						stateTipColor = '#5dbc7c';
-						break;
-					case 4:
-						stateTip = '已完成';
-						stateTipColor = '#5dbc7c';
-						break;
-					case 9:
-						stateTip = '订单已关闭';
-						stateTipColor = '#909399';
-						break;
-
-						//更多自定义
-				}
-				return {
-					stateTip,
-					stateTipColor
-				};
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: calc(100% - 40px);
-	}
-
-	.list-scroll-content {
-		height: 100%;
-	}
-
-	.navbar {
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		position: relative;
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.uni-swiper-item {
-		height: auto;
-	}
-
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		padding-left: 30rpx;
-		background: #fff;
-		margin-top: 16rpx;
-
-		.i-top {
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			padding-right: 30rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			position: relative;
-
-			.time {
-				flex: 1;
-			}
-
-			.state {
-				color: $base-color;
-			}
-
-			.del-btn {
-				padding: 10rpx 0 10rpx 36rpx;
-				font-size: $font-lg;
-				color: $font-color-light;
-				position: relative;
-
-				&:after {
-					content: '';
-					width: 0;
-					height: 30rpx;
-					border-left: 1px solid $border-color-dark;
-					position: absolute;
-					left: 20rpx;
-					top: 50%;
-					transform: translateY(-50%);
-				}
-			}
-		}
-
-		/* 多条商品 */
-		.goods-box {
-			height: 160rpx;
-			padding: 20rpx 0;
-			white-space: nowrap;
-
-			.goods-item {
-				width: 120rpx;
-				height: 120rpx;
-				display: inline-block;
-				margin-right: 24rpx;
-			}
-
-			.goods-img {
-				display: block;
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		/* 单条商品 */
-		.goods-box-single {
-			display: flex;
-			padding: 20rpx 0;
-
-			.goods-img {
-				display: block;
-				width: 120rpx;
-				height: 120rpx;
-			}
-
-			.right {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				padding: 0 30rpx 0 24rpx;
-				overflow: hidden;
-
-				.row {
-					margin-top: 10rpx;
-				}
-
-				.row_title {
-					padding: 5rpx 10rpx;
-					background-color: #dddddd;
-					border-radius: 10rpx;
-					font-size: 22rpx;
-					color: #ffffff;
-				}
-
-				.title {
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-					line-height: 1;
-					width: 80%;
-				}
-
-				.attr-box {
-					display: flex;
-					justify-content: flex-end;
-					font-size: $font-sm + 2rpx;
-					color: $font-color-light;
-				}
-
-				.price {
-					display: inline;
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-
-					&:before {
-						content: '¥';
-						font-size: $font-sm;
-
-					}
-				}
-			}
-		}
-
-		.price-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: baseline;
-			padding: 20rpx 30rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-
-			.num {
-				margin: 0 8rpx;
-				color: $font-color-dark;
-			}
-
-			.price {
-				font-size: $font-lg;
-				color: $font-color-dark;
-
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-
-		.action-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-			height: 100rpx;
-			position: relative;
-			padding-right: 30rpx;
-		}
-
-		.action-btn {
-			width: 160rpx;
-			height: 60rpx;
-			margin: 0;
-			margin-left: 24rpx;
-			padding: 0;
-			text-align: center;
-			line-height: 60rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-dark;
-			background: #fff;
-			border-radius: 100px;
-
-			&:after {
-				border-radius: 100px;
-			}
-
-			&.recom {
-				color: $base-color;
-
-				&:after {
-					border-color: $base-color;
-				}
-			}
-
-			&.evaluate {
-				color: $color-yellow;
-
-				&:after {
-					border-color: $color-yellow;
-				}
-			}
-		}
-	}
-
-	/* load-more */
-	.uni-load-more {
-		display: flex;
-		flex-direction: row;
-		height: 80rpx;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-load-more__text {
-		font-size: 28rpx;
-		color: #999;
-	}
-
-	.uni-load-more__img {
-		height: 24px;
-		width: 24px;
-		margin-right: 10px;
-	}
-
-	.uni-load-more__img>view {
-		position: absolute;
-	}
-
-	.uni-load-more__img>view view {
-		width: 6px;
-		height: 2px;
-		border-top-left-radius: 1px;
-		border-bottom-left-radius: 1px;
-		background: #999;
-		position: absolute;
-		opacity: 0.2;
-		transform-origin: 50%;
-		animation: load 1.56s ease infinite;
-	}
-
-	.uni-load-more__img>view view:nth-child(1) {
-		transform: rotate(90deg);
-		top: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(2) {
-		transform: rotate(180deg);
-		top: 11px;
-		right: 0;
-	}
-
-	.uni-load-more__img>view view:nth-child(3) {
-		transform: rotate(270deg);
-		bottom: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(4) {
-		top: 11px;
-		left: 0;
-	}
-
-	.load1,
-	.load2,
-	.load3 {
-		height: 24px;
-		width: 24px;
-	}
-
-	.load2 {
-		transform: rotate(30deg);
-	}
-
-	.load3 {
-		transform: rotate(60deg);
-	}
-
-	.load1 view:nth-child(1) {
-		animation-delay: 0s;
-	}
-
-	.load2 view:nth-child(1) {
-		animation-delay: 0.13s;
-	}
-
-	.load3 view:nth-child(1) {
-		animation-delay: 0.26s;
-	}
-
-	.load1 view:nth-child(2) {
-		animation-delay: 0.39s;
-	}
-
-	.load2 view:nth-child(2) {
-		animation-delay: 0.52s;
-	}
-
-	.load3 view:nth-child(2) {
-		animation-delay: 0.65s;
-	}
-
-	.load1 view:nth-child(3) {
-		animation-delay: 0.78s;
-	}
-
-	.load2 view:nth-child(3) {
-		animation-delay: 0.91s;
-	}
-
-	.load3 view:nth-child(3) {
-		animation-delay: 1.04s;
-	}
-
-	.load1 view:nth-child(4) {
-		animation-delay: 1.17s;
-	}
-
-	.load2 view:nth-child(4) {
-		animation-delay: 1.3s;
-	}
-
-	.load3 view:nth-child(4) {
-		animation-delay: 1.43s;
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0.2;
-		}
-	}
-</style>

File diff suppressed because it is too large
+ 0 - 189
pages/order/orderDetail.vue


+ 0 - 238
pages/order/orderRefund.vue

@@ -1,238 +0,0 @@
-<template>
-	<view class="content">
-		<view class="order-item">
-			<scroll-view v-if="listStyle == 1" class="goods-box" scroll-x>
-				<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-					<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-				</view>
-			</scroll-view>
-			<view v-if="listStyle == 2" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-				<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-				<view class="right">
-					<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-					<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-					<text class="price">{{ goodsItem.productInfo.price }}</text>
-				</view>
-			</view>
-		</view>
-		<view class="orderDetial">
-			<view class="row b-b flex">
-				<text class="tit">订单总价</text>
-				<view class="input">¥{{ item.total_price }}</view>
-			</view>
-			<view class="row b-b flex">
-				<text class="tit">邮费</text>
-				<view class="input">{{ item.pay_postage > 0 ? '¥' +item.pay_postage : '免邮费' }}</view>
-			</view>
-			<view class="row b-b flex" v-if="item.coupon_id > 0">
-				<text class="tit">优惠券</text>
-				<view class="input">-¥{{ item.coupon_price }}</view>
-			</view>
-			<view class="row b-b flex" v-if="item.use_integral > 0">
-				<text class="tit">积分抵扣</text>
-				<view class="input">-¥{{ item.use_integral }}</view>
-			</view>
-			<view class="row b-b flex">
-				<text class="tit ">实付</text>
-				<view class="input payColor">¥{{ item.pay_price }}</view>
-			</view>
-		</view>
-		<view class="row b-b">
-			<text class="tit">退款理由</text>
-			<picker mode="selector" :range="value" @change="bindChange">
-				<view class="refund" v-if="refund">{{ refund || '请选择退款理由' }}</view>
-				<view class="noRefund" v-else>请选择退款理由</view>
-			</picker>
-		</view>
-		<view class="row b-b">
-			<text class="tit">备注说明</text>
-			<input class="input" type="text" v-model="reason" placeholder="请填写备注" placeholder-class="placeholder" />
-		</view>
-		<button class="add-btn" @click="confirm">提交</button>
-	</view>
-</template>
-
-<script>
-import { refund, refundReason, orderDetail } from '@/api/order.js';
-export default {
-	data() {
-		return {
-			refund: '', //退款理由
-			reason: '', //备注
-			value: ['1', '2', '3', '4', '5', '6', '7', '8', 9, 10, 11, 12, 13],
-			orderId: '',
-			item: {},
-			listStyle: 2
-		};
-	},
-	onLoad(option) {
-		this.orderId = option.id;
-		this.refundReason();
-		this.loadOrder();
-	},
-	methods: {
-		// 切换选中事件
-		bindChange(e) {
-			this.refund = this.value[e.detail.value];
-		},
-		// 加载退款理由
-		refundReason() {
-			refundReason({}).then(e => {
-				this.value = e.data;
-			});
-		},
-		loadOrder() {
-			orderDetail({}, this.orderId).then(e => {
-				this.item = e.data;
-			});
-		},
-		//提交
-		confirm() {
-			let obj = this;
-			if (!obj.refund) {
-				uni.showModal({
-					title: '错误',
-					content: '请填写退货理由',
-					showCancel: false
-				});
-				return false;
-			}
-			
-			refund({
-				text: obj.refund,
-				uni: obj.orderId,
-				refund_reason_wap_explain: obj.reason
-			}).then(function(e) {
-				uni.showToast({
-					title:'提交成功',
-					duration:1500
-				})
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-	padding-top: 16rpx;
-}
-.orderDetial {
-	.row {
-		.input {
-			text-align: right;
-		}
-	}
-}
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30rpx;
-	height: 110rpx;
-	background: #fff;
-	.refund {
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.noRefund {
-		font-size: 30rpx;
-		color: $font-color-light;
-		padding-left: 20rpx;
-	}
-	.tit {
-		flex-shrink: 0;
-		width: 120rpx;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30rpx;
-		color: $font-color-dark;
-		padding-left: 20rpx;
-		&.payColor {
-			color: $color-red;
-		}
-	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
-	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-/* 多条商品 */
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-			}
-			.attr-box {
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-				padding: 10rpx 12rpx;
-			}
-			.price {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 236
pages/set/address.vue

@@ -1,236 +0,0 @@
-<template>
-	<view class="content b-t">
-		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
-			<view class="wrapper">
-				<view class="address-box">
-					<text class="name">{{ item.real_name }}</text>
-					<text class="mobile">{{ item.phone }}</text>
-				</view>
-				<view class="u-box">
-					<text class="address">{{ item.province + item.city + item.district }} {{item.town}}
-						{{ item.detail }}</text>
-				</view>
-			</view>
-			<view class="buttom">
-				<view class="default-buttom" @click.stop="defaultUp(item,index)">
-					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }">
-					</view>
-					<text class="text">设为默认地址</text>
-				</view>
-				<view class="operation">
-					<view @click.stop="addAddress('edit', item)">
-						<text class="iconfont iconedit"></text>
-						<text class="text">编辑</text>
-					</view>
-					<view class="blank"></view>
-					<view @click.stop="delAddress(item)">
-						<text class="iconfont icondelete"></text>
-						<text class="text">删除</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<button class="add-btn" @click="addAddress('add')">新增地址</button>
-	</view>
-</template>
-
-<script>
-	import {
-		getAddressList,
-		setAddressDefault,
-		addressDel
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				source: 0,
-				addressList: []
-			};
-		},
-		onLoad(option) {
-			this.source = option.source || 0
-			this.loadAddress();
-		},
-		methods: {
-			// 加载地址
-			loadAddress() {
-				getAddressList({
-					page: 1,
-					limit: 100
-				}).then(({
-					data
-				}) => {
-					this.addressList = data;
-				});
-			},
-			// 设为默认地址
-			defaultUp(data, ind) {
-				this.addressList = this.addressList.map((e) => {
-					e.is_default = 0
-					return e
-				})
-				this.addressList[ind].is_default = 1
-				setAddressDefault({
-					id: data.id
-				}).then(({
-					data
-				}) => {
-					this.loadAddress();
-				}).catch((e) => {
-					console.log(e);
-				});
-			},
-			//删除地址
-			delAddress(item) {
-				addressDel({
-					id: item.id
-				}).then(({
-					data
-				}) => {
-					this.$api.msg('删除成功')
-				})
-				let s = this.addressList.indexOf(item);
-				this.addressList.splice(s, 1);
-			},
-			//选择地址
-			checkAddress(item) {
-				if (this.source == 1) {
-					//this.$api.prePage()获取上一页实例,在App.vue定义
-					this.$api.prePage().addressData = item;
-					uni.navigateBack();
-				}
-			},
-			// 添加地址
-			addAddress(type, item) {
-				uni.navigateTo({
-					url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
-				});
-			},
-			//添加或修改成功之后回调
-			refreshList() {
-				// 重新加载地址
-				this.loadAddress()
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page {
-		padding-bottom: 120rpx;
-		padding-top: 20rpx;
-		background-color: $page-color-base;
-	}
-
-	.content {
-		position: relative;
-	}
-
-	.list {
-		align-items: center;
-		padding: 20rpx 30rpx;
-		background: #fff;
-		margin: 20rpx;
-		margin-top: 0;
-
-		.buttom {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			padding-top: 10rpx;
-
-			.checkbox {
-				font-size: 44rpx;
-				line-height: 1;
-				padding: 4rpx;
-				color: $font-color-disabled;
-				background: #fff;
-				border-radius: 50px;
-			}
-
-			.checkbox.checked {
-				color: $base-color;
-			}
-
-			.default-buttom {
-				display: flex;
-				align-items: center;
-			}
-
-			.operation {
-				display: flex;
-				align-items: center;
-
-				.blank {
-					width: 30rpx;
-				}
-			}
-
-			.text {
-				padding-left: 10rpx;
-				font-size: 24rpx;
-				color: #666666;
-			}
-		}
-	}
-
-	.wrapper {
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-		border-bottom: 1px solid #f0f0f0;
-		padding-bottom: 20rpx;
-	}
-
-	.address-box {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-
-		.address {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-		}
-
-		.mobile {
-			font-size: $font-base;
-			color: rgba(51, 51, 51, 1);
-		}
-	}
-
-	.u-box {
-		font-size: $font-base;
-		color: $font-color-light;
-		margin-top: 16rpx;
-
-		.name {
-			margin-right: 30rpx;
-		}
-	}
-
-	.icon-bianji {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		font-size: 40rpx;
-		color: $font-color-light;
-		padding-left: 30rpx;
-	}
-
-	.add-btn {
-		position: fixed;
-		left: 30rpx;
-		right: 30rpx;
-		bottom: 16rpx;
-		z-index: 95;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 690rpx;
-		height: 80rpx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10rpx;
-	}
-</style>

+ 0 - 238
pages/set/addressManage.vue

@@ -1,238 +0,0 @@
-<template>
-	<view class="content">
-		<view class="row b-b">
-			<text class="tit">联系人</text>
-			<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">手机号</text>
-			<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">地址</text>
-			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
-			<text class="iconfont iconlocation"></text>
-		</view>
-		<view class="row b-b">
-			<text class="tit">乡镇</text>
-			<input class="input" type="text" v-model="addressData.town" placeholder="请输入乡镇"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">详细地址</text>
-			<input class="input" type="text" v-model="addressData.area" placeholder="请输入详细地址"
-				placeholder-class="placeholder" />
-		</view>
-
-		<uni-list class="margin-t-20">
-			<uni-list-item title="设为默认" :switch-checked="addressData.default" :show-switch="true" :show-arrow="false"
-				switch-color="#902020" @switchChange="switchChange"></uni-list-item>
-		</uni-list>
-
-		<button class="add-btn" @click="confirm">提交</button>
-	</view>
-</template>
-
-<script>
-	import uniList from '@/components/uni-list/uni-list.vue';
-	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	import uniPopup from '@/components/uni-popup/uni-popup.vue';
-	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
-	import {
-		addressEdit
-	} from '@/api/user.js';
-	export default {
-		components: {
-			uniList,
-			uniListItem,
-			pickerAddress,
-			uniPopup
-		},
-		data() {
-			return {
-				addressDetail: '',
-				addressData: {
-					name: '',
-					mobile: '',
-					address: {
-						province: '',
-						city: '',
-						district: ''
-					},
-					town: '',
-					area: '',
-					default: false
-				}
-			};
-		},
-		onLoad(option) {
-			let title = '新增收货地址';
-			if (option.type === 'edit') {
-				title = '编辑收货地址';
-				let data = JSON.parse(option.data);
-				console.log(data);
-
-				this.addressData = {
-					name: data.real_name,
-					mobile: data.phone,
-					address: {
-						province: data.province,
-						city: data.city,
-						district: data.district
-					},
-					area: data.detail,
-					town: data.town,
-					default: data.is_default == 1,
-					id: data.id
-				};
-				this.addressDetail = data.province + data.city + data.district;
-			}
-			this.manageType = option.type;
-			uni.setNavigationBarTitle({
-				title
-			});
-		},
-		methods: {
-			// 选中城市切换
-			onCityClick({
-				data
-			}) {
-				let address = this.addressData.address;
-				address.province = data[0];
-				address.city = data[1];
-				address.district = data[2];
-				this.addressDetail = data.join('');
-			},
-			//地图选择地址
-			chooseLocation() {
-				uni.chooseLocation({
-					success: data => {
-						console.log(data);
-						this.addressData.addressName = data.name;
-						this.addressData.address = data.name;
-					}
-				});
-			},
-			// 设置是否为默认地址
-			switchChange(e) {
-				this.addressData.default = e.value;
-			},
-			//提交
-			confirm() {
-				let obj = this;
-				let data = this.addressData;
-				if (!data.name) {
-					this.$api.msg('请填写收货人姓名');
-					return;
-				}
-				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
-					this.$api.msg('请输入正确的手机号码');
-					return;
-				}
-				if (!data.address) {
-					this.$api.msg('请在地图选择所在位置');
-					return;
-				}
-				if (!data.town) {
-					this.$api.msg('请填写乡镇信息');
-					return;
-				}
-				if (!data.area) {
-					this.$api.msg('请填写门牌号信息');
-					return;
-				}
-
-				//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
-				addressEdit({
-					real_name: data.name,
-					phone: data.mobile,
-					address: {
-						province: data.address.province,
-						city: data.address.city,
-						district: data.address.district
-					},
-					town: data.town,
-					detail: data.area,
-					is_default: data.default,
-					id: data.id || "",
-					type: 1
-				}).then(function(e) {
-					obj.$api.prePage().refreshList();
-					uni.showToast({
-						title: '提交成功',
-						duration: 2000
-					});
-					setTimeout(function() {
-						uni.navigateBack();
-					}, 800);
-				});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page {
-		background: $page-color-base;
-		padding-top: 16rpx;
-	}
-
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		padding: 0 30rpx;
-		height: 110rpx;
-		background: #fff;
-
-		.tit {
-			flex-shrink: 0;
-			width: 140rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-
-		.input {
-			flex: 1;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
-		}
-	}
-
-	.default-row {
-		margin-top: 16rpx;
-
-		.tit {
-			flex: 1;
-		}
-
-		switch {
-			transform: translateX(16rpx) scale(0.9);
-		}
-	}
-
-	.add-btn {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 690rpx;
-		height: 80rpx;
-		margin: 60rpx auto;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10rpx;
-		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-	}
-
-	.alert-box {
-		background-color: #ffffff;
-	}
-</style>

+ 0 - 106
pages/set/set.vue

@@ -1,106 +0,0 @@
-<template>
-	<view class="container">
-		<uni-list>
-			<uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')"></uni-list-item>
-			<!-- <uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item> -->
-			<uni-list-item title="实名认证" @click="navTo('/pages/set/phone')"></uni-list-item>
-			<uni-list-item title="收货地址" @click="navTo('/pages/set/address')"></uni-list-item>
-		</uni-list>
-	</view>
-</template>
-
-<script>
-	import uniList from "@/components/uni-list/uni-list.vue"
-	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
-	import {
-		logout
-	} from '@/api/set.js';
-	import {
-		mapMutations
-	} from 'vuex';
-	export default {
-		components: {
-			uniList,
-			uniListItem
-		},
-		data() {
-			return {
-
-			};
-		},
-		methods: {
-			...mapMutations('user', ['logout']),
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			},
-			//退出登录
-			toLogout() {
-				let obj = this;
-				uni.showModal({
-					content: '确定要退出登录么',
-					success: (e) => {
-						if (e.confirm) {
-							logout({}).then((e) => {
-								uni.navigateBack();
-							}).catch((e) => {
-								console.log(e);
-							})
-							obj.logout();
-						}
-					}
-				});
-			},
-			//switch切换触发方法
-			switchChange(e) {
-				console.log(e);
-				let statusTip = e.value ? '打开' : '关闭';
-				this.$api.msg(`${statusTip}消息推送`);
-			},
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page {
-		background: $page-color-base;
-	}
-
-	.list-cell {
-		display: flex;
-		align-items: baseline;
-		padding: 20rpx $page-row-spacing;
-		line-height: 60rpx;
-		position: relative;
-		background: #fff;
-		justify-content: center;
-
-		&.log-out-btn {
-			margin-top: 40rpx;
-
-			.cell-tit {
-				color: $uni-color-primary;
-				text-align: center;
-				margin-right: 0;
-			}
-		}
-
-		.cell-tit {
-			flex: 1;
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			margin-right: 10rpx;
-		}
-
-		.cell-tip {
-			font-size: $font-base;
-			color: $font-color-light;
-		}
-
-		switch {
-			transform: translateX(16rpx) scale(.84);
-		}
-	}
-</style>

Some files were not shown because too many files changed in this diff