qukaidi 4 سال پیش
والد
کامیت
8ce26109b3

+ 5 - 2
manifest.json

@@ -24,7 +24,9 @@
         "usingComponents" : true,
         "nvueCompiler" : "uni-app",
         "compilerVersion" : 3,
-        "modules" : {},
+        "modules" : {
+            "Maps" : {}
+        },
         "distribute" : {
             "android" : {
                 "permissions" : [
@@ -55,7 +57,8 @@
             },
             "ios" : {},
             "sdkConfigs" : {
-                "ad" : {}
+                "ad" : {},
+                "maps" : {}
             },
             "icons" : {
                 "android" : {

+ 6 - 1
pages.json

@@ -136,7 +136,12 @@
 					"navigationBarTextStyle": "white"
 				}
 			}
-		]
+		    ,{
+                "path" : "monthly-policy/monthly-policy",
+                "style" : {
+					"navigationBarTitleText": "月度政策"
+				}
+            }]
 	}, {
 		"root": "pages/msg",
 		"pages": [{

+ 7 - 2
pages/home/index.vue

@@ -25,7 +25,8 @@
 				<view class="u-flex u-flex-wrap u-row-center">
 					<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;"></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>
 					<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;"
@@ -35,7 +36,6 @@
 			<view class="u-flex u-row-center u-m-t-30">
 				<u-image class="u-skeleton-fillet" width="680rpx" src="../../static/sailun/88reward.png" mode="widthFix"></u-image>
 			</view>
-
 		</view>
 		<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
 		<!-- <u-tabbar v-model="current" :list="list"></u-tabbar> -->
@@ -139,6 +139,11 @@
 					url: 'pages/home/my-stock/my-stock',
 				})
 			},
+			inMonthlyPolicy: function(){
+				this.$u.route({
+					url: 'pages/home/monthly-policy/monthly-policy',
+				})
+			},
 			inInlineshop() {
 				this.$u.route({
 					url: 'pages/home/inline-shop/inline_shop',

+ 47 - 0
pages/home/monthly-policy/monthly-policy.vue

@@ -0,0 +1,47 @@
+<template>
+	<view>
+		<!-- 月度政策 -->
+		
+	</view>
+</template>
+
+<script>
+	import {
+		request
+	} from '@/common/request/request'
+	require("promise.prototype.finally").shim()
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad() {
+			this.handleGetData();
+		},
+		methods: {
+			handleGetData: function(){
+				request({
+					url: '/homepage/getArticleOne',
+					method: 'post',
+					data: {
+						"displayType": "1" //门店1
+					}
+				}).then(res => {
+					console.log(res)
+				}).catch(err => {
+					
+				}).finally(() => {
+					setTimeout(() => {
+						uni.hideLoading();
+						this.loading = false;
+					}, 1000)
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 140 - 25
pages/me/Reward-details/index.vue

@@ -2,13 +2,13 @@
 	<!-- 奖励明细页面 -->
 	<view class="header">
 		<view class="header-one">
-			库存总量:<text>999</text>
 		</view>
+
 		<view class="content">
 			<u-tabs style="width: 500rpx;" bg-color="#0095ff" inactive-color="#FFFFFF" active-color="#fff" :list="list"
 			 :is-scroll="false" :current="current" @change="change"></u-tabs>
-			<u-select style=" color: #fff;" v-model="showBrand" :list="brandList"></u-select>
-			<u-calendar style=" color: #fff;" v-model="showDate" :mode="mode"></u-calendar>
+			<u-select style=" color: #fff;" @confirm="confirm" v-model="showBrand" value-name="brandId" laber-name="brandName" :list="brandList"></u-select>
+			<u-calendar style=" color: #fff;" @change="changetime" v-model="showDate" :mode="mode"></u-calendar>
 			<view @click="search">
 				<u-search :show-action="true" :animation="true"></u-search>
 			</view>
@@ -16,38 +16,39 @@
 		<view class="content-one" v-for="(item,index) in datalist" :key="index">
 			<view class="content-one-view">
 			</view>
-			<view class="content-one-text">获得奖励:2元</view>
+			<view class="content-one-text">获得奖励:{{item.money}}元</view>
+
 
 			<view class="content-two">
 				<view class="">
 					轮胎型号
 				</view>
 				<view class="">
-					SAILUN 12R22.5 18PR S838
+					{{item.tireModel}}
 				</view>
 			</view>
 			<view class="content-two">
 				<view class="">
-					轮胎型
+					扫码胎
 				</view>
 				<view class="">
-					SAILUN 12R22.5 18PR S838
+					{{item.tyreNum}}
 				</view>
 			</view>
 			<view class="content-two">
 				<view class="">
-					轮胎型号
+					奖励类型
 				</view>
 				<view class="">
-					SAILUN 12R22.5 18PR S838
+					{{getWay}}
 				</view>
 			</view>
 			<view class="content-two">
 				<view class="">
-					轮胎型号
+					获得时间
 				</view>
 				<view class="">
-					SAILUN 12R22.5 18PR S838
+					{{item.createTime}}
 				</view>
 			</view>
 		</view>
@@ -57,12 +58,15 @@
 </template>
 
 <script>
+	import {
+		request
+	} from '../../../common/request/request'
+	require("promise.prototype.finally").shim()
 	export default {
 		data() {
 			return {
-				datalist: [{},
-					{}
-				],
+				datalist: [],
+				getWay: '',
 				list: [{
 					name: '全部'
 				}, {
@@ -84,22 +88,133 @@
 					body: "12R22.5 152/149K 18PR S838 LBGSL 0L",
 					open: false,
 				}],
-				brandList: [{
-						value: '1',
-						label: '赛轮'
-					},
-					{
-						value: '2',
-						label: '黑鹰'
-					}
-				],
+				brandList:[],
+				// brandList: [{
+				// 		value: '1',
+				// 		label: '赛轮'
+				// 	},
+				// 	{
+				// 		value: '2',
+				// 		label: '黑鹰'
+				// 	}
+				// ],
 				current: 0,
 				showBrand: false,
 				showDate: false,
-				mode: 'date'
+				mode: 'range',
+				// 开始时间
+				startTime: '',
+				// 结束时间
+				endTime: '',
+				
 			};
 		},
+		created() {
+			this.data()
+			this.getBrandList()
+		},
 		methods: {
+			// 获取奖励明细
+			data() {
+				request({
+						url: '/myPage/getPageScanRewordList',
+						method: 'post',
+						data: {
+							'storeId': '1000',
+							'userId': '123',
+							'current': '1',
+							'size': '10'
+						}
+					}).then(res => {
+						console.log(res)
+						this.datalist = res.data.data
+						// 判断扫码类型
+						for (var i = 0; i < res.data.data.length; i++) {
+							if (res.data.data[i].getWay == 0) {
+								this.getWay = "车主扫码"
+							} else {
+								this.getWay = "门店扫码"
+							}
+						}
+						console.log(res.data.data)
+					}).catch(err => {
+						console.log(err)
+					})
+					.finally(() => {
+						setTimeout(() => {
+							uni.hideLoading();
+							this.loading = false;
+						}, 1000)
+
+					})
+			},
+			// 时间选择器获取时间
+			changetime(e) {
+				console.log(e)
+				this.startTime = e.startDate
+				this.endTime = e.endDate
+				request({
+						url: '/myPage/getPageScanRewordList',
+						method: 'post',
+						data: {
+							'storeId': '1000',
+							'userId': '123',
+							'current': '1',	
+							'size': '10',
+							'startTime': this.startTime +' 00:00:00',
+							'endTime': this.endTime +' 00:00:00'
+						}
+					}).then(res => {
+						console.log(res)
+						this.datalist = res.data.data
+						// 判断扫码类型
+						for (var i = 0; i < res.data.data.length; i++) {
+							if (res.data.data[i].getWay == 0) {
+								this.getWay = "车主扫码"
+							} else {
+								this.getWay = "门店扫码"
+							}
+						}
+						console.log(res.data.data)
+					}).catch(err => {
+						console.log(err)
+					})
+					.finally(() => {
+						setTimeout(() => {
+							uni.hideLoading();
+							this.loading = false;
+						}, 1000)
+				
+					})
+			},
+			// 获取品牌列表
+			getBrandList() {
+				request({
+						url: '/baseReq/getBrandList',
+						method: 'post',
+						data: {
+							'storeId': '1000',
+							'userId': '123'	
+						}
+					}).then(res => {
+						console.log(res)
+						this.brandList = res.data.data
+						console.log(this.brandList)
+					}).catch(err => {
+						console.log(err)
+					})
+					.finally(() => {
+						setTimeout(() => {
+							uni.hideLoading();
+							this.loading = false;
+						}, 1000)
+				
+					})
+			},
+			// 点击获取品牌
+			confirm(e) {
+				console.log(e)
+				},
 			search() {
 				this.$u.route({
 					url: 'pages/me/search/index',
@@ -128,7 +243,7 @@
 
 	.header-one {
 		text-align: center;
-		padding-top: 40rpx;
+		padding-top: 10rpx;
 	}
 
 	.header-one>text {

+ 3 - 0
pages/me/agent-stock/agent-stock.vue

@@ -133,6 +133,9 @@
 					}else if(this.current==2){
 						this.showmateriel=true
 					}
+				},
+				handleGetData(){
+					
 				}
 			}
 	}

+ 6 - 1
pages/me/index.vue

@@ -185,7 +185,7 @@
 					<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="经销商库存">
+					<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">
@@ -245,6 +245,11 @@
 					url: 'pages/me/suppliers',
 				})
 			},
+			inAgentStock(){
+				this.$u.route({
+					url: 'pages/me/agent-stock/agent-stock',
+				})
+			},
 			inSetting(){
 				this.$u.route({
 					url: 'pages/me/setting/setting',

+ 18 - 23
pages/msg/index.vue

@@ -79,30 +79,25 @@
 			};
 		},
 		methods: {
-			click(index, index1) {
-				if (index1 == 1) {
-					this.list.splice(index, 1);
-					this.$u.toast(`删除了第${index}个cell`);
-				} else {
-					this.list[index].show = false;
-					this.$u.toast(`收藏成功`);
+					click(index, index1) {
+						if(index1 == 1) {
+							this.msgList.splice(index, 1);
+							this.$u.toast(`删除了第${index}个cell`);
+						} else {
+							this.msgList[index].show = false;
+							this.$u.toast(`收藏成功`);
+						}
+					},
+					// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
+					open(index) {
+						// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
+						// 原本为'false',再次设置为'false'会无效
+						this.msgList[index].show = true;
+						this.msgList.map((val, idx) => {
+							if(index != idx) this.msgList[idx].show = false;
+						})
+					}
 				}
-			},
-			// 如果打开一个的时候,不需要关闭其他,则无需实现本方法
-			open(index) {
-				// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
-				// 原本为'false',再次设置为'false'会无效
-				this.list[index].show = true;
-				this.list.map((val, idx) => {
-					if (index != idx) this.list[idx].show = false;
-				})
-			},
-			inSystem(){
-				this.$u.route({
-					url: 'pages/msg/System-message/index',
-				})
-			}
-		}
 	};
 </script>