mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 07:55:53 +08:00
style: 🎨 优化退出登录功能、优化部分变量名
This commit is contained in:
@@ -33,18 +33,18 @@
|
||||
<m-city :provinceData="list" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" pickerSize="4">
|
||||
</m-city>
|
||||
|
||||
<uniMap v-if="mapFlage" @close="closeMap" @callback="callBackAddress" />
|
||||
<uniMap v-if="mapFlag" @close="closeMap" @callback="callBackAddress" />
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { addAddress, editAddress, getAddressDetail } from "@/api/address.js";
|
||||
import gkcity from "@/components/m-city/m-city.vue";
|
||||
import city from "@/components/m-city/m-city.vue";
|
||||
import uniMap from "./uniMap";
|
||||
import permision from "@/js_sdk/wa-permission/permission.js";
|
||||
export default {
|
||||
components: {
|
||||
"m-city": gkcity,
|
||||
"m-city": city,
|
||||
uniMap,
|
||||
},
|
||||
onShow() {
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
methods: {
|
||||
// 关闭地图
|
||||
closeMap() {
|
||||
this.mapFlage = false;
|
||||
this.mapFlag = false;
|
||||
},
|
||||
// 打开地图并访问权限
|
||||
clickUniMap() {
|
||||
@@ -61,8 +61,8 @@ export default {
|
||||
if (plus.os.name == "iOS") {
|
||||
// ios系统
|
||||
permision.judgeIosPermission("location")
|
||||
? (this.mapFlage = true)
|
||||
: this.refuseMapOuther();
|
||||
? (this.mapFlag = true)
|
||||
: this.refuseMap();
|
||||
} else {
|
||||
// 安卓
|
||||
this.requestAndroidPermission(
|
||||
@@ -72,12 +72,12 @@ export default {
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
this.mapFlage = true;
|
||||
this.mapFlag = true;
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 如果拒绝权限 提示区设置
|
||||
refuseMapOuther() {
|
||||
refuseMap() {
|
||||
uni.showModal({
|
||||
title: "温馨提示",
|
||||
content: "您已拒绝定位,请开启",
|
||||
@@ -113,9 +113,9 @@ export default {
|
||||
var result = await permision.requestAndroidPermission(permisionID);
|
||||
|
||||
if (result == 1) {
|
||||
this.mapFlage = true;
|
||||
this.mapFlag = true;
|
||||
} else {
|
||||
this.refuseMapOuther();
|
||||
this.refuseMap();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
uni.hideLoading();
|
||||
}
|
||||
|
||||
this.mapFlage = !this.mapFlage; //关闭地图
|
||||
this.mapFlag = !this.mapFlag; //关闭地图
|
||||
},
|
||||
|
||||
// 保存当前 地址
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
lightColor: this.$lightColor, //高亮颜色
|
||||
mapFlage: false, // 地图选择开
|
||||
mapFlag: false, // 地图选择开
|
||||
routerVal: "",
|
||||
form: {
|
||||
detail: "", //地址详情
|
||||
|
||||
Reference in New Issue
Block a user