zhanghui 2 лет назад
Родитель
Сommit
519f56efef

+ 2 - 2
common/js/env.js

@@ -2,8 +2,8 @@
 
 // let baseUrl = `https://jje.admin.xinyuekj.com.cn`
 // let baseUrl = `https://jje.admin.xinyuekj.com.cn/test-api`
-// let baseUrl = `http://65i1sxopd9qp.ngrok.xiaomiqiu123.top`
-let baseUrl = `https://jje.xinyuekj.com.cn/prod-api`
+let baseUrl = `http://65i1sxopd9qp.ngrok.xiaomiqiu123.top`
+// let baseUrl = `https://jje.xinyuekj.com.cn/prod-api`
 
 
 

+ 3 - 1
main.js

@@ -10,7 +10,9 @@ import env from './common/js/env.js';
 const vconsole = require('vconsole')
 Vue.prototype.$vconsole = new vconsole()
 // #endif
-import {VueJsonp} from 'vue-jsonp'
+import {
+	VueJsonp
+} from 'vue-jsonp'
 Vue.use(VueJsonp)
 import uView from "uview-ui";
 Vue.use(uView);

+ 9 - 0
pages/index/index.rpx.css

@@ -498,6 +498,7 @@
 
 .orderMsg{
  padding-left: 32rpx;
+	margin-top: 20rpx;
 }
 .key{
 	height: 44rpx;
@@ -525,3 +526,11 @@
 .qrcodeView{
 	padding: 50rpx 0;
 }
+.stateStr{
+	font-size: 28rpx;
+	margin-right: 24rpx;
+	background: #FFF6CE;
+	padding: 0 15rpx;
+	border-radius: 5rpx;
+	font-weight: bold;
+}

+ 15 - 4
pages/index/index.vue

@@ -96,10 +96,16 @@
 				</view>
 				<view class="flex-col orderMsg">
 
-					<view class="flex-row">
-						<u-icon name="/static/index/quhao.png" size="20"></u-icon>
-						<text class="key">排号:</text>
-						<text class="value">{{currService.planNumber}}</text>
+
+					<view class="flex-row justify-between">
+						<view class="flex-row">
+							<u-icon name="/static/index/quhao.png" size="20"></u-icon>
+							<text class="key">排号:</text>
+							<text class="value">{{currService.planNumber}}</text>
+						</view>
+						<view class="flex-col justify-center stateStr">
+							<text>{{currService.statusDesc}}</text>
+						</view>
 					</view>
 					<view class="flex-row">
 						<u-icon name="/static/index/orderNo1.png" size="20"></u-icon>
@@ -111,6 +117,11 @@
 						<text class="key">服务项目:</text>
 						<text class="value">{{currService.serviceProject}}</text>
 					</view>
+					<view class="flex-row">
+						<u-icon name="/static/index/tel.png" size="20"></u-icon>
+						<text class="key">用户电话:</text>
+						<text class="value">{{currService.phone}}</text>
+					</view>
 				</view>
 				<view class="flex-row justify-center">
 					<view class="imgs">

+ 1 - 2
pages/login/index.rpx.css

@@ -26,12 +26,11 @@
 	margin-top: 50rpx;
 }
 .forgetPassword{
-	height: 44rpx;
 	font-size: 28rpx;
 	font-family: PingFangSC, PingFang SC;
 	font-weight: 400;
 	color: #999999;
-	line-height: 44rpx;
+	line-height: 60rpx;
 	margin-top: 32rpx;
 	text-align: right;
 }

+ 32 - 1
pages/login/login.vue

@@ -27,7 +27,17 @@
 					</u-form-item>
 				</view>
 
-<!--				<view class="forgetPassword"><text>忘记密码?</text></view>-->
+				<view class="forgetPassword flex-row justify-between ">
+					<view>
+						<checkbox-group @change="checkboxChange">
+							<checkbox :checked="savePassword"  color="#FFCC33" :style="{'transform':'scale(0.8)'}"/>
+							<text>记住账号密码</text>
+						</checkbox-group>
+					</view>
+<!--					<view class="">-->
+<!--						<text>忘记密码?</text>-->
+<!--					</view>-->
+				</view>
 
 				<view class="loginButton" @click="login">
 					<text>登录</text>
@@ -44,6 +54,7 @@
 	export default {
 		data() {
 			return {
+				savePassword:false,
 				form: {
 					username: '',
 					password: ''
@@ -69,10 +80,30 @@
 
 			}
 		},
+		onShow(){
+			this.form.username = uni.getStorageSync('username')
+			this.form.password = uni.getStorageSync('password')
+			this.savePassword = uni.getStorageSync('savePassword')
+		},
 		methods: {
+			checkboxChange(e){
+				this.savePassword = !this.savePassword
+				console.log(this.savePassword)
+			},
 
 			login() {
 				this.$refs.uForm.validate().then(res => {
+
+					if (this.savePassword){
+						uni.setStorageSync('savePassword', this.savePassword)
+						uni.setStorageSync('username', this.form.username)
+						uni.setStorageSync('password', this.form.password)
+					}else {
+						uni.setStorageSync('savePassword', this.savePassword)
+						uni.removeStorageSync('username');
+						uni.removeStorageSync('password');
+					}
+
 					this.$api.login.techLogin(this.form).then(res => {
 						uni.setStorageSync('accessToken', res.data.data.access_token)
 						uni.removeStorageSync('storeId');

+ 2 - 1
pages/userInfo/userInfo.vue

@@ -103,7 +103,8 @@
 			},
 			logout(){
 				this.$api.login.logout().then(res=>{
-					uni.clearStorageSync();
+					uni.removeStorageSync('accessToken');
+					uni.removeStorageSync('userInfo');
 					uni.navigateTo({
 						url:'/pages/login/login'
 					})

BIN
static/index/tel.png