xiaol 6 months ago
parent
commit
0260f6941d

+ 5 - 5
manifest.json

@@ -1,9 +1,9 @@
 {
     "name" : "STAR",
-    "appid" : "__UNI__3DD0668",
+    "appid" : "__UNI__5B076CD",
     "description" : "",
-    "versionName" : "1.0.13",
-    "versionCode" : 113,
+    "versionName" : "1.0.0",
+    "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -102,7 +102,7 @@
         }
     },
     "h5" : {
-        "title" : "互娛有獎",
+        "title" : "STAR",
         "domain" : "",
         "router" : {
             "base" : "/index/",
@@ -111,7 +111,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://yzf.frp.qiniu1314.com"
+                    "target" : "http://www.xkstar.shop"
                 }
             }
         },

+ 4 - 3
pages.json

@@ -21,7 +21,8 @@
 							"text": "我的订单 ",
 							"float": "right",
 							"color": "#1356FF",
-							"fontSize": "14px"
+							"fontSize": "14px",
+							"width":"70px"
 						}]
 					}
 				}
@@ -141,7 +142,7 @@
 			{
 				"path": "set/bindBank",
 				"style": {
-					"navigationBarTitleText": "我的银行卡",
+					"navigationBarTitleText": "我的收款方式",
 					"navigationBarBackgroundColor": "#051137",
 					"navigationBarTextStyle": "white"
 				}
@@ -149,7 +150,7 @@
 			{
 				"path": "set/editBank",
 				"style": {
-					"navigationBarTitleText": "银行卡信息",
+					"navigationBarTitleText": "收款码信息",
 					"navigationBarBackgroundColor": "#051137",
 					"navigationBarTextStyle": "white"
 				}

+ 21 - 4
pages/index/index.vue

@@ -5,10 +5,12 @@
 				<image src="/static/image/img01.png" style="width: 139rpx;height: 55rpx;" mode="widthFix"></image>
 				<view class="myName">我的</view>
 			</view>
-			<view class="flex">
-				<image src="/static/image/img03.png" style="width: 39rpx;height: 36rpx;margin-right: 38rpx;" mode="widthFix"></image>
-				<image src="/static/image/img02.png" style="width: 39rpx;height: 40rpx;" mode="widthFix"></image>
+			<!-- #ifdef APP -->
+			<view class="flex" @click="saoma">
+				<image src="/static/image/img03.png" style="width: 39rpx;height: 36rpx;" mode="widthFix"></image>
+				<!-- <image src="/static/image/img02.png" style="width: 39rpx;height: 40rpx;" mode="widthFix"></image> -->
 			</view>
+			<!-- #endif -->
 		</view>
 		<view class="swiper-box">
 			<u-swiper :list="swiperList" indicator indicatorMode="line" height="280rpx" circular></u-swiper>
@@ -208,6 +210,21 @@
 					}
 				});
 			},
