Procházet zdrojové kódy

Merge branch 'master' of http://117.62.238.129:7000/shunfengche/shunfengche-sfd

# Conflicts:
#	pages.json
lxp před 2 týdny
rodič
revize
c90a8adf99

+ 109 - 35
my/manage/message.vue

@@ -3,37 +3,43 @@
 		<view class="flex padding-lg align-center">
 			<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 30rpx;height: 30rpx;" mode=""></image>
 			<view style="margin-left: 20rpx;">
-				当前使用车辆: 辽A12345
+				当前使用车辆: {{ checkeditem.carBrand }}
 			</view>
 		</view>
 		<view class="margin padding boxss" v-for="(item, index) in list" :key="index">
 			<view class="flex" style="justify-content: space-between;">
 				<view class="flex">
 					<view>
-						<image v-if="globalImages" src="../../static/login_icon.jpg" style="width: 200rpx;height: 140rpx;" mode=""></image>
+						<image :src="item.carPhoto ? item.carPhoto : ''" style="width: 200rpx;height: 140rpx;" mode=""></image>
 					</view>
 					<view style="margin-left: 20rpx;">
-						<view>{{ item.title }}</view>
-						<view style="color: #999;">{{ item.zxc }}</view>
-						<view style="color: #00c18a;" v-if="item.asd === 1">已认证</view>
-						<view style="color: #e6a23c;" v-if="item.asd === 2">审核中</view>
-						<view style="color: #f56c6c;" v-if="item.asd === 3">审核失败</view>
+						<view>{{ item.carPlate }}</view>
+						<view style="color: #999;">{{ item.carBrand }} - {{ item.carColor }}</view>
+						<view style="color: #00c18a;" v-if="item.status === 2">已认证</view>
+						<view style="color: #e6a23c;" v-if="item.status === 1">审核中</view>
+						<view style="color: #f56c6c;" v-if="item.status === 3">审核失败</view>
 					</view>
 				</view>
 				<view >
-					<view style="margin-left: 20rpx; background: #00c18a; padding: 8rpx 15rpx; border-radius: 11rpx; color: #fff;" v-if="item.qwe === 1">使用中</view>
-					<view style="margin-left: 20rpx; background: #e6a23c; padding: 8rpx 15rpx; border-radius: 11rpx; color: #fff;" v-if="item.qwe === 2">审核中</view>
-					<view style="margin-left: 20rpx; background: #f56c6c; padding: 8rpx 15rpx; border-radius: 11rpx; color: #fff;" v-if="item.qwe === 3">未通过</view>
+					<view style="margin-left: 20rpx; background: #00c18a; padding: 8rpx 15rpx; border-radius: 11rpx; color: #fff;" v-if="item.checked === 0">使用中</view>
+					<view style="margin-left: 20rpx; background: #e6a23c; padding: 8rpx 15rpx; border-radius: 11rpx; color: #fff;" v-if="item.checked === 1">未使用</view>
 				</view>
 			</view>
 			<view style="border-top: 1rpx solid #f3f4f6; margin: 20rpx 0;"></view>
 			<view class="flex" style="justify-content: space-between;color: #999;">
 				<view class="">
-					··· 更多
-				</view>
-				<view>
-					切换使用
+					<!-- 编辑图标 -->
+					<view style="position: absolute; left: 130rpx;" @tap="handleEdit(item)">
+						<image v-if="globalImages" :src="globalImages + 'imgs/edit.png'" style="width: 32rpx;height: 32rpx;" mode="">
+						</image>
+					</view>
+					<!-- 删除图标 -->
+					<view style="position: absolute; left: 60rpx;" @click="handleDelete(item.carId)">
+						<image v-if="globalImages" :src="globalImages + 'imgs/del.png'" style="width: 32rpx;height: 32rpx;" mode="">
+						</image>
+					</view>
 				</view>
+				<view @click="updateChecked(item)">切换使用</view>
 			</view>
 		</view>
 	</view>
@@ -45,24 +51,8 @@
 		data() {
 			return {
 				globalImages: '',
-				list: [
-					{
-						title: '辽12345',
-						zxc: '丰田卡罗拉 · 白色',
-						asd: 1,
-						qwe: 1,
-					},{
-						title: '辽12345',
-						zxc: '丰田卡罗拉 · 白色',
-						asd: 2,
-						qwe: 2,
-					},{
-						title: '辽12345',
-						zxc: '丰田卡罗拉 · 白色',
-						asd: 3,
-						qwe: 3,
-					}
-				]
+				list: [],
+				checkeditem: {}
 			}
 		},
 		onLoad() {
@@ -70,10 +60,94 @@
 				console.log('✅ 全局图片路径:', path)
 				this.globalImages = path
 			})
+			this.selectCarList()
+		},
+		methods: {
+			// list数据
+			selectCarList() {
+				this.$Request.getT('/app/car/selectCarList').then(res => {
+					if (res.code == 0) {
+						if (res.data) {
+							this.list = res.data
+							this.checkeditem = this.list.find(item => item.checked === 1)
+						} else {
+							this.list = ''
+						}
+					}
+				})
+			},
+			insertCar() {
+				this.$Request.postT("/app/car/insertCar").then(res => {
+					
+				});
+			},
+			updateCar() {
+				this.$Request.postT("/app/car/updateCar").then(res => {
+					
+				});
+			},
+			handleDelete(id) {
+				let data = {
+					carId: id
+				}
+				this.$Request.postT("/app/car/deleteCar", data).then(res => {
+				    if (res.code == 0) {
+				        uni.showModal({
+				            title: '提示',
+				            content: '删除成功',
+				            showCancel: false,
+				            success: () => {
+				                this.selectCarList()
+				            }
+				        });
+				    } else {
+				        uni.showModal({
+				            title: '提示',
+				            content: res.msg,
+				            showCancel: false
+				        });
+				    }
+				}).catch(err => {
+				    uni.showModal({
+				        title: '提示',
+				        content: '网络错误,请重试',
+				        showCancel: false
+				    });
+				});
+			},
+			updateChecked(item) {
+				const newChecked = item.checked === 0 ? 1 : 0;
+				const data = {
+					...item,
+					checked: newChecked
+				}
+				this.$Request.postT("/app/car/updateChecked", data).then(res => {
+				    if (res.code == 0) {
+				        uni.showModal({
+				            title: '提示',
+				            content: '切换成功',
+				            showCancel: false,
+				            success: () => {
+				                this.selectCarList()
+								this.checkeditem = this.list.find(item => item.checked === 1);
+				            }
+				        });
+				    } else {
+				        uni.showModal({
+				            title: '提示',
+				            content: res.msg,
+				            showCancel: false
+				        });
+				    }
+				}).catch(err => {
+				    uni.showModal({
+				        title: '提示',
+				        content: '网络错误,请重试',
+				        showCancel: false
+				    });
+				});
+			}
 		},
-		// methods: {
-			
-		// },
 	}
 </script>
 

+ 381 - 0
my/safety/exam.vue

@@ -0,0 +1,381 @@
+<template>
+	<!-- 列表 -->
+	  <view class="safety-exam">
+		<!-- for此部分 -->
+		<examinationItem ref="examinationItem" :questionObj="paperQuestionList[currentIndex]" :itemIndex="currentIndex" @selected="handleSelected">
+		</examinationItem>
+		<u-card v-if="currentUserAnswer" padding="32" full :showHead="false">
+			<view slot="body">
+				<view v-if="currentUserAnswer.isCorrect" style="display: flex;align-items: center;margin-bottom: 24rpx;">
+					<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 28rpx;height: 28rpx;"></image>
+					<view style="margin-left: 16rpx;color: #333333;line-height: 40rpx;font-size: 28rpx;">回答正确!</view>
+				</view>
+				<view v-else style="display: flex;align-items: center;margin-bottom: 24rpx;">
+					<image v-if="globalImages" :src="globalImages + 'imgs/cha.png'" style="width: 28rpx;height: 28rpx;"></image>
+					<view style="margin-left: 16rpx;color: #333333;line-height: 40rpx;font-size: 28rpx;">回答错误!</view>
+				</view>
+				<view style="display: flex;align-items: center;margin-bottom: 24rpx;" @click="showAnalysis(currentUserAnswer.analysis)">
+					<image v-if="globalImages" :src="globalImages + 'imgs/jiexi.png'" style="width: 28rpx;height: 28rpx;"></image>
+					<view style="margin-left: 16rpx;color: #333333;line-height: 40rpx;font-size: 28rpx;">查看解析</view>
+				</view>
+				<!-- <view>
+					<view>解析</view>
+					<view>
+						<text>答案: {{ currentUserAnswer.correctValue }}</text>
+						<text style="margin-left: 40rpx;">您选择: </text>
+						<text style="color: ;">{{ currentUserAnswer.code }}</text>
+					</view>
+					<view>题目解析</view>
+					<view>{{ currentUserAnswer.analysis }}</view>
+				</view> -->
+			</view>
+		</u-card>
+		<view class="placeholder"></view>
+		<view class="tabbar_bottom">
+			<view style="height: 100%;display: flex;justify-content: space-between;align-items: center;padding: 0 32rpx;">
+				<view style="color: #333333;font-size: 28rpx;">已完成 {{ answerCount }}/{{ paperQuestionList.length }}</view>
+				<view style="display: flex;align-items: center;">
+					<u-button v-if="currentIndex > 0" type="primary" @click="prev" size="medium">上一题</u-button>
+					<view>
+						<u-button
+							v-if="currentIndex < paperQuestionList.length - 1 && currentIndex !== paperQuestionList.length - 1"
+							type="primary"
+							size="medium"
+							style="margin-left: 32rpx;"
+							@click="next"
+						>
+							下一题
+						</u-button>
+						<u-button v-else type="primary" size="medium" style="margin-left: 32rpx;" @click="navgo('/my/safety/examcomplete')">提交</u-button>
+					</view>
+				</view>
+			</view>
+		</view>
+	  </view>
+</template>
+
+<script>
+	import ExaminationItem from './modules/ExaminationItem'
+	import { waitForGlobalImages } from '@/utils/globalImageLoader'
+	
+	export default {
+		components: { ExaminationItem },
+		data() {
+			return {
+				globalImages: null,
+				// 题目列表
+				paperQuestionList: [
+					{
+						id: 1,
+						questionType: 1,
+						questionContent: '在雨天行驶时,以下哪种做法是正确的?',
+						analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+						questionOptionList: [
+							{ id: 1, optionCode: 'A', optionContent: '降低车速,保持安全距离 ' },
+							{ id: 2, optionCode: 'B', optionContent: '加速通过积水路段 ' },
+							{ id: 3, optionCode: 'C', optionContent: '紧急制动避免打滑  ' },
+							{ id: 4, optionCode: 'D', optionContent: '关闭雨刷器节省电力  ' }
+						],
+					},
+					{
+						id: 2,
+						questionType: 1,
+						questionContent: '某日13时10分,罗某驾驶一辆中型客车从高速公路0公里处出发,下午14时10分行至该高速公路125公里加200米处时,发生追尾碰撞,机动车驶出西南侧路外边坡,造成11人死亡、2人受伤。罗某的主要违法行为是什么?',
+						analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+						questionOptionList: [
+							{ id: 1, optionCode: 'A', optionContent: '超速行驶' },
+							{ id: 2, optionCode: 'B', optionContent: '不按交通标线行驶' },
+							{ id: 3, optionCode: 'C', optionContent: '客车超员' },
+							{ id: 4, optionCode: 'D', optionContent: '疲劳驾驶' }
+						],
+					},
+					{
+						id: 3,
+						questionType: 1,
+						questionContent: '在山区道路超车时,应怎样超越?',
+						analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+						questionOptionList: [
+							{ id: 1, optionCode: 'A', optionContent: '选择较缓的下坡路' },
+							{ id: 2, optionCode: 'B', optionContent: '选择较长的下坡路' },
+							{ id: 3, optionCode: 'C', optionContent: '选择宽阔的缓上坡' },
+							{ id: 4, optionCode: 'D', optionContent: '选择较长的下坡路' }
+						],
+					},
+					// {
+					// 	id: 4,
+					// 	questionType: 1,
+					// 	questionContent: '驾驶汽车在进出隧道时应注意什么?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '开启远光灯' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '适当提高车速' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '关闭近光灯' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '提前降低车速' }
+					// 	],
+					// },
+					// {
+					// 	id: 5,
+					// 	questionType: 1,
+					// 	questionContent: '夜间驾驶机动车,应在哪种情况下使用远光灯?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '没有路灯或照明差的道路上' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '车速低于30km/h时' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '会车时' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '跟车行驶时' }
+					// 	],
+					// },
+					// {
+					// 	id: 6,
+					// 	questionType: 1,
+					// 	questionContent: '行车中发现左侧轮胎漏气时怎样处置?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '慢慢制动减速' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '迅速制动减速' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '迅速向右转向' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '采取紧急制动' }
+					// 	],
+					// },
+					// {
+					// 	id: 7,
+					// 	questionType: 1,
+					// 	questionContent: '大风天气行车,当感到转向盘突然“被夺”时,下列做法正确的是什么?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '顺风向转动转向盘' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '逆风向转动转向盘' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '采取紧急制动' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '双手稳握转向盘' }
+					// 	],
+					// },
+					// {
+					// 	id: 8,
+					// 	questionType: 1,
+					// 	questionContent: '行车中超越右侧停放的车辆时,为预防其突然起步或开启车门,应怎样做?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '预留出横向安全距离,减速行驶' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '保持正常速度行驶' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '长鸣喇叭' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '加速通过' }
+					// 	],
+					// },
+					// {
+					// 	id: 9,
+					// 	questionType: 1,
+					// 	questionContent: '驾驶人行车中看到注意儿童标志的时候,应怎样做?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '加速行驶' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '绕道行驶' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '谨慎选择行车速度' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '保持正常车速行驶' }
+					// 	],
+					// },
+					// {
+					// 	id: 10,
+					// 	questionType: 1,
+					// 	questionContent: '抢救昏迷失去知觉的伤员需注意什么?',
+					// 	analysis: 'analysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysisanalysis',
+					// 	questionOptionList: [
+					// 		{ id: 1, optionCode: 'A', optionContent: '马上实施心肺复苏' },
+					// 		{ id: 2, optionCode: 'B', optionContent: '使劲掐伤员的人中' },
+					// 		{ id: 3, optionCode: 'C', optionContent: '连续拍打伤员面部' },
+					// 		{ id: 4, optionCode: 'D', optionContent: '抢救前先检查呼吸' }
+					// 	],
+					// }
+				],
+				//请求接口获取答案
+				answers: {
+					1: {
+						code: 'A'
+					},
+					2: {
+						code: 'A'
+					},
+					3: {
+						code: 'A'
+					},
+					4: {
+						code: 'A'
+					},
+					5: {
+						code: 'A'
+					},
+					6: {
+						code: 'A'
+					},
+					7: {
+						code: 'A'
+					},
+					8: {
+						code: 'A'
+					},
+					9: {
+						code: 'A'
+					},
+					10: {
+						code: 'A'
+					},
+				},
+				// 题目索引
+				currentIndex: 0,
+				// key = 题目Id,   value = 回答结果数据
+				userAnswers: {},
+				// 回答题目数量
+				answerCount: 0,
+				// 当前题目, 用户的答案
+				currentUserAnswer: null,
+				arr: [],
+				token: '',
+			};
+		},
+		onLoad(e) {
+			waitForGlobalImages().then((path) => {
+				this.globalImages = path
+			})
+		},
+		onShow() {
+			this.token = this.$queue.getData('token')
+		},
+		methods: {
+			next() {
+				if(this.currentIndex < this.paperQuestionList.length - 1) {
+					this.currentIndex = this.currentIndex + 1
+					const questionId = this.paperQuestionList[this.currentIndex].id
+					const answerResult = this.userAnswers[questionId]
+					// console.log(questionId, answerResult, this.userAnswers)
+					if(answerResult) {
+						this.$refs.examinationItem.selectCode = answerResult.code
+						this.currentUserAnswer = answerResult
+					} else {
+						this.$refs.examinationItem.selectCode = null
+						this.currentUserAnswer = null
+					}
+					// console.log('下一题', this.currentUserAnswer)
+				}
+			},
+			prev() {
+				if(this.currentIndex > 0) {
+					this.currentIndex = this.currentIndex - 1
+					const questionId = this.paperQuestionList[this.currentIndex].id
+					const answerResult = this.userAnswers[questionId]
+					// console.log(questionId, answerResult, this.userAnswers)
+					if(answerResult) {
+						this.$refs.examinationItem.selectCode = answerResult.code
+						this.currentUserAnswer = answerResult
+					} else {
+						this.$refs.examinationItem.selectCode = null
+						this.currentUserAnswer = null
+					}
+					// console.log('上一题', this.currentUserAnswer)
+				}
+			},
+			/**
+			 * 处理选择选项事件
+			 * @param {Object} originalCode 原来选择的答案
+			 * @param {Object} code 现在选择的答案
+			 * @param {Object} questionId 题目Id
+			 * @param {Object} questionIndex 索引
+			 */
+			handleSelected(originalCode, code, questionId, questionIndex) {
+				const answerResult = this.userAnswers[questionId]
+				if(answerResult) {
+					this.$refs.examinationItem.selectCode = originalCode
+					return
+				} else {
+					// 查询答案判断是否正确
+					const correctValue = this.answers[questionId].code
+					const answer = {
+						code,
+						correctValue,
+						isCorrect: correctValue === code,
+						analysis: this.paperQuestionList[questionIndex].analysis
+					}
+					this.userAnswers[questionId] = answer
+					this.currentUserAnswer = answer
+				}
+				const ids = Object.keys(this.userAnswers)
+				this.answerCount = ids && ids.length || 0
+				// console.log('eeeeee', code, questionId, questionIndex, this.$refs.examinationItem.testValue)
+			},
+			showAnalysis(analysis) {
+				uni.showModal({
+					title: '题目解析',
+					content: analysis,
+					confirmText: '确定',
+					cancelText: '取消',
+				})
+			},
+			navgo(e) {
+				// #ifdef MP-WEIXIN
+				if (uni.getStorageSync('sendMsg')) {
+					uni.requestSubscribeMessage({
+						tmplIds: this.arr,
+						success(re) {
+							// console.log(re,'**********')
+							var datas = JSON.stringify(re);
+							if (datas.indexOf("accept") != -1) {
+								console.log(re)
+							}
+						},
+						fail: (res) => {
+							console.log(res)
+						}
+					})
+				}
+				// #endif
+				let that = this
+				if (that.token) {
+					// 请求接口获取成绩, 超过了多少考生, 是否合格
+					const params = {
+						score: 80,
+						exceeding: 70,
+						qualified: true,
+					}
+					uni.navigateTo({
+						url: e + '?score=' + params.score + '&exceeding=' + params.exceeding + '&qualified=' + params.qualified
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	.safety-exam {
+		width: 100%;
+		position: relative;
+		padding: 16rpx 32rpx;
+		box-sizing: border-box;
+	}
+	
+	.placeholder {
+		height: 108rpx;
+		padding-bottom: 16rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		box-sizing: content-box;
+	}
+	.tabbar_bottom {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 108rpx;
+		background: #FFFFFF;
+		// padding-left: 30rpx;
+		// padding-right: 30rpx;
+		padding-bottom: 16rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		box-sizing: content-box;
+		border-top: 1rpx solid #E4E7ED;
+		z-index: 101;
+	}
+</style>

+ 183 - 0
my/safety/examcomplete.vue

@@ -0,0 +1,183 @@
+<template>
+	<view class="exam-complete">
+		<u-card padding="32" full :showHead="false">
+			<view slot="body" style="display: flex;flex-direction: column;align-items: center;justify-content: center;">
+				<view v-if="examData.qualified" style="width: 100%;">
+					<view class="view-center">
+						<image v-if="globalImages" :src="globalImages + 'imgs/tonguo.png'" style="width: 192rpx;height: 192rpx;"></image>
+					</view>
+					<view class="view-center" style="margin: 32rpx 0;font-size: 48rpx;line-height: 64rpx;font-weight: 500;color: #1F2937;">恭喜您通过考试</view>
+					<view class="view-center" style="font-size: 72rpx;line-height: 80rpx;font-weight: 500;color: #1F2937;">{{ examData.score }}分</view>
+					<view class="view-center" style="margin: 16rpx 0;color: #333333;font-size: 28rpx;line-height: 42rpx;">及格分数: 100分</view>
+					<u-line-progress :percent="70" :showPercent="false" :height="16"></u-line-progress>
+					<view class="view-center" style="margin: 16rpx 0;font-size: 28rpx;line-height: 40rpx;color: #999999;">您的成绩超过了{{ examData.exceeding }}%的考生</view>
+				</view>
+				<view v-else style="width: 100%;">
+					<view>
+						<view class="view-center">
+							<image v-if="globalImages" :src="globalImages + 'imgs/weitongguo.png'" style="width: 192rpx;height: 192rpx;"></image>
+						</view>
+						<view class="view-center" style="margin: 32rpx 0;font-size: 48rpx;line-height: 64rpx;font-weight: 500;color: #1F2937;">您未通过考试</view>
+						<view class="view-center" style="font-size: 72rpx;line-height: 80rpx;font-weight: 500;color: #1F2937;">{{ examData.score }}分</view>
+						<view class="view-center" style="margin: 16rpx 0;color: #333333;font-size: 28rpx;line-height: 42rpx;">及格分数: 100分</view>
+						<u-line-progress :percent="70" :showPercent="false" :height="16"></u-line-progress>
+						<view class="view-center" style="margin: 16rpx 0;font-size: 28rpx;line-height: 40rpx;color: #999999;">您的成绩超过了{{ examData.exceeding }}%的考生</view>
+					</view>
+				</view>
+			</view>
+		</u-card>
+		
+		<u-card padding="32" full :showHead="false">
+			<view slot="body" style="display: flex;flex-direction: column;">
+				<view style="color: #1F2937;font-size: 36rpx;line-height: 56rpx;">考试建议</view>
+				<view style="margin-top: 24rpx;display: flex;align-items: baseline;">
+					<image v-if="globalImages" :src="globalImages + 'imgs/jianyi.png'" style="width: 17rpx;height: 24rpx;"></image>
+					<view style="color: #374151;font-size: 28rpx;line-height: 42rpx;margin-left: 16rpx;text-align: left;">您在"乘客服务"部分错误较多,建议复习服务 规范章节</view>
+				</view>
+				<view style="margin-top: 24rpx;display: flex;align-items: baseline;">
+					<image v-if="globalImages" :src="globalImages + 'imgs/jianyi.png'" style="width: 17rpx;height: 24rpx;"></image>
+					<view style="color: #374151;font-size: 28rpx;line-height: 42rpx;margin-left: 16rpx;text-align: left;">您在"平台规则"部分有2题错误,请关注最新政策 更新</view>
+				</view>
+			</view>
+		</u-card>
+		
+		<view class="placeholder"></view>
+		<view class="tabbar_bottom">
+			<view style="position: relative;width: calc(100% - 64rpx);">
+				<u-button v-if="examData.qualified" type="primary" style="width: 80%;" @click="jumpTo('/pages/index/index')">开始接单</u-button>
+				<u-button v-else type="error" :customStyle="{ backgroundColor: '#F56C6C' }" @click="navgo('/my/safety/video')">重新答题</u-button>
+				<view style="font-size: 24rpx;line-height: 32rpx;text-align: center;color: #999999;margin-top: 16rpx;">通过考试后, 您将获得更多优质订单</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { waitForGlobalImages } from '@/utils/globalImageLoader'
+	
+	export default {
+		data() {
+			return {
+				globalImages: null,
+				arr: [],
+				token: '',
+				examData: {
+					score: null,
+					exceeding: null,
+					qualified: null,
+				}
+			}
+		},
+		onLoad(options) {
+			const params = {
+				score: Number(options.score),
+				exceeding: Number(options.exceeding),
+				qualified: options.qualified === 'true',
+			}
+			this.examData = params
+			waitForGlobalImages().then((path) => {
+				this.globalImages = path
+			})
+		},
+		onShow() {
+			this.token = this.$queue.getData('token')
+		},
+		methods: {
+			navgo(e) {
+				// #ifdef MP-WEIXIN
+				if (uni.getStorageSync('sendMsg')) {
+					uni.requestSubscribeMessage({
+						tmplIds: this.arr,
+						success(re) {
+							// console.log(re,'**********')
+							var datas = JSON.stringify(re);
+							if (datas.indexOf("accept") != -1) {
+								console.log(re)
+							}
+						},
+						fail: (res) => {
+							console.log(res)
+						}
+					})
+				}
+				// #endif
+				let that = this
+				if (that.token) {
+					uni.navigateTo({
+						url: e
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+			jumpTo(e) {
+				// #ifdef MP-WEIXIN
+				if (uni.getStorageSync('sendMsg')) {
+					uni.requestSubscribeMessage({
+						tmplIds: this.arr,
+						success(re) {
+							// console.log(re,'**********')
+							var datas = JSON.stringify(re);
+							if (datas.indexOf("accept") != -1) {
+								console.log(re)
+							}
+						},
+						fail: (res) => {
+							console.log(res)
+						}
+					})
+				}
+				// #endif
+				let that = this
+				if (that.token) {
+					uni.switchTab({
+						url: e
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	.exam-complete {
+		width: 100%;
+		position: relative;
+		padding: 16rpx 32rpx;
+		box-sizing: border-box;
+		
+		.view-center {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+	}
+	
+	.placeholder {
+		height: 128rpx;
+		padding-bottom: 16rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		box-sizing: content-box;
+	}
+	.tabbar_bottom {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: 128rpx;
+		padding-left: 32rpx;
+		padding-right: 32rpx;
+		padding-bottom: 16rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		box-sizing: content-box;
+		z-index: 101;
+	}
+</style>

+ 76 - 0
my/safety/modules/ExaminationItem.vue

@@ -0,0 +1,76 @@
+<template>
+	<view class="examination-item">
+		<u-card padding="32" full :showHead="false">
+			<view slot="body">
+				<view>
+					<u-button type="primary" size="mini" disabled>{{questionObj.questionType == 1 ? '单选题' : questionObj.questionType == 2 ? '多选题' : '判断题'}}</u-button>
+				</view>
+				<!-- 题干 -->
+				<view class="question">
+				  {{itemIndex + 1}}. {{questionObj.questionContent}}
+				</view>
+				<!-- 选项- for循环每个选项 -->
+				<block v-for="item in questionObj.questionOptionList" :key="item.id">
+					<view
+						class="question-option"
+						@click="choose(item)"
+						:class="selectCode === item.optionCode ? 'question-option-active' : ''"
+					>
+						{{item.optionCode}}. {{item.optionContent}}
+					</view>
+				</block>
+			</view>
+		</u-card>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			questionObj: {
+				type: Object,
+				default: () => {}
+			},
+			itemIndex: {
+				type: Number,
+				default: 0
+			},
+		},
+		data() {
+			return {
+				selectCode: null,
+				testValue: 'lxp',
+			};
+		},
+		methods: {
+			choose(e) {
+				const originalCode = this.selectCode
+				this.selectCode = e.optionCode
+				this.$emit('selected', originalCode, e.optionCode, this.questionObj.id, this.itemIndex)
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.examination-item {
+		
+		.question {
+			margin: 16rpx 0;
+			color: #1F2937;
+			line-height: 56rpx;
+			font-size: 36rpx;
+		}
+		.question-option {
+			margin: 24rpx 0;
+			padding: 24rpx 0 24rpx 26rpx;
+			box-sizing: border-box;
+			border: 1px solid #E4E7ED;
+			border-radius: 8rpx;
+		}
+		.question-option-active {
+			background-color: #E8FBF6;
+			border: 1px solid #00C18A;
+		}
+	}
+</style>

+ 170 - 0
my/safety/video.vue

@@ -0,0 +1,170 @@
+<template>
+	<view class="safety-video">
+		<view class="video-title">安全驾驶培训视频</view>
+		<video
+			class="video-content"
+			id="myVideo" 
+			src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4" 
+			@error="videoErrorCallback"
+			controls
+		>
+		</video>
+		<view>
+			<view v-if="!videoUnlocked" class="video-status">
+				<view>
+					<!-- todo 图标不对 -->
+					<image v-if="globalImages" :src="globalImages + 'imgs/jianyi.png'" style="width: 24rpx;height: 28rpx;"></image>
+					<text style="margin-left: 16rpx;">视频未完成</text>
+				</view>
+				<view>禁止快进</view>
+			</view>
+			<view v-else class="video-status">
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 24rpx;height: 28rpx;"></image>
+					<text style="margin-left: 16rpx;">视频已完成</text>
+				</view>
+				<view>禁止快进</view>
+			</view>
+		</view>
+		
+		<u-card padding="32" full :showHead="false">
+			<view slot="body">
+				<view style="display: flex;justify-content: space-between;align-items: center;color: #1F2937;">
+					<view>安全考核</view>
+					<view><u-button type="error" plain size="mini" disabled>未开始</u-button></view>
+				</view>
+				
+				<view style="display: flex;justify-content: space-between;align-items: center;margin: 24rpx 0;color: #333333;">
+					<view>
+						<view style="color: #6B7280">及格分数</view>
+						<view>100分</view>
+					</view>
+					<view>
+						<view style="color: #6B7280">题目数量</view>
+						<view>10题</view>
+					</view>
+					<view>
+						<view style="color: #6B7280">考试时长</view>
+						<view>15分钟</view>
+					</view>
+				</view>
+				
+				<view style="margin: 8rpx 0;">
+					<u-button type="primary" @click="navgo('/my/safety/exam')">
+						{{ videoUnlocked ? '开始考试' : '完成视频后解锁考试' }}
+					</u-button>
+				</view>
+			</view>
+		</u-card>
+		
+		<u-card padding="32" full :showHead="false">
+			<view slot="body">
+				<view style="color: #1F2937;margin-bottom: 8rpx;">
+					考试须知
+				</view>
+				<view>
+					<view style="display: flex;align-items: center;margin: 16rpx 0;">
+						<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 28rpx;height: 28rpx;"></image>
+						<text style="margin-left: 16rpx;color: #4B5563;">观看完整培训视频后方可参加考试</text>
+					</view>
+					<view style="display: flex;align-items: center;margin: 16rpx 0;">
+						<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 28rpx;height: 28rpx;"></image>
+						<text style="margin-left: 16rpx;color: #4B5563;">考试共10题,答对10题为通过</text>
+					</view>
+					<view style="display: flex;align-items: center;margin: 16rpx 0;">
+						<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 28rpx;height: 28rpx;"></image>
+						<text style="margin-left: 16rpx;color: #4B5563;">答错题目需重新作答,直至全部正确</text>
+					</view>
+					<view style="display: flex;align-items: center;margin: 16rpx 0;">
+						<image v-if="globalImages" :src="globalImages + 'imgs/dui.png'" style="width: 28rpx;height: 28rpx;"></image>
+						<text style="margin-left: 16rpx;color: #4B5563;">考试期间不可退出,否则视为放弃</text>
+					</view>
+				</view>
+			</view>
+		</u-card>
+	</view>
+</template>
+
+<script>
+	import { waitForGlobalImages } from '@/utils/globalImageLoader'
+	export default {
+		data() {
+			return {
+				globalImages: null,
+				videoUnlocked: true,
+				
+				arr: [],
+				token: '',
+			}
+		},
+		onLoad(e) {
+			waitForGlobalImages().then((path) => {
+				this.globalImages = path
+			})
+		},
+		onShow() {
+			this.token = this.$queue.getData('token')
+		},
+		methods: {
+			navgo(e) {
+				// #ifdef MP-WEIXIN
+				if (uni.getStorageSync('sendMsg')) {
+					uni.requestSubscribeMessage({
+						tmplIds: this.arr,
+						success(re) {
+							// console.log(re,'**********')
+							var datas = JSON.stringify(re);
+							if (datas.indexOf("accept") != -1) {
+								console.log(re)
+							}
+						},
+						fail: (res) => {
+							console.log(res)
+						}
+					})
+				}
+				// #endif
+				let that = this
+				if (that.token) {
+					uni.navigateTo({
+						url: e
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	.safety-video {
+		width: 100%;
+		position: relative;
+		padding: 16rpx 32rpx;
+		box-sizing: border-box;
+		
+		.video-title {
+			font-size: 32rpx;
+			line-height: 56rpx;
+			font-weight: 400;
+		}
+		
+		.video-content {
+			width: 100%;
+			margin: 20rpx 0;
+			border-top-left-radius: 16rpx;
+			border-top-right-radius: 16rpx;
+		}
+		
+		.video-status {
+			display: flex;
+			justify-content: space-between;
+			font-size: 28rpx;
+			line-height: 40rpx;
+		}
+	}
+	
+</style>

+ 3 - 2
my/wallet/Txmoney.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="content" v-if="shangxian =='否'">
+	<!-- v-if="shangxian =='否'" -->
+	<view class="content" >
 		<view class="part_one">
 			<view class="one_title">可提现金额</view>
 			<view class="one_price">¥{{mayMoney}}</view>
@@ -361,7 +362,7 @@
 							success: e => {
 								if (e.confirm) {
 									that.$queue.showLoading('提现中...');
-									that.$Request.getT('/app/cash/cashMoney?classify=' + that.current +
+									that.$Request.getT('/app/cash/cashMoney?userType=2&classify=' + that.current +
 										'&money=' + that.money).then(res => {
 										if (res.code === 0) {
 											that.$queue.showToast('提现申请成功,预计三个工作日到账');

+ 256 - 47
my/wallet/baozhengjin.vue

@@ -1,10 +1,41 @@
 <template>
 	<view class="content">
-		<view class="acont_part1">
-			<view class="part1_bg">
-				<image src="../static/image-bg.png"></image>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="flex" style="justify-content: space-between; margin: 20rpx 0; color: #999;">
+				<view> 账户状态</view>
+				<view style="padding: 8rpx 15rpx; border: 1rpx solid #00c18a; background: #e8fbf6; color: #00c18a; border-radius: 12rpx;">
+					已认证
+				</view>
+			</view>
+			<view class="flex" style="justify-content: space-between; margin: 20rpx 0; color: #999;">
+				<view> 保证金状态</view>
+				<view>
+					账户余额
+				</view>
+			</view>
+			<view class="flex" style="justify-content: space-between; margin: 20rpx 0;">
+				<view style="font-size: 32rpx; color: #f56c6c;"> 未缴纳</view>
+				<view style="font-size: 32rpx;" >
+					¥ 0.00
+				</view>
+			</view>
+		</view>
+		<view class="padding margin" style="background: #fff; border-radius: 13rpx;">
+			<view class="acount_type">设置保证金金额</view>
+			<view class="flex" style="justify-content: space-between;margin-top: 30rpx;">
+				<view style="color: #999;"> 建议金额</view>
+				<view class="flex">
+					<view v-for="(item,index) in moneyslist" :key="index" :class="moneyslists == item.id ? 'tabg' : 'tab'" style="margin-left: 20rpx;" @click="tabshj(item.value, index)">
+						¥ {{ item.value }}
+					</view>
+				</view>
+			</view>
+			<view style="margin-top: 20rpx;">
+				<u-input v-model="earnestMoney" type="number" placeholder="请输入支付金额" :border="true" />
 			</view>
-			<view class="part1_box">
+			<view style="font-size: 26rpx; color: #999;margin-top: 20rpx;">保证金金额范围 ¥500 - ¥5000</view>
+			<view class="text-right margin-top-sm margin-right-sm" @click="goDet">查看明细</view>
+		<!-- 	<view class="part1_box">
 				<view class="text-right margin-top-sm margin-right-sm" @click="goDet">查看明细</view>
 				<view class="balance">
 					<view class="balance_name">保证金余额(元)</view>
@@ -14,18 +45,153 @@
 					<view class="btn_left" @click="tuiBtn()">退保证金</view>
 					<view class="btn_right" @click="openPay()">缴纳保证金</view>
 				</view>
+			</view> -->
+		</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="acount_type">支付方式</view>
+			<view style="margin-top: 30rpx;">
+				<view class="flex align-center justify-between padding margin-bottom-sm" v-for="(item,index) in payList"
+					style="border: 1rpx solid #f2f2f2; border-radius: 16rpx;"
+					:key='index'>
+					<image v-if="globalImages" :src="globalImages + item.image" style="width: 56rpx;height: 56rpx;" mode=""></image>
+					<view class="flex-sub text-xl margin-left">{{item.name}}</view>
+					<radio-group name="openWay" style="margin-left: 20upx;" @change='selectWay(item)'>
+						<label class="tui-radio">
+							<radio class="red" :checked="openWay === item.id ? true : false" />
+						</label>
+					</radio-group>
+				</view>
 			</view>
 		</view>
-		<view class="acont_part2">
-			<view class="acount_type">保证金规则</view>
-			<view class="acount_box" v-for="(item,index) in list" :key="item.id">
-				<view class="name">{{item.name}}</view>
-				<view class="tit">{{item.tit}}</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="acount_type">保证及说明</view>
+			<view class="acount_box flex" style="margin-top: 30rpx;" v-for="(item,index) in list" :key="item.id">
+				<view>
+					<image v-if="globalImages" :src="globalImages + item.imgurl" style="width: 56rpx;height: 56rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					<view class="name">{{item.name}}</view>
+					<view class="tit">{{item.tit}}</view>
+				</view>
+			</view>
+			<view class="acount_box flex padding" style="margin-top: 30rpx;border-radius: 16rpx; background: #fcf6ec;">
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/exclamation.png'" style="width: 36rpx;height: 36rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					保证金仅用于保障服务质量,无违规行为可全额退还。
+				</view>
+			</view>
+		</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="acount_type">常见问题</view>
+			<view class="u-page__item" style="margin-top: 20rpx;">
+				<u-collapse
+						accordion
+				>
+					<u-collapse-item
+							title="为什么要缴纳保证金?"
+					>
+						<text class="u-collapse-content">缴纳保证金主要是为了 保障平台、乘客和司机的多方利益。通过保证金,平台可以有效约束司机行为,防止违规操作(如拒单、绕路等),同时为乘客提供更安全的服务保障。</text>
+					</u-collapse-item>
+					<u-collapse-item
+							title="保证金可以退还吗?"
+					>
+						<text class="u-collapse-content">可以,停止接单30天后可申请退还保证金,审核通过后3个工作日内到账。</text>
+					</u-collapse-item>
+					<u-collapse-item
+							title="退款需要多长时间?"
+					>
+						<text class="u-collapse-content">1-3个工作日</text>
+					</u-collapse-item>
+					<u-collapse-item
+							title="什么情况下会扣除保证金?"
+					>
+						<text class="u-collapse-content">司机存在违规情况,例如:无正当理由拒绝接单、故意绕路增加乘客费用、故意绕路增加乘客费用、无故取消已接订单等。</text>
+					</u-collapse-item>
+				</u-collapse>
+			</view>
+		</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="flex" style="justify-content: space-between;">
+				<view class="acount_type">交易记录</view>
+				<view style="font-size: 26rpx; color: #999;" @click="goDet">查看全部</view>
+			</view>
+			<view style="margin-top: 30rpx;">
+				<view class="content" v-if="list2.length" >
+					<view class="list_box" v-for="(item,index) in list2" :key="index">
+						<view class="list_left" style="padding: 30rpx 0;" :class="{ 'border-bottom': index !== list2.length - 1 }">
+							<view class="name">{{item.title}}</view>
+							<view class="flex justify-between align-center">
+								<view style="color: red;">{{item.type==1?'+':'-'}} {{item.money}}</view>
+								<view class="data">{{item.createTime}}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="acount_type">是否需要帮助?</view>
+			
+			<view class="flex justify-between align-center" style="padding: 30rpx; margin: 20rpx 0; background: #f9fafb; border-radius: 16rpx;">
+				<view class="flex">
+					<image v-if="globalImages" :src="globalImages + 'imgs/kefu.png'" style="width: 76rpx;height: 76rpx;" mode=""></image>
+					<view style="margin-left: 20rpx;">
+						<view class="name">在线客服</view>
+						<view class="data">24小时服务</view>
+					</view>
+				</view>
+				<view class="name">联系</view>
+			</view>
+			<view class="flex justify-between align-center" style="padding: 30rpx; margin: 20rpx 0; background: #f9fafb; border-radius: 16rpx;">
+				<view class="flex">
+					<image v-if="globalImages" :src="globalImages + 'imgs/xiaoxi.png'" style="width: 76rpx;height: 76rpx;" mode=""></image>
+					<view style="margin-left: 20rpx;">
+						<view class="name">意见反馈</view>
+						<view class="data">帮助我们改进</view>
+					</view>
+				</view>
+				<view class="name">反馈</view>
+			</view>
+	</view>
+		<view class="margin padding" style="background: #fff; border-radius: 16rpx;">
+			<view class="flex" style="margin-top: 30rpx;" >
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/tishi.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					<view class="name">安全提示</view>
+				</view>
+			</view>
+			<view class="flex" style="margin-top: 30rpx;" >
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/answer.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					<view class="name">平台不会以任何理由要求您提供支付密码</view>
+				</view>
+			</view>
+			<view class="flex" style="margin-top: 30rpx;" >
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/answer.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					<view class="name">所有交易均通过加密通道完成</view>
+				</view>
+			</view>
+			<view class="flex" style="margin-top: 30rpx;" >
+				<view>
+					<image v-if="globalImages" :src="globalImages + 'imgs/answer.png'" style="width: 56rpx;height: 56rpx;" mode=""></image>
+				</view>
+				<view style="margin-left: 20rpx;">
+					<view class="name">保证金退还无需支付任何手续费</view>
+				</view>
 			</view>
-
 		</view>
+		<view class="sure" @click="jiaoBtn">立即缴纳</view>
 		<!-- 支付方式 -->
-		<u-popup v-model="shows" mode="center" width="640rpx" height="640rpx" border-radius="14" @close="closePopup()">
+		<!-- <u-popup v-model="shows" mode="center" width="640rpx" height="640rpx" border-radius="14" @close="closePopup()">
 			<view style="width: 100%;height: 300upx;background: #FFFFFF;">
 				<view class="receipt_code">
 					<view class="code_title">请输入支付金额</view>
@@ -45,11 +211,12 @@
 					<view class="sure" @click="jiaoBtn">确定</view>
 				</view>
 			</view>
-		</u-popup>
+		</u-popup> -->
 	</view>
 </template>
 
 <script>
+	import { waitForGlobalImages } from '@/utils/globalImageLoader'
 	export default {
 		data() {
 			return {
@@ -59,20 +226,48 @@
 				moneys: '',
 				list: [{
 					id: 1,
-					name: '保证金退款',
-					tit: '48小时内无订单记录即可申请退保证金,保证金统一退款至账户余额,实时到账。'
+					name: '缴纳保证金',
+					tit: '选择支付方式并完成支付,保证金即将冻结在您的账户中。',
+					imgurl: 'imgs/one.png'
 				}, {
 					id: 2,
-					name: '保证金缴纳',
-					tit: '所有跑腿专人直送订单需缴纳保证金,没有缴纳者将无法接订单,建议您及时缴纳。'
+					name: '开始接单',
+					tit: '缴纳保证金后,您将获得更多优质订单和平台权益。',
+					imgurl: 'imgs/two.png'
+				}, {
+					id: 3,
+					name: '申请退款',
+					tit: '停止接单30天后可申请退还保证金,审核通过后3个工作日内到账。',
+					imgurl: 'imgs/three.png'
 				}],
 				mayMoney: 0,
 				openWay: 1,
 				payList: [],
-				earnestMoney: ''
+				earnestMoney: '',
+				globalImages: '',
+				moneyslists: 2,
+				accordionVal:'1',
+				list2: [],
+				moneyslist: [
+					{
+						id: 0,
+						value:500,
+					},{
+						id: 1,
+						value:1000,
+					},{
+						id: 2,
+						value:2000,
+					},
+				]
 			}
 		},
 		onLoad() {
+			this.taskData2()
+			waitForGlobalImages().then((path) => {
+			    console.log('✅ 全局图片路径:', path)
+			    this.globalImages = path
+			  })
 			// uni.showToast({
 			// 	title: '申请成功'
 			// })
@@ -87,20 +282,19 @@
 			// #ifdef MP-WEIXIN
 			this.payList = [{
 				id: 1,
-				image: '../static/weixin.png',
+				image: 'imgs/weixin.png',
 				name: '微信'
 			}]
 			// #endif
-
 			// #ifdef APP-PLUS
 			this.payList = [{
 					id: 1,
-					image: '../static/weixin.png',
+					image: 'imgs/weixin.png',
 					name: '微信'
 				},
 				{
 					id: 2,
-					image: '../static/zhifubao.png',
+					image: 'imgs/zhifubao.png',
 					name: '支付宝'
 				}
 			]
@@ -142,6 +336,18 @@
 
 		},
 		methods: {
+			// 获取任务数据
+			taskData2() {
+				this.$Request.getT('/app/userMoney/selectUserMoneyDetails?classify=1&page=1&limit=15').then(res => {
+					if(res.code==0){
+						this.list2 = res.data.records
+					}
+				});
+			},
+			tabshj(value, index) {
+				this.moneyslists = index
+				this.earnestMoney = value
+			},
 			openPay() {
 				let checkCertification = uni.getStorageSync('checkCertification')
 				if (checkCertification == 2) {
@@ -443,6 +649,20 @@
 </script>
 
 <style>
+	.border-bottom {
+		border-bottom: 1rpx solid #e4e7ed; /* 下边框样式 */
+	}
+	.tab {
+		padding: 10rpx 15rpx;
+		border-radius: 12rpx;
+		background: #f5f5f5;
+	}
+	.tabg {
+		padding: 8rpx 15rpx;
+		border-radius: 12rpx;
+		background: #00c18a;
+		color: #fff;
+	}
 	/* 支付金额弹框 */
 	.receipt_code {
 		width: 90%;
@@ -462,7 +682,7 @@
 
 	::v-deep .u-input--border {
 		border: 1px solid #F2F2F2 !important;
-		background: #F2F2F2 !important;
+		/* background: #F2F2F2 !important; */
 		color: #999999 !important;
 		font-weight: 500 !important;
 		letter-spacing: 2rpx !important;
@@ -470,7 +690,7 @@
 
 	::v-deep .u-input__input {
 		font-size: 30rpx;
-		font-weight: bold;
+		/* font-weight: bold; */
 		flex: 1;
 		color: #999999 !important;
 		min-height: 85rpx !important;
@@ -478,14 +698,15 @@
 	}
 
 	.sure {
-		width: 100%;
+		width: 90%;
 		height: 80rpx;
-		background: #2474FF;
+		background: #00c18a;
 		color: white;
-		border-radius: 46rpx;
+		border-radius: 16rpx;
 		text-align: center;
 		line-height: 80rpx;
 		margin-top: 30rpx;
+		margin-left: 5%;
 		letter-spacing: 2rpx;
 	}
 
@@ -500,21 +721,6 @@
 
 	}
 
-	.part1_bg image {
-		width: 100%;
-		height: 384rpx;
-	}
-
-	.part1_box {
-		width: 90%;
-		height: 400rpx;
-		background: #ffffff;
-		position: absolute;
-		top: 70rpx;
-		left: 37rpx;
-		border-radius: 25rpx;
-	}
-
 	.balance {
 		width: 90%;
 		margin: 0 auto;
@@ -572,21 +778,24 @@
 	}
 
 	.acount_type {
-		font-size: 32rpx;
-		font-weight: bold;
+		font-size: 34rpx;
+		/* font-weight: bold; */
 		letter-spacing: 2rpx;
-		line-height: 75rpx;
+		margin-bottom: 10rpx;
+		/* line-height: 75rpx; */
 	}
 
 	.name {
 		font-size: 26rpx;
-		font-weight: bold;
+		/* font-weight: bold; */
 		letter-spacing: 2rpx;
-		line-height: 70rpx;
+		margin-bottom: 10rpx;
 	}
 
 	.tit {
-		color: #666666;
+		color: #999;
 		font-size: 25rpx;
 	}
+	
+	
 </style>

+ 431 - 21
my/wallet/index.vue

@@ -1,10 +1,11 @@
 <template>
 	<view class="">
-		<view class="bg padding">
+		<view class="padding">
 			<view class="box">
-				<view class="tit">可用资金(元)</view>
-				<view class="pri"><text>{{balance?balance:'0'}}</text> </view>
-				<view class="flex align-center justify-between margin-top-xl">
+				<view class="tit">账户余额</view>
+				<view class="pri"><text>¥{{balance?balance:'0'}}</text> </view>
+				<view style="font-size: 26rpx; color: #999;padding-bottom: 20rpx;"><text>可提现金额:¥{{balance?balance:'0'}}</text> </view>
+	 			<!-- <view class="flex align-center justify-between margin-top-xl"> -->
 					<!-- <view class="">
 						<view>总资金</view>
 						<view style="font-size: 44rpx;">{{money?money:'0'}}</view>
@@ -13,22 +14,83 @@
 						<view>冻结资金</view>
 						<view style="font-size: 44rpx;">2.00</view>
 					</view> -->
-				</view>
+				<!-- </view> -->
 			</view>
-			<view class="flex align-center justify-between padding-top">
+	<!-- 		<view class="flex align-center justify-between padding-top">
 				<view>
 					<view class="padding-bottom-xs">总资产(元)</view>
 					<view class="text-bold" style="font-size: 48rpx;">{{balance?balance:'0'}}</view>
 				</view>
 				<view class="flex align-center">
 					<view class="cz" @click="goTo('/my/wallet/Txmoney')">提现</view>
-					<!-- <view class="tx" @click="gocz()">充值</view> -->
+					<view class="tx" @click="gocz()">充值</view>
+				</view>
+			</view> -->
+		</view>
+		<view style="padding: 0 30rpx;">
+			<view class="padding" style="background: #fff; border-radius: 16rpx;">
+				<view class="title">
+					提现
+				</view>
+				<view style="padding: 20rpx 0;">
+					提现金额
+				</view>
+				<view class="two_box">
+					<view style="border-radius: 13rpx 0rpx 0rpx 13rpx;width: 80rpx; height: 80rpx; font-size: 40rpx; background: #ffe9e9; color: #f56c6c;text-align: center;line-height: 80rpx;border-top: 1rpx solid #ccc;border-left: 1rpx solid #ccc;border-bottom: 1rpx solid #ccc;">
+						¥
+					</view>
+					<u-input style="width: 100%;height: 80rpx;" v-model="money" type="number" :clearable="false" placeholder="请输入提现金额" />
+				</view>
+				<view class="part_three">
+					<view style="padding: 20rpx 0;">提现方式</view>
+					<view class="btn">
+						<view class="btn_right" :class="current==1?'btna':''" @click="bindToindex(1)">
+							<image src="../static/zhifubao.png"></image>
+							<text>支付宝</text>
+						</view>
+						<view v-if="isWxAway == '是'" class="btn_left" :class="current==2?'btna':''" @click="bindToindex(2)">
+							<image src="../static/weixin.png"></image>
+							<text>微信</text>
+						</view>
+					</view>
+				</view>
+				<view class="submit" @click="getOut()">立即提现</view>
+				<view style="font-size: 26rpx; color: #999;text-align: center;">
+					预计到账时间: 1-3个工作日
 				</view>
 			</view>
 		</view>
-
+		
+		<view style="padding: 0 30rpx;margin-top: 30rpx;">
+			<view class="padding" style="background: #fff; border-radius: 16rpx;">
+				<view class="flex" style="justify-content: space-between;">
+					<view class="title">
+						交易记录
+					</view>
+					<view class="flex" style="padding: 10rpx; border-radius: 12rpx;background: #f5f5f5;">
+						<view v-for="(item, index) in listtab" :key="index" @click="tablists(index)" :class="tabvalue == index ? 'tabg' : 'tab'">
+							{{ item.title }}
+						</view>
+					</view>
+				</view>
+				<view style="margin-top: 20rpx;">
+					<view>
+						<view class="list_box2" v-for="(item,index) in list.slice(0, 5)" :key="index">
+							<view class="name flex align-center" @click="copyClick(item.title)" v-if="item.type==1">
+								{{item.title}}
+								<image src="../static/copy.png" style="width: 30upx;height: 30upx;"></image>
+							</view>
+							<view v-else>{{item.title}}</view>
+							<!-- <view>{{item.content}}</view> -->
+							<view class="data">{{item.createTime}}</view>
+						</view>
+					</view>
+				</view>
+				<view @click="goTo('/my/wallet/Acontlist')" style="margin-top: 20rpx; font-size: 26rpx; color: #999; text-align: center;">查看更多记录</view>
+			</view>
+		</view>
 		<!-- 我的列表 -->
-		<view class="mylist">
+		<!-- <view class="mylist">
 			<view class="list_box" @click="goTo('/my/wallet/Acontlist')">
 				<view class="list_left">
 					<view class="margin-right-xs">
@@ -62,8 +124,7 @@
 					<image src="../static/icon_go.png" style="width: 18rpx;height: 32rpx;"></image>
 				</view>
 			</view>
-
-		</view>
+		</view> -->
 	</view>
 </template>
 
@@ -71,6 +132,7 @@
 	export default {
 		data() {
 			return {
+				current: '1',
 				money: 0,
 				mylist: [{
 					id: 1,
@@ -82,17 +144,58 @@
 					image: '../../../static/rider/qq.png'
 				}],
 				shangxian: '是',
-				balance:0
+				balance:0,
+				isWxAway: '是',
+				listtab: [
+					{
+						value: 1,
+						title: '全部'
+					},
+					{
+						value: 2,
+						title: '收入'
+					},
+					{
+						value: 3,
+						title: '支出'
+					},
+				],
+				tabvalue: 0,
+				list: [],
+				page: 1,
+				totalCount: 0,
+				zhiFuBaoName: '',
+				zhifubao: ''
 			}
 		},
 		onLoad() {
 			this.shangxian = uni.getStorageSync('shangxian')
+			this.taskData2()
 		},
 		onShow() {
 			// this.taskData()
 			this.getUserInfo()
+			this.zhiFuBao = uni.getStorageSync('zhiFuBao')
+			this.zhiFuBaoName = uni.getStorageSync('zhiFuBaoName')
 		},
 		methods: {
+			tablists(index) {
+				this.tabvalue = index
+				this.taskData2()
+			},
+			bindToindex(e) {
+			
+				this.current = e
+				console.log(e, this.current)
+			},
+			// 获取任务数据
+			taskData2() {
+				this.$Request.getT('/app/userMoney/selectUserMoneyDetails?classify=4&page=' + this.page + '&limit=15&userType=2&type=' + this.tabvalue).then(res => {
+					if (res.code == 0) {
+						this.list = res.data.records
+					}
+				});
+			},
 			// 获取个人信息
 			getUserInfo() {
 				let userId = this.$queue.getData('userId');
@@ -132,6 +235,177 @@
 					url: '/pages/riderMy/myAccount/Txmoney/Txmoney'
 				})
 			},
+			getMoney() {
+				let that = this;
+				let token = this.$queue.getData('token');
+				let userId = this.$queue.getData('userId');
+				if (token) {
+					//this.$queue.showLoading("加载中...");
+					//可以提现金额查询预估收入查询
+					let userId = this.$queue.getData('userId');
+					this.$Request.getT("/app/user/selectUserDetails?userId=" + userId).then(res => {
+						if (res.code === 0 && res.data) {
+							that.mayMoney = res.data.balance;
+							that.zhifubao = res.data.zhiFuBao;
+							that.zhifubaoName = res.data.zhiFuBaoName;
+							that.wximg = res.data.cashQrCode
+						} else if (res.code === -102) {
+							this.$queue.showToast(res.msg);
+							this.$queue.logout();
+							// uni.navigateTo({
+							// 	url: '/pages/public/login'
+							// });
+						} else {
+							that.mayMoney = '0';
+							//this.$queue.showToast(res.msg);
+						}
+					});
+				}
+			},
+			getOut() {
+				let that = this;
+				let token = that.$queue.getData('token');
+				let userId = that.$queue.getData('userId');
+				if (token) {
+					if (that.current == 1) {
+						if (!that.zhifubao || !that.zhifubaoName) {
+							uni.navigateTo({
+								url: '/my/wallet/zhifubao'
+							});
+							return
+						}
+						if (!/^\d+$/.test(that.money)) {
+							uni.showToast({
+								icon: 'none',
+								title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
+							});
+							return;
+						}
+						if (Number(that.money) < Number(that.minMoney)) {
+							uni.showToast({
+								icon: 'none',
+								title: '提现金额不能小于' + that.minMoney + '元'
+							});
+							return;
+						}
+			
+						if (Number(that.money) > Number(that.manMoney)) {
+							uni.showToast({
+								icon: 'none',
+								title: '提现金额不能大于' + that.manMoney + '元'
+							});
+							return;
+						}
+						uni.showModal({
+							title: '提现申请提示',
+							content: '请仔细确认收款人信息\n姓名:' + that.zhifubaoName + '\n提现金额:' + that.money + '\n提现手续费:' +
+								parseFloat(that.money * that.shouxufei).toFixed(2) + '元' + '\n收款账号:' + that
+								.zhifubao + '',
+							success: e => {
+								if (e.confirm) {
+									that.$queue.showLoading('提现中...');
+			
+									that.$Request.getT('/app/cash/cashMoney?userType=2&classify=' + that
+										.current +
+										'&money=' + that.money).then(res => {
+										if (res.code === 0) {
+											that.$queue.showToast('提现申请成功,预计三个工作日到账');
+											that.money = ''
+											that.getMoney();
+											that.mayMoney = ''
+										} else {
+											uni.showModal({
+												title: '温馨提示',
+												content: res.msg,
+												showCancel: false,
+												cancelText: '取消',
+												confirmText: '确认'
+											});
+										}
+										uni.hideLoading();
+									});
+								}
+							}
+						});
+			
+					} else {
+						if (!/^\d+$/.test(that.money)) {
+							uni.showToast({
+								icon: 'none',
+								title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
+							});
+							return;
+						}
+						if (Number(that.money) < Number(that.minMoney)) {
+							uni.showToast({
+								icon: 'none',
+								title: '提现金额不能小于' + that.minMoney + '元'
+							});
+							return;
+						}
+			
+						if (Number(that.money) > Number(that.manMoney)) {
+							uni.showToast({
+								icon: 'none',
+								title: '提现金额不能大于' + that.manMoney + '元'
+							});
+							return;
+						}
+						if (this.values == 2) { //如果是微信手动提现才判断微信收款码
+							if (!that.wximg) {
+								uni.showModal({
+									title: '提现提示',
+									content: '请上传微信收款码',
+									showCancel: true,
+									cancelText: '取消',
+									confirmText: '上传',
+									success: res => {
+										if (res.confirm) {
+											that.show = true;
+										}
+									},
+									fail: () => {},
+									complete: () => {}
+								});
+								return;
+							}
+						}
+						uni.showModal({
+							title: '提现申请提示',
+							content: '请仔细确认收款信息\n金额:' + that.money + '元' + '\n提现手续费:' + parseFloat(that.money *
+								that.shouxufei).toFixed(2) + '元',
+							success: e => {
+								if (e.confirm) {
+									that.$queue.showLoading('提现中...');
+									that.$Request.getT('/app/cash/cashMoney?userType=2&classify=' + that.current +
+										'&money=' + that.money).then(res => {
+										if (res.code === 0) {
+											that.$queue.showToast('提现申请成功,预计三个工作日到账');
+											that.money = ''
+											that.getMoney();
+											that.mayMoney = ''
+										} else {
+											uni.showModal({
+												title: '温馨提示',
+												content: res.msg,
+												showCancel: false,
+												cancelText: '取消',
+												confirmText: '确认'
+											});
+										}
+										uni.hideLoading();
+									});
+								}
+							}
+						});
+					}
+				} else {
+					uni.showToast({
+						title: '提现失败',
+						icon: 'none'
+					})
+				}
+			},
 		}
 	}
 </script>
@@ -140,18 +414,53 @@
 	page {
 		background: #F5F5F5;
 	}
-
-	.bg {
-		background: #FFFFFF;
+	
+	.list_box2 {
+		width: 100%;
+		margin: 0 auto;
+		/* display: flex; */
+		line-height: 45rpx;
+		padding-top: 20rpx;
+		padding-bottom: 20upx;
+		border-bottom: 1rpx solid #f8f8f8;
+	}
+	
+	.list_left {
+		/* flex: 2; */
+	}
+	
+	.name {
+		width: 500rpx;
+		font-size: 26rpx;
+		color: #333333;
+		font-weight: bold;
+		letter-spacing: 2rpx;
+	}
+	
+	.data {
+		color: #999999;
+		font-size: 24rpx;
+	}
+	
+	.tabg {
+		padding: 8rpx 20rpx;
+		border-radius: 12rpx;
+		background: #00c18a;
+		color: #fff;
+	}
+	.tab {
+		padding: 8rpx 20rpx;
+		border-radius: 12rpx;
+		color: #999999;
+		background: #f5f5f5;
 	}
 
 	.box {
 		width: 690rpx;
 		// height: 312rpx;
-		background: linear-gradient(90deg, #3C7BFC 0%, #6FB3FF 100%);
+		background: #fff;
 		border-radius: 16rpx;
-		color: #FFFFFF;
-		// text-align: center;
+		text-align: center;
 		padding: 50rpx 40rpx 30rpx;
 
 
@@ -162,17 +471,118 @@
 		}
 
 		.pri {
-			margin-top: 20rpx;
+			margin: 20rpx;
 
 			text {
 				font-size: 68rpx;
 				font-family: DINPro;
-				font-weight: 500;
-				color: #FFFFFF;
+				font-weight: 600;
+				color: #00c18a;
 				margin-right: 10rpx;
 			}
 		}
 	}
+	
+	.title {
+		font-size: 36rpx;
+		font-weight: bold;
+	}
+	
+	.part_three {
+		width: 100%;
+		margin: 0 auto;
+		background: #FFFFFF;
+		margin-top: 20rpx;
+		border-radius: 20rpx;
+	}
+	
+	.three_name {
+		width: 100%;
+		margin: 0 auto;
+		font-size: 33rpx;
+		color: black;
+		line-height: 80rpx;
+	}
+	
+	.btn {
+		width: 100%;
+		margin: 0 auto;
+		// display: flex;
+		// justify-content: space-between;
+		padding-bottom: 30rpx;
+	}
+	
+	.btn_left {
+		flex: 1;
+		/* width: 240rpx; */
+		height: 90rpx;
+		border: 1rpx solid #ccc;
+		border-radius: 16rpx;
+		display: flex;
+		align-items: center;
+		padding: 0 30rpx;
+	}
+	
+	.btn_right {
+		flex: 1;
+		/* width: 240rpx; */
+		height: 90rpx;
+		border: 1rpx solid #ccc;
+		border-radius: 16rpx;
+		display: flex;
+		align-items: center;
+		margin-bottom: 20rpx;
+		padding: 0 30rpx;
+	}
+	
+	.btna {
+		border: 1rpx solid #00c18a !important;
+	}
+	
+	.submit {
+		width: 100%;
+		height: 80rpx;
+		background: #00c18a;
+		color: #fff;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 34rpx;
+		border-radius: 12rpx;
+		margin-bottom: 20rpx;
+	}
+	
+	
+	.btn_left image {
+		width: 50rpx;
+		height: 50rpx;
+		margin-right: 12rpx;
+	}
+	
+	.btn_right image {
+		width: 50rpx;
+		height: 50rpx;
+		margin-right: 12rpx;
+	}
+	
+	.two_box {
+		width: 100%;
+		margin: 0 auto;
+		display: flex;
+		align-items: center;
+		font-size: 32rpx;
+		font-weight: bold;
+	}
+	
+	.u-input__input {
+		height: 80rpx !important;
+		padding: 0 30rpx;
+		// font-size: 50rpx !important;
+		// color: #747474 !important;
+		border-top: 1rpx solid #cccccc;
+		border-bottom: 1rpx solid #cccccc;
+		border-right: 1rpx solid #cccccc;
+		border-radius: 0rpx 13rpx 13rpx 0rpx;
+	}
 
 	.tx {
 		width: 160rpx;

+ 2 - 1
my/wallet/zhifubao.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="container" v-if="shangxian =='否'">
+	<!-- v-if="shangxian =='否'" -->
+	<view class="container">
 		<!-- <list-cell title="收款人姓名" type="text" placeholder="请输入支付宝收款人姓名" v-model="userName"></list-cell>
 
 		<list-cell title="支付宝账号" type="number" placeholder="请输入要绑定的支付宝手机号" v-model="mobile" :maxlength="11"></list-cell> -->

+ 23 - 4
pages.json

@@ -218,8 +218,8 @@
 				"path": "wallet/baozhengjin",
 				"style": {
 					"navigationBarTitleText": "保证金",
-					"navigationBarBackgroundColor": "#6e97ff",
-					"navigationBarTextStyle": "white"
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black"
 				}
 			}, {
 				"path": "wallet/Txmoney",
@@ -391,14 +391,33 @@
 				"path": "setting/vipVereinbarung",
 				"style": {
 					"navigationBarTitleText": "会员开通协议"
+				},
+			}
+			{
+				"path": "safety/video",
+				"style": {
+					"navigationBarTitleText": "安全考试"
 				}
 			},
 			{
-				"path": "jgOrder/statistics",
+				"path": "safety/exam",
 				"style": {
-					"navigationBarTitleText": "订单统计"
+					"navigationBarTitleText": "安全考试"
 				}
+			},
+			{
+				"path": "safety/examcomplete",
+				"style": {
+					"navigationBarTitleText": "安全考试"
+				}
+			},
+			{
+				"path": "jgOrder/statistics",
+				"style": {
+				"navigationBarTitleText": "订单统计"
 			}
+	}
+
 		]
 	}],
 	"globalStyle": {

+ 6 - 3
uview-ui/theme.scss

@@ -9,10 +9,13 @@ $u-light-color: #c0c4cc;
 $u-border-color: #e4e7ed;
 $u-bg-color: #f3f4f6;
 
-$u-type-primary: #2979ff;
+// $u-type-primary: #2979ff;
+$u-type-primary: #00C18A;
 $u-type-primary-light: #ecf5ff;
-$u-type-primary-disabled: #a0cfff;
-$u-type-primary-dark: #2b85e4;
+// $u-type-primary-disabled: #a0cfff;
+$u-type-primary-disabled: #00C18A;
+// $u-type-primary-dark: #2b85e4;
+$u-type-primary-dark: #009868;
 
 $u-type-warning: #ff9900;
 $u-type-warning-disabled: #fcbd71;