소스 검색

样式修改 登录加用户校验

1004749546@qq.com 4 년 전
부모
커밋
5e8424a6f5
4개의 변경된 파일67개의 추가작업 그리고 19개의 파일을 삭제
  1. 8 0
      api/user.js
  2. 14 4
      pages/login/phoneLogin.vue
  3. 20 5
      pages/order/order.vue
  4. 25 10
      pages/order/orderDetail.vue

+ 8 - 0
api/user.js

@@ -49,4 +49,12 @@ export const sellerFindByPartnerNo = params => {
     url: url,
     method: 'get'
   })
+}
+// 手机号登录 校验用户账号状态
+export const checkCustomerState = params => { 
+  let url = `checkCustomerState/${params.phone}`
+  return axios.request({
+    url: url,
+    method: 'get'
+  })
 }

+ 14 - 4
pages/login/phoneLogin.vue

@@ -26,7 +26,7 @@
 	import { isvalidPhone } from '@/libs/validate.js'
 	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	import popupCon from '@/components/uni-popup/popup-con.vue'
-	import { loginPhone, sendVerifyCode } from '@/api/user.js'
+	import { loginPhone, sendVerifyCode, checkCustomerState } from '@/api/user.js'
 	export default{
 		components: {
 			uniPopup,
@@ -107,9 +107,19 @@
 						uni.showToast({icon: 'none',title: '请输入正确的手机号码'})
 						return
 					}else{
-						this.retsetCode()
-						//  图文验证码
-						this.$refs.imageTxtPopup.open()
+						// 先校验手机号用户是否禁用
+						checkCustomerState({phone:this.form.phone}).then(res=>{
+							if(res.status == 200) {
+								this.retsetCode()
+								//  图文验证码
+								this.$refs.imageTxtPopup.open()
+							} else {
+								uni.showToast({
+									title: res.message,
+									icon: 'none'
+								})
+							}
+						})
 					}
 				}else{
 					uni.showToast({icon: 'none',title: '请先输入手机号'})

+ 20 - 5
pages/order/order.vue

@@ -21,7 +21,10 @@
 								<view>
 									<view class="ellipsis-two">{{row.goodsName}}</view>
 									<view class="bundle-num">
-										<view><text class="price-num">{{row.payGold}}</text> <text class="price-text">乐豆</text></view>
+										<view class="num-cont">
+											<text class="price-num">{{row.payGold}}</text> 
+											<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+										</view>
 										<view>X {{row.buyQty}}</view>
 									</view>
 								</view>
@@ -31,9 +34,16 @@
 									<text class="total-text">
 										共{{item.goodsNum}}件商品
 									</text>
-									<text v-if="item.orderState=='WAIT_PAY'"><text class="money-total">应付</text><text class="price-num">{{item.originalGold}}</text>
-										<text class="price-text">乐豆</text></text>
-									<text v-else><text class="money-total">实付</text><text class="price-num">{{item.payGold}}</text> <text class="price-text">乐豆</text></text>
+									<view class="num-cont" v-if="item.orderState=='WAIT_PAY'">
+										<text class="money-total">应付</text>
+										<text class="price-num">{{item.originalGold}}</text>
+										<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+									</view>
+									<view class="num-cont" v-else>
+										<text class="money-total">实付</text>
+										<text class="price-num">{{item.payGold}}</text> 
+										<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+									</view>
 								</view>
 							</view>
 							<view class="check-row">
@@ -541,7 +551,12 @@
 				}
 			}
 		}
-
+		// 乐豆数量
+		.num-cont{
+			display: flex;
+			align-items: center;
+			float: right;
+		}
 		// 支付密码弹窗
 		.slot-content{
 			padding: 30upx 0;

+ 25 - 10
pages/order/orderDetail.vue

@@ -31,7 +31,10 @@
 				<view>
 					<view class="ellipsis-two">{{item.goodsName}}</view>
 					<view class="bundle-num">
-						<view><text class="price-num">{{item.payGold}}</text> <text class="price-text">乐豆</text></view>
+						<view class="num-cont">
+							<text class="price-num">{{item.payGold}}</text> 
+							<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+						</view>
 						<view>X {{item.buyQty}}</view>
 					</view>
 				</view>
@@ -39,25 +42,31 @@
 			<u-gap height="10" bg-color="#f8f8f8"></u-gap>
 			<!-- 订单信息 -->
 			<u-cell-group>
-				<u-cell-item title="订单编号" :value-style="{color: '#000',fontSize: '28upx'}" :arrow="false">
+				<u-cell-item title="订单编号" :value-style="{color: '#000'}" :arrow="false">
 					{{orderInfo.orderSn}}
 				</u-cell-item>
-				<u-cell-item title="下单时间" :value-style="{color: '#000',fontSize: '28upx'}" :arrow="false">
+				<u-cell-item title="下单时间" :value-style="{color: '#000'}" :arrow="false">
 					{{orderInfo.orderTime}}
 				</u-cell-item>
-				<u-cell-item v-if="orderInfo.payTime" title="支付时间" :value-style="{color: '#000',fontSize: '28upx'}" :arrow="false">
+				<u-cell-item v-if="orderInfo.payTime" title="支付时间" :value-style="{color: '#000'}" :arrow="false">
 					{{orderInfo.payTime}}
 				</u-cell-item>
 				<u-gap height="10" bg-color="#f8f8f8"></u-gap>
-				<u-cell-item title="商品合计" :value-style="{color: '#000',fontSize: '28upx'}" :arrow="false">
-					<text class="price-num">{{orderInfo.originalGold}}</text> <text class="price-text">乐豆</text>
+				<u-cell-item title="商品合计" :value-style="{color: '#000'}" :arrow="false">
+					<view class="num-cont">
+						<text class="price-num">{{orderInfo.originalGold}}</text>
+						<u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+					</view>
 				</u-cell-item>
-				<u-cell-item title="运费" :value-style="{color: '#000',fontSize: '28upx'}" :arrow="false">
+				<u-cell-item title="运费" :value-style="{color: '#000'}" :arrow="false">
 					免运费
 				</u-cell-item>
-				<u-cell-item :title="(orderInfo.orderState=='WAIT_PAY'||orderInfo.orderState=='CANCEL') ? '待支付':'实际支付'" :value-style="{color: '#000',fontSize: '28upx'}"
+				<u-cell-item :title="(orderInfo.orderState=='WAIT_PAY'||orderInfo.orderState=='CANCEL') ? '待支付':'实际支付'" :value-style="{color: '#000'}"
 				 :arrow="false">
-					<text class="price-num">{{orderInfo.originalGold}}</text> <text class="price-text">乐豆</text>
+				 <view class="num-cont">
+					 <text class="price-num">{{orderInfo.originalGold}}</text>
+					 <u-image mode="scaleToFill" width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
+				 </view>
 				</u-cell-item>
 			</u-cell-group>
 		</view>
@@ -349,13 +358,19 @@
 			.price-num {
 				font-size: 32upx;
 				color: red;
+				font-weight: 600;
 			}
 
 			.u-cell {
 				padding: 10rpx 32rpx;
 			}
 		}
-
+		// 乐豆数量
+		.num-cont{
+			display: flex;
+			align-items: center;
+			float: right;
+		}
 		.footer {
 			padding: 20rpx;
 		}