lhl 2 päivää sitten
vanhempi
commit
57c79cc0fb

+ 17 - 0
api/index.js

@@ -50,3 +50,20 @@ export function orderVerific(data) {
 		data
 	});
 }
+
+
+
+export function getArtList(data,id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'get',
+		data
+	});
+}
+
+export function getDetail(id) {
+	return request({
+		url: '/api/article/details/' + id,
+		method: 'get'
+	});
+}

+ 16 - 0
api/order.js

@@ -150,4 +150,20 @@ export function storeList(data) {
 		method: 'get',
 		data
 	});
+}
+
+export function getStoreInfo(data) {
+	return request({
+		url: '/api/store_info',
+		method: 'get',
+		data
+	});
+}
+
+export function bxOrder(data) {
+	return request({
+		url: '/api/store/submit',
+		method: 'post',
+		data
+	});
 }

+ 1 - 1
components/empty.vue

@@ -36,7 +36,7 @@
 		justify-content: center;
 		flex-direction: column;
 		
-		position: fixed;
+		position: absolute;
 		left: 0;
 		top: 0;
 		right: 0;

+ 6 - 0
pages.json

@@ -332,6 +332,12 @@
 		// 		"navigationBarTitleText": "核销码"
 		// 	}
 		// },
+		{
+			"path": "pages/order/bx",
+			"style": {
+				"navigationBarTitleText": "报修"
+			}
+		},
 		{
 			"path": "pages/order/orderRefund",
 			"style": {

+ 53 - 173
pages/index/artDetail.vue

@@ -1,186 +1,66 @@
 <template>
-	<view class="center">
-		<view class="hotgoods">
-			<view class="hotgoods-item" v-for="item in list" :key="item.id"
-				@click="navto('/pages/product/product?id=' + item.id + '&isfg=1')" style="height: 520rpx;">
-				<view class="image-wrapper">
-					<image class="image" :src="item.image" mode="scaleToFill"></image>
-				</view>
-				<view class="flex"
-					style="flex-direction: column;justify-content: space-between;align-items: flex-start;height: 170rpx;">
-					<view class="title clamp2">{{item.store_name}}</view>
-					<view class="hot-price">
-						<view class="price">
-							<text class="font-size-sm"></text>
-							¥{{ item.price * 1 }}
-						</view>
-						<view class="yuanPrice" v-if="item.ot_price*1 > item.price*1">¥{{ item.ot_price*1 }}</view>
-					</view>
-				</view>
-
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
+	<view class="container">
+	<view class="notice-item">
+		<jyf-parser :html="description" ref="article"></jyf-parser>
+	</view>
 	</view>
 </template>
 
 <script>
-	import {
-		loadIndexs,
-		groom1
-	} from '@/api/index.js';
-	export default {
-		data() {
-			return {
-				id: '',
-				list: [],
-				page: 1,
-				limit: 10,
-				loadingType: 'more'
-			};
+	import { getDetail ,  } from '@/api/index.js';
+	import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
+	export default{
+		components: {
+		   jyfParser
+		 },
+		data(){
+			return{
+				id:'',
+				list:"",
+				description:'',
+				type:0,
+				
+			}
 		},
-		onLoad() {
-			this.loadData();
+		onLoad(option) {
+			this.id = option.id;
+				this.loadData();
 		},
-		methods: {
-			loadData() {
-				this.loadingType = 'loading'
-				groom1().then(res => {
-					this.list = res.data.list
-					this.loadingType = 'noMore'
-				})
-			},
-			navto(url, type = 0) {
-				if (type == 1) {
-					if (!this.hasLogin) {
-						// 保存地址
-						saveUrl();
-						// 登录拦截
-						interceptor();
-					} else {
-						uni.navigateTo({
-							url,
-							fail() {
-								uni.switchTab({
-									url
-								})
-							}
-						})
-					}
-				} else {
-					uni.navigateTo({
-						url,
-						fail() {
-							uni.switchTab({
-								url
-							})
-						}
-					})
-				}
-			
-			},
+		methods:{
+			loadData(){
+				let obj = this;
+			getDetail(obj.id).then(function(e) {
+				obj.list = e.data;
+				if(obj.list.content != null){
+					obj.description = obj.list.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
+				}//小程序商品详情图超出屏幕问题
+			});
+			}
 		}
-	};
+	}
 </script>
 
 <style lang="scss">
-	.hotgoods {
-		margin-top: 38rpx;
-		width: 100%;
-		display: flex;
-		flex-wrap: wrap;
-		padding: 0 20rpx 30rpx;
-		justify-content: space-between;
-
-		.hotgoods-item {
-			width: 345rpx;
-			background-color: #ffffff;
-			border-radius: 12rpx;
-			box-shadow: 0 0 15rpx rgba(0, 0, 0, 0.2);
-			margin-bottom: 15rpx;
-
-			.image-wrapper {
-				width: 345rpx;
-				height: 345rpx;
-				border-radius: 3px;
-				overflow: hidden;
-				position: relative;
-
-				.image-bg {
-					position: absolute;
-					top: 0;
-					left: 0;
-					right: 0;
-					bottom: 0;
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-					z-index: 2;
-				}
-
-				.image {
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-			}
-
-			.title {
-				margin-top: 24rpx;
-				padding: 0 20rpx;
-				font-size: 32rpx;
-				font-weight: 500;
-				color: #333333;
-			}
-
-			.hot-price {
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				// padding: 14rpx 0 30rpx;
-
-				.hotPrice-box {
-					padding: 2rpx 6rpx;
-
-					background: linear-gradient(90deg, #c79a4c, #f9df7f);
-					border-radius: 5rpx;
-					text-align: center;
-					line-height: 28rpx;
-					font-size: 20rpx;
-					font-family: Source Han Sans CN;
-					font-weight: 400;
-					color: #ffffff;
-				}
-
-				.price {
-					margin-left: 10rpx;
-					font-size: 40rpx;
-					color: #ff0000;
-					font-weight: 500;
-
-					.jf {
-						font-size: 20rpx;
-					}
-				}
-
-				.yuanPrice {
-					margin-left: 10rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #999999;
-				}
-
-				.cart-icon {
-					image {
-						width: 44rpx;
-						height: 44rpx;
-					}
-				}
-			}
+page {
+	min-height: 100%;
+	background:#FFFFFF;
+}
+.notice_name {
+	font-size: 35rpx !important;
+	color: #303133;
+	padding: 25rpx 25rpx 0rpx 25rpx;
+	margin-bottom: 25rpx;
+}
+.course-video{
+			width: 100%;
+			height: 500rpx;
 		}
-	}
+.notice-item {
+	width: 100%;
+	height: 100%;
+	color: #666666;
+	padding: 35rpx 35rpx;
+	font-size: 23rpx;
+	padding-bottom: 30rpx;
+}
 </style>

+ 257 - 27
pages/index/storeDetail.vue

@@ -2,44 +2,206 @@
 	<view class="">
 		<view class="top-bg"></view>
 		<view class="flex store">
-			<image class="store-img" src="" mode=""></image>
+			<image class="store-img" :src="store.image" mode=""></image>
 			<view class="store-name">
-				侍草堂官方旗舰店侍草堂官方旗舰店侍
+				{{store.name}}
 			</view>
-			<view class="share">
-				
+			<view class="share" @click="isShowBase = true">
+				分享
 			</view>
 		</view>
 		<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 v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ 'current': tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
 		</view>
+		<scroll-view scroll-y="true" class="good-content" :style="{'height': height}">
+			<view v-if="tabCurrentIndex == 0">
+				<empty v-if="navList[0].loaded === true && navList[0].list.length === 0"></empty>
+				<view class="flex" style="padding: 20rpx 30rpx;flex-wrap: wrap;">
+					<good v-for="fitem in navList[0].list" :item="fitem" @goItem="goItem"></good>
+				</view>
+				<uni-load-more :status="navList[0].loading"></uni-load-more>
+			</view>
+			<view v-if="tabCurrentIndex == 1">
+				<empty v-if="navList[1].loaded === true && navList[1].list.length === 0"></empty>
+				<view class="item">
+					<view class="love-item" v-for="item in navList[1].list" :key="item.id" @click="Jump(item.id)">
+						<image :src="item.image_input[0]" mode=""></image>
+						<view class="content">
+							<view class="title">
+								{{item.title}}
+							</view>
+							<view class="time">
+								{{item.add_time | time}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<uni-load-more :status="navList[1].loading"></uni-load-more>
+
+			</view>
+		</scroll-view>
+		<image v-if="isShowBase" src="/static/img/shareimg.png" mode="" class="sharebase" @click="isShowBase = false">
+		</image>
 	</view>
 </template>
 
 <script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import good from '@/components/good/index.vue'
+	import {
+		getStoreInfo
+	} from '@/api/order.js'
+	import {
+		getArtList
+	} from '@/api/index.js'
+	import {
+		getProducts,
+	} from '@/api/product.js';
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
 	export default {
+		components: {
+			uniLoadMore,
+			empty,
+			good
+		},
 		data() {
 			return {
+				isShowBase: false,
+				height: '',
+				id: 0,
+				store: {},
 				tabCurrentIndex: 0,
-				navList: [
-					{
-						text: '商品'
+				navList: [{
+						text: '商品',
+						page: 1,
+						limit: 10,
+						loading: 'more',
+						loaded: false,
+						list: []
 					},
 					{
-						text: '生活号'
+						text: '生活号',
+						page: 1,
+						limit: 10,
+						loading: 'more',
+						loaded: false,
+						list: []
 					}
 				]
 			}
 		},
+		onReady(res) {
+			var that = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.good-content').boundingClientRect();
+					query.exec(function(res) {
+						that.height = resu.windowHeight - res[0].top + 'px';
+						console.log(that.height, 'height')
+					});
+				},
+				fail: res => {}
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'hasLogin'])
+		},
 		methods: {
-			
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.store.image, // 分享图标
+						desc: obj.store.introduction,
+						title: obj.store.name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					shareLoad(data);
+				}
+			},
+			Jump(id) {
+				uni.navigateTo({
+					url: "/pages/index/artDetail?id=" + id
+				})
+			},
+			tabClick(index) {
+				this.tabCurrentIndex = index
+				this.getList()
+			},
+			getStoreInfo() {
+				getStoreInfo({
+					id: this.id
+				}).then(res => {
+					this.store = res.data.list
+					// #ifdef H5
+					this.shareDate()
+					// #endif
+				})
+			},
+			getList() {
+				let that = this
+				let item = that.navList[that.tabCurrentIndex]
+				if (item.loading == 'noMore' || item.loading == 'loading') return;
+				item.loading = 'loading'
+				if (that.tabCurrentIndex == 0) {
+					getProducts({
+						page: item.page,
+						limit: item.limit,
+						mer_id: that.id
+					}).then(res => {
+						item.list = item.list.concat(res.data)
+						if (res.data.length == item.limit) {
+							item.loading = 'more'
+						} else {
+							item.loading = 'noMore'
+						}
+						item.loaded = true
+					})
+				} else {
+					getArtList({
+						page: item.page,
+						limit: item.limit,
+						mer_id: that.id
+					}, 1).then(res => {
+						item.list = item.list.concat(res.data)
+						if (res.data.length == item.limit) {
+							item.loading = 'more'
+						} else {
+							item.loading = 'noMore'
+						}
+						item.loaded = true
+					})
+				}
+			}
 		},
-		onLoad() {
-			
+		onLoad(opt) {
+			this.id = opt.id
+			this.getStoreInfo()
+			this.getList()
 		},
-		onShow() {
-			
-		}
+		onShow() {}
 	}
 </script>
 
@@ -51,6 +213,7 @@
 		// top: 0;
 		width: 100%;
 	}
+
 	.store {
 		width: 706rpx;
 		height: 170rpx;
@@ -58,6 +221,7 @@
 		border-radius: 14rpx;
 		margin: -100rpx auto 20rpx;
 		padding: 30rpx;
+
 		// * {
 		// 	flex-shrink: 0;
 		// }
@@ -67,6 +231,7 @@
 			border-radius: 10rpx;
 			flex-shrink: 0;
 		}
+
 		&-name {
 			font-weight: bold;
 			font-size: 26rpx;
@@ -74,14 +239,20 @@
 			flex-grow: 1;
 			padding: 0 17rpx;
 		}
+
 		.share {
 			flex-shrink: 0;
 			width: 103rpx;
 			height: 47rpx;
 			background: linear-gradient(89deg, #0EE48C, #00BE8C);
 			border-radius: 10rpx;
+			text-align: center;
+			font-size: 24rpx;
+			color: #FFFFFF;
+			line-height: 47rpx;
 		}
 	}
+
 	.navbar {
 		margin-top: 20rpx;
 		display: flex;
@@ -90,6 +261,7 @@
 		background: #fff;
 		border-radius: 20rpx 20rpx 0 0;
 		overflow: hidden;
+
 		.nav-item {
 			flex: 1;
 			display: flex;
@@ -99,19 +271,77 @@
 			font-size: 15px;
 			color: #999999;
 			position: relative;
-			.current {
-				color: #000;
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
+
+		}
+
+		.current {
+			color: #0EE48C, ;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
 			}
 		}
 	}
+
+	.item {
+		background-color: #fff;
+
+	}
+
+	.love-item {
+		margin: 0 auto;
+		width: 702rpx;
+		height: 208rpx;
+		border-bottom: 1px solid #EEEEEE;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+
+		image {
+			width: 160rpx;
+			height: 160rpx;
+			background-color: #eee;
+			flex-shrink: 0;
+		}
+
+		.content {
+			height: 160rpx;
+			padding-left: 16rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+
+			.title {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				// line-height: 39px;
+			}
+
+			.time {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+
+	}
+
+	.sharebase {
+		display: block;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+	}
 </style>

+ 11 - 11
pages/money/pay.vue

@@ -183,17 +183,17 @@ export default {
 					uni.hideLoading();
 					obj.payLoding = false;
 					console.log(e);
-					obj.logout()
-					uni.showModal({
-						title:'温馨提醒',
-						content: '您当前的账号登录已过期,请先登录。',
-						showCancel:false,
-						complete() {
-							uni.switchTab({
-								url:'/pages/index/index'
-							})
-						}
-					})
+					// obj.logout()
+					// uni.showModal({
+					// 	title:'温馨提醒',
+					// 	content: '您当前的账号登录已过期,请先登录。',
+					// 	showCancel:false,
+					// 	complete() {
+					// 		uni.switchTab({
+					// 			url:'/pages/index/index'
+					// 		})
+					// 	}
+					// })
 				});
 		},
 		// 支付成功跳转

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 77 - 0
pages/order/bx.vue


+ 42 - 38
pages/order/createOrder.vue

@@ -1,9 +1,9 @@
 <template>
 	<view>
-		<!-- <view class="navbar">
+		<view class="navbar" v-if="is_pick == 1">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item"
 				:class="{ current: tabCurrentIndex === item.state }" @click="tabClick(item.state)">{{ item.text }}</view>
-		</view> -->
+		</view>
 
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" class="address-section" url="/pages/set/address?source=1">
@@ -28,21 +28,21 @@
 
 			<image class="a-bg" :src="addressImg"></image>
 		</navigator>
-		<!-- <view class="address-section">
+		<view class="address-section" v-if="tabCurrentIndex == 1">
 			<view id="list-box">
-				<view class="chose">
+				<!-- <view class="chose">
 					<view class="title">选择门店</view>
 					<view class="chose-name" @click.stop="selectPoint" >
 						选择门店
 					</view>
-				</view>
-				<view class="stores-wrapper" v-if="checkedPoint && checkedPoint.name" @click.stop="selectPoint">
+				</view> -->
+				<view class="stores-wrapper" v-if="checkedPoint && checkedPoint.name" >
 					<view class="store">
 						<view class="store-logo">
 							<image :src="checkedPoint.image" mode=""></image>
 							<text class="store-name clamp">{{ checkedPoint.name }}</text>
 						</view>
-						<template v-if="checkedPoint.detailed_address != '测试'">
+						<template >
 							<view class="store-addr store-base">
 								地址:
 								<text>{{ checkedPoint.detailed_address }}</text>
@@ -68,7 +68,7 @@
 				</view>
 			</view>
 			<image class="a-bg" :src="addressImg"></image>
-		</view> -->
+		</view>
 
 		<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
 			<!-- <view class="g-header b-b">
@@ -183,7 +183,7 @@
 							<image :src="store.image" mode=""></image>
 							<text class="store-name clamp">{{ store.name }}</text>
 						</view>
-						<template v-if="store.detailed_address != '测试'">
+						<template >
 							<view class="store-addr store-base">
 								地址:
 								<text>{{ store.detailed_address }}</text>
@@ -207,7 +207,8 @@
 		confirm,
 		computedOrderkey,
 		couponsOrder,
-		storeList
+		storeList,
+		getStoreInfo
 	} from '@/api/order.js';
 	import {
 		getUserInfo
@@ -278,20 +279,14 @@
 				integralShow: false, //是否显示积分抵扣金额
 				payType: true, //是否可支付
 				pinkid: '' ,//保存拼团商品id
-				affiliation_uid: 0,
-				is_level: 0,
-				is_one: 0,
+				is_pick: 0,
+				store_id: 0,
+				yfmodel: 0,
 			};
 		},
 		onLoad(option) {
-			if(option.is_level) {
-				this.is_level = option.is_level
-			}
-			if(option.is_one) {
-				this.is_one = option.is_one
-			}
-			if(option.affiliation_uid) {
-				this.affiliation_uid = option.affiliation_uid
+			if(option.is_pick) {
+				this.is_pick = option.is_pick
 			}
 			// 判断是否为拼团商品
 			if (option.type == 'pink') {
@@ -306,9 +301,11 @@
 				this.is_integral = option.is_integral
 			}
 			this.userinfo();
-			// if(!this.store.id) {
-			// 	this.storeList()
-			// }else {
+			if(option.store_id) {
+				this.store_id = option.store_id
+				this.storeList()
+			}
+			// else {
 			// 	this.checkedPoint = this.store
 			// }
 			this.real_name = uni.getStorageSync('real_name') || ''
@@ -326,6 +323,9 @@
 		computed: {
 			Postage() {
 				let money = +this.moneyAll.storePostage;
+				if(this.yfmodel == 1) {
+					return '到付'
+				}
 				if (money == 0) {
 					return '免运费';
 				} else {
@@ -339,10 +339,12 @@
 		},
 		methods: {
 			storeList() {
-				storeList().then(res => {
+				getStoreInfo({
+					id: this.store_id
+				}).then(res => {
 					console.log(res)
-					this.store_list = res.data.list
-					this.checkedPoint = this.store_list[0]
+					// this.store_list = res.data.list
+					this.checkedPoint = res.data.list
 				})
 			},
 			// 添加商品到购物车
@@ -392,6 +394,7 @@
 						// 获取支付金额
 						this.payPrice = +data.result.pay_price;
 						this.integralMoney = data.result.deduction_price;
+						this.yfmodel = data.result.collect_on_delivery
 					})
 					.catch(e => {
 						console.log(e);
@@ -457,19 +460,20 @@
 			},
 			// 提交订单
 			submit() {
-				if (this.checkedPoints && this.shopList.length > 1) {
-					this.$api.msg('积分商品只可单件购买');
-					return false;
-				}
+				// if (this.checkedPoints && this.shopList.length > 1) {
+				// 	this.$api.msg('积分商品只可单件购买');
+				// 	return false;
+				// }
 				if (this.tabCurrentIndex == 0) {
 					if (!this.addressData.real_name) {
 						this.$api.msg('请选择收货地址');
 						return false;
 					}
-					// if(!this.checkedPoint.id) {
-					// 	return this.$api.msg('请选择门店');
-					// }
+					
 				}else {
+					if(!this.checkedPoint.id) {
+						return this.$api.msg('请选择门店');
+					}
 					if(!this.real_name) {
 						this.$api.msg('请填写提货人');
 						return false;
@@ -495,10 +499,10 @@
 				});
 			},
 			selectPoint() {
-				// this.$refs.popupstore.open()
-				uni.navigateTo({
-					url: '/pages/zero/order'
-				})
+				this.$refs.popupstore.open()
+				// uni.navigateTo({
+				// 	url: '/pages/zero/order'
+				// })
 			},
 			popchange(e) {
 				this.showbtn = !e.show

+ 17 - 10
pages/order/order.vue

@@ -56,10 +56,11 @@
 						<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> -->
+							<!-- v-if="item.status == 3 || item.status == 4" -->
+							<button v-if="item.status == 2 || item.status == 3" class="action-btn" @click.stop="goXiu(item)">报修</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> -->
-							<button v-if="tabCurrentIndex != 4 && tabCurrentIndex != 2" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
+							<!-- <button v-if="tabCurrentIndex != 4 && tabCurrentIndex != 2" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
 						</view>
 					</view>
 
@@ -115,14 +116,14 @@ export default {
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
-				{
-					state: 5,
-					text: '退款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
+				// {
+				// 	state: 5,
+				// 	text: '退款',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// }
 			]
 		};
 	},
@@ -151,6 +152,12 @@ export default {
 	},
 	// #endif
 	methods: {
+		goXiu(item) {
+			console.log(item);
+			uni.navigateTo({
+				url:'/pages/order/bx?id=' + item.order_id
+			})
+		},
 		// 转换金额为数字
 		moneyNum(value){
 				return +value;

+ 2 - 1
pages/order/orderDetail.vue

@@ -61,7 +61,8 @@
 		</view>
 		<view class="row b-b flex">
 			<text class="tit">邮费</text>
-			<view class="input">{{ item.pay_postage > 0 ? '¥' + item.pay_postage : '免邮费' }}</view>
+			<view class="input" v-if="item.collect_on_delivery == 0">{{ item.pay_postage > 0 ? '¥' + item.pay_postage : '免邮费' }}</view>
+			<view class="input" v-else>到付</view>
 		</view>
 		<view class="row b-b flex" v-if="item.coupon_id > 0">
 			<text class="tit">优惠券</text>

+ 38 - 10
pages/product/product.vue

@@ -41,7 +41,7 @@
 			</view>
 			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
 		</view>
-		<view class="c-list">
+		<!-- <view class="c-list">
 			<view class="c-row b-b" @click="toggleSpec">
 				<text class="tit">购买数量</text>
 				<view class="con">
@@ -49,12 +49,15 @@
 				</view>
 				<text class="iconfont iconenter"></text>
 			</view>
-			<!-- <view class="c-row b-b" v-if="goodsObjact.is_integral == 1 && goodsType == 0">
-				<text class="tit">积分</text>
-				<view class="bz-list con">
-					<text>最高抵扣¥{{ moneyNum(goodsObjact.use_max_integral) == 0 ? moneyNum(goodsObjact.price) : moneyNum(goodsObjact.use_max_integral) }}</text>
-				</view>
-			</view> -->
+		</view> -->
+		<view class="store flex" v-if="storeObjact && storeObjact.id" @click="goStore()">
+			<image :src="storeObjact.image" mode="" class="store-logo"></image>
+			<view class="store-info">
+				{{storeObjact.name}}
+			</view>
+			<view class="store-btn">
+				进店 >
+			</view>
 		</view>
 		<view class="detail-desc">
 			<view class="d-header"><text>商品详情</text></view>
@@ -276,6 +279,10 @@
 			...mapState('user', ['userInfo', 'hasLogin'])
 		},
 		methods: {
+			goStore() {
+				uni.setStorageSync('store',this.storeObjact)
+				this.navTo('/pages/index/storeDetail?id=' + this.storeObjact.id)
+			},
 			navTo(url) {
 				uni.navigateTo({
 					url
@@ -496,9 +503,7 @@
 									// 跳转到支付页
 									uni.navigateTo({
 										url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj
-											.goodsType + '&is_pack=' + obj.goodsObjact.is_pack + '&affiliation_uid=' +
-											obj.goodsObjact.affiliation_uid + '&is_level=' + obj.goodsObjact.is_level +
-											'&is_integral=' + obj.goodsObjact.is_integral + '&is_one=' + obj.goodsObjact.is_one
+											.goodsType + '&is_pick=' + obj.goodsObjact.is_pick + '&store_id=' + (obj.storeObjact.id || 0)
 									});
 								}
 								if (obj.type == 2) {
@@ -1318,4 +1323,27 @@
 		width: 100% !important;
 		height: auto;
 	}
+	.store {
+		width: 750rpx;
+		justify-content: flex-start;
+		padding: 20rpx;
+		background-color: #fff;
+		margin-top: 20rpx;
+		&-logo {
+			border-radius: 15rpx;
+			width: 80rpx;
+			height: 80rpx;
+		}
+		&-info {
+			padding-left: 20rpx;
+			font-size:32rpx;
+			color: #000;
+			font-weight: bold;
+			flex-grow: 1;
+		}
+		&-btn {
+			justify-self: flex-end;
+			font-size: 24rpx;
+		}
+	}
 </style>

+ 5 - 4
pages/set/userinfo.vue

@@ -15,9 +15,9 @@
 			<text class="tit">ID</text>
 			<input class="input" type="text" disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
 		</view>
-		<view class="row" v-if="userInfo.tjr">
-			<text class="tit">推荐人</text>
-			<input class="input" type="text" disabled="true" v-model="userInfo.tjr" placeholder-class="placeholder" />
+		<view class="row" >
+			<text class="tit">手机号</text>
+			<input class="input" type="text" disabled="true" v-model="userInfo.phone" placeholder="请输入手机号" placeholder-class="placeholder" />
 		</view>
 		<view class="add-btn tj" @click="confirm">提交</view>
 		<view class="add-btn" @click="cancel">退出</view>
@@ -73,7 +73,8 @@
 			confirm() {
 				userEdit({
 						avatar: this.userInfo.avatar,
-						nickname: this.userInfo.nickname
+						nickname: this.userInfo.nickname,
+						phone: this.userInfo.phone
 					})
 					.then(e => {
 						this.$api.msg('修改成功');

+ 14 - 13
pages/user/award.vue

@@ -15,7 +15,7 @@
 				<!-- 佣金转余额 -->
 				<view class="money-btn" @click="navto('/pages/user/yjzye?type=1')"></view>
 				<!-- 佣金提现 -->
-				<view class="money-btn"  @click="navto('/pages/user/withdrawal')"></view>
+				<view class="money-btn"  @click="navto('/pages/user/withdrawal')">佣金提现</view>
 			</view>
 		</view>
 		<!-- <view class="info-box flex">
@@ -390,18 +390,19 @@ page {
 		font-size: 15px;
 		color: #999999;
 		position: relative;
-		.current {
-			color: #000;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid #fe5b38;
-			}
+		
+	}
+	.current {
+		color: #000;
+		&:after {
+			content: '';
+			position: absolute;
+			left: 50%;
+			bottom: 0;
+			transform: translateX(-50%);
+			width: 44px;
+			height: 0;
+			border-bottom: 2px solid #fe5b38;
 		}
 	}
 }

+ 22 - 7
pages/user/shareQrCode.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="andr-shQ-padL30 andr-shQ-padR30 andr-shQ-Flex andr-shQ-FlexDirC">
-		<view class="andr-shQ-w100B andr-shQ-Flex andr-shQ-JusCC">
-			<swiper class="imgw750h375 matop" :indicator-dots="false" :current="current" @change="currentChange">
+		<view class="andr-shQ-w100B andr-shQ-Flex andr-shQ-JusCC" >
+			<swiper class="imgw750h375 matop" :indicator-dots="false" :current="current" @change="currentChange" :style="{'height': maxHeight}">
 				<!-- #ifdef H5 -->
 				<swiper-item v-for="(item, index) in rwmListArr" :key="index">
-					<image :src="item.wap_poster" mode="aspectFit" class="imgw750h375" />
+					<image :src="item.wap_poster" mode="widthFix" class="imgw750h375" />
 				</swiper-item>
 				<!-- #endif -->
 				<!-- #ifdef MP-WEIXIN -->
@@ -47,7 +47,8 @@
 			return {
 				rwmListArr: [],
 				current: 0,
-				imgSrc: ''
+				imgSrc: '',
+				maxHeight: '100vh',
 			};
 		},
 		onLoad(option) {
@@ -150,6 +151,18 @@
 					if (e.status == 200) {
 						console.log(e.data)
 						self.rwmListArr = e.data;
+						uni.getImageInfo({
+							src: self.rwmListArr[0].wap_poster,
+							success: function(res) {
+								const imageWidth = res.width;
+								const imageHeight = res.height;
+								self.maxHeight  = (750 / imageWidth * imageHeight).toFixed(2) + 'rpx'
+								console.log(self.maxHeight,'self.maxHeight');
+							},
+							fail: function(err) {
+								self.maxHeight = '100vh'
+							}
+						});
 						// #ifdef H5
 						self.imgSrc = self.rwmListArr[0].wap_poster;
 						// #endif
@@ -258,9 +271,11 @@
 	page {
 		height: 100%;
 	}
+
 	.imgw750h375 {
-		width: 100%;
-		height: 958rpx;
+		width: 750rpx;
+		// height: 958rpx;
+		// height: calc(100vh - 44px);
 	}
 
 	.matop {
@@ -342,4 +357,4 @@
 	}
 
 	/* #endif */
-</style>
+</style>

+ 213 - 0
pages/user/sj.vue

@@ -0,0 +1,213 @@
+<template>
+	<view class="content">
+		<template v-if="list.length > 0">
+			<view class="u-wrap flex" v-for="item in list" @click="changeLevel(item)">
+				<view class="">
+					<view class="name flex" v-if="is_buy == 0">
+						{{item.name}} 
+						<image :src="item.icon" mode="heightFix"></image>
+					</view>
+					<view class="name flex" v-else>
+						开店次数:{{item.open_store}} 
+					</view>
+					<view class=""  v-if="is_buy == 0">
+						价格:{{(item.money*1 - (userInfo.pay_store*1 || 0)).toFixed(2) }}
+					</view>
+					<view class=""  v-else>
+						价格:{{item.money*1 }}
+					</view>
+					<!-- <view class="">
+						下一等级:XXX
+					</view> -->
+					<view class="choose choosed" v-if="chooseLevel.id == item.id">
+						
+					</view>
+					<view class="choose" v-else >
+						
+					</view>
+				</view>
+			</view>
+			<view class="btn flex" @click="upLevel">
+				{{is_buy == 0? '立即升级':'立即购买'}}
+			</view>
+		</template>
+		<empty v-if="list.length == 0"></empty>
+		
+	</view>
+</template>
+
+<script>
+	import empty from '@/components/empty';
+	import {
+		getUserInfo,
+	} from '@/api/user.js';
+	import { getPayGrade,upLevel,upStore} from '@/api/work.js'
+	export default {
+		components: {
+			empty
+		},
+		data() {
+			return {
+				is_buy: 0,
+				loading: true,
+				list: [],
+				chooseLevel: {id: 0},
+				userInfo: {level: 0},
+			}
+		},
+		onLoad(opt) {
+			if(opt.is_buy) {
+				this.is_buy = opt.is_buy
+			}
+			this.getUserInfo()
+		},
+		onShow() {
+			
+		},
+		onReachBottom() {
+			
+		},
+		onReady() {
+			
+		},
+		methods: {
+			changeLevel(item) {
+				this.chooseLevel = item
+			},
+			getPayGrade() {
+				let that = this
+				getPayGrade().then(res => {
+					if(that.is_buy == 1) {
+						this.list = res.data.filter(item => {
+							return item.id <= that.userInfo.level
+						})
+					}else {
+						this.list = res.data.filter(item => {
+							return item.id > that.userInfo.level
+						})
+					}
+					this.loading = false
+				})
+			},
+			getUserInfo() {
+				getUserInfo().then(res => {
+					this.userInfo = res.data
+					this.getPayGrade()
+				})
+			},
+			upLevel() {
+				let that = this
+				if(that.loading) return;
+				if(!that.chooseLevel.id) {
+					if(that.is_buy == 1) {
+						return that.$api.msg('请选择需要购买的开店次数')
+					}else {
+						return that.$api.msg('请选择需要升级的等级')
+					}
+				}
+				that.loading = true
+				uni.showModal({
+					content:that.is_buy == 1? ('您确定要购买' + that.chooseLevel.open_store+ '次开店次数'): ('您确定要升级为' + that.chooseLevel.name + '?'),
+					complete(res) {
+						if(res.confirm) {
+							uni.showLoading({
+								title:'支付中...'
+							})
+							let buyLevel;
+							if(that.is_buy == 1) {
+								buyLevel = upStore
+							}else {
+								buyLevel = upLevel
+							}
+							buyLevel({
+								from: 'H5',
+								pay_type: 'yue',
+								level_id: that.chooseLevel.id
+							}).then(res => {
+								that.$set(that,'chooseLevel',{id: 0})
+								console.log(res)
+								uni.hideLoading()
+								that.$success(that.is_buy == 0? '升级成功':'购买成功')
+								that.getUserInfo()
+								// that.getPayGrade()
+							}).catch(err => {
+								that.loading = false
+								uni.hideLoading()
+								
+							})
+						}
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		// background-image: url('../../static/work/sj-bg.png');
+		background-color: #fff;
+		background-size: 100% 100%;
+		background-repeat: no-repeat;
+		height:  calc(100vh - 44px);
+		padding-top: 20rpx;
+	}
+	.btn {
+		width: 603rpx;
+		height: 92rpx;
+		background: linear-gradient(0deg, rgba(255,109,11,0.96), rgba(255,179,53,0.96));
+		border-radius: 46rpx;
+		border: 1px solid #FFFFFF;
+		margin: 50rpx auto;
+		justify-content: center;
+		font-weight: bold;
+		font-size: 35rpx;
+		color: #FFFFFF;
+	}
+	.u-wrap {
+		width: 672rpx;
+		height: 181rpx;
+		background: #FFF7E5;
+		box-shadow: 5rpx 7rpx 6rpx 0rpx rgba(253,170,113,0.29);
+		border-radius: 36rpx;
+		border: 2px solid #FFFFFF;
+		margin:20rpx auto;
+		justify-content: flex-start;
+		padding-left: 50rpx;
+		position: relative;
+		.logo {
+			width: 130rpx;
+			height: 130rpx;
+			margin-right: 23rpx;
+			background-color: #eee;
+			border-radius: 50%;
+		}
+		font-weight: bold;
+		font-size: 24rpx;
+		color: #30333B;
+		.name {
+			font-size: 30rpx;
+			padding-bottom: 20rpx;
+			image {
+				height: 38rpx;
+				margin-left: 10rpx;
+			}
+		}
+	}
+	.choose {
+		width: 41rpx;
+		height: 41rpx;
+		background: #F6F6F6;
+		border: 1px solid #CCCCCC;
+		border-radius: 50%;
+		position: absolute;
+		bottom: 50rpx;
+		right: 24rpx;
+	}
+	.choosed {
+		background-image: url('../../static/work/choose.png');
+		background-size: 100% 100%;
+		border: none;
+	}
+</style>

+ 7 - 25
pages/user/user.vue

@@ -18,9 +18,6 @@
 			<view class="uid" v-if="userInfo && userInfo.uid">
 				UID:{{userInfo.uid}}
 			</view>
-			<view class="nickname" v-if="userInfo && userInfo.uid && user.group_level_name">
-				{{user.group_level_name}}
-			</view>
 		</view>
 		<view class="user-money flex">
 			
@@ -29,14 +26,14 @@
 				<view class="user-money-num">{{ userInfo.now_money*1 || 0 }}</view>
 			</view>
 			<view class="user-xian"></view>
-<!-- 			<view class="user-money-item" @click="navTo('/pages/user/award')">
+			<view class="user-money-item" >
 				<view class="user-money-font">我的积分</view>
 				<view class="user-money-num">{{ userInfo.integral*1 || 0 }}</view>
-			</view> -->
+			</view>
 			<view class="user-xian"></view>
 			<view class="user-money-item" @click="navTo('/pages/user/award')">
 				<view class="user-money-font">我的佣金</view>
-				<view class="user-money-num">{{ userInfo.integral*1 || 0 }}</view>
+				<view class="user-money-num">{{ userInfo.brokerage_price*1 || 0 }}</view>
 			</view>
 		</view>
 		<view class="main-box">
@@ -296,24 +293,8 @@
 						data
 					}) => {
 						console.log(data.nickname)
-						getUser().then(res => {
-							this.user = res.data
-						})
 						this.getLevelList()
 						this.setUserInfo(data);
-						console.log('phone', data.phone);
-						if (!data.phone) {
-							uni.showModal({
-								title: '提示',
-								showCancel: false,
-								content: '您当前账号未绑定手机号,请绑定手机号后操作',
-								success() {
-									uni.navigateTo({
-										url: '/pages/set/phone'
-									})
-								},
-							})
-						}
 					})
 					.catch(e => {
 						console.log(e);
@@ -631,7 +612,7 @@
 		padding: 20rpx 0;
 
 		.user-money-item {
-			width: 30%;
+			width: 45%;
 			display: flex;
 			flex-direction: column;
 			justify-content: center;
@@ -932,6 +913,7 @@
 		height: 429rpx;
 		flex-direction: column;
 		justify-content: center;
+		
 
 		.avt-wrap {
 			width: 133rpx;
@@ -974,14 +956,14 @@
 			text-align: center;
 			font-weight: bold;
 			font-size: 30rpx;
-			color: #333333;
+			color: #fff;
 			margin: 15rpx auto 13rpx;
 		}
 
 		.uid {
 			text-align: center;
 			font-size: 22rpx;
-			color: #333333;
+			color: #fff;
 		}
 	}
 

+ 134 - 86
pages/user/withdrawal.vue

@@ -5,7 +5,7 @@
 			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现金</text>
+					<text class="text">可提现金</text>
 				</view>
 			</view>
 		</view>
@@ -13,63 +13,97 @@
 		<view class="row-box">
 			<view class="title">提现金额</view>
 			<view class="row">
-				<text class="tit"></text>
-				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'"
+				<text class="tit"></text>
+				<input class="input" type="number" v-model="withdrawal" placeholder="请输入提现金额"
 					placeholder-class="placeholder" />
 				<view class="buttom" @click="withdrawal = money">全部提现</view>
 			</view>
 		</view>
-		<template v-if="auth_status == 0">
-			<view class="list">
-				<radio-group @change="tabRadio">
-					<label>
-						<view class="box">
-							<view class="icon iconfont iconzhifubao"></view>
-							<view class="title-box">
-								<view class="title">
-									<text v-if="aliData.fullname">提现至支付宝</text>
-									<text v-else>请创建支付宝账号</text>
-								</view>
-								<view class="node">
-									<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
-								</view>
+		<view class="list">
+			<radio-group @change="tabRadio">
+				<!-- <label>
+					<view class="box">
+						<view class="icon iconfont iconweixin1"></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="weixin_no">提现至微信</text>
+								<text v-else>请创建微信账号</text>
 							</view>
-							<view class="right">
-								<radio value="alipay" color="#007c92" :checked="type == 'alipay'" />
+							<view class="node">
+								<text v-if="weixin_no">账号({{ weixin_no }})</text>
 							</view>
 						</view>
-					</label>
-					<label>
-						<view class="box">
-							<view class="icon iconfont">
-								<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						<view class="right">
+							<radio value="weixin" color="#c29963" :checked="type == 'weixin'" />
+						</view>
+					</view>
+				</label> -->
+				<!-- <label>
+					<view class="box">
+						<view class="icon iconfont iconzhifubao"></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="aliData.name">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
 							</view>
-							<view class="title-box">
-								<view class="title">
-									<text v-if="bankInfo.fullname">{{ bankInfo.bank + ' ' + bankInfo.bankno }}</text>
-									<text v-else>请创建银行账号</text>
-								</view>
-								<view class="node">
-									<text v-if="bankInfo.fullname">真实姓名({{ bankInfo.fullname }})</text>
-								</view>
+							<view class="node">
+								<text v-if="aliData.name">真实姓名({{ aliData.name }})</text>
 							</view>
-							<view class="right">
-								<radio value="bank" color="#007c92" :checked="type == 'bank'" />
+						</view>
+						<view class="right">
+							<radio value="alipay" color="#ff4072" :checked="type == 'alipay'" />
+						</view>
+					</view>
+				</label> -->
+				<!-- <label>
+					<view class="box">
+						<view class="icon iconfont">
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						</view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="bankInfo.bankno">{{ bankInfo.bank + ' ' + bankInfo.bankno }}</text>
+								<text v-else>请创建银行账号</text>
+							</view>
+							<view class="node">
+								<text v-if="bankInfo.fullname">真实姓名({{ bankInfo.fullname }})</text>
 							</view>
 						</view>
-					</label>
-				</radio-group>
-			</view>
-			<button class="add-btn modified" @click="navTo('/pages/user/sqdl')">提现账号管理</button>
-		</template>
+						<view class="right">
+							<radio value="bank" color="#ff4072" :checked="type == 'bank'" />
+						</view>
+					</view>
+				</label> -->
+			</radio-group>
+		</view>
 		
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">银行卡号</text>
+			<input class="input" type="text" v-model="bankInfo.cardnum" placeholder="请输入银行卡号"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">姓名</text>
+			<input class="input" type="text" v-model="bankInfo.name" placeholder="请输入姓名"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">所属银行</text>
+			<input class="input" type="text" v-model="bankInfo.bankname" placeholder="请输入所属银行"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">所属支行</text>
+			<input class="input" type="text" v-model="bankInfo.subbranch" placeholder="请输入所属支行"
+				placeholder-class="placeholder" />
+		</view>
+		<!-- <button class="add-btn modified" @click="navTo('/pages/user/sqdl')">银行卡管理</button> -->
 		<button class="add-btn up" @click="confirm">提交申请</button>
 		
 	</view>
 </template>
 
 <script>
-	import { loadIndexs } from '@/api/index.js'
 	import {
 		getLevelList,
 		bank,
@@ -87,8 +121,7 @@
 	} from '@/api/wallet.js';
 	import {
 		orderData,
-		getUserInfo,
-		getAli
+		getUserInfo
 	} from '@/api/user.js';
 	import {
 		mapState,
@@ -107,11 +140,12 @@
 		},
 		data() {
 			return {
-				auth_status: '1',
-				bankData: {
-					
+				bankInfo: {
+					name: '',
+					bankname: '',
+					cardnum: '',
+					subbranch: ''
 				},
-				bankInfo: {},
 				weixin_no: '',
 				type: 'bank', //提现方式
 				money: '0.00', //可提现金额
@@ -127,6 +161,7 @@
 				bank_name: '',
 				bank_belonging: '',
 				jftype: 0,
+				typee: 0
 			};
 		},
 		onLoad(options) {
@@ -138,38 +173,42 @@
 			
 		},
 		onShow() {
-			this.dataUp()
-			this.getIndex()
+			// this.dataUp()
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-			getIndex() {
-				loadIndexs().then(res => {
-					this.auth_status = res.data.auth_status
-				})
-			},
 			dataUp() {
-				let obj = this
-				bankInfo().then(res => {
-					if(res.data && res.data.id) {
-						this.bankInfo = res.data
-					}
-				})
-				getAli().then(res => {
-					if (res.data && res.data.id) {
-						this.aliData = res.data
-					}
-				})
+				// let obj = this
+				// bankInfo().then(res => {
+				// 	// console.log(res.data.);
+				// 	// console.log(res,res.dat);
+				// 	if(res.data && res.data.id) {
+				// 		// console.log('dd');
+				// 		this.bankInfo = res.data
+				// 	}
+				// })
 			},
 			// 加载余额信息
 			async loadData() {
-				
+				let bankInfo = uni.getStorageSync('bankInfo')
+				if(bankInfo && bankInfo.name) {
+					this.bankInfo = bankInfo
+				}
 				extractBank({}).then(({
 					data
 				}) => {
+					console.log(data, 'data+++++++++')
 					this.minPrice = data.minPrice;
-					this.money = data.brokerage_price
+					// if(this.typee == 1) {
+					// 	this.money = data.brokerage_price_1 || 0
+					// }else {
+					// 	this.money = data.brokerage_price
+					// }
+					
 				});
+				getUserInfo().then(res => {
+					this.money = res.data.brokerage_price
+				})
 				
 			},
 			// 跳转
@@ -185,13 +224,20 @@
 			// 提交
 			confirm() {
 				let obj = this
+				if(this.loading) {
+					return
+				}
 				let data = {
 					extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
-					money: this.withdrawal, //金额
-					type: 0 //0佣金1余额
+					money: this.withdrawal * 1, //金额
+					// type: 0 ,//0佣金1余额
+					// balance_type: this.typee
 				};
 				
-				if (this.withdrawal < this.minPrice) {
+				if (!this.withdrawal) {
+					return this.$api.msg('请输入提现金额')
+				}
+				if (this.withdrawal * 1  < this.minPrice * 1) {
 					uni.showToast({
 						title: '提现金额不可少于' + this.minPrice,
 						duration: 2000,
@@ -201,37 +247,39 @@
 					return;
 				}
 				if (this.type == 'alipay') {
-					data.name = this.aliData.fullname || '';
-					data.alipay_code = this.aliData.alino || '';
-					if(!data.name) {
-						return this.$api.msg('请完善支付宝信息')
-					}
+					console.log('alipay');
+					data.name = this.aliData.name;
+					data.alipay_code = this.aliData.payment;
 				}
 				if (this.type == 'bank') {
-					console.log('bank');
-					data.name = this.bankInfo.fullname;
-					data.bankname = this.bankInfo.bank + this.bankInfo.subbranch;
-					data.cardnum = this.bankInfo.bankno;
-					if(!data.name) {
-						return this.$api.msg('请完善银行卡信息')
-					}
+					data.name = this.bankInfo.name;
+					data.bankname = this.bankInfo.bankname ;
+					data.cardnum = this.bankInfo.cardnum;
+					data.subbranch = this.bankInfo.subbranch
 				}
 				if(this.type == 'weixin') {
 					console.log('weixin');
 					data.weixin = this.weixin_no
+					
 				}
-
+				this.loading = true
+				uni.showLoading({
+					title:'提交中...'
+				})
 				extractCash(data)
 					.then(e => {
+						uni.setStorageSync('bankInfo',this.bankInfo)
 						obj.loadData()
-						
+						uni.hideLoading()
 						uni.showToast({
 							title: '提交成功',
 							duration: 2000,
 							position: 'top'
 						});
+						obj.loading = false
 					})
 					.catch(e => {
+						obj.loading = false
 						console.log();
 					});
 			}
@@ -315,7 +363,7 @@
 			}
 
 			.buttom {
-				color: $base-color;
+				color: $font-color-spec;
 				font-size: $font-base;
 			}
 		}
@@ -326,7 +374,7 @@
 			// color: #ffffff;
 			border:1px solid $base-color;
 			// background-color: #fff;
-			color: $base-color;
+			color:$base-color;
 			background-color: #fff;
 		}
 
@@ -430,4 +478,4 @@
 		padding: 20rpx;
 		color: #fd3b39;
 	}
-</style>
+</style>

BIN
static/img/shareimg.png


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä