lyqu 4 лет назад
Родитель
Сommit
366a73adf5

+ 1 - 11
common/http/http.api.js

@@ -81,11 +81,6 @@ let dictUrl = {
 	codeUrl: '/blade-system/dict-biz/dictionary',
 }
 
-let verificateUrl = {
-	getCodeUrl: 'huawei/sms/sendSms',
-	verificationCodeUrl: 'huawei/sms/validCode'
-}
-
 let musicBoostUrl = {
 	detailUrl: '/cyzh-production/production/getProductDetail'
 }
@@ -179,14 +174,9 @@ const install = (Vue, vm) => {
 	let dict = {
 		code:(params = {}) => vm.$u.get(dictUrl.codeUrl, params),
 	}
-	
-	let verificate = {
-		getCode:(params = {}) => vm.$u.get(verificateUrl.getCodeUrl, params),
-		verificateCode:(params = {}) => vm.$u.post(verificateUrl.verificationCodeUrl, params),
-	}
 
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
-	vm.$u.api = {wxInfo,uploadFile, activity, user, points, boost,production,goods,medal,pointsGoods, musicBoost,yeePay,dict,verificate};
+	vm.$u.api = {wxInfo,uploadFile, activity, user, points, boost,production,goods,medal,pointsGoods, musicBoost,yeePay,dict};
 }
 
 export default {

+ 1 - 1
pages/activityList/activity/awards.vue

@@ -77,7 +77,7 @@
 				userId: '',
 				data: {},
 				list:[],
-				carNumber: '**** 4414',
+				carNumber: '',
 				status: 'loadmore',
 				current:1
 			}

+ 113 - 13
pages/activityList/activity/bankCard.vue

@@ -4,11 +4,22 @@
 		<view class="container">
 			<view class="text-bold" style="font-size: 40upx;padding: 30upx 0upx 10upx 40upx;">绑定银行卡</view>
 			<view class="padding-left-lg" style="font-size: 28upx;">请如实填写一下资料</view>
-			<u-picker mode="selector" v-model="bankShow"  :default-selector="[0]" :range="selector" @confirm="confirm"></u-picker>
+			<u-picker mode="selector" v-model="bankShow"  :default-selector="[0]" :range="selector" range-key="dictValue" @confirm="bankConfirm"></u-picker>
+			<u-picker mode="selector" v-model="accountShow"  :default-selector="[0]" :range="accountType" range-key="dictValue" @confirm="accountConfirm"></u-picker>
 			<view class="flex align-center" style="padding: 30upx 60upx 20upx 60upx;">
 				<view style="width: 160upx;font-family: PingFang SC;font-weight: bold;color: #000000;"><text class="text-red">*</text>选择银行</view>
-				<view class="flex justify-between align-center" style="width: 200upx;height: 60upx;border: #565656 1upx solid;border-radius: 16upx;" @click="bankShow = true">
-					<view class="padding-left-sm">{{bank}}</view>
+				<view class="flex justify-between align-center" style="width: 260upx;height: 60upx;border: #b0b0b0 1upx solid;border-radius: 16upx;" @click="bankShow = true">
+					<view class="padding-left-sm" :class="bank.startsWith('请') ? 'text-gray': ''">{{bank}}</view>
+					<view class="padding-right-xs cuIcon-unfold"></view>
+				</view>
+			</view>
+			<view style="padding: 0 60upx;">
+				<u-line color="#d4d4d4"></u-line>
+			</view>
+			<view class="flex align-center" style="padding: 20upx 60upx;">
+				<view style="width: 160upx;font-family: PingFang SC;font-weight: bold;color: #000000;"><text class="text-red">*</text>账号类型</view>
+				<view class="flex justify-between align-center" style="width: 260upx;height: 60upx;border: #b0b0b0 1upx solid;border-radius: 16upx;" @click="accountShow = true">
+					<view class="padding-left-sm" :class="account.startsWith('请') ? 'text-gray': ''">{{account}}</view>
 					<view class="padding-right-xs cuIcon-unfold"></view>
 				</view>
 			</view>
@@ -54,8 +65,11 @@
 		data() {
 			return {
 				bankShow: false,
-				bank: '招商银行',
+				bank: '请选择银行',
 				cardNum: '',
+				account: '请选择类型',
+				accountType: [],
+				accountShow: false,
 				name: '',
 				phone: '',
 				code: '',
@@ -63,12 +77,29 @@
 				totalTime: 120,		//总时间,单位秒
 				recordingTime: 0, 	//记录时间变量
 				currentTime: 0, 	//显示时间变量
-				selector: ['招商银行', '建设银行', '农业银行', '工商银行', '中信银行', '平安银行'],
+				selector: [],
 			}
 		},
