hmp 4 ani în urmă
părinte
comite
d1cf08e2cf

+ 2 - 2
assets/http/service.js

@@ -1,7 +1,7 @@
 import Request from 'luch-request'
 
-let baseURL = 'https://ldt.guosen-fumao.cn/api/'
-// let baseURL = 'http://192.168.1.168:2366/'
+// let baseURL = 'https://ldt.guosen-fumao.cn/api/'
+let baseURL = 'http://192.168.1.168:2366/'
 
 let refreshTokenUrl = baseURL + "blade-auth/oauth/token"
 

+ 59 - 54
pages/login/account-login.vue

@@ -1,42 +1,44 @@
 <template>
 	<view style="position: relative;">
-		<view class="bg"></view>
-		<view class="bg1"></view>
-		<view class="content">
-			<view class="top">
-				<view class="logo">
-					<image src="@/static/icon/logo.png" mode=""></image>
+		<block >
+			<view class="bg"></view>
+			<view class="bg1"></view>
+			<view class="content">
+				<view class="top">
+					<view class="logo">
+						<image src="@/static/icon/logo2.png" mode=""></image>
+					</view>
 				</view>
-			</view>
-
-			<view style="width: 76%;margin-top: 30rpx;">
-				<u-form :model="form" :error-type="['message']" ref="uForm">
-					<u-form-item label-position="top" label="账号" prop="phone" label-width="150">
-						<u-input :border="false" placeholder="请输入账号" v-model="form.phone" type="number"></u-input>
-					</u-form-item>
-					<u-form-item label-position="top" label="密码" prop="password" label-width="150">
-						<u-input :border="false" placeholder="请输入登录密码" type="password" v-model="form.password">
-						</u-input>
-					</u-form-item>
-				</u-form>
-				<view class="text-right margin-top-10 text-sm">
-					<text @click="$jump('/pages/login/login')"
-						style="margin-left: 20rpx;text-decoration: underline;">手机号快捷登录</text>
+				<view style="width: 76%;margin-top: 30rpx;">
+					<u-form :model="form" :error-type="['message']" ref="uForm">
+						<u-form-item label-position="top" label="账号" prop="phone" label-width="150">
+							<u-input :border="false" placeholder="请输入账号" v-model="form.phone" type="number"></u-input>
+						</u-form-item>
+						<u-form-item label-position="top" label="密码" prop="password" label-width="150">
+							<u-input :border="false" placeholder="请输入登录密码" type="password" v-model="form.password">
+							</u-input>
+						</u-form-item>
+					</u-form>
+					<view class="text-right margin-top-10 text-sm">
+						<text @click="$jump('/pages/login/login')"
+							style="margin-left: 20rpx;">手机号快捷登录</text>
+					</view>
 				</view>
-			</view>
-
-			<view style="width: 86%;margin-top: 120rpx;">
-				<view @click="login" class="btn cu-btn round" style="width:100%;height: 90rpx;font-size: 36rpx;">
-					立即登录
+			
+				<view style="width: 86%;margin-top: 120rpx;">
+					<view @click="login" class="btn cu-btn round" style="width:100%;height: 90rpx;font-size: 36rpx;">
+						立即登录
+					</view>
+			
+					<view class="flex justify-between  text-sm" style="margin: 30rpx 30rpx 0;">
+						<text @click="$jump('/pages/login/forget')">忘记密码</text>
+						<text @click="$jump('/pages/login/register')">注册账号</text>
+					</view>
 				</view>
-
-				<view class="flex justify-between  text-sm" style="margin: 30rpx 30rpx 0;">
-					<text @click="$jump('/pages/login/forget')">忘记密码</text>
-					<text @click="$jump('/pages/login/register')">注册账号</text>
-				</view>
-
 			</view>
-		</view>
+		</block>
+		<toast ref="toast" ></toast>
+		<loading ref="loading" type="3" />
 	</view>
 </template>
 
