文字修改
This commit is contained in:
parent
b0ccfc9f29
commit
50409cd8c4
@ -16,8 +16,8 @@ let openPlantGrass = '-openPlantGrass-'
|
|||||||
let httpSix, httpApi;
|
let httpSix, httpApi;
|
||||||
|
|
||||||
// const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
case 'prod':
|
case 'prod':
|
||||||
@ -77,4 +77,5 @@ module.exports = {
|
|||||||
TOKENNAME: 'X-Token',
|
TOKENNAME: 'X-Token',
|
||||||
// 缓存时间 0 永久
|
// 缓存时间 0 永久
|
||||||
EXPIRE: 0,
|
EXPIRE: 0,
|
||||||
|
AUTH_EXPIRE_TIME: 20 * 1000 //秒
|
||||||
};
|
};
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName": "2.0.53",
|
"versionName" : "2.0.26",
|
||||||
"versionCode": 2053,
|
"versionCode" : 2026,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_picBox_no noPad">
|
<div class="broadcast_details_picBox_no noPad">
|
||||||
<div class="broadcast_details_pic">
|
<div class="broadcast_details_pic">
|
||||||
¥{{ item.product.price }}
|
¥{{ saleType == 1? item.product.price :item.product.wholesale_price}}
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_tit_no line1">
|
<div class="broadcast_details_tit_no line1">
|
||||||
{{item.product.store_name}}
|
{{item.product.store_name}}
|
||||||
@ -271,7 +271,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_picBox_no noPad">
|
<div class="broadcast_details_picBox_no noPad">
|
||||||
<div class="broadcast_details_pic">
|
<div class="broadcast_details_pic">
|
||||||
¥{{ item.product.price }}
|
¥{{ saleType == 1? item.product.price :item.product.wholesale_price}}
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_tit_no line1">
|
<div class="broadcast_details_tit_no line1">
|
||||||
{{item.product.store_name}}
|
{{item.product.store_name}}
|
||||||
@ -459,7 +459,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_picBox_no noPad">
|
<div class="broadcast_details_picBox_no noPad">
|
||||||
<div class="broadcast_details_pic">
|
<div class="broadcast_details_pic">
|
||||||
¥{{ item.product.price }}
|
¥{{ saleType == 1? item.product.price :item.product.wholesale_price}}
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_tit_no line1">
|
<div class="broadcast_details_tit_no line1">
|
||||||
{{item.product.store_name}}
|
{{item.product.store_name}}
|
||||||
@ -612,7 +612,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_picBox_no noPad">
|
<div class="broadcast_details_picBox_no noPad">
|
||||||
<div class="broadcast_details_pic">
|
<div class="broadcast_details_pic">
|
||||||
¥{{ item.product.price }}
|
¥{{ saleType == 1? item.product.price :item.product.wholesale_price}}
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_tit_no line1">
|
<div class="broadcast_details_tit_no line1">
|
||||||
{{item.product.store_name}}
|
{{item.product.store_name}}
|
||||||
@ -718,7 +718,7 @@
|
|||||||
<div class="broadcast_details_tit">{{productInfo.store_name}}</div>
|
<div class="broadcast_details_tit">{{productInfo.store_name}}</div>
|
||||||
<div class="acea-row row-between product_price">
|
<div class="acea-row row-between product_price">
|
||||||
<div class="broadcast_details_pic p-color">
|
<div class="broadcast_details_pic p-color">
|
||||||
¥{{ productInfo.price}}
|
¥{{ saleType == 1? productInfo.price :productInfo.wholesale_price}}
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_btn product_btn" @click="sendProduct">发送商品</div>
|
<div class="broadcast_details_btn product_btn" @click="sendProduct">发送商品</div>
|
||||||
</div>
|
</div>
|
||||||
@ -957,7 +957,8 @@
|
|||||||
httpUrl: '',
|
httpUrl: '',
|
||||||
press: false,
|
press: false,
|
||||||
index: 0,
|
index: 0,
|
||||||
j: 0
|
j: 0,
|
||||||
|
saleType: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -983,8 +984,9 @@
|
|||||||
this.combinationId = parseInt(option.combinationId) || 0;
|
this.combinationId = parseInt(option.combinationId) || 0;
|
||||||
this.orderId = option.order_id || ""
|
this.orderId = option.order_id || ""
|
||||||
this.mer_id = option.mer_id || 0
|
this.mer_id = option.mer_id || 0
|
||||||
this.refund_order_id = option.refund_order_id || 0
|
this.refund_order_id = option.refund_order_id || 0;
|
||||||
this.userId = option.userId || 0
|
this.userId = option.userId || 0;
|
||||||
|
this.saleType = option.sale_type || '';
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
self.windowH = res.windowHeight
|
self.windowH = res.windowHeight
|
||||||
@ -1006,6 +1008,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
var isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||||
|
console.log(isWholeSale);
|
||||||
|
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
|
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
|
||||||
|
@ -1502,7 +1502,7 @@
|
|||||||
toLogin()
|
toLogin()
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/chat/customer_list/chat?mer_id=${that.storeInfo.mer_id}&uid=${that.uid}&productId=${that.id}`
|
url: `/pages/chat/customer_list/chat?mer_id=${that.storeInfo.mer_id}&uid=${that.uid}&productId=${that.id}$sale_type=${that.sale_type}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -69,7 +69,11 @@
|
|||||||
} from '@/utils';
|
} from '@/utils';
|
||||||
import {
|
import {
|
||||||
getGeocoder
|
getGeocoder
|
||||||
} from "@/api/store.js"
|
} from "@/api/store.js";
|
||||||
|
import {
|
||||||
|
AUTH_EXPIRE_TIME
|
||||||
|
} from "@/config/app.js";
|
||||||
|
import permission from '@/utils/permission';
|
||||||
export default {
|
export default {
|
||||||
name: 'homeComb',
|
name: 'homeComb',
|
||||||
props: {
|
props: {
|
||||||
@ -135,7 +139,7 @@
|
|||||||
isCategory: false,
|
isCategory: false,
|
||||||
swiperTop: 0,
|
swiperTop: 0,
|
||||||
isFixed: true,
|
isFixed: true,
|
||||||
street: ''
|
street: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -230,9 +234,43 @@
|
|||||||
methods: {
|
methods: {
|
||||||
async scanQRcode() {
|
async scanQRcode() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
let result = await this.$store.dispatch("permission/requestPermissions",
|
let result = await this.$store.dispatch("permission/requestPermissions", 'CAMERA');
|
||||||
'CAMERA')
|
console.log('权限状态:' + result);
|
||||||
|
if (result != -1) {
|
||||||
|
console.log('允许设置...');
|
||||||
|
uni.removeStorageSync('expireTimeCamera');
|
||||||
|
} else {
|
||||||
|
const expireTime = uni.getStorageSync('expireTimeCamera');
|
||||||
|
console.log('过期时间:' + expireTime);
|
||||||
|
if (expireTime) {
|
||||||
|
if ((expireTime + AUTH_EXPIRE_TIME) < +new Date()) {
|
||||||
|
console.log('时间过期了....')
|
||||||
|
uni.removeStorageSync('expireTimeCamera');
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '操作权限已被拒绝,请手动前往设置',
|
||||||
|
confirmText: "立即设置",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
permission.gotoAppSetting();
|
||||||
|
} else {
|
||||||
|
// 设置过期时间
|
||||||
|
console.log('重置过期时间');
|
||||||
|
uni.setStorageSync('expireTimeCamera', +new Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('时间还没过期....');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 设置一个过期时间
|
||||||
|
uni.setStorageSync('expireTimeCamera', +new Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (result !== 1) return;
|
if (result !== 1) return;
|
||||||
|
// 授权成功移除
|
||||||
|
uni.removeStorageSync('expireTimeCamera');
|
||||||
// #endif
|
// #endif
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
id="home">
|
id="home">
|
||||||
<skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
|
<skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
|
||||||
bgcolor="transparent"></skeleton>
|
bgcolor="transparent"></skeleton>
|
||||||
|
|
||||||
<view v-if="!errorNetwork"
|
<view v-if="!errorNetwork"
|
||||||
:style="{visibility: showSkeleton ? 'hidden' : 'visible', pointerEvents: preview ? 'none' : 'auto'}">
|
:style="{visibility: showSkeleton ? 'hidden' : 'visible', pointerEvents: preview ? 'none' : 'auto'}">
|
||||||
<view class="page-index skeleton" :class="{ bgf: navIndex > 0 }">
|
<view class="page-index skeleton" :class="{ bgf: navIndex > 0 }">
|
||||||
@ -399,6 +400,7 @@
|
|||||||
import {
|
import {
|
||||||
showTab
|
showTab
|
||||||
} from "@/utils/showTab.js";
|
} from "@/utils/showTab.js";
|
||||||
|
import permission from '../../utils/permission';
|
||||||
export default {
|
export default {
|
||||||
computed: configMap({
|
computed: configMap({
|
||||||
hide_mer_status: 0,
|
hide_mer_status: 0,
|
||||||
@ -625,7 +627,7 @@
|
|||||||
let curRoute = routes[routes.length - 1].route //获取当前页面路由
|
let curRoute = routes[routes.length - 1].route //获取当前页面路由
|
||||||
this.activeRouter = '/' + curRoute
|
this.activeRouter = '/' + curRoute
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
async onLoad(options) {
|
||||||
let that = this
|
let that = this
|
||||||
this._options = options;
|
this._options = options;
|
||||||
this.diyId = options.diyId || 0;
|
this.diyId = options.diyId || 0;
|
||||||
@ -642,6 +644,16 @@
|
|||||||
})
|
})
|
||||||
that.pageLoad(options);
|
that.pageLoad(options);
|
||||||
this.$store.dispatch('INIT_CONFIG');
|
this.$store.dispatch('INIT_CONFIG');
|
||||||
|
|
||||||
|
// let result = await this.$store.dispatch("permission/requestPermissions",
|
||||||
|
// 'ACCESS_FINE_LOCATION')
|
||||||
|
|
||||||
|
|
||||||
|
// console.log(result)
|
||||||
|
|
||||||
|
|
||||||
|
// permission.gotoAppSetting();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
|
@ -197,18 +197,21 @@
|
|||||||
电话认证
|
电话认证
|
||||||
</view>
|
</view>
|
||||||
<view class="card-cont">
|
<view class="card-cont">
|
||||||
<view class="card-cont-li">
|
<view class="card-cont-li" style="justify-content: flex-start;">
|
||||||
联系电话 {{formData.phone}}
|
<text style="margin-right: 30rpx;width:120rpx;">联系电话</text>
|
||||||
|
<text>{{formData.phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<u-line style="margin: 28rpx 0;"></u-line>
|
<u-line style="margin: 28rpx 0;"></u-line>
|
||||||
<view class="card-cont-li">
|
<view class="card-cont-li">
|
||||||
<view class="" style="flex: 4;display: flex;align-items: center;">
|
<view class="" style="flex: 4;display: flex;align-items: center;">
|
||||||
验证码 <u--input style="margin-left: 40rpx;" border="none" v-model="formData.code">
|
<text
|
||||||
|
style="text-align-last: justify;width:108rpx;margin-right:40rpx;">验证码</text>
|
||||||
|
<u--input border="none" v-model="formData.code" placeholder="请输入验证码">
|
||||||
</u--input>
|
</u--input>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="flex: 1;">
|
<view class="" style="flex: 1;">
|
||||||
<u-button @click="handleVerify" type="success" shape="circle" :plain="true"
|
<u-button @click="handleVerify" type="success" shape="circle" :plain="true"
|
||||||
:text="text"></u-button>
|
:text="text" style="height: 60rpx;"></u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -258,7 +261,7 @@
|
|||||||
<text style="color: #35BD3E;" @click="getConfig">《入驻协议》</text>
|
<text style="color: #35BD3E;" @click="getConfig">《入驻协议》</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn" v-if='step!=3'>
|
<view class="submit-btn" v-if='step!=3'>
|
||||||
<u-button text="添加店铺" @click="submit" shape='circle'
|
<u-button :text="step==1?'添加店铺':'资质认证'" @click="submit" shape='circle'
|
||||||
color=" linear-gradient( 132deg, #38BE41 0%, #20B128 100%)"></u-button>
|
color=" linear-gradient( 132deg, #38BE41 0%, #20B128 100%)"></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -66,12 +66,11 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view :style="viewColor">
|
<view :style="viewColor" style="position: relative;z-index: 1000000;background-color: #fff;">
|
||||||
<form @submit="formSubmit" report-submit='true'>
|
<form @submit="formSubmit" report-submit='true'>
|
||||||
<view class='addAddress'>
|
<view class='addAddress'>
|
||||||
<view class='list'>
|
<view class='list'>
|
||||||
|
<view v-if="userAddress && userAddress.detail != ''" class="sel_addr_update-wrap">
|
||||||
<view v-if="userAddress.detail != ''" class="sel_addr_update-wrap">
|
|
||||||
<view class="sel_addr_update">
|
<view class="sel_addr_update">
|
||||||
<view class="sel_addr_wrap-l">
|
<view class="sel_addr_wrap-l">
|
||||||
<view class="sel_addr_wrap-l-addr line1">{{userAddress.detail}}</view>
|
<view class="sel_addr_wrap-l-addr line1">{{userAddress.detail}}</view>
|
||||||
@ -170,6 +169,10 @@
|
|||||||
getGeocoder
|
getGeocoder
|
||||||
} from '@/api/store.js';
|
} from '@/api/store.js';
|
||||||
import authorize from '@/components/Authorize';
|
import authorize from '@/components/Authorize';
|
||||||
|
import permission from '@/utils/permission';
|
||||||
|
import {
|
||||||
|
AUTH_EXPIRE_TIME
|
||||||
|
} from "@/config/app.js"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
areaWindow,
|
areaWindow,
|
||||||
@ -205,7 +208,7 @@
|
|||||||
longitude: '',
|
longitude: '',
|
||||||
detail: '', //四川省泸州市龙马潭区龙门大道15号
|
detail: '', //四川省泸州市龙马潭区龙门大道15号
|
||||||
location: '', // 经纬度
|
location: '', // 经纬度
|
||||||
|
timer: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -233,11 +236,18 @@
|
|||||||
this.isShowAuth = true
|
this.isShowAuth = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
// if (this.timer) clearInterval(this.timer);
|
||||||
|
// this.timer = setInterval(() => {
|
||||||
|
// console.log(new Date().getSeconds())
|
||||||
|
// }, 1000)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// 选择地址
|
// 选择地址
|
||||||
handleToChoose() {
|
async handleToChoose() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/select_address_n/select_address_n",
|
url: "/pages/select_address_n/select_address_n",
|
||||||
@ -251,15 +261,78 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
|
let result = await that.$store.dispatch("permission/requestPermissions", 'ACCESS_FINE_LOCATION');
|
||||||
|
console.log('权限状态:' + result);
|
||||||
|
if (result != -1) {
|
||||||
|
console.log('允许设置...');
|
||||||
|
uni.removeStorageSync('expireTime');
|
||||||
|
const isOpen = permission.isOpenGps();
|
||||||
|
if (isOpen) {
|
||||||
|
that.getLocation();
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您未开启GPS定位,可能导致不能获取准确定位,是否继续',
|
||||||
|
confirmText: "继续",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
that.getLocation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const expireTime = uni.getStorageSync('expireTime');
|
||||||
|
console.log('过期时间:' + expireTime);
|
||||||
|
if (expireTime) {
|
||||||
|
if ((expireTime + AUTH_EXPIRE_TIME) < +new Date()) {
|
||||||
|
console.log('时间过期了....')
|
||||||
|
uni.removeStorageSync('expireTime');
|
||||||
|
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '操作权限已被拒绝,请手动前往设置',
|
||||||
|
confirmText: "立即设置",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
permission.gotoAppSetting();
|
||||||
|
} else {
|
||||||
|
// 设置过期时间
|
||||||
|
console.log('重置过期时间');
|
||||||
|
uni.setStorageSync('expireTime', +new Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('时间还没过期....');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 设置一个过期时间
|
||||||
|
uni.setStorageSync('expireTime', +new Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
|
||||||
|
// 打开地图选择地址
|
||||||
|
getLocation() {
|
||||||
|
let that = this;
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.userAddress.detail = res.name
|
that.userAddress.detail =
|
||||||
that.userAddress.address_detail = res.address;
|
res.name
|
||||||
that.location = `${res.latitude},${res.longitude}`;;
|
that.userAddress
|
||||||
|
.address_detail = res
|
||||||
|
.address;
|
||||||
|
that.location =
|
||||||
|
`${res.latitude},${res.longitude}`;;
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// #endif
|
|
||||||
},
|
},
|
||||||
|
|
||||||
OnChangeAddress(address) {
|
OnChangeAddress(address) {
|
||||||
|
@ -127,16 +127,16 @@ const actions = {
|
|||||||
commit(state.mapping[permissionID].methods, false)
|
commit(state.mapping[permissionID].methods, false)
|
||||||
} else {
|
} else {
|
||||||
commit(state.mapping[permissionID].methods, true)
|
commit(state.mapping[permissionID].methods, true)
|
||||||
uni.showModal({
|
// uni.showModal({
|
||||||
title: '提示',
|
// title: '提示',
|
||||||
content: '操作权限已被拒绝,请手动前往设置',
|
// content: '操作权限已被拒绝,请手动前往设置',
|
||||||
confirmText: "立即设置",
|
// confirmText: "立即设置",
|
||||||
success: (res) => {
|
// success: (res) => {
|
||||||
if (res.confirm) {
|
// if (res.confirm) {
|
||||||
dispatch('gotoAppPermissionSetting')
|
// dispatch('gotoAppPermissionSetting')
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
if (viewObj) viewObj.close()
|
if (viewObj) viewObj.close()
|
||||||
resolve(result);
|
resolve(result);
|
||||||
|
@ -241,13 +241,22 @@ function gotoAppPermissionSetting() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isOpenGps() {
|
||||||
|
var context = plus.android.importClass("android.content.Context");
|
||||||
|
var locationManager = plus.android.importClass("android.location.LocationManager");
|
||||||
|
var main = plus.android.runtimeMainActivity();
|
||||||
|
var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
|
||||||
|
return mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER);
|
||||||
|
}
|
||||||
|
|
||||||
const permission = {
|
const permission = {
|
||||||
get isIOS() {
|
get isIOS() {
|
||||||
return typeof isIOS === 'boolean' ? isIOS : (isIOS = uni.getSystemInfoSync().platform === 'ios')
|
return typeof isIOS === 'boolean' ? isIOS : (isIOS = uni.getSystemInfoSync().platform === 'ios')
|
||||||
},
|
},
|
||||||
requestIOS: requestIOS,
|
requestIOS: requestIOS,
|
||||||
requestAndroid: requestAndroid,
|
requestAndroid: requestAndroid,
|
||||||
gotoAppSetting: gotoAppPermissionSetting
|
gotoAppSetting: gotoAppPermissionSetting,
|
||||||
|
isOpenGps
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = permission
|
module.exports = permission
|
@ -33,6 +33,30 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*判断app授权是否超时
|
||||||
|
key:授权值
|
||||||
|
time:过期时间
|
||||||
|
*/
|
||||||
|
isOverTime: (key, time) => {
|
||||||
|
let FLAG = false;
|
||||||
|
const AUTH_TYPE = uni.getStorageSync(key);
|
||||||
|
// 当前时间
|
||||||
|
const CURR_TIME = +new Date();
|
||||||
|
|
||||||
|
if (!AUTH_TYPE) {
|
||||||
|
uni.setStorageSync(key, time + CURR_TIME);
|
||||||
|
FLAG = false;
|
||||||
|
} else {
|
||||||
|
// 判断两天时间是否过期
|
||||||
|
if (CURR_TIME < AUTH_TYPE) { //未过期
|
||||||
|
FLAG = false;
|
||||||
|
} else {
|
||||||
|
FLAG = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FLAG;
|
||||||
|
},
|
||||||
|
|
||||||
//复制
|
//复制
|
||||||
uniCopy: ({
|
uniCopy: ({
|
||||||
content,
|
content,
|
||||||
@ -866,7 +890,6 @@ export default {
|
|||||||
if (sp === undefined) sp = [];
|
if (sp === undefined) sp = [];
|
||||||
for (var i = 0; i < list.length; i++) {
|
for (var i = 0; i < list.length; i++) {
|
||||||
let product = sp.find(item => item.product_id == list[i].product_id);
|
let product = sp.find(item => item.product_id == list[i].product_id);
|
||||||
console.log(product);
|
|
||||||
if (!product)
|
if (!product)
|
||||||
sp.push(list[i]);
|
sp.push(list[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user