twt 3 years ago
parent
commit
47bdc0a3d9
6 changed files with 37 additions and 8 deletions
  1. 4 4
      common/request.js
  2. 1 1
      manifest.json
  3. 16 3
      pages/homePage/homePage.vue
  4. 2 0
      pages/login/iphoneLogin.vue
  5. 4 0
      pages/login/login.vue
  6. 10 0
      store/index.js

+ 4 - 4
common/request.js

@@ -1,10 +1,10 @@
 //测试地址
-/* const baseUrl = 'http://58.56.15.138:20201/' 
-const burl2='http://58.56.15.138:20201/' */
+ const baseUrl = 'http://58.56.15.138:20201/' 
+const burl2='http://58.56.15.138:20201/' 
  
 //正式地址
-const baseUrl = 'https://apiclt.66km.com/'
-const burl2='https://apiclt.66km.com/' 
+/* const baseUrl = 'https://apiclt.66km.com/'
+const burl2='https://apiclt.66km.com/' */
 
 import md5 from './MD5.js'
 

+ 1 - 1
manifest.json

@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx693850514180f795",
+        "appid" : "wx9ca21d7c8495757e",
         "setting" : {
             "urlCheck" : true,
             "postcss" : true,

+ 16 - 3
pages/homePage/homePage.vue

@@ -84,7 +84,7 @@
 
 		<!-- 优惠券中心 -->
 		<image :src="bannerImg" mode="aspectFit" class="quanImg" @click="goquan"></image>
-
+      <!--  <view>shareID:{{shareID}}</view> -->
 		<!-- 车主评价 -->
 		<view class="pingjia" v-if="itemData.length != 0">
 			<view class="pingjiaTitle">车主评价</view>
@@ -182,9 +182,16 @@
 
                 bannerImg:'',
 				mileage: '',
-
+                shareID:'',
 				brand: '',
 				cityRole: '',
+				share:{
+					title:'车蓝图4S店养车服务scene',
+					path:'/pages/homePage/homePage?scene=F16E7299-6850-4015-ABCE-A9F2794B45B5',
+					imageUrl:'',
+					desc:'',
+					content:''
+				}
 			}
 		},
 		onShow() {
@@ -224,10 +231,16 @@
 
 			
 		},
-		onLoad() {
+		onLoad(opt) {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1
 			this.getItemData()
+			var shareID= opt.scene //'F16E7299-6850-4015-ABCE-A9F2794B45B5'
+			this.shareID=shareID
+			if(shareID){
+				this.$store.commit('mutationsshareID',shareID)
+			} 
+			
 		},
 		methods: {
 			goCarList() {

+ 2 - 0
pages/login/iphoneLogin.vue

@@ -40,6 +40,7 @@
 				wxCode: '',
 				openID: '',
 				wxOpendata: '',
+				shareID:'',
 			}
 		},
 		onLoad() {
@@ -141,6 +142,7 @@
 					nickName: this.wxdata.userInfo.nickName,
 					headUrl: this.wxdata.userInfo.avatarUrl,
 					openID: this.openID,
+					shareID:this.shareID,
 				}, ).then(res => {
 
 					uni.hideLoading();

+ 4 - 0
pages/login/login.vue

@@ -40,9 +40,12 @@ export default {
 			wxPhoneData:'',
 			wxOpendata:'',
 			isload:false,
+			shareID:'',
 		}
 	},
 	onLoad() {
+		this.shareID=this.$store.state.shareID
+		console.log(this.$store.state.shareID)
        this.screenHeight = uni.getSystemInfoSync().windowHeight;
 	   // console.log( this.screenHeight)
 	   this.wxOpendata=uni.getStorageSync("wxOpendata");
@@ -90,6 +93,7 @@ export default {
 			    sessionKey:this.wxOpendata.session_key,
 			    nickName:this.wxdata.userInfo.nickName,
 			    headUrl:this.wxdata.userInfo.avatarUrl,
+				shareID:this.shareID,
 			  },).then(res => {
 			 	//console.log(res)
 			 	uni.hideLoading();

+ 10 - 0
store/index.js

@@ -5,23 +5,33 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
     state: {
 		couponstate:true,
+		shareID:'',
 	},
 	getters:{
 		getcouponstate(state){
 			return state.couponstate
 	   },
+	   getshareID(state){
+	   			return state.shareID
+	   },
 	  
     },
     mutations: {
 		mutationscouponstate(state,data){
 			state.couponstate=data
 		},
+		mutationsshareID(state,data){
+			state.shareID=data
+		},
 		
 	},
     actions: {
 		actionscouponstate(context,playload){
 			context.commit('mutationscouponstate',playload)
 		},
+		actionsshareID(context,playload){
+			context.commit('mutationsshareID',playload)
+		},
 		
 	}
 })