hookehuyr

refactor(用户界面): 移除课程集合入口并优化微信支付图标

- 从设置页面移除不再需要的课程集合入口
- 将微信支付的自定义SVG图标替换为van-icon组件
- 在结账页面添加用户信息自动填充功能
```

这个提交消息遵循了以下原则:
1. 使用中文简洁描述了主要变更
2. 类型为refactor,因为这些修改主要是界面重构和优化
3. 添加了scope(用户界面)以提供更多上下文
4. 在body中列出了三个主要变更点,没有重复描述
5. 使用了命令式语气且没有结尾标点
6. 保持了简洁性,同时涵盖了diff中最重要的功能修改
......@@ -148,13 +148,7 @@
class="mr-3"
/>
<span class="flex-1">微信支付</span>
<svg class="h-6 w-6 text-green-500" viewBox="0 0 24 24" fill="currentColor">
<path d="M9.5,8.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
<path d="M14.5,8.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
<path d="M9.5,14.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
<path d="M14.5,14.5m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
<path d="M12,2C6.5,2 2,6.5 2,12s4.5,10 10,10s10,-4.5 10,-10S17.5,2 12,2zM19.8,11c-0.2,4.6 -4.1,7.8 -8.8,7.5c-3.8,-0.2 -7.2,-3.2 -7.5,-7.1C3.2,7 6.9,3.1 11.5,3C16.1,3 20,6.9 19.8,11z" />
</svg>
<van-icon name="https://cdn.ipadbiz.cn/mlaj/icon/wxpay3.png" size="1.5rem" />
</label>
<!-- <label class="flex items-center p-3 border border-gray-200 rounded-lg bg-white/50">
......@@ -293,6 +287,7 @@ import ConfirmDialog from '@/components/ui/ConfirmDialog.vue'
import WechatPayment from '@/components/payment/WechatPayment.vue'
import { useCart } from '@/contexts/cart'
import { useTitle } from '@vueuse/core'
import { getUserInfoAPI } from "@/api/users";
const $route = useRoute()
const $router = useRouter()
......@@ -310,6 +305,16 @@ const formData = ref({
pay_type: 'WeChat'
})
onMounted(async () => {
const { code, data } = await getUserInfoAPI();
if (code) {
// 获取默认用户信息
formData.value.receive_name = data.user.name ? data.user.name : '';
formData.value.receive_phone = data.user.mobile ? data.user.mobile : '';
}
})
// 支付相关状态
const showPayment = ref(false)
const orderId = ref('')
......
<!--
* @Date: 2025-03-24 13:04:21
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-04-08 17:54:40
* @LastEditTime: 2025-05-23 18:23:28
* @FilePath: /mlaj/src/views/profile/SettingsPage.vue
* @Description: 用户设置页面
-->
......@@ -86,17 +86,6 @@
<ChevronRightIcon class="w-5 h-5 text-gray-400" />
</div>
</div>
<!-- 课程集合 -->
<div class="p-4" @click="router.push('/studyCourse')">
<div class="flex items-center justify-between">
<div>
<h3 class="text-base font-medium text-gray-900">课程集合</h3>
<p class="text-sm text-gray-500">课程集合</p>
</div>
<ChevronRightIcon class="w-5 h-5 text-gray-400" />
</div>
</div>
</div>
</FrostedGlass>
</div>
......