优化会员,商品,下单
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
:style="{'background':c.backColor,'color':c.backColor}">
|
||||
<image class="fivecontent_item_boxitemlefttowimage" v-if="c.shareImg"
|
||||
:src="c.shareImg" mode="aspectFill"></image>
|
||||
<text class="fivecontent_item_boxitemlefttowtext">{{c.name}}</text>
|
||||
<text class="fivecontent_item_boxitemlefttowtext">{{c.name || ''}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexboxitemleftthere flex-colum-start">
|
||||
@@ -338,66 +338,19 @@
|
||||
uni.$u.debounce(store.scrollTop = res.scrollTop, 500)
|
||||
});
|
||||
onShow(async () => {
|
||||
|
||||
})
|
||||
onMounted(async () => {
|
||||
await proxy.$onLaunched;
|
||||
if (uni.cache.get('shopId')) {
|
||||
showindex.value = 'shopIndex'
|
||||
await storeuser.actionsAPIuser()
|
||||
} else {
|
||||
showindex.value = 'index'
|
||||
hometop()
|
||||
init_fn()
|
||||
showindex.value = 'index'
|
||||
// 获取初始定位高度
|
||||
}
|
||||
})
|
||||
onMounted(async () => {
|
||||
try {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: async (res) => {
|
||||
let successres = await APIgeocodelocation({
|
||||
lng: res.longitude,
|
||||
lat: res.latitude,
|
||||
})
|
||||
if (successres) {
|
||||
let datastorage = {
|
||||
country: successres.addressComponent.country, // "中国"
|
||||
province: successres.addressComponent
|
||||
.province, //province: "陕西省"
|
||||
address: successres.addressComponent.city, //district: "西安市"
|
||||
district: successres.addressComponent.district, //district: "未央区"
|
||||
lng: res.longitude,
|
||||
lat: res.latitude,
|
||||
}
|
||||
uni.cache.set('getLocationstorage', datastorage);
|
||||
// 登录
|
||||
proxy.$isResolve()
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
} catch (error) {
|
||||
try {
|
||||
let successres = await APIgeocodelocation({
|
||||
lng: '',
|
||||
lat: '',
|
||||
})
|
||||
if (successres) {
|
||||
let datastorage = {
|
||||
country: successres.addressComponent.country, // "中国"
|
||||
province: successres.addressComponent
|
||||
.province, //province: "陕西省"
|
||||
address: successres.addressComponent.city, //district: "西安市"
|
||||
district: successres.addressComponent.district, //district: "未央区"
|
||||
lng: res.longitude,
|
||||
lat: res.latitude,
|
||||
}
|
||||
uni.cache.set('getLocationstorage', datastorage);
|
||||
proxy.$isResolve()
|
||||
}
|
||||
} catch (error) {
|
||||
proxy.$isResolve()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
|
||||
@@ -42,9 +42,8 @@
|
||||
import {
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
const shopExtend = uni.cache.get('shopUserInfo')? uni.cache.get('shopUserInfo').shopExtendList[0] : ''
|
||||
const shopExtend = uni.cache.get('shopUserInfo') ? uni.cache.get('shopUserInfo').shopExtendList[0] : ''
|
||||
const scanCodehandle = async (i) => {
|
||||
console.log(11)
|
||||
const store = productStore();
|
||||
await store.scanCodeactions()
|
||||
}
|
||||
@@ -64,8 +63,7 @@
|
||||
}
|
||||
return null;
|
||||
}
|
||||
onMounted(() => {
|
||||
})
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user