Skip to content

Commit

Permalink
ques
Browse files Browse the repository at this point in the history
  • Loading branch information
闫士博 committed Aug 7, 2018
1 parent 61b5175 commit 471b352
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 35 deletions.
Binary file added sh/images/linke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions sh/pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ Page({

},
onShow:function(e){
console.log("Show");
},
onLoad: function () {
console.log("Load");
wx.showLoading({
title: '加载中',
})
this.getData();
},
onLoad: function () {

},
getData:function(){
wx.hideLoading()
Expand Down
4 changes: 2 additions & 2 deletions sh/pages/member/detail.wxml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<view class="container">
<view class="header">
<image class="avtar" src="{{useInfos.headImg}}" mode="aspectFill"></image>
<image class="avtar" src="{{useInfos.headImg || '../../images/linke.png'}}" mode="aspectFill"></image>
<view class="msg">
<view class="title">
<text>{{useInfos.name}}</text>
<text>{{useInfos.name || '临客'}}</text>
<image wx:if="{{useInfos.sex == 2}}" class="gender" src="../../images/gender2.png"></image>
<image wx:if="{{useInfos.sex == 1}}" class="gender" src="../../images/gender1.png"></image>
<view wx:if="{{useInfos.chargeCount>0}}" class="chuzhi">已储值</view>
Expand Down
18 changes: 10 additions & 8 deletions sh/pages/member/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Page({
total:0
},
onShow:function(e){

/*this.getList();
this.getSummary();*/
},
onLoad: function (options) {
var params = options || {};
Expand Down Expand Up @@ -62,6 +63,7 @@ Page({
app.getJson(app.urlMap.queryUserList,"get",param,function(res){
if(res.data.code == 0){
var list = that.data.list.concat(res.data.data.list);
console.log(list)
that.setData({
list:list,
total:res.data.data.total
Expand All @@ -81,26 +83,26 @@ Page({
});
},
searchfocus: function(){
this.setData({
/* this.setData({
searchfocus:true
})
})*/
},
changephone:function(e){
/*this.setData({
this.setData({
phone:e.detail.value
})*/
})
},
tosearch:function(e){
tosearch:function(){
var that = this;
var param = that.data.param;
param.pageNo = 1;
that.setData({
phone:e.detail.value,
phone:that.data.phone,
param:param
})
var param = JSON.parse(JSON.stringify(that.data.param));
if(that.data.phone !== ""){
param.phone = e.detail.value;
param.phone = that.data.phone;
}
wx.showLoading({
title: '加载中',
Expand Down
8 changes: 4 additions & 4 deletions sh/pages/member/list.wxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<view class="container">
<view class="header">
<view class="search-hd" bindtap="searchfocus">
<image src="../../images/searchicon.png" style="width: 25rpx;height: 25rpx;"></image>
<input placeholder="请输入会员手机号" placeholder-style="color:#999" focus="{{searchfocus}}" type="number" bindinput="changephone" confirm-type="done" bindconfirm="tosearch" value="{{phone}}"></input>
<input placeholder="请输入会员手机号" placeholder-style="color:#999" focus="{{searchfocus}}" type="number" bindinput="changephone" value="{{phone}}"></input>
<image src="../../images/searchicon.png" bindtap="tosearch" style="width: 25rpx;height: 25rpx;"></image>
</view>
</view>
<view class="datas">
Expand Down Expand Up @@ -39,10 +39,10 @@
</view>
<view class="member-box">
<view class="member-list" data-id="{{item.userId}}" wx:for="{{list}}" bindtap="todetail">
<image class="avtar" src="{{item.headImg}}" mode="aspectFill"></image>
<image class="avtar" src="{{item.headImg || '../../images/linke.png'}}" mode="aspectFill"></image>
<view class="msg">
<view class="title">
<text>{{item.name}}</text>
<text>{{item.name || '临客'}}</text>
<image wx:if="{{item.sex == 2}}" class="gender" src="../../images/gender2.png"></image>
<image wx:if="{{item.sex == 1}}" class="gender" src="../../images/gender1.png"></image>
<view wx:if="{{item.chargeCount>0}}" class="chuzhi">已储值</view>
Expand Down
5 changes: 3 additions & 2 deletions sh/pages/member/list.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
padding: 20rpx 25rpx;
}
.search-hd{
width: 700rpx;
width: 640rpx;
height: 50rpx;
line-height: 50rpx;
background: #ebebeb;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 30rpx
}
.search-hd input{
color: #333;
font-size: 24rpx;
margin-left: 10rpx;
width: 200rpx;
flex: 1;
}
.datas{
height: 180rpx;
Expand Down
15 changes: 10 additions & 5 deletions sh/pages/member/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Page({
searchfocus:false,
scene:"",
codeImg:"",
pageHided:false
pageHided:false,
phone:""
},
onLoad: function () {
this.getQrCode();
Expand Down Expand Up @@ -76,7 +77,12 @@ Page({
searchfocus:true
})
},
tosearch:function(e){
changephone:function(e){
this.setData({
phone:e.detail.value
})
},
tosearch:function(){
var that = this;
var param = {
pageSize:10,
Expand All @@ -87,10 +93,9 @@ Page({
payTimeOrder:"DESC"
};

if(e.detail.value !== ""){
param.phone = e.detail.value;
if(that.data.phone !== ""){
param.phone = that.data.phone;
app.getJson(app.urlMap.queryUserList,"get",param,function(res){
console.log(res);
if(res.data.code == 0){
var list = res.data.data.list;
if(list.length == 0){
Expand Down
4 changes: 2 additions & 2 deletions sh/pages/member/store.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<view class="code-hd">
<image class="codebg" src="../../images/member/storedbg.png" />
<view class="search-hd" bindtap="searchfocus">
<image src="../../images/searchicon.png" style="width: 25rpx;height: 25rpx;"></image>
<input placeholder="请输入手机号" type="number" focus="{{searchfocus}}" confirm-type="search" bindconfirm="tosearch"></input>
<input placeholder="请输入手机号" type="number" focus="{{searchfocus}}" confirm-type="search" bindinput="changephone"></input>
<image src="../../images/searchicon.png" bindtap="tosearch" style="width: 25rpx;height: 25rpx;"></image>
</view>
<image class="code" src="{{codeImg}}" />
<view class="tips1">请使用微信扫描二维码</view>
Expand Down
5 changes: 3 additions & 2 deletions sh/pages/member/store.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
z-index: -1;
}
.search-hd{
width: 560rpx;
width: 500rpx;
height: 50rpx;
line-height: 50rpx;
background: #ffebd2;
Expand All @@ -23,12 +23,13 @@
align-items: center;
justify-content: center;
margin: 50rpx auto 0;
padding: 0 30rpx;
}
.search-hd input{
color: #999999;
font-size: 24rpx;
margin-left: 10rpx;
width: 200rpx;
flex:1;
}
.code{
width: 414rpx;
Expand Down
4 changes: 2 additions & 2 deletions sh/pages/member/success.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Page({
});
},
toconfirm: function() {
wx.navigateTo({
url: 'list'
wx.switchTab({
url: '../index/index'
})
},
})
1 change: 1 addition & 0 deletions xfz/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ App({
// 发送 res.code 到后台换取 openId, sessionKey, unionId
var data = {};
data.code = res.code;
data.appId = "wx3e96083ff8d73c66";
if(that.globalData.scene !==""){
data.scene = that.globalData.scene
}
Expand Down
14 changes: 13 additions & 1 deletion xfz/pages/index/chooseMerchant.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,19 @@ Page({
that.setData({
mlist: data
})
console.log(data);
if(data.length == 0){
wx.navigateToMiniProgram({
appId: 'wx1d0a87b1729eff40',
extraData: data,
success: function() {
},
fail: function(res) {
},
complete: function() {

}
})
}
if(data.length == 1){
wx.setStorageSync('xfzshopname', data[0].name);
var code = data[0].merchantCode;
Expand Down
6 changes: 3 additions & 3 deletions xfz/pages/my/my.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ Page({
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
onShow:function(data){

},
onLoad: function (options) {
wx.showLoading({
title: '加载中',
})
Expand Down Expand Up @@ -59,6 +56,9 @@ Page({
wx.hideLoading()
that.balance();
}
},
onLoad: function () {

},
balance:function(){
var that = this;
Expand Down

0 comments on commit 471b352

Please sign in to comment.