mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
# 2022-02-18
### 1.3.6 开源社区版: 无 ### 0.1.9 会员专业版: 【调整】前端【activity】目录进行拆包处理。减少主包大小。 【调整】取消地址坐标录入框,设置隐藏data。 【优化】地址地图选择界面增加搜索功能。 【优化】优化地址地图选择界面腾讯地图调用key被写死的问题。#I4TYLP 【修复】修复【首页商品组件】【首页Tab商品选项卡】组件无内容图示显示错误的问题。#I4U6Z4 【新增】webapi下【CommonController】【GetConfigV2】方法增加地图key返回。 【修复】修复地址列表页面点击修改按钮可能会出现不跳转的情况。#I4U3CH 【修复】修复商品分类选择【一级大图】显示失效的问题。 【优化】优化商品详情轮播图比例伸缩问题,取消轮播图圆角。#I4T247 【优化】调整本店推荐下列表商品名称因不满2行导致伸缩的 问题。#I4T0IK
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="order-none" v-else>
|
||||
<image class="order-none-img" src="/static/images/order.png" mode=""></image>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无" mode="list"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</u-grid>
|
||||
</view>
|
||||
<view class="order-none" v-else>
|
||||
<image class="order-none-img" src="/static/images/order.png" mode=""></image>
|
||||
<u-empty :icon="$globalConstVars.apiFilesUrl+'/static/images/empty/order.png'" icon-size="150" text="暂无" mode="list"></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<!--幻灯片-->
|
||||
<view class="coreshop-full-screen-banner-swiper-box">
|
||||
<u-swiper height="325" :list="goodsInfo.album" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
<u-swiper height="calc(750rpx * 6 / 6)" radius="0" :list="goodsInfo.album" :autoplay="autoplay" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
</view>
|
||||
|
||||
<!--限时秒杀-->
|
||||
@@ -214,7 +214,7 @@
|
||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
||||
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10" style="min-height: 34px;">{{items.name}}</view>
|
||||
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
|
||||
{{items.price}}元
|
||||
</view>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<!--幻灯片-->
|
||||
<view class="coreshop-full-screen-banner-swiper-box">
|
||||
<u-swiper height="325" :list="goodsInfo.album" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
<u-swiper height="calc(750rpx * 6 / 6)" radius="0" :list="goodsInfo.album" :autoplay="autoplay" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
</view>
|
||||
|
||||
<!--限时秒杀-->
|
||||
@@ -254,7 +254,7 @@
|
||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
||||
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
|
||||
<view class="u-line-1-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2" style="height: 32px;">{{items.name}}</view>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10" style="min-height: 34px;">{{items.name}}</view>
|
||||
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
|
||||
{{items.price}}元
|
||||
</view>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<!--幻灯片-->
|
||||
<view class="coreshop-full-screen-banner-swiper-box">
|
||||
<u-swiper height="325" :list="goodsInfo.album" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
<u-swiper height="calc(750rpx * 6 / 6)" radius="0" :list="goodsInfo.album" :autoplay="autoplay" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
</view>
|
||||
|
||||
<!--限时秒杀-->
|
||||
@@ -218,7 +218,7 @@
|
||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
||||
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10" style="min-height: 34px;">{{items.name}}</view>
|
||||
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
|
||||
{{items.price}}元
|
||||
</view>
|
||||
|
||||
@@ -9,20 +9,18 @@
|
||||
</u-navbar>
|
||||
|
||||
<view class="coreshop-padding-10" v-if="CateStyle==1">
|
||||
<u-row gutter="16">
|
||||
<u-col span="12" v-for="(item,index) in tabbar" :key="index" @click="goClass(item.id)">
|
||||
<u--image width="100%" height="125px" :src="item.imageUrl"></u--image>
|
||||
<view class="coreshop-text-center coreshop-padding-top-30 coreshop-padding-bottom-30">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<view v-for="(item,index) in tabbar" :key="index" @click="goClass(item.id)">
|
||||
<u--image width="100%" height="125px" :src="item.imageUrl"></u--image>
|
||||
<view class="coreshop-text-center coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-padding-10" v-if="CateStyle==2">
|
||||
<u-row gutter="16">
|
||||
<u-col span="4" v-for="(item,index) in tabbar" :key="index" @click="goClass(item.id)">
|
||||
<u--image width="100%" height="80px" :src="item.imageUrl"></u--image>
|
||||
<view class="coreshop-text-center coreshop-padding-top-30 coreshop-padding-bottom-30 coreshop-font-sm">
|
||||
<view class="coreshop-text-center coreshop-padding-top-15 coreshop-padding-bottom-15 coreshop-font-sm">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</u-col>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</u-navbar>
|
||||
<!--幻灯片-->
|
||||
<view class="coreshop-full-screen-banner-swiper-box">
|
||||
<u-swiper height="325" :list="goodsInfo.album" :autoplay="autoplay" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
<u-swiper height="calc(750rpx * 6 / 6)" radius="0" :list="goodsInfo.album" :autoplay="autoplay" indicator indicatorMode="line" circular @click="clickImg"></u-swiper>
|
||||
</view>
|
||||
<!--限时秒杀-->
|
||||
<view class="coreshop-limited-seckill-box coreshop-bg-red">
|
||||
@@ -167,7 +167,7 @@
|
||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
||||
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2">{{items.name}}</view>
|
||||
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10" style="min-height: 34px;">{{items.name}}</view>
|
||||
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
|
||||
{{items.price}}元
|
||||
</view>
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
<!-- #endif -->
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="经度" prop="longitude" borderBottom>
|
||||
<!--<u-form-item label="经度" prop="longitude" borderBottom>
|
||||
<u--input v-model="form.longitude" disabled placeholder="请选择街道获取经度" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="纬度" prop="latitude" disabled borderBottom>
|
||||
<u--input v-model="form.latitude" disabled placeholder="请选择街道获取纬度" />
|
||||
</u-form-item>
|
||||
</u-form-item>-->
|
||||
|
||||
<u-form-item label="详细地址" prop="address" borderBottom clearValidate>
|
||||
<u--textarea v-model="form.address" placeholder="请输入内容"></u--textarea>
|
||||
@@ -369,7 +369,7 @@
|
||||
this.$u.toast('请先获取省市区信息');
|
||||
return false;
|
||||
} else {
|
||||
this.$u.route('/pages/member/address/map/map', { pickerValue: this.pickerValue, });
|
||||
this.$u.route('/pages/member/address/map/map', { pickerValue: this.pickerValue, areaId: this.areaId, longitude: this.form.longitude, latitude: this.form.latitude });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,18 +12,21 @@
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<view v-if="list.length">
|
||||
<view class="item" v-for="(item, key) in list" :key="key">
|
||||
<view class="top" @click="isSelect(item)">
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="phone">{{ item.mobile }}</view>
|
||||
<view class="tag">
|
||||
<text class="red" v-if="item.isDefault">默认</text>
|
||||
<view class="item coreshop-display-flex coreshop-flex-nowrap" v-for="(item, key) in list" :key="key">
|
||||
<view @click="isSelect(item)">
|
||||
<view class="top">
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="phone">{{ item.mobile }}</view>
|
||||
<view class="tag">
|
||||
<text class="red" v-if="item.isDefault">默认</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
{{item.areaName }} {{item.street}} {{item.address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom" @click="isSelect(item)">
|
||||
{{item.areaName }} {{item.street}} {{item.address}}
|
||||
<u-icon name="edit-pen-fill" :size="20" color="#999999" v-show="type != 'order'" @click="toEdit(item.id)"></u-icon>
|
||||
</view>
|
||||
<u-icon name="edit-pen-fill" :size="20" color="#999999" v-show="type != 'order'" @click="toEdit(item.id)"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 无数据时默认显示 -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.controls-location { height: 30px; width: 30px; position: absolute; }
|
||||
.server-place { position: fixed; left: 0; top: 0; height: 100vh; width: 100%; background: #ffffff; z-index: 999;
|
||||
.map-tools { position: fixed; width: 100%; bottom: 30rpx; left: 0; display: flex; justify-content: center; align-items: center; flex-direction: column;
|
||||
.my-location { width: 90%; margin: 0 auto; height: 120rpx; box-shadow: 0px 3px 20px rgba(0, 0, 0, 0.2); background: #fff; border-radius: 20rpx; display: flex; justify-content: flex-start; align-items: center; overflow: hidden;
|
||||
.my-location { width: 90%; margin: 0 auto; height: 120rpx; box-shadow: 0px 3px 20px rgba(0, 0, 0, 0.2); background: #fff; border-radius: 20rpx; display: flex; justify-content: flex-start; align-items: center; overflow: hidden; display: none;
|
||||
.left { background: #3384ff; height: 120rpx; width: 120rpx; }
|
||||
.right { margin-left: 20rpx; color: #111; display: flex; justify-content: center; align-items: flex-start; flex-direction: column;
|
||||
.title { font-size: 28rpx; font-weight: bold; }
|
||||
@@ -18,4 +18,5 @@
|
||||
.sure { margin-top: 15rpx; color: #FFFFFF; background: #212121; font-weight: blod; font-size: 32rpx; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.searchBox { width: calc(100% - 20px); position: absolute; z-index: 1000; margin: 0 10px; }
|
||||
|
||||
@@ -10,6 +10,50 @@
|
||||
<view slot="right">
|
||||
</view>
|
||||
</u-navbar>
|
||||
|
||||
<view class="searchBox">
|
||||
<u-form-item :borderBottom="false">
|
||||
<coreshop-select v-model="show" mode="mutil-column-auto" :list="pickerList" :default-value="pickerIndex" @confirm="onConfirm"></coreshop-select>
|
||||
<!-- 注意:由于兼容性差异,如果需要使用前后插槽,nvue下需使用u--input,非nvue下需使用u-input -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<u-input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||
<template slot="suffix">
|
||||
<u-button text="选择" type="success" size="mini" @click="show = true"></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<u--input :value="pickerValue" type="select" disabled placeholder="请选择省市区区域">
|
||||
<template slot="suffix">
|
||||
<u-button text="选择" type="success" size="mini" @click="show = true"></u-button>
|
||||
</template>
|
||||
</u--input>
|
||||
<!-- #endif -->
|
||||
</u-form-item>
|
||||
|
||||
|
||||
<u-form-item :borderBottom="false">
|
||||
<!-- 注意:由于兼容性差异,如果需要使用前后插槽,nvue下需使用u--input,非nvue下需使用u-input -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<view class="coreshop-bg-white">
|
||||
<u-input v-model="keywords" type="text" placeholder="输入街道信息">
|
||||
<template slot="suffix">
|
||||
<u-button text="查询" type="primary" size="mini" @click="searchKeyWord"></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<u--input v-model="keywords" type="text" placeholder="输入街道信息">
|
||||
<template slot="suffix">
|
||||
<u-button text="查询" type="primary" size="mini" @click="searchKeyWord"></u-button>
|
||||
</template>
|
||||
</u--input>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</u-form-item>
|
||||
|
||||
</view>
|
||||
|
||||
<map id='map'
|
||||
ref='map'
|
||||
v-bind:style="{height: mapH + 'px'}"
|
||||
@@ -45,9 +89,7 @@
|
||||
|
||||
<script>
|
||||
var QQMapWX = require('./qqmap-wx-jssdk.min.js')
|
||||
var qqmapsdk = new QQMapWX({
|
||||
key: 'SJTBZ-6H5C2-3F5UG-CCJIS-RZPXJ-I6FBY'
|
||||
})
|
||||
var qqmapsdk;
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -62,7 +104,7 @@
|
||||
latitude: '',
|
||||
address: ''
|
||||
},
|
||||
|
||||
rules: {},
|
||||
// cover-image的默认 超出屏幕外 不然会有闪烁出现
|
||||
controlsLeft: 1000,
|
||||
controlsTop: 1000,
|
||||
@@ -77,16 +119,108 @@
|
||||
'longitude': 0,
|
||||
'latitude': 0
|
||||
}],
|
||||
|
||||
qqMapKey: '',
|
||||
keywords: '',
|
||||
pickerValue: '',
|
||||
show: false,
|
||||
pickerList: this.$db.get("areaList"),
|
||||
province: this.$db.get("areaList"),
|
||||
pickerIndex: [0, 0, 0], // picker索引值
|
||||
provinceKey: -1,//省份id
|
||||
cityKey: -1,//市id
|
||||
areaKey: -1,//区域id
|
||||
areaId: 0,
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e);
|
||||
this.getLocation()
|
||||
this.pickerValue = e.pickerValue;
|
||||
this.areaId = e.areaId;
|
||||
|
||||
this.init();
|
||||
|
||||
this.qqMapKey = this.$store.state.config.qqMapKey;
|
||||
qqmapsdk = new QQMapWX({
|
||||
key: this.qqMapKey
|
||||
})
|
||||
var longitude = e.longitude;
|
||||
var latitude = e.latitude;
|
||||
if (longitude && latitude) {
|
||||
this.getOldLocation(longitude, latitude);
|
||||
} else {
|
||||
this.searchAddressName(this.pickerValue);
|
||||
}
|
||||
//this.getLocation()
|
||||
|
||||
this.initMapH()
|
||||
this.initPositionIcon();
|
||||
},
|
||||
methods: {
|
||||
onConfirm(e) {
|
||||
let provinceName = e[0].label;
|
||||
let cityName = e[1].label;
|
||||
let countyName = e[2].label;
|
||||
this.pickerValue = e[0].label + " " + e[1].label + " " + e[2].label
|
||||
let data = {
|
||||
provinceName: provinceName,
|
||||
cityName: cityName,
|
||||
countyName: countyName
|
||||
}
|
||||
this.$u.api.getAreaId(data).then(res => {
|
||||
if (res.status) {
|
||||
this.areaId = res.data;
|
||||
this.init();
|
||||
this.searchAddressName(this.pickerValue);
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '地区选择出现问题,请重新选择地区',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
init() {
|
||||
this.getFullPath(this.areaId, this.province);
|
||||
this.pickerIndex = [this.provinceKey, this.cityKey, this.areaKey];
|
||||
},
|
||||
//倒查城市信息
|
||||
getFullPath(id, data) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (id == data[i].value) {
|
||||
if (!data[i].children) {
|
||||
this.areaKey = i;
|
||||
return true;
|
||||
} else if (data[i].hasOwnProperty("children")) {
|
||||
if (data[i].children[0] && !data[i].children[0].children) {
|
||||
this.cityKey = i;
|
||||
return true;
|
||||
} else {
|
||||
this.provinceKey = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (data[i].hasOwnProperty("children")) {
|
||||
if (data[i].children[0] !== undefined) {
|
||||
if (data[i].children[0].hasOwnProperty("children")) {
|
||||
this.provinceKey = i;
|
||||
} else {
|
||||
this.cityKey = i;
|
||||
}
|
||||
}
|
||||
if (typeof data[i].children != 'undefined') {
|
||||
var res = this.getFullPath(id, data[i].children);
|
||||
if (res) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化地图中心位置的定位图片
|
||||
initPositionIcon() {
|
||||
@@ -111,7 +245,7 @@
|
||||
clickable: false
|
||||
}
|
||||
this.controls.push(controls)
|
||||
console.log(this.controls, '==========');
|
||||
//console.log(this.controls, '==========');
|
||||
// #endif
|
||||
}, 100)
|
||||
},
|
||||
@@ -123,7 +257,7 @@
|
||||
geocode: true,
|
||||
success: function (res) {
|
||||
this_.initMap(res)
|
||||
console.log(res);
|
||||
//console.log(res);
|
||||
},
|
||||
fail: function (e) {
|
||||
uni.showToast({
|
||||
@@ -133,7 +267,15 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询现在的位置
|
||||
getOldLocation(longitude, latitude) {
|
||||
let this_ = this;
|
||||
var res = {
|
||||
longitude: longitude,
|
||||
latitude: latitude
|
||||
}
|
||||
this_.initMap(res)
|
||||
},
|
||||
// 初始化我的位置
|
||||
async initMap(res) {
|
||||
this.longitude = res.longitude;
|
||||
@@ -153,7 +295,7 @@
|
||||
latitude: res.latitude,
|
||||
address: await this.getAddressName(res)
|
||||
})
|
||||
console.log('当前位置:' + res.latitude + '|' + res.longitude);
|
||||
//console.log('当前位置:' + res.latitude + '|' + res.longitude);
|
||||
},
|
||||
|
||||
// 监听地图位置变化
|
||||
@@ -166,7 +308,6 @@
|
||||
that.mapCtx.getCenterLocation({
|
||||
success: res => {
|
||||
this.checkMap(res)
|
||||
console.log(res);
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
@@ -198,7 +339,7 @@
|
||||
|
||||
// #ifdef H5
|
||||
// ======================== jsonp跨域 ========================
|
||||
const KEY = 'SJTBZ-6H5C2-3F5UG-CCJIS-RZPXJ-I6FBY'
|
||||
const KEY = this.qqMapKey;
|
||||
let locationObj = addressObj.latitude + ',' + addressObj.longitude
|
||||
let url = 'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
|
||||
this.$jsonp(url, {
|
||||
@@ -213,7 +354,7 @@
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
console.log(addressObj, '======================');
|
||||
//console.log(addressObj, '======================');
|
||||
qqmapsdk.reverseGeocoder({
|
||||
location: {
|
||||
latitude: addressObj.latitude,
|
||||
@@ -233,20 +374,63 @@
|
||||
})
|
||||
|
||||
},
|
||||
searchKeyWord() {
|
||||
var _this = this;
|
||||
if (_this.keywords) {
|
||||
var keyword = _this.pickerValue + ' ' + _this.keywords;
|
||||
this.searchAddressName(keyword);
|
||||
} else {
|
||||
this.$u.toast("请输入需要查询的地名");
|
||||
}
|
||||
},
|
||||
searchAddressName(keyword) {
|
||||
this.keywords = '';
|
||||
var _this = this;
|
||||
// #ifdef APP-PLUS
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
qqmapsdk.geocoder({
|
||||
address: keyword,
|
||||
output: 'jsonp',
|
||||
success: (e) => {
|
||||
console.log(e);
|
||||
if (e.status == 0) {
|
||||
let res = {
|
||||
longitude: e.result.location.lng,
|
||||
latitude: e.result.location.lat,
|
||||
}
|
||||
_this.initMap(res);
|
||||
} else {
|
||||
_this.$u.toast(e.message);
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
if (err.status != 0) {
|
||||
_this.$u.toast(err.message);
|
||||
}
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
// 计算地图的高度
|
||||
initMapH() {
|
||||
// #ifdef APP-PLUS
|
||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight - 210;
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight - 170;
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight - 210;
|
||||
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||
// #endif
|
||||
},
|
||||
// 移动到我的位置
|
||||
@@ -255,7 +439,7 @@
|
||||
},
|
||||
// 提交
|
||||
submitAdress() {
|
||||
console.log(this.addressObj);
|
||||
//console.log(this.addressObj);
|
||||
this.controls = []
|
||||
//setTimeout(() => {
|
||||
// this.$emit('updateAddress', this.addressObj)
|
||||
@@ -276,12 +460,12 @@
|
||||
beforePage.$vm.form.longitude = this.addressObj.longitude;
|
||||
beforePage.$vm.form.latitude = this.addressObj.latitude;
|
||||
beforePage.$vm.form.street = this.addressObj.address;
|
||||
beforePage.$vm.form.pickerValue = this.pickerValue;
|
||||
beforePage.$vm.form.areaId = this.areaId;
|
||||
// #endif
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -156,6 +156,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
agentStore = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.AgentStore).ObjectToInt(2); //是否开启代理店铺
|
||||
}
|
||||
|
||||
var qqMapKey = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.QqMapKey); //腾讯地图key
|
||||
|
||||
var model = new
|
||||
{
|
||||
@@ -200,7 +201,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
isShowAgentPortal,
|
||||
agentNotes,
|
||||
agentAgreement,
|
||||
agentStore
|
||||
agentStore,
|
||||
qqMapKey
|
||||
};
|
||||
jm.data = model;
|
||||
return jm;
|
||||
|
||||
Reference in New Issue
Block a user