优化定位弹窗显示位置,优化弹窗和表单提示文本

This commit is contained in:
WindowBird 2025-09-04 14:47:02 +08:00
parent 9b60a142da
commit 51cd769177
3 changed files with 9 additions and 9 deletions

View File

@ -2,12 +2,6 @@
export default { export default {
onLaunch: function () { onLaunch: function () {
console.log('App Launch') console.log('App Launch')
uni.authorize({
scope: 'scope.userLocation',
success: function () {
console.log('用户同意了授权')
},
})
}, },
onShow: function () { onShow: function () {
console.log('App Show') console.log('App Show')

View File

@ -55,7 +55,7 @@
"appid": "wx303943e10cbe2743", "appid": "wx303943e10cbe2743",
"permission": { "permission": {
"scope.userLocation": { "scope.userLocation": {
"desc": "您的位置信息将用于小程序位置接口效果展示" "desc": "您的位置信息将用于定位您的收货地址"
} }
}, },
"setting": { "setting": {

View File

@ -48,7 +48,7 @@
ref="mapLocation" ref="mapLocation"
v-model="formData.address" v-model="formData.address"
label="地址" label="地址"
placeholder="请输入或选择收货地址" placeholder="请选择收货地址"
@input="onAddressInput" @input="onAddressInput"
@location-success="onLocationSuccess" @location-success="onLocationSuccess"
@update:location="onLocationUpdate" @update:location="onLocationUpdate"
@ -81,7 +81,7 @@
<text class="field-label">租赁周期</text> <text class="field-label">租赁周期</text>
<view class="selector" @click="selectPeriod"> <view class="selector" @click="selectPeriod">
<text :class="['selector-text', { placeholder: !formData.period }]"> <text :class="['selector-text', { placeholder: !formData.period }]">
{{ formData.period || '请先选择设备类型' }} {{ formData.period || '请选择租赁周期' }}
</text> </text>
<text class="arrow-icon">></text> <text class="arrow-icon">></text>
</view> </view>
@ -151,6 +151,12 @@ export default {
// - formData // - formData
}, },
onLoad() { onLoad() {
uni.authorize({
scope: 'scope.userLocation',
success: function () {
console.log('用户同意了授权')
},
})
// //
this.getDeviceTypes() this.getDeviceTypes()
}, },