Skip to content

Commit

Permalink
修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
闫士博 committed Aug 1, 2018
1 parent 5a9098e commit 37a0e3b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sh/pages/member/detail.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<view class="container">
<view class="header" bindtap="toedit">
<view class="header">
<image class="avtar" src="{{useInfos.headImg}}" mode="aspectFill"></image>
<view class="msg">
<view class="title">
Expand Down
8 changes: 7 additions & 1 deletion xfz/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ App({
})
},
onShow :function(data){
//console.log(data);
var that = this;
if(data.referrerInfo && data.referrerInfo.appId == "wxeb490c6f9b154ef9"){
wx.showLoading({
title: '加载中',
})
var callbackdata = data.referrerInfo.extraData;
var card = {};
card.code = callbackdata.code;
card.card_id = callbackdata.card_id;
that.globalData.card = card;
console.log(that.globalData.card);
var params = that.params(callbackdata.wx_activate_after_submit_url.split("?")[1]);
wx.request({
url: "https://ssl.zhihuishangjie.cn/app/user/submitOpenCardInfo",
Expand All @@ -58,12 +63,13 @@ App({
},
success: function(res) {
if(res.data.code == 0){
wx.hideLoading()
wx.showToast({
title: "领取会员卡成功!",
icon: 'none',
duration: 1500
})
app.globalData.logingData.needOpenCard = false;
that.globalData.logingData.needOpenCard = false;
}else{
wx.showToast({
title: res.data.message,
Expand Down
4 changes: 4 additions & 0 deletions xfz/pages/index/chooseMerchant.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Page({
that.setData({
mlist: data
})
console.log(data);
if(data.length == 1){
wx.setStorageSync('xfzshopname', data[0].name);
var code = data[0].merchantCode;
app.getJson(app.urlMap.chooseMerchant,"post",{
merchantCode:code
Expand All @@ -51,6 +53,8 @@ Page({
},
enter: function(e) {
var code = e.currentTarget.dataset.code;
var name = e.currentTarget.dataset.name;
wx.setStorageSync('xfzshopname', name);
app.getJson(app.urlMap.chooseMerchant,"post",{
merchantCode:code
},function(res){
Expand Down
2 changes: 1 addition & 1 deletion xfz/pages/index/chooseMerchant.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<view class="container">
<view bindtap="enter" class="list" wx:for="{{mlist}}" data-code="{{item.merchantCode}}">
<view bindtap="enter" class="list" wx:for="{{mlist}}" data-code="{{item.merchantCode}}" data-name="{{item.name}}">
<view class="mname">{{item.name}}</view>
<view class="enter">进入></view>
</view>
Expand Down
8 changes: 5 additions & 3 deletions xfz/pages/my/my.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Page({
storedCount:"",
userInfo: {},
hasUserInfo: true,
shopname:"",
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
onShow:function(data){
Expand All @@ -17,11 +18,13 @@ Page({
wx.showLoading({
title: '加载中',
})
this.setData({
shopname:wx.getStorageSync('xfzshopname') || "智慧商街"
})
var that = this;
if(app.globalData.scene){
app.login(function(res){
app.globalData.logingData = res
console.log(res);
if(!res.needUserInfo){ //已开过卡
that.setData({
userInfo: app.globalData.logingData,
Expand All @@ -39,7 +42,6 @@ Page({
that.balance();
});
}else{
console.log(app.globalData.logingData)
if(!app.globalData.logingData.needUserInfo){
that.setData({
userInfo: app.globalData.logingData,
Expand Down Expand Up @@ -134,7 +136,7 @@ Page({
})
}else{
wx.showLoading({
title: '加载中',
title: '跳转中',
})
wx.openCard({
cardList: [
Expand Down
2 changes: 1 addition & 1 deletion xfz/pages/my/my.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</view>
<view class="msg-hd" catchtap="tocard">
<view class="code-hd">
<text class="title">智慧商街</text>
<text class="title">{{shopname}}</text>
<image class="code" src="../../images/my/iconcode.png" style="width: 37rpx;height: 37rpx"></image>
</view>
<view class="name-hd">
Expand Down

0 comments on commit 37a0e3b

Please sign in to comment.