+		onLoad() {
+			this.getBankType('bank_type');
+			this.getAccountType('bank_account_type');
+		},
 		methods: {
-			confirm(index) {
-				this.bank = this.selector[index];
+			getBankType(param) {
+				this.$u.api.dict.code({code: param}).then(res => {
+					this.selector = res;
+				})
+			},
+			getAccountType(param) {
+				this.$u.api.dict.code({code: param}).then(res => {
+					this.accountType = res;
+				})
+			},
+			bankConfirm(index) {
+				this.bank = this.selector[index].dictValue;
+			},
+			accountConfirm(index) {
+				this.account = this.accountType[index].dictValue;
 			},
 			checking() {
 				if(!this.$u.test.mobile(this.phone)) {
@@ -77,13 +108,24 @@
 						title: "请输入正确的手机号码"
 					})
 					return;
+				} else {
+					let url = 'huawei/sms/sendSms?phone=' + this.phone
+					this.$u.post(url).then(res => {
+						if (res == 'success') {
+							//把显示时间设为总时间
+							this.currentTime = this.totalTime;
+							//开始倒计时
+							this.state = true;
+							//执行倒计时
+							this.checkingTime();
+						} else {
+							uni.showToast({
+								icon: "none",
+								title: res
+							})
+						}
+					})
 				}
-				//把显示时间设为总时间
-				this.currentTime = this.totalTime;
-				//开始倒计时
-				this.state = true;
-				//执行倒计时
-				this.checkingTime();
 			},
 			checkingTime() {
 				let that = this;
@@ -113,6 +155,64 @@
 					this.currentTime = this.totalTime;
 				}
 			},
+			bind() {
+				if (this.$u.test.isEmpty(this.bank)) {
+					uni.showToast({
+						icon: "none",
+						title: '请选择银行',
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.account)) {
+					uni.showToast({
+						icon: "none",
+						title: '请选择账号类型',
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.cardNum)) {
+					uni.showToast({
+						icon: "none",
+						title: '请输入银行卡号',
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.name)) {
+					uni.showToast({
+						icon: "none",
+						title: '请输入真实姓名',
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.phone) || !this.$u.test.mobile(this.phone)) {
+					uni.showToast({
+						icon: "none",
+						title: '请填写正确的手机号',
+					})
+					return;
+				}
+				if (this.$u.test.isEmpty(this.code)) {
+					uni.showToast({
+						icon: "none",
+						title: '请输入验证码',
+					})
+					return;
+				}
+				let url = 'huawei/sms/validCode?phone=' + this.phone + '&code=' + this.code;
+				this.$u.post(url).then(res => {
+					if (res == 'success') {
+						uni.showToast({
+							icon: "none",
+							title: "绑定成功",
+						})
+					} else {
+						uni.showToast({
+							icon: "none",
+							title: res,
+						})
+					}
+				})
+			}
 		}
 	}
 </script>

+ 1 - 1
pages/activityList/mine/boostDetail.vue

@@ -66,7 +66,7 @@
 		color: #111111;
 	}
 	.time {
-		font-size: 16upx;
+		font-size: 22upx;
 		font-family: PingFang SC;
 		color: #9E9E9E;
 	}

+ 9 - 1
pages/activityList/mine/introduction.vue

@@ -44,7 +44,10 @@
 						<view class="padding-sm">
 							<u-avatar :src="item.avatar" size="82"></u-avatar>
 						</view>
-						<view class="name">{{item.nickName}}</view>
+						<view>
+							<view class="name">{{item.nickName}}</view>
+							<view class="time padding-top-xs">{{item.createTime}}</view>
+						</view>
 					</view>
 					<view class="text-sm" style="color: #757575;">{{item.typeSub == 1 ? '打榜' : '打赏'}}</view>
 					<view class="name padding-right flex justify-end" style="width: 180upx;">{{+item.totalHotValue}}热力值</view>
@@ -206,6 +209,11 @@
 		height: 145upx;
 		margin-top: -60upx;
 	}
+	.time {
+		font-size: 22upx;
+		font-family: PingFang SC;
+		color: #9E9E9E;
+	}
 	.tag {
 		padding: 0 10upx;
 		display: flex;