Browse Source

调整

master
梁欣 1 year ago
parent
commit
4bc7ececf7
  1. 4
      api/upload.js
  2. 2
      manifest.json
  3. 20
      pages/index/index.vue
  4. 10
      pages/shop/list.vue
  5. 8
      pages/user/index.vue

4
api/upload.js

@ -25,8 +25,8 @@ export const goods_detail_image = (files) => {
const fileIds = []
Promise.all(
files.map(async file => {
const {data: {fileInfo: {file_id}}} = await ossUploadFile(file)
fileIds.push(file_id)
const {data: {fileInfo: {preview_url}}} = await ossUploadFile(file)
fileIds.push(preview_url)
})
).then(() => {
resolve(fileIds)

2
manifest.json

@ -103,7 +103,7 @@
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "YYYBZ-QOAH4-2Y2UW-XJOUU-RNSVZ-UVFC4"
"key" : "RDABZ-IF7AB-L4AUO-JHMX3-GBSGE-KIF53"
}
}
},

20
pages/index/index.vue

@ -301,7 +301,7 @@
<view class="settle-btn" v-if="showSettle">
<view class="btn">
<text @click="toSettle">我是商家申请免费入驻互动平台</text>
<u-icon name="close-circle-fill" color="white" @click="showSettle = false"/>
<u-icon name="close-circle-fill" color="white" @click="showSettle = false" size="36rpx"/>
</view>
</view>
</view>
@ -436,6 +436,9 @@ export default {
//_this.getGoodsList()
_this.getLocation(res => {
_this.flowList = []
console.log('res.longitude', res.longitude)
uni.setStorageSync('longitude', res.longitude);
uni.setStorageSync('latitude', res.latitude);
_this.getDWList(res.longitude, res.latitude);
//_this.getGoodsList(res.longitude, res.latitude)
@ -631,6 +634,7 @@ export default {
this.longitude = longitude
this.latitude = latitude
uni.setStorageSync('city', result.data.ads.city);
this.getGoodsList()
})
@ -675,6 +679,9 @@ export default {
setTimeout(() => {
//
app.getLocation((res) => {
console.log('res.longitude', res.longitude)
uni.setStorageSync('longitude', res.longitude);
uni.setStorageSync('latitude', res.latitude);
app.getGoodsList(res.longitude, res.latitude)
app.getDWList(res.longitude, res.latitude);
})
@ -687,6 +694,9 @@ export default {
console.log('222')
//
app.getLocation((res) => {
console.log('res.longitude', res.longitude)
uni.setStorageSync('longitude', res.longitude);
uni.setStorageSync('latitude', res.latitude);
app.getShopList(res.longitude, res.latitude)
app.getDWList(res.longitude, res.latitude);
})
@ -1061,9 +1071,9 @@ page {
.settle-btn {
position: fixed;
bottom: 130rpx;
left: calc(50% - 240rpx);
left: calc(50% - 310rpx);
z-index: 11;
width: 480rpx;
width: 640rpx;
.btn {
margin: auto;
@ -1071,10 +1081,10 @@ page {
display: flex;
align-items: center;
justify-content: center;
padding: 10rpx 20rpx;
padding: 20rpx 40rpx;
color: #ffffff;
text-align: center;
font-size: 25rpx;
font-size: 34rpx;
border-radius: 999rpx;
text {

10
pages/shop/list.vue

@ -94,6 +94,8 @@ export default {
},
async onLoad(options) {
this.options = options
this.latitude = uni.getStorageSync('latitude');
this.longitude = uni.getStorageSync('longitude');
// await this.getLocation()
await this.getChildCategory(options.shopId)
await this.getShopList(1)
@ -146,11 +148,15 @@ export default {
uni.getLocation({
type: 'wgs84',
success: (res) => {
console.log('getLocation', res)
_this.latitude = parseFloat(res[0].latitude)
_this.longitude = parseFloat(res[0].longitude)
resolve(res)
},
fail() {
fail(res) {
console.log('getLocation fail', res)
reject()
_this.$toast('获取定位失败,请点击右下角按钮重新尝试定位')
// _this.$toast('')
},
complete: res => {
console.log(res)

8
pages/user/index.vue

@ -120,10 +120,10 @@
</view>
<view v-if="isLogin&&userInfo.is_info==1" @click="handleLogout()"
style="font-size: 18px;width: 90%;text-align: center;padding: 20rpx 0;text-align: center;background: linear-gradient(to top, #0E001F, #7B0373 );margin: 200rpx auto 0 ;color: #fff;border-radius: 40rpx;">
退出登录
</view>
<!-- <view v-if="isLogin&&userInfo.is_info==1" @click="handleLogout()"-->
<!-- style="font-size: 18px;width: 90%;text-align: center;padding: 20rpx 0;text-align: center;background: linear-gradient(to top, #0E001F, #7B0373 );margin: 200rpx auto 0 ;color: #fff;border-radius: 40rpx;">-->
<!-- 退出登录-->
<!-- </view>-->
</view>
<view slot="gFooter" class="gui-flex gui-rows gui-nowrap gui-space-between gui-align-items-end"
style="background: linear-gradient(to top, #0E001F, #7B0373 );padding-bottom: 100rpx;">

Loading…
Cancel
Save