lhl 1 рік тому
батько
коміт
fa96da632c
45 змінених файлів з 3875 додано та 1992 видалено
  1. 43 0
      api/index.js
  2. 17 0
      api/product.js
  3. 11 0
      api/user.js
  4. 6 5
      manifest.json
  5. 97 76
      pages.json
  6. 151 0
      pages/index/action.vue
  7. 122 0
      pages/index/actionList.vue
  8. 0 73
      pages/index/follow.vue
  9. 75 17
      pages/index/index.vue
  10. 0 309
      pages/index/indexComponents/noUser.vue
  11. 0 1223
      pages/index/indexComponents/onUser.vue
  12. 6 6
      pages/index/shopTab.vue
  13. 1013 0
      pages/order/createOrderT.vue
  14. 7 1
      pages/order/hxqm.vue
  15. 6 6
      pages/order/order.vue
  16. 12 1
      pages/order/orderDetail.vue
  17. 23 4
      pages/product/product.vue
  18. 4 4
      pages/public/agreement.vue
  19. 1 1
      pages/public/login.vue
  20. 2 2
      pages/public/wxLogin.vue
  21. 83 24
      pages/shop/accessory.vue
  22. 603 99
      pages/shop/rent.vue
  23. 476 0
      pages/user/money/qxq.vue
  24. 123 0
      pages/user/myAction.vue
  25. 172 58
      pages/user/myRent.vue
  26. 154 73
      pages/user/shopPage.vue
  27. 244 0
      pages/user/sqmy.vue
  28. 370 0
      pages/user/storage.vue
  29. 52 8
      pages/user/userPage.vue
  30. BIN
      static/icon/action.png
  31. BIN
      static/icon/down1.png
  32. BIN
      static/icon/in3.png
  33. BIN
      static/icon/myaction.png
  34. BIN
      static/icon/qxq.png
  35. BIN
      static/icon/ruku.png
  36. BIN
      static/icon/sqmy.png
  37. BIN
      static/icon/zqdk.png
  38. BIN
      static/image/action-top.png
  39. BIN
      static/image/awardbg.png
  40. BIN
      static/image/followButtom.png
  41. BIN
      static/image/followCenter.png
  42. BIN
      static/image/followTop.jpg
  43. BIN
      static/image/shopBg.png
  44. BIN
      static/image/upimg-g.png
  45. 2 2
      store/index.js

+ 43 - 0
api/index.js

@@ -111,3 +111,46 @@ export function certification(data) {
 	});
 }
 
+//
+export function contractCreate(data) {
+	return request({
+		url: '/api/rent/contract_create',
+		method: 'post',
+		data
+	});
+}
+export function createSignFLow(data) {
+	return request({
+		url: '/api/rent/createSignFLow',
+		method: 'post',
+		data
+	});
+}
+
+
+//创建免押
+export function rentFree(data) {
+	return request({
+		url: '/api/rent/free',
+		method: 'post',
+		data
+	});
+}
+
+//我的活动
+export function record(data) {
+	return request({
+		url: '/api/article/record',
+		method: 'get',
+		data
+	});
+}
+
+//活动报名
+export function joinAction(data) {
+	return request({
+		url: '/api/article/apply',
+		method: 'post',
+		data
+	});
+}

+ 17 - 0
api/product.js

@@ -192,3 +192,20 @@ export function storeList(data) {
 	});
 }
 
+// 获取门店商品
+export function getGoods(data) {
+	return request({
+		url: '/api/product/store_goods',
+		method: 'get',
+		data
+	})
+}
+
+export function storeInStock(data) {
+	return request({
+		url: '/api/product/store_in_stock',
+		method: 'post',
+		data
+	})
+}
+

+ 11 - 0
api/user.js

@@ -278,3 +278,14 @@ export function getMyRent(data) {
 		data
 	})
 }
+
+//
+export function certificate(data) {
+	return request({
+		url: '/api/rent/certificate',
+		method: 'get',
+		data
+	})
+}
+
+

+ 6 - 5
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "卡羚能服",
-    "appid" : "__UNI__A3DE4B9",
+    "appid" : "__UNI__E91FB20",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : 100,
@@ -134,18 +134,19 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        "appid" : "wx1af9ca9ccd6ca98b",
+        "appid" : "wx993adb50d32dc71c",
         "setting" : {
             "urlCheck" : true,
             "minified" : true
         },
         "permission" : {
             "scope.userLocation" : {
-                "desc" : "为了定位车辆位置需要获取定位信息"
+                "desc" : "为了提供附近门店,需要获取定位信息"
             }
         },
         "lazyCodeLoading" : "requiredComponents",
-        "requiredBackgroundModes" : [ "location" ]
+        "requiredBackgroundModes" : [ "location" ],
+        "requiredPrivateInfos" : [ "getLocation" ]
     },
     "h5" : {
         "title" : "卡羚能服",
@@ -157,7 +158,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://zd1.frp.liuniu946.com/api",
+                    "target" : "https://appx.linkaa.cn/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 97 - 76
pages.json

@@ -11,6 +11,18 @@
 				"navigationBarTitleText": "卡羚能服"
 			}
 		},
+		{
+			"path": "pages/index/actionList",
+			"style": {
+				"navigationBarTitleText": "活动列表"
+			}
+		},
+		{
+			"path": "pages/index/action",
+			"style": {
+				"navigationBarTitleText": "活动详情"
+			}
+		},
 		{
 			"path": "pages/mall/mall",
 			"style": {
@@ -30,14 +42,6 @@
 				"navigationBarTitleText": "邀好友赚佣金"
 			}
 		},
-		// #ifndef APP
-		{
-			"path": "pages/index/follow",
-			"style": {
-				"navigationBarTitleText": "关注公众号"
-			}
-		},
-		// #endif
 		{
 			"path": "pages/index/noticeDetail",
 			"style": {
@@ -307,12 +311,12 @@
 				"navigationBarTitleText": "个人中心"
 			}
 		},
-		{
-			"path": "pages/user/repair/userRepair",
-			"style": {
-				"navigationBarTitleText": "维修历史"
-			}
-		},
+		// {
+		// 	"path": "pages/user/repair/userRepair",
+		// 	"style": {
+		// 		"navigationBarTitleText": "维修历史"
+		// 	}
+		// },
 		{
 			"path": "pages/user/repair/repairDetail",
 			"style": {
@@ -325,12 +329,12 @@
 				"navigationBarTitleText": "授权列表"
 			}
 		},
-		{
-			"path": "pages/user/reportForRepair/Report",
-			"style": {
-				"navigationBarTitleText": "故障报修"
-			}
-		},
+		// {
+		// 	"path": "pages/user/reportForRepair/Report",
+		// 	"style": {
+		// 		"navigationBarTitleText": "故障报修"
+		// 	}
+		// },
 		{
 			"path": "pages/user/realName/realNameAuthentication",
 			"style": {
@@ -343,16 +347,22 @@
 				"navigationBarTitleText": "图片裁切"
 			}
 		},
+		// {
+		// 	"path": "pages/user/myCart/myCart",
+		// 	"style": {
+		// 		"navigationBarTitleText": "我的车辆"
+		// 	}
+		// },
 		{
-			"path": "pages/user/myCart/myCart",
+			"path": "pages/user/myteam",
 			"style": {
-				"navigationBarTitleText": "我的车辆"
+				"navigationBarTitleText": "我的团队"
 			}
 		},
 		{
-			"path": "pages/user/myteam",
+			"path": "pages/user/storage",
 			"style": {
-				"navigationBarTitleText": "我的团队"
+				"navigationBarTitleText": "入库"
 			}
 		},
 		{
@@ -375,7 +385,12 @@
 				"navigationBarTitleText": "提现"
 			}
 		},
-
+		{
+			"path": "pages/user/myAction",
+			"style": {
+				"navigationBarTitleText": "我的活动"
+			}
+		},
 		// {
 		// 	"path": "pages/user/favorites",
 		// 	"style": {
@@ -435,6 +450,12 @@
 				"navigationBarTitleText": "创建订单"
 			}
 		},
+		{
+			"path": "pages/order/createOrderT",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		},
 		{
 			"path": "pages/user/money/pay",
 			"style": {
@@ -458,15 +479,15 @@
 			}
 		},
 		{
-			"path": "pages/user/money/walletList",
+			"path": "pages/user/award/account",
 			"style": {
-				"navigationBarTitleText": "余额明细"
+				"navigationBarTitleText": "提现账号"
 			}
 		},
 		{
-			"path": "pages/user/award/account",
+			"path": "pages/user/money/qxq",
 			"style": {
-				"navigationBarTitleText": "提现账号"
+				"navigationBarTitleText": "骑行券"
 			}
 		},
 		{
@@ -479,64 +500,64 @@
 		},
 		{
 			"path": "pages/user/myRent",
-			"style": {
-				"navigationBarTitleText": "我的电池"
-			}
-		},
-		{
-			"path": "pages/shop/accessory",
-			"style": {
-				"navigationBarTitleText": "配件"
-			}
-		},
-		{
-			"path": "pages/shop/upimg",
 			"style": {
 				"navigationBarTitleText": ""
 			}
 		},
 		{
-			"path": "pages/shop/cartAciton",
-			"style": {
-				"navigationBarTitleText": "车辆激活"
-			}
-		},
-		{
-			"path": "pages/shop/repair/clientRepair",
+			"path": "pages/user/sqmy",
 			"style": {
-				"navigationBarTitleText": "客户报修"
+				"navigationBarTitleText": "申请免押"
 			}
 		},
 		{
-			"path": "pages/shop/repair/taskClientRepair",
-			"style": {
-				"navigationBarTitleText": "维修任务"
-			}
-		},
-		{
-			"path": "pages/shop/repair/clientReparirDetail",
+			"path": "pages/shop/accessory",
 			"style": {
-				"navigationBarTitleText": "报修详情"
+				"navigationBarTitleText": "配件"
 			}
 		},
 		{
-			"path": "pages/shop/repair/repairHistory",
+			"path": "pages/shop/upimg",
 			"style": {
-				"navigationBarTitleText": "维修历史"
+				"navigationBarTitleText": ""
 			}
 		},
+		// {
+		// 	"path": "pages/shop/cartAciton",
+		// 	"style": {
+		// 		"navigationBarTitleText": "车辆激活"
+		// 	}
+		// },
+		// {
+		// 	"path": "pages/shop/repair/clientRepair",
+		// 	"style": {
+		// 		"navigationBarTitleText": "客户报修"
+		// 	}
+		// },
+		// {
+		// 	"path": "pages/shop/repair/taskClientRepair",
+		// 	"style": {
+		// 		"navigationBarTitleText": "维修任务"
+		// 	}
+		// },
+		// {
+		// 	"path": "pages/shop/repair/clientReparirDetail",
+		// 	"style": {
+		// 		"navigationBarTitleText": "报修详情"
+		// 	}
+		// },
+		// {
+		// 	"path": "pages/shop/repair/repairHistory",
+		// 	"style": {
+		// 		"navigationBarTitleText": "维修历史"
+		// 	}
+		// },
 		{
 			"path": "pages/shop/shopOrder",
 			"style": {
 				"navigationBarTitleText": "店铺订单"
 			}
 		},
-		{
-			"path": "pages/shop/rent",
-			"style": {
-				"navigationBarTitleText": "租电"
-			}
-		},
 		{
 			"path": "pages/shop/shopOrderDetail",
 			"style": {
@@ -549,17 +570,17 @@
 				"navigationBarTitleText": "售后订单"
 			}
 		},
-		{
-			"path": "pages/shop/shopIndex",
-			"style": {
-				"navigationBarTitleText": "店铺详情",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
+		// {
+		// 	"path": "pages/shop/shopIndex",
+		// 	"style": {
+		// 		"navigationBarTitleText": "店铺详情",
+		// 		"app-plus": {
+		// 			"titleNView": {
+		// 				"type": "transparent"
+		// 			}
+		// 		}
+		// 	}
+		// },
 		{
 			"path": "pages/shop/attestation",
 			"style": {

+ 151 - 0
pages/index/action.vue

@@ -0,0 +1,151 @@
+<template>
+    <view class="content">
+		<image :src="actionImg" mode="widthFix" class="action-img"></image>
+		<view class="notice-item">
+			<view class="" v-html="content">
+				
+			</view>
+		</view>
+		<view class="action-wrap">
+			<image src="../../static/image/action-top.png" mode="" class="action-top"></image>
+			<view class="">
+				请拍下您与爱车的合照,点击下方按钮上传照片即可获得奖励。
+			</view>
+			<image :src="upimg" mode="widthFix" class="up-img" v-if="upimg" @click="upActionImg"></image>
+			<image src="../../static/image/upimg-g.png" mode="widthFix" class="up-img" v-else @click="upActionImg"></image>
+			<view class="action-btn" @click="joinAction">
+				上传照片
+			</view>
+		</view>
+		
+		
+    </view>
+</template>
+<script>
+	import { upload } from '@/api/order.js'
+	import { details,joinAction } from '@/api/index.js'
+export default {
+    data() {
+        return {
+			content: '',
+			upimg: '',
+			loading:false,
+			id: ''
+        };
+    },
+	computed: {
+		actionImg() {
+			return this.$store.state.baseURL + '/static/img/action.png'
+		}
+	},
+    onLoad(opt) {
+		if(opt.id ) {
+			this.id = opt.id
+			this.details(opt.id) 
+		}
+    },
+    onShow() {
+
+    },
+    onReachBottom() {
+
+    },
+    methods: {
+		details(id) {
+			details({},id).then(res => {
+				console.log(res);
+				this.content = res.data.content
+				if(this.content != null){
+					this.content = this.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
+				}//小程序商品详情图超出屏幕问题
+			}) 
+		},
+		upActionImg() {
+			upload().then(res => {
+				this.upimg = res[0].url
+			})
+		},
+		joinAction() {
+			if(this.loading) {
+				return
+			}
+			if(this.upimg == '') {
+				return this.$api.msg('请上传合影照片')
+			}
+			this.loading = true
+			joinAction({
+				aid: this.id,
+				up_file: this.upimg
+			}).then(res => {
+				this.loading = false
+				uni.showToast({
+					title: '提交成功',
+					duration: 2000
+				});
+			}).catch(err => {
+				this.loading = false
+			})
+		}
+    }
+};
+</script>
+<style lang="scss" scoped>
+	.content {
+		padding-bottom: 50px;
+	}
+	page {
+		background-color: #fff;
+		height: auto;
+		min-height: 100%;
+	}
+.action-img {
+	width: 750rpx;
+}
+.action-wrap {
+	width: 690rpx;
+	margin:50rpx auto 20rpx;
+	// height: 560rpx;
+	background-color: #dcf4ef;
+	border-radius: 20rpx;
+	padding: 60px 35rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	align-items: center;
+	text-align: justify;
+	color: #333;
+	font-weight: bold;
+	font-size: 28rpx;
+	position: relative;
+	.up-img {
+		width: 160rpx;
+		height: 160rpx;
+		margin: 45rpx auto;
+	}
+	.action-btn {
+		width: 580rpx;
+		height: 90rpx;
+		color: #fff;
+		font-weight: 500;
+		background-color: #ffc43d;
+		text-align: center;
+		border-radius: 45rpx;
+		line-height: 90rpx;
+	}
+	.action-top {
+		width: 345rpx;
+		height: 60rpx;
+		position: absolute;
+		top: -30rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+}
+.notice-item {
+	width: 100%;
+	height: 100%;
+	padding: 35rpx 35rpx;
+	padding-bottom: 30rpx;
+}
+</style>

+ 122 - 0
pages/index/actionList.vue

@@ -0,0 +1,122 @@
+<template>
+	<view class="content">
+		<empty v-if="loaded && list.length == 0"></empty>
+		<view class="action" v-for="item in list" @click="goAction(item)">
+			<image :src="item.image_input[0]" mode="" class="action-img"></image>
+			<view class="action-tit">
+				{{item.title}}
+			</view>
+			<view class=" time">
+				<view class="">
+					活动时间:{{getTime(item.start_time)}} - {{getTime(item.end_time)}}
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+	</view>
+</template>
+<script>
+	import { getTime } from '@/utils/rocessor.js'
+	import {
+		articleList,
+		record,
+	} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more',
+				loaded: false,
+				type: 0,
+			};
+		},
+		onLoad(opt) {
+			if(opt.type) {
+				this.type = opt.type
+			}
+		},
+		onShow() {
+			this.getActionList()
+		},
+		onReachBottom() {
+
+		},
+		methods: {
+			getTime,
+			goAction(item) {
+				if(this.type == 0) {
+					let time = new Date().getTime()
+					console.log(time);
+					if(time < item.start_time*1000) {
+						return this.$api.msg('活动未开始,请耐心等待')
+					}
+					if(time > item.end_time*1000) {
+						return this.$api.msg('活动已结束')
+					}
+					uni.navigateTo({
+						url: '/pages/index/action?id=' + item.id
+					})
+				}
+				
+			},
+			getActionList() {
+				if (this.loadingType == 'loading' || this.loadingType == 'noMore') {
+					return
+				}
+				this.loadingType = 'more'
+				articleList({
+					page: this.page,
+					limit: this.limit
+				},2).then(res => {
+					this.list = this.list.concat(res.data.data)
+					this.page++
+					if (res.data.lengt == this.limit) {
+						this.loadingType = 'more'
+					} else {
+						this.loadingType = 'noMore'
+					}
+					this.loaded = true
+				})
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	page {
+		background-color: #f2f2f2;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.action {
+		width: 700rpx;
+		margin: 25rpx auto;
+		border-radius: 35rpx;
+		overflow: hidden;
+		background-color: #fff;
+
+		.action-img {
+			width: 700rpx;
+			height: 300rpx;
+			background-color: #333;
+		}
+
+		.action-tit {
+			min-height: 100rpx;
+			font-size: 34rpx;
+			font-weight: 500;
+			color: #0E0E0E;
+			display: flex;
+			align-items: center;
+			padding: 15rpx;
+			padding-left: 30rpx;
+		}
+		.time {
+			font-size: 12rpx;
+			padding: 20rpx;
+			padding-top: 0;
+		}
+	}
+</style>

+ 0 - 73
pages/index/follow.vue

@@ -1,73 +0,0 @@
-<template>
-	<view class="content">
-		<image class="qr" src="../../static/image/followTop.jpg" mode="scaleToFill"></image>
-		<image class="pint" src="../../static/image/followCenter.png" mode="scaleToFill"></image>
-		<view class="text">
-			<!-- #ifdef H5 -->
-			长按二维码识别
-			<!-- #endif -->
-			<!-- #ifndef H5 -->
-			扫码识别公众号
-			<!-- #endif -->
-		</view>
-		<image class="buttomImg" src="../../static/image/followButtom.png" mode="widthFix"></image>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {};
-		},
-		onLoad(options) {},
-		methods: {}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		height: 100%;
-	}
-
-	.content {
-		padding-bottom: 150rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		align-content: center;
-		flex-wrap: wrap;
-		line-height: 1;
-		background-color: $color-green;
-
-		.qr {
-			margin: 0 75rpx;
-			width: 600rpx;
-			height: 600rpx;
-		}
-
-		.pint {
-			margin: 0 auto;
-			margin-top: 50rpx;
-			width: 200rpx;
-			height: 200rpx;
-
-		}
-		.text{
-			color: #FFFFFF;
-			width: 100%;
-			flex-shrink: 0;
-			text-align: center;
-			margin-top: 30rpx;
-		}
-
-		.buttomImg {
-			position: absolute;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			width: 100%;
-			height: 50rpx;
-		}
-	}
-</style>

+ 75 - 17
pages/index/index.vue

@@ -32,11 +32,29 @@
 					信用免押
 				</view>
 			</view>
-			<view class="gn-btn" @click="navTo('/pages/shop/rent',1)">
+			<!-- <view class="gn-btn" @click="navTo('/pages/shop/rent',1)"> -->
+			<view class="gn-btn" @click="navTo('/pages/shop/accessory?type=1',1)">
 				立即租电
 			</view>
 		</view>
 		<view class="gn-wrap flex">
+			<view class="gn-icon flex">
+				<image src="../../static/icon/in3.png" mode="heightFix"></image>
+			</view>
+			<view class="gn-tit">
+				<view class="">
+					升压器
+				</view>
+				<view class="tit-jj">
+					信用免押
+				</view>
+			</view>
+			<!-- <view class="gn-btn" @click="navTo('/pages/shop/rent',1)"> -->
+			<view class="gn-btn" @click="navTo('/pages/shop/accessory?type=2',1)">
+				立即租电
+			</view>
+		</view>
+		<!-- <view class="gn-wrap flex">
 			<view class="gn-icon flex">
 				<image src="../../static/icon/in2.png" mode="heightFix"></image>
 			</view>
@@ -51,7 +69,7 @@
 			<view class="gn-btn" @click="navTo('/pages/shop/accessory')">
 				立即租车
 			</view>
-		</view>
+		</view> -->
 		<!-- 功能区 ed-->
 		<!-- 附近门店 start -->
 		<view class="fjmd" @click="navTo('/pages/index/shopTab')">
@@ -116,6 +134,7 @@
 	import {
 		loadIndexs
 	} from '@/api/index.js'
+	import { storeList } from '@/api/product.js'
 	import {
 		mapState,
 		mapMutations
@@ -130,6 +149,7 @@
 		},
 		computed: {
 			...mapState('user', ['userInfo', 'hasLogin']),
+			...mapState('shop', ['shopDetail','setShopInfo']),
 		},
 		// 切换或显示后变动tabbar颜色
 		onHide() {
@@ -193,7 +213,7 @@
 		},
 		// #endif
 		methods: {
-			...mapMutations('user',['setAddress']),
+			...mapMutations('user', ['setAddress']),
 			getIndex() {
 				loadIndexs().then(res => {
 					this.carouselList = res.data.banner
@@ -207,28 +227,42 @@
 						// 登录拦截
 						interceptor();
 					} else {
-						if (this.userInfo.is_real == 1) {
-							uni.navigateTo({
-								url,
-								fail(e) {
-									console.log(e);
-								}
-							});
-
-						} else {
+						console.log(this.shopDetail, 'this.shopDetail');
+						if (!(this.shopDetail && this.shopDetail.id)) {
 							uni.showModal({
 								title: '提示',
-								content: '您当前未进行实名认证,是否立即实名认证?',
+								content: '您当前未选择门店,请选择门店。',
 								complete(res) {
 									if (res.confirm) {
 										uni.navigateTo({
-											url: '/pages/shop/attestation'
+											url: '/pages/index/shopTab'
 										})
 									}
 								}
 							})
+						} else {
+							if (this.userInfo.is_real == 1) {
+								uni.navigateTo({
+									url,
+									fail(e) {
+										console.log(e);
+									}
+								});
+
+							} else {
+								uni.showModal({
+									title: '提示',
+									content: '您当前未进行实名认证,是否立即实名认证?',
+									complete(res) {
+										if (res.confirm) {
+											uni.navigateTo({
+												url: '/pages/shop/attestation'
+											})
+										}
+									}
+								})
+							}
 						}
-
 					}
 				} else {
 					if (url.indexOf('http') != -1) {
@@ -256,7 +290,7 @@
 						obj.getlocationSetInit(e)
 					},
 					fail(e) {
-						if(e.errCode==22){
+						if (e.errCode == 22) {
 							uni.showModal({
 								title: '定位开启错误',
 								content: '请查看是否已经开启定位服务',
@@ -277,7 +311,8 @@
 							// 调用鉴定位置变化事件
 							this.getlocationSetInit(e)
 						},
-						fail() {
+						fail(err) {
+							console.log(err);
 						}
 					})
 				})
@@ -293,11 +328,34 @@
 						latitude: data.latitude,
 						longitude: data.longitude
 					})
+					// 回去最近的门店
+					obj.getStore(data)
 				} catch (e) {
 					console.log(e, 'cww');
 				}
 			},
+			swiperChange() {
 
+			},
+			getStore(res) {
+				let that = this
+				storeList({
+						page: 1,
+						limit: 1,
+						latitude: res.latitude,
+						longitude: res.longitude,
+					})
+					.then(({
+						data
+					}) => {
+						if(data.list && data.list.length > 0) {
+							that.setShopInfo(data.list[0])
+						}
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
 		}
 	};
 </script>

+ 0 - 309
pages/index/indexComponents/noUser.vue

@@ -1,309 +0,0 @@
-<template>
-	<view class="container">
-		<view class="content">
-			<view class="title">
-				<text>HI,车主</text>
-			</view>
-			<view class="tip">
-				<text>
-					您还没未拥有车辆。
-				</text>
-			</view>
-			<view class="itemTitleBox flex">
-				<view class="itemTitle">
-					附近商家
-				</view>
-				<view class="tager flex" @click="navTo('/pages/index/shopTab')">
-					<text>切换</text>
-					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
-				</view>
-			</view>
-			<view class="shopContent flex">
-				<view class="shoplogo">
-					<image class="logo" :src="shopDetail.image" mode="scaleToFill"></image>
-				</view>
-				<view class="shopDetail">
-					<view class="shopName clamp">
-						{{shopDetail.name}}
-					</view>
-					<view class="shopDetailText">
-						{{shopDetail.detailed_address}}
-					</view>
-				</view>
-			</view>
-			<view class="itemTitleBox flex">
-				<view class="itemTitle">
-					国标系列
-				</view>
-				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id+'&type=1')">
-					<text>全部</text>
-					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
-				</view>
-			</view>
-			<view class="flex cartList">
-				<view class="itemBox" v-for="(item,index) in cartList" @click="navTo('/pages/product/product?id='+item.id)" :key='index'>
-					<view class="imgBox">
-						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
-					</view>
-					<view class="itemDetaile">
-						<view class="cartName">
-							<view class="clamp2 ">
-								{{item.store_name}}
-							</view>
-						</view>
-						<view class="maney clamp">
-							<text class="greenText font-size-base">¥{{item.price}}</text>
-							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="itemTitleBox flex">
-				<view class="itemTitle">
-					电摩系列
-				</view>
-				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id+'&type=2')">
-					<text>全部</text>
-					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
-				</view>
-			</view>
-			<view class="flex cartList">
-				<view class="itemBox" v-for="(item,index) in carTwoList" :key='index' @click="navTo('/pages/product/product?id='+item.id)">
-					<view class="imgBox">
-						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
-					</view>
-					<view class="itemDetaile">
-						<view class="cartName">
-							<view class="clamp2 ">
-								{{item.store_name}}
-							</view>
-						</view>
-						<view class="maney clamp">
-							<text class="greenText font-size-base">¥{{item.price}}</text>
-							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="itemTitleBox flex">
-				<view class="itemTitle">
-					电轻摩系列
-				</view>
-				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id)+'&type=3'">
-					<text>全部</text>
-					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
-				</view>
-			</view>
-			<view class="flex cartList">
-				<view class="itemBox" v-for="(item,index) in carTreeList" :key='index' @click="navTo('/pages/product/product?id='+item.id)">
-					<view class="imgBox">
-						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
-					</view>
-					<view class="itemDetaile">
-						<view class="cartName">
-							<view class="clamp2 ">
-								{{item.store_name}}
-							</view>
-						</view>
-						<view class="maney clamp">
-							<text class="greenText font-size-base">¥{{item.price}}</text>
-							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		mapState,
-	} from 'vuex';
-	import {
-		getProducts,
-	} from '@/api/product.js';
-	export default {
-		data() {
-			return {
-				cartList: [], //国标系列电动车
-				carTwoList: [], //电摩系列电动车
-				carTreeList: [], //电摩系列电动车
-			};
-		},
-		computed: {
-			...mapState('shop', ['shopDetail'])
-		},
-		filters: {
-			getNum(num) {
-				if (num) {
-					// 转为字符串
-					num += '';
-					let nu = num.slice(0, 1);
-					for (let i = 0; i < num.length - 1; i++) {
-						nu += 0
-					}
-					return nu
-				} else {
-					return 0
-				}
-			}
-		},
-		methods: {
-			init() {
-				// 查询国标
-				this.getProducts(2, 'salesOrder').then((data) => {
-					this.cartList = data;
-				})
-				// 查询电车
-				this.getProducts(5, 'salesOrder').then((data) => {
-					this.carTwoList = data;
-				})
-				// 查询电轻摩
-				this.getProducts(6, 'salesOrder').then((data) => {
-					this.carTreeList = data;
-				})
-			},
-			// 获取门店车辆信息
-			getProducts(sid, type) {
-				let data = {
-					sid: sid,
-					page: 1,
-					limit: 10,
-					store_id: this.shopDetail.id,
-					is_car: 1
-				}
-				// 保存查询分类
-				data[type] = 1
-				return new Promise((ok, erro) => {
-					getProducts(data).then(({
-						data
-					}) => {
-						ok(data)
-					}).catch((e) => {
-						erro(e)
-					})
-				})
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			}
-		},
-
-	};
-</script>
-
-<style lang="scss">
-	$paddingJg:40rpx;
-	.container{
-		/* #ifdef APP */
-		padding-top: calc(105rpx + var(--status-bar-height));
-		/* #endif */
-		/* #ifdef H5 || MP */
-		padding-top: 105rpx;
-		/* #endif */
-	}
-	.content {
-		.greenText {
-			color: $color-green;
-		}
-		.title {
-			font-size: 48rpx;
-			padding: 0 $paddingJg;
-			padding-top: 60rpx;
-		}
-
-		.tip {
-			font-size: 22rpx;
-			color: $font-color-light;
-			margin: 20rpx 0;
-			padding: 0 $paddingJg;
-		}
-
-		.shopContent {
-			color: $font-color-white;
-			background-color: $base-color;
-			border-radius: 20rpx;
-			height: 160rpx;
-			padding: 20rpx;
-			margin: 0 $paddingJg;
-			margin-bottom: 20rpx;
-
-			.shoplogo {
-				flex-shrink: 0;
-				background-color: $font-color-white;
-				width: 120rpx;
-				height: 120rpx;
-				border-radius: 20rpx;
-
-				.logo {
-					height: 100%;
-					width: 100%;
-				}
-			}
-
-			.shopDetail {
-				padding-left: 30rpx;
-				flex-grow: 1;
-
-				.shopName {
-					margin-bottom: 25rpx;
-					font-size: 36rpx;
-				}
-
-				.shopDetailText {
-					font-size: 22rpx;
-				}
-			}
-		}
-
-		.cartList {
-			flex-wrap: wrap;
-			margin: 0 $paddingJg;
-			overflow: hidden;
-
-			.itemBox {
-				width: 310rpx;
-				min-height: 460rpx;
-				background-color: $font-color-white;
-				border-radius: 20rpx;
-				box-shadow: 0px 0px 10px 0px rgba(226, 226, 226, 0.35);
-				margin-bottom: 30rpx;
-				overflow: hidden;
-
-				.imgBox {
-					line-height: 0;
-
-					.imageItem {
-						width: 310rpx;
-						height: 310rpx;
-					}
-				}
-
-				.itemDetaile {
-					padding: 10rpx 20rpx;
-
-					.cartName {
-						line-height: 1.5;
-						font-size: 28rpx;
-						color: $font-color-base;
-						font-weight: 400;
-						min-height: 90rpx;
-					}
-
-					.maney {
-						line-height: 1;
-
-						.lign {
-							margin-left: 20rpx;
-							color: $font-color-light;
-
-						}
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 1223
pages/index/indexComponents/onUser.vue

@@ -1,1223 +0,0 @@
-<template>
-	<view class="pageBox">
-		<view class="userOff" v-if="actionCartItem">
-			<view class="navBox">
-				<view class="flex topIconBox">
-					<image @click="navTo('/pages/index/shopTab?type=1')" class="topIcon"
-						src="../../../static/controller/witchShop.png" mode="widthFix"></image>
-					<view v-if="actionCartItem" class="clamp padding-l-10 padding-r-10">
-						{{actionCartItem.car_name||''}}
-					</view>
-					<image @click="navTo('/pages/index/notice')" class="topIcon"
-						src="../../../static/controller/witchMessage.png" mode="widthFix">
-					</image>
-					<view class="topIconNum flex" v-if="notify>0">
-						<text>
-							{{notify}}
-						</text>
-					</view>
-				</view>
-			</view>
-			<view class="actionBox">
-				<image class="cartImg" :src="actionCartItem.image" mode="aspectFit"></image>
-				<view class="timeBox" v-if="actionCartItem.day>0">
-					<view style="border-radius: 20rpx;"
-						class="rowContentBox flexCenter lineBorder padding-l-20 padding-r-20 padding-t-10 padding-b-10">
-						<view class="tipMen"></view>
-						<view class="dayBox" v-if="actionCartItem.car_operate">
-							<view>
-								{{actionCartItem.day}}
-							</view>
-							<view class="oldDay margin-t-10">
-								剩余天数
-							</view>
-						</view>
-						<view class="dayBox" v-else>
-							<view class="oldDay margin-t-10 font-color-red">
-								已欠费
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="leftNotify" v-if="fx">
-					<navigator url="/pages/index/share">
-						<image class="img" src="../../../static/image/redPage.png" mode="aspectFill"></image>
-					</navigator>
-				</view>
-			</view>
-			<view class="content">
-				<view class="contentButtom flexCenter">
-					<view class="buttomBox flex">
-						<view class="leftBox">
-							<view class="buttom buttomLg ">
-								<view @click="authSet" class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/shouquan.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											授权
-										</view>
-									</view>
-								</view>
-								<view class="rightPaddingBg">
-								</view>
-								<view class="buttomPaddingBg">
-								</view>
-							</view>
-							<view class="leftCenterButtom buttom" @click="navTo('/pages/user/money/recharge')">
-								<view class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view>
-										<view>
-											充
-										</view>
-										<view>
-											值
-										</view>
-									</view>
-								</view>
-								<view class="topBageBg"></view>
-								<view class="bottomBageBg"></view>
-							</view>
-							<view class="buttomLg buttom">
-								<view @click="navTo('/pages/user/reportForRepair/Report?id='+actionCartItem.car_number)"
-									class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/baoxiu.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											报修
-										</view>
-									</view>
-								</view>
-								<view class="topPaddingBg"></view>
-								<view class="rightPaddingBg"></view>
-							</view>
-						</view>
-						<view class="centerBgBox">
-							<view class="centerBg lineBorder borderRadiusAll">
-								<view class="borTopHide"></view>
-								<view class="borBottomHide"></view>
-							</view>
-							<view class="bgGray borderRadiusAll"></view>
-							<view class="contentOrg borderRadiusAll">
-								<view class="contentOrgBg borderRadiusAll centerBox lineBorder2 flexCenter">
-									<view class="centerBoxJb borderRadiusAll lineBorder2">
-										<view class="boxBgJb borderRadiusAll flexCenter">
-											<view class="flex-center">
-												<view class="iconButtomBox borderRadiusAll flexCenter"
-													:class="{greedBg:actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4}"
-													@click="tabCarStatus('tab',actionCartItem)">
-													<view class="mr borderRadiusAll "></view>
-													<view class="iconButtomJb">
-														<view>
-															<image class="img"
-																src="../../../static/controller/qidong.png"
-																mode="aspectFit"></image>
-														</view>
-														<view class="margin-t-10"
-															v-if="actionCartItem.status==1||actionCartItem.status==3||actionCartItem.status==4">
-															启动
-														</view>
-														<view class="margin-t-10" v-else>
-															关闭
-														</view>
-													</view>
-												</view>
-											</view>
-										</view>
-									</view>
-									<view class="line left"></view>
-									<view class="line right"></view>
-									<view @click="alertCartList" class="topButtomTipBox posbuttom flexCenter">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/huanche.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												换车
-											</view>
-										</view>
-									</view>
-									<view class="rightButtomTipBox posbuttom flexCenter"
-										@click="tabCarStatus('seek',actionCartItem)">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/xunche.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												寻车
-											</view>
-										</view>
-									</view>
-									<view
-										@click="openMap(actionCartItem.cartInfo.latitude,actionCartItem.cartInfo.longitude)"
-										class="bottomButtomTipBox posbuttom flexCenter">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/dingwei.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												定位
-											</view>
-										</view>
-									</view>
-									<view class="leftButtomTipBox posbuttom flexCenter"
-										@click="tabCarStatus('unlock',actionCartItem)">
-										<view class="centerTextBox">
-											<view>
-												<image class="tipIcon" src="../../../static/controller/kaisuo.png"
-													mode="aspectFit"></image>
-											</view>
-											<view class="margin-t-10">
-												开座垫
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="rightBox">
-							<view class="rightButtom buttom flex">
-
-								<view class="centerTextBox">
-									<view>
-										{{actionCartItem.bfb||0}}%
-									</view>
-									<view>
-										<image class="tipIcon" src="../../../static/controller/dianchi.png"
-											mode="aspectFit"></image>
-									</view>
-								</view>
-								<view class="rightElectric flexCenter">
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>91}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>83}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>75}"></view>
-									<view class="electric" :class="{greedBg:actionCartItem.bfb>66}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>58}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>50}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>41}"></view>
-									<view class="electric" :class="{yellowBg:actionCartItem.bfb>33}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>24}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>16}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>8}"></view>
-									<view class="electric" :class="{redGb:actionCartItem.bfb>0}"></view>
-								</view>
-							</view>
-							<view class=" buttomLg buttom"  @click="navTo('/pages/index/route?id='+actionCartItem.car_number)">
-								<view class="topBageBg"></view>
-								<view class="rowContentBox flexCenter lineBorder">
-									<view class="tipMen"></view>
-									<view class="centerTextBox margin-l-40 padding-l-30">
-										<view>
-											<image class="tipIcon" src="../../../static/controller/xincheng.png"
-												mode="aspectFit"></image>
-										</view>
-										<view class="margin-t-10">
-											行程
-										</view>
-									</view>
-								</view>
-								<view class="topPaddingBg"></view>
-								<view class="leftPaddingBg"></view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-popup ref="popup" type="bottom" v-if="actionCartItem">
-			<view class="cartListAlertButtom">
-				<view class="cartTitle flex">
-					<view>
-						请选择更换的车辆
-					</view>
-					<image @click="popupClose" class="exit" src="../../../static/icon/goodsExit.png" mode="scaleToFill">
-					</image>
-				</view>
-				<view class="actionCartBox">
-					<view class="itemCart flex" :class="{action:item.id==actionCartItem.id}"
-						v-for="(item,index) in myCartList" @click="changeCart(index)" :key='index'>
-						<image class="cartImg" :src="item.image" mode="scaleToFill"></image>
-						<view class="content">
-							<view class="title clamp2" :class="{action:item.id==actionCartItem.id}">
-								{{item.car_name||''}}
-							</view>
-							<view class="address margin-t-20" :class="{action:item.id==actionCartItem.id}">
-								{{item.address||"暂无定位信息"}}
-							</view>
-						</view>
-					</view>
-				</view>
-
-				<view style="height: 1px;"></view>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		mycar,
-		getCarInfo,
-		getcar_status,
-		car_switch,
-		getUserInfo
-	} from '@/api/user.js';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	// #ifdef MP
-	import {
-		openGetAddress,
-	} from '@/utils/rocessor.js';
-	// #endif
-	// #ifdef H5
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-	import {
-		weixindata
-	} from "@/utils/wxAuthorized.js"
-	// #endif
-	export default {
-		props: {
-			notify: {
-				type: Number,
-				default: 0
-			},
-		},
-		data() {
-			return {
-				chickedMyCart: 0, //默认选中的车辆
-				// 我的车辆
-				myCartList: [],
-				ladingCart: false, //判断是否已经加载过我的车辆
-				// #ifdef H5
-				iconPath: '../../static/image/location.png', //定位图标地址
-				// #endif
-				// #ifndef H5
-				iconPath: '../../../static/image/location.png', //定位图标地址
-				// #endif
-				timeOut: '', //用于存放调用定时获取对象数据
-				reachangeAlert:false,//判断是否已经提示过充值
-			};
-		},
-		watch: {
-			reachange(newValue, oldValue) {
-				if (newValue && (this.actionCartItem.auth_num != -1)) {
-					uni.showModal({
-						title: '错误',
-						content: '您的余额已不足三天支付是否马上充值',
-						cancelText: '关闭',
-						confirmText: '马上充值',
-						success: res => {
-							if (res.confirm) {
-								this.navTo('/pages/user/money/recharge');
-							}
-						},
-					});
-				}
-
-			}
-		},
-		computed: {
-			...mapState('user', ['address', 'userInfo']),
-			...mapState(['fx']),
-			actionCartItem() {
-				if (this.myCartList[this.chickedMyCart]) {
-					return this.myCartList[this.chickedMyCart]
-				} else {
-					return false
-				}
-			},
-			reachange() {
-				// 余额
-				const a1 = +this.userInfo.now_money;
-				if (!this.actionCartItem) {
-					return false
-				}
-				// 三天内应该付的金额
-				const a2 = this.actionCartItem.day_deducted * 3;
-				if (a1 < a2 && !this.reachangeAlert&&this.actionCartItem.day>0) {
-					// 处理已加载提示用户充值信息
-					this.reachangeAlert = true;
-					return (new Date()).getTime()
-				} else {
-					return false
-				}
-			}
-		},
-		created() {
-			this.getUserInfo();
-		},
-		beforeDestroy() {
-
-		},
-		methods: {
-			...mapMutations('user', ['setAddress', 'setUserInfo']),
-			// 加载初始数据
-			getUserInfo() {
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data)
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			// 设置tabbar背景颜色
-			setTabbar() {
-				uni.setTabBarStyle({
-					backgroundColor: '#25273E'
-				})
-			},
-			// 父元素启动监听
-			onStartGetCartInfo() {
-				console.log('监听');
-				if (this.timeOut) {
-					this.outGetCartInfo();
-				}
-				this.onGetCartInfo()
-			},
-			// 关闭定时获取车辆信息
-			outGetCartInfo() {
-				clearInterval(this.timeOut)
-			},
-			onGetCartInfo() {
-				this.getCarInfo(this.myCartList[this.chickedMyCart]);
-				this.timeOut = setInterval((e) => {
-					this.getCarInfo(this.myCartList[this.chickedMyCart]);
-				}, 60000)
-			},
-			// tab改变事件
-			changetab(tab) {
-				this.myCartList[this.chickedMyCart].status = tab
-			},
-			// 关闭车辆选择弹窗
-			popupClose() {
-				this.$refs.popup.close();
-			},
-			// 显示车辆选择列表
-			alertCartList() {
-				// 打开选择弹窗
-				this.$refs.popup.open();
-			},
-			// 打开地图导航
-			openMap(lat, long) {
-				uni.openLocation({
-					latitude: +lat,
-					longitude: +long,
-					complete(e) {
-						console.log(e, '地图打开');
-					}
-				})
-			},
-			// 切换更新车辆信息
-			changeCart(index) {
-				this.$refs.popup.close();
-				this.chickedMyCart = index;
-				// 判断是否已经加载过车辆信息未加载则更新信息
-				// if(!this.myCartList[this.chickedMyCart].cartInfoLoading){
-				const cart = this.myCartList[this.chickedMyCart];
-				this.getCarInfo(cart);
-				this.$emit("changeCart", cart)
-				// }
-			},
-			// 载入我的车辆列表
-			loadCard() {
-				let that = this;
-				mycar({}).then((e) => {
-					// 判断数据是由有过更新
-					if (that.myCartList.length != e.data.data.length) {
-						that.myCartList = e.data.data.map((e) => {
-							// 保存百分比
-							e.bfb = 0;
-							// 保存车辆消息
-							e.cartInfo = {}
-							// 判断是否已经加载数据
-							e.cartInfoLoading = false
-							return e
-						});
-						// 初始化选中的车辆
-						that.chickedMyCart = 0;
-						that.getCarInfo(that.myCartList[that.chickedMyCart])
-					}
-				}).catch((e) => {
-					console.log();
-				})
-			},
-			// 加载车辆信息
-			getCarInfo(item) {
-				getcar_status({
-					car_number: item.car_number
-				}).then((e) => {
-					// console.log(e, '车辆');
-					if (e.data.id) {
-						// 保存车辆信息
-						item.cartInfo = e.data;
-						// 保存电量百分比
-						item.bfb = +e.data.residue
-						item.cartInfo.latitude = +item.cartInfo.latitude;
-						item.cartInfo.longitude = +item.cartInfo.longitude;
-						if (!item.cartInfoLoading) {
-							this.onStartGetCartInfo()
-						}
-						// item.day = e.data.day;
-						item.cartInfoLoading = true;
-					}
-				}).catch((e) => {
-					console.log(e);
-				})
-			},
-			// 调用切换
-			tabCarStatus(type = 'tab', item) {
-				uni.showLoading({
-					title: '请求发送中',
-					mask: true
-				});
-				let that = this;
-				let data = {
-					car_number: item.car_number,
-				};
-				// 是否开关锁
-				if (type == 'tab') {
-					data.status = (item.status == 1) ? 2 : 1;
-				}
-				// 是否解锁
-				if (type == 'unlock') {
-					data.status = 7;
-				}
-				// 是否寻车
-				if (type == 'seek') {
-					data.status = 5;
-				}
-				// #ifdef H5
-				let bool = uni.getStorageSync('weichatBrowser') || '';
-				uni.showLoading({
-					title: '获取地址中',
-					mask: true
-				});
-				// 判断是否公众号
-				if (bool) {
-					weixindata().then(() => {
-						weixinObj.getLocation({
-							type: 'gcj02',
-							success: (e) => {
-								uni.hideLoading()
-								data.latitude = e.latitude;
-								data.longitude = e.longitude;
-								that.car_switch(data, type, item)
-							},
-							fail() {
-								uni.hideLoading()
-							}
-						});
-					})
-				} else {
-					uni.getLocation({
-						type: 'gcj02',
-						success(e) {
-							uni.hideLoading()
-							data.latitude = e.latitude;
-							data.longitude = e.longitude;
-							that.car_switch(data, type, item)
-						},
-						fail(e) {
-							uni.hideLoading()
-							console.log(e, 'cw');
-						}
-					})
-				}
-
-				// #endif
-
-				// #ifdef MP
-				// 判断是否已经有位置数据
-
-				if (!that.address.latitude || !that.address.longitude) {
-					// 判断是否已经获取授权
-					openGetAddress().then((e) => {
-						uni.showLoading({
-							title: '获取地址中',
-							mask: true
-						});
-						// 获取当前选中开锁的对象
-						wx.startLocationUpdateBackground({
-							type: 'gcj02',
-							success: (e) => {
-								uni.hideLoading()
-								// 调用鉴定位置变化事件
-								wx.onLocationChange((res) => {
-									console.log(res, '位置数据');
-									// 保存当前经纬度
-									that.setAddress({
-										latitude: res.latitude,
-										longitude: res.longitude
-									})
-									// 判断是否已经加载过最近商家信息
-									if (!that.loadShopData) {
-										data.latitude = res.latitude;
-										data.longitude = res.longitude;
-										that.car_switch(data, type, item)
-										that.loadShopData = true;
-									}
-								})
-							},
-							fail: () => {
-								uni.hideLoading()
-							}
-						})
-
-					})
-				} else {
-					data.latitude = that.address.latitude;
-					data.longitude = that.address.longitude;
-					that.car_switch(data, type, item)
-				}
-				// #endif
-				// #ifdef APP
-				uni.getLocation({
-					type:'gcj02',
-					success(res){
-						data.latitude =res.latitude;
-						data.longitude = res.longitude;
-						that.car_switch(data, type, item);
-					},fail(e) {
-						uni.showModal({
-							title: '授权失败',
-							content: '未授权定位权限无法开启仪表盘功能',
-							showCancel: false,
-						});
-						console.log(e);
-					}
-				})
-				// #endif
-			},
-			// 保存地址
-			car_switch(data, type, item) {
-				uni.showLoading({
-					title: '请求发送中',
-					mask: true
-				});
-				car_switch(data).then((e) => {
-					if (type == 'tab') {
-						item.status = (item.status == 1) ? 2 : 1;
-					}
-					uni.hideLoading()
-					uni.showToast({
-						title: e.msg
-					});
-				}).catch((e) => {
-					uni.hideLoading()
-					uni.showModal({
-						title: '错误',
-						content: e.msg,
-						showCancel: false,
-					});
-				})
-			},
-			// 判断是否有权限授权车辆
-			authSet(){
-				if(this.actionCartItem.auth_num!=-1){
-					this.navTo('/pages/user/myCart/authorization?id='+this.actionCartItem.car_number)
-				}else{
-					uni.showModal({
-						title: '提示',
-						content: '该车辆是他人授权给您的车辆您无权二次授权',
-						showCancel: false,
-					});
-				}
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url: url
-				})
-			}
-		},
-
-	};
-</script>
-
-<style lang="scss">
-	$paddingJg:40rpx;
-	// 按钮黑色背景
-	$bgBlack:#161727;
-	// 底色
-	$contentBg:#373c5a;
-	// 按钮包裹框背景颜色
-	$maxBoxBg:#1f2136;
-
-	.pageBox {
-		height: 0;
-		min-height: 100%;
-	}
-
-	.flexCenter {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-
-	.navBox {
-		/* #ifdef APP */
-		padding-top: var(--status-bar-height);
-		padding-bottom: 30rpx;
-		/* #endif */
-		/* #ifdef H5 || MP */
-		padding-top: 30rpx;
-		padding-bottom: 30rpx;
-		/* #endif */
-		background-color: $contentBg;
-		flex-shrink: 0;
-	}
-
-	.topIconBox {
-		padding: 0 $paddingJg;
-		position: relative;
-		color: #FFFFFF;
-		font-size: $font-base + 2rpx;
-
-		.topIconNum {
-			position: absolute;
-			top: -10rpx;
-			right: 20rpx;
-			font-size: $font-sm;
-			min-width: 30rpx;
-			min-height: 30rpx;
-			border-radius: 100rpx;
-			background-color: $color-red;
-			padding: 5rpx;
-			justify-content: center;
-		}
-
-		.topIcon {
-			transform: rotateZ(-90deg);
-			width: 45rpx;
-			height: 45rpx;
-			flex-shrink: 0;
-		}
-	}
-
-	.userOff {
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-
-		.actionBox {
-			background-color: #0f1025;
-			flex-shrink: 1;
-			flex-grow: 1;
-			text-align: center;
-			height: 400rpx;
-			position: relative;
-
-			.cartImg {
-				height: 100%;
-				width: 100%;
-			}
-
-			.leftNotify {
-				position: absolute;
-				top: 20rpx;
-				left: 30rpx;
-
-				.img {
-					width: 120rpx;
-					height: 120rpx;
-				}
-			}
-
-			.timeBox {
-				position: absolute;
-				color: #FFFFFF;
-				right: 30rpx;
-				top: 30rpx;
-				font-size: $font-base;
-				font-weight: bold;
-
-				.dayBox {
-					z-index: 1;
-					line-height: 1;
-				}
-
-				.oldDay {
-					font-size: $font-sm - 2rpx;
-					color: $font-color-disabled;
-				}
-
-				.tipMen {
-					transform-origin: top left;
-					margin-left: 0;
-				}
-			}
-		}
-
-		.content {
-			flex-shrink: 0;
-			flex-grow: 1;
-		}
-
-		.lineBorder {
-			border: 1px solid #aaaec7;
-		}
-
-		.lineBorder2 {
-			border: 1px solid #b7cbf2;
-		}
-
-		.rowContentBox {
-			overflow: hidden;
-			background-color: $contentBg;
-
-			.tipMen {
-				position: absolute;
-				top: 0;
-				left: 0;
-				transform-origin: top left;
-				margin-left: -40rpx;
-				transform: rotateZ(-45deg);
-				height: 100%;
-				width: 100%;
-				background-image: linear-gradient(to bottom, rgba(69, 75, 113, 1) 0%, transparent 100%);
-			}
-		}
-
-		.rowContentBox,
-		.centerBox {
-			height: 100%;
-			width: 100%;
-			position: relative;
-		}
-
-		.contentButtom {
-
-			width: 750rpx;
-			height: 100%;
-			background-color: $maxBoxBg;
-			font-size: $font-base;
-			line-height: 1;
-
-			.centerTextBox {
-				text-align: center;
-				margin-left: -70rpx;
-			}
-
-			.tipIcon {
-				width: 46rpx;
-				height: 46rpx;
-			}
-
-			.buttomBox {
-				width: 750rpx;
-				padding: 40rpx;
-				color: #B2B9D3;
-
-				.buttom {
-					padding: 10rpx;
-					background-color: $bgBlack;
-					position: relative;
-
-					.rightPaddingBg,
-					.topPaddingBg,
-					.leftPaddingBg,
-					.buttomPaddingBg {
-						position: absolute;
-						background-color: $bgBlack;
-						z-index: 11;
-					}
-
-					.topPaddingBg,
-					.buttomPaddingBg {
-						height: 12rpx;
-						width: 180rpx;
-						left: 0;
-					}
-
-					.rightPaddingBg,
-					.leftPaddingBg {
-						height: 180rpx;
-						width: 10rpx;
-						top: 0rpx;
-					}
-
-					.topPaddingBg {
-						top: -1px;
-					}
-
-					.buttomPaddingBg {
-						button: 0rpx;
-					}
-
-					.rightPaddingBg {
-						right: 0rpx;
-					}
-
-					.leftPaddingBg {
-						left: 0;
-					}
-
-					.topBageBg,
-					.bottomBageBg {
-						height: 30rpx;
-						width: 180rpx;
-						background-color: $maxBoxBg;
-						position: absolute;
-						z-index: 10;
-					}
-
-					.topBageBg {
-						top: -30rpx;
-					}
-
-					.bottomBageBg {
-						bottom: -30rpx;
-					}
-				}
-
-				.centerBox {
-					// background-image: linear-gradient(to bottom, #49548d 0%, transparent 100%);
-					background-color: rgba($color: #49548d, $alpha: 0.5);
-					box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5) inset;
-				}
-
-
-				.buttomLg {
-					width: 180rpx;
-					height: 180rpx;
-				}
-
-
-				.leftBox {
-					.leftCenterButtom {
-						margin: 30rpx 0;
-						width: 80rpx;
-						height: 120rpx;
-						background-size: 80rpx 120rpx;
-						z-index: 99;
-
-						.tipMen {
-							margin-left: 0rpx;
-						}
-					}
-				}
-
-				.centerBgBox {
-					flex-shrink: 1;
-					position: relative;
-
-					.borderRadiusAll {
-						border-radius: 1000rpx;
-					}
-
-					.bgGray {
-						position: absolute;
-						top: 0;
-						left: 0;
-						background-color: $maxBoxBg;
-						width: 530rpx;
-						height: 530rpx;
-						z-index: 20;
-						left: -265rpx;
-						top: -265rpx;
-					}
-
-					.contentOrg {
-						position: absolute;
-						background-color: $bgBlack;
-						width: 480rpx;
-						height: 480rpx;
-						left: -240rpx;
-						top: -240rpx;
-						z-index: 99;
-						padding: 20rpx;
-
-						.contentOrgBg {
-							width: 100%;
-							height: 100%;
-							position: relative;
-							background-color: $contentBg;
-							background-image: linear-gradient(to bottom, rgba($color: #454b71, $alpha: 1) 0%, transparent 25%, transparent 75%, rgba($color: #454b71, $alpha: 1) 100%);
-
-							.posbuttom {
-								position: absolute;
-
-								.centerTextBox {
-									margin: 0;
-								}
-							}
-
-							.topButtomTipBox {
-								top: 0;
-								padding-bottom: 20rpx;
-							}
-
-							.bottomButtomTipBox {
-								bottom: 0;
-								padding-top: 20rpx;
-							}
-
-							.bottomButtomTipBox,
-							.topButtomTipBox {
-								width: 200rpx;
-								height: 140rpx;
-								margin: 0 auto;
-							}
-
-							.rightButtomTipBox,
-							.leftButtomTipBox {
-								width: 140rpx;
-								height: 200rpx;
-							}
-
-							.rightButtomTipBox {
-								padding-left: 20rpx;
-								right: 0;
-							}
-
-							.leftButtomTipBox {
-								padding-right: 20rpx;
-								left: 0;
-							}
-
-							.line {
-								position: absolute;
-								width: calc(440rpx + 2px);
-								height: 20rpx;
-								border-top: 1px solid #b7cbf2;
-								border-bottom: 1px solid #b7cbf2;
-								border-left: 1px solid $bgBlack;
-								border-right: 1px solid $bgBlack;
-								background-color: $bgBlack;
-								box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
-
-								&.left {
-									transform: rotateZ(45deg);
-								}
-
-								&.right {
-									transform: rotateZ(-45deg);
-
-								}
-							}
-
-							.centerBoxJb {
-								width: 200rpx;
-								height: 200rpx;
-								background-color: $bgBlack;
-								box-shadow: 0px 0px 30rpx rgba($color: #5a6fdb, $alpha: 0.5);
-								position: relative;
-
-								.boxBgJb {
-									background-color: $bgBlack;
-									width: 100%;
-									height: 100%;
-									position: absolute;
-									z-index: 1;
-
-									.iconButtomBox {
-										font-size: $font-base;
-										color: #FFFFFF;
-										font-weight: bold;
-										width: 160rpx;
-										height: 160rpx;
-										background-color: #DEDEDE;
-										text-align: center;
-										background-color: #F6C531;
-										position: relative;
-
-										&.greedBg {
-											background-color: $color-green;
-										}
-
-										.mr {
-											position: absolute;
-											height: 100%;
-											width: 100%;
-											background-image: linear-gradient(to bottom, rgba($color: #FFFFFF, $alpha: 0.2) 0%, rgba($color: #FFFFFF, $alpha: 0) 50%, rgba($color: #FFFFFF, $alpha: 0) 100%);
-											box-shadow: 0px 0px 20rpx rgba($color: #FFFFFF, $alpha: 0.5) inset;
-										}
-
-										.iconButtomJb {
-											.img {
-												width: 75rpx;
-												height: 75rpx;
-
-											}
-										}
-									}
-								}
-							}
-						}
-					}
-
-					.centerBg {
-						position: absolute;
-						left: -280rpx;
-						top: -280rpx;
-						background-color: $bgBlack;
-						width: 560rpx;
-						height: 560rpx;
-						z-index: 10;
-
-						.borTopHide {
-							top: -10rpx;
-							left: 120rpx;
-						}
-
-						.borBottomHide,
-						.borTopHide {
-							position: absolute;
-							height: 100rpx;
-							width: 316rpx;
-							background-color: $maxBoxBg;
-						}
-
-
-						.borBottomHide {
-							left: 120rpx;
-							bottom: -10rpx;
-						}
-					}
-				}
-
-				.rightBox {
-					flex-shrink: 0;
-
-					.rightElectric {
-						flex-direction: column;
-						padding-right: 6rpx;
-
-						.electric {
-							width: 40rpx;
-							height: 10rpx;
-							// border-radius: 10rpx;
-							background-color: $maxBoxBg;
-							margin-bottom: 16rpx;
-
-							// &:last-child{
-							// 	border-bottom-left-radius: 10rpx;
-							// 	border-bottom-right-radius: 10rpx;
-							// }
-							// &:first-child{
-							// 	border-top-left-radius: 10rpx;
-							// 	border-top-right-radius: 10rpx;
-							// }
-							&.greedBg {
-								background-color: $color-green;
-							}
-
-							&.yellowBg {
-								background-color: #F6C531;
-							}
-
-							&.redGb {
-								background-color: #DE2C2C;
-							}
-						}
-					}
-
-					.rightButtom {
-						position: relative;
-						z-index: 11;
-						margin-bottom: 30rpx;
-						width: 180rpx;
-						height: 330rpx;
-						padding-left: 30rpx;
-						padding-top: 16rpx;
-						align-items: flex-start;
-
-						.centerTextBox {
-							text-align: right;
-							margin-left: 16rpx;
-
-						}
-					}
-				}
-
-			}
-		}
-	}
-
-	.cartListAlertButtom {
-		position: relative;
-		padding-top: 20rpx;
-		border-top-left-radius: 30rpx;
-		border-top-right-radius: 30rpx;
-		background-color: #FFFFFF;
-		z-index: 999;
-		/* #ifdef H5 */
-		padding-bottom: var(--window-bottom);
-
-		/* #endif */
-		.actionCartBox {
-			padding-bottom: 40rpx;
-
-			.itemCart {
-				background-color: #F3F6F8;
-				margin: 0 30rpx 30rpx;
-				padding: 0 30rpx;
-				border-radius: 20rpx;
-				height: 200rpx;
-				text-align: left;
-
-				&.action {
-					background-color: $color-green;
-				}
-
-				.cartImg {
-					width: 120rpx;
-					height: 120rpx;
-				}
-
-				.content {
-					flex-grow: 1;
-					padding-left: 20rpx;
-				}
-
-				.title {
-					font-size: $font-base;
-					font-weight: bold;
-					color: $font-color-base;
-
-					&.action {
-						color: #FFFFFF;
-					}
-				}
-
-				.address {
-					line-height: 1;
-					font-size: $font-sm - 2rpx;
-					color: $font-color-disabled;
-
-					&.action {
-						color: #FFFFFF;
-					}
-				}
-			}
-		}
-
-		.cartTitle {
-			margin: 0 30rpx;
-			margin-bottom: 30rpx;
-			font-size: $font-lg;
-			font-weight: bold;
-
-			.exit {
-				width: 50rpx;
-				height: 50rpx;
-			}
-		}
-
-	}
-</style>

+ 6 - 6
pages/index/shopTab.vue

@@ -138,12 +138,12 @@
 						}, 1500)
 					}
 					console.log();
-					if (+this.type == 1) {
-						this.setShopInfo(item);
-						uni.navigateTo({
-							url: '/pages/shop/shopIndex?id=' + item.id
-						})
-					}
+					// if (+this.type == 1) {
+					// 	this.setShopInfo(item);
+					// 	uni.navigateTo({
+					// 		url: '/pages/shop/shopIndex?id=' + item.id
+					// 	})
+					// }
 				}else {
 					let prepage = that.$api.prePage();
 					prepage.selctStore = item

+ 1013 - 0
pages/order/createOrderT.vue

@@ -0,0 +1,1013 @@
+<template>
+	<view class="padding-t-30">
+		<view class="qrimg">
+			<tki-qrcode :cid="ciddk" ref="qrcodet" :val="valdk" :size="size" :unit="unit" :background="background"
+				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:showLoading="showLoading" :loadMake="loadMake" :usingComponents="usingComponents" @result="qrRdk" />
+			<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvass" id="myCanvass"
+				class="hb"></canvas>
+		</view>
+		<!-- 地址 -->
+		<navigator url="" class="address-section">
+			<view class="order-content" v-if="userInfo.store_id">
+				<view class="addAddress">
+					<text class="iconfont iconaddition"></text>
+					<text>推荐渠道</text>
+				</view>
+			</view>
+			<view class="order-content" v-else>
+				<view class="cen">
+					<view class="top">
+						<text class="name">{{ shopDetail.name }}</text>
+						<text class="mobile">{{ shopDetail.phone }}</text>
+					</view>
+					<text
+						class="address flex">{{ shopDetail.address.split(',')[0] + shopDetail.address.split(',')[1]  }}{{ shopDetail.name }}</text>
+				</view>
+				<text class="iconfont iconenter"></text>
+			</view>
+		</navigator>
+		<view class="goodsList">
+
+			<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
+				<!-- 商品列表 -->
+				<view class="g-item">
+					<image :src="ls.productInfo.image"></image>
+					<view class="right">
+						<text class="title clamp">{{ ls.productInfo.store_name }}</text>
+						<text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
+						<view class="price-box">
+							<text
+								class="price">¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
+							<text class="number">{{ 'x ' + ls.cart_num + (ls.productInfo.unit_name || '') }}</text>
+							<!-- <view class="number">
+							<uni-number-box class="step" :value="lss.number" :index="indx" @eventChange="numberChange"></uni-number-box>
+						</view> -->
+						</view>
+						<view class="serverSet" v-if="ls.day>0">
+							(<text>服务费:{{ls.day_deducted}}</text>
+							<text class="margin-l-10">服务天数:{{ls.day}}天</text>)
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 金额明细 -->
+		<view class="yt-list">
+			<!-- <view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">运费</text>
+				<text class="cell-tip disabled">{{ Postage }}</text>
+			</view> -->
+			<view class="yt-list-cell b-b" v-if="deposit">
+				<text class="cell-tit clamp">押金</text>
+				<text class="cell-tip disabled">{{ deposit }}</text>
+			</view>
+			<view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">备注</text>
+				<input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
+			</view>
+			<view class="yt-list-cell b-b" @click="userQxq()" >
+				<view class="cell-tit flex" >
+					<image class="orderIcon" src="../../static/icon/qxq.png" mode="widthFix"></image>
+					<text class="margin-l-10">使用骑行券抵扣(可用骑行券({{userInfo.certificate}})</text>
+				</view>
+				<image class="checked" v-if="isqxq" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+		</view>
+		<view class="yt-list">
+			<view class="yt-list-cell b-b" @click="choosePayType('pxz')">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/zqdk.png" mode="widthFix"></image>
+					<text class="margin-l-10">使用代扣</text>
+				</view>
+				<image class="checked" v-if="payType=='pxz'" src="../../static/icon/addressIconXz.png"
+					mode="widthFix"></image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<view class="yt-list-cell b-b" v-if="fx" @click="choosePayType('weixin')">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/orderWx.png" mode="widthFix"></image>
+					<text class="margin-l-10">微信支付</text>
+				</view>
+				<image class="checked" v-if="payType=='weixin'" src="../../static/icon/addressIconXz.png"
+					mode="widthFix"></image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="yt-list-cell b-b" @click="choosePayType('ali')">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/orderAli.png" mode="widthFix"></image>
+					<text class="margin-l-10">支付宝</text>
+				</view>
+				<image class="checked" v-if="payType=='ali'" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #endif -->
+			<view class="yt-list-cell b-b" @click="choosePayType('yue')">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/ye.png" mode="widthFix"></image>
+					<text class="margin-l-10">余额({{now_money}})</text>
+				</view>
+				<image class="checked" v-if="payType=='yue'" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+			
+		</view>
+		<view class="myj-wrap" v-if="dkQrcodeUrl">
+			<view class="ewm-wrap">
+				<!-- 	<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvass" id="myCanvass"
+					class="hb"></canvas> -->
+				<image :src="dkQrcodeUrl" mode="" :style="{ width:cw + 'rpx', height: ch+'rpx',}"></image>
+			</view>
+			<view class="bcewm" @click="saveShareQrcode('dkQrcodeUrl')">
+				保存二维码
+			</view>
+		</view>
+
+		<!-- 底部 -->
+		<view class="footer" v-show="!dkQrcodeUrl">
+			<view class="price-content">
+				<text>实付款</text>
+				<text class="price-tip">¥</text>
+				<text class="price">{{ payPrice }}</text>
+			</view>
+			<text class="submit" :class="{submitNo:payLoding}" @click="payLoding?'':submit()">{{payType == 'pxz'? '生成二维码': '提交订单'}}</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {loadIndexs,createSignFLow} from '@/api/index.js'
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		confirm,
+		computedOrderkey,
+		createOrderkey,
+		orderPay
+	} from '@/api/order.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				isqxq: false,//是否使用骑行券
+				ewmw: 300, //二维码相对宽度
+				cw: 702, //画布相对宽度
+				ch: 600, //画布相对高度
+				dkQrcodeUrl: '',
+				canvasW: '', //画布宽度
+				canvasH: '', //画布高度
+				ewmImg: '', //二维码图片信息
+				erweimasrc: '', //生成的二维码图片
+				dkerweima: '',
+				ciddk: 'dk-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				size: 300, //生成的二维码大小
+				unit: 'upx', //大小单位尺寸
+				// show: true,//默认使用组件中的image标签显示二维码
+				val: '', //要生成的内容
+				valdk: '',
+				background: '#ffffff', //二维码背景色
+				foreground: '#333333', //二维码前景色
+				pdground: '#333333', //二维码角标色
+				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
+				iconSize: 40, //二维码图标大小
+				lv: 3, //容错级别
+				onval: true, //监听val值变化自动重新生成二维码
+				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
+				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
+				showLoading: false, //是否显示loading
+				is_battery: 0,
+				is_booster: 0,
+				battery_deposit: 0,//押金
+				userInfo: {},
+				deposit_waiver: false,//是否免押
+				payType: '',
+				desc: '', //备注
+				// 收货地址
+				addressData: {},
+				// 商品列表
+				shopList: [],
+				// 购物车id
+				cartId: '',
+				//购物金额详情
+				moneyAll: {
+					storeFreePostage: 0, //邮费优惠
+					storePostage: 0, //邮费
+					totalPrice: 0, //总支付金额
+					vipPrice: 0 //vip优惠价
+				},
+				payPrice: 0, //总支付金额
+				orderKey: '', //订单id
+				payLoding: true, //判断是否支付中
+				orderId: '', //订单id
+				now_money: 0, //余额
+				onShopId: -1, //默认-1为不存在商家id
+				deposit: 0,//押金
+			};
+		},
+		onLoad(option) {
+			// 保存当前商品在购物车中的id
+			this.cartId = option.id;
+			// 判断是否要读取商家id
+			if (option.shopId) {
+				this.onShopId = option.shopId;
+			}
+			if(option.is_battery) {
+				this.is_battery = option.is_battery
+			}
+			if(option.is_booster) {
+				this.is_booster = option.is_booster
+			}
+			this.loadData();
+			this.userinfo();
+			this.loadIndexs()
+			console.log('shopDetail',this.shopDetail);
+		},
+		watch:{
+			isqxq(n,o) {
+				this.payMoneyNub()
+			}
+		},
+		computed: {
+			Postage() {
+				let money = +this.moneyAll.storePostage;
+				if (money == 0) {
+					return '免运费';
+				} else {
+					return '¥' + money;
+				}
+			},
+			payAllMoney() {
+				return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
+			},
+			...mapState('shop', ['shopDetail']),
+			...mapState(['fx'])
+		},
+		methods: {
+			userQxq() {
+				if(this.payType == 'pxz') {
+					return this.$api.msg('周期代扣无法使用骑行券')
+				}
+				this.isqxq  = !this.isqxq
+			},
+			choosePayType(payType) {
+				if(payType == this.payType) {
+					return
+				}
+				this.dkQrcodeUrl = ''
+				if(payType == 'pxz' && this.userInfo.battery_deposit == 0) {
+					return uni.showModal({
+						title: '提示',
+						content: '您未支付押金,暂无法使用代扣服务。',
+						showCancel: false,
+					});
+				}
+				this.payType = payType
+				if(this.payType == 'pxz') {
+					this.isqxq = false
+				}
+			},
+			// 获取图片信息
+			getImageInfo(image) {
+				return new Promise((req, rej) => {
+					uni.getImageInfo({
+						src: image,
+						success: function(res) {
+							req(res)
+						},
+					});
+				})
+			},
+			// 获取设备信息
+			getSystemInfo() {
+				return new Promise((req, rej) => {
+					uni.getSystemInfo({
+						success: function(res) {
+							req(res)
+						}
+					});
+				})
+			},
+			async createPoster(imgname, ewmimg, cavid, tit = '') {
+				let that = this
+				// 获取设备信息,主要获取宽度,赋值给canvasW 也就是宽度:100%
+				that.SystemInfo = await that.getSystemInfo();
+			
+				that.ewmImg = await that.getImageInfo(ewmimg);
+				// this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+				that.ratio = that.SystemInfo.windowWidth / 750;
+				that.canvasW = that.cw * that.ratio;
+				this.canvasH = that.ch * that.ratio;
+				that.ewmW = that.ewmw * that.ratio;
+			
+				// 如果主图,二维码图片,设备信息都获取成功,开始绘制海报,这里需要用setTimeout延时绘制,否则可能会出现图片不显示。
+				if (that.ewmImg.errMsg == 'getImageInfo:ok' && that.SystemInfo.errMsg == 'getSystemInfo:ok') {
+					console.log('二维码和屏幕信息加载完成')
+					setTimeout(() => {
+						var ctx = uni.createCanvasContext(cavid, that);
+						// 填充背景色,白色
+						ctx.setFillStyle('#fff'); // 默认白色
+						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
+						// drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+						ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2), 100 * that.ratio,
+							this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+						// 3、绘制商品标题,多余文字自动换行
+						ctx.setFontSize(16); // setFontSize() 设置字体字号
+						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+						ctx.setTextAlign('center')
+						ctx.fillText('请使用支付宝扫描上方二维码', this.canvasW / 2, 200 * that.ratio + that.ewmW)
+						ctx.fillText(tit, this.canvasW / 2, 260 * that.ratio + that.ewmW)
+						ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
+							that.fina = true
+							uni.canvasToTempFilePath({ // 保存canvas为图片
+								canvasId: cavid,
+								quality: 1,
+								fileType: 'jpg',
+								complete: function(res) {
+									// 在H5平台下,tempFilePath 为 base64, // 图片提示跨域 H5保存base64失败,APP端正常输出临时路径
+									console.log(res)
+									// that.canvasShow = false
+									that[imgname] = res.tempFilePath
+									that.$forceUpdate()
+									uni.hideLoading()
+									that.payLoding = false;
+									// setTimeout(function() {
+									// 	console.log(that.shareQrcodeUrl, that
+									// 		.canvasShow)
+									// }, 2000)
+								},
+							})
+						});
+					}, 1500)
+				} else {
+					console.log('err')
+				}
+			},
+			qrRdk(res) {
+				this.dkerweima = res
+				this.createPoster('dkQrcodeUrl', this.dkerweima, 'myCanvass', '完成代扣服务')
+			},
+			loadIndexs() {
+				loadIndexs().then(res => {
+					console.log(res);
+					this.battery_deposit = (res.data.battery_deposit*1).toFixed(2)
+				})
+			},
+			// 加载用户基础信息
+			userinfo() {
+				getUserInfo({}).then(({
+					data
+				}) => {
+					this.userInfo = data
+					this.now_money = data.now_money;
+				});
+			},
+			// 计算支付金额
+			payMoneyNub() {
+				computedOrderkey({
+					is_certificate: this.isqxq,
+						orderkey: this.orderKey,
+						useIntegral: 0, //是否积分抵扣
+						addressId: this.addressData.id //地址编号
+					})
+					.then(({
+						data
+					}) => {
+						this.integralShow = true;
+						// 获取支付金额
+						this.payPrice = +data.result.pay_price;
+						this.integralMoney = data.result.deduction_price;
+						this.payLoding = false
+						this.deposit = +data.result.deposit
+					})
+					.catch(e => {
+						console.log(e);
+						this.payLoding = true
+						this.integralShow = false;
+					});
+			},
+			// 加载基础数据
+			loadData() {
+				let obj = this;
+				confirm({
+					cartId: obj.cartId + ''
+				}).then(({
+					data
+				}) => {
+					obj.addressData = data.addressInfo || {};
+					obj.shopList = data.cartInfo; //商品列表
+					obj.moneyAll = data.priceGroup; //金额数据
+					obj.orderKey = data.orderKey; //订单key
+					// 计算金额
+					this.payMoneyNub();
+				});
+			},
+			// 提交订单
+			submit() {
+				let obj = this;
+				// if (!this.addressData.real_name) {
+				// 	this.$api.msg('请选择收货地址');
+				// 	return false;
+				// }
+				if(!obj.payType) {
+					return obj.$api.msg('请选择支付方式')
+				}
+				// 判断是否余额不足
+				if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+					});
+					return;
+				}
+				if(obj.payType == 'pxz') {
+					uni.showLoading({
+						title: '二维码生成中',
+						mask: true
+					})
+				}else {
+					uni.showLoading({
+						title: '支付中',
+						mask: true
+					})
+				}
+				
+				// 支付中
+				obj.payLoding = true;
+				// 判断是否为未支付订单中跳转进入
+				obj.firstCreateOrder();
+			},
+			// 订单金额支付
+			orderMoneyPay() {
+				let obj = this;
+				orderPay({
+						uni: obj.orderId,
+						// #ifdef H5
+						from: 'weixin', //来源
+						// #endif
+						// #ifdef MP-WEIXIN
+						from: 'routine', //来源
+						// #endif
+						// #ifdef APP-PLUS
+						from: 'app', //来源
+						// #endif
+						paytype: obj.payType //支付类型  weixin-微信 yue-余额
+					})
+					.then(e => {
+						// 判断是否微信小程序支付
+						if (obj.payType == 'weixin') {
+							// #ifdef H5 || MP
+							let da = e.data.result.jsConfig;
+							let data = {
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									obj.paySuccessTo();
+								},
+								fail: () => {
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							};
+							// #endif
+							// #ifdef H5
+							data.timestamp = da.timestamp;
+							weixinObj.chooseWXPay(data);
+							// #endif
+							// #ifdef MP-WEIXIN
+							data.timeStamp = da.timestamp;
+							wx.requestPayment(data);
+							// #endif
+							// #ifdef APP
+							console.log( e.data.result.jsConfig,'返回数值');
+							uni.requestPayment({
+								provider: 'wxpay',
+								orderInfo: e.data.result.jsConfig,
+								success(e) {
+									obj.paySuccessTo();
+								},
+								fail: (e) => {
+									console.log(e,'支付失败');
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							})
+							// #endif
+						}
+						// #ifdef APP
+						if(obj.payType == 'ali'){
+							uni.requestPayment({
+								provider: 'alipay',
+								orderInfo: e.data.result.jsConfig,
+								success(e) {
+									obj.paySuccessTo();
+								},
+								fail: (e) => {
+									console.log(e,'支付失败');
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							})
+						}
+						// #endif
+						uni.hideLoading();
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						// 支付完成
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			// 支付成功跳转
+			paySuccessTo() {
+				uni.hideLoading();
+				uni.redirectTo({
+					url: '/pages/user/money/paySuccess?orderid=' + this.orderId,
+				});
+			},
+			// 初次订单创建
+			firstCreateOrder() {
+				let obj = this;
+				// 获取下单页面数据
+				let prepage = obj;
+				let data = {
+					is_car: 0,
+					is_certificate: obj.isqxq,
+					is_booster: obj.is_booster,
+					is_battery: obj.is_battery,
+					real_name: prepage.addressData.real_name, //联系人名称
+					phone: prepage.addressData.phone, //联系人号码
+					addressId: prepage.addressData.id, //支付地址id
+					useIntegral: 0, //是否积分抵扣1为是0为否
+					payType: obj.payType, //支付类型  weixin-微信 yue-余额
+					mark: prepage.desc, //备注
+					// #ifdef H5
+					from: 'weixin', //来源
+					// #endif
+					// #ifdef MP-WEIXIN
+					from: 'routine', //来源
+					// #endif
+					// #ifdef APP-PLUS
+					from: 'app', //来源
+					// #endif
+					shipping_type: 2, //提货方式 1 快递 2自提
+				};
+				// 判断是否需要读取非默认商家id
+				if (obj.onShopId != -1) {
+					data.store_id = obj.onShopId;
+				} else {
+					if(obj.userInfo.store_id) {
+						data.store_id = obj.userInfo.store_id
+					}else {
+						data.store_id = obj.shopDetail.id;
+					}
+				}
+				// 生成订单
+				createOrderkey(data, obj.orderKey)
+					.then(({
+						data,
+						status,
+						msg
+					}) => {
+						// 判断是否支付失败
+						if (data.status == 'ORDER_EXIST') {
+							uni.showModal({
+								title: '提示',
+								content: msg,
+								showCancel: false
+							});
+							uni.hideLoading();
+							obj.payLoding = false;
+							return;
+						}
+						// 保存订单号
+						obj.orderId = data.result.orderId;
+						// 判断是否为余额支付
+						if (obj.payType == 'yue') {
+							console.log('余额支付', status == 200 && data.status == 'SUCCESS');
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+						} else if( obj.payType == 'pxz'){
+							createSignFLow().then(res => {
+								
+								obj.valdk = res.data.result.link
+							})
+						}else {
+							// 立即支付
+							obj.orderMoneyPay();
+						}
+					})
+					.catch(e => {
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+		padding-bottom: 100rpx;
+	}
+
+	.address-section {
+		border-radius: 20rpx;
+		padding: 30rpx;
+		margin: 0 $page-row-spacing;
+		background: #fff;
+		position: relative;
+
+		.order-content {
+			min-height: 100rpx;
+			display: flex;
+			align-items: center;
+
+			.leftIcon {
+				width: 36rpx;
+				margin: 0 30rpx;
+			}
+
+			.addAddress {
+				text-align: center;
+				width: 100%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+
+				.iconaddition {
+					font-size: 55rpx;
+					line-height: 1;
+					border-radius: 100rpx;
+					margin-right: 20rpx;
+				}
+			}
+		}
+
+		.iconlocation {
+			flex-shrink: 0;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 90rpx;
+			color: #888;
+			font-size: 44rpx;
+		}
+
+		.cen {
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			font-size: 28rpx;
+			color: $font-color-dark;
+		}
+
+		.name {
+			font-size: 34rpx;
+			margin-right: 24rpx;
+		}
+
+		.address {
+			margin-top: 16rpx;
+			margin-right: 20rpx;
+			color: $font-color-light;
+		}
+
+		.icon-you {
+			font-size: 32rpx;
+			color: $font-color-light;
+			margin-right: 30rpx;
+		}
+
+		.a-bg {
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			display: block;
+			width: 100%;
+			height: 5rpx;
+		}
+	}
+
+	.goodsList {
+		margin: 0 $page-row-spacing;
+		padding: 30rpx;
+		background: #fff;
+		border-radius: 20rpx;
+		margin-top: 30rpx;
+	}
+
+	.goods-section {
+		.logo {
+			display: block;
+			width: 50rpx;
+			height: 50rpx;
+			border-radius: 100px;
+		}
+
+		.name {
+			font-size: 30rpx;
+			color: $font-color-base;
+			margin-left: 24rpx;
+		}
+
+		.g-item {
+			display: flex;
+
+			image {
+				flex-shrink: 0;
+				display: block;
+				width: 170rpx;
+				height: 170rpx;
+				border-radius: 4rpx;
+			}
+
+			.right {
+				flex: 1;
+				padding-left: 24rpx;
+				overflow: hidden;
+
+				.serverSet {
+					font-size: 22rpx;
+					color: $font-color-light;
+				}
+			}
+
+			.title {
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.spec {
+				font-size: 26rpx;
+				color: $font-color-light;
+			}
+
+			.price-box {
+				display: flex;
+				align-items: center;
+				font-size: 32rpx;
+				padding-top: 10rpx;
+				color: $font-color-light;
+
+				.price {
+					margin-bottom: 4rpx;
+				}
+
+				.number {
+					font-size: 26rpx;
+					margin-left: 20rpx;
+				}
+			}
+
+			.step-box {
+				position: relative;
+			}
+		}
+	}
+
+	.yt-list {
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		margin-top: 30rpx;
+		border-radius: 20rpx;
+	}
+
+	.yt-list-cell {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10rpx 30rpx 10rpx 40rpx;
+		line-height: 70rpx;
+		position: relative;
+
+		.checked,
+		.noChecked {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.noChecked {
+			border: 1px solid $font-color-light;
+			border-radius: 100rpx;
+		}
+
+		&.cell-hover {
+			background: #fafafa;
+		}
+
+		&.b-b:after {
+			left: 30rpx;
+		}
+
+		.cell-icon {
+			height: 32rpx;
+			width: 32rpx;
+			font-size: 22rpx;
+			color: #fff;
+			text-align: center;
+			line-height: 32rpx;
+			background: #f85e52;
+			border-radius: 4rpx;
+			margin-right: 12rpx;
+
+			&.hb {
+				background: #ffaa0e;
+			}
+
+			&.lpk {
+				background: #3ab54a;
+			}
+		}
+
+		.cell-more {
+			align-self: center;
+			font-size: 24rpx;
+			color: $font-color-light;
+			margin-left: 8rpx;
+			margin-right: -10rpx;
+		}
+
+		.cell-tit {
+			font-size: 26rpx;
+			color: $font-color-light;
+			margin-right: 10rpx;
+
+			.orderIcon {
+				width: 48rpx;
+			}
+		}
+
+		.cell-tip {
+			font-size: 26rpx;
+			color: $font-color-dark;
+
+			&.disabled {
+				color: $font-color-light;
+			}
+
+			&.active {
+				color: $base-color;
+			}
+
+			&.red {
+				color: $base-color;
+			}
+		}
+
+		&.desc-cell {
+			.cell-tit {
+				max-width: 90rpx;
+			}
+		}
+
+		.desc {
+			text-align: right;
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+	}
+
+	/* 支付列表 */
+	.pay-list {
+		padding-left: 40rpx;
+		margin-top: 16rpx;
+		background: #fff;
+
+		.pay-item {
+			display: flex;
+			align-items: center;
+			padding-right: 20rpx;
+			line-height: 1;
+			height: 110rpx;
+			position: relative;
+		}
+
+		.icon-weixinzhifu {
+			width: 80rpx;
+			font-size: 40rpx;
+			color: #6bcc03;
+		}
+
+		.icon-alipay {
+			width: 80rpx;
+			font-size: 40rpx;
+			color: #06b4fd;
+		}
+
+		.icon-xuanzhong2 {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 60rpx;
+			height: 60rpx;
+			font-size: 40rpx;
+			color: $base-color;
+		}
+
+		.tit {
+			font-size: 32rpx;
+			color: $font-color-dark;
+			flex: 1;
+		}
+	}
+
+	.footer {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 995;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 90rpx;
+		justify-content: space-between;
+		font-size: 30rpx;
+		background-color: #fff;
+		z-index: 998;
+		color: $font-color-base;
+		box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
+
+		.price-content {
+			padding-left: 30rpx;
+		}
+
+		.price-tip {
+			color: $font-color-base;
+			margin-left: 8rpx;
+		}
+
+		.price {
+			font-size: 36rpx;
+			color: $font-color-base;
+		}
+
+		.submit {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 280rpx;
+			height: 100%;
+			color: #fff;
+			font-size: 32rpx;
+			background-color: $base-color;
+
+			&.submitNo {
+				background-color: $font-color-disabled;
+			}
+		}
+	}
+	.qrimg {
+		position: absolute;
+		left: -9999rpx;
+		top: -9999rpx;
+	}
+	
+	.ewm-wrap {
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+	
+	.bcewm {
+		background-color: $base-color;
+		color: #fff;
+		text-align: center;
+		height: 80rpx;
+		width: 702rpx;
+		border-radius: 40rpx;
+		margin: auto;
+		margin-top: 30rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		// margin-left: 75rpx;
+	}
+	.myj-wrap {
+		width: 702rpx;
+		margin: auto;
+	margin-top: 20rpx;
+	}
+</style>

+ 7 - 1
pages/order/hxqm.vue

@@ -72,8 +72,14 @@
 				this.order_id = opt.id
 				this.getOrderDetail()
 			}
+			//电池核销码
 			if(this.type == 2) {
-				this.val = opt.id + '&' + opt.dcode
+				this.val = 'battery&'+ opt.id + '&' + opt.battery_number
+				this.showVal = opt.id
+			}
+			// 升压器核销码
+			if(this.type == 3) {
+				this.val = 'booster&' + opt.id + '&' + opt.booster_number
 				this.showVal = opt.id
 			}
 		},

+ 6 - 6
pages/order/order.vue

@@ -45,24 +45,24 @@
 										class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
 									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
 								</view>
-								<view class="row flex">
-									<text class="attr-box">( 服务费:{{goodsItem.day_deducted}}
-										服务天数:{{goodsItem.day}})</text>
+								<view class="row flex" v-if="item.deposit">
+									<text class="attr-box">押金:{{item.deposit}}</text>
+									<text class="attr-box" v-if="item.use_certificate*1">骑行券抵扣:-{{item.use_certificate}}</text>
 								</view>
 							</view>
 						</view>
-						<!-- <view class="price-box">
+						<view class="price-box">
 							<text class="num">{{ item.cartInfo.length }}</text>
 							件商品 邮费
 							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
 							实付款
 							<text class="price">{{ moneyNum(item.pay_price)}}</text>
-						</view> -->
+						</view>
 						<view class="action-box b-t" v-if="tabItem.state != 4">
 							<button v-if="item._status._title == '未支付'" class="action-btn"
 								@click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'"
+							<button v-if="item._status._title == '未支付'  && (item.pay_type !== 'pxz')"
 								@click.stop="navTo( '/pages/user/money/pay?type=1&ordid=' + item.order_id + '&money=' + item.pay_price)"
 								class="action-btn recom">前往支付</button>
 							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>

+ 12 - 1
pages/order/orderDetail.vue

@@ -68,6 +68,17 @@
 			<text class="tit">邮费</text>
 			<view class="input">{{ item.pay_postage > 0 ? '¥' + item.pay_postage : '免邮费' }}</view>
 		</view>
+		<template v-if="item.is_battery == 1 || item.is_booster == 1">
+			<view class="row b-b flex" >
+				<text class="tit">押金</text>
+				<view class="input">{{ item.deposit }}</view>
+			</view>
+		<view class="row b-b flex" >
+			<text class="tit">骑行券抵扣</text>
+			<view class="input">{{ item.use_certificate }}</view>
+		</view>
+		</template>
+		
 		<view class="row b-b flex" v-if="item.coupon_id > 0">
 			<text class="tit">优惠券</text>
 			<view class="input">-¥{{ item.coupon_price }}</view>
@@ -422,7 +433,7 @@
 
 		.tit {
 			flex-shrink: 0;
-			width: 120rpx;
+			width: 200rpx;
 			font-size: 30rpx;
 			color: $font-color-dark;
 		}

+ 23 - 4
pages/product/product.vue

@@ -223,10 +223,8 @@
 				let str = obj.specSelected.join(',');
 
 				let goodItemAction = obj.actionGoodsType
-
 				// 获取当前选中的对象
 				if (obj.productValue[str]) {
-
 					obj.buys_show = true;
 					obj.buys_shows = false;
 					goodItemAction.actionPrice = obj.productValue[str].price;
@@ -243,10 +241,15 @@
 						goodItemAction.deal_price_num = 0
 					}
 					// 扣款天数
+					if(obj.productValue[str].cycle) {
+						goodItemAction.cycle = obj.productValue[str].cycle;
+						goodItemAction.cycle_day = obj.productValue[str].cycle_day;
+					}
 				} else {
 					(obj.buys_show = false), (obj.buys_shows = true);
 				}
 				if (goodItemAction.goodsStore == 0) {
+					console.log('这里');
 					obj.buys_show = false;
 					obj.buys_shows = true;
 				}
@@ -300,7 +303,11 @@
 				if (obj.onShopId != -1) {
 					data.store_id = obj.onShopId;
 				} else {
-					data.store_id = obj.shopDetail.id;
+					if(obj.userInfo.store_id) {
+						data.store_id = obj.userInfo.store_id
+					}else {
+						data.store_id = obj.shopDetail.id;
+					}
 				}
 
 
@@ -346,6 +353,8 @@
 						goodItemAction.deal_price_num = Math.ceil((obj.productValue[str].deal_price - obj
 							.productValue[str].price) / obj.productValue[str].day_deducted); //每天扣款
 						// 扣款天数
+						goodItemAction.cycle = obj.productValue[str].cycle;
+						goodItemAction.cycle_day = obj.productValue[str].cycle_day;
 					} else {
 						obj.many = 1; //单规格
 						obj.productValue = data.productValue; //保存分类查询数据
@@ -385,6 +394,10 @@
 					is_car: obj.goodsObjact.is_car, //是否电动车
 					day_deducted: obj.actionGoodsType.day_deducted,
 					day: obj.actionGoodsType.deal_price_num,
+					is_battery: obj.goodsObjact.is_battery,
+					is_booster: obj.goodsObjact.is_booster,
+					cycle: obj.actionGoodsType.cycle,
+					cycle_day: obj.actionGoodsType.cycle_day,
 				};
 				// 判断是否需要读取非默认商家id
 				if (obj.onShopId != -1) {
@@ -398,13 +411,19 @@
 				} else {
 					data.new = 1;
 				}
+				
 				cartAdd(data)
 					.then(function(e) {
 						let da = e.data;
 						// 不是购物车跳转支付页面
 						if (obj.type == 1) {
 							// 跳转到支付页
-							let url = '/pages/order/createOrder?id=' + da.cartId
+							let url;
+							if(obj.goodsObjact.is_battery == 1 || obj.goodsObjact.is_booster == 1) {
+								url = '/pages/order/createOrderT?id=' + da.cartId + '&is_battery=' + obj.goodsObjact.is_battery + '&is_booster=' + obj.goodsObjact.is_booster
+							} else {
+								url = '/pages/order/createOrder?id=' + da.cartId
+							}
 							// 判断是否指定商店购买商品
 							if (obj.onShopId != -1) {
 								url += '&shopId=' + obj.onShopId

+ 4 - 4
pages/public/agreement.vue

@@ -36,15 +36,15 @@
 
 <style lang="scss">
 	.buttomText {
-		margin-top: 30rpx;
+		margin-top: 26rpx;
 		justify-content: center;
-		font-size: 22rpx;
+		font-size: 32rpx;
 		color: $font-color-light;
 
 		.buttomIcon,
 		.buttomNo {
-			width: 24rpx;
-			height: 24rpx;
+			width: 32rpx;
+			height: 32rpx;
 		}
 
 		.buttomNo {

+ 1 - 1
pages/public/login.vue

@@ -30,7 +30,7 @@
 
 		</view>
 		<!-- #ifdef APP-PLUS -->
-		<loginMethods @onLogin='loginGl'></loginMethods>
+		<!-- <loginMethods @onLogin='loginGl'></loginMethods> -->
 		<!-- #endif -->
 		<agreement @checkedChange='changeChecked'></agreement>
 		<uni-popup ref="popup" type="bottom">

+ 2 - 2
pages/public/wxLogin.vue

@@ -5,8 +5,8 @@
 			<view class="logo-img-box">
 				<image class="logo-img" src="../../static/image/logo.png" mode="scaleToFill"></image>
 				<button class="userInfo flex-center" type="warn" @tap="loding?'':userInfoData()">
-					<image class="icon margin-r-10" src="../../static/icon/weichat.png" mode="scaleToFill"></image>
-					<text>微信授权登录</text>
+					<!-- <image class="icon margin-r-10" src="../../static/icon/weichat.png" mode="scaleToFill"></image> -->
+					<text>授权登录</text>
 				</button>
 				<agreement @checkedChange='changeChecked'></agreement>
 			</view>

+ 83 - 24
pages/shop/accessory.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="content">
 		<empty v-if="loaded && goodList.length == 0"></empty>
-		<view class="good flex" v-for="item in goodList" @click="navTo('/pages/product/product?id=' + item.id)">
+		<view class="good flex" v-for="item in goodList" @click="type==3?chooseGood(item):navTo('/pages/product/product?id=' + item.id)">
 			<view class="good-img">
 				<image :src="item.image" mode=""></image>
 			</view>
-			<view class="good-info flex">
+			<view class="good-info flex" v-if="type != 3">
 				<view class="good-name clamp2">
 					{{item.store_name}}
 				</view>
@@ -13,14 +13,29 @@
 					<view class="old-price" v-if="item.ot_price*1 > item.price*1">
 						<text class="old-left">¥{{item.ot_price}}</text>
 						<image src="../../static/icon/down.png" mode="widthFix"></image>
-						<text class="old-right">直降{{item.ot_price*1 - item.price*1}}元</text>
+						<text class="old-right" v-if="type!=3">直降{{item.ot_price*1 - item.price*1}}元</text>
 					</view>
 					<view class="new-price flex">
 						<view class="">
 							¥{{item.price}}
 						</view>
 						<view class="good-tip">
-							立即购买
+							{{type==3?'确认': '立即购买'}}
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="good-info flex" v-if="type == 3">
+				<view class="good-name clamp2">
+					{{item.title}}
+				</view>
+				<view class="good-price">
+					<view class="new-price flex">
+						<view class="stock">
+							库存:{{item.stock}}
+						</view>
+						<view class="good-tip">
+							{{type==3?'确认': '立即购买'}}
 						</view>
 					</view>
 				</view>
@@ -31,18 +46,41 @@
 </template>
 
 <script>
-	import {getProducts } from '@/api/product.js'
+	import {getProducts,getGoods } from '@/api/product.js'
 	export default {
 		data() {
 			return {
+				id: 0,
 				goodList: [],
 				page: 1,
 				limit: 10,
 				loadingType: 'more',
-				loaded:false
+				loaded:false,
+				type:0,//0->变压器 1->租电
 			}
 		},
-		onLoad() {
+		onLoad(opt) {
+			if(opt.type) {
+				this.type = opt.type
+			}
+			if(opt.id) {
+				this.id = opt.id
+			}
+			if(this.type == 1) {
+				uni.setNavigationBarTitle({
+					title:'租电'
+				})
+			}
+			if(this.type == 2) {
+				uni.setNavigationBarTitle({
+					title:'升压器'
+				})
+			}
+			if(this.type == 3) {
+				uni.setNavigationBarTitle({
+					title:'选择商品'
+				})
+			}
 			this.getGoodList()
 		},
 		onShow() {
@@ -69,25 +107,43 @@
 					})
 				}
 			},
+			chooseGood(item) {
+				let prepage = this.$api.prePage();
+				prepage.selctGood = item
+				uni.navigateBack()
+			},
 			getGoodList() {
-				let obj = this
-				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
+				let that = this
+				if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
 					return
 				}
-				obj.loadingType = 'loading'
-				getProducts({
-					page: obj.page,
-					limit: obj.limit
-				}).then(res => {
-					obj.goodList = obj.goodList.concat(res.data)
-					obj.page++
-					if (obj.limit == res.data.length) {
-						obj.loadingType = 'more'
-					} else {
-						obj.loadingType = 'noMore'
-					}
-					obj.loaded = true
-				})
+				that.loadingType = 'loading'
+				let qdata = {
+					page: that.page,
+					limit: that.limit,
+					is_battery: that.type == 1? 1:0,
+					is_booster: that.type == 2? 1: 0
+				}
+				if(that.type == 3 ) {
+					getGoods({
+						store_id:that.id
+					}).then(res => {
+						that.goodList = res.data
+						that.loadingType = 'noMore'
+					})
+				}else {
+					getProducts(qdata).then(res => {
+						that.goodList = that.goodList.concat(res.data)
+						that.page++
+						if (that.limit == res.data.length) {
+							that.loadingType = 'more'
+						} else {
+							that.loadingType = 'noMore'
+						}
+						that.loaded = true
+					})
+				}
+				
 			},
 		}
 	}
@@ -167,7 +223,10 @@
 					font-weight: bold;
 					color: #FF4C4C;
 					justify-content: space-between;
-		
+					.stock {
+						color: #333333;
+						font-size: 28rpx;
+					}
 					.good-tip {
 						width: 137rpx;
 						height: 52rpx;

+ 603 - 99
pages/shop/rent.vue

@@ -1,10 +1,23 @@
 <template>
 	<view class="content">
+		<view class="qrimg">
+			<tki-qrcode :cid="cid" ref="qrcode" :val="val" :size="size" :unit="unit" :background="background"
+				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:showLoading="showLoading" :loadMake="loadMake" :usingComponents="usingComponents" @result="qrR" />
+			<tki-qrcode :cid="ciddk" ref="qrcodet" :val="valdk" :size="size" :unit="unit" :background="background"
+				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:showLoading="showLoading" :loadMake="loadMake" :usingComponents="usingComponents" @result="qrRdk" />
+			<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvas" id="myCanvas"
+				class="hb"></canvas>
+			<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvass" id="myCanvass"
+				class="hb"></canvas>
+		</view>
+
 		<view class="top-tit">
 			<view class="tit">
 				为您展示【台州市】地区套餐,其他地域套餐待开放。
 			</view>
-			
+
 		</view>
 		<!-- 推荐渠道 -->
 		<view class="yt-list">
@@ -13,8 +26,9 @@
 					推荐渠道
 				</view>
 			</view>
-			<view class="contet-list flex" >
-				<view class="tc " style="display: flex;text-align: center;" :class="{'action': is_tj}" @click="couldTj?istj==true:''">
+			<view class="contet-list flex">
+				<view class="tc " style="display: flex;text-align: center;" :class="{'action': is_tj}"
+					@click="couldTj?istj==true:''">
 					推荐渠道
 				</view>
 				<view class="tc" style="display: flex;text-align: center;" :class="{'action': !is_tj}">
@@ -59,8 +73,6 @@
 					<view class="yysj">
 						营业时间:{{selctStore.day_time}}
 					</view>
-
-
 				</view>
 			</view>
 			<view class="store-wrap-empty" v-else>
@@ -74,10 +86,25 @@
 					选择套餐
 				</view>
 			</view>
-			<view class="contet-list flex">
-				<view class="tc flex" v-for="(item,index) in tcList" :class="{'action': selectTcIndex == index}"
-					@click="choosTc(index,item)">
+			<view class="contet-list flex" style="position: relative;" :style="{'height': isShowAll? 'auto': '550rpx'}">
+				<view class="flex" v-if="isShowAll == false"
+					style="width: 100%; position: absolute;bottom: 0;background-color: #fff;height: 50rpx;left: 0;text-align: center;border-radius: 0 0 20rpx 20rpx;padding: 0 30px;"
+					@click="isShowAll = true">
+					<view class="">
 
+					</view>
+					<view class="">
+						查看更多套餐 <image src="../../static/icon/down1.png" mode="widthFix"
+							style="width: 30rpx;margin-left: 10rpx;"></image>
+					</view>
+					<view class="">
+					</view>
+				</view>
+				<view class="tc flex" v-for="(item,index) in tcList" :class="{'action': selectTcIndex == index}"
+					@click="choosTc(index,item)" v-if="item.day == 30 || !userInfo.payRules">
+					<view class="tc-tit">
+						{{item.title}}
+					</view>
 					<view class="tc-price">
 						{{item.price}}
 						<text class="tc-time-t">
@@ -90,7 +117,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="dy-wrap" v-if="selectTc.id && userInfo.battery_deposit != 1">
+		<view class="dy-wrap" v-if="selectTc.id && userInfo.battery_deposit  != 1">
 			<view class="top-wrap flex">
 				<view class="top-left">
 					押金服务
@@ -101,18 +128,19 @@
 				</view> -->
 			</view>
 			<view class="contet-list flex">
-				<!-- <view class="tc flex dy">
+				<view class="tc flex dy" :class="{'action': ismy}" @click="ljmy()">
 					<view class="tc-time">
-						<image src="../../static/icon/orderWx.png" mode="heightFix"></image>微信信用免押金
+						<!-- <image src="../../static/icon/orderAli.png" mode="heightFix"></image> -->
+						信用免押金
 					</view>
-					<view class="tc-time-price">
+					<!-- <view class="tc-time-price">
 					微信信用≥550分
 					</view>
 					<view class="tc-price">
 						77<text>¥88</text>
-					</view>
-				</view> -->
-				<view class="tc flex dy action">
+					</view> -->
+				</view>
+				<view class="tc flex dy " :class="{'action': !ismy}" @click="qxmy()">
 					<view class="tc-time">
 						支付押金
 					</view>
@@ -123,6 +151,65 @@
 						{{selectTc.deposit}}
 					</view>
 				</view>
+
+
+			</view>
+		</view>
+		<view class="myj-wrap" v-if="showMyEwm">
+			<view class="ewm-wrap">
+				<!-- <canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvas" id="myCanvas"
+					class="hb"></canvas> -->
+				<image :src="shareQrcodeUrl" mode="" :style="{ width:cw + 'rpx', height: ch+'rpx',}"></image>
+			</view>
+			<view class="bcewm" @click="saveShareQrcode('shareQrcodeUrl')">
+				保存二维码
+			</view>
+		</view>
+		<view class="dy-wrap">
+			<view class="top-wrap flex">
+				<view class="top-left">
+					代扣服务
+				</view>
+				<!-- <view class="top-right">
+					<text>押金规则</text>
+					<image src="../../static/icon/next1.png" mode="heightFix"></image>
+				</view> -->
+			</view>
+			<view class="contet-list flex">
+
+				<view class="tc flex dy" :class="{'action': isdk}" @click="ktdk()">
+					<view class="tc-time">
+						<!-- <image src="../../static/icon/orderAli.png" mode="heightFix"></image> -->
+						周期代扣
+					</view>
+					<!-- <view class="tc-time-price">
+					微信信用≥550分
+					</view>
+					<view class="tc-price">
+						77<text>¥88</text>
+					</view> -->
+				</view>
+				<view class="tc flex dy " :class="{'action': !isdk}" @click="qxdk()">
+					<view class="tc-time">
+						卡券/微信
+					</view>
+					<!-- <view class="tc-time-price">
+					元/天
+					</view> -->
+					<!-- <view class="tc-price">
+						{{selectTc.deposit}}
+					</view> -->
+				</view>
+			</view>
+		</view>
+		<view class="myj-wrap" v-if="showDkEwm">
+			<view class="ewm-wrap">
+				<!-- 	<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvass" id="myCanvass"
+					class="hb"></canvas> -->
+				<image :src="dkQrcodeUrl" mode="" :style="{ width:cw + 'rpx', height: ch+'rpx',}"></image>
+			</view>
+			<view class="bcewm" @click="saveShareQrcode('dkQrcodeUrl')">
+				保存二维码
 			</view>
 		</view>
 		<view class="dy-wrap">
@@ -135,7 +222,7 @@
 			</view>
 		</view>
 
-		<view class="yt-list">
+		<view class="yt-list" v-if="!isdk">
 			<view class="yt-list-cell b-b" @click="payType='weixin'">
 				<view class="cell-tit flex">
 					<image class="orderIcon" src="../../static/icon/orderWx.png" mode="widthFix"></image>
@@ -165,18 +252,32 @@
 				</image>
 				<view v-else class="noChecked"></view>
 			</view>
+			<view class="yt-list-cell b-b" @click="isqxdk= !isqxdk">
+				<view class="cell-tit flex">
+					<!-- <image class="orderIcon" src="../../static/icon/ye.png" mode="widthFix"></image> -->
+					<text class="margin-l-10">使用骑行券抵扣(可用骑行券{{userInfo.certificate}})</text>
+				</view>
+				<image class="checked" v-if="isqxdk" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
 		</view>
-		<view class="ts">
+
+		<view class="ts" v-if="!isdk">
 
 		</view>
-		<view class="btm-btn flex">
-			<view class="pay-price" v-if="userInfo.battery_deposit == 1">
-				总计费用:<text>{{(selectTc.price*1) || ''}}</text>
+		<view class="btm-btn flex" v-if="!isdk">
+			
+			<!-- <view class="pay-price" v-if="!ismy && userInfo.battery_deposit  != 1">
+				总计费用:<text>{{(selectTc.price*1 + selectTc.deposit*1).toFixed(2) || ''}}</text>
 			</view>
 			<view class="pay-price" v-else>
-				总计费用:<text>{{(selectTc.price*1 + selectTc.deposit*1) || ''}}</text>
+				总计费用:<text>{{(selectTc.price*1).toFixed(2) || ''}}</text>
+			</view> -->
+			<view class="pay-price">
+				总计费用:<text>{{showPrice}}</text>
 			</view>
-			<view class="pay-btn" @click="toBuy" :class="{'zfz': loading}">
+			<view class="pay-btn" @click="toBuy('buy')" :class="{'zfz': loading}">
 				{{loading?'支付中':'立即支付'}}
 			</view>
 		</view>
@@ -208,14 +309,52 @@
 	import {
 		getRents,
 		rentCreate,
-		details
+		details,
+		rentFree,
+		contractCreate,
+		createSignFLow
 	} from '@/api/index.js'
 	export default {
 		data() {
 			return {
-				is_tj: false,//是否使用推荐渠道
-				couldTj: false,//是否可用推荐渠道
-				isFj: false,//是否为最近门店
+				isShowDk:true,
+				isShowAll: false,
+				showTc: [],
+				isqxdk: false,
+				isdk: false, //是否代扣
+				ismy: false, //是否免押
+				showbtn: false,
+				ewmw: 300, //二维码相对宽度
+				cw: 702, //画布相对宽度
+				ch: 600, //画布相对高度
+				shareQrcodeUrl: '', //画布生成的地址
+				dkQrcodeUrl: '',
+				canvasW: '', //画布宽度
+				canvasH: '', //画布高度
+				ewmImg: '', //二维码图片信息
+				erweimasrc: '', //生成的二维码图片
+				dkerweima: '',
+				cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				ciddk: 'dk-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				size: 300, //生成的二维码大小
+				unit: 'upx', //大小单位尺寸
+				// show: true,//默认使用组件中的image标签显示二维码
+				val: '', //要生成的内容
+				valdk: '',
+				background: '#ffffff', //二维码背景色
+				foreground: '#333333', //二维码前景色
+				pdground: '#333333', //二维码角标色
+				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
+				iconSize: 40, //二维码图标大小
+				lv: 3, //容错级别
+				onval: true, //监听val值变化自动重新生成二维码
+				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
+				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
+				showLoading: false, //是否显示loading
+
+				is_tj: false, //是否使用推荐渠道
+				couldTj: false, //是否可用推荐渠道
+				isFj: false, //是否为最近门店
 				selctStore: {
 					id: ''
 				},
@@ -226,19 +365,86 @@
 				payType: 'yue',
 				sm: '', //使用说明
 				loading: false, //是否支付中
+				renew: 0, //是否续费
+			}
+		},
+		watch: {
+			selctStore(n, o) {
+				if (n) {
+					console.log(n.is_pledge,'n.is_pledge');
+					if(this.userInfo.battery_deposit  != 1 && n.is_pledge == 1) {
+						this.ljmy()
+					}
+					if (this.selectTc.day*1 == 30 && !this.userInfo.payRules ) {
+						this.ktdk()
+					}else {
+						
+							this.qxdk()
+							this.isShowDk = false
+						
+					}
+				}
+			},
+			selectTc(n,o) {
+				console.log('选择套餐');
+				if(n) {
+					if(this.ismy) {
+						this.ljmy()
+					}
+					if(n.day*1 != 30) {
+						this.qxdk()
+						this.isShowDk = false
+					}else if(!this.userInfo.payRules) {
+						this.isShowDk = true
+					}
+				}
 			}
 		},
 		computed: {
-			...mapState('user', ['address', 'userInfo'])
+			...mapState('user', ['address', 'userInfo']),
+			//展示免押二维码
+			showMyEwm() {
+				return this.ismy && this.shareQrcodeUrl
+			},
+			//展示代扣二维码
+			showDkEwm() {
+				return this.isdk && this.dkQrcodeUrl
+			},
+			showPrice() {
+				let price;
+				// 不免押和没有免押
+				if(!this.ismy && this.userInfo.battery_deposit  != 1) {
+					price = this.selectTc.price * 1 + this.selectTc.deposit * 1
+					if(this.isqxdk) {
+						let all = (price - this.userInfo.certificate * 1).toFixed(2)
+						return all > 0 ? all : 0
+					}else {
+						return price*1
+					}
+				}else {
+					if (this.isqxdk) {
+						let all = (this.selectTc.price * 1 - this.userInfo.certificate * 1).toFixed(2)
+						return all > 0 ? all : 0
+					} else {
+						return this.selectTc.price * 1
+					}
+				}
+			}
 		},
-		onLoad() {
+		onLoad(opt) {
+			if (opt.renew) {
+				this.renew = opt.renew
+			}
 			this.getRents()
+
 			this.getSm()
 		},
 		onShow() {
 			this.userinfo()
-			if( this.address.latitude == '') {
+			if (this.address.latitude == '') {
 				this.getlocation()
+			}else {
+				this.storeList()
 			}
 		},
 		onReachBottom() {
@@ -248,7 +454,215 @@
 
 		},
 		methods: {
-			...mapMutations('user', ['setUserInfo','setAddress']),
+			...mapMutations('user', ['setUserInfo', 'setAddress']),
+			//取消免押
+			qxdk() {
+				this.isdk = false
+			},
+			qxmy() {
+				this.ismy = false
+			},
+			// 开通代扣
+			ktdk() {
+				let that = this
+				that.dkQrcodeUrl = ''
+				if (!that.is_tj && that.selctStore.id == '') {
+					return that.$api.msg('请选择门店')
+				}
+				if(!that.isShowDk) {
+					return
+				}
+				this.isdk = true
+				// this.contractCreate()
+				
+				this.toBuy()
+			},
+			contractCreate() {
+				contractCreate().then(res => {
+					// console.log(res);
+				})
+			},
+			createSignFLow() {
+				uni.showLoading({
+					title: '二维码生成中...'
+				})
+				createSignFLow().then(res => {
+					this.valdk = res.data.result.link
+				})
+			},
+			// 选择免押
+			ljmy() {
+				let that = this
+				if (!that.is_tj && that.selctStore.id == '') {
+					return that.$api.msg('请选择门店')
+				}
+				if(that.selectTc.is_pledge == 0) {
+					return
+				}
+				if(this.shareQrcodeUrl) {
+					this.shareQrcodeUrl = ''
+				}
+				this.ismy = true
+				this.rentFree()
+				if(this.isdk) {
+					this.ktdk()
+				}
+			},
+			rentFree() {
+				let that = this
+				if (!that.is_tj && that.selctStore.id == '') {
+					return that.$api.msg('请选择门店')
+				}
+				uni.showLoading({
+					title: '二维码生成中...'
+				})
+				rentFree({
+					rent_id: that.selectTc.id
+				}).then(res => {
+					that.val = res.data.result.link
+				})
+			},
+			//保存图片
+			saveShareQrcode(img) {
+				uni.saveImageToPhotosAlbum({
+					filePath: this[img],
+					success: (res) => {
+						uni.showToast({
+							icon: 'none',
+							position: 'bottom',
+							title: "成功保存到相册",
+						});
+					},
+					fail: (err) => {
+						//重新提示用户打开保存图片的授权
+						if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
+							uni.showModal({
+								title: '提示',
+								content: '需要您授权保存相册',
+								showCancel: false,
+								success(res) {
+									if (res.confirm) {
+										uni.openSetting({
+											success(settingdata) {
+												if (settingdata.authSetting[
+														'scope.writePhotosAlbum']) {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限成功,再次保存图片即可成功',
+														showCancel: false,
+													})
+												} else {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限失败,无法保存到相册',
+														showCancel: false
+													})
+												}
+											}
+										})
+									}
+								}
+							})
+						}
+					},
+				})
+			},
+			mychange(e) {
+				this.showbtn = e.show
+			},
+			//获取二维码
+			getEwm() {
+				let that = this
+				setTimeout(() => {
+					that.val = '阿强是个大傻逼'
+					this.$refs.mypopup.open()
+
+				}, 100)
+			},
+			// 获取图片信息
+			getImageInfo(image) {
+				return new Promise((req, rej) => {
+					uni.getImageInfo({
+						src: image,
+						success: function(res) {
+							req(res)
+						},
+					});
+				})
+			},
+			// 获取设备信息
+			getSystemInfo() {
+				return new Promise((req, rej) => {
+					uni.getSystemInfo({
+						success: function(res) {
+							req(res)
+						}
+					});
+				})
+			},
+			async createPoster(imgname, ewmimg, cavid, tit = '') {
+				let that = this
+				// 获取设备信息,主要获取宽度,赋值给canvasW 也就是宽度:100%
+				that.SystemInfo = await that.getSystemInfo();
+
+				that.ewmImg = await that.getImageInfo(ewmimg);
+				// this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+				that.ratio = that.SystemInfo.windowWidth / 750;
+				that.canvasW = that.cw * that.ratio;
+				this.canvasH = that.ch * that.ratio;
+				that.ewmW = that.ewmw * that.ratio;
+
+				// 如果主图,二维码图片,设备信息都获取成功,开始绘制海报,这里需要用setTimeout延时绘制,否则可能会出现图片不显示。
+				if (that.ewmImg.errMsg == 'getImageInfo:ok' && that.SystemInfo.errMsg == 'getSystemInfo:ok') {
+					console.log('二维码和屏幕信息加载完成')
+					setTimeout(() => {
+						var ctx = uni.createCanvasContext(cavid, that);
+						// 填充背景色,白色
+						ctx.setFillStyle('#fff'); // 默认白色
+						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
+						// drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+						ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2), 100 * that.ratio,
+							this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+						// 3、绘制商品标题,多余文字自动换行
+						ctx.setFontSize(16); // setFontSize() 设置字体字号
+						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+						ctx.setTextAlign('center')
+						ctx.fillText('请使用支付宝扫描上方二维码', this.canvasW / 2, 200 * that.ratio + that.ewmW)
+						ctx.fillText(tit, this.canvasW / 2, 260 * that.ratio + that.ewmW)
+						ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
+							that.fina = true
+							uni.canvasToTempFilePath({ // 保存canvas为图片
+								canvasId: cavid,
+								quality: 1,
+								fileType: 'jpg',
+								complete: function(res) {
+									// 在H5平台下,tempFilePath 为 base64, // 图片提示跨域 H5保存base64失败,APP端正常输出临时路径
+									console.log(res)
+									// that.canvasShow = false
+									that[imgname] = res.tempFilePath
+									that.$forceUpdate()
+									uni.hideLoading()
+
+									// setTimeout(function() {
+									// 	console.log(that.shareQrcodeUrl, that
+									// 		.canvasShow)
+									// }, 2000)
+								},
+							})
+						});
+					}, 1500)
+				} else {
+					console.log('err')
+				}
+			},
+			qrR(res) {
+				this.erweimasrc = res
+				this.createPoster('shareQrcodeUrl', this.erweimasrc, 'myCanvas', '完成免押服务')
+			},
+			qrRdk(res) {
+				this.dkerweima = res
+				this.createPoster('dkQrcodeUrl', this.dkerweima, 'myCanvass', '完成代扣服务')
+			},
 			// 获取附近门店
 			storeList(source) {
 				let that = this
@@ -262,11 +676,12 @@
 						data
 					}) => {
 						// console.log(data, '结果');
-						if(data && data.list && data.list.length > 0) {
+						if (data && data.list && data.list.length > 0) {
 							that.selctStore = data.list[0]
-							if(data.list[0].distance*1 <= 100 ) {
+							// if (data.list[0].distance * 1 <= 100) {
 								that.isFj = true
-							}
+								
+							// }
 						}
 					})
 					.catch(e => {
@@ -283,7 +698,7 @@
 						obj.getlocationSetInit(e)
 					},
 					fail(e) {
-						if(e.errCode==22){
+						if (e.errCode == 22) {
 							uni.showModal({
 								title: '定位开启错误',
 								content: '请查看是否已经开启定位服务',
@@ -304,8 +719,7 @@
 							// 调用鉴定位置变化事件
 							this.getlocationSetInit(e)
 						},
-						fail() {
-						}
+						fail() {}
 					})
 				})
 				// #endif
@@ -326,7 +740,7 @@
 					this.storeList()
 				}
 			},
-			
+
 			// 获取使用说明
 			getSm() {
 				details({}, 1).then(res => {
@@ -334,35 +748,51 @@
 				})
 			},
 			navTo(url) {
-				uni.navigateTo({
-					url,
-					fail() {
-						uni.switchTab({
-							url
-						})
-					}
-				})
+				console.log('navto');
+				try{
+					uni.navigateTo({
+						url,
+						fail() {
+							uni.switchTab({
+								url
+							})
+						}
+					})
+				}catch(e){
+					console.log(e,'err');
+					//TODO handle the exception
+				}
+				
 			},
 			userinfo() {
 				getUserInfo({}).then(({
 					data
 				}) => {
 					this.now_money = data.now_money;
-					if(data.store_id > 0) {
+					if (data.store_id > 0) {
 						this.couldTj = true
 						this.is_tj = true
 					}
 					this.setUserInfo(data)
+					if (!data.pxz_user_id) {
+						this.contractCreate()
+					}
 				});
 			},
 			choosTc(index, item) {
 				this.selectTcIndex = index
 				this.selectTc = item
+				if (this.isdk) {
+					this.ktdk()
+				}
 			},
 			getRents() {
-				getRents().then(res => {
-					this.tcList = res.data.rent
-					this.selectTc = this.tcList[0]
+				let that = this
+				getRents({
+					store_id: that.is_tj ? that.userInfo.store_id : that.selctStore.id
+				}).then(res => {
+					that.tcList = res.data.rent
+					that.selectTc = that.tcList[0]
 				})
 			},
 			paySuccessTo() {
@@ -375,14 +805,19 @@
 					url: '/pages/user_home/myRent'
 				})
 			},
-			toBuy() {
+			toBuy(flag) {
 				let that = this
 				if (!that.is_tj && that.selctStore.id == '') {
 					return that.$api.msg('请选择门店')
 				}
-				that.loading = true
+				// uni.showLoading({
+				// 	title:'二维码生成中...'
+				// })
+				if (!this.isdk) {
+					that.loading = true
+				}
 				rentCreate({
-					store_id: that.is_tj?that.userinfo.store_id: that.selctStore.id,
+					store_id: that.is_tj ? that.userInfo.store_id : that.selctStore.id,
 					rent_id: that.selectTc.id,
 					// #ifdef H5
 					from: 'weixin', //来源
@@ -393,58 +828,84 @@
 					// #ifdef APP-PLUS
 					from: 'app', //来源
 					// #endif
-					pay_type: that.payType //支付方式
+					pay_type: that.isdk ? 'pxz' : that.payType, //支付方式
+					renew: that.renew,
+					is_certificate: that.isdk ? 0 : (that.isqxdk ? 1 : 0)
 				}).then(({
 					data,
 					status,
 					msg
 				}) => {
-					if (data.status == 'ORDER_EXIST') {
-						uni.showModal({
-							title: '提示',
-							content: msg,
-							showCancel: false
-						});
-						uni.hideLoading();
-						that.loading = false;
-						return;
-					}
-					// 保存订单号
-					that.orderId = data.result.orderId;
-					// 判断是否为卡券支付
-					if (that.payType == 'yue') {
-						console.log('卡券支付', status == 200 && data.status == 'SUCCESS');
-						that.loading = false
-						if (status == 200 && data.status == 'SUCCESS') {
-							that.paySuccessTo();
-						} else {
-							that.$api.msg(msg);
-						}
+					if (that.isdk) {
+						this.createSignFLow()
 					} else {
-						// 立即支付
-						// obj.orderMoneyPay();
-						let da = data.result.jsConfig;
-						let paydata = {
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
+
+						if (data.status == 'ORDER_EXIST') {
+							uni.showModal({
+								title: '提示',
+								content: msg,
+								showCancel: false
+							});
+							uni.hideLoading();
+							that.loading = false;
+							return;
+						}
+						// 保存订单号
+						that.orderId = data.result.orderId;
+						// 判断是否为卡券支付
+						if (that.payType == 'yue') {
+							console.log('卡券支付', status == 200 && data.status == 'SUCCESS');
+							that.loading = false
+							if (status == 200 && data.status == 'SUCCESS' ) {
+								console.log('判断是否真付款');
+								if(!that.isdk) {
+									console.log('真付款');
+									if(flag == 'buy') {
+										that.paySuccessTo();
+									}
+									
+								}else {
+									console.log('假付款');
+								}
+							} else {
+								that.$api.msg(msg);
+							}
+						} else {
+							// 立即支付
+							// obj.orderMoneyPay();
+							if (data.status == 'SUCCESS' && that.payType == 'weixin') {
 								that.paySuccessTo();
-							},
-							fail: () => {
-								that.loading = false;
+							} else {
+								let da = data.result.jsConfig;
+								let paydata = {
+									nonceStr: da.nonceStr,
+									package: da.package,
+									signType: da.signType,
+									paySign: da.paySign,
+									success: function(res) {
+										that.paySuccessTo();
+									},
+									fail: () => {
+										that.loading = false;
+									}
+								};
+								// #ifdef H5
+								paydata.timestamp = da.timestamp;
+								weixinObj.chooseWXPay(paydata);
+								// #endif
+								// #ifdef MP-WEIXIN
+								paydata.timeStamp = da.timestamp;
+								wx.requestPayment(paydata);
+								// #endif
 							}
-						};
-						// #ifdef H5
-						paydata.timestamp = da.timestamp;
-						weixinObj.chooseWXPay(paydata);
-						// #endif
-						// #ifdef MP-WEIXIN
-						paydata.timeStamp = da.timestamp;
-						wx.requestPayment(paydata);
-						// #endif
+
+						}
+
 					}
+					// that.val = data.result.link
+					// uni.hideLoading()
+					// that.$refs.mypopup.open()
+
 				})
 			},
 			orderMoneyPay() {
@@ -557,7 +1018,9 @@
 		flex-wrap: wrap;
 		justify-content: space-between;
 		padding: 0 25rpx 45rpx;
-
+		height: 275rpx;
+		overflow: hidden;
+		
 		.tc {
 			width: 315rpx;
 			height: 212rpx;
@@ -567,7 +1030,11 @@
 			margin-bottom: 20rpx;
 			flex-direction: column;
 			justify-content: center;
-
+			.tc-tit {
+				font-size: 36rpx;
+				text-align: center;
+				
+			}
 			// align-items: center;
 			.tc-time {
 				font-size: 28rpx;
@@ -600,6 +1067,7 @@
 					text-decoration: line-through;
 					color: #999999;
 				}
+
 				.tc-time-t {
 					font-size: 28rpx;
 					font-weight: bold;
@@ -618,7 +1086,9 @@
 				}
 			}
 		}
-
+		.tc-t {
+			// width: 630rpx;
+		}
 		.dy {
 			height: 187rpx;
 		}
@@ -869,15 +1339,49 @@
 	.zfz {
 		background: #999 !important;
 	}
+
 	.top-tit {
 		width: 750rpx;
 		background-color: #fff;
 		padding: 10rpx;
+
 		.tit {
 			font-size: 28rpx;
-			background-color:rgba(108, 217, 192, 0.4);
+			background-color: rgba(108, 217, 192, 0.4);
 			border-radius: 5rpx;
 			padding: 10rpx;
 		}
 	}
+
+	.myj-wrap {
+		width: 702rpx;
+		margin: auto;
+
+	}
+
+	.qrimg {
+		position: absolute;
+		left: -9999rpx;
+		top: -9999rpx;
+	}
+
+	.ewm-wrap {
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.bcewm {
+		background-color: $base-color;
+		color: #fff;
+		text-align: center;
+		height: 80rpx;
+		width: 702rpx;
+		border-radius: 40rpx;
+		margin: auto;
+		margin-top: 30rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		// margin-left: 75rpx;
+	}
 </style>

+ 476 - 0
pages/user/money/qxq.vue

@@ -0,0 +1,476 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title flex-center">
+				<view class="goback-box flex-center" @click="toBack">
+					<image class="goback" src="../../../static/icon/next2.png" mode="scaleToFill"></image>
+				</view>
+				<view class="header flex-center">我的骑行券</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../../static/image/awardbg.png" mode="scaleToFill"></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.certificate || 0 }}</view>
+				<view>我的骑行券</view>
+			</view>
+			<!-- <view class="moneybtn-box flex">
+				<view class="money-btn flex" @click="navto('/pages/user_home/award/changeWallet')">
+					<image src="../../../static/icon/award1.png" mode="widthFix" class="tip"></image>
+					<view>
+						卡券转换
+					</view>
+				</view>
+				<view class="money-btn flex" @click="navto('/pages/user_home/award/withdrawal')">
+					<image src="../../../static/icon/award2.png" mode="widthFix" class="tip"></image>
+					<view>
+						佣金提现
+					</view>
+				</view>
+			</view> -->
+		</view>
+		<!-- <view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{bankData.total_brokerage || '0.00'}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{bankData.ext_broerage || '0.00'}}</view>
+			</view>
+		</view> -->
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<!-- #ifdef H5 -->
+					<empty src="../../../static/error/emptyOrder.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- #ifndef H5 -->
+					<empty src="../../static/error/emptyOrder.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (tabCurrentIndex == 1 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		mapGetters
+	} from 'vuex';
+	import {
+		extractBank,
+		spreadCommission
+	} from '@/api/wallet.js'
+	import { certificate,getUser } from '@/api/user.js'
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		onReady(res) {
+			var _this = this;
+			console.log(_this.userInfo)
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [
+					// {
+					// 	state: 0,
+					// 	text: '全部',
+					// 	loadingType: 'more',
+					// 	orderList: [],
+					// 	page: 1, //当前页数
+					// 	limit: 10 //每次信息条数
+					// },
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state:0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: '',
+				bankData:{
+					brokerage_price:'0.00',
+					ext_broerage:'0.00',//累计支出
+					total_brokerage:'0.00',//累计收入
+				}
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			// this.extractBank()
+			this.loadData();
+			
+		},
+		methods: {
+			
+			extractBank() {
+				extractBank().then(res => {
+					this.bankData = res.data
+				})
+			},
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user'
+				});
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this;
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading' || navItem.loadingType == 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				certificate({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: state
+					})
+					.then(({
+						data
+					}) => {
+						navItem.orderList = navItem.orderList.concat(data)
+						if(data.length == navItem.limit) {
+							navItem.loadingType = 'more'
+						}else {
+							navItem.loadingType = 'noMoe'
+						}
+						navItem.page++
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+		color: #ffffff;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.money-box {
+			position: relative;
+			z-index: 2;
+			padding-top: 230rpx;
+			text-align: center;
+			padding-bottom: 50rpx;
+
+			.money {
+				font-size: 72rpx;
+				font-weight: bold;
+			}
+
+			.text {
+				font-size: $font-lg;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			z-index: 999;
+			font-weight: bold;
+			position: fixed;
+			left: 0;
+			top: 0;
+			/* #ifdef MP-WEIXIN */
+			top: 44rpx;
+			/* #endif */
+			width: 100%;
+
+			.header {}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				bottom: 0;
+				top: 0;
+
+				.goback {
+					width: 34rpx;
+					height: 34rpx;
+					transform: rotate(180deg);
+				}
+			}
+
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+
+
+	.moneybtn-box {
+		position: relative;
+		padding: 0rpx 50rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		.money-btn{
+			font-size: $font-lg;
+			.tip{
+				width: 40rpx;
+				height:40rpx;
+				margin-right: 10rpx;
+			}
+		}
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 123 - 0
pages/user/myAction.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="content">
+		<empty v-if="loaded && list.length == 0"></empty>
+		<view class="action" v-for="item in list" >
+			<image :src="item.article.image_input[0]" mode="" class="action-img"></image>
+			<view class="action-tit">
+				<!-- {{item.status == 1 ? '已通过': (item.status == -1 ? '未通过': '待审核')}} -->
+				{{item.article.title}}
+			</view>
+			<view class=" time">
+				<view class="">
+					赠送:{{item.article.give_certificate}}骑行券
+				</view>
+				<view class="">
+					审核结果:{{item.status == 1 ? '已通过': (item.status == -1 ? '未通过': '待审核')}}
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+	</view>
+</template>
+<script>
+	import {
+		articleList,
+		record,
+	} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more',
+				loaded: false,
+				type: 0,
+			};
+		},
+		onLoad(opt) {
+			if(opt.type) {
+				this.type = opt.type
+			}
+		},
+		onShow() {
+			this.getActionList()
+		},
+		onReachBottom() {
+			this.getActionList()
+		},
+		methods: {
+			goAction(item) {
+				if(this.type == 0) {
+					uni.navigateTo({
+						url: '/pages/shop/action?id=' + item.id
+					})
+				}
+				
+			},
+			getActionList() {
+				if (this.loadingType == 'loading' || this.loadingType == 'noMore') {
+					return
+				}
+				this.loadingType = 'loading'
+				record({
+					page: this.page,
+					limit: this.limit
+				}).then(res => {
+					this.list = this.list.concat(res.data.data)
+					console.log(res.data.data);
+					this.page++
+					try{
+						if (res.data.data.length == this.limit) {
+							this.loadingType = 'more'
+						} else {
+							this.loadingType = 'noMore'
+						}
+					}catch(e){
+						console.log(e);
+						//TODO handle the exception
+					}
+					
+					this.loaded = true
+				})
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	page {
+		background-color: #f2f2f2;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.action {
+		width: 700rpx;
+		margin: 25rpx auto;
+		border-radius: 35rpx;
+		overflow: hidden;
+		background-color: #fff;
+
+		.action-img {
+			width: 700rpx;
+			height: 300rpx;
+			background-color: #333;
+		}
+
+		.action-tit {
+			min-height: 100rpx;
+			font-size: 34rpx;
+			font-weight: 500;
+			color: #0E0E0E;
+			display: flex;
+			align-items: center;
+			padding: 15rpx;
+			padding-left: 30rpx;
+		}
+	}
+	.time {
+		font-size: 12rpx;
+		padding: 20rpx;
+		padding-top: 0;
+	}
+</style>

+ 172 - 58
pages/user/myRent.vue

@@ -1,80 +1,145 @@
 <template>
 	<view class="content">
-		<view class="top-tit" v-if="dqtime">
+		<view class="top-tit flex" v-if="currentIndex == 0 && dqtime">
 			<view class="tit">
 				电池到期时间: {{dqtime}}
 			</view>
-			
 		</view>
-		<view v-for="(item, index) in list" :key="index" class="order-item">
-			<view class="i-top b-b">
-				<text class="time">订单编号:{{ item.order_id }}</text>
-				<text class="state">{{ item.status == 1?'待核销':(item.status == 2 ? '已核销': '')  }}</text>
-				<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-			</view>
-			<view class="goods-box-single">
-				<image class="goods-img" src="../../static/icon/in1.png" mode="scaleToFill"></image>
-				<view class="right">
-					<view class="flex flextop">
-						<text class="title clamp2">租电订单</text>
-						<text class="price">{{ moneyNum(item.price) }}</text>
-					</view>
-					<view class="row flex">
-						<text class="row_title">{{ item.month ? (item.month + '月') : '' }}</text>
-					</view>
-				</view>
-			</view>
-			<view class="price-box">
-				实付款
-				<text class="price">{{ moneyNum(item.pay_price)}}</text>(押金{{moneyNum(item.deposit)}})
-			</view>
-			<view class="action-box b-t">
-				<button v-if="item.status == 1" class="action-btn btn-base"
-					@click.stop="navTo('/pages/order/hxqm?id=' + item.verify_code + '&type=2' + '&dcode=' + userInfo.battery_number)">出示券码</button>
-<!-- 				<button v-if="item.status == 2" class="action-btn btn-base"
-					@click.stop="navTo('/pages/order/hxqm?id=' + item.verify_code + '&type=2')">续费</button> -->
+		<view class="top-tit flex" v-if="currentIndex == 1 && dqtimet">
+			<view class="tit">
+				升压器到期时间: {{dqtimet}}
 			</view>
 		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: currentIndex === index }" @click="tabClick(index)">{{ item.title }}</view>
+		</view>
+		<scroll-view scroll-y="true" :style="{'height': maxhegiht}" class="list-wrap" @scrolltolower="getMyRent">
+			<swiper disable-touch :style="{'height': maxhegiht}" :current="currentIndex">
+				<swiper-item v-for="ditem in navList">
+					<view v-for="(item, index) in ditem.list" :key="index" class="order-item">
+						<view class="i-top b-b">
+							<text class="time">订单编号:{{ item.order_id }}</text>
+							<text class="state">{{ item.status == 1?'待核销':(item.status == 2 ? '已核销': '')  }}</text>
+							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
+						</view>
+						<view class="goods-box-single">
+							<image class="goods-img" :src="currentIndex == 1?'../../static/icon/in3.png':'../../static/icon/in1.png'" mode="scaleToFill"></image>
+							<view class="right">
+								<view class="flex flextop">
+									<text class="title clamp2">{{currentIndex == 0?'电池订单': '升压器订单'}}</text>
+									<text class="price">{{ moneyNum(item.price) }}</text>
+								</view>
+								<view class="row flex">
+									<text class="row_title">{{ item.month ? (item.month + '月') : '' }}</text>
+								</view>
+							</view>
+						</view>
+						<view class="price-box">
+							实付款
+							<text class="price">{{ moneyNum(item.pay_price)}}</text>(押金{{moneyNum(item.deposit)}})
+						</view>
+						<view class="action-box b-t">
+							<button v-if="item.status == 0 && currentIndex == 0" class="action-btn btn-base"
+								@click.stop="navTo('/pages/order/hxqm?id=' + item.verify_code + '&type=2&battery_number=' + (userInfo.battery_number || ''))">出示券码</button>
+							<button v-if="item.status == 0 && currentIndex == 1" class="action-btn btn-base"
+								@click.stop="navTo('/pages/order/hxqm?id=' + item.verify_code + '&type=3&booster_number=' + (userInfo.booster_number || ''))">出示券码</button>
+							<!-- <button v-if="item.status == 2" class="action-btn btn-base"
+								@click.stop="xf(item)">续费</button> -->
+						</view>
+					</view>
+					<uni-load-more :status="ditem.loadingType"></uni-load-more>
+				</swiper-item>
+			</swiper>
+		</scroll-view>
+		
 
-		<uni-load-more :status="loadingType"></uni-load-more>
+		
 	</view>
 </template>
 
 <script>
-	import {getTime} from '@/utils/rocessor.js'
-	import { mapState } from 'vuex'
+	import {
+		getTime
+	} from '@/utils/rocessor.js'
+	import {
+		mapState
+	} from 'vuex'
 	import {
 		getMyRent
 	} from '@/api/user.js'
 	export default {
 		data() {
 			return {
-				page: 1,
-				limit: 10,
-				loadingType: 'more',
-				loaded: false,
-				list: []
+				maxhegiht: '',
+				currentIndex: 0,
+				navList: [{
+						status: 1,
+						title: '电池',
+						page: 1,
+						limit: 10,
+						loadingType: 'more',
+						loaded: false,
+						list: []
+					},
+					{
+						status: 2,
+						title: '升压器',
+						page: 1,
+						limit: 10,
+						loadingType: 'more',
+						loaded: false,
+						list: []
+					}
+				]
+
 			}
 		},
-		onLoad() {
+		onLoad(opt) {
+			if (opt.status) {
+				this.currentIndex = opt.status
+			}
 			this.getMyRent()
 		},
 		onShow() {
 
 		},
 		onReachBottom() {
-			this.getMyRent()
+			// this.getMyRent()
 		},
-		onReady() {
-
+		onReady(res) {
+			var that = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.list-wrap').boundingClientRect();
+					query.exec(function(res) {
+						that.maxhegiht = resu.windowHeight - res[0].top + 'px';
+					});
+				},
+				fail: res => {}
+			});
 		},
 		computed: {
-			...mapState('user',['userInfo']),
+			...mapState('user', ['userInfo']),
 			dqtime() {
-				return this.userInfo.battery_end_time?getTime(): ''
+				return this.userInfo.battery_end_time ? getTime(this.userInfo.battery_end_time) : ''
+			},
+			dqtimet() {
+				return this.userInfo.booster_end_time ? getTime(this.userInfo.booster_end_time) : ''
 			}
 		},
 		methods: {
+			tabClick(index) {
+				this.currentIndex = index
+				this.getMyRent()
+			},
+			xf() {
+				// console.log(item);
+				uni.navigateTo({
+					url: '/pages/shop/rent?renew=1'
+				})
+			},
 			navTo(url) {
 				uni.navigateTo({
 					url,
@@ -88,26 +153,32 @@
 			moneyNum(val) {
 				return (val * 1).toFixed(2)
 			},
-			getMyRent() {
+			getMyRent(type) {
 				let that = this
-				if (that.loadingType == 'loading' || that.loadingType == 'noMore') {
+				let index = that.currentIndex;
+				let item = that.navList[index]
+				if (type == 'tab' && item.loaded) {
 					return
 				}
-				that.loadingType = 'loading'
+				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+					return
+				}
+				item.loadingType = 'loading'
 				getMyRent({
-					page: that.page,
-					limit: that.limit,
-					status: 0
+					page: item.page,
+					limit: item.limit,
+					status: -1,
+					type: item.status==1?'battery':'booster'
 				}).then(res => {
 					let arr = res.data.list
-					that.list = that.list.concat(arr)
-					that.page++
-					if (arr.length == that.limit) {
-						that.loadingType = 'more'
+					item.list = item.list.concat(arr)
+					item.page++
+					if (arr.length == item.limit) {
+						item.loadingType = 'more'
 					} else {
-						that.loadingType = 'noMore'
+						item.loadingType = 'noMore'
 					}
-					that.loaded = true
+					item.loaded = true
 				})
 			}
 		}
@@ -116,7 +187,7 @@
 
 <style lang="scss" scoped>
 	.content {
-		padding-top: 20rpx;
+		// padding-top: 20rpx;
 	}
 
 	.order-item {
@@ -327,15 +398,58 @@
 			}
 		}
 	}
+
 	.top-tit {
 		width: 750rpx;
-		background-color: #fff;
+		background-color: rgba(108, 217, 192, 0.4);
 		padding: 10rpx;
+
 		.tit {
 			font-size: 28rpx;
-			background-color:rgba(108, 217, 192, 0.4);
+
 			border-radius: 5rpx;
 			padding: 10rpx;
 		}
+
+		.xf {
+			font-size: 32rpx;
+			padding-right: 30rpx;
+		}
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+		margin-bottom: 20rpx;
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
 	}
 </style>

+ 154 - 73
pages/user/shopPage.vue

@@ -93,25 +93,21 @@
 								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/shop/repair/clientRepair')" v-if="type==1">
+						<!-- <view class="flex listItem" @click="navTo('/pages/shop/repair/clientRepair')" v-if="type==1">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
 								<text class="title">客户报修</text>
 							</view>
 							<view class="right flex" v-if="question>0">
 								<text class="numbox">{{question}}</text>
-								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
-						</view>
-						<view class="flex listItem" @click="navTo('/pages/shop/repair/repairHistory')">
+						</view> -->
+						<!-- <view class="flex listItem" @click="navTo('/pages/shop/repair/repairHistory')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
 								<text class="title">维修历史</text>
 							</view>
-							<!-- <view class="right flex" v-if="question>0">
-								<text class="numbox">{{question}}</text>
-							</view> -->
-						</view>
+						</view> -->
 						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/shopMoney.png" mode="widthFix">
@@ -122,16 +118,15 @@
 								<text></text>
 							</view>
 						</view> -->
-						<view class="flex listItem" @click="navTo('/pages/shop/repair/taskClientRepair')">
+						<!-- <view class="flex listItem" @click="navTo('/pages/shop/repair/taskClientRepair')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
 								<text class="title">维修任务</text>
 							</view>
 							<view class="right flex" v-if="tesk>0">
 								<text class="numbox">{{tesk}}</text>
-								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
-						</view>
+						</view> -->
 						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/myServer.png" mode="widthFix"></image>
@@ -166,14 +161,19 @@
 				</view>
 				<view class="hx-body">
 					<view class="nav-hx">
-						<text @click="hxtype = 0" :class="{'action': hxtype == 0}">商品核销</text ><text @click="hxtype = 1" :class="{'action': hxtype ==1}">电池核销</text>
+						<view class="action" style="text-align: center;">
+							{{hxtype == 0?'商品核销':(hxtype == 1 ? '电池核销': '升压器核销') }}</view>
 					</view>
 					<!-- <view class="hx-title">
 						核销码
 					</view> -->
 					<input type="text" v-model="code" placeholder="请输入核销码" placeholder-class="hx-placeholder" />
-					<!-- <image src="../../static/icon/scend.png" mode=""></image> -->
-					<input type="text" v-model="dcode" placeholder="请输入电池编号" placeholder-class="hx-placeholder" v-if="hxtype == 1"/>
+					<view class="flex dcm" v-if="hxtype == 1 || hxtype == 2">
+						<input type="text" v-model="dcode" :placeholder="hxtype == 1? '请输入电池编号': '请输入升压器编号'"
+							placeholder-class="hx-placeholder" style="margin-bottom: 0;" />
+						<image src="../../static/icon/scend.png" mode="widthFix" style="width: 50rpx;" @click="smdc">
+						</image>
+					</view>
 					<view class="hx-btn" @click="qhx">
 						立即核销
 					</view>
@@ -186,6 +186,9 @@
 	</view>
 </template>
 <script>
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
 	import {
 		mapState,
 		mapMutations
@@ -197,6 +200,7 @@
 		adminStore,
 		task
 	} from '@/api/shop.js';
+	import {rentVerific,orderVerific} from '@/api/index.js'
 	import {
 		saveUrl,
 		interceptor
@@ -231,6 +235,24 @@
 		},
 		methods: {
 			...mapMutations('shop', ['setShopAction']),
+			smdc() {
+				let that = this
+				// #ifndef H5
+				uni.scanCode({
+					autoDecodeCharset: true,
+					success: (res) => {
+						if (that.hxtype == 1) {
+							console.log(res);
+							let str = res.result.split('编号:')
+							this.dcode = str[1]
+						} else {
+							this.dcode = res.result
+						}
+
+					}
+				})
+				// #endif
+			},
 			qhx() {
 				let that = this
 				if (that.hxLoading) {
@@ -257,14 +279,20 @@
 					])
 				} else {
 					if (that.dcode == '') {
-						return that.$api.msg('请输入电池编号')
+						return that.$api.msg('请输入编号')
 					}
 					that.hxLoading = false
-					rentVerific({
+					let qdata = {
 						verify_code: that.code,
-						battery_number: that.dcode,
+					
 						is_confirm: 1
-					}).then(res => {
+					}
+					if(that.hxtype == 1) {
+						qdata.battery_number = that.dcode
+					}else {
+						qdata.booster_number = that.dcode
+					}
+					rentVerific(qdata).then(res => {
 						uni.showToast({
 							title: '核销成功',
 							mask: true,
@@ -286,51 +314,69 @@
 			// 扫码
 			smsh() {
 				let that = this
-				// #ifdef H5
-				try {
-					weixinObj.scanQRCode({
-						needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-						scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
-						success: function(res) {
-							var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
-							let arr = result.split('&');
-							if(arr.length > 1) {
-								that.code = arr[0];
-								that.dcode = arr[1] || '';
-								that.hxtype = 1;
-							}else {
-								that.code = arr[0];
-								that.hxtype = 0;
-							}
+				uni.showActionSheet({
+					itemList: ['商品核销', '电池核销', '升压器核销'],
+					success: function(res) {
+						console.log(res, '上传')
+						that.hxtype = res.tapIndex
+						console.log();
+						that.openHx();
+						// #ifdef H5
+						try {
+							weixinObj.scanQRCode({
+								needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+								scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+								success: function(res) {
+									var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+									let arr = result.split('&');
+									if (that.hxtype == 0) {
+										that.code = arr[0];
+									} else {
+										that.code = arr[1]
+										that.dcode = arr[2]
+									}
+									that.openHx();
+								},
+								false(err) {
+									console.log('shib');
+									that.openHx();
+								}
+							});
+						} catch (err) {
 							that.openHx();
-							// 判断是否为电池核销
-							
-						}
-					});
-				} catch (err) {
-					console.log(err)
-					that.openHx();
-				}
-			
-				// #endif
-				// #ifndef H5
-				uni.scanCode({
-					success: (res) => {
-						let result = res.result
-						let arr = result.split('&')
-						if(arr.length > 1) {
-							that.code = arr[0];
-							that.dcode = arr[1] || '';
-							that.hxtype = 1;
-						}else {
-							that.code = arr[0];
-							that.hxtype = 0;
 						}
-						that.openHx();
+
+						// #endif
+
+						// #ifndef H5
+						uni.scanCode({
+							success: (res) => {
+								let result = res.result
+								let arr = result.split('&')
+								if (that.hxtype == 0) {
+									that.code = arr[0];
+								} else {
+									that.code = arr[1]
+									that.dcode = arr[2]
+								}
+								that.openHx();
+							}
+						})
+						// #endif
+					},
+					fail: function(res) {
+						// erro(res)
+
+						console.log(res.errMsg);
 					}
-				})
-				// #endif
-			
+				});
+
+
+
+
+
+
+
 			},
 			// 重新加载数据
 			getInit() {
@@ -398,7 +444,7 @@
 		text-align: center;
 		color: #FFFFFF;
 		border: 1px solid $color-green;
-		background-color:$color-green ;
+		background-color: $color-green ;
 		line-height: 1;
 		padding: 25rpx;
 		border-radius: 100rpx;
@@ -643,6 +689,7 @@
 			}
 		}
 	}
+
 	.hx-wrapper {
 		width: 536rpx;
 		// height: 630rpx;
@@ -650,37 +697,37 @@
 		padding-bottom: 40rpx;
 		background-color: #fff;
 		border-radius: 20rpx;
-	
+
 		.hx-img {
 			width: 536rpx;
 			height: 281rpx;
-	
+
 			image {
 				width: 536rpx;
 				height: 281rpx;
 			}
 		}
-	
+
 		.hx-close {
 			position: absolute;
 			left: 243rpx;
 			bottom: -80rpx;
 			width: 52rpx;
 			height: 52rpx;
-	
+
 			image {
 				width: 52rpx;
 				height: 52rpx;
 			}
 		}
-	
+
 		.hx-body {
 			width: 536rpx;
 			// min-height: 349rpx;
 			background-color: #fff;
 			border-radius: 0 0 10rpx 10rpx;
 			padding-top: 40rpx;
-	
+
 			.hx-title {
 				width: 536rpx;
 				font-size: 36rpx;
@@ -691,7 +738,7 @@
 				text-align: center;
 				padding-bottom: 10rpx;
 			}
-	
+
 			input {
 				width: 439rpx;
 				height: 68rpx;
@@ -699,14 +746,14 @@
 				border-radius: 10rpx;
 				margin: 0 auto 40rpx;
 				padding-left: 26rpx;
-	
+
 				.hx-placeholder {
 					font-size: 26rpx;
 					font-weight: 500;
 					color: $base-color;
 				}
 			}
-	
+
 			.hx-btn {
 				margin: 44rpx auto 0;
 				width: 353rpx;
@@ -719,8 +766,42 @@
 				line-height: 71rpx;
 				text-align: center;
 			}
-	
-	
+
+
+		}
+	}
+
+	.dcm {
+		width: 439rpx;
+		margin: 0 auto;
+		align-items: center;
+		height: 68rpx;
+
+		input {
+			flex-grow: 1;
+			height: 68rpx;
+			background: #f1faf6;
+			border-radius: 10rpx;
+			margin: auto 10rpx auto 0;
+			padding-left: 26rpx;
+		}
+
+		image {
+			flex-shrink: 0;
+		}
+	}
+	.nav-hx {
+		display: flex;
+		justify-content: center;
+		margin-bottom: 20rpx;
+		text {
+			font-size:28rpx;
+			padding: 10rpx;
+		}
+		.action {
+			color: $base-color;
+			font-weight: bold;
+			
 		}
 	}
-</style>
+</style>

+ 244 - 0
pages/user/sqmy.vue

@@ -0,0 +1,244 @@
+<template>
+	<view class="content">
+		<view class="qrimg">
+			<tki-qrcode :cid="cid" ref="qrcode" :val="val" :size="size" :unit="unit" :background="background"
+				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:showLoading="showLoading" :loadMake="loadMake" :usingComponents="usingComponents" @result="qrR" />
+				<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvas" id="myCanvas"
+					class="hb"></canvas>
+		</view>
+		<view class="" style="height: 40rpx;">
+			
+		</view>
+		<view class="myj-wrap" v-if="shareQrcodeUrl">
+			<view class="ewm-wrap">
+				<!-- <canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvas" id="myCanvas"
+					class="hb"></canvas> -->
+				<image :src="shareQrcodeUrl" mode="" :style="{ width:cw + 'rpx', height: ch+'rpx',}"></image>
+			</view>
+			<view class="bcewm" @click="saveShareQrcode('shareQrcodeUrl')">
+				保存二维码
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		rentFree,
+	} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				ratio: '',
+				ewmw: 300, //二维码相对宽度
+				cw: 702, //画布相对宽度
+				ch: 600, //画布相对高度
+				shareQrcodeUrl: '', //画布生成的地址
+				dkQrcodeUrl: '',
+				canvasW: '', //画布宽度
+				canvasH: '', //画布高度
+				ewmImg: '', //二维码图片信息
+				erweimasrc: '', //生成的二维码图片
+				dkerweima: '',
+				cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				ciddk: 'dk-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
+				size: 300, //生成的二维码大小
+				unit: 'upx', //大小单位尺寸
+				// show: true,//默认使用组件中的image标签显示二维码
+				val: '', //要生成的内容
+				valdk: '',
+				background: '#ffffff', //二维码背景色
+				foreground: '#333333', //二维码前景色
+				pdground: '#333333', //二维码角标色
+				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
+				iconSize: 40, //二维码图标大小
+				lv: 3, //容错级别
+				onval: true, //监听val值变化自动重新生成二维码
+				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
+				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
+				showLoading: false, //是否显示loading
+			}
+		},
+		onLoad() {
+			this.sqmy()
+		},
+		methods: {
+			// 获取图片信息
+			getImageInfo(image) {
+				return new Promise((req, rej) => {
+					uni.getImageInfo({
+						src: image,
+						success: function(res) {
+							req(res)
+						},
+					});
+				})
+			},
+			// 获取设备信息
+			getSystemInfo() {
+				return new Promise((req, rej) => {
+					uni.getSystemInfo({
+						success: function(res) {
+							req(res)
+						}
+					});
+				})
+			},
+			qrR(res) {
+				this.erweimasrc = res
+				this.createPoster('shareQrcodeUrl', this.erweimasrc, 'myCanvas', '完成免押服务')
+			},
+			sqmy() {
+				let that = this
+				rentFree().then( res => {
+					that.val = res.data.result.link
+				})
+			},
+			async createPoster(imgname, ewmimg, cavid, tit = '') {
+				let that = this
+				// 获取设备信息,主要获取宽度,赋值给canvasW 也就是宽度:100%
+				that.SystemInfo = await that.getSystemInfo();
+			
+				that.ewmImg = await that.getImageInfo(ewmimg);
+				// this.canvasW = this.SystemInfo.windowWidth; // 画布宽度
+				that.ratio = that.SystemInfo.windowWidth / 750;
+				that.canvasW = that.cw * that.ratio;
+				this.canvasH = that.ch * that.ratio;
+				that.ewmW = that.ewmw * that.ratio;
+			
+				// 如果主图,二维码图片,设备信息都获取成功,开始绘制海报,这里需要用setTimeout延时绘制,否则可能会出现图片不显示。
+				if (that.ewmImg.errMsg == 'getImageInfo:ok' && that.SystemInfo.errMsg == 'getSystemInfo:ok') {
+					console.log('二维码和屏幕信息加载完成')
+					setTimeout(() => {
+						var ctx = uni.createCanvasContext(cavid, that);
+						// 填充背景色,白色
+						ctx.setFillStyle('#fff'); // 默认白色
+						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
+						// drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+						ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2), 100 * that.ratio,
+							this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+						// 3、绘制商品标题,多余文字自动换行
+						ctx.setFontSize(16); // setFontSize() 设置字体字号
+						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+						ctx.setTextAlign('center')
+						ctx.fillText('请使用支付宝扫描上方二维码', this.canvasW / 2, 200 * that.ratio + that.ewmW)
+						ctx.fillText(tit, this.canvasW / 2, 260 * that.ratio + that.ewmW)
+						console.log('----------------',cavid);
+						try{
+							ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
+								that.fina = true
+								uni.canvasToTempFilePath({ // 保存canvas为图片
+									canvasId: cavid,
+									quality: 1,
+									fileType: 'jpg',
+									success() {
+										console.log('ok');
+									},
+									fail(err) {
+										console.log(err);
+									},
+									complete: function(res) {
+										// 在H5平台下,tempFilePath 为 base64, // 图片提示跨域 H5保存base64失败,APP端正常输出临时路径
+										console.log(res,'wancheng')
+										// that.canvasShow = false
+										that[imgname] = res.tempFilePath
+										that.$forceUpdate()
+										uni.hideLoading()
+										
+										// setTimeout(function() {
+										// 	console.log(that.shareQrcodeUrl, that
+										// 		.canvasShow)
+										// }, 2000)
+									},
+								})
+							});
+						}catch(e){
+							//TODO handle the exception
+							console.log(e,'err');
+						}
+						
+					}, 1500)
+				} else {
+					console.log('err')
+				}
+			},
+			//保存图片
+			saveShareQrcode(img) {
+				uni.saveImageToPhotosAlbum({
+					filePath: this[img],
+					success: (res) => {
+						uni.showToast({
+							icon: 'none',
+							position: 'bottom',
+							title: "成功保存到相册",
+						});
+					},
+					fail: (err) => {
+						//重新提示用户打开保存图片的授权
+						if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
+							uni.showModal({
+								title: '提示',
+								content: '需要您授权保存相册',
+								showCancel: false,
+								success(res) {
+									if (res.confirm) {
+										uni.openSetting({
+											success(settingdata) {
+												if (settingdata.authSetting[
+														'scope.writePhotosAlbum']) {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限成功,再次保存图片即可成功',
+														showCancel: false,
+													})
+												} else {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限失败,无法保存到相册',
+														showCancel: false
+													})
+												}
+											}
+										})
+									}
+								}
+							})
+						}
+					},
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.myj-wrap {
+		width: 702rpx;
+		margin: auto;
+	
+	}
+	.ewm-wrap {
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+	.bcewm {
+		background-color: $base-color;
+		color: #fff;
+		text-align: center;
+		height: 80rpx;
+		width: 702rpx;
+		border-radius: 40rpx;
+		margin: auto;
+		margin-top: 30rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		// margin-left: 75rpx;
+	}
+	.qrimg {
+		position: absolute;
+		left: -9999rpx;
+		top: -9999rpx;
+	}
+</style>

+ 370 - 0
pages/user/storage.vue

@@ -0,0 +1,370 @@
+<template>
+	<view class="content">
+		<view class="" style="height: 30rpx;">
+			
+		</view>
+		<!-- 门店选择 -->
+		<view class="yt-list tc-wrap" @click="navTo('/pages/index/shopTab?select=1')">
+			<view class="top-wrap flex">
+				<view class="top-left">
+					选择门店
+				</view>
+			</view>
+			<view class="store-wrap flex" v-if="selctStore && selctStore.id">
+				<view class="imgBox">
+					<image class="logo" :src="selctStore.image" mode="aspectFit"></image>
+				</view>
+				<view class="padding-l-20 flex-grow-true">
+					<view class="title clamp flex">
+						<view class="name">
+							{{selctStore.name}}
+						</view>
+						<view class="km" v-if="selctStore.range">
+							{{selctStore.range<1?selctStore.distance+'m':selctStore.range+'km'}}
+						</view>
+					</view>
+					<view class="flex addressBox margin-t-20">
+						<image class="iconA margin-r-10" src="../../static/icon/shop.png" mode="">
+						</image>
+						<text class="clamp">
+							{{selctStore.detailed_address}}
+						</text>
+					</view>
+					<view class="addressBox flex">
+						<image class="iconA margin-r-10" src="../../static/icon/shopPhone.png" mode="">
+		
+							<text class="clamp">
+								{{selctStore.phone}}
+							</text>
+					</view>
+					<view class="yysj">
+						营业时间:{{selctStore.day_time}}
+					</view>
+				</view>
+			</view>
+			<view class="store-wrap-empty" v-else>
+				选择门店
+			</view>
+		</view>
+		<view class="yt-list tc-wrap" @click="chooseGood">
+			<view class="top-wrap flex">
+				<view class="top-left">
+					选择商品
+				</view>
+			</view>
+			<view class="good flex" v-if="selctGood && selctGood.id" >
+				<view class="good-img">
+					<image :src="selctGood.image" mode=""></image>
+				</view>
+				<view class="good-info flex">
+					<view class="good-name clamp2">
+						{{selctGood.title}}
+					</view>
+					<view class="good-price">
+						<view class="new-price flex">
+							<view class="stock">
+								库存:{{selctGood.stock}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="store-wrap-empty" v-else>
+				选择商品
+			</view>
+		</view>
+		<view class="yt-list tc-wrap" style="padding-bottom: 20rpx;">
+			<view class="top-wrap flex">
+				<view class="top-left">
+					输入编码
+				</view>
+				
+			</view>
+			<view class="flex dcm" >
+				<input type="text" v-model="code" placeholder="请输入编码"
+					placeholder-class="hx-placeholder" style="margin-bottom: 0;" />
+				<image src="../../static/icon/scend.png" mode="widthFix" style="width: 50rpx;" @click="smget">
+				</image>
+			</view>
+		</view>
+		<view class="tapBottom" @click="loading?'':changeTab()">
+			确认入库
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getGoods,storeInStock } from '@/api/product.js'
+	export default {
+		data() {
+			return {
+				selctStore: {},
+				selctGood: {},
+				code: '',
+				loading: false
+			}
+		},
+		onLoad() {
+			this.selctStore = uni.getStorageSync('selctStore') || {}
+		},
+		onShow() {
+			console.log(this.selctStore.id,'selctStore');
+			if(this.selctStore.id) {
+				uni.setStorageSync('selctStore',this.selctStore)
+				this.getGoods()
+			}
+		},
+		methods: {
+			// 确认入库
+			changeTab() {
+				let that = this
+				if(!that.selctStore.id) {
+					return that.$api.msg('请选择门店')
+				}
+				if(!that.selctGood.id) {
+					return that.$api.msg('请选择商品')
+				}
+				if(!that.code) {
+					return that.$api.msg('请输入编码')
+				}
+				that.loading = true
+				storeInStock({
+					store_id: that.selctStore.id,
+					code: that.code,
+					product_id: that.selctGood.id
+				}).then(res => {
+					uni.showToast({
+						title: '入库成功',
+						mask: true,
+						duration: 1500
+					});
+					// that.selctGood = {}
+					that.code = ''
+					that.loading = false
+				}).catch(err => {
+					that.loading = false
+				})
+			},
+			smget() {
+				let that = this
+			
+				uni.scanCode({
+					success: (res) => {
+						that.code = res.result
+					}
+				})
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			},
+			getGoods() {
+				let that = this
+				getGoods({
+					store_id: that.selctStore.id
+				}).then(res => {
+					console.log(res);
+				})
+			},
+			chooseGood() {
+				let that = this
+				if(!that.selctStore.id) {
+					return that.$api.msg('请选择门店')
+				}
+ 				that.navTo('/pages/shop/accessory?type=3&id=' + that.selctStore.id)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.tc-wrap {
+		width: 702rpx;
+		background: #FFFFFF;
+		border-radius: 15rpx;
+		// padding: 25rpx 25rpx 45rpx;
+		
+	
+	}
+	.store-wrap-empty {
+		text-align: center;
+		height: 100rpx;
+	}
+	.yt-list {
+		background: #fff;
+		margin: 0 $page-row-spacing 20rpx $page-row-spacing ;
+		border-radius: 20rpx;
+		
+	}
+	
+	.store-wrap {
+		background-color: #FFFFFF;
+		margin-bottom: 30rpx;
+		padding: 30rpx;
+		border-radius: 20rpx;
+	
+		.list,
+		.km {
+			color: $font-color-light;
+			font-size: $font-sm;
+		}
+	
+		.logo {
+			height: 200rpx;
+			width: 200rpx;
+			border-radius: 20rpx;
+		}
+	
+		.title {
+			font-size: 36rpx;
+			color: $font-color-dark;
+		}
+	
+		.iconR {
+			height: 24rpx;
+		}
+	
+		.iconA {
+			width: 24rpx;
+			height: 24rpx;
+		}
+	
+		.addressBox {
+			font-size: 24rpx;
+			color: $font-color-light;
+			justify-content: flex-start;
+			padding: 10rpx 0;
+		}
+	
+		.yysj {
+			display: inline-block;
+			// width: 239rpx;
+			padding: 0 10rpx;
+			height: 32rpx;
+			background: #ddf8f1;
+			border-radius: 16rpx 16rpx 16rpx 0rpx;
+			font-size: 20rpx;
+			font-weight: bold;
+			color: #5FCCA7;
+			text-align: center;
+			line-height: 32rpx;
+			margin-top: 10rpx;
+		}
+	}
+	.top-wrap {
+		justify-content: space-between;
+		padding: 0 25rpx;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #00001A;
+		height: 85rpx;
+	
+		.top-left {}
+	
+		.top-right {
+			text {
+				font-size: 25rpx;
+				font-weight: 500;
+				color: #999999;
+			}
+	
+			image {
+				height: 22rpx;
+				margin-left: 10rpx;
+			}
+		}
+	}
+	.good {
+		width: 690rpx;
+		height: 276rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 10rpx;
+		margin: auto;
+		padding: 20rpx 15rpx;
+		margin-bottom: 20rpx;
+		&:last-of-type {
+			margin-bottom: 0rpx;
+		}
+		
+		.good-img {
+			flex-shrink: 0;
+			width: 236rpx;
+			height: 236rpx;
+			border-radius: 10rpx;
+			margin-right: 22rpx;
+		
+			image {
+				width: 236rpx;
+				height: 236rpx;
+				border-radius: 10rpx;
+			}
+		}
+		
+		.good-info {
+			flex-grow: 1;
+			height: 100%;
+			flex-direction: column;
+			justify-content: space-between;
+			align-items: flex-start;
+		
+			.good-name {
+				font-size: 32rpx;
+				font-weight: bold;
+				padding-top: 10rpx;
+				color: #333333;
+			}
+		
+			.good-price {
+				width: 100%;
+				.new-price {
+					width: 100%;
+					font-size: 36rpx;
+					font-weight: bold;
+					color: #FF4C4C;
+					justify-content: space-between;
+					.stock {
+						color: #333333;
+						font-size: 28rpx;
+					}
+				}
+			}
+		}
+	}
+	.dcm {
+		width: 600rpx;
+		margin:20rpx auto 0;
+		align-items: center;
+		height: 68rpx;
+	
+		input {
+			flex-grow: 1;
+			height: 68rpx;
+			background: #fff;
+			border-radius: 10rpx;
+			margin: auto 10rpx auto 0;
+			padding-left: 26rpx;
+		}
+	
+		image {
+			flex-shrink: 0;
+		}
+	}
+	.tapBottom {
+		margin: 0 50rpx;
+		text-align: center;
+		color: #FFFFFF;
+		border: 1px solid $color-green;
+		background-color: $color-green ;
+		line-height: 1;
+		padding: 25rpx;
+		border-radius: 100rpx;
+		margin-top: 50rpx;
+	}
+</style>

+ 52 - 8
pages/user/userPage.vue

@@ -40,9 +40,13 @@
 						<text class="num">{{ user.record_sum || '0' }}</text>
 						<text>行程</text>
 					</view> -->
-					<view class="tj-item" @click="navTo('/pages/index/notice')">
+					<!-- <view class="tj-item" @click="navTo('/pages/index/notice')">
 						<text class="num">{{ notic|| '0' }}</text>
 						<text>消息</text>
+					</view> -->
+					<view class="tj-item" @click="navTo('/pages/user/money/qxq')">
+						<text class="num">{{ user.certificate || '0.00' }}</text>
+						<text>骑行券</text>
 					</view>
 				</view>
 				<!-- 订单 -->
@@ -103,36 +107,76 @@
 				</view>
 				<view class="listBox">
 					<view class="list">
+						<view class="flex listItem" @click="navTo('/pages/user/sqmy')" v-if="userInfo.uid && userInfo.battery_deposit !== 1">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/sqmy.png" mode=""></image>
+								<text class="title">申请免押</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
 						<view class="flex listItem" @click="navTo('/pages/user/myRent')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/dc.png" mode=""></image>
-								<text class="title">我的电池</text>
+								<text class="title">我的设备</text>
 							</view>
 							<view class="right flex">
 								<text></text>
 								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+						<view class="flex listItem" @click="navTo('/pages/index/actionList')">
 							<view class="flex titleBox">
-								<image class="listIconImg" src="../../static/icon/myCart.png" mode="widthFix"></image>
-								<text class="title">我的车辆</text>
+								<image class="listIconImg" src="../../static/icon/action.png" mode=""></image>
+								<text class="title">活动</text>
 							</view>
 							<view class="right flex">
 								<text></text>
 								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user/repair/userRepair')">
+						<view class="flex listItem" @click="navTo('/pages/user/storage')">
 							<view class="flex titleBox">
-								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
-								<text class="title">维修历史</text>
+								<image class="listIconImg" src="../../static/icon/myaction.png" mode=""></image>
+								<text class="title">我的活动</text>
 							</view>
 							<view class="right flex">
 								<text></text>
 								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 							</view>
 						</view>
+						<!-- store_auth -->
+						<!-- v-if="user.uid && user.store_auth != 0" -->
+						<view  class="flex listItem" @click="navTo('/pages/user/storage')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/ruku.png" mode=""></image>
+								<text class="title">入库</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<!-- <view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myCart.png" mode="widthFix"></image>
+								<text class="title">我的车辆</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view> -->
+						<!-- <view class="flex listItem" @click="navTo('/pages/user/repair/userRepair')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修历史</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view> -->
 						<view class="flex listItem" v-if="fx" @click="navTo('/pages/user/myteam')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>

BIN
static/icon/action.png


BIN
static/icon/down1.png


BIN
static/icon/in3.png


BIN
static/icon/myaction.png


BIN
static/icon/qxq.png


BIN
static/icon/ruku.png


BIN
static/icon/sqmy.png


BIN
static/icon/zqdk.png


BIN
static/image/action-top.png


BIN
static/image/awardbg.png


BIN
static/image/followButtom.png


BIN
static/image/followCenter.png


BIN
static/image/followTop.jpg


BIN
static/image/shopBg.png


BIN
static/image/upimg-g.png


+ 2 - 2
store/index.js

@@ -7,8 +7,8 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://zd1.frp.liuniu946.com',//请求地址配置 
-		// baseURL:'http://dp.frp.shuibo.net',//请求地址配置 
+		baseURL:'https://appx.linkaa.cn',//请求地址配置 
+		// baseURL:'http://zd1.ns.liuniu946.com',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		hasLogin:false,
 		// #ifdef H5