@@ -45,6 +47,8 @@
 	export default {
 		data() {
 			return {
+				loading:true,
+				
 				customStyle: {
 					'backgroundColor': '#d18c42',
 					'color': '#ffffff'
@@ -77,18 +81,23 @@
 		onReady() {
 			this.$refs.uForm.setRules(this.rules);
 		},
-		async onLoad() {
+		async onLoad(options) {
+			this.form.phone=options.phone || ''
 			if (this.$cache.get('phone')) {
+				this.$refs.loading.show("登录中..")
 				uni.reLaunch({
-					url: "/pages/index/index"
+					url: "/pages/index/index",
+					success: () => {
+						this.$refs.loading.hide()
+					}
 				})
+				
 			}
 		},
 		methods: {
 			login() {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						this.$dialog.showLoading('登录中..')
 						this.loginIn()
 					}
 				});
@@ -102,17 +111,23 @@
 				let res = await this.$api.accout.login(p)
 				this.cacheToken(res.data)
 				let shopList = res.data.list
-				uni.hideLoading()
 				if (!res.success) {
 					//登录失败
-					this.$u.toast(res.msg)
+					this.$refs.loading.hide()
+					this.$refs.toast.info(res.msg)
 					return
 				}
+				this.$refs.loading.showLoading('登录中..')
+				this.loading=true
 				uni.setStorageSync("phone", this.form.phone)
 				uni.navigateTo({
 					url: '/pages/index/index'
 				})
-				this.$u.toast('登录成功')
+				setTimeout(()=>{
+					this.loading=false
+					this.$refs.loading.hide()
+					this.$refs.toast.info('登录成功')
+				},1200)
 			},
 			cacheToken(data){
 				let tokenInfo={
@@ -138,8 +153,6 @@
 </style>
 
 <style lang="scss" scoped>
-	$color:#d18c42;
-
 	page {
 		background-color: #FFFFFF;
 	}
@@ -157,9 +170,9 @@
 		position: absolute;
 		right: -240rpx;
 		top: -240rpx;
-		background-color: #d18c42;
+		background-color: $color;
 		border-radius: 50%;
-		box-shadow: 0rpx 0rpx 50rpx #c5803b;
+		box-shadow: 0rpx 0rpx 50rpx #e28e3f;
 	}
 
 	.bg1 {
@@ -169,7 +182,7 @@
 		position: absolute;
 		right: -240rpx;
 		top: -240rpx;
-		background-color: #d18c42;
+		background-color: $color;
 		border-radius: 50%;
 		box-shadow: #c6813b;
 	}
@@ -185,17 +198,9 @@
 			display: flex;
 
 			.logo {
-				background-color: $color;
-				width: 160rpx;
-				height: 160rpx;
-				border-radius: 40rpx;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-
 				image {
-					width: 100rpx;
-					height: 100rpx;
+					width: 150rpx;
+					height: 150rpx;
 				}
 			}
 

+ 2 - 2
pages/login/register.vue

@@ -159,11 +159,11 @@
 				}
 				this.$api.accout.register(params).then(res => {
 					if (res.success) {
-						this.$dialog.showModal('注册成功',false).then(()=>{
+						this.$dialog.showModal('注册成功,请登录',false).then(()=>{
 							this.$cache.remove('promotionCode')
 							this.$cache.remove('salesmanId')
 							uni.reLaunch({
-								url:"/pages/login/account-login",
+								url:"/pages/login/account-login?phone="+this.form.phone,
 							})
 						})
 					}

+ 2 - 2
pages/withdraw/detail.vue

@@ -30,11 +30,11 @@
 			</view>
 			<view class="item">
 				<text>提现服务费</text>
-				<text>{{detail.platformFee}}</text>
+				<text>{{detail.platformFee || 0}}</text>
 			</view>
 			<view class="item">
 				<text>提现手续费</text>
-				<text>{{detail.fee}}</text>
+				<text>{{detail.fee || 0}}</text>
 			</view>
 			<view class="item">
 				<text>实际到账</text>

+ 5 - 3
pages/withdraw/withdraw.vue

@@ -257,8 +257,9 @@
 				}
 				if (resp.success && this.$isNotEmpty(resp.data)) {
 					this.withdrawId=resp.data
-					this.$refs.loading.showLoading('处理中')
-					this.check()
+					this.$refs.toast.info('已提交申请,请耐心等待')
+					// this.$refs.loading.showLoading('处理中')
+					// this.check()
 				}
 			},
 			doWithdraw() {
@@ -283,7 +284,8 @@
 						_this.$refs.loading.hide()
 						clearInterval(timer)
 					}
-					if (_this.count == 15) {
+					if (_this.count == 5) {
+						this.$refs.toast.info('已提交申请,请耐心等待')
 						_this.$refs.loading.hide()
 						clearInterval(timer)
 					}