qukaidi há 4 anos atrás
pai
commit
ebcfd84d08

+ 1 - 1
.gitignore

@@ -1,3 +1,3 @@
-unpackage
+unpackage/dist/
 .idea
 node_modules

+ 6 - 1
manifest.json

@@ -58,7 +58,12 @@
             "ios" : {},
             "sdkConfigs" : {
                 "ad" : {},
-                "maps" : {}
+                "maps" : {
+                    "baidu" : {
+                        "appkey_ios" : "KYoTmSbggKUatksUwZKXrFmZX9oiVBrR",
+                        "appkey_android" : "4wYVsEvjrdDXtsbRYsNTy1f01PAYbZin"
+                    }
+                }
             },
             "icons" : {
                 "android" : {

+ 7 - 1
pages.json

@@ -306,7 +306,13 @@
 				"navigationBarTitleText": "零售店注册"
 			}
 
-		}]
+		},{
+            "path" : "register_map",
+              "style": {
+              	"navigationBarTitleText": "地图"
+            }
+                
+        }]
 	}],
 	"preloadRule": {},
 	"globalStyle": {

+ 37 - 51
pages/home/index.vue

@@ -26,7 +26,7 @@
 					<u-image class="u-skeleton-fillet" width="350rpx" height="212rpx" src="../../static/sailun/1.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
 					 @click="inStock"></u-image>
 					<u-image class="u-skeleton-fillet" width="350rpx" height="212rpx" src="../../static/sailun/2.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
-					@click="inMonthlyPolicy"></u-image>
+					 @click="inMonthlyPolicy"></u-image>
 					<u-image class="u-skeleton-fillet" width="350rpx" height="212rpx" src="../../static/sailun/3.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
 					 @click="inInlineshop"></u-image>
 					<u-image class="u-skeleton-fillet" width="350rpx" height="212rpx" src="../../static/sailun/4.png" style="margin: 10rpx;box-shadow:0rpx 0rpx 20rpx rgba(0,0,0,0.2);border-radius: 30rpx;"
@@ -49,6 +49,7 @@
 		request
 	} from '../../common/request/request'
 	require("promise.prototype.finally").shim()
+	import axios from 'axios'
 	export default {
 		data() {
 			return {
@@ -59,70 +60,55 @@
 		},
 		onLoad() {
 			uni.$on('login', (data) => {
-				this.loginStatus=data.msg
+				this.loginStatus = data.msg
 			})
 		},
 		onReady() {
-			if (this.loginStatus=="登录成功") {
+			if (this.loginStatus == "登录成功") {
 				this.$refs.ulogin.show({
-					title:"登录成功",
+					title: "登录成功",
 				})
 			}
 		},
 		created() {
-			this.getBanners();
-			this.getTiceList()
+			uni.showLoading({
+				title: '加载中...'
+			});
+			axios.all([this.getBanners(), this.getTiceList()])
+				.then(axios.spread((one, two) => {
+					this.bannersList = one.data.data.map(t => t.imgPath)
+					this.noticebarList = two.data.data.map(t => t.msgContent)
+				}))
+				.catch(err => {
+					console.log(err)
+				})
+				.finally(() => {
+					this.loading = false;
+					uni.hideLoading();
+				})
 		},
 		methods: {
 			//轮播图
 			getBanners() {
-				uni.showLoading({
-					title: '加载中...'
-				});
-				request({
-						url: '/homepage/getBanners',
-						method: 'post',
-						data: {
-							"storeId": '1000',
-							"showPosition": 0, //门店0
-						}
-					}).then(res => {
-						this.list = res.data.data
-						this.bannersList = this.list.map(t => t.imgPath)
-					}).catch(err => {
-						console.log(err)
-					})
-					.finally(() => {
-						setTimeout(() => {
-							uni.hideLoading();
-							this.loading = false;
-						}, 300)
-					})
+				return request({
+					url: '/homepage/getBanners',
+					method: 'post',
+					data: {
+						"storeId": '1000',
+						"showPosition": 0, //门店0
+					}
+				})
 			},
 			//消息文字跑马灯
 			getTiceList() {
-				uni.showLoading({
-					title: '加载中...'
-				});
-				request({
-						url: '/homepage/noticeList',
-						method: 'post',
-						data: {
-							"storeId": "1000",
-							"contentType": "1" //门店1
-						}
-					}).then(res => {
-						this.list = res.data.data
-						this.noticebarList = this.list.map(t => t.msgContent)
-					}).catch(err => {
-						console.log(err)
-					})
-					.finally(() => {
-						setTimeout(() => {
-							uni.hideLoading();
-							this.loading = false;
-						}, 300)
-					})
+				return request({
+					url: '/homepage/noticeList',
+					method: 'post',
+					data: {
+						"storeId": "1000",
+						"contentType": "1" //门店1
+					}
+				})
 			},
 			scancodeIn() {
 				this.$u.route({
@@ -139,7 +125,7 @@
 					url: 'pages/home/my-stock/my-stock',
 				})
 			},
-			inMonthlyPolicy: function(){
+			inMonthlyPolicy: function() {
 				this.$u.route({
 					url: 'pages/home/monthly-policy/monthly-policy',
 				})

+ 24 - 3
pages/login/register.vue

@@ -8,7 +8,7 @@
 				</view>
 			</view>
 			<view slot="body">
-				<u-upload :custom-btn="true" max-count="1" :action="action" class="u-flex u-row-center">
+				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :before-upload="storeUpload">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
@@ -16,7 +16,7 @@
 				<view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0 60rpx 0;">
 					点击上传营业执照
 				</view>
-				<u-upload :custom-btn="true" max-count="1" :action="action" class="u-flex u-row-center">
+				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
@@ -36,10 +36,11 @@
 </template>
 
 <script>
+	import axios from 'axios'
 	export default {
 		data() {
 			return {
-				action: 'http://www.example.com', // 演示地址
+				action: ""
 			};
 		},
 		methods: {
@@ -47,6 +48,26 @@
 				this.$u.route({
 					url: 'pages/login/register_2',
 				})
+			},
+			storeUpload(index, list) {
+				let file = list[0].file.path
+				console.log(file)
+				let param = new FormData() // 创建form对象
+				param.append('file', file) // 通过append向form对象添加数据
+				param.append('pictype', 'store') // 添加form表单中其他数据
+				let config = {
+					headers: {
+						'Content-Type': 'multipart/form-data'
+					}
+				}
+				axios.post('/appStoreBasicInfo/storeupload', param, config)
+					.then(res => {
+						console.log("上传上去了吗")
+						console.log(res)
+					})
+					.catch(err => {
+						console.log(err)
+					})
 			}
 		},
 	}

+ 43 - 14
pages/login/register_2.vue

@@ -55,7 +55,7 @@
 						<view style="margin-right: 10rpx;">
 							<u-icon name="map" size="36"></u-icon>
 						</view>
-						<u-input placeholder="点击选择详细地址"></u-input>
+						<u-input placeholder="点击选择详细地址" :disabled="true" @click="inMap"></u-input>
 						<view class="" slot="right">
 							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
 						</view>
@@ -72,6 +72,10 @@
 </template>
 
 <script>
+	import {
+		request
+	} from '../../common/request/request'
+	require("promise.prototype.finally").shim()
 	export default {
 		data() {
 			return {
@@ -137,22 +141,47 @@
 				this.codeText = text;
 			},
 			getCode() {
-				if (this.$refs.uCode.canGetCode) {
-					// 模拟向后端请求验证码
-					uni.showLoading({
-						title: '正在获取验证码',
-					})
-					setTimeout(() => {
-						uni.hideLoading();
-						// 通知验证码组件内部开始倒计时
-						this.$refs.uCode.start();
-					}, 1000);
-				} else {
-					this.$u.toast('倒计时结束后再发送');
-				}
+				console.log(this.form.phone)
+				request({
+					url: '/sailun/appStoreBasicInfo/sendCode',
+					method: 'post',
+					data: {
+						"phoneNumber": parseInt(this.form.phone),
+					},
+				}).then(res => {
+					console.log(res)
+					if(res.data.code==0){
+						if (this.$refs.uCode.canGetCode) {
+							// 模拟向后端请求验证码
+							uni.showLoading({
+								title: '正在获取验证码',
+							})
+							setTimeout(() => {
+								uni.hideLoading();
+								// 通知验证码组件内部开始倒计时
+								this.$refs.uCode.start();
+							}, 1000);
+						} else {
+							this.$u.toast('倒计时结束后再发送');
+						}
+					}
+					if(res.data.code==500){
+						this.$u.toast(res.data.msg);
+					}
+				}).catch(err => {
+					console.log(err)
+				}).finally(() => {
+					this.loading = false;
+					uni.hideLoading();
+				})
 			},
 			regionConfirm(e) {
 				this.form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
+			},
+			inMap(){
+				this.$u.route({
+					url: 'pages/login/register_map'
+				})
 			}
 		},
 		onReady() {

+ 55 - 0
pages/login/register_map.vue

@@ -0,0 +1,55 @@
+<template>
+	<view>
+		<view class="page-body">
+			<view class="page-section page-section-gap">
+				<map style="width: 100%;height: 100vh;" :markers="markers"  :longitude="longitude" :latitude="latitude" :circles="circles">
+				</map>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				circles: [], //圆
+				markers: [], //标记点
+				latitude: 39.9,
+				longitude: 116.4,
+			};
+		},
+		onLoad() {
+			const _this = this;
+			uni.getSystemInfo({
+				success: (res) => {
+					_this.mapHeight = res.screenHeight - res.statusBarHeight
+					_this.mapHeight = _this.mapHeight
+				}
+			})
+		},
+		created() {
+			var that = this
+			uni.getLocation({
+				type: 'wgs84',
+				success(res) {
+					console.log(res, "当前位置");
+					that.latitude = res.latitude
+					that.longitude = res.longitude
+					//标记点
+					that.markers = [{
+						id: 1,
+						latitude: res.latitude,
+						longitude: res.longitude,
+						iconPath: '/static/sailun/map-pin.png',
+					}]
+				}
+			});
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 87 - 39
pages/me/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view style="background-color: #FFFFFF;height: 100%;">
+	<view style="background-color: #FFFFFF;height: 100%;" class="u-skeleton">
 		<view class="u-page status_bar">
 			<view class="head">
 				<view class="status_bar">
@@ -7,39 +7,39 @@
 				</view>
 				<view class="u-flex u-row-between" style="padding: 30rpx 40rpx">
 					<view class="u-flex">
-						<view class="">
-							<u-image width="130rpx" height="130rpx" src="../../static/sailun/head-portrait.png" :lazy-load="true" shape="circle">
+						<view class="u-skeleton-circle">
+							<u-image width="130rpx" height="130rpx" :src="userInfo.storeImageUrl" :lazy-load="true" shape="circle">
 								<view slot="error" style="font-size: 24rpx;" :fade="true" duration="450">加载失败
 								</view>
 							</u-image>
 						</view>
-						<view class="u-margin-left-10">
-							<view style="color: #fff;font-size: 42rpx;" class="u-margin-bottom-20">
-								青岛赛轮轮胎零售店
+						<view class="u-margin-left-10 u-skeleton-fillet">
+							<view style="color: #fff;font-size: 42rpx;" class="u-margin-bottom-20 ">
+								{{userInfo.storeName}}
 							</view>
 							<view style="border: 1rpx solid #E3E3E3;border-radius: 30rpx;font-size:24rpx;color:#fff;padding: 2rpx 20rpx;">
-								山东省青岛市城阳区黑龙江北路188
+								{{userInfo.province}}{{userInfo.city}}{{userInfo.district}}{{userInfo.addressInfo}}
 							</view>
 						</view>
 					</view>
-					<view class="">
+					<view class="u-skeleton-fillet" @click="showQr=!showQr">
 						<!-- <u-icon name="qr" size="80rpx" custom-prefix="van-icon" color="#fff"></u-icon> -->
 						<u-image width="60rpx" height="60rpx" src="../../static/sailun/qrcode.png" :lazy-load="true">
 						</u-image>
 					</view>
 				</view>
 				<view class="u-flex u-row-around u-m-t-20">
-					<view class="u-text-center">
+					<view class="u-text-center u-skeleton-fillet">
 						<view style="font-size:34rpx; color: #FFFFFF;">
-							张三
+							{{userInfo.contactName}}
 						</view>
 						<view style="color: #B3DAFF;opacity: 0.9;">
 							联系人
 						</view>
 					</view>
-					<view class="u-text-center">
+					<view class="u-text-center u-skeleton-fillet">
 						<view style="font-size:34rpx;color: #FFFFFF;">
-							市北区
+							{{userInfo.district}}
 						</view>
 						<view style="color: #B3DAFF;opacity: 0.9;">
 							区域
@@ -47,8 +47,9 @@
 					</view>
 				</view>
 			</view>
-			<view style="position: relative;top:-110rpx;margin-bottom: 20rpx;">
-				<u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false" :border="false">
+			<view style="position: relative;top:-110rpx;margin-bottom: 100rpx;">
+				<u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false"
+				 :border="false" class="u-skeleton-fillet">
 					<view slot="head" class="u-flex u-row-between u-col-bottom">
 						<view style="font-size: 34rpx;">
 							结算中心
@@ -61,7 +62,7 @@
 						<view class="u-flex u-row-around">
 							<view class="u-text-center">
 								<view style="color: #0095FF;font-size: 30rpx;">
-									800 <text style="font-size: 14rpx;">万</text>
+									{{userInfo.usableMoney|numberFormat}}
 								</view>
 								<view style="color: #333333;">
 									我的奖励
@@ -69,7 +70,7 @@
 							</view>
 							<view class="u-text-center">
 								<view style="color: #0095FF;font-size: 30rpx;">
-									800 <text style="font-size: 14rpx;">万</text>
+									{{userInfo.blockMoney|numberFormat}}
 								</view>
 								<view style="color: #333333;">
 									冻结奖励
@@ -77,7 +78,7 @@
 							</view>
 							<view class="u-text-center">
 								<view style="color: #0095FF;font-size: 30rpx;">
-									800 <text style="font-size: 14rpx;">万</text>
+									{{userInfo.allBlockMoney|numberFormat}}
 								</view>
 								<view style="color: #333333;">
 									待核销
@@ -85,7 +86,7 @@
 							</view>
 							<view class="u-text-center">
 								<view style="color: #0095FF;font-size: 30rpx;">
-									800 <text style="font-size: 14rpx;">万个</text>
+									{{userInfo.storeTotalIntegral|numberFormat}}
 								</view>
 								<view style="color: #333333;">
 									可用积分
@@ -94,7 +95,8 @@
 						</view>
 					</view>
 				</u-card>
-				<u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false" :border="false">
+				<u-card padding="20" box-shadow="0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41)" border-radius="20" :show-foot="false"
+				 :border="false" class="u-skeleton-fillet">
 					<view slot="head" class="u-flex u-row-between u-col-bottom">
 						<view style="font-size: 34rpx;">
 							我的服务
@@ -147,7 +149,7 @@
 									胎号查询
 								</view>
 							</view>
-							
+
 							<view class="u-flex u-row-centter" style="flex-direction: column;width: 25%;" @click="inorder">
 								<view>
 									<u-image width="80rpx" height="80rpx" src="../../static/sailun/me-order.png" :lazy-load="true" shape="circle">
@@ -178,14 +180,14 @@
 						</view>
 					</view>
 				</u-card>
-				<u-cell-group>
-					<u-cell-item  title="核销记录">
+				<u-cell-group class="u-skeleton-fillet">
+					<u-cell-item title="核销记录">
 						<u-icon slot="icon" size="42" name="balance-o" custom-prefix="van-icon"></u-icon>
 					</u-cell-item>
-					<u-cell-item  title="兑换记录">
+					<u-cell-item title="兑换记录">
 						<u-icon slot="icon" size="42" name="balance-list-o" custom-prefix="van-icon"></u-icon>
 					</u-cell-item>
-					<u-cell-item  title="经销商库存" @click="inAgentStock">
+					<u-cell-item title="经销商库存" @click="inAgentStock">
 						<u-icon slot="icon" size="42" name="points" custom-prefix="van-icon"></u-icon>
 					</u-cell-item>
 					<u-cell-item title="设置" @click="inSetting">
@@ -194,63 +196,110 @@
 				</u-cell-group>
 			</view>
 		</view>
+		<u-modal v-model="showQr" :show-title="false" :mask-close-able="true" :show-confirm-button="false" width="440">
+			<view class="slot-content u-p-40 u-flex u-row-center">
+				<u-image width="360rpx" height="360rpx" :src="userInfo.qrbarcodeSrc"></u-image>
+			</view>
+		</u-modal>
+		<u-skeleton :loading="loading" :animation="true"></u-skeleton>
 	</view>
 </template>
 
 <script>
+	import {
+		request
+	} from '../../common/request/request'
+	require("promise.prototype.finally").shim()
 	export default {
 		data() {
 			return {
-				src: '../../static/sailun/fade.jpg',
+				userInfo: "",
+				showQr: false,
+				loading: true, // 是否显示骨架屏组件
 			};
 		},
-		methods:{
-			inInstore(){
+		filters: {
+			numberFormat(value) {
+				let unit = '';
+				var k = 10000,
+					sizes = ['', '万', '亿', '万亿'],
+					i;
+				if (value < k) {
+					value = value;
+				} else {
+					i = Math.floor(Math.log(value) / Math.log(k));
+					value = ((value / Math.pow(k, i))).toFixed(2);
+					unit = sizes[i];
+				}
+				return value + unit;	
+			}
+		},
+		created() {
+			this.getMyinfo()
+		},
+		methods: {
+			getMyinfo() {
+				request({
+					url: '/myapp/selectStore',
+					method: 'post',
+					data: {
+						"storeId": '3000',
+					}
+				}).then(res => {
+					this.userInfo = res.data.data
+				}).catch(err => {
+					console.log(err)
+				}).finally(() => {
+					this.loading = false;
+					uni.hideLoading();
+				})
+			},
+			inInstore() {
 				this.$u.route({
 					url: 'pages/me/Warehousing-details/index',
 				})
 			},
-			inOutstore(){
+			inOutstore() {
 				this.$u.route({
 					url: 'pages/me/Delivery-details/index',
 				})
 			},
-			inReward(){
+			inReward() {
 				this.$u.route({
 					url: 'pages/me/Reward-details/index',
 				})
 			},
-			inStatistical(){
+			inStatistical() {
 				this.$u.route({
 					url: 'pages/me/Statistical-task/index',
 				})
 			},
-			inresult(){
+			inresult() {
 				this.$u.route({
 					url: 'pages/me/scancodequery/scan',
 				})
 			},
-			inorder(){
+			inorder() {
 				this.$u.route({
 					url: 'pages/me/my-order/my-order',
 				})
 			},
-			inCoupon(){
+			inCoupon() {
 				this.$u.route({
 					url: 'pages/me/coupon',
 				})
 			},
-			inSuppliers(){
+			inSuppliers() {
 				this.$u.route({
 					url: 'pages/me/suppliers',
 				})
 			},
-			inAgentStock(){
+			inAgentStock() {
 				this.$u.route({
 					url: 'pages/me/agent-stock/agent-stock',
 				})
 			},
-			inSetting(){
+			inSetting() {
 				this.$u.route({
 					url: 'pages/me/setting/setting',
 				})
@@ -267,8 +316,7 @@
 	.head {
 		width: 750rpx;
 		min-height: 460rpx;
-		// background: linear-gradient(50deg, #3F77F6 0%, #66CCFF 100%);
-		background-image:  url(../../static/sailun/mebg.png);
-		background-size:100% 100%;
+		background-image: url(../../static/sailun/mebg.png);
+		background-size: 100% 100%;
 	}
 </style>

+ 1 - 1
pages/msg/index.vue

@@ -2,7 +2,7 @@
 	<view>
 
 		<view class="u-page">
-			<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in msgList" :key="item.id" @click="click" @content-click="inSystem" @open="open"
+			<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in msgList" :key="item.id" @click="click"  @open="open"
 			 :options="options">
 				<view class="item u-border-bottom">
 					<image mode="aspectFill" :src="item.images" />

BIN
static/sailun/map-pin.png


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png