hwq 2 anos atrás
pai
commit
8bbafc85b7

+ 19 - 39
pages/collection/bank.vue

@@ -13,13 +13,17 @@
 				<text>所属银行</text>
 				<input type="text" v-model="idName" value="" placeholder="请输入银行" />
 			</view>
+			<view class="item">
+				<text>手机号</text>
+				<input type="text" v-model="phone" value="" placeholder="请输入手机号" />
+			</view>
 		</view>
 		<view class="button" @click="confirm()">确认</view>
 	</view>
 </template>
 
 <script>
-import { auction } from '@/api/wallet.js';
+import { auction,pay_list } from '@/api/wallet.js';
 import { orderData,getUserInfo } from '@/api/user.js';
 import { mapState, mapMutations } from 'vuex';
 export default {
@@ -31,18 +35,18 @@ export default {
 			name:'',
 			id:'',
 			idName:'',
+			phone:''
 		};
 	},
 	onLoad() {
-		if(this.userInfo.bank_code != null){
-			this.id = this.userInfo.bank_code
-		}
-		if(this.userInfo.bank_name != null){
-			this.idName = this.userInfo.bank_name
-		}
-		if(this.userInfo.bank_user_name != null){
-			this.name = this.userInfo.bank_user_name
-		}
+		pay_list().then(({data}) =>{
+			if(data.bank != ''){
+				this.name = data.bank.name
+				this.id = data.bank.payment
+				this.phone = data.bank.phone
+				this.idName = data.bank.bank
+			}
+		})
 	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
@@ -57,43 +61,19 @@ export default {
 			if (!obj.id) {
 				return this.$api.msg('请输入银行卡号');
 			}
+			if (!obj.phone) {
+				return this.$api.msg('请输入手机号码');
+			}
 			auction({
 				type:3,
 				name: obj.name,
 				bank: obj.idName,
-				payment: obj.id
+				payment: obj.id,
+				phone: obj.phone,
 			}).then(e => {
 				obj.$api.msg('修改成功');
 			});
 		},
-		// 更新用户信息
-		getUserInfo() {
-			getUserInfo({})
-				.then(({ data }) => {
-					console.log(data)
-					this.setUserInfo(data);
-					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-					orderData({})
-						.then(({ data }) => {
-							this.setOrderInfo(data);
-							uni.navigateBack({
-								delta: 1
-							});
-						})
-						.catch(e => {
-							this.setOrderInfo({
-								complete_count: 0, //完成
-								received_count: 0, //待收货
-								unshipped_count: 0, //待发货
-								order_count: 0, //订单总数
-								unpaid_count: 0 //待付款
-							});
-						});
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
 	}
 };
 </script>

+ 22 - 4
pages/collection/wx.vue

@@ -9,6 +9,10 @@
 				<text>微信号</text>
 				<input type="text" v-model="code" value="" placeholder="请输入微信号" />
 			</view>
+			<view class="wx">
+				<text>手机号</text>
+				<input type="text" v-model="phone" value="" placeholder="请输入手机号" />
+			</view>
 			<view class="erweima">
 				<text>微信收款码</text>
 				<view class="img" @click="uploads()">
@@ -25,15 +29,26 @@
 
 <script>
 	import { upload } from '@/api/order.js'
-	import { auction } from '@/api/wallet.js';
+	import { auction,pay_list } from '@/api/wallet.js';
 	export default {
 		data() {
 			return {
 				code:'',
 				name:'',
-				image:''
+				image:'',
+				phone:''
 			};
 		},
+		onLoad() {
+			pay_list().then(({data}) =>{
+				if(data.wx != ''){
+					this.name = data.wx.name
+					this.code = data.wx.payment
+					this.image = data.wx.image
+					this.phone = data.wx.phone
+				}
+			})
+		},
 		methods: {
 			uploads(){
 				upload({
@@ -53,15 +68,18 @@
 				if (!obj.image) {
 					return this.$api.msg('请上传微信二维码');
 				}
+				if (!obj.phone) {
+					return this.$api.msg('请输入手机号码');
+				}
 				auction({
 					type:1,
 					name: obj.name,
 					payment: obj.code,
-					image: obj.image
+					image: obj.image,
+					phone: obj.phone,
 				})
 					.then(e => {
 						obj.$api.msg('修改成功');
-						obj.getUserInfo();
 					})
 					.catch(e => {
 						console.log(e);

+ 19 - 38
pages/collection/zfb.vue

@@ -9,6 +9,10 @@
 				<text>支付宝账号</text>
 				<input type="text" v-model="id" value="" placeholder="请输入支付宝账号" />
 			</view>
+			<view class="item">
+				<text>手机号</text>
+				<input type="text" v-model="phone" value="" placeholder="请输入手机号" />
+			</view>
 		</view>
 		<view class="button" @click="confirm()">确认</view>
 	</view>
@@ -17,7 +21,7 @@
 <script>
 import { orderData, getUserInfo } from '@/api/user.js';
 import { mapState, mapMutations } from 'vuex';
-import { auction } from '@/api/wallet.js';
+import { auction,pay_list } from '@/api/wallet.js';
 export default {
 	computed: {
 		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
@@ -25,16 +29,18 @@ export default {
 	data() {
 		return {
 			name: '',
-			id: ''
+			id: '',
+			phone:''
 		};
 	},
 	onLoad() {
-		if (this.userInfo.alipay_code != null) {
-			this.id = this.userInfo.alipay_code;
-		}
-		if (this.userInfo.alipay_name != null) {
-			this.name = this.userInfo.alipay_name;
-		}
+		pay_list().then(({data}) =>{
+			if(data.zfb != ''){
+				this.name = data.zfb.name
+				this.id = data.zfb.payment
+				this.phone = data.zfb.phone
+			}
+		})
 	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
@@ -46,42 +52,17 @@ export default {
 			if (!obj.id) {
 				return this.$api.msg('请输入支付宝账号');
 			}
+			if (!obj.phone) {
+				return this.$api.msg('请输入手机号码');
+			}
 			auction({
 				type:2,
 				name: obj.name,
-				payment: obj.id
+				payment: obj.id,
+				phone: obj.phone,
 			})
 				.then(e => {
 					obj.$api.msg('修改成功');
-					obj.getUserInfo();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 更新用户信息
-		getUserInfo() {
-			getUserInfo({})
-				.then(({ data }) => {
-					console.log(data)
-					this.setUserInfo(data);
-					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-					orderData({})
-						.then(({ data }) => {
-							this.setOrderInfo(data);
-							uni.navigateBack({
-								delta: 1
-							});
-						})
-						.catch(e => {
-							this.setOrderInfo({
-								complete_count: 0, //完成
-								received_count: 0, //待收货
-								unshipped_count: 0, //待发货
-								order_count: 0, //订单总数
-								unpaid_count: 0 //待付款
-							});
-						});
 				})
 				.catch(e => {
 					console.log(e);

+ 27 - 4
pages/hall/halllist.vue

@@ -9,7 +9,7 @@
 			</view>
 		</view>
 		<view class="hallist-bg">
-			<image src="" mode=""></image>
+			<image src="../../static/img/hallbanner.png" mode=""></image>
 		</view>
 		<view class="message flex" >
 			<image class="message-left" src="../../static/img/hinco.png" mode=""></image>
@@ -89,7 +89,7 @@
 		</view>
 		<uni-popup ref="popup" type="center">
 			<view class="popup">
-				<view class="popup-title">预约需要{{price}}艺金券是否立即预约?</view>
+				<view class="popup-title">预约需要{{price}}预约券是否立即预约?</view>
 				<view class="btn-box">
 					<view class="btn-left" @click="close()">取消</view>
 					<view class="btn-right" @click="appointment()">确定</view>
@@ -101,6 +101,7 @@
 
 <script>
 import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
+import { pay_list } from '../../api/wallet.js'
 import { article } from '@/api/user.js'
 import { mapState, mapMutations } from 'vuex';
 import { auction_list,subscribe,advance } from '@/api/hall.js';
@@ -120,7 +121,10 @@ export default {
 			loadingType: 'more',
 			text: [],
 			article:[],
-			list: []
+			list: [],
+			aliData: {},
+			bankData: {},
+			wx:{},
 		};
 	},
 	onLoad(option) {
@@ -133,6 +137,11 @@ export default {
 				this.text.push(e.synopsis)
 			})
 			this.article = data
+			pay_list({}).then(({data}) =>{
+				this.wx = data.wx
+				this.aliData = data.zfb
+				this.bankData = data.bank
+			})
 		})
 	},
 	computed: {
@@ -179,6 +188,21 @@ export default {
 			});
 		},
 		open(item) {
+			if(this.wx == '' && this.aliData =='' && this.bankData == ''){
+				uni.showModal({
+					title: '提示',
+					content:"您未填写收款信息无法参与,是否前去填写收款信息?",
+					success: function (res) {
+							if (res.confirm) {
+								uni.navigateTo({
+									url:'/pages/collection/collection'
+								})
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+				})
+			}
 			if(item.sta != 1) {
 				this.id = item.id
 				advance({id: item.id}).then(e =>{
@@ -486,7 +510,6 @@ page,
 	width: 702rpx;
 	height: 300rpx;
 	border-radius: 14rpx;
-	background-color: #2979FF;
 	image {
 		width: 100%;
 		height: 100%;

+ 10 - 4
pages/hall/hallpay.vue

@@ -33,10 +33,10 @@
 					<text>卖家昵称:</text>
 					{{ info.nickname }}
 				</view>
-				<!-- <view class="title buyPhone">
+				<view class="title buyPhone">
 					<text>卖家手机号:</text>
-					123456897
-				</view> -->
+					{{zfb != ''? zfb.phone : wx != '' ? wx.phone :bank.phone}}
+				</view>
 			</view>
 		</view>
 		<view class="main">
@@ -124,7 +124,7 @@
 		</view>
 		<view class="contentBottomHeight"></view>
 		<view class="bottom flex">
-			<view class="bottom-item">
+			<view class="bottom-item" @click="tocall()">
 				<image class="bi-image" src="../../static/img/call.png" mode=""></image>
 				<view class="bottom-font">联系卖家</view>
 			</view>
@@ -198,6 +198,12 @@ export default {
 				url
 			});
 		},
+		tocall() {
+			let num = this.zfb != ''? this.zfb.phone : this.wx != '' ? this.wx.phone : this.bank.phone
+			uni.makePhoneCall({
+				phoneNumber: num //仅为示例
+			});
+		},
 		//swiper 切换
 		changeTab(e) {
 			this.tabCurrentIndex = e.target.current;

+ 1 - 1
pages/hall/history.vue

@@ -3,7 +3,7 @@
 		<view class="product">
 			<image class="product-image" :src="info.image" mode=""></image>
 			<view class="product-font font1">{{info.name}}</view>
-			<view class="product-font font2">艺术家:李丹丹</view>
+			<view class="product-font font2">艺术家:{{info.user_nickname}}</view>
 			<view class="product-font font2">{{info.create_time | time}}</view>
 		</view>
 		<view class="main">

+ 4 - 1
pages/hall/porducthall.vue

@@ -19,7 +19,7 @@
 				<view class="tm-title clamp">{{ info.name }}</view>
 				<view class="tm-people flex">
 					<image class="people-image" src="../../static/img/people.png" mode=""></image>
-					<view class="people-name">归属人:李丹丹</view>
+					<view class="people-name">归属人:{{info.user_nickname}}</view>
 				</view>
 			</view>
 			<view class="tm-right flex">
@@ -133,6 +133,9 @@ export default {
 			details({product_id: this.id}).then(({data}) =>{
 				console.log(data);
 				this.imageList = data.slider_image
+				if (data.description != null) {
+					data.description = data.description.replace(/\<img/gi, '<img class="rich-img"');
+				} //小程序商品详情图超出屏幕问题
 				this.info = data
 			}).catch(e =>{
 				

+ 1 - 1
pages/index/index.vue

@@ -123,7 +123,7 @@
 				<view class="serve-item" @click="nav('/pages/store/storeInfo?id=' + item.id)" v-for="(item, index) in stop" :key="index">
 					<image class="serve-price" :src="item.image" mode=""></image>
 					<view class="clamp serve-title">{{ item.name }}</view>
-					<view class="serve-address flex">
+					<view class="serve-address flex" v-if="item.jl">
 						<image class="saddress-inco" src="../../static/img/address.png" mode=""></image>
 						<view class="saddress-font">距离{{item.jl}}</view>
 					</view>

+ 7 - 2
pages/order/order.vue

@@ -46,7 +46,7 @@
 							实付款
 							<text class="price">{{ moneyNum(item.price) }}</text>
 						</view>
-						<view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="orderPay(item)" class="action-btn recom">立即支付</button></view>
+						<view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="pay(item)" class="action-btn recom">立即支付</button></view>
 					</view>
 
 					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
@@ -79,7 +79,7 @@
 								<view class="font">买家:</view>
 								<image class="avter" :src="item.avatar" mode=""></image>
 								<view class="buy-name">{{ item.nickname }}</view>
-								<view class="phone">13245678911</view>
+								<view class="phone">{{item.phone}}</view>
 							</view>
 						</view>
 						<view class="upimg" v-if="item.status == 2 || item.status == 3">
@@ -314,6 +314,11 @@ export default {
 			});
 		},
 		// 订单支付
+		pay(item) {
+			uni.navigateTo({
+				url:'/pages/hall/hallpay?ordid='+item.order_id
+			})
+		},
 		orderPay(e) {
 			console.log(e);
 			adopt({order_id: e.order_id}).then(({data}) =>{

+ 2 - 2
pages/store/store.vue

@@ -46,9 +46,9 @@
 						<view class="shopmt-tip">{{ item.detailed_address}}</view>
 					</view>
 					<view class="right">
-						<view class="mright-top">
+						<view class="mright-top" v-if="item.jl">
 							<image class="mrt-image" src="../../static/index/index10.png" mode=""></image>
-							<view class="mrt-font">距离{{item.jl}}KM</view>
+							<view class="mrt-font">距离{{item.jl}}M</view>
 						</view>
 						<view class="mright-bottom">
 							<image class="mrb-item" src="../../static/index/index14.png" mode=""></image>

+ 4 - 4
pages/store/storeInfo.vue

@@ -5,9 +5,9 @@
 				<image class="simage" :src="info.image" mode=""></image>
 				<view class="stop-main">
 					<view class="stop-title">{{info.name}}</view>
-					<view class="stop-address">
+					<view class="stop-address" v-if="info.jl">
 						<image class="mrt-image" src="../../static/index/index10.png" mode=""></image>
-						<view class="mrt-font">距离0.3KM</view>
+						<view class="mrt-font" >距离{{info.jl}}M</view>
 					</view>
 				</view>
 			</view>
@@ -32,10 +32,10 @@
 				</view>
 			</scroll-view>
 		</view>
-		<view class="store-main">
+		<view class="store-main" v-if="info.images != null">
 			<view class="smain-title">店内图片</view>
 			<scroll-view class="scroll-box flex" @scroll="scroll" scroll-x="true" :scroll-with-animation="true" scroll-left="10px">
-				<view class="scroll-item" v-for="(item,index) in 4" :key="index">
+				<view class="scroll-item" v-for="(item,index) in images" :key="index">
 					<image class="scroll-image" src="" mode="heightFix"></image>
 				</view>
 			</scroll-view>

+ 2 - 2
pages/user/user.vue

@@ -9,7 +9,7 @@
 				<view class="phone">{{ userInfo.phone }}</view>
 				<view class="vip">
 					<image class="vip-bg" src="../../static/img/vip.png" mode=""></image>
-					<view class="vip-title">草民</view>
+					<view class="vip-title">{{userInfo.level_name}}</view>
 				</view>
 			</view>
 			<view class="sy-box flex">
@@ -387,7 +387,7 @@
 						this.qded = true
 						this.today_integral = e.data.integral
 						this.actionDay++;
-						this.sum_integral += e.data.integral 
+						this.sum_integral = +this.sum_integral + +e.data.integral 
 						this.$refs.popupqd.open()
 					})
 					.catch(e => {

BIN
static/img/hallbanner.png