feat(user): 使用微信原生 Picker 替换所在地选择弹层
- 删除 NutUI Address 相关导入、状态及地区数据转换逻辑 - 新增派生 regionValue 用于绑定微信原生 Picker 的 value - 将 handleRegionChange 调整为处理微信 Picker 的事件 - 将所在地选择 UI 修改为微信原生 Picker 包裹的视图结构 - 地图定位失败使用弹窗提示,引导用户手动选择或重试 - 移除手动打开地区选择器的函数及 NutUI 组件 - 保留 RegionData 用于文本智能识别解析 - 编译通过,提升在无地图或无权限环境下的地区选择稳定性
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
import { View, Text, Image } from '@tarojs/components';
|
||||
import { useState } from 'react';
|
||||
import Taro from '@tarojs/taro';
|
||||
import { useShare } from '@/hooks/useShare';
|
||||
import NavBar from '@/components/NavBar';
|
||||
|
||||
definePageConfig({
|
||||
navigationBarTitleText: '分享赚佣金',
|
||||
enableShareAppMessage: true,
|
||||
enableShareTimeline: true,
|
||||
});
|
||||
|
||||
export default function SharePage() {
|
||||
const [shareLink, setShareLink] = useState('https://paopao.com/ref/abc123');
|
||||
const [qrCodeUrl, setQrCodeUrl] = useState('');
|
||||
|
||||
// 分享 / 朋友圈
|
||||
useShare({
|
||||
title: '分享赚佣金,邀请好友一起来',
|
||||
path: '/pages/share/index',
|
||||
});
|
||||
|
||||
const handleCopyLink = () => {
|
||||
Taro.setClipboardData({ data: shareLink })
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user