3 コミット ecbbc52b01 ... a2f8248111

作者 SHA1 メッセージ 日付
  abpcoder a2f8248111 fit ex 2 日 前
  abpcoder cd9fdd4e1e Merge branch 'mp' of http://49.234.186.218:9000/root/ieplus-app into mp 2 日 前
  abpcoder fed871a8e3 fit wx 2 日 前

+ 2 - 5
src/pagesOther/pages/university/detail/components/plan-enroll-list.vue

@@ -143,18 +143,15 @@ const handleRuleClick = (descriptor: IPlanEnrollDescriptor, history: IPlanEnroll
 
 const handleAddVoluntary = async (item: IPlanEnrollHistory) => {
     const {code} = baseInfo.value
-    const {majorCode} = item
-    if (!majorCode) return uni.$ie.showError('缺少专业编码')
-    await addVoluntary({universityId: code, majorId: majorCode})
+    await addVoluntary({universityId: code, majorId: item.id + ''})
 }
 
 const handleRateVoluntary = (item: IPlanEnrollHistory) => {
-    if (!item.majorCode) return uni.$ie.showError('缺少专业编码')
     const selected: SelectedUniversityMajor = {
         universityId: baseInfo.value.code,
         universityLogo: baseInfo.value.logo,
         universityName: baseInfo.value.name,
-        majorId: item.majorCode,
+        majorId: item.id + '',
         majorName: item.majorName,
         majorGroup: item.majorGroup,
         majorAncestors: '', // 测算部分这个字段不重要

+ 2 - 2
src/pagesOther/pages/voluntary/list/components/voluntary-majors-draggable.vue

@@ -43,10 +43,10 @@
         >
             <view class="bg-back-light rounded-lg p-20 flex justify-between items-center gap-20">
                 <!-- 主内容:阻断触摸,确保只能手柄拖 -->
-                <view class="flex-1 flex items-center gap-20" @touchstart.stop @touchmove.stop>
+                <view class="flex-1 flex items-center gap-20" @touchmove.stop>
                     <view class="text-32 text-fore-placeholder font-bold">{{ toFixedLen(i) }}</view>
                     <view class="flex-1 w-0 text-28 text-fore-title font-bold truncate">{{ m.majorName }}</view>
-                    <uv-icon name="trash" size="18" color="error" @click="$emit('delete', m)" />
+                    <uv-icon name="trash" size="18" color="error" @tap.stop="$emit('delete', m)" />
                 </view>
 
                 <!-- 手柄:不 stop / prevent -->

+ 4 - 6
src/pagesOther/pages/voluntary/list/list.vue

@@ -138,15 +138,13 @@ const handleActionSelect = async (e: ActionItem) => {
             paging.value?.reload() // 发生异常时,重新加载列表
         }
     } else if (e.id === 'delete') {
-        const confirm = await uni.$ie.showConfirm({
+        await uni.$ie.showConfirm({
             title: '志愿删除提醒',
             content: `删除'${record.universityName}',将同时删除该院校下所有意向专业。\n确认删除?!`
         })
-        if (confirm) {
-            await removeVoluntaryByUniversity(record.universityId)
-            uni.$ie.showSuccess('删除成功')
-            paging.value?.reload()
-        }
+        await removeVoluntaryByUniversity(record.universityId)
+        uni.$ie.showSuccess('删除成功')
+        paging.value?.reload()
     } else {
         throw new Error('Unsupported action id: ' + e.id)
     }

+ 1 - 1
src/pagesSystem/pages/setting/setting.vue

@@ -61,7 +61,7 @@ const settings = computed(() => [
     icon: 'trash',
     isLink: true,
     handler: async () => {
-      uni.$ie.showConfirm({
+      uni.$ie.showModal({
         title: '注销账号',
         content: '是否注销账号,注销后卡号将不能再注册使用系统且永久失效。请谨慎操作!'
       }).then(confirm => {

+ 4 - 1
src/utils/uni-tool.ts

@@ -173,7 +173,10 @@ const tool: IeTool = {
         cancelColor,
         confirmColor,
         success: (res) => {
-          resolve(res.confirm)
+          /* 这里不要动,就是这样的。形成await showConfirm的效果 2026.1.13 */
+          /* 如果有必须接收true/false的写法,请使用showModal */
+          if(res.confirm)(resolve(true))
+          else reject(false)
         },
         fail: reject
       });