设置拨打电话权限、修改定位
This commit is contained in:
@@ -89,7 +89,7 @@ const handleTextInput = (e) => {
|
||||
const reverseGeocode = async (lng, lat) => {
|
||||
if (!AMAP_KEY) return null;
|
||||
try {
|
||||
const [err, res] = await uni.request({
|
||||
const res = await uni.request({
|
||||
url: 'https://restapi.amap.com/v3/geocode/regeo',
|
||||
data: {
|
||||
key: AMAP_KEY,
|
||||
@@ -97,7 +97,6 @@ const reverseGeocode = async (lng, lat) => {
|
||||
extensions: 'base'
|
||||
}
|
||||
});
|
||||
if (err) throw err;
|
||||
if (res.data?.status === '1' && res.data.regeocode?.formatted_address) {
|
||||
return res.data.regeocode.formatted_address;
|
||||
}
|
||||
|
||||
@@ -44,9 +44,10 @@
|
||||
<!-- 加载中 / 无更多 / 空布局 -->
|
||||
<view class="load-more" v-if="loadingMore">加载中...</view>
|
||||
<view class="no-more" v-if="noMoreData && noticeList.length">没有更多通知了</view>
|
||||
<view class="empty" v-if="noticeList.length === 0 && !loading">
|
||||
暂无通知
|
||||
</view>
|
||||
<view v-if="noticeList.length === 0 && !loading" class="empty-state">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
<text class="empty-text">暂无通知</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -208,10 +209,20 @@ page {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 100rpx 0;
|
||||
color: #999;
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 100rpx 0;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.refresh-btn {
|
||||
background: #007AFF;
|
||||
|
||||
@@ -55,8 +55,8 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
uni.showToast({ title: '电话号码为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
const cleanPhone = phone.replace(/-/g, '').trim();
|
||||
if (!/^1[3-9]\d{9}$/.test(cleanPhone) && !/^0\d{2,3}-?\d{7,8}$/.test(cleanPhone)) {
|
||||
const cleanPhone = phone.replace(/\D/g, '');
|
||||
if (!/^1[3-9]\d{9}$/.test(cleanPhone) && !/^0\d{2,3}\d{7,8}$/.test(cleanPhone)) {
|
||||
uni.showToast({ title: '电话号码格式有误', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
return;
|
||||
}
|
||||
uni.setClipboardData({
|
||||
data: phone.replace(/-/g, '').trim(),
|
||||
data: phone.replace(/\D/g, ''),
|
||||
success: () => {
|
||||
uni.showToast({ title: '号码已复制', icon: 'none' });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user