+			saoma(){
+				uni.scanCode({
+				    success(data) {
+						let res = data.result
+						// uni.navigateTo({
+						//     url: res
+						// })
+						window.location.href = res;
+				    },
+				    fail(e) {
+				        console.log(JSON.stringify(e));
+				        console.log("扫码失败");
+				    },
+				});
+			},
 			// 打开客服
 			openKf() {
 				this.$refs.popupkf.open();
@@ -294,7 +311,7 @@
 		padding: 40rpx 30rpx 24rpx 30rpx;
 		line-height: 1;
 		position: fixed;
-		top: 0;
+		top: var(--status-bar-height);
 		left: 0;
 		width: 100%;
 		background: #051137;

+ 114 - 19
pages/index/order.vue

@@ -37,20 +37,31 @@
 					<view class="" style="text-align: right;">
 						<image src="/static/image/img21.png" style="width: 40rpx;height: 31rpx;margin-bottom: 25rpx;" mode="widthFix">
 						</image>
-						<view class="tipBtn"  v-if="item.voucher">查看凭证</view>
+						<view class="tipBtn" v-if="status==5 && item.voucher" @click.stop="comfirOrder(item.id,item.voucher)">查看凭证</view>
 						<view class="tipBtn" v-if="status==3">上传凭证</view>
+						<view class="tipBtn" v-if="status==1" @click.stop="cancel(item.id)">取消</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<uni-load-more :status="loadingType"></uni-load-more>
+		<!-- 查看凭证弹窗 -->
+		<u-popup :show="popShow" @close="popShow = false" :round="10" @open="popShow = true" mode="center">
+			<view class="popBox">
+				<image :src="popShowImg" mode="aspectFit"></image>
+				<view class="popBtn" v-if="tabIndex == 0" @click="comirOrder">确认订单</view>
+				<view class="popBtn" v-if="tabIndex == 1" @click="popShow = false">关闭查看</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
 	import {
 		sellMy,
-		sellBuyMy
+		sellBuyMy,
+		cancelLog,
+		comfirLog
 	} from '@/api/game.js';
 	import {
 		mapState
@@ -70,22 +81,22 @@
 				tabIndex: 0, //当前选中的一级分类
 				navItem: ['卖币订单', '买币订单'],
 				tabCurr: 0, //当前选中的二级分类
-				status: 0, //当前选中状态
+				status: 1, //当前选中状态
 				navList: [
-					[ {
+					[{
 						name: '挂出',
 						status: 1
-					}, {
-						name: '待上传',
-						status: 3
-					}, {
+					},{
+						name: '待确认',
+						status: 5
+					},{
 						name: '完成',
 						status: 2
 					},{
 						name: '结束',
 						status: 0
-					},],
-					[ {
+					}],
+					[{
 						name: '待上传',
 						status: 3
 					}, {
@@ -99,10 +110,16 @@
 				page: 1,
 				limit: 10,
 				loadingType: "more",
-				list: []
+				list: [],
+				popShow:false,
+				popShowImg:'',
+				popId:''
 			}
 		},
-		onLoad() {
+		onShow() {
+			this.page = 1;
+			this.loadingType = "more";
+			this.list = []
 			this.loadData()
 		},
 		onReachBottom() {
@@ -111,7 +128,7 @@
 		methods: {
 			navItemTo(item){
 				uni.navigateTo({
-					url:`/pages/index/orderDetail?id=${item.id}`
+					url:`/pages/index/orderDetail?id=${item.id}&tab=${this.tabIndex}`
 				})
 			},
 			loadData() {
@@ -121,14 +138,22 @@
 					return;
 				}
 				obj.loadingType = "loading";
-				console.log(obj.status);
+				console.log(obj.status,'obj.status');
+				console.log(obj.tabIndex,'obj.tabIndex');
+				console.log(obj.list,'obj.list');
 				if (this.tabIndex == 0) {
 					sellMy({
 						page: obj.page,
 						limit: obj.limit,
 						status:obj.status
 					}, obj.status).then(res => {
-						obj.dataList(res.data.list)
+						let ar = res.data.list.map((re)=>{
+							re.num = +re.num;
+							re.price = +re.price;
+							re.money = +(re.num*re.price).toFixed(8);
+							return re
+						})
+						obj.dataList(ar)
 					});
 				} else if (this.tabIndex == 1) {
 					sellBuyMy({
@@ -137,7 +162,6 @@
 						status:obj.status
 					}, obj.status).then(res => {
 						let ar = res.data.list.map((re)=>{
-							console.log(re,'re');
 							re.num = +re.num;
 							re.price = +re.price;
 							re.money = +(re.num*re.price).toFixed(8);
@@ -147,6 +171,63 @@
 					});
 				}
 			},
+			//取消挂出
+			cancel(id){
+				let obj = this;
+				cancelLog({
+					id:id
+				}).then(res => {
+					if(res.status == 200){
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+						})
+						setTimeout(function () {
+							obj.page = 1;
+							obj.loadingType = "more";
+							obj.list = []
+							obj.loadData()
+						}, 1000);
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+						})
+					}
+				});
+			},
+			//确认订单
+			comirOrder(){
+				const that = this;
+				comfirLog({
+					id:that.popId,
+				}).then(res => {
+					if(res.status == 200){
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+						})
+						that.popShow = false
+						setTimeout(()=>{
+							that.page = 1;
+							that.loadingType = "more";
+							that.list = []
+							that.loadData()
+						},1000)
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+						})
+					}
+				});
+			},
+			//点击查看凭证
+			comfirOrder(id,img){
+				this.popShowImg = img
+				this.popId = id
+				this.popShow = true
+			},
 			dataList(ar) {
 				const obj = this;
 				if (ar.length > 0) {
@@ -158,7 +239,6 @@
 				} else {
 					obj.loadingType = "nomore";
 				}
-				console.log(obj.list,"list");
 			},
 			tabClick(index,type) {
 				if (type == 1) {
@@ -238,8 +318,7 @@
 	}
 
 	.listItemBox {
-		padding-top: 88px;
-
+		padding-top: 44px;
 		.listItem {
 			padding: 34rpx 34rpx;
 			background: #1F2A4A;
@@ -282,4 +361,20 @@
 			}
 		}
 	}
+	.popBox{
+		max-height: 70vh;
+		padding: 35rpx 35rpx;
+		image{
+			max-height: 60vh;
+		}
+		.popBtn{
+			background: linear-gradient(90deg, #0C5AFA, #1356FF);
+			border-radius: 7rpx;
+			padding: 15rpx 35rpx;
+			width: 60%;
+			margin: 35rpx auto;
+			text-align: center;
+			color: #fff;
+		}
+	}
 </style>

+ 2 - 2
pages/index/orderDetail.vue

@@ -32,8 +32,8 @@
 				</view>
 			</view>
 		</view>
-		<view class="submission" v-if="baseData.status==3 && tab == 1"><button class="golden" type="golden" hover-class="none"
-				@click="submission">确认提交</button></view>
+		<!-- <view class="submission" v-if="baseData.status==3 && tab == 1"><button class="golden" type="golden" hover-class="none"
+				@click="submission">确认提交</button></view> -->
 		<view class="submission" v-if="baseData.status==5 && tab == 0"><button class="golden" type="golden" hover-class="none"
 				@click="comirOrder">确认订单</button></view>
 		<view class="submission" v-if="baseData.status==1 && tab == 0"><button class="golden" type="golden" hover-class="none"

+ 112 - 132
pages/index/pledge.vue

@@ -6,7 +6,7 @@
 			</view>
 		</view> -->
 		<!-- <view style="padding-top: 44px;" v-if="tabCurrentIndex == 0"> -->
-		<view style="padding-top: 0;" v-if="tabCurrentIndex == 0">
+		<view style="padding-top: 0;">
 			<view class="listBox">
 				<view class="titleTetx">数量</view>
 				<view class="flex listTpl">
@@ -35,26 +35,6 @@
 			</view>
 			<view class="tips">*参考汇率{{baseData.us_price}}</view>
 		</view>
-		<view class="listItemBox" v-if="tabCurrentIndex == 1">
-			<view class="listItem" v-for="item,index in list" :key="index">
-				<view class="itemInfo flex">
-					<view class="flex_item">
-						<image src="/static/image/img20.png" style="width: 55rpx;height: 55rpx;" mode="widthFix"></image>
-						<view class="name">{{item.real_name}}</view>
-					</view>
-					<image src="/static/image/img21.png" style="width: 40rpx;height: 31rpx;" mode="widthFix"></image>
-				</view>
-				<view class="itemTpl">{{item.price}}</view>
-				<view class="itemTip flex">
-					<view class="tipBox">
-						<view class="tipText">数量:{{item.num}}</view>
-						<view class="tipText">{{item.add_time|dateFormat}}</view>
-					</view>
-					<view class="tipBtn" @click="commitorder(item)">买入</view>
-				</view>
-			</view>
-			<uni-load-more :status="loadingType"></uni-load-more>
-		</view>
 		<u-action-sheet :show="showBank" :actions="bankList" title="请选择银行卡"
 			@close="showBank = false" @select="bankSelect">
 		</u-action-sheet>
@@ -91,8 +71,8 @@
 		},
 		data() {
 			return {
-				tabCurrentIndex: 0,
-				navList: ['卖出', '买入'],
+				tabIndex: 0,
+				navList: ['支付宝','微信'],
 				number: '',
 				money:'',
 				price: '',
@@ -108,6 +88,23 @@
 				showBank:false,
 				bankList:[],
 				bank_id:'',
+				bank:{
+					id:'',
+					bank_real_name:'',
+					bank_code:'',
+					bank:'',
+					bank_name:'',
+				},
+				weixin:{
+					id:'',
+					name:'',
+					account:'',
+				},
+				zfb:{
+					id:'',
+					name:'',
+					account:'',
+				}
 			}
 		},
 		onNavigationBarButtonTap(res) {
@@ -133,49 +130,56 @@
 				getBank().then((res) => {
 					let data = res.data.list
 					let reg = /^(.{4})(?:\d+)(.{4})$/
-					data.forEach(item => {
-						item.bank_code1 = item.bank_code.replace(reg, "**** $2")
-						item.name = item.bank+'   '+item.bank_code1
-					})
-					obj.bankList = data
-					console.log(obj.bankList,'obj.bankList')
+					if(data.length > 0){
+						data.forEach(item => {
+							if(item.type == 'bank'){
+								item.bank_code1 = item.bank_code.replace(reg, "**** $2")
+								item.name = item.bank+'   '+item.bank_code1
+							}else{
+								item.name = item.name+'   '+item.phone
+							}
+						})
+						obj.bankList = data
+						obj.bank = obj.bankList[0]
+						obj.bank_id = obj.bank.id
+						obj.navList.push('银行卡')
+					}
 				})
 			},
 			bankSelect(e){
 				const obj = this;
 				this.bank_id = e.id
-				if(this.bank_id){
-					uni.showModal({
-						title: '请输入支付密码',
-						editable:true,
-						success: res => {
-							if(res.confirm){
-								sellPush({
-										type: 'USDT',
-										num: obj.number,
-										price: obj.price,
-										phone: obj.userInfo.phone || '',
-										trade_psw: res.content,
-										sell_type: 'money',
-					                 bank_id:obj.bank_id
-									}).then((
-										data
-									) => {
-										obj.qianBao();
-										uni.showToast({
-											title: data.msg,
-											icon:'none'
-										});
-									})
-									.catch(e => {
-										console.log(e);
+				obj.showBank = false
+				uni.showModal({
+					title: '请输入支付密码',
+					editable:true,
+					success: res => {
+						if(res.confirm){
+							sellPush({
+									type: 'USDT',
+									num: obj.number,
+									price: obj.price,
+									phone: obj.userInfo.phone || '',
+									trade_psw: res.content,
+									sell_type: 'money',
+									bank_id:obj.bank_id
+								}).then((
+									data
+								) => {
+									obj.qianBao();
+									uni.showToast({
+										title: data.msg,
+										icon:'none'
 									});
-							}
-						},
-						fail: () => {},
-						complete: () => {}
-					});
-				}
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
 			},
 			getIndex(){
 				getIndex({})
@@ -232,49 +236,39 @@
 			// 挂出
 			submission() {
 				let obj = this;
-				if(obj.bankList.length > 0){
-					if(!obj.number){
-						uni.showToast({
-							title: '请输入数量',
-							icon:'none'
-						});
-						return
-					}
-					if(!obj.price){
-						uni.showToast({
-							title: '请输入单价',
-							icon:'none'
-						});
-						return
-					}
-					obj.showBank = true
-				}else{
-					uni.showModal({
-						title: '请先去添加银行卡',
-						success: res => {
-							if (res.confirm) {
-								uni.navigateTo({
-									url:'/pages/user/set/bindBank'
-								})
-							}
-						},
+				if(!obj.number){
+					uni.showToast({
+						title: '请输入数量',
+						icon:'none'
+					});
+					return
+				}
+				if(!obj.price){
+					uni.showToast({
+						title: '请输入单价',
+						icon:'none'
+					});
+					return
+				}
+				if(obj.price > obj.baseData.us_price){
+					uni.showToast({
+						title: '单价不得大于当前汇率',
+						icon:'none'
 					});
+					return
 				}
+				this.showBank = true
 			},
 			init() {
 				this.page = 1;
 				this.list = [];
 				this.loadingType = 'more';
-				this.loadData();
+				// this.loadData();
 				this.qianBao();
 				this.getBank();
 			},
 			tabClick(index) {
-				this.tabCurrentIndex = index;
-				this.page = 1;
-				this.list = [];
-				this.loadingType = 'more';
-				this.loadData();
+				this.tabIndex = index
 			},
 			async loadData(source) {
 				const that = this;
@@ -335,48 +329,9 @@
 		height: 100%;
 		background-color: #051137;
 		padding-top: var(--status-bar-height);
+		padding-bottom: 40rpx;
 		color: #fff;
 	}
-
-	.navList {
-		padding: 20rpx 50rpx;
-		background: #1F2A4A;
-		line-height: 1;
-		position: fixed;
-		top: 44px;
-		left: 0;
-		width: 100%;
-		z-index: 9;
-
-		.navItem {
-			color: #fff;
-			font-size: 30rpx;
-			text-align: center;
-			width: 50%;
-
-			&.activeItem {
-				color: #0C5AFA;
-				position: relative;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 36%;
-					bottom: -20rpx;
-					width: 30%;
-					height: 8rpx;
-					// transform: translateX(-50%);
-					border-bottom: 4rpx solid #0C5AFA;
-					border-radius: 0rpx 20rpx 0rpx 0rpx;
-				}
-			}
-
-			&.tip {
-				border-right: 1rpx solid #333D5B;
-			}
-		}
-	}
-
 	.listBox {
 		padding: 62rpx 32rpx;
 
@@ -469,4 +424,29 @@
 			}
 		}
 	}
+	.changeBank{
+		text-align: right;
+		margin-top: 25rpx;
+		padding-right: 35rpx;
+		.btnChange{
+			background: #0C5AFA;
+			color: #fff;
+			display: inline-block;
+			font-size: 24rpx;
+			padding: 15rpx 25rpx;
+			border-radius: 15rpx;
+		}
+		
+	}
+	.login_text {
+		width: 100%;
+		// padding: 25rpx 0rpx;
+		font-size: 28rpx !important;
+		padding: 0rpx 25rpx;
+	}
+	
+	.login_input {
+		border-bottom: 1px solid #464755;
+		padding: 35rpx;
+	}
 </style>

+ 1 - 1
pages/public/register.vue

@@ -49,7 +49,7 @@
 				</view>
 			</view>
 		    <!-- #ifdef H5 -->
-		    <view class="upload"><a href="">下载APP</a></view>
+		    <view class="upload"><a href="http://www.xkstar.shop/register/yzf.apk">下载APP</a></view>
 		    <!-- #endif -->
 			<view><button type="green" @click="register" class="uni-button uni-button-green">{{$t('login.a7')}}</button>
 			</view>

+ 15 - 10
pages/user/set/bindBank.vue

@@ -3,21 +3,26 @@
 		<view class="listTpl flex" v-if="list.length > 0" v-for="item,index in list">
 			<view class="infoTpl">
 				<view class="tplName flex_item">
-					<image src="../../../static/image/img34.png" style="width: 40rpx;height: 30rpx;position: relative;top:10rpx;" mode="widthFix"></image>
+					<image :src="item.type == 'bank'?'/static/image/bank.png':
+					item.type == 'wx'?'/static/image/wx.png':'/static/image/alipay.png'" style="width: 40rpx;height: 40rpx" mode="widthFix"></image>
 					<view class="titleBox">
-						<view class="name">{{item.bank}}</view>
-						<view class="tip">持卡人:{{item.bank_real_name}}</view>
+						<view class="name">{{item.type == 'bank'?item.bank:item.type == 'wx'?'微信账号':'支付宝账号'}}</view>
+						<view class="tip" v-if="item.type == 'bank'">持卡人:{{item.bank_real_name}}</view>
+						<view class="tip" v-else>真实姓名:{{item.name}}</view>
 					</view>
 				</view>
-				<view class="cardNum flex_item">
+				<view class="cardNum flex_item" v-if="item.type == 'bank'">
 					<view class="num" v-if="!item.show">{{item.bank_code1}}</view>
 					<view class="num1" v-else>{{item.bank_code}}</view>
 					<view @click="showChange(index,item.show)">
 						<image :src="item.show?'/static/image/img35.png':'/static/image/img36.png'" style="width: 50rpx;height: 50rpx;" mode="widthFix"></image>
 					</view>
 				</view>
+				<view class="cardNum flex_item" v-else>
+					<view class="num">{{item.phone}}</view>
+				</view>
 			</view>
-			<view class="tplTip flex_item" @click="edit(item.id,'edit')">
+			<view class="tplTip flex_item" @click="edit(item.id,item.type,'edit')">
 				<view class="edit">去修改</view>
 				<uni-icons type="right" color="#fff"></uni-icons>
 			</view>
@@ -27,7 +32,7 @@
 		</view>
 		<view  class="noData" v-if="list.length == 0">暂无银行卡数据~</view>
 		<view class="submission">
-			<button class="golden" type="golden" hover-class="none" @click="edit(0,'add')">添加银行卡</button>
+			<button class="golden" type="golden" hover-class="none" @click="edit(0,0,'add')">添加收款方式</button>
 		</view>
 	</view>
 </template>
@@ -66,7 +71,7 @@
 				let obj = this
 				uni.showModal({
 					title: '提示',
-					content: '您确定要删除该银行卡吗?',
+					content: '您确定要删除该收款码信息吗?',
 					success: (res) => {
 						if(res.confirm) {
 							delBank({
@@ -87,14 +92,14 @@
 					}
 				})
 			},
-			edit(id,type){
-				if(type == 'add'){
+			edit(id,type,item){
+				if(item == 'add'){
 					uni.navigateTo({
 						url:'/pages/user/set/editBank'
 					})
 				}else{
 					uni.navigateTo({
-						url:'/pages/user/set/editBank?id='+id
+						url:'/pages/user/set/editBank?id='+id+'&type='+type
 					})
 				}
 			}

+ 188 - 38
pages/user/set/editBank.vue

@@ -1,6 +1,11 @@
 <template>
 	<view class="container">
-		<view class="login_text">
+		<view class="navList flex" v-if="!info.id">
+			<view v-for="(item, index) in navList" :key="index" class="navItem"
+				:class="{ activeItem: tabIndex === index,tip:index == 0 }" @click="tabClick(index)">{{ item }}
+			</view>
+		</view>
+		<view class="login_text" v-if="tabIndex == 0">
 			<view class="login_input flex" style="padding-top: 45rpx;">
 				<view class="login_name">姓名</view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="info.bank_real_name"
@@ -22,6 +27,40 @@
 						placeholder="请输入开户行" /></view>
 			</view>
 		</view>
+		<view class="login_text" v-if="tabIndex == 1">
+			<view class="login_input flex" style="padding-top: 45rpx;">
+				<view class="login_name">姓名</view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="info.name"
+						placeholder="请输入真实姓名" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_name"><text>支付宝账号</text></view>
+				<view class="login_name"><input class="uni-input" type="idcard" v-model="info.phone"
+						placeholder="请输入支付宝账号" /></view>
+			</view>
+			<view class="login_input">
+				<view class="login_name" @click="scImg">
+					<image :src="info.qrcode||'/static/image/img19.png'"></image>
+				</view>
+			</view>
+		</view>
+		<view class="login_text" v-if="tabIndex == 2">
+			<view class="login_input flex" style="padding-top: 45rpx;">
+				<view class="login_name">姓名</view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="info.name"
+						placeholder="请输入真实姓名" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_name"><text>微信账号</text></view>
+				<view class="login_name"><input class="uni-input" type="idcard" v-model="info.phone"
+						placeholder="请输入微信账号" /></view>
+			</view>
+			<view class="login_input">
+				<view class="login_name" @click="scImg">
+					<image :src="info.qrcode||'/static/image/img19.png'"></image>
+				</view>
+			</view>
+		</view>
 		<view class="submission">
 			<button class="golden" type="golden" hover-class="none" @click="submission">确认</button>
 		</view>
@@ -29,22 +68,39 @@
 </template>
 <script>
 	import { bankInfo,addBank } from '@/api/set.js';
+	import { upload } from '@/api/order.js';
 	export default {
 		data() {
 			return{
+				navList:['银行卡','支付宝','微信'],
+				tabIndex:0,
 				info:{
 					id:'',
 					bank_real_name:'',
 					bank_code:'',
 					bank:'',
 					bank_name:'',
-					default:0
-				}
+					default:0,
+					name:'',
+					phone:'',
+					qrcode:''
+				},
+				type:'bank'
 			};
 		},
 		onLoad(option) {
+			if(option.type){
+				if(option.type == 'alipay'){
+					this.tabIndex = 1
+				}else if(option.type == 'wx'){
+					this.tabIndex = 2
+				}else{
+					this.tabIndex = 0
+				}
+			}
 			if(option.id){
 				this.info.id = option.id
+				this.type = option.type
 				this.getList()
 			}
 			// getMoneyLog({
@@ -54,6 +110,22 @@
 		},
 		onShow() {},
 		methods: {
+			tabClick(index) {
+				this.tabIndex = index
+				if(index == 0){
+					this.type = 'bank'
+				}else if(index == 1){
+					this.type = 'alipay'
+					this.info.name = ''
+					this.info.phone = ''
+					this.info.qrcode = ''
+				}else{
+					this.type = 'wx'
+					this.info.name = ''
+					this.info.phone = ''
+					this.info.qrcode = ''
+				}
+			},
 			getList(){
 				let obj = this
 				bankInfo({
@@ -64,40 +136,64 @@
 			},
 			submission(){
 				let obj = this
-				if(!obj.info.bank_real_name){
-					uni.showToast({
-						title: '请输入真实姓名',
-						icon: 'none',
-					})
-					return
-				}
-				if(!obj.info.bank){
-					uni.showToast({
-						title: '请输入银行',
-						icon: 'none',
-					})
-					return
-				}
-				if(!obj.info.bank_code){
-					uni.showToast({
-						title: '请输入银行卡号',
-						icon: 'none',
-					})
-					return
-				}
-				if(obj.info.bank_code.length < 16){
-					uni.showToast({
-						title: '请输入正确的银行卡号',
-						icon: 'none',
-					})
-					return
-				}
-				if(!obj.info.bank_name){
-					uni.showToast({
-						title: '请输入开户行',
-						icon: 'none',
-					})
-					return
+				if(obj.tabIndex == 0){
+					if(!obj.info.bank_real_name){
+						uni.showToast({
+							title: '请输入真实姓名',
+							icon: 'none',
+						})
+						return
+					}
+					if(!obj.info.bank){
+						uni.showToast({
+							title: '请输入银行',
+							icon: 'none',
+						})
+						return
+					}
+					if(!obj.info.bank_code){
+						uni.showToast({
+							title: '请输入银行卡号',
+							icon: 'none',
+						})
+						return
+					}
+					if(obj.info.bank_code.length < 16){
+						uni.showToast({
+							title: '请输入正确的银行卡号',
+							icon: 'none',
+						})
+						return
+					}
+					if(!obj.info.bank_name){
+						uni.showToast({
+							title: '请输入开户行',
+							icon: 'none',
+						})
+						return
+					}
+				}else{
+					if(!obj.info.name){
+						uni.showToast({
+							title: '请输入姓名',
+							icon: 'none',
+						})
+						return
+					}
+					if(!obj.info.phone){
+						uni.showToast({
+							title: '请输入账号',
+							icon: 'none',
+						})
+						return
+					}
+					if(!obj.info.qrcode){
+						uni.showToast({
+							title: '请输入收款码',
+							icon: 'none',
+						})
+						return
+					}
 				}
 				let data = ''
 				if(obj.info.id){
@@ -107,7 +203,11 @@
 						bank_code:obj.info.bank_code,//银行卡号
 						real_name:obj.info.bank_real_name,//开户人
 						default:0,//1设为默认,0取消默认
-						id:obj.info.id
+						id:obj.info.id,
+						type:obj.type,
+						name:obj.info.name,
+						phone:obj.info.phone,
+						qrcode:obj.info.qrcode,
 					}
 				}else{
 					data = {
@@ -116,6 +216,10 @@
 						bank_code:obj.info.bank_code,//银行卡号
 						real_name:obj.info.bank_real_name,//开户人
 						default:0,//1设为默认,0取消默认
+						name:obj.info.name,
+						phone:obj.info.phone,
+						qrcode:obj.info.qrcode,
+						type:obj.type
 					}
 				}
 				addBank(data).then(res => {
@@ -131,6 +235,15 @@
 					}, 1000);
 				});
 			},
+			//上传图片
+			scImg() {
+				upload({
+					file: ''
+				}).then((e) => {
+					console.log(e, 55)
+					this.xinxi.qrcode = e[0].url;
+				});
+			},
 		},
 	};
 </script>
@@ -163,4 +276,41 @@
 	.login_name {
 		color: #ffffff;
 	}
+	.login_name image {
+		width: 100rpx;
+		height: 100rpx;
+	}
+	.navList {
+		padding: 20rpx 50rpx;
+		background: #1F2A4A;
+		width: 100%;
+		z-index: 9;
+		.navItem {
+			color: #fff;
+			font-size: 30rpx;
+			text-align: center;
+			width: 50%;
+	
+			&.activeItem {
+				color: #0C5AFA;
+				position: relative;
+	
+				&:after {
+					content: '';
+					position: absolute;
+					left: 36%;
+					bottom: -20rpx;
+					width: 30%;
+					height: 8rpx;
+					// transform: translateX(-50%);
+					border-bottom: 4rpx solid #0C5AFA;
+					border-radius: 0rpx 20rpx 0rpx 0rpx;
+				}
+			}
+	
+			&.tip {
+				border-right: 1rpx solid #333D5B;
+			}
+		}
+	}
 </style>

+ 1 - 1
pages/user/set/set.vue

@@ -60,7 +60,7 @@
 				<view class="left flex-start">
 					<uni-icons type="staff" :size="iconSize" :color="listColor"></uni-icons>
 					<text class="title">
-						我的银行卡
+						我的收款信息
 					</text>
 				</view>
 				<view class="right">

BIN
static/image/alipay.png


BIN
static/image/bank.png


BIN
static/image/wx.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
-		baseURL: 'http://yzf.frp.qiniu1314.com', //请求地址配置
+		baseURL: 'http://www.xkstar.shop', //请求地址配置
 		urlFile: '/index', //项目部署所在文件夹
 		loginInterceptor: false, //是否打开强制登录
 		// #ifdef H5 || MP-WEIXIN

BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png