Explorar o código

现场巡店接口对接

lilei %!s(int64=4) %!d(string=hai) anos
pai
achega
772d24c432

+ 13 - 3
manifest.json

@@ -50,7 +50,17 @@
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "",
+                        "appkey_android" : ""
+                    }
+                },
+                "maps" : {},
+                "ad" : {}
+            }
         }
     },
     /* 快应用特有相关 */
@@ -72,7 +82,7 @@
     "mp-toutiao" : {
         "usingComponents" : true
     },
-    "uniStatistics": {  
-        "enable": false
+    "uniStatistics" : {
+        "enable" : false
     }
 }

+ 37 - 76
pages/siteInspection/siteInspection.vue

@@ -15,60 +15,42 @@
 		<!-- 附近的门店 -->
 		<view class="store-con">
 			<text class="store-tit">附近的门店:</text>
-			<scroll-view class="scroll-con" scroll-y @scrolltolower="onreachBottom" :style="{'height': 'calc(100vh - ' + Height + 'px)'}">
+			<scroll-view class="scroll-con" scroll-y :style="{'height': 'calc(100vh - ' + Height + 'px)'}">
 				<!-- 列表数据 -->
 				<view class="list-con">
 					<view class="list-item" v-for="(item,index) in listdata" :key="index" @click="chooseStore(item)">
 						<view class="item-main">
-							<u-icon name="home-fill" size="34" color="#2979ff" class="company-icon"></u-icon>
-							{{item.name}}
+							<u-icon class="company-icon" name="mendian" custom-prefix="xd-icon" size="40" color="#888"></u-icon>
+							<text>{{item.name}}</text>
 						</view>
-						<u-icon name="rewind-right-fill" size="34" color="#2979ff" class="company-icon"></u-icon>
+						<u-icon class="listData-item-r-icon" name="xianchangrenwu" custom-prefix="xd-icon" size="40" color="#2b85e4"></u-icon>
 					</view>
 				</view>
 				<u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
-				<view class="loadmore">
-					<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
-				</view>
 			</scroll-view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import { clzConfirm } from '@/libs/tools.js'
+	import { findStoreList } from '@/api/store.js'
 	export default{
 		data(){
 			return{
 				queryValue: '',
-				location: '',
+				location: '陕西西安未央区北二环信息机大厦100号',
 				noDataText: '未查找到附近门店',  //  列表请求状态提示语
 				status: 'loadmore',  //  加载中状态
-				// status: 'loading',  //  加载中状态
-				listdata: [
-					{name: '常青二路店'},
-					{name: '兰州通达街店'},
-					{name: '科技西路店'},
-					{name: '常青二路店'},
-					{name: '常青二路店'},
-					{name: '兰州通达街店'},
-					{name: '科技西路店'},
-					{name: '常青二路店'},
-					{name: '常青二路店'},
-					{name: '兰州通达街店'},
-					{name: '科技西路店'},
-					{name: '常青二路店'},
-				],  //  列表数据
+				listdata: [],  //  列表数据
 				pageNo: 1,  //  当前页码
 				pageSize: 10,  //  每页条数
 				total: 0,  //  数据总条数
-				Height: '',  //  滚动区域  元素dom高度
+				Height: 200,  //  滚动区域  元素dom高度
 			}
 		},
-		onShow() {
-			this.init()
-		},
 		onReady() {
-			// console.log(this.$refs.location.$el.offsetHeight)
+			this.init()
 		},
 		methods: {
 			// 初始化
@@ -83,56 +65,37 @@
 					geocode: true,
 				    success: function (res) {
 						console.log(res)
-						_this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
+						// _this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
 						setTimeout(()=>{
-							console.log(_this.$refs.location)
-							console.log(String(_this.$refs.location))
-							console.log(_this.$refs.location.$el.offsetHeight)
-							_this.Height = 44 + 62 + Number(_this.$refs.location.$el.offsetHeight)
-							// console.log(_this.Height, Number(_this.$refs.location.offsetHeight))
 							_this.searchHandle(res)
-						}, 5000)
+						}, 500)
 				    }
 				})
 			},
-			//  
-			searchHandle(pageNo){
-				// this.status = "loading"
-				pageNo ? this.pageNo = pageNo : null
-				// searchSuppliers({
-				// 	pageNo: this.pageNo,
-				// 	pageSize: this.pageSize,
-				// 	queryWord: this.queryValue
-				// }).then(res => {
-				// 	if (res.status == 200) {
-				// 		if(this.pageNo>1){
-				// 			this.listdata = this.listdata.concat(res.data.list || [])
-				// 		}else{
-				// 			this.listdata = res.data.list || []
-				// 		}
-				// 		this.total = res.data.count || 0
-				// 		this.listdata.length == 0 && this.queryValue != '' ? this.noDataText = '没有搜索到相关结果' : this.noDataText = '暂无数据'
-				// 	} else {
-				// 		this.noDataText = res.message
-				// 		this.listdata = []
-				// 		this.total = 0
-				// 	}
-				// 	this.status = "loadmore"
-				// })
-			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-				if(this.listdata.length < this.total){
-					this.pageNo += 1
-					this.searchHandle()
-				}else{
-					this.status = "nomore"
-				}
+			//查询门店列表
+			searchHandle(res){
+				this.status = "loading"
+				findStoreList({
+					lng:res.longitude,
+					lat:res.latitude,
+					queryWord: this.queryValue
+				}).then(res => {
+					if (res.status == 200) {
+						this.listdata = res.data.list || []
+						this.total = this.listdata.length
+						this.listdata.length == 0 && this.queryValue != '' ? this.noDataText = '没有搜索到相关结果' : this.noDataText = '暂无数据'
+					} else {
+						this.noDataText = res.message
+						this.listdata = []
+						this.total = 0
+					}
+					this.status = "loadmore"
+				})
 			},
-			//  选择门店
+			// 选择门店
 			chooseStore(item){
 				uni.navigateTo({
-					url:"/pages/signIn/signIn"
+					url:"/pages/signIn/signIn?id="+item.id
 				})
 			}
 		}
@@ -153,9 +116,6 @@
 				padding: 20upx;
 				border-radius: 12upx;
 				background-color: #fff;
-				.location-addr{
-					font-size: 24upx;
-				}
 				.location-icon{
 					padding-left: 10upx;
 					vertical-align: bottom;
@@ -177,15 +137,16 @@
 					padding: 0 30upx;
 					.list-item{
 						background-color: #fff;
-						border-radius: 16upx;
-						padding: 20upx 30upx 18upx;
-						margin-bottom: 20upx;
+						padding: 20upx;
 						display: flex;
 						justify-content: space-between;
 						align-items: center;
+						border-bottom: 1px solid #F8F8F8;
 						.item-main{
 							font-size: 15px;
 							color: rgb(48, 49, 51);
+							display: flex;
+							align-items: center;
 							.company-icon{
 								margin-right: 6upx;
 							}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/app-plus/app-view.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio