Commit 0ce9c52abb67b5a9c207f8eb8ba46e3f735f7650

Authored by DESKTOP-QHAFKU5\iceling
1 parent 40806557

首页点击我的服务判断是否已注册

pages/user/index/index.js
... ... @@ -40,7 +40,18 @@ Page({
40 40 onLoad: function (options) {
41 41  
42 42 },
43   -
  43 + //我的服务跳转前判断
  44 + goto_service:function(){
  45 + var th = this;
  46 + if(th.data.userInfo!=null){
  47 + var url = "/pages/user/my_service/i_service";
  48 + getApp().goto(url);
  49 + }else{
  50 + wx.navigateTo({
  51 + url: '/pages/getphone/getphone',
  52 + })
  53 + }
  54 + },
44 55 /**
45 56 * 生命周期函数--监听页面显示
46 57 */
... ...
pages/user/index/index.wxml
... ... @@ -212,7 +212,7 @@
212 212 <image class="xc-center-img " src="{{iurl}}/miniapp/images/add2.png"></image>
213 213 <view class="four-level-word">我的地址</view>
214 214 </view>
215   - <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto" >
  215 + <view class="item t-c" data-url="/pages/user/my_service/i_service" bindtap="goto_service" >
216 216 <image class="xc-center-img " src="{{iurl}}/miniapp/images/yyservice/myservice.png"></image>
217 217 <view class="four-level-word">我的服务</view>
218 218 </view>
... ...