Browse Source

顺序练习好了

master
unknown 2 weeks ago
parent
commit
7143178cbe
  1. 23
      config/api.js
  2. 16
      config/request.js
  3. 4
      main.js
  4. 2
      manifest.json
  5. 8
      pages.json
  6. 113
      pages/exercises/brushQuestions/brushQuestions.vue
  7. 13
      pages/exercises/categoryExercises/categoryExercises.vue
  8. 44
      pages/exercises/examIntroduction/examIntroduction.vue
  9. 89
      pages/exercises/theoryStudy/theoryStudy.vue
  10. 18
      pages/exercises/webView/webView.vue
  11. 25
      pages/index/index.vue
  12. 11
      store/modules/car.js
  13. 15
      unpackage/dist/cache/.vite/deps/_metadata.json
  14. 584
      unpackage/dist/cache/.vite/deps/js-md5.js
  15. 7
      unpackage/dist/cache/.vite/deps/js-md5.js.map
  16. 4
      utils/utils.js

23
config/api.js

@ -21,6 +21,29 @@ export const logOut = (data={}) => http.post('member/auth/logout', data, {custom
export const submitAnswerResultApi = (data) => http.post('questionBank/submitAnswerResult.do', data,) export const submitAnswerResultApi = (data) => http.post('questionBank/submitAnswerResult.do', data,)
// 上一题-下一题-直接跳到几题 // 上一题-下一题-直接跳到几题
export const getQuestionApi = (data) => http.post('questionBank/getQuestion', data,) export const getQuestionApi = (data) => http.post('questionBank/getQuestion', data,)
// 添加反馈
export const questionCommentAdd = (data) => http.post('questionComment/add', data,)
// 添加|取消 收藏 错题
export const questionWrongColle = (data) => http.post('questionWrong/dealCollection', data,)
// 通知
export const indexNoticeApi = (subject) => http.get('idex/notice-'+subject, )
// 轮播图
export const indexAdApi = (subject) => http.get('idex/ad-'+subject, )
// 获取顺序、精选练习已学题目,总题目数
export const indexAdCount = (data) => http.get(`idex/count-${data.subject}-${data.carType}`, )
// 考试流程
export const examProcessInfo = (subject) => http.get(`idex/examProcessInfo-${subject}`, )
// 分类学习了级
export const columnPid = (pid) => http.get(`idex/column-${pid}`, )
// 分类学习父级id
export const columnFid = (data) => http.get(`idex/column-${data.type}-${data.stepType}-${data.carType}`, )

16
config/request.js

@ -48,30 +48,20 @@ let secretKey = '22d90e09d1374f0f9e4accd07d333e55'
data.code = data.errorcode data.code = data.errorcode
// console.log('请求结果') // console.log('请求结果')
// console.log(data) // console.log(data)
if(data.code==406&&response.config.url!='member/auth/refresh-token'&&response.config.url!=='member/auth/logout') {
// await refreshToken()
let obj = response.config
let method = obj.method.toLowerCase()
if(method=='get') {
return uni.$u.http[method](obj.url, {params: obj.params})
}else{
return uni.$u.http[method](obj.url, obj.data )
}
}
if(data.code==401) { if(data.code==401) {
console.log('报401的接口') console.log('报401的接口')
console.log(response.config.url) console.log(response.config.url)
return uni.$u.debounce(vm.$store.commit('goLogin'), 1500)
return uni.$u.toast('登录异常请退出重进')
} }
// 自定义参数 // 自定义参数
const custom = response.config?.custom const custom = response.config?.custom
if (data.code !== 0&&data.code!=406&&data.code!='200240213') {
if (data.code !== 0) {
console.log('不正常的code') console.log('不正常的code')
console.log(data) console.log(data)
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
if (custom.toast !== false) { if (custom.toast !== false) {
uni.$u.toast(data.msg)
uni.$u.toast(data.message)
} }
// 如果需要catch返回,则进行reject // 如果需要catch返回,则进行reject

4
main.js

@ -1,7 +1,7 @@
import App from './App' import App from './App'
import uviewPlus from '@/uni_modules/uview-plus' import uviewPlus from '@/uni_modules/uview-plus'
import request from './config/request.js' import request from './config/request.js'
import { goPage } from '@/utils/utils.js'
import { goPage, noDoFn } from '@/utils/utils.js'
import {setupStore} from '@/store'; import {setupStore} from '@/store';
// // #ifndef VUE3 // // #ifndef VUE3
@ -21,6 +21,8 @@ import { createSSRApp } from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.config.globalProperties.$goPage = goPage app.config.globalProperties.$goPage = goPage
app.config.globalProperties.$noDoFn = noDoFn
app.use(uviewPlus) app.use(uviewPlus)
request(app) request(app)
setupStore(app); setupStore(app);

2
manifest.json

@ -75,7 +75,7 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://192.168.1.214:8081/",
"target" : "http://192.168.1.237:8081/",
// "target" : "http://192.168.1.40:8099/", // "target" : "http://192.168.1.40:8099/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,

8
pages.json

@ -43,6 +43,14 @@
} }
}, },
{ {
"path": "webView/webView",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
}
},
{
"path": "brushQuestions/brushQuestions", "path": "brushQuestions/brushQuestions",
"style": { "style": {
"navigationBarTitleText": "刷题", "navigationBarTitleText": "刷题",

113
pages/exercises/brushQuestions/brushQuestions.vue

@ -12,9 +12,12 @@
<view class="con padding"> <view class="con padding">
<view class="h1_row"> <view class="h1_row">
<text class="tag">{{types[questionBank.types-1]}}</text>
<text class="tag" :class="{red: questionBank.types==2, blue: questionBank.types==3}">{{types[questionBank.types-1]}}</text>
<text class="h1">{{ questionBank.title}}</text> <text class="h1">{{ questionBank.title}}</text>
</view> </view>
<view class="imgBox" style="width: 100%;padding: 0 0 30rpx 0;" v-if="questionBank.img">
<image :src="questionBank.img" mode="widthFix"></image>
</view>
<view class="option"> <view class="option">
<view v-for="(item,index) in questionBank.optionArr" @click="chooseOption(item)"> <view v-for="(item,index) in questionBank.optionArr" @click="chooseOption(item)">
<!-- 多选题 --> <!-- 多选题 -->
@ -28,7 +31,7 @@
<view class="icon" v-if="!curOption.key&&questionBank.types !=2"></view> <view class="icon" v-if="!curOption.key&&questionBank.types !=2"></view>
<up-icon name="checkmark-circle-fill" color="#55ff7f" size="20" v-else-if="questionBank.answer.includes(item.key)"></up-icon> <up-icon name="checkmark-circle-fill" color="#55ff7f" size="20" v-else-if="questionBank.answer.includes(item.key)"></up-icon>
<up-icon name="close-circle-fill" color="#ff0000" size="20" v-else></up-icon> <up-icon name="close-circle-fill" color="#ff0000" size="20" v-else></up-icon>
<view class="text"><text v-if="questionBank.types!=1">{{item.key}}</text> {{item.text}}</view>
<view class="text"><text v-if="questionBank.types!=3">{{item.key}}</text> {{item.text}}</view>
</view> </view>
<!-- ans --> <!-- ans -->
</view> </view>
@ -36,17 +39,17 @@
<view class="answerCss flex" v-if="curOption.answer&&questionBank.answer!=curOption.answer"> <view class="answerCss flex" v-if="curOption.answer&&questionBank.answer!=curOption.answer">
<view class="ans">正确答案是 <view class="ans">正确答案是
<text v-if="questionBank.types==3" >{{ questionBank.answer=='false'?'错误':'正确' }}</text> <text v-if="questionBank.types==3" >{{ questionBank.answer=='false'?'错误':'正确' }}</text>
<text v-else>{{ questionBank.answer }}</text>
<text v-else >{{ questionBank.answer }}</text>
</view> </view>
<view class="ans ">您的答案是
<text v-if="questionBank.types==3">{{ curOption.answer=='false'?'错误':'正确' }}</text>
<view class="ans">您的答案是
<text v-if="questionBank.types==3" class="red">{{ curOption.answer=='false'?'错误':'正确' }}</text>
<text v-else class="red">{{ curOption.answer }}</text> <text v-else class="red">{{ curOption.answer }}</text>
</view> </view>
</view> </view>
<view class="btn_row flex-b"> <view class="btn_row flex-b">
<!-- @click="$goPage('/pages/exercises/lastPage/lastPage')" --> <!-- @click="$goPage('/pages/exercises/lastPage/lastPage')" -->
<button class="btn border" @click="nextQuestion(-1)" :class="{disable: currentIndex==1}" :disabled="currentIndex==1">上一题</button>
<button class="btn bg" @click="nextQuestion(1)" :class="{disable: currentIndex>=quesIdList.length}" :disabled="currentIndex>=quesIdList.length">下一题</button>
<button class="btn border" @click="debounce(nextQuestion(-1), 500)" :class="{disable: currentIndex==1}" :disabled="currentIndex==1">上一题</button>
<button class="btn bg" @click="debounce(nextQuestion(1), 500)" :class="{disable: currentIndex>=quesIdList.length}" :disabled="currentIndex>=quesIdList.length">下一题</button>
</view> </view>
<view class="analysis" v-if="currentNav==2||(curOption.answer&&curOption.answer!=questionBank.answer)"> <view class="analysis" v-if="currentNav==2||(curOption.answer&&curOption.answer!=questionBank.answer)">
<view class="tit">题目解析</view> <view class="tit">题目解析</view>
@ -69,7 +72,7 @@
<view class="icon">{{currentIndex}}/<text style="color: #999; font-size: 24rpx;">{{quesIdList.length}}</text></view> <view class="icon">{{currentIndex}}/<text style="color: #999; font-size: 24rpx;">{{quesIdList.length}}</text></view>
<view class="text">题目</view> <view class="text">题目</view>
</view> </view>
<view class="li">
<view class="li" @click="showCommt=true">
<view class="icon"> <view class="icon">
<image src="@/static/images/theory/fankui.png" mode=""></image> <image src="@/static/images/theory/fankui.png" mode=""></image>
</view> </view>
@ -81,7 +84,7 @@
</view> </view>
<view class="text">答题卡</view> <view class="text">答题卡</view>
</view> </view>
<view class="li">
<view class="li" @click="$noDoFn">
<view class="icon"> <view class="icon">
<image src="@/static/images/theory/sc.png" mode=""></image> <image src="@/static/images/theory/sc.png" mode=""></image>
</view> </view>
@ -116,11 +119,20 @@
</view> </view>
</view> </view>
</up-popup> </up-popup>
<up-popup :show="showCommt" @close="showCommtClose" mode="bottom" round="20rpx" closeable>
<view class="commtCon" style="padding: 30rpx">
<up-textarea v-model.trim="contentStr" placeholder="请输入反馈内容" style="margin-top: 50rpx;" maxlength="300"></up-textarea>
<up-button text="提 交" style="margin-top: 20rpx;" type="primary" @click="submitCommt"></up-button>
</view>
</up-popup>
</view> </view>
</template> </template>
<script setup> <script setup>
import { startQuestionApi, submitAnswerResultApi, getQuestionApi } from '@/config/api.js'
import { startQuestionApi, submitAnswerResultApi, getQuestionApi, questionCommentAdd } from '@/config/api.js'
import { debounce } from '@/uni_modules/uview-plus';
import { import {
ref, ref,
reactive reactive
@ -133,6 +145,10 @@
]) ])
const yesNum = ref(0) const yesNum = ref(0)
const noNum = ref(0) const noNum = ref(0)
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
import { import {
onLoad, onLoad,
onReady onReady
@ -164,26 +180,51 @@
function openPopup() { function openPopup() {
show.value = true show.value = true
} }
let showCommt = ref(false)
let contentStr = ref('')
function showCommtClose() {
showCommt.value = false
contentStr.value = ''
}
//
async function submitCommt() {
if(!contentStr.value) return uni.$u.toast('请输入内容')
let obj = {
content: contentStr.value,
questionId: questionBank.value.id
}
const res = await questionCommentAdd(obj)
if(res.errorcode==0) {
uni.$u.toast('提交成功,感谢您的反馈')
showCommt.value = false
}
}
// //
const questionBank = ref({}) const questionBank = ref({})
let quesIdList = ref([]) let quesIdList = ref([])
let currentIndex = ref(1) let currentIndex = ref(1)
async function startQuestionFn() { async function startQuestionFn() {
let obj = {
carType: 'car',
stepType: '4',
volume: '0',
types: '2',
sift: '0',
contentType: '2'
try{
uni.showLoading({
title: '正在加载...'
})
let obj = {
carType: usecarStore.carInfo.carType,
stepType: usecarStore.carInfo.stepType,
volume: usecarStore.carInfo.volume,
types: usecarStore.carInfo.types,
sift: usecarStore.carInfo.sift,
contentType: usecarStore.carInfo.contentType
}
const {data: res} = await startQuestionApi(obj)
uni.hideLoading()
questionBank.value = res.questionBank
initOptionArr()
quesIdList.value = res.quesIdList
}catch(e){
uni.hideLoading()
} }
const {data: res} = await startQuestionApi(obj)
questionBank.value = res.questionBank
// if(res.questionBank.types !=2) {
// }
initOptionArr()
quesIdList.value = res.quesIdList
// console.log(res.quesIdList)
} }
startQuestionFn() startQuestionFn()
@ -235,7 +276,7 @@
} }
curOption.value = {} curOption.value = {}
currentIndex.value = currentIndex.value + num currentIndex.value = currentIndex.value + num
await getQuestionFn()
getQuestionFn()
} }
// //
@ -243,10 +284,10 @@
console.log(currentIndex.value) console.log(currentIndex.value)
let questionId = quesIdList.value[currentIndex.value-1] let questionId = quesIdList.value[currentIndex.value-1]
let obj = { let obj = {
"carType": "car",
"carType": usecarStore.carInfo.carType,
"questionId": questionId, "questionId": questionId,
"sort": currentIndex.value, "sort": currentIndex.value,
"stepType": 1,
"stepType": usecarStore.carInfo.stepType,
'tempId': questionBank.value.questionDoTemp.id 'tempId': questionBank.value.questionDoTemp.id
} }
const {data: res} = await getQuestionApi(obj) const {data: res} = await getQuestionApi(obj)
@ -263,17 +304,20 @@
// //
const curOption = ref({}) const curOption = ref({})
async function chooseOption(item) { async function chooseOption(item) {
console.log(item)
// console.log(item)
if(curOption.value.answer) return if(curOption.value.answer) return
if(questionBank.value.types != 2) { if(questionBank.value.types != 2) {
item.answer = item.key item.answer = item.key
curOption.value = item curOption.value = item
// submitAnswerResultFn()
submitAnswerResultFn()
}else if(questionBank.value.types == 2){ }else if(questionBank.value.types == 2){
if(!curOption.value.ans) curOption.value.ans = '' if(!curOption.value.ans) curOption.value.ans = ''
if(curOption.value.ans.includes(item.key)) return
if(curOption.value.ans.includes(item.key)) {
curOption.value.ans = curOption.value.ans.replace(item.key, '')
return
}
curOption.value.ans = curOption.value.ans + item.key curOption.value.ans = curOption.value.ans + item.key
console.log(curOption.value.ans)
// console.log(curOption.value.ans)
} }
} }
// //
@ -290,6 +334,7 @@
if(res.errorcode!=0) return if(res.errorcode!=0) return
if(curOption.value.answer==questionBank.value.answer) { if(curOption.value.answer==questionBank.value.answer) {
console.log('答对了') console.log('答对了')
curOption.value = {}
yesNum.value ++ yesNum.value ++
nextQuestion(1) nextQuestion(1)
}else { }else {
@ -401,6 +446,12 @@
margin-right: 16rpx; margin-right: 16rpx;
font-size: 28rpx; font-size: 28rpx;
color: #fff; color: #fff;
&.blue {
background: #3776FF;
}
&.red {
background: orangered;
}
} }
text.h1 { text.h1 {

13
pages/exercises/categoryExercises/categoryExercises.vue

@ -15,11 +15,24 @@
</template> </template>
<script setup> <script setup>
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
import { columnFid, columnPid } from '@/config/api.js'
function goPage() { function goPage() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/exercises/brushQuestions/brushQuestions' url: '/pages/exercises/brushQuestions/brushQuestions'
}) })
} }
async function columnFidFn() {
let obj = {
type: '3',
stepType: usecarStore.carInfo.stepType,
carType: usecarStore.carInfo.carType
}
const {data: res} = columnFid(obj)
}
columnFidFn()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

44
pages/exercises/examIntroduction/examIntroduction.vue

@ -5,18 +5,21 @@
<view class="padding"> <view class="padding">
<view class="tabs flex-b"> <view class="tabs flex-b">
<view class="btn" @click="changeNav(item)" :class="{active: currentNav==item.name}"
<view class="btn" @click="changeNav(item, index)" :class="{active: currentNav==index}"
v-for="(item,index) in tabData" :key="index">{{ item.name }}</view> v-for="(item,index) in tabData" :key="index">{{ item.name }}</view>
</view> </view>
<view class="card"> <view class="card">
<view class="title"> <view class="title">
<view class="titlebg">{{ currentNav }}</view>
<view class="titlebg">{{ tabData[currentNav]?.name }}</view>
</view> </view>
<tab1 v-if="currentNav=='考试简介'"/>
<!-- <tab1 v-if="currentNav=='考试简介'"/>
<tab2 v-if="currentNav=='考试流程'"/> <tab2 v-if="currentNav=='考试流程'"/>
<tab3 v-if="currentNav=='考试准备'"/> <tab3 v-if="currentNav=='考试准备'"/>
<tab4 v-if="currentNav=='注意事项'"/>
<tab4 v-if="currentNav=='注意事项'"/> -->
<!-- <rich-text :nodes="nodes"></rich-text> -->
<u-parse :content="nodes" :tagStyle="style"></u-parse>
</view> </view>
</view> </view>
@ -24,6 +27,9 @@
</template> </template>
<script setup> <script setup>
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
import { examProcessInfo } from '@/config/api.js'
import { import {
ref ref
} from 'vue' } from 'vue'
@ -36,21 +42,29 @@
import tab3 from './comp/tab3.vue' import tab3 from './comp/tab3.vue'
import tab4 from './comp/tab4.vue' import tab4 from './comp/tab4.vue'
const value = ref(false) const value = ref(false)
const currentNav = ref('考试简介')
function changeNav(val) {
currentNav.value = val.name
const currentNav = ref(0)
const nodes = ref('')
function changeNav(val, index) {
currentNav.value = index
console.log(index)
console.log(dataList.value[index])
nodes.value = dataList.value[index]?dataList.value[index].content: '<p>暂无内容</p>'
} }
let style = {
img: 'max-width:100%;height:auto',
p: 'font-size:32rpx',
}
onLoad((option) => { onLoad((option) => {
if (option.tab) currentNav.value = option.tab if (option.tab) currentNav.value = option.tab
examProcessInfoFn()
}) })
const tabData = ref([{ const tabData = ref([{
name: '考试简介', name: '考试简介',
id: 1
id: 0
}, },
{ {
name: '考试准备', name: '考试准备',
id: 3
id: 1
}, },
{ {
name: '考试流程', name: '考试流程',
@ -58,9 +72,17 @@
}, },
{ {
name: '注意事项', name: '注意事项',
id: 4
id: 3
}, },
]) ])
const dataList = ref([])
async function examProcessInfoFn() {
const {data:res} = await examProcessInfo( usecarStore.carInfo.stepType)
if(!res.length) return
dataList.value = res
nodes.value = res[currentNav.value]?res[currentNav.value].content: '<p>暂无内容</p>'
}
</script> </script>

89
pages/exercises/theoryStudy/theoryStudy.vue

@ -2,8 +2,8 @@
<view class="content"> <view class="content">
<up-navbar title="理论学习" :leftIconColor="'#333'" :safeAreaInsetTop="true" :autoBack="true" > <up-navbar title="理论学习" :leftIconColor="'#333'" :safeAreaInsetTop="true" :autoBack="true" >
<template #right> <template #right>
<view class="u-nav-slot flex">
<view class="txt">小车</view>
<view class="u-nav-slot flex" @click="show = true">
<view class="txt">{{ usecarStore.carInfo.carTypeName }}</view>
<u-icon name="arrow-down-fill" color="#333" size="12"></u-icon> <u-icon name="arrow-down-fill" color="#333" size="12"></u-icon>
</view> </view>
</template> </template>
@ -11,20 +11,21 @@
<view class="tabs flex"> <view class="tabs flex">
<view class="tab" @click="changeTab(1)" :class="{active: currentTab==1}">科目一</view> <view class="tab" @click="changeTab(1)" :class="{active: currentTab==1}">科目一</view>
<view class="tab" @click="changeTab(2)" :class="{active: currentTab==2}">科目四</view>
<view class="tab" @click="changeTab(4)" :class="{active: currentTab==4}">科目四</view>
</view> </view>
<view class="swiperBox"> <view class="swiperBox">
<u-swiper :list="list1" @click="swiperClick" :dots-styles="dotsStyles" indicatorMode="dot" imgMode="" height="160rpx"></u-swiper>
<u-swiper :list="bannerList" @click="swiperClick" :dots-styles="dotsStyles" indicatorMode="dot" keyName="cover" height="160rpx"></u-swiper>
</view> </view>
<view class="notice">
<view class="notice" v-if="nodes">
<view class="yellowT">通知/</view> <view class="yellowT">通知/</view>
<view class="txt">06月11日已更新至最新题库</view>
<rich-text :nodes="nodes"></rich-text>
</view> </view>
<view class="iconBox"> <view class="iconBox">
<view class="iconComl"> <view class="iconComl">
<!-- @click="$goPage(item.url)" -->
<view class="item" v-for="(item,index) in leftItem" :key="index" @click="$goPage(item.url)"> <view class="item" v-for="(item,index) in leftItem" :key="index" @click="$goPage(item.url)">
<view class="icon"> <view class="icon">
<image :src="item.icon" mode=""></image> <image :src="item.icon" mode=""></image>
@ -33,17 +34,19 @@
</view> </view>
</view> </view>
<view class="centerComl"> <view class="centerComl">
<view class="ctItem" @click="$goPage('/pages/exercises/brushQuestions/brushQuestions')">
<view class="ctItem" @click="goAndSetCar">
<view class="txt">顺序练习</view> <view class="txt">顺序练习</view>
<view class="txt">0/1700</view> <view class="txt">0/1700</view>
</view> </view>
<view class="ctItem" @click="$goPage('/pages/vip/vipEntry/vipEntry')">
<!-- $goPage('/pages/vip/vipEntry/vipEntry') -->
<view class="ctItem" @click="$noDoFn">
<view class="txt">精选试题</view> <view class="txt">精选试题</view>
<view class="txt">0/1700</view> <view class="txt">0/1700</view>
</view> </view>
</view> </view>
<view class="iconComl"> <view class="iconComl">
<view class="item" v-for="(item,index) in rightItem" :key="index" @click="$goPage(item.url)">
<!-- @click="$goPage(item.url)" -->
<view class="item" v-for="(item,index) in rightItem" :key="index" @click="$noDoFn">
<view class="icon"> <view class="icon">
<image :src="item.icon" mode=""></image> <image :src="item.icon" mode=""></image>
</view> </view>
@ -58,7 +61,8 @@
<view class="text">考试次数1</view> <view class="text">考试次数1</view>
<view class="text">预测通过率10%</view> <view class="text">预测通过率10%</view>
<view class="btnBox flex"> <view class="btnBox flex">
<view class="btnTxt" @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')">开始考试</view>
<!-- @click="$goPage('/pages/exercises/examSubjiect1/examSubjiect1')" -->
<view class="btnTxt" @click="$noDoFn">开始考试</view>
<view class="btnIcon"> <view class="btnIcon">
<image src="@/static/images/theory/sanjx.png" mode=""></image> <image src="@/static/images/theory/sanjx.png" mode=""></image>
</view> </view>
@ -71,7 +75,7 @@
</view> </view>
<view class="ul flex"> <view class="ul flex">
<view class="li" v-for="(item,index) in bottomItem" :key="index" @click="$goPage('pages/exercises/examIntroduction/examIntroduction?tab='+item.name)">
<view class="li" v-for="(item,index) in bottomItem" :key="index" @click="$goPage('pages/exercises/examIntroduction/examIntroduction?tab='+index)">
<view class="icon"> <view class="icon">
<image :src="item.icon" mode=""></image> <image :src="item.icon" mode=""></image>
</view> </view>
@ -79,17 +83,26 @@
</view> </view>
</view> </view>
<u-picker :show="show" :columns="columns" keyName="title" @close="show=false" @cancel="show=false" @confirm="confirmPicker"></u-picker>
</view> </view>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { questbanktypeApi, indexNoticeApi, indexAdApi, indexAdCount, examProcessInfo} from '@/config/api.js'
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
const list1 = [ const list1 = [
new URL('@/static/images/bigImg/banner1.png', import.meta.url).href, new URL('@/static/images/bigImg/banner1.png', import.meta.url).href,
new URL('@/static/images/bigImg/banner2.png', import.meta.url).href, new URL('@/static/images/bigImg/banner2.png', import.meta.url).href,
] ]
function swiperClick(val) { function swiperClick(val) {
console.log(val)
let item = bannerList.value[val]
if(!item.url) return
usecarStore.webLink = item.url
uni.navigateTo({
url:'/pages/exercises/webView/webView'
})
} }
const currentTab = ref(1) const currentTab = ref(1)
const dotsStyles = ref({ const dotsStyles = ref({
@ -123,7 +136,57 @@
function changeTab(num) { function changeTab(num) {
currentTab.value = num currentTab.value = num
usecarStore.setCar('stepType', num)
} }
//
function goAndSetCar() {
usecarStore.setCar('types', '')
uni.navigateTo({
url: '/pages/exercises/brushQuestions/brushQuestions'
})
}
//
function confirmPicker(item) {
let value = item.value[0]
usecarStore.setCar('carType', value.carType)
usecarStore.setCar('carTypeName', value.title)
show.value = false
}
//
let show = ref(false)
let columns = ref([])
async function questbanktypeFn() {
const {data: res} = await questbanktypeApi()
columns.value = [res]
}
questbanktypeFn()
//
const nodes = ref('')
async function indexNotice() {
const {data: res} = await indexNoticeApi(usecarStore.carInfo.stepType)
if(res.length) {
nodes.value = res[0].content
}
// console.log(res)
}
indexNotice()
//
let bannerList = ref([])
async function indexAd() {
const {data: res} = await indexAdApi(usecarStore.carInfo.stepType)
if(res.length) bannerList.value = res
console.log(res)
}
indexAd()
//
async function indexAdCountFn() {
const {data:res} = await indexAdCount({subject: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
console.log(res)
}
// indexAdCountFn()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -181,11 +244,13 @@
border-radius: 8rpx; border-radius: 8rpx;
margin-top: 20rpx; margin-top: 20rpx;
font-size: 28rpx; font-size: 28rpx;
display: flex;
.yellowT { .yellowT {
font-weight: 800; font-weight: 800;
color: #F1AD40; color: #F1AD40;
font-style: italic; font-style: italic;
display: inline-block; display: inline-block;
white-space: nowrap;
margin-right: 10rpx; margin-right: 10rpx;
} }

18
pages/exercises/webView/webView.vue

@ -0,0 +1,18 @@
<template>
<view class="pageBg">
<web-view :src="usecarStore.webLink" :webview-styles="webviewStyles" :update-title="false"></web-view>
</view>
</template>
<script setup>
let webviewStyles = {
progress: {
color: '#3877ff'
},
}
import carStore from '@/store/modules/car.js'
let usecarStore = carStore()
</script>
<style>
</style>

25
pages/index/index.vue

@ -24,9 +24,7 @@
<script setup> <script setup>
import carStore from '@/store/modules/car.js' import carStore from '@/store/modules/car.js'
let usecarStore = carStore() let usecarStore = carStore()
console.log('这是个什么?', usecarStore.carInfo.name)
usecarStore.setCar('joe', 30)
console.log('这是个什么?', usecarStore.carInfo.joe)
import { import {
ref, ref,
reactive reactive
@ -49,7 +47,8 @@
const currentCar = ref('') const currentCar = ref('')
function chooseCar(item) { function chooseCar(item) {
currentCar.value = item currentCar.value = item
// uni.setStorageSync('carType')
usecarStore.setCar('carType', item.carType)
usecarStore.setCar('carTypeName', item.title)
} }
function oneBtnClick() { function oneBtnClick() {
@ -57,18 +56,21 @@
url: '/pages/exercises/theoryStudy/theoryStudy' url: '/pages/exercises/theoryStudy/theoryStudy'
}) })
} }
onLoad(async (option)=>{
let phone = option.phone?option.phone:'18267103167'
await loginFn(phone)
questbanktypeFn()
})
// //
async function loginFn() {
async function loginFn(phone) {
const res = await loginApi({ const res = await loginApi({
"type": 1, "type": 1,
"username": "18267103167",
"username": phone,
}) })
console.log(res) console.log(res)
uni.setStorageSync('loginInfo', res.data); uni.setStorageSync('loginInfo', res.data);
} }
// if(uni.)
// loginFn()
//
async function questbanktypeFn() { async function questbanktypeFn() {
const {data: res} = await questbanktypeApi() const {data: res} = await questbanktypeApi()
let arr = res.map(item=>{ let arr = res.map(item=>{
@ -77,10 +79,9 @@
}) })
tabData.value = arr tabData.value = arr
currentCar.value = res[0] currentCar.value = res[0]
console.log(tabData.value)
} }
questbanktypeFn()
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

11
store/modules/car.js

@ -5,8 +5,15 @@ const carStore = defineStore(
{ {
state: () => ({ state: () => ({
carInfo: { carInfo: {
name: 'joe'
}
carType: 'car',//车型
stepType: '1',//科目几
carTypeName: '小车',
types: '',//题型
contentType: '',//图片还是文字
sift: '0', //是否精选
volume: '0', //是否是密卷
},
webLink: 'https://www.baidu.com/'
}), }),
actions: { actions: {
setCar(key, value) { setCar(key, value) {

15
unpackage/dist/cache/.vite/deps/_metadata.json

@ -1,15 +1,8 @@
{ {
"hash": "62b83936",
"hash": "0cf7e1d7",
"configHash": "cb5a66fc", "configHash": "cb5a66fc",
"lockfileHash": "d536e6bf",
"browserHash": "e831f5c4",
"optimized": {
"js-md5": {
"src": "../../../../../node_modules/js-md5/src/md5.js",
"file": "js-md5.js",
"fileHash": "4f956836",
"needsInterop": true
}
},
"lockfileHash": "22da1564",
"browserHash": "9db51c10",
"optimized": {},
"chunks": {} "chunks": {}
} }

584
unpackage/dist/cache/.vite/deps/js-md5.js

@ -1,584 +0,0 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// browser-external:crypto
var require_crypto = __commonJS({
"browser-external:crypto"(exports, module) {
module.exports = Object.create(new Proxy({}, {
get(_, key) {
if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") {
console.warn(`Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
}
}
}));
}
});
// browser-external:buffer
var require_buffer = __commonJS({
"browser-external:buffer"(exports, module) {
module.exports = Object.create(new Proxy({}, {
get(_, key) {
if (key !== "__esModule" && key !== "__proto__" && key !== "constructor" && key !== "splice") {
console.warn(`Module "buffer" has been externalized for browser compatibility. Cannot access "buffer.${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
}
}
}));
}
});
// ../../../../../work/questionbankvue3/node_modules/js-md5/src/md5.js
var require_md5 = __commonJS({
"../../../../../work/questionbankvue3/node_modules/js-md5/src/md5.js"(exports, module) {
(function() {
"use strict";
var INPUT_ERROR = "input is invalid type";
var FINALIZE_ERROR = "finalize already called";
var WINDOW = typeof window === "object";
var root = WINDOW ? window : {};
if (root.JS_MD5_NO_WINDOW) {
WINDOW = false;
}
var WEB_WORKER = !WINDOW && typeof self === "object";
var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
if (NODE_JS) {
root = global;
} else if (WEB_WORKER) {
root = self;
}
var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === "object" && module.exports;
var AMD = typeof define === "function" && define.amd;
var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== "undefined";
var HEX_CHARS = "0123456789abcdef".split("");
var EXTRA = [128, 32768, 8388608, -2147483648];
var SHIFT = [0, 8, 16, 24];
var OUTPUT_TYPES = ["hex", "array", "digest", "buffer", "arrayBuffer", "base64"];
var BASE64_ENCODE_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
var blocks = [], buffer8;
if (ARRAY_BUFFER) {
var buffer = new ArrayBuffer(68);
buffer8 = new Uint8Array(buffer);
blocks = new Uint32Array(buffer);
}
var isArray = Array.isArray;
if (root.JS_MD5_NO_NODE_JS || !isArray) {
isArray = function(obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
};
}
var isView = ArrayBuffer.isView;
if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !isView)) {
isView = function(obj) {
return typeof obj === "object" && obj.buffer && obj.buffer.constructor === ArrayBuffer;
};
}
var formatMessage = function(message) {
var type = typeof message;
if (type === "string") {
return [message, true];
}
if (type !== "object" || message === null) {
throw new Error(INPUT_ERROR);
}
if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
return [new Uint8Array(message), false];
}
if (!isArray(message) && !isView(message)) {
throw new Error(INPUT_ERROR);
}
return [message, false];
};
var createOutputMethod = function(outputType) {
return function(message) {
return new Md5(true).update(message)[outputType]();
};
};
var createMethod = function() {
var method = createOutputMethod("hex");
if (NODE_JS) {
method = nodeWrap(method);
}
method.create = function() {
return new Md5();
};
method.update = function(message) {
return method.create().update(message);
};
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
var type = OUTPUT_TYPES[i];
method[type] = createOutputMethod(type);
}
return method;
};
var nodeWrap = function(method) {
var crypto = require_crypto();
var Buffer2 = require_buffer().Buffer;
var bufferFrom;
if (Buffer2.from && !root.JS_MD5_NO_BUFFER_FROM) {
bufferFrom = Buffer2.from;
} else {
bufferFrom = function(message) {
return new Buffer2(message);
};
}
var nodeMethod = function(message) {
if (typeof message === "string") {
return crypto.createHash("md5").update(message, "utf8").digest("hex");
} else {
if (message === null || message === void 0) {
throw new Error(INPUT_ERROR);
} else if (message.constructor === ArrayBuffer) {
message = new Uint8Array(message);
}
}
if (isArray(message) || isView(message) || message.constructor === Buffer2) {
return crypto.createHash("md5").update(bufferFrom(message)).digest("hex");
} else {
return method(message);
}
};
return nodeMethod;
};
var createHmacOutputMethod = function(outputType) {
return function(key, message) {
return new HmacMd5(key, true).update(message)[outputType]();
};
};
var createHmacMethod = function() {
var method = createHmacOutputMethod("hex");
method.create = function(key) {
return new HmacMd5(key);
};
method.update = function(key, message) {
return method.create(key).update(message);
};
for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
var type = OUTPUT_TYPES[i];
method[type] = createHmacOutputMethod(type);
}
return method;
};
function Md5(sharedMemory) {
if (sharedMemory) {
blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
this.blocks = blocks;
this.buffer8 = buffer8;
} else {
if (ARRAY_BUFFER) {
var buffer2 = new ArrayBuffer(68);
this.buffer8 = new Uint8Array(buffer2);
this.blocks = new Uint32Array(buffer2);
} else {
this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
}
this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
this.finalized = this.hashed = false;
this.first = true;
}
Md5.prototype.update = function(message) {
if (this.finalized) {
throw new Error(FINALIZE_ERROR);
}
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks2 = this.blocks;
var buffer82 = this.buffer8;
while (index < length) {
if (this.hashed) {
this.hashed = false;
blocks2[0] = blocks2[16];
blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
}
if (isString) {
if (ARRAY_BUFFER) {
for (i = this.start; index < length && i < 64; ++index) {
code = message.charCodeAt(index);
if (code < 128) {
buffer82[i++] = code;
} else if (code < 2048) {
buffer82[i++] = 192 | code >>> 6;
buffer82[i++] = 128 | code & 63;
} else if (code < 55296 || code >= 57344) {
buffer82[i++] = 224 | code >>> 12;
buffer82[i++] = 128 | code >>> 6 & 63;
buffer82[i++] = 128 | code & 63;
} else {
code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index) & 1023);
buffer82[i++] = 240 | code >>> 18;
buffer82[i++] = 128 | code >>> 12 & 63;
buffer82[i++] = 128 | code >>> 6 & 63;
buffer82[i++] = 128 | code & 63;
}
}
} else {
for (i = this.start; index < length && i < 64; ++index) {
code = message.charCodeAt(index);
if (code < 128) {
blocks2[i >>> 2] |= code << SHIFT[i++ & 3];
} else if (code < 2048) {
blocks2[i >>> 2] |= (192 | code >>> 6) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
} else if (code < 55296 || code >= 57344) {
blocks2[i >>> 2] |= (224 | code >>> 12) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
} else {
code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index) & 1023);
blocks2[i >>> 2] |= (240 | code >>> 18) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 12 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code >>> 6 & 63) << SHIFT[i++ & 3];
blocks2[i >>> 2] |= (128 | code & 63) << SHIFT[i++ & 3];
}
}
}
} else {
if (ARRAY_BUFFER) {
for (i = this.start; index < length && i < 64; ++index) {
buffer82[i++] = message[index];
}
} else {
for (i = this.start; index < length && i < 64; ++index) {
blocks2[i >>> 2] |= message[index] << SHIFT[i++ & 3];
}
}
}
this.lastByteIndex = i;
this.bytes += i - this.start;
if (i >= 64) {
this.start = i - 64;
this.hash();
this.hashed = true;
} else {
this.start = i;
}
}
if (this.bytes > 4294967295) {
this.hBytes += this.bytes / 4294967296 << 0;
this.bytes = this.bytes % 4294967296;
}
return this;
};
Md5.prototype.finalize = function() {
if (this.finalized) {
return;
}
this.finalized = true;
var blocks2 = this.blocks, i = this.lastByteIndex;
blocks2[i >>> 2] |= EXTRA[i & 3];
if (i >= 56) {
if (!this.hashed) {
this.hash();
}
blocks2[0] = blocks2[16];
blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0;
}
blocks2[14] = this.bytes << 3;
blocks2[15] = this.hBytes << 3 | this.bytes >>> 29;
this.hash();
};
Md5.prototype.hash = function() {
var a, b, c, d, bc, da, blocks2 = this.blocks;
if (this.first) {
a = blocks2[0] - 680876937;
a = (a << 7 | a >>> 25) - 271733879 << 0;
d = (-1732584194 ^ a & 2004318071) + blocks2[1] - 117830708;
d = (d << 12 | d >>> 20) + a << 0;
c = (-271733879 ^ d & (a ^ -271733879)) + blocks2[2] - 1126478375;
c = (c << 17 | c >>> 15) + d << 0;
b = (a ^ c & (d ^ a)) + blocks2[3] - 1316259209;
b = (b << 22 | b >>> 10) + c << 0;
} else {
a = this.h0;
b = this.h1;
c = this.h2;
d = this.h3;
a += (d ^ b & (c ^ d)) + blocks2[0] - 680876936;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[1] - 389564586;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[2] + 606105819;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[3] - 1044525330;
b = (b << 22 | b >>> 10) + c << 0;
}
a += (d ^ b & (c ^ d)) + blocks2[4] - 176418897;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[5] + 1200080426;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[6] - 1473231341;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[7] - 45705983;
b = (b << 22 | b >>> 10) + c << 0;
a += (d ^ b & (c ^ d)) + blocks2[8] + 1770035416;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[9] - 1958414417;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[10] - 42063;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[11] - 1990404162;
b = (b << 22 | b >>> 10) + c << 0;
a += (d ^ b & (c ^ d)) + blocks2[12] + 1804603682;
a = (a << 7 | a >>> 25) + b << 0;
d += (c ^ a & (b ^ c)) + blocks2[13] - 40341101;
d = (d << 12 | d >>> 20) + a << 0;
c += (b ^ d & (a ^ b)) + blocks2[14] - 1502002290;
c = (c << 17 | c >>> 15) + d << 0;
b += (a ^ c & (d ^ a)) + blocks2[15] + 1236535329;
b = (b << 22 | b >>> 10) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[1] - 165796510;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[6] - 1069501632;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[11] + 643717713;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[0] - 373897302;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[5] - 701558691;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[10] + 38016083;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[15] - 660478335;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[4] - 405537848;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[9] + 568446438;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[14] - 1019803690;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[3] - 187363961;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[8] + 1163531501;
b = (b << 20 | b >>> 12) + c << 0;
a += (c ^ d & (b ^ c)) + blocks2[13] - 1444681467;
a = (a << 5 | a >>> 27) + b << 0;
d += (b ^ c & (a ^ b)) + blocks2[2] - 51403784;
d = (d << 9 | d >>> 23) + a << 0;
c += (a ^ b & (d ^ a)) + blocks2[7] + 1735328473;
c = (c << 14 | c >>> 18) + d << 0;
b += (d ^ a & (c ^ d)) + blocks2[12] - 1926607734;
b = (b << 20 | b >>> 12) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[5] - 378558;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[8] - 2022574463;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[11] + 1839030562;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[14] - 35309556;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[1] - 1530992060;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[4] + 1272893353;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[7] - 155497632;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[10] - 1094730640;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[13] + 681279174;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[0] - 358537222;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[3] - 722521979;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[6] + 76029189;
b = (b << 23 | b >>> 9) + c << 0;
bc = b ^ c;
a += (bc ^ d) + blocks2[9] - 640364487;
a = (a << 4 | a >>> 28) + b << 0;
d += (bc ^ a) + blocks2[12] - 421815835;
d = (d << 11 | d >>> 21) + a << 0;
da = d ^ a;
c += (da ^ b) + blocks2[15] + 530742520;
c = (c << 16 | c >>> 16) + d << 0;
b += (da ^ c) + blocks2[2] - 995338651;
b = (b << 23 | b >>> 9) + c << 0;
a += (c ^ (b | ~d)) + blocks2[0] - 198630844;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[7] + 1126891415;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[14] - 1416354905;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[5] - 57434055;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[12] + 1700485571;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[3] - 1894986606;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[10] - 1051523;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[1] - 2054922799;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[8] + 1873313359;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[15] - 30611744;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[6] - 1560198380;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[13] + 1309151649;
b = (b << 21 | b >>> 11) + c << 0;
a += (c ^ (b | ~d)) + blocks2[4] - 145523070;
a = (a << 6 | a >>> 26) + b << 0;
d += (b ^ (a | ~c)) + blocks2[11] - 1120210379;
d = (d << 10 | d >>> 22) + a << 0;
c += (a ^ (d | ~b)) + blocks2[2] + 718787259;
c = (c << 15 | c >>> 17) + d << 0;
b += (d ^ (c | ~a)) + blocks2[9] - 343485551;
b = (b << 21 | b >>> 11) + c << 0;
if (this.first) {
this.h0 = a + 1732584193 << 0;
this.h1 = b - 271733879 << 0;
this.h2 = c - 1732584194 << 0;
this.h3 = d + 271733878 << 0;
this.first = false;
} else {
this.h0 = this.h0 + a << 0;
this.h1 = this.h1 + b << 0;
this.h2 = this.h2 + c << 0;
this.h3 = this.h3 + d << 0;
}
};
Md5.prototype.hex = function() {
this.finalize();
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
return HEX_CHARS[h0 >>> 4 & 15] + HEX_CHARS[h0 & 15] + HEX_CHARS[h0 >>> 12 & 15] + HEX_CHARS[h0 >>> 8 & 15] + HEX_CHARS[h0 >>> 20 & 15] + HEX_CHARS[h0 >>> 16 & 15] + HEX_CHARS[h0 >>> 28 & 15] + HEX_CHARS[h0 >>> 24 & 15] + HEX_CHARS[h1 >>> 4 & 15] + HEX_CHARS[h1 & 15] + HEX_CHARS[h1 >>> 12 & 15] + HEX_CHARS[h1 >>> 8 & 15] + HEX_CHARS[h1 >>> 20 & 15] + HEX_CHARS[h1 >>> 16 & 15] + HEX_CHARS[h1 >>> 28 & 15] + HEX_CHARS[h1 >>> 24 & 15] + HEX_CHARS[h2 >>> 4 & 15] + HEX_CHARS[h2 & 15] + HEX_CHARS[h2 >>> 12 & 15] + HEX_CHARS[h2 >>> 8 & 15] + HEX_CHARS[h2 >>> 20 & 15] + HEX_CHARS[h2 >>> 16 & 15] + HEX_CHARS[h2 >>> 28 & 15] + HEX_CHARS[h2 >>> 24 & 15] + HEX_CHARS[h3 >>> 4 & 15] + HEX_CHARS[h3 & 15] + HEX_CHARS[h3 >>> 12 & 15] + HEX_CHARS[h3 >>> 8 & 15] + HEX_CHARS[h3 >>> 20 & 15] + HEX_CHARS[h3 >>> 16 & 15] + HEX_CHARS[h3 >>> 28 & 15] + HEX_CHARS[h3 >>> 24 & 15];
};
Md5.prototype.toString = Md5.prototype.hex;
Md5.prototype.digest = function() {
this.finalize();
var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
return [
h0 & 255,
h0 >>> 8 & 255,
h0 >>> 16 & 255,
h0 >>> 24 & 255,
h1 & 255,
h1 >>> 8 & 255,
h1 >>> 16 & 255,
h1 >>> 24 & 255,
h2 & 255,
h2 >>> 8 & 255,
h2 >>> 16 & 255,
h2 >>> 24 & 255,
h3 & 255,
h3 >>> 8 & 255,
h3 >>> 16 & 255,
h3 >>> 24 & 255
];
};
Md5.prototype.array = Md5.prototype.digest;
Md5.prototype.arrayBuffer = function() {
this.finalize();
var buffer2 = new ArrayBuffer(16);
var blocks2 = new Uint32Array(buffer2);
blocks2[0] = this.h0;
blocks2[1] = this.h1;
blocks2[2] = this.h2;
blocks2[3] = this.h3;
return buffer2;
};
Md5.prototype.buffer = Md5.prototype.arrayBuffer;
Md5.prototype.base64 = function() {
var v1, v2, v3, base64Str = "", bytes = this.array();
for (var i = 0; i < 15; ) {
v1 = bytes[i++];
v2 = bytes[i++];
v3 = bytes[i++];
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] + BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] + BASE64_ENCODE_CHAR[v3 & 63];
}
v1 = bytes[i];
base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[v1 << 4 & 63] + "==";
return base64Str;
};
function HmacMd5(key, sharedMemory) {
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 128) {
bytes[index++] = code;
} else if (code < 2048) {
bytes[index++] = 192 | code >>> 6;
bytes[index++] = 128 | code & 63;
} else if (code < 55296 || code >= 57344) {
bytes[index++] = 224 | code >>> 12;
bytes[index++] = 128 | code >>> 6 & 63;
bytes[index++] = 128 | code & 63;
} else {
code = 65536 + ((code & 1023) << 10 | key.charCodeAt(++i) & 1023);
bytes[index++] = 240 | code >>> 18;
bytes[index++] = 128 | code >>> 12 & 63;
bytes[index++] = 128 | code >>> 6 & 63;
bytes[index++] = 128 | code & 63;
}
}
key = bytes;
}
if (key.length > 64) {
key = new Md5(true).update(key).array();
}
var oKeyPad = [], iKeyPad = [];
for (i = 0; i < 64; ++i) {
var b = key[i] || 0;
oKeyPad[i] = 92 ^ b;
iKeyPad[i] = 54 ^ b;
}
Md5.call(this, sharedMemory);
this.update(iKeyPad);
this.oKeyPad = oKeyPad;
this.inner = true;
this.sharedMemory = sharedMemory;
}
HmacMd5.prototype = new Md5();
HmacMd5.prototype.finalize = function() {
Md5.prototype.finalize.call(this);
if (this.inner) {
this.inner = false;
var innerHash = this.array();
Md5.call(this, this.sharedMemory);
this.update(this.oKeyPad);
this.update(innerHash);
Md5.prototype.finalize.call(this);
}
};
var exports2 = createMethod();
exports2.md5 = exports2;
exports2.md5.hmac = createHmacMethod();
if (COMMON_JS) {
module.exports = exports2;
} else {
root.md5 = exports2;
if (AMD) {
define(function() {
return exports2;
});
}
}
})();
}
});
export default require_md5();
/*! Bundled license information:
js-md5/src/md5.js:
(**
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.8.3
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2023
* @license MIT
*)
*/
//# sourceMappingURL=js-md5.js.map

7
unpackage/dist/cache/.vite/deps/js-md5.js.map
File diff suppressed because it is too large
View File

4
utils/utils.js

@ -29,4 +29,8 @@ export let detectOrient = (dome) => {
console.log(2) console.log(2)
} }
$wrapper.style.cssText = style; $wrapper.style.cssText = style;
}
export let noDoFn = ()=>{
uni.$u.toast('正在开发中,敬请期待')
} }
Loading…
Cancel
Save