hwb0 il y a 3 ans
Parent
commit
67e0604321

+ 1 - 1
components/pay-popup/pay-popup.vue

@@ -22,7 +22,7 @@
 					</view>
 				</view>
 				<view class="flex agreement">
-					<view class="txt" @click="toRule">同意<text>《盲票产品规则》</text></view>
+					<view class="txt" @click="toRule">同意<text>《盲票购买协议》</text></view>
 					<view class="checked">
 						<u-checkbox-group>
 							<u-checkbox :value="checked" :checked="checked" shape="circle" activeColor="#E96737"

+ 3 - 8
pages/about/index.vue

@@ -3,9 +3,8 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们"></u-navbar>
 		<view class="about">
 			<view class="flex about-logo">
-				<!-- <image src="../../static/logo.png" mode=""></image> -->
-				<view class="image">MP</view>
-				<view class="edition">v 1.0.2</view>
+				<image src="../../static/logo.png" mode=""></image>
+				<view class="edition">v 1.0.3</view>
 			</view>
 			<view class="about-action">
 				<u-cell-group :border="false">
@@ -40,15 +39,11 @@
 		&-logo {
 			flex-direction: column;
 
-			.image {
+			image {
 				width: 164rpx;
 				height: 164rpx;
 				line-height: 164rpx;
-				color: #FFFFFF;
-				font-size: 40rpx;
 				border-radius: 10rpx;
-				background-color: $uni-bg-color;
-				text-align: center;
 				margin-top: 88rpx;
 			}
 			

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
pages/about/rule.vue


+ 1 - 1
pages/bean/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的豆"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的豆"></u-navbar>
 		<view class="bean">
 			<view class="flex bean-balance">
 				<image src="../../static/icon/bean.png" mode="aspectFill"></image>

+ 3 - 3
pages/choice/index.vue

@@ -14,7 +14,7 @@
 						</view>
 						<view class="title" v-if="item.prizeType && item.prizeType.value != 'coin'">{{ item.title }}
 						</view>
-						<view class="title" v-else>豆x {{ item.value }}</view>
+						<view class="title" v-else>豆x {{ item.value }}</view>
 						<view class="tip" v-if="item.remainQty == 0">已兑完</view>
 						<view class="flex action-icon" v-if="actionIndex == index && total > 1">
 							<u-icon name="checkmark" color="#fff" size="24"></u-icon>
@@ -41,11 +41,11 @@
 					<view class="title" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">
 						{{ actionInfo.title }}
 					</view>
-					<view class="title" v-else>豆x {{ actionInfo.value }}</view>
+					<view class="title" v-else>豆x {{ actionInfo.value }}</view>
 				</view>
 				<view class="confirm-prize-tip" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">
 					已放入我的奖品库</view>
-				<view class="confirm-prize-tip" v-else>已放入“我的豆”</view>
+				<view class="confirm-prize-tip" v-else>已放入“我的豆”</view>
 				<view class="flex confirm-prize-btn">
 					<view class="back" @click="back">返回</view>
 					<view class="confirm" @click="toPrize">前往查看</view>

+ 7 - 7
pages/coupon/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券"></u-navbar>
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择代金券"></u-navbar>
 		<view class="coupon-title">可用代金券:0</view>
 		<view class="coupon-list">
 			<!-- <view class="flex coupon-list-item">
@@ -133,17 +133,17 @@
 		padding-bottom: env(safe-area-inset-bottom);
 	
 		.btn {
-			padding: 20rpx 40rpx;
+			padding: 20rpx 0;
 	
 			/deep/ button {
-				width: 100%;
-				line-height: 60rpx;
-				font-size: 28rpx;
-				height: 60rpx;
+				width: 640rpx;
+				height: 90rpx;
+				line-height: 90rpx;
+				font-size: 36rpx;
 				color: #fff;
 				background-color: $uni-bg-color;
 				border: none;
-				border-radius: 100rpx;
+				border-radius: 20rpx;
 			}
 		}
 	}

+ 1 - 1
pages/goods/detail.vue

@@ -228,7 +228,7 @@
 					return
 				}
 				if (this.initData.coinNum < this.payInfo.value) {
-					uni.$u.toast('豆余额不足');
+					uni.$u.toast('豆余额不足');
 					return
 				}
 				uni.showLoading({

+ 2 - 7
pages/login/index.vue

@@ -3,7 +3,7 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="微信授权"></u-navbar>
 		<view class="login">
 			<view class="flex login-image">
-				<view class="image">MP</view>
+				<image src="../../static/logo.png" mode=""></image>
 			</view>
 			<view class="login-txt">盲票</view>
 			<view class="login-txt">盲票将为您提供</view>
@@ -91,16 +91,11 @@
 
 	.login {
 		&-image {
-			.image {
+			image {
 				width: 164rpx;
 				height: 164rpx;
 				border-radius: 10rpx;
 				margin-bottom: 14rpx;
-				background-color: $uni-bg-color;
-				color: #FFFFFF;
-				line-height: 164rpx;
-				font-size: 50rpx;
-				text-align: center;
 			}
 		}
 

+ 10 - 6
pages/ticketBox/detail.vue

@@ -10,7 +10,7 @@
 					<text class="title">{{ info.title }}</text>
 					<view class="flex num">
 						<u-icon name="gift" size="25" color="#EB7009"></u-icon>
-						<text>100%抽中,商品价值10元-10万元</text>
+						<text>100%抽中,奖品多多</text>
 					</view>
 					<view class="tip">图片仅供参考,请以实物为准</view>
 				</view>
@@ -31,7 +31,9 @@
 							</view>
 							<view class="info">
 								<text class="title">{{ item.title }}</text>
-								<text class="num">价值:¥{{ $numberFormat(item.value) }}</text>
+								<text class="num"
+									v-if="item.prizeType != 'coin'">价值:¥{{ $numberFormat(item.value) }}</text>
+								<text class="num" v-else>数量:{{ item.value }}个</text>
 								<text class="num">概率:{{ item.hitRate }}%</text>
 							</view>
 							<view class="name">{{ item.name }}</view>
@@ -96,6 +98,7 @@
 						})
 
 						this.prizeList = prizeList
+						console.log(this.prizeList);
 					}
 				}).catch(() => {
 					uni.hideLoading();
@@ -233,6 +236,7 @@
 
 			&-list {
 				padding-bottom: 100rpx;
+
 				&-item {
 					position: relative;
 					background-color: #FFFFFF;
@@ -267,12 +271,12 @@
 						justify-content: space-between;
 						font-size: 30rpx;
 						padding-left: 50rpx;
-						
-						.title{
+
+						.title {
 							font-weight: bold;
 						}
-						
-						.num{
+
+						.num {
 							color: #848484;
 						}
 					}

+ 2 - 2
pages/user/index.vue

@@ -23,7 +23,7 @@
 				</navigator>
 				<navigator url="/pages/bean/index" class="flex account-info-item" hover-class="navigator-hover">
 					<view>{{ initData.coinNum }}</view>
-					<view>我的豆</view>
+					<view>我的豆</view>
 				</navigator>
 			</view>
 			<view class="flex account-info" v-else @click="notLogin">
@@ -37,7 +37,7 @@
 				</view>
 				<view class="flex account-info-item">
 					<view>-</view>
-					<view>我的豆</view>
+					<view>我的豆</view>
 				</view>
 			</view>
 		</view>

BIN
static/bg/user_bg.png


BIN
static/logo.png


+ 25 - 0
utils/util.js

@@ -41,6 +41,31 @@ export function parseTime(time, pattern) {
   return time_str
 }
 
+
+/**
+ * 解决两个数相加精度丢失问题
+ * @param a
+ * @param b
+ * @returns {Number}
+ */
+export function floatAdd(a, b) {
+    var c, d, e;
+    if(undefined==a||null==a||""==a||isNaN(a)){a=0;}
+    if(undefined==b||null==b||""==b||isNaN(b)){b=0;}
+    try {
+        c = a.toString().split(".")[1].length;
+    } catch (f) {
+        c = 0;
+    }
+    try {
+        d = b.toString().split(".")[1].length;
+    } catch (f) {
+        d = 0;
+    }
+    e = Math.pow(10, Math.max(c, d));
+    return  (floatMul(a, e) + floatMul(b, e)) / e;
+}
+
 //除法去除精度损失
 export function accDiv(arg1, arg2) {
   if(!arg1 || !arg2){

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff