lex 2 роки тому
батько
коміт
680ad54351

+ 3 - 3
src/helpers/native-message.ts

@@ -27,7 +27,7 @@ window.postMessage = (message: IPostMessage) => {
 type CallBack = (evt?: IPostMessage) => void
 
 // eslint-disable-next-line @typescript-eslint/no-empty-function
-const loop = () => {}
+const loop = () => { }
 
 const calls: { [key: string]: CallBack | CallBack[] } = {}
 
@@ -39,7 +39,7 @@ if (browserInfo.isApp) {
       console.log('app交互接受:', evt.data)
       const data = evt.data ? (typeof evt.data === 'object' ? evt.data : JSON.parse(evt.data)) : {}
       const uuid = data.content?.uuid || data.uuid
-      // console.log(uuid, data.content, 'uuid')
+      console.log(uuid, data.content, 'uuid')
       try {
         if (data.content) {
           data.content = JSON.parse(data.content)
@@ -105,7 +105,7 @@ export const removeListenerMessage = (api: string, callback: CallBack) => {
     const uuid = api
     if (Array.isArray(calls[uuid])) {
       const indexOf = (calls[uuid] as CallBack[]).indexOf(callback)
-      ;(calls[uuid] as CallBack[]).splice(indexOf, 1)
+        ; (calls[uuid] as CallBack[]).splice(indexOf, 1)
     }
   }
 }

+ 3 - 1
src/school/school-detail/eidt-school.tsx

@@ -200,7 +200,6 @@ export default defineComponent({
               </Field>
               <Field
                 label-align="top"
-                v-model={forms.address}
                 maxlength={50}
                 placeholder="请选择学校地址"
                 disabled
@@ -212,6 +211,9 @@ export default defineComponent({
                     <p class={[styles.addP, styles.addDet]}>
                       学校地址 <Image width={19} height={18} src={locIcon}></Image>
                     </p>
+                  ),
+                  input: () => (
+                    <div style={{ paddingTop: '6px', paddingRight: '13px' }}>{forms.address}</div>
                   )
                 }}
               </Field>

+ 5 - 0
src/school/school-detail/index.module.less

@@ -118,6 +118,11 @@
       .van-cell {
         padding: 18px 12px;
       }
+      .van-field__control {
+        font-size: 16px;
+        color: #333;
+        line-height: 22px;
+      }
     }
   }
 }

+ 1 - 1
src/views/404/index.tsx

@@ -18,7 +18,7 @@ export default defineComponent({
           plain
           round
           onClick={() => {
-            if (browser().iPhone) {
+            if (browser().isApp) {
               postMessage({ api: 'back' })
             } else {
               this.$router.back()

+ 8 - 0
src/views/unit-test/model/drag-question/index.tsx

@@ -88,7 +88,9 @@ export default defineComponent({
       const list = state.list || []
       const result: any = []
 
+      console.log(list, '1212')
       list.forEach((item: any, index: number) => {
+        console.log(index, '测试返回')
         result.push({
           answerId: item.index,
           answer: item.leftValue,
@@ -137,6 +139,7 @@ export default defineComponent({
     const initOptions = () => {
       const answers = props.data.answers || []
       const userAnswer = props.data.userAnswer || [] // 用户填写的答案
+      console.log(answers, userAnswer)
       state.options = []
       if (userAnswer.length > 0) {
         userAnswer.forEach((answer: any, index: any) => {
@@ -238,6 +241,11 @@ export default defineComponent({
                     true
                   )
 
+                  // state.options.forEach((item: any) => {
+                  //   item.checked = false
+                  // })
+                  // state.list = []
+
                   onSelect()
                 }}
               >

+ 1 - 0
src/views/unit-test/model/play-question/index.tsx

@@ -97,6 +97,7 @@ export default defineComponent({
           (res: any) => {
             const content = res.content
             if (content.value) {
+              console.log(content.value, 'h5-orchestra-unit')
               const result = content.value ? JSON.parse(content.value) : {}
               console.log('🚀 ~ listenerMessage ~ result', result, props.data.questionId)