twt 3 年 前
コミット
53873fd367
共有8 個のファイルを変更した62 個の追加11 個の削除を含む
  1. 5 1
      App.vue
  2. 4 4
      common/request.js
  3. 3 0
      main.js
  4. 2 2
      pages/index/addCar.vue
  5. 5 2
      pages/index/index.vue
  6. 3 1
      pages/login/empower.vue
  7. 3 1
      pages/login/iphoneLogin.vue
  8. 37 0
      static/js/share.js

+ 5 - 1
App.vue

@@ -8,7 +8,11 @@
 		},
 		onHide: function() {
 			console.log('App Hide')
-		}
+		},
+		onShareAppMessage:function() {
+			
+		},
+		onShareTimeline() {},
 	}
 </script>
 

+ 4 - 4
common/request.js

@@ -1,8 +1,8 @@
-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 = 'http://58.56.15.138:20132/' 
-// 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'
 

+ 3 - 0
main.js

@@ -9,7 +9,10 @@ Vue.prototype.$request =request
 Vue.prototype.$common =common
 Vue.config.productionTip = false
 
+import share from '@/static/js/share.js'
 
+Vue.mixin(share)
+//https://blog.csdn.net/qq_35432904/article/details/106330079 分享
 // #ifndef VUE3
 import Vue from 'vue'
 Vue.config.productionTip = false

+ 2 - 2
pages/index/addCar.vue

@@ -181,12 +181,12 @@
 				console.log(plate)
 				if (plate.length >= 7) this.plateNo = plate;
 				this.plateShow = false;
-				if(plate.length == 7){
+				/* if(plate.length == 7){
 					this.plate_type=2
 				}else{
 					this.plate_type=52
 				}
-				this.queryCarmodelByPlateNumber()
+				this.queryCarmodelByPlateNumber() */
 			},
             queryCarmodelByPlateNumber(){
 				uni.showLoading({

+ 5 - 2
pages/index/index.vue

@@ -311,7 +311,7 @@
 				}
 				if (this.cityRole == 0) {
 					uni.showToast({
-						title:'所选城市暂时不支持该车辆保养,我们正在努力开通哦~',
+						title:'所选城市暂时不支持该保养,我们正在努力开通哦~',
 						icon:'none',
 						duration: 3000,
 					})
@@ -350,7 +350,10 @@
            
 
 
-		}
+		},
+		onShareAppMessage:function() {
+			
+		},
 	}
 </script>
 

+ 3 - 1
pages/login/empower.vue

@@ -85,7 +85,9 @@
 			//api uni.login
 			ipLogin() {
 				var that = this;
-				uni.showLoading({});
+				uni.showLoading({
+					title: '加载中'
+				});
 				uni.login({
 					provider: 'weixin',
 					success: function(loginRes) {

+ 3 - 1
pages/login/iphoneLogin.vue

@@ -109,7 +109,9 @@
 			},
 			ipLogin() {
 				var that = this;
-				uni.showLoading({});
+				uni.showLoading({
+					title: '加载中'
+				});
 				uni.login({
 					provider: 'weixin',
 					success: function(loginRes) {

+ 37 - 0
static/js/share.js

@@ -0,0 +1,37 @@
+export default{
+    data(){
+        return {
+                       //设置默认的分享参数
+            share:{
+                title:'车蓝图',
+                path:'/pages/index/index',
+                imageUrl:'',
+                desc:'',
+                content:''
+            }
+        }
+    },
+    onShareAppMessage(res) {
+        return {
+            title:this.share.title,
+            path:this.share.path,
+            imageUrl:this.share.imageUrl,
+            desc:this.share.desc,
+            content:this.share.content,
+            success(res){
+                uni.showToast({
+                    title:'分享成功'
+                })
+            },
+            fail(res){
+                uni.showToast({
+                    title:'分享失败',
+                    icon:'none'
+                })
+            }
+        }
+    },
+	 onShareTimeline(res) {//分享到朋友圈
+	        return {}
+	    },
+}