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