|
|
@@ -37,9 +37,8 @@
|
|
|
onMounted
|
|
|
} from 'vue';
|
|
|
import {
|
|
|
- getWordInfo,
|
|
|
- getWordInfoYk
|
|
|
- } from "@/api/word.js"
|
|
|
+ getDanciChanpinWordInfo
|
|
|
+ } from "@/api/chaojidanci.js"
|
|
|
import {
|
|
|
onLoad
|
|
|
} from '@dcloudio/uni-app';
|
|
|
@@ -57,16 +56,10 @@
|
|
|
name: ''
|
|
|
})
|
|
|
const data = ref(null)
|
|
|
- const userCode = getUserIdentity();
|
|
|
|
|
|
onLoad((options) => {
|
|
|
- if (userCode !== 'Visitor') {
|
|
|
- getInfo(options)
|
|
|
- data.value = options
|
|
|
- } else {
|
|
|
- getCommonInfo(options)
|
|
|
- data.value = options
|
|
|
- }
|
|
|
+ getInfo(options)
|
|
|
+ data.value = options
|
|
|
})
|
|
|
const highlightWord = (text) => {
|
|
|
if (!text || !pageInfo.value.name) {
|
|
|
@@ -80,36 +73,16 @@
|
|
|
});
|
|
|
}
|
|
|
const handleBack = () => {
|
|
|
-
|
|
|
-
|
|
|
- if (userCode !== 'Visitor') {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/chaojidanci/newEnglish/index?jieId=${data.value.jieId}&wordId=${data.value.wordId}`
|
|
|
- });
|
|
|
- } else {
|
|
|
-
|
|
|
- console.log('data123',data);
|
|
|
- uni.redirectTo({
|
|
|
- url: `/pages/chaojidanci/newEnglish/index?jieId=${data.value.jieId}&wordId=${data.value.wordId}&levelId=${data.value.levelId}&typeId=${data.value.typeId}&subjectId=${data.value.subjectId}&tipFlag=${data.value.tipFlag}&youkeZhangId=${data.value.youkeZhangId}`
|
|
|
- });
|
|
|
- }
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/pages/chaojidanci/newEnglish/index?danyuanId=${data.value.danyuanId}&wordId=${data.value.wordId}`
|
|
|
+ });
|
|
|
}
|
|
|
const getInfo = (data) => {
|
|
|
let req = {
|
|
|
- jieId: data.jieId,
|
|
|
- wordId: data.wordId
|
|
|
- }
|
|
|
- getWordInfo(req).then(res => {
|
|
|
- console.log('res', res);
|
|
|
- pageInfo.value = res.data
|
|
|
- })
|
|
|
- }
|
|
|
- const getCommonInfo = (data) => {
|
|
|
- let req = {
|
|
|
- jieId: data.jieId,
|
|
|
+ danyuanId: data.danyuanId,
|
|
|
wordId: data.wordId
|
|
|
}
|
|
|
- getWordInfoYk(req).then(res => {
|
|
|
+ getDanciChanpinWordInfo(req).then(res => {
|
|
|
console.log('res', res);
|
|
|
pageInfo.value = res.data
|
|
|
})
|