mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 07:29:48 +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>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-none" v-else>
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
</u-grid>
|
</u-grid>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-none" v-else>
|
<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>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<!--幻灯片-->
|
<!--幻灯片-->
|
||||||
<view class="coreshop-full-screen-banner-swiper-box">
|
<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>
|
</view>
|
||||||
|
|
||||||
<!--限时秒杀-->
|
<!--限时秒杀-->
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
<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>
|
<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">
|
<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}}元
|
{{items.price}}元
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<!--幻灯片-->
|
<!--幻灯片-->
|
||||||
<view class="coreshop-full-screen-banner-swiper-box">
|
<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>
|
</view>
|
||||||
|
|
||||||
<!--限时秒杀-->
|
<!--限时秒杀-->
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
<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>
|
<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">
|
<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}}元
|
{{items.price}}元
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<!--幻灯片-->
|
<!--幻灯片-->
|
||||||
<view class="coreshop-full-screen-banner-swiper-box">
|
<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>
|
</view>
|
||||||
|
|
||||||
<!--限时秒杀-->
|
<!--限时秒杀-->
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
<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>
|
<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">
|
<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}}元
|
{{items.price}}元
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -9,20 +9,18 @@
|
|||||||
</u-navbar>
|
</u-navbar>
|
||||||
|
|
||||||
<view class="coreshop-padding-10" v-if="CateStyle==1">
|
<view class="coreshop-padding-10" v-if="CateStyle==1">
|
||||||
<u-row gutter="16">
|
<view v-for="(item,index) in tabbar" :key="index" @click="goClass(item.id)">
|
||||||
<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>
|
||||||
<u--image width="100%" height="125px" :src="item.imageUrl"></u--image>
|
<view class="coreshop-text-center coreshop-padding-top-10 coreshop-padding-bottom-10">
|
||||||
<view class="coreshop-text-center coreshop-padding-top-30 coreshop-padding-bottom-30">
|
{{item.name}}
|
||||||
{{item.name}}
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-col>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="coreshop-padding-10" v-if="CateStyle==2">
|
<view class="coreshop-padding-10" v-if="CateStyle==2">
|
||||||
<u-row gutter="16">
|
<u-row gutter="16">
|
||||||
<u-col span="4" v-for="(item,index) in tabbar" :key="index" @click="goClass(item.id)">
|
<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>
|
<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}}
|
{{item.name}}
|
||||||
</view>
|
</view>
|
||||||
</u-col>
|
</u-col>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</u-navbar>
|
</u-navbar>
|
||||||
<!--幻灯片-->
|
<!--幻灯片-->
|
||||||
<view class="coreshop-full-screen-banner-swiper-box">
|
<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>
|
||||||
<!--限时秒杀-->
|
<!--限时秒杀-->
|
||||||
<view class="coreshop-limited-seckill-box coreshop-bg-red">
|
<view class="coreshop-limited-seckill-box coreshop-bg-red">
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
|
||||||
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
|
<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>
|
<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">
|
<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}}元
|
{{items.price}}元
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -57,13 +57,13 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
</u-form-item>
|
</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--input v-model="form.longitude" disabled placeholder="请选择街道获取经度" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="纬度" prop="latitude" disabled borderBottom>
|
<u-form-item label="纬度" prop="latitude" disabled borderBottom>
|
||||||
<u--input v-model="form.latitude" disabled placeholder="请选择街道获取纬度" />
|
<u--input v-model="form.latitude" disabled placeholder="请选择街道获取纬度" />
|
||||||
</u-form-item>
|
</u-form-item>-->
|
||||||
|
|
||||||
<u-form-item label="详细地址" prop="address" borderBottom clearValidate>
|
<u-form-item label="详细地址" prop="address" borderBottom clearValidate>
|
||||||
<u--textarea v-model="form.address" placeholder="请输入内容"></u--textarea>
|
<u--textarea v-model="form.address" placeholder="请输入内容"></u--textarea>
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
this.$u.toast('请先获取省市区信息');
|
this.$u.toast('请先获取省市区信息');
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} 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>
|
</u-navbar>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view v-if="list.length">
|
<view v-if="list.length">
|
||||||
<view class="item" v-for="(item, key) in list" :key="key">
|
<view class="item coreshop-display-flex coreshop-flex-nowrap" v-for="(item, key) in list" :key="key">
|
||||||
<view class="top" @click="isSelect(item)">
|
<view @click="isSelect(item)">
|
||||||
<view class="name">{{ item.name }}</view>
|
<view class="top">
|
||||||
<view class="phone">{{ item.mobile }}</view>
|
<view class="name">{{ item.name }}</view>
|
||||||
<view class="tag">
|
<view class="phone">{{ item.mobile }}</view>
|
||||||
<text class="red" v-if="item.isDefault">默认</text>
|
<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>
|
</view>
|
||||||
<view class="bottom" @click="isSelect(item)">
|
<u-icon name="edit-pen-fill" :size="20" color="#999999" v-show="type != 'order'" @click="toEdit(item.id)"></u-icon>
|
||||||
{{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>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 无数据时默认显示 -->
|
<!-- 无数据时默认显示 -->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.controls-location { height: 30px; width: 30px; position: absolute; }
|
.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;
|
.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;
|
.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; }
|
.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;
|
.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; }
|
.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; }
|
.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 slot="right">
|
||||||
</view>
|
</view>
|
||||||
</u-navbar>
|
</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'
|
<map id='map'
|
||||||
ref='map'
|
ref='map'
|
||||||
v-bind:style="{height: mapH + 'px'}"
|
v-bind:style="{height: mapH + 'px'}"
|
||||||
@@ -45,9 +89,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
var QQMapWX = require('./qqmap-wx-jssdk.min.js')
|
var QQMapWX = require('./qqmap-wx-jssdk.min.js')
|
||||||
var qqmapsdk = new QQMapWX({
|
var qqmapsdk;
|
||||||
key: 'SJTBZ-6H5C2-3F5UG-CCJIS-RZPXJ-I6FBY'
|
|
||||||
})
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -62,7 +104,7 @@
|
|||||||
latitude: '',
|
latitude: '',
|
||||||
address: ''
|
address: ''
|
||||||
},
|
},
|
||||||
|
rules: {},
|
||||||
// cover-image的默认 超出屏幕外 不然会有闪烁出现
|
// cover-image的默认 超出屏幕外 不然会有闪烁出现
|
||||||
controlsLeft: 1000,
|
controlsLeft: 1000,
|
||||||
controlsTop: 1000,
|
controlsTop: 1000,
|
||||||
@@ -77,16 +119,108 @@
|
|||||||
'longitude': 0,
|
'longitude': 0,
|
||||||
'latitude': 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) {
|
onLoad(e) {
|
||||||
console.log(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.initMapH()
|
||||||
this.initPositionIcon();
|
this.initPositionIcon();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
initPositionIcon() {
|
||||||
@@ -111,7 +245,7 @@
|
|||||||
clickable: false
|
clickable: false
|
||||||
}
|
}
|
||||||
this.controls.push(controls)
|
this.controls.push(controls)
|
||||||
console.log(this.controls, '==========');
|
//console.log(this.controls, '==========');
|
||||||
// #endif
|
// #endif
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
@@ -123,7 +257,7 @@
|
|||||||
geocode: true,
|
geocode: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
this_.initMap(res)
|
this_.initMap(res)
|
||||||
console.log(res);
|
//console.log(res);
|
||||||
},
|
},
|
||||||
fail: function (e) {
|
fail: function (e) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -133,7 +267,15 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 查询现在的位置
|
||||||
|
getOldLocation(longitude, latitude) {
|
||||||
|
let this_ = this;
|
||||||
|
var res = {
|
||||||
|
longitude: longitude,
|
||||||
|
latitude: latitude
|
||||||
|
}
|
||||||
|
this_.initMap(res)
|
||||||
|
},
|
||||||
// 初始化我的位置
|
// 初始化我的位置
|
||||||
async initMap(res) {
|
async initMap(res) {
|
||||||
this.longitude = res.longitude;
|
this.longitude = res.longitude;
|
||||||
@@ -153,7 +295,7 @@
|
|||||||
latitude: res.latitude,
|
latitude: res.latitude,
|
||||||
address: await this.getAddressName(res)
|
address: await this.getAddressName(res)
|
||||||
})
|
})
|
||||||
console.log('当前位置:' + res.latitude + '|' + res.longitude);
|
//console.log('当前位置:' + res.latitude + '|' + res.longitude);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 监听地图位置变化
|
// 监听地图位置变化
|
||||||
@@ -166,7 +308,6 @@
|
|||||||
that.mapCtx.getCenterLocation({
|
that.mapCtx.getCenterLocation({
|
||||||
success: res => {
|
success: res => {
|
||||||
this.checkMap(res)
|
this.checkMap(res)
|
||||||
console.log(res);
|
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -198,7 +339,7 @@
|
|||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// ======================== jsonp跨域 ========================
|
// ======================== jsonp跨域 ========================
|
||||||
const KEY = 'SJTBZ-6H5C2-3F5UG-CCJIS-RZPXJ-I6FBY'
|
const KEY = this.qqMapKey;
|
||||||
let locationObj = addressObj.latitude + ',' + addressObj.longitude
|
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';
|
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, {
|
this.$jsonp(url, {
|
||||||
@@ -213,7 +354,7 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
console.log(addressObj, '======================');
|
//console.log(addressObj, '======================');
|
||||||
qqmapsdk.reverseGeocoder({
|
qqmapsdk.reverseGeocoder({
|
||||||
location: {
|
location: {
|
||||||
latitude: addressObj.latitude,
|
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() {
|
initMapH() {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||||
this.mapH = uni.getSystemInfoSync().windowHeight - 210;
|
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef APP-PLUS
|
// #ifndef APP-PLUS
|
||||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||||
this.mapH = uni.getSystemInfoSync().windowHeight - 170;
|
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
this.mapW = uni.getSystemInfoSync().windowWidth
|
this.mapW = uni.getSystemInfoSync().windowWidth
|
||||||
this.mapH = uni.getSystemInfoSync().windowHeight - 210;
|
this.mapH = uni.getSystemInfoSync().windowHeight;
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
// 移动到我的位置
|
// 移动到我的位置
|
||||||
@@ -255,7 +439,7 @@
|
|||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
submitAdress() {
|
submitAdress() {
|
||||||
console.log(this.addressObj);
|
//console.log(this.addressObj);
|
||||||
this.controls = []
|
this.controls = []
|
||||||
//setTimeout(() => {
|
//setTimeout(() => {
|
||||||
// this.$emit('updateAddress', this.addressObj)
|
// this.$emit('updateAddress', this.addressObj)
|
||||||
@@ -276,12 +460,12 @@
|
|||||||
beforePage.$vm.form.longitude = this.addressObj.longitude;
|
beforePage.$vm.form.longitude = this.addressObj.longitude;
|
||||||
beforePage.$vm.form.latitude = this.addressObj.latitude;
|
beforePage.$vm.form.latitude = this.addressObj.latitude;
|
||||||
beforePage.$vm.form.street = this.addressObj.address;
|
beforePage.$vm.form.street = this.addressObj.address;
|
||||||
|
beforePage.$vm.form.pickerValue = this.pickerValue;
|
||||||
|
beforePage.$vm.form.areaId = this.areaId;
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
|||||||
agentStore = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.AgentStore).ObjectToInt(2); //是否开启代理店铺
|
agentStore = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.AgentStore).ObjectToInt(2); //是否开启代理店铺
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var qqMapKey = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.QqMapKey); //腾讯地图key
|
||||||
|
|
||||||
var model = new
|
var model = new
|
||||||
{
|
{
|
||||||
@@ -200,7 +201,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
|||||||
isShowAgentPortal,
|
isShowAgentPortal,
|
||||||
agentNotes,
|
agentNotes,
|
||||||
agentAgreement,
|
agentAgreement,
|
||||||
agentStore
|
agentStore,
|
||||||
|
qqMapKey
|
||||||
};
|
};
|
||||||
jm.data = model;
|
jm.data = model;
|
||||||
return jm;
|
return jm;
|
||||||
|
|||||||
Reference in New Issue
Block a user