cmy 5 tháng trước cách đây
mục cha
commit
94e537f8c6

+ 2 - 1
libs/i18n/lang/cn.json

@@ -111,7 +111,8 @@
 		"b8":"退出登录",
 		"b9":"设置",
 		"a1":"统计表",
-		"a2": "联系客服"
+		"a2": "联系客服",
+		"复制下载地址": "复制下载地址"
 	},
 	"myple": {
 		"u1": "质押数",

+ 3 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "STAR",
     "appid" : "__UNI__0A11003",
     "description" : "",
-    "versionName" : "1.1.5",
-    "versionCode" : 115,
+    "versionName" : "1.1.7",
+    "versionCode" : 117,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -111,7 +111,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://www.xkstar.shop"
+                    "target" : "http://www.polkep.xyz"
                 }
             }
         },

+ 49 - 17
pages/index/pledge.vue

@@ -30,21 +30,27 @@
 					<view class="tip1">单价不得大于参考汇率</view>
 				</view>
 			</view>
-			<view class="bankList flex" v-if="actionitem.length > 0" v-for="item,index in actionitem">
-				<view class="infoTpl">
-					<view class="tplName flex_item">
-						<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="tip">{{item.name}}</view>
+			<template v-if="actionitem.length > 0" v-for="(item,index) in actionitem">
+				<view class="bankList flex">
+					<view class="infoTpl">
+						<view class="tplName flex_item">
+							<image src="/static/image/bank.png" class="typeTipImg" v-if="item.type == 'bank'"
+								mode="widthFix"></image>
+							<image src="/static/image/wx.png" class="typeTipImg" v-if="item.type == 'wx'"
+								mode="widthFix"></image>
+							<image src="/static/image/alipay.png" class="typeTipImg" v-if="item.type == 'alipay'"
+								mode="widthFix"></image>
+							<view class="titleBox">
+								<view class="tip">{{item.name}}</view>
+							</view>
 						</view>
 					</view>
+					<view class="det" @click="showBank = true">
+						修改
+					</view>
 				</view>
-				<view class="det" @click="showBank = true">
-					修改
-				</view>
-			</view>
+			</template>
+
 			<view class="submission">
 				<button class="golden" type="golden" hover-class="none" @click="submission">一键卖币</button>
 			</view>
@@ -62,8 +68,11 @@
 					v-for="item,index in bankList">
 					<view class="infoTpl">
 						<view class="tplName flex_item">
-							<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"
+							<image src="/static/image/bank.png" class="typeTipImg" v-if="item.type == 'bank'"
+								mode="widthFix"></image>
+							<image src="/static/image/wx.png" class="typeTipImg" v-if="item.type == 'wx'"
+								mode="widthFix"></image>
+							<image src="/static/image/alipay.png" class="typeTipImg" v-if="item.type == 'alipay'"
 								mode="widthFix"></image>
 							<view class="titleBox">
 								<view class="tip">{{item.name}}</view>
@@ -132,7 +141,12 @@
 					bank_name: '',
 				},
 				// 当前选中的银行卡对象
-				actionitem: []
+				actionitem: [],
+				infoChecked: {
+					sell_alipay_open: "0",
+					sell_bank_open: "0",
+					sell_weixin_open: "0"
+				}
 			}
 		},
 		watch: {
@@ -168,6 +182,7 @@
 					let data = res.data.list
 					let reg = /^(.{4})(?:\d+)(.{4})$/
 					if (data.length > 0) {
+						obj.infoChecked = res.data;
 						data.forEach(item => {
 							if (item.type == 'bank') {
 								item.bank_code1 = item.bank_code.replace(reg, "**** $2")
@@ -176,13 +191,25 @@
 								item.name = item.name + '   ' + item.phone
 							}
 						})
-						obj.bankList = data;
+						obj.bankList = data.map((re) => {
+							if (re.type == 'bank' && obj.infoChecked.sell_bank_open == "1") {
+								return re
+							}
+							if (re.type == 'wx' && obj.infoChecked.sell_weixin_open == "1") {
+								return re
+							}
+							if (re.type == 'alipay' && obj.infoChecked.sell_alipay_open == "1") {
+								return re
+							}
+						});
+						// 保存信息
 						if (obj.bankList.length > 0) {
 							obj.actionitem = [obj.bankList[0]];
 							obj.bank_id = obj.bank.id;
 							obj.bank = obj.bankList[0];
 						}
 					}
+
 				})
 			},
 			bankSelect(e) {
@@ -295,7 +322,7 @@
 									setTimeout(
 										() => {
 											uni.navigateTo({
-												url:'/pages/index/order'
+												url: '/pages/index/order'
 											})
 										}
 									)
@@ -540,6 +567,11 @@
 		margin-bottom: 25rpx;
 		position: relative;
 
+		.typeTipImg {
+			width: 40rpx;
+			height: 40rpx
+		}
+
 		.det {
 			color: #0C5AFA;
 		}

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

@@ -42,6 +42,7 @@
 		data() {
 			return{
 				list:[],
+				addCard:true,
 			};
 		},
 		onLoad() {},
@@ -62,8 +63,13 @@
 					let reg = /^(.{4})(?:\d+)(.{4})$/
 					data.forEach(item => {
 						item.show = false
-						item.bank_code1 = item.bank_code.replace(reg, "**** **** **** $2")
+						item.bank_code1 = item.bank_code.replace(reg, "**** **** **** $2");
 					})
+					if(res.data.sell_alipay_open=='0'&&res.data.sell_bank_open=='0'&&res.data.sell_weixin_open=='0'){
+						obj.addCard =false
+					}else{
+						obj.addCard =true
+					}
 					obj.list = data
 				});
 			},

+ 109 - 73
pages/user/set/editBank.vue

@@ -1,9 +1,11 @@
 <template>
 	<view class="container">
 		<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>
+			<template  v-for="(item, index) in navList">
+				<view class="navItem" v-if="bankInfo[item.type]=='1'"
+					:class="{ activeItem: tabIndex === index,tip:index == 0 }" @click="tabClick(index)">{{ item.name }}
+				</view>
+			</template>
 		</view>
 		<view class="login_text" v-if="tabIndex == 0">
 			<view class="login_input flex" style="padding-top: 45rpx;">
@@ -67,43 +69,67 @@
 	</view>
 </template>
 <script>
-	import { bankInfo,addBank } from '@/api/set.js';
-	import { upload } from '@/api/order.js';
+	import {
+		bankInfo,
+		addBank,
+		getBank
+	} 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,
-					name:'',
-					phone:'',
-					qrcode:''
+			return {
+				navList: [{
+					name: '银行卡',
+					show: true,
+					type: "sell_bank_open"
+				}, {
+					name: '支付宝',
+					show: true,
+					type: "sell_alipay_open"
+				}, {
+					name: '微信',
+					show: true,
+					type: "sell_weixin_open"
+				}],
+				tabIndex: 0,
+				info: {
+					id: '',
+					bank_real_name: '',
+					bank_code: '',
+					bank: '',
+					bank_name: '',
+					default: 0,
+					name: '',
+					phone: '',
+					qrcode: ''
 				},
-				type:'bank',
-				loding:false,
+				type: 'bank',
+				loding: false,
+				bankInfo: {
+					sell_alipay_open: "0",
+					sell_bank_open: "0",
+					sell_weixin_open: "0"
+				}
 			};
 		},
 		onLoad(option) {
-			if(option.type){
-				if(option.type == 'alipay'){
+			if (option.type) {
+				if (option.type == 'alipay') {
 					this.tabIndex = 1
-				}else if(option.type == 'wx'){
+				} else if (option.type == 'wx') {
 					this.tabIndex = 2
-				}else{
+				} else {
 					this.tabIndex = 0
 				}
 			}
-			if(option.id){
+			if (option.id) {
 				this.info.id = option.id
 				this.type = option.type
 				this.getList()
 			}
+			this.getBank();
 			// getMoneyLog({
 			// 		page: navItem.page,
 			// 		limit: navItem.limit
@@ -111,84 +137,89 @@
 		},
 		onShow() {},
 		methods: {
+			getBank() {
+				getBank({}).then(res => {
+					this.bankInfo = res.data;
+				});
+			},
 			tabClick(index) {
 				this.tabIndex = index
-				if(index == 0){
+				if (index == 0) {
 					this.type = 'bank'
-				}else if(index == 1){
+				} else if (index == 1) {
 					this.type = 'alipay'
 					this.info.name = ''
 					this.info.phone = ''
 					this.info.qrcode = ''
-				}else{
+				} else {
 					this.type = 'wx'
 					this.info.name = ''
 					this.info.phone = ''
 					this.info.qrcode = ''
 				}
 			},
-			getList(){
+			getList() {
 				let obj = this
 				bankInfo({
-					id:obj.info.id
+					id: obj.info.id
 				}).then(res => {
 					obj.info = res.data.info
 				});
 			},
-			submission(){
+			submission() {
 				let obj = this
-				if(obj.tabIndex == 0){
-					if(!obj.info.bank_real_name){
+				if (obj.tabIndex == 0) {
+					if (!obj.info.bank_real_name) {
 						uni.showToast({
 							title: '请输入真实姓名',
 							icon: 'none',
 						})
 						return
 					}
-					if(!obj.info.bank){
+					if (!obj.info.bank) {
 						uni.showToast({
 							title: '请输入银行',
 							icon: 'none',
 						})
 						return
 					}
-					if(!obj.info.bank_code){
+					if (!obj.info.bank_code) {
 						uni.showToast({
 							title: '请输入银行卡号',
 							icon: 'none',
 						})
 						return
 					}
-					if(obj.info.bank_code.length < 16){
+					if (obj.info.bank_code.length < 16) {
 						uni.showToast({
 							title: '请输入正确的银行卡号',
 							icon: 'none',
 						})
 						return
 					}
-					if(!obj.info.bank_name){
+					if (!obj.info.bank_name) {
 						uni.showToast({
 							title: '请输入开户行',
 							icon: 'none',
 						})
 						return
 					}
-				}else{
-					if(!obj.info.name){
+				} else {
+					if (!obj.info.name) {
 						uni.showToast({
 							title: '请输入姓名',
 							icon: 'none',
 						})
 						return
 					}
-					if(!obj.info.phone&&obj.tabIndex == 1){
+					if (!obj.info.phone && obj.tabIndex == 1) {
 						uni.showToast({
 							title: '请输入账号',
 							icon: 'none',
 						})
 						return
 					}
-					if(!obj.info.qrcode){
+					if (!obj.info.qrcode) {
 						uni.showToast({
 							title: '请输入收款码',
 							icon: 'none',
@@ -197,32 +228,32 @@
 					}
 				}
 				let data = ''
-				if(obj.info.id){
+				if (obj.info.id) {
 					data = {
-						id:0,
-						bank:obj.info.bank,//银行
-						bank_name:obj.info.bank_name,//开户行
-						bank_code:obj.info.bank_code,//银行卡号
-						real_name:obj.info.bank_real_name,//开户人
-						default:0,//1设为默认,0取消默认
-						id:obj.info.id,
-						type:obj.type,
-						name:obj.info.name,
-						phone:obj.info.phone,
-						qrcode:obj.info.qrcode,
+						id: 0,
+						bank: obj.info.bank, //银行
+						bank_name: obj.info.bank_name, //开户行
+						bank_code: obj.info.bank_code, //银行卡号
+						real_name: obj.info.bank_real_name, //开户人
+						default: 0, //1设为默认,0取消默认
+						id: obj.info.id,
+						type: obj.type,
+						name: obj.info.name,
+						phone: obj.info.phone,
+						qrcode: obj.info.qrcode,
 					}
-				}else{
+				} else {
 					data = {
-						id:0,
-						bank:obj.info.bank,//银行
-						bank_name:obj.info.bank_name,//开户行
-						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
+						id: 0,
+						bank: obj.info.bank, //银行
+						bank_name: obj.info.bank_name, //开户行
+						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
 					}
 				}
 				uni.showLoading({
@@ -235,9 +266,9 @@
 						icon: 'none',
 						duration: 1000
 					})
-					setTimeout(function () {
+					setTimeout(function() {
 						uni.navigateTo({
-							url:'/pages/user/set/bindBank'
+							url: '/pages/user/set/bindBank'
 						})
 					}, 1000);
 				});
@@ -261,47 +292,52 @@
 		font-size: 28rpx !important;
 		padding: 0rpx 25rpx;
 	}
-	
+
 	.login_input {
 		border-bottom: 1px solid #464755;
 		padding: 35rpx;
 	}
+
 	.uni-input {
 		width: 450rpx;
 		text-align: left !important;
 		font-size: 26rpx;
 	}
+
 	.submission {
 		padding: 80rpx 25rpx;
-	
+
 		.golden {
 			background: #0C5AFA;
 			color: #ffffff;
 		}
 	}
-	
+
 	.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;
@@ -314,10 +350,10 @@
 					border-radius: 0rpx 20rpx 0rpx 0rpx;
 				}
 			}
-	
+
 			&.tip {
 				border-right: 1rpx solid #333D5B;
 			}
 		}
 	}
-</style>
+</style>

+ 9 - 0
pages/user/set/set.vue

@@ -82,11 +82,17 @@
 		<view class="list-cell log-out-btn" @click="toLogout">
 			<text class="cell-tit">{{$t('accountSettings.a9')}}</text>
 		</view>
+		<view class="list-cell log-out-btn margin-t-30" @click="copyDomUrl">
+			<text class="cell-tit">复制APP下载地址</text>
+		</view>
 	</view>
 </template>
 
 <script>
 	import { logout } from '@/api/set.js';
+	import {
+		copyText
+	} from '@/utils/rocessor.js';
 	import {  
 	    mapMutations  
 	} from 'vuex';
@@ -100,6 +106,9 @@
 		},
 		methods:{
 			...mapMutations('user',['logout']),
+			copyDomUrl(){
+				copyText(this.$store.state.baseURL+"/register/")
+			},
 			navTo(url){
 				uni.navigateTo({
 					url:url,