Browse Source

bug 修复

lilei 3 years ago
parent
commit
01d6f960af
3 changed files with 39 additions and 16 deletions
  1. 7 7
      pages/index/index.vue
  2. 2 2
      pages/vinInput/confirmVin.vue
  3. 30 7
      pages/vinInput/share.vue

+ 7 - 7
pages/index/index.vue

@@ -93,21 +93,21 @@
 				return this.$store.state.vuex_userInfo
 				return this.$store.state.vuex_userInfo
 			}
 			}
 		},
 		},
-		onLoad() {
+		onReady() {
 			// 检测是否登录
 			// 检测是否登录
 			this.$store.dispatch('checkLogin')
 			this.$store.dispatch('checkLogin')
+		},
+		onLoad() {
 			// 获取数据字典
 			// 获取数据字典
 			this.getListLookUp();
 			this.getListLookUp();
 			// 获取支付,收款方式
 			// 获取支付,收款方式
 			this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
 			this.getLookUpList('PAY_PROCUCT_TYPE', 'vuex_paymentTypeList');
 		},
 		},
 		onShow() {
 		onShow() {
-			if(this.hasLogin){
-				// 查询是否有数字货架
-				this.getStoreShelf()
-				// 获取扫描记录
-				this.getVinLog()
-			}
+			// 查询是否有数字货架
+			this.getStoreShelf()
+			// 获取扫描记录
+			this.getVinLog()
 			this.getScrollLog()
 			this.getScrollLog()
 		},
 		},
 		methods: {
 		methods: {

+ 2 - 2
pages/vinInput/confirmVin.vue

@@ -59,9 +59,9 @@
 		onShareAppMessage(e){
 		onShareAppMessage(e){
 			return {
 			return {
 			  title: '修配一码通车架号(VIN)分享',
 			  title: '修配一码通车架号(VIN)分享',
-			  path: '/pages/vinIput/share?userName='+this.userInfo.userNameCN+'&vinNo='+this.verifyCode,
+			  path: '/pages/vinInput/share?userName='+this.userInfo.userNameCN+'&vinNo='+this.verifyCode,
 			  imageUrl:'/static/share.png',
 			  imageUrl:'/static/share.png',
-			  type: '2',
+			  type: '1',
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {

+ 30 - 7
pages/vinInput/share.vue

@@ -1,7 +1,11 @@
 <template>
 <template>
 	<view class="share-body">
 	<view class="share-body">
 		<view class="share-head">
 		<view class="share-head">
-			<u-image src="@/static/def_personal_avatar.png" width='750' height="253"></u-image>
+			<view class="back-icon" @click="toHome">
+				<u-icon name="home"></u-icon>
+				<text>首页</text>
+			</view>
+			<u-image src="@/static/share1.jpg" width='750' height="253"></u-image>
 		</view>
 		</view>
 		<view class="share-info">
 		<view class="share-info">
 			<view class="userinfo">
 			<view class="userinfo">
@@ -14,12 +18,12 @@
 				<view>
 				<view>
 					<u-image shape="circle" :src="carInfo.icon||'@/static/def_imgs.png'" width='150' height="150"></u-image>
 					<u-image shape="circle" :src="carInfo.icon||'@/static/def_imgs.png'" width='150' height="150"></u-image>
 				</view>
 				</view>
-				<view>VIN:{{carInfo.vinNumber}}</view>
-				<view>{{carInfo.modelLabel}}</view>
+				<view>VIN:{{vinNo}}</view>
+				<view>{{carInfo.text}}</view>
 			</view>
 			</view>
 			<view class="cbutton flex align_center justify_between">
 			<view class="cbutton flex align_center justify_between">
-				<u-button @click="copyVin" shape="circle">复制VIN</u-button>
-				<u-button @click="copyCar" shape="circle">复制车型</u-button>
+				<u-button @click="copyVin" v-if="vinNo" shape="circle">复制VIN</u-button>
+				<u-button @click="copyCar" v-if="carInfo.text" shape="circle">复制车型</u-button>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -36,11 +40,17 @@
 			}
 			}
 		},
 		},
 		onShareAppMessage(){},
 		onShareAppMessage(){},
-		onLoad() {
+		onLoad(opts) {
 			this.vinNo = opts.vinNo
 			this.vinNo = opts.vinNo
 			this.userName = opts.userName || ''
 			this.userName = opts.userName || ''
+			this.getInfo()
 		},
 		},
 		methods: {
 		methods: {
+			toHome(){
+				uni.reLaunch({
+					url: "/pages/index/index"
+				})
+			},
 			// 复制vin
 			// 复制vin
 			copyVin(){
 			copyVin(){
 				uni.setClipboardData({
 				uni.setClipboardData({
@@ -50,7 +60,7 @@
 			// 复制车型
 			// 复制车型
 			copyCar(){
 			copyCar(){
 				uni.setClipboardData({
 				uni.setClipboardData({
-					data: this.carInfo.modelLabel||'',
+					data: this.carInfo.text||'',
 				})
 				})
 			},
 			},
 			getInfo(){
 			getInfo(){
@@ -79,6 +89,19 @@
 </script>
 </script>
 
 
 <style lang="less">
 <style lang="less">
+page{
+	background-color: #ffffff;
+}
+.share-head{
+	position: relative;
+	.back-icon{
+		position: absolute;
+		left: 30rpx;
+		top: 90rpx;
+		color: #333;
+		z-index: 10000;
+	}
+}
 .share-info{
 .share-info{
 	background-image: linear-gradient(#bceafa 0%,#ffffff 60%);
 	background-image: linear-gradient(#bceafa 0%,#ffffff 60%);
 	padding: 30rpx;
 	padding: 30rpx;