stanley-king před 4 roky
rodič
revize
b8a3b26568

+ 74 - 62
app.js

@@ -1,60 +1,74 @@
 //app.js
 const ald = require('./utils/ald-stat.js')
 import WxAuthor from './utils/WxAuthor'
+require('./utils/push_sdk.js')
 
 App({
-    onLaunch: function() {
+    onLaunch: function () {
+        // if (__devtoolsConfig.network.request.indexOf('https://plog.xiaoshentui.com') !== -1) {
+        //   wx.showModal({
+        //     title: '小神推提示',
+        //     content: '配置成功,请进行下一步',
+        //   })
+        // } else {
+        //   wx.showModal({
+        //     title: '小神推提示',
+        //     content: '配置失败,请核查',
+        //   })
+        // }
+
         // 用户版本更新
-      if (wx.canIUse("getUpdateManager")) {
-        let updateManager = wx.getUpdateManager();
-        updateManager.onCheckForUpdate((res) => {
-          // 请求完新版本信息的回调
-          console.log(res.hasUpdate);
-        })
-        updateManager.onUpdateReady(() => {
-          wx.showModal({
-            title: '更新提示',
-            content: '新版本已经准备好,是否重启应用?',
-            success: (res) => {
-              if (res.confirm) {
-                // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-                updateManager.applyUpdate();
-              } else if (res.cancel) {
-                return false;
-              }
-            }
-          })
-        })
-        updateManager.onUpdateFailed(() => {
-          // 新的版本下载失败
-          wx.hideLoading();
-          wx.showModal({
-            title: '升级失败',
-            content: '新版本下载失败,请检查网络!',
-            showCancel: false
-          });
-        });
-      }
-      
-      let self = this;
-      // 登录
-      this.mWxAuthor = new WxAuthor(self,true)
-      const dirs = ['addAddress','address','myhome','confirmOrder','confirmVOrder',
-      'order_tabs','orderPaySn','person','postageDetail','postageManage','shopCart'];
+        if (wx.canIUse("getUpdateManager")) {
+            let updateManager = wx.getUpdateManager();
+            updateManager.onCheckForUpdate((res) => {
+                // 请求完新版本信息的回调
+                console.log(res.hasUpdate);
+            })
+            updateManager.onUpdateReady(() => {
+                wx.showModal({
+                    title: '更新提示',
+                    content: '新版本已经准备好,是否重启应用?',
+                    success: (res) => {
+                        if (res.confirm) {
+                            // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+                            updateManager.applyUpdate();
+                        } else if (res.cancel) {
+                            return false;
+                        }
+                    }
+                })
+            })
+            updateManager.onUpdateFailed(() => {
+                // 新的版本下载失败
+                wx.hideLoading();
+                wx.showModal({
+                    title: '升级失败',
+                    content: '新版本下载失败,请检查网络!',
+                    showCancel: false
+                });
+            });
+        }
+
+        // 登录
+        let self = this;
+        this.mWxAuthor = new WxAuthor(self, true)
+        const dirs = ['addAddress', 'address', 'myhome', 'confirmOrder', 'confirmVOrder',
+            'order_tabs', 'orderPaySn', 'person', 'postageDetail', 'postageManage', 'shopCart'
+        ];
 
-      let pages = new Set()
-      dirs.forEach(dir => {
-        let page = `/pages/${dir}/${dir}`   
-        pages.add(page)
-      });
-      this.globalData.authPages = pages    
-    },    
+        let pages = new Set()
+        dirs.forEach(dir => {
+            let page = `/pages/${dir}/${dir}`
+            pages.add(page)
+        });
+        this.globalData.authPages = pages
+    },
     globalData: {
         fMinistart: false,
         userId: {
             openid: '',
             unionid: '',
-            timeStamp:0
+            timeStamp: 0
         },
         userInfo: null,
         defaultAddress: null,
@@ -66,11 +80,11 @@ App({
         record: null,
         card_type: '',
         authPages: null,
-        mWxAuthor:null,
-        member_id:0,
+        mWxAuthor: null,
+        member_id: 0,
         hasmobile: false,
-        relay_id:0,
-        channel_num:0
+        relay_id: 0,
+        channel_num: 0
     },
 
     setFromSource(fromSource) {
@@ -88,7 +102,7 @@ App({
     setCardType(card_type) {
         this.globalData.card_type = card_type
     },
-    showToast(title, icon, duration){
+    showToast(title, icon, duration) {
         wx.showToast({
             icon: icon || 'none',
             title,
@@ -105,10 +119,8 @@ App({
     clearRecord() {
         this.globalData.record = null
     },
-    navigateto(page) 
-    {
-        if (!this.globalData.userInfo)
-        {
+    navigateto(page) {
+        if (!this.globalData.userInfo) {
             this.globalData.authPages.forEach(prefix => {
                 if (page.indexOf(prefix) == 0) {
                     wx.navigateTo({
@@ -117,21 +129,21 @@ App({
                     return;
                 }
             });
-        }        
-      
+        }
+
         wx.navigateTo({
             url: page,
         })
     },
-    switchtab(page) {        
+    switchtab(page) {
         if (!this.globalData.userInfo) {
             this.globalData.authPages.forEach(prefix => {
-                if(page.indexOf(prefix) == 0) {
+                if (page.indexOf(prefix) == 0) {
                     wx.navigateTo({
                         url: '/pages/auth/auth',
                     })
                     return;
-                }            
+                }
             });
         }
 
@@ -139,8 +151,8 @@ App({
             url: page,
         })
     },
-    getValueByKey(key = '', data = []){
-        if(!data.length) return {}
+    getValueByKey(key = '', data = []) {
+        if (!data.length) return {}
         return data.filter(val => val.card_type === key)[0] || {}
     },
     relogin() {
@@ -153,7 +165,7 @@ App({
         let share_path = `/pages/index/index?relay_id=${userid}`
         console.log('share path:', share_path)
 
-        let title = '我正在充值,麻烦帮我授权一下,100元能省5元哦!拜托拜托~'        
+        let title = '我正在充值,麻烦帮我授权一下,100元能省5元哦!拜托拜托~'
         return {
             title: title,
             path: share_path,

+ 1 - 0
app.json

@@ -1,6 +1,7 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/ence_push/ence_push",
     "pages/postage/postage",
     "pages/postageManage/postageManage",
     "pages/address/address",

+ 50 - 33
config.js

@@ -4,24 +4,22 @@ let api = "http://192.168.1.200/mobile/index.php";
 // let api = "https://www.xyzshops.cn/mobile/index.php";
 // let api = "http://www.xyzshops.cn/mobile/index.php";
 
-
-function getReq(app,data, callback, method)
-{
-  let options = { 
+function getReq(app, data, callback, method) {
+  let options = {
     client_type: 'mini'
   }
-  
+
   data = Object.assign({}, options, data);
   let session_id = wx.getStorageSync('session_id');
   if (!app.globalData.fMinistart && data['op'] != 'ministart') {
     setTimeout(() => {
-      getReq(app,data, callback, method)
+      getReq(app, data, callback, method)
     }, 0);
     return;
   }
+
   let act = data['act'];
-  if(act.indexOf('member_') == 0)
-  {
+  if (act.indexOf('member_') == 0) {
     if (app != null && !app.globalData.userInfo) {
       wx.navigateTo({
         url: '/pages/auth/auth',
@@ -29,7 +27,7 @@ function getReq(app,data, callback, method)
       return;
     }
   }
-  
+
   console.log('act=' + act + '&' + 'op=' + data['op']);
   let header = {
     'content-type': 'application/json', // 默认值
@@ -42,31 +40,28 @@ function getReq(app,data, callback, method)
       'Cookie': 'MPHPSESSID=' + session_id
     }
   }
-  
+
   return wx.request({
     url: api,
     data,
     method: method || 'GET',
     header,
-    success(res) 
-    {
+    success(res) {
       console.log('header:', res.header["Set-Cookie"])
       var cookies = res.header["Set-Cookie"];
       if (cookies) {
         var cookie = getCookieValue(cookies, 'MPHPSESSID');
-        if(cookie) wx.setStorageSync('session_id', cookie);
+        if (cookie) wx.setStorageSync('session_id', cookie);
       }
       if (res.data.code == 10014) { //ErrUnLogin = 10014;
         wx.navigateTo({
           url: '/pages/auth/auth',
         })
-      }
-      else {
+      } else {
         callback(res.data)
       }
     },
-    fail() 
-    {
+    fail() {
       wx.showModal({
         confirmText: '重试',
         content: '网络错误',
@@ -75,8 +70,7 @@ function getReq(app,data, callback, method)
             wx.reLaunch({
               url: "/pages/index/index"
             })
-          } 
-          else if (res.cancel) {
+          } else if (res.cancel) {
             console.log('用户点击取消')
           }
         }
@@ -85,8 +79,8 @@ function getReq(app,data, callback, method)
   })
 }
 
-function getCookieValue(cookies,name) {
-  var cookie_pos = cookies.indexOf(name,0);
+function getCookieValue(cookies, name) {
+  var cookie_pos = cookies.indexOf(name, 0);
   if (cookie_pos != -1) {
     cookie_pos += name.length + 1;
     var cookie_end = cookies.indexOf(";", cookie_pos);
@@ -100,16 +94,15 @@ function getCookieValue(cookies,name) {
   }
 }
 
-function buyVGoods(app,goods_id,goods_num, other, successCallback, failCallback) 
-{
-  let ifcart = 0 ; 
+function buyVGoods(app, goods_id, goods_num, other, successCallback, failCallback) {
+  let ifcart = 0;
   let cartids = goods_id + '|' + goods_num;
   let params = {
     act: 'member_buy',
     op: 'step_vsecond',
     payment: 'minipay',
     usebonus: 0,
-    ifcart : 0,
+    ifcart: 0,
     cart_id: cartids,
     invoice_id: 0,
     ...other
@@ -120,20 +113,32 @@ function buyVGoods(app,goods_id,goods_num, other, successCallback, failCallback)
     mask: true
   });
   params = Object.assign({}, params);
-  getReq(app,params, function (res) {
+  getReq(app, params, function (res) {
     wx.hideLoading()
     if (res.code == 200) {
       let param = res.datas.param.data
       let pay_sn = res.datas.pay_sn
       wx.requestPayment({
         timeStamp: param.timeStamp, //时间戳,自1970年以来的秒数
-        nonceStr: param.nonceStr,   //随机串
+        nonceStr: param.nonceStr, //随机串
         package: param.package,
         signType: param.signType, //微信签名方式:
-        paySign: param.paySign,   //微信签名
+        paySign: param.paySign, //微信签名
         success: function (res) {
           wx.hideLoading()
           successCallback && successCallback(res)
+          wx.aldPushSubscribeMessage({
+            eventId: '5f38ac6790fcd68beee4d510',
+            success(res) {
+              // 成功后的回调函数
+              console.log(res)
+            },
+            fail(res, e) {
+              // 失败后的回调函数
+              console.log(res)
+              console.log(e)
+            }
+          });
         },
         fail: function (res) {
           wx.showToast({
@@ -144,8 +149,7 @@ function buyVGoods(app,goods_id,goods_num, other, successCallback, failCallback)
           failCallback && failCallback(res)
         }
       });
-    }
-    else {
+    } else {
       wx.showToast({
         icon: 'none',
         title: '支付未完成,订单将在10分钟后取消...',
@@ -167,14 +171,27 @@ function payOrder(app, pay_sn) {
       let param = res.datas.param.data;
       wx.requestPayment({
         timeStamp: param.timeStamp, //时间戳,自1970年以来的秒数
-        nonceStr: param.nonceStr,   //随机串
+        nonceStr: param.nonceStr, //随机串
         package: param.package,
-        signType: param.signType,   //微信签名方式:
-        paySign: param.paySign,     //微信签名
+        signType: param.signType, //微信签名方式:
+        paySign: param.paySign, //微信签名
         success: function (res) {
           wx.redirectTo({
             url: "/pages/order_tabs/orderTabs?state_type=state_pay"
           })
+
+          wx.aldPushSubscribeMessage({
+            eventId: '5f38ac6790fcd68beee4d510',
+            success(res) {
+              // 成功后的回调函数
+              console.log(res)
+            },
+            fail(res, e) {
+              // 失败后的回调函数
+              console.log(res)
+              console.log(e)
+            }
+          });
           console.log("支付成功:", res);
         },
         fail: function (res) {

+ 15 - 15
pages/components/auth/auth.js

@@ -1,6 +1,7 @@
 // pages/components/auth/auth.js
 const api = require('../../../config');
 const getReq = require('../../../config').getReq;
+const ald = require('../../../utils/ald-stat.js')
 
 let app = getApp();
 Component({
@@ -17,19 +18,19 @@ Component({
   data: {
     phone_iv: '',
     phone_encryptedData: '',
-    userInfoE:{},
+    userInfoE: {},
     showAuthName: true,
     showAuthPhone: false,
   },
 
   lifetimes: {
     attached: function () {
-      if(!app.globalData.userInfo) {
+      if (!app.globalData.userInfo) {
         this.setData({ showAuthName: true, showAuthPhone: false })
       }
-      else if(!app.globalData.hasmobile) {
+      else if (!app.globalData.hasmobile) {
         this.setData({ showAuthName: false, showAuthPhone: true })
-      }      
+      }
     },
     detached: function () {
     },
@@ -38,24 +39,23 @@ Component({
    * 组件的方法列表
    */
   methods: {
-    userPhoneHandler: function(e) { 
-      if (e.detail.errMsg == "getPhoneNumber:ok"){
+    userPhoneHandler: function (e) {
+      if (e.detail.errMsg == "getPhoneNumber:ok") {
+        wx.aldstat.sendEvent('wxAuthen', { phone: true })
         this.phone_encryptedData = e.detail.encryptedData
         this.phone_iv = e.detail.iv
         this.wxauthen(this.userInfoE)
       }
     },
-    userInfoHandler(e) 
-    {
-      if (e.detail.errMsg == "getUserInfo:ok") 
-      {
+    userInfoHandler(e) {
+      if (e.detail.errMsg == "getUserInfo:ok") {
         app.globalData.userInfo = e.detail.userInfo;
         app.globalData.userInfo.nickname = e.detail.userInfo.nickName;
         this.userInfoE = e
         this.wxauthen(e)
       }
     },
-    wxauthen: function (eInfo) {      
+    wxauthen: function (eInfo) {
       let userInfo;
       if (app.globalData.userId.unionid) {
         userInfo = Object.assign({}, app.globalData.userId, app.globalData.userInfo);
@@ -65,7 +65,7 @@ Component({
         let { encryptedData, iv, signature } = eInfo.detail
         userInfo = Object.assign({}, { encryptedData }, { signature }, { iv }, userInfo)
       }
-      
+
       let phoneInfo = { iv: this.phone_iv, encryptedData: this.phone_encryptedData }
       let params = {
         user_info: userInfo,
@@ -77,14 +77,14 @@ Component({
       }
 
       let self = this;
-      getReq(app,params, function (res) {
+      getReq(app, params, function (res) {
         if (res.code == 200) {
           let datas = res.datas;
           app.globalData.member_id = datas.member_id
           app.globalData.hasmobile = datas.hasmobile
-          
+
           if (datas.hasmobile == false) {
-            self.setData({showAuthName:false,showAuthPhone:true})
+            self.setData({ showAuthName: false, showAuthPhone: true })
           }
           else {
             self.triggerEvent('getAuth', {

+ 1 - 1
pages/components/blockItem/blockItem.wxml

@@ -40,5 +40,5 @@
 </block>
 
 <block wx:elif="{{item_data.show_type == 'video'|| item_data.type == 'video'}}">
-   <video id="myVideo" src="{{item_data.data}}" style="width:100%;height:{{(item_data.height/1080*750)+'rpx'}}"  controls></video>
+   <video id="myVideo" src="{{item_data.data}}" style="width:100%;height:{{(item_data.height/1080*750)+'rpx'}}" controls></video>
 </block>

+ 110 - 0
pages/ence_push/ence_push.js

@@ -0,0 +1,110 @@
+let PUSH = require('../../utils/push_conf.js');
+
+let isOver = false;
+
+let api = 'https://openapi2.xiaoshentui.com/'
+
+Page({
+  data: {
+  },
+  onShow() {
+    let _this = this;
+    if (wx.getStorageSync('push_avatarurl') && wx.getStorageSync('push_nickname')){
+      this.setData({
+        avatarurl: wx.getStorageSync('push_avatarurl'),
+        nickname: wx.getStorageSync('push_nickname'),
+      })
+    }
+  },
+  onGotUserInfo: function(e) {
+    this.setData({
+      avatarurl: e.detail.userInfo.avatarUrl,
+      nickname: e.detail.userInfo.nickName,
+    })
+    wx.setStorageSync('push_avatarurl', e.detail.userInfo.avatarUrl)
+    wx.setStorageSync('push_nickname', e.detail.userInfo.nickName)
+  },
+  subscribe: function(e) {
+    if (!wx.getStorageSync('ald_push_openid')) {
+      return this.debugModel('openid未上报');
+    };
+    if (isOver) return;
+    isOver = true;
+    if (!this.isSubscribe()){
+      return this.debugModel('基础库版本不支持订阅消息');
+    }
+    let _this = this;
+    let data = {
+      avatarurl: this.data.avatarurl,
+      nickname: this.data.nickname,
+      app_key: PUSH.app_key,
+      openid: wx.getStorageSync('ald_push_openid')
+    }
+    wx.request({
+      url: api + 'api/v1/getpt',
+      data: {
+        app_key: PUSH.app_key
+      },
+      method: 'POST',
+      success(res) {
+        let tlis = res.data.data.list.map(function(item){
+          return item.template_id;
+        })
+        wx.requestSubscribeMessage({
+          tmplIds: tlis,
+          success(_res) {
+            let tmplIdsArr = [];
+            for (let i in _res) {
+              if (_res[i] === 'accept') {
+                tmplIdsArr.push(i);
+              }
+            }
+            if (!tmplIdsArr.length) {
+              isOver = false;
+              return _this.debugModel('未订阅模版');
+            }
+            data.tlis = tmplIdsArr;
+            wx.request({
+              url: api + 'api/v1/reportdt',
+              data: data,
+              method: 'POST',
+              success: function (__res) {
+                isOver = false;
+                _this.debugModel('订阅成功');
+              },
+              fail(e) {
+                isOver = false;
+                _this.debugModel('订阅成功模版上报失败');
+              }
+            })
+          },
+          fail(e) {
+            isOver = false;
+            _this.debugModel('订阅失败');
+          }
+        })
+      },
+      fail(e) {
+        isOver = false;
+        _this.debugModel('获取模版ID请求失败');
+      }
+    });
+  },
+  isSubscribe() {
+    var SyStemRes = wx.getSystemInfoSync();
+    if (typeof SyStemRes.SDKVersion !== 'undefined') {
+      let v = parseInt(SyStemRes.SDKVersion.split('.').join(''));
+      if (v >= 282) {
+        return true;
+      }
+      return false;
+    }
+    return false;
+  },
+  debugModel(msg) {
+    wx.showModal({
+      title: '小神推提示',
+      content: msg,
+    });
+  }
+});

+ 1 - 0
pages/ence_push/ence_push.json

@@ -0,0 +1 @@
+{ "navigationBarTitleText": "小神推", "navigationBarBackgroundColor": "#7cb8fa"}

+ 22 - 0
pages/ence_push/ence_push.wxml

@@ -0,0 +1,22 @@
+<view  class="wrap">
+  <view class='wrap_title'>
+    <view class='wrap_title_top topstyle'>欢迎来到测试体验!</view>
+    <view class='wrap_title_top'>点击体验按钮,获取体验资格。</view>
+  </view>
+  <view class='wrap_middle'>
+    <image src="https://openapi.xiaoshentui.com/push_sdk_img/ence-push_test.png"></image>
+  </view>
+  <view class='wrap_bottom'>
+     <form class='form_box'>
+      <view class='wrap_bottom_img'>
+        <view class='wrap_bottom_btn'>
+          <button class='form_box_btn_' wx:if="{{!nickname && !avatarurl}}" open-type="getUserInfo" bindgetuserinfo="onGotUserInfo">上报您的头像昵称</button>
+          <button class='form_box_btn' wx:if="{{nickname && avatarurl}}" open-type="getUserInfo" bindtap="subscribe">订阅</button>
+         </view>
+      </view>
+    </form>
+  </view>
+  <view class='ex_tip' wx:if="{{isShowtip}}">
+    {{tip}}
+  </view>
+</view>

+ 124 - 0
pages/ence_push/ence_push.wxss

@@ -0,0 +1,124 @@
+  .wrap{
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    display: flex;
+    flex-direction:column;
+}
+.wrap_title {
+  flex: 1;
+  width: 100%;
+  height: 150rpx;
+  margin: 0 auto;
+
+}
+.wrap_title_top{
+  width: 100%;
+  height: 75rpx;
+  line-height: 75rpx;
+  text-align: center;
+  font-size: 40rpx;
+  color: #4687F7;
+  font-weight: 600;
+}
+.topstyle {
+  margin-top: 80rpx
+}
+.wrap_middle{
+   flex: 1;
+  width: 100%;
+  height: 450rpx;
+}
+.wrap_middle image {
+  display: block;
+  width: 530rpx;
+  height: 100%;
+  margin: 0 auto;
+}
+.wrap_bottom {
+   flex: 1;
+  width: 100%;
+  padding-top: 90rpx;
+}
+
+.form_box {
+  width: 100%;
+  height: 300rpx;
+  background-color: #999
+}
+.form_box_btn_ {
+  position: relative;
+  background-color: #fff;
+  width: 195rpx;
+  height: 190rpx;
+  color: #fff;
+  margin: 0 auto;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  line-height: 34rpx;
+  background: linear-gradient(to right, #5093ee , #06b4f1);
+  background: -webkit-linear-gradient(top right, #06b4f1, #5093ee );
+  border-radius: 100%;
+  font-size: 24rpx;
+  word-break: break-all;
+}
+.form_box_btn {
+   position: relative;
+   background-color: #fff;
+   width: 195rpx;
+   height: 190rpx;
+   color: #fff;
+   line-height: 190rpx;
+   margin: 0 auto;
+   background: linear-gradient(to right, #5093ee , #06b4f1);
+   background: -webkit-linear-gradient(top right, #06b4f1, #5093ee );
+   border-radius: 100%;
+}
+.wrap_bottom_img {
+  width: 100%;
+  height: 200rpx;
+}
+.wrap_bottom_img image {
+  display: block;
+  width: 200rpx;
+  height: 200rpx;
+  margin: 0 auto;
+  margin-top: 50rpx;
+}
+.wrap_bottom_num {
+  text-align: center;
+  font-size: 24rpx;
+  color: #999;
+  margin-top: 50rpx
+}
+.wrap_bottom_num .num {
+  display: inline;
+  color: #4687F7;
+  font-size:30rpx;
+}
+.form_box_btn text {
+  position: absolute;
+   top:95rpx;
+  left:106rpx;
+  color: #fff;
+}
+.form_box_btn::after {
+  border: none;
+}
+.ex_tip{
+  width:650rpx;
+  height: 40rpx;
+  position: fixed;
+  top:0;
+  left:0;
+  right:0;
+  bottom: 0;
+  margin:auto;
+  padding:20rpx;
+  background:rgba(0, 0, 0, .6);
+  text-align: center;
+  color:#fff;
+  z-index: 100;
+  border-radius: 6px;
+}

+ 3 - 3
pages/index/index.js

@@ -63,9 +63,9 @@ Page({
   },
   getDatas(special_id) {
     let fromSource = recordSource(app, 'act=index&op=index&special_id=0&page=10&curpage=1&client_type=mini')
-    wx.showLoading({
-      title: '加载中'
-    });
+    // wx.showLoading({
+    //   title: '加载中'
+    // });
     let self = this;
     console.log('fromSource =' + fromSource)
     getReq(app,{

+ 6 - 2
pages/myhome/myhome.js

@@ -28,7 +28,11 @@ Page({
     const { cardtype } = e.currentTarget.dataset
     if(cardtype === 'invitees') {
       app.navigateto('/pages/invitees/invitees')
-    } else {
+    }
+    else if (cardtype === 'contact') {
+
+    } 
+    else {
       app.navigateto(`/pages/postageManage/postageManage?card_type=${cardtype}`)
     }
   },
@@ -175,6 +179,6 @@ Page({
    * 用户点击右上角分享
    */
   onShareAppMessage: function () {
-    // return app.cardShareInfo();
+    return app.cardShareInfo();
   }
 })

+ 11 - 5
pages/myhome/myhome.wxml

@@ -4,7 +4,7 @@
 	<view class="topbg"></view>
 	<view class="header">
 		<image src="{{memberInfo.member_avatar}}" class="avtor"></image>
-		<view class="info" >
+		<view class="info">
 			<view class="leftContent">
 				<text class="nickname">{{memberInfo.member_nickname}}</text>
 				<text class="qrcodeLabel">点击二维码面对面邀请</text>
@@ -55,10 +55,16 @@
 			</view>
 		</view>
 	</view>
-
-
+	
 	<view class="cardList">
-		<view class="card">
+	<view class="card">
+		<view class="card-title" bindtap="handleMore" data-cardtype="contact">
+			<image src="/image/phone.png" class="icon icon-phone"></image>
+			<button class="button" open-type="contact">联系客服</button>
+			<image src="/image/myhome/arrow-right.png" class="more"></image>
+		</view>
+	</view>
+ 	<view class="card">
 			<view class="card-title" bindtap="handleMore" data-cardtype="phone">
 				<image src="/image/phone.png" class="icon icon-phone"></image>
 				<text class="text">我的手机号</text>
@@ -98,4 +104,4 @@
 	</view>
 </view>
 
-<showImage wx:if="{{showRCode}}" imageUrl="{{mini_code}}"  bind:closeDialog="onCloseMiniDialog" />
+<showImage wx:if="{{showRCode}}" imageUrl="{{mini_code}}" bind:closeDialog="onCloseMiniDialog" />

+ 11 - 0
pages/myhome/myhome.wxss

@@ -111,6 +111,17 @@
   flex: 1
 }
 
+.card-title .button {
+    background-color: white; /* Green */
+    border: none;
+    color: black;
+    padding: 0px 0px;
+    text-align: left;
+    text-decoration: none;
+    display: inline-block;
+    font-size: 16px;
+}
+
 .card-title .more {
   font-size: 24rpx;
   color: #8e8e8e;

+ 1 - 0
utils/WxAuthor.js

@@ -34,6 +34,7 @@ export default class WxAuthor {
         if (openid && unionid) {
           this.setId(openid, unionid)
           wx.aldstat.sendOpenid(openid)
+          wx.aldPushSendOpenid(openid)
           if(this.fGetSetting) {
             this.getSetting(false)
           }

+ 3 - 0
utils/push_conf.js

@@ -0,0 +1,3 @@
+exports.plugin = true; //是否引用插件
+exports.debug = false; //调试模式,开启后所有错误信息将以model形式提示给您
+exports.app_key = "8ee46e4f1685bc8161385d9ad507054e";//小神推后台获取的app_key

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
utils/push_sdk.js