浏览代码

优化分享

liguorui 6 年之前
父节点
当前提交
a392f6da42

+ 1 - 1
common/share.js

@@ -1,7 +1,7 @@
 export default {
   onShareAppMessage: function(){
     return {
-      title: '第一好车,物美价廉淘辆车',
+      title: '买高端车认准第一好车',
       //imageUrl: "",
       success: (res) => {
         wx.showToast({

+ 1 - 1
module/logs/logs.wxml

@@ -1,6 +1,6 @@
 <view 
 	class="logs_content"
-	style="left:{{openlog?'0rpx':'100%'}}; height:{{windowHeight}}px"
+	style="left:{{openlog?'0rpx':'100%'}};"
 >
 	<image 
 		class="logs_back"

+ 3 - 2
pages/buy/buy.js

@@ -1,12 +1,13 @@
 import { get,post } from "../../common/request.js"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 import pathmap from "../../common/pathmap"
 import { retCartData } from "../../data/car"
 import bindSearch from "../../module/search/search.js"
 
 const app = getApp();
 // pages/buy/buy.js
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -301,4 +302,4 @@ Page({
     var keys = this.data.keylist.join(" ");
     this.submitsearchinfo({keys:keys});
   }
-})
+},share))

+ 1 - 1
pages/cardetail/cardetail.js

@@ -349,7 +349,7 @@ Page(Object.assign({
   },
   onShareAppMessage: function(){
     return {
-      title: this.data.name,
+      title: this.data.detail.name,
       imageUrl: this.data.detail.imgs[0],
       success: (res) => {
         wx.showToast({

+ 3 - 2
pages/collect/collect.js

@@ -1,10 +1,11 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 import { retCartData } from "../../data/car"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -124,4 +125,4 @@ Page({
       }
     })
   }
-})
+},share))

+ 3 - 2
pages/evaluate/evaluate.js

@@ -2,9 +2,10 @@
 import { get, postwithoutahth , upload } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 const app = getApp();
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -291,4 +292,4 @@ Page({
       model:model
     })
   }
-})
+},share))

+ 3 - 2
pages/hot/hot.js

@@ -2,9 +2,10 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -100,4 +101,4 @@ Page({
       })
     }
   }
-})
+},share))

+ 3 - 2
pages/hotdt/hotdt.js

@@ -2,9 +2,10 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -79,4 +80,4 @@ Page({
       _self.setData(json.data);
     })
   }
-})
+},share))

+ 3 - 9
pages/loans/loans.js

@@ -1,10 +1,11 @@
 // pages/loans/loans.js
 import { get,post } from "../../common/request.js"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 const app = getApp();
 
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -60,12 +61,5 @@ Page({
    */
   onReachBottom: function () {
   
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-  
   }
-})
+},share))

+ 3 - 2
pages/mybuy/mybuy.js

@@ -2,10 +2,11 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 import { retCartData } from "../../data/car"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -101,4 +102,4 @@ Page({
       })
     }
   }
-})
+},share))

+ 3 - 2
pages/myloan/myloan.js

@@ -2,9 +2,10 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 const app = getApp();
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -166,4 +167,4 @@ Page({
       wx.redirectTo({url:"../buy/buy"});
     }
   }
-})
+},share))

+ 3 - 2
pages/mysuggest/mysuggest.js

@@ -2,8 +2,9 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -96,4 +97,4 @@ Page({
       })
     }
   }
-})
+},share))

+ 3 - 2
pages/orderdetail/orderdetail.js

@@ -2,10 +2,11 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 import { retCartData } from "../../data/car"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -96,4 +97,4 @@ Page({
       urls: [url] // 需要预览的图片http链接列表
     })
   }
-})
+},share))

+ 3 - 2
pages/sell/sell.js

@@ -2,10 +2,11 @@
 import { get,post,postwithoutahth,upload } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 // import bindLog from "../../module/logs/logs"
 const app = getApp();
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -265,4 +266,4 @@ Page({
     imgs.splice(index,1);
     this.setData({imgs:imgs});
   }
-})
+},share))

+ 3 - 2
pages/shop/shop.js

@@ -2,10 +2,11 @@
 import { get } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 import { retCartData } from "../../data/car"
 var app = getApp();
 
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -118,4 +119,4 @@ Page({
       })
     }
   }
-})
+},share))

+ 3 - 2
pages/test/test.js

@@ -2,9 +2,10 @@
 import { get,post } from "../../common/request.js"
 import pathmap from "../../common/pathmap"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 
 const app = getApp();
-Page({
+Page(Object.assign({
 
   /**
    * 页面的初始数据
@@ -100,4 +101,4 @@ Page({
       })
     }
   }
-})
+},share))

+ 2 - 1
pages/usercenter/usercenter.js

@@ -2,6 +2,7 @@
 
 import bindLog,{logs} from "../../module/logs/logs"
 import stylemap from "../../common/stylemap"
+import share from "../../common/share"
 
 var app = getApp();
 Page(Object.assign({
@@ -110,4 +111,4 @@ Page(Object.assign({
     wx.removeStorageSync("authorization");
     this.openLog();
   }
-},logs))
+},logs,share))