ソースを参照

更新

master
wuwenjie 5年前
コミット
ab25655c6d
25個のファイルの変更35行の追加13行の削除
  1. +10
    -1
      app.js
  2. +0
    -2
      pages/coupon/coupon.js
  3. +4
    -1
      pages/home/home.js
  4. +1
    -2
      pages/home/home.wxml
  5. +8
    -1
      pages/login/login.js
  6. +1
    -1
      pages/login/login.wxml
  7. +6
    -3
      pages/record/record.js
  8. +3
    -0
      pages/store/store.js
  9. +1
    -1
      pages/store/store.wxml
  10. +1
    -1
      project.config.json
  11. バイナリ
      static/coupon/Coupon1.png
  12. バイナリ
      static/coupon/couponIcon.png
  13. バイナリ
      static/coupon/logo.png
  14. バイナリ
      static/coupon/txt.png
  15. バイナリ
      static/home/arrow.png
  16. バイナリ
      static/home/logo.png
  17. バイナリ
      static/login/logo.png
  18. バイナリ
      static/store/location.png
  19. バイナリ
      static/store/phone.png
  20. バイナリ
      static/tabBar/home0.png
  21. バイナリ
      static/tabBar/home1.png
  22. バイナリ
      static/tabBar/record0.png
  23. バイナリ
      static/tabBar/record1.png
  24. バイナリ
      static/tabBar/store0.png
  25. バイナリ
      static/tabBar/store1.png

+ 10
- 1
app.js ファイルの表示

@@ -16,7 +16,6 @@ App({
},
success(res) {
res = res.data;
console.log(res)
if (res.code == 200) {
that.globalData.baseInfo = res.data;
wx.setStorageSync('laomenkuangBaseInfo', res.data)
@@ -58,11 +57,21 @@ App({
}
})
},
setUserInfo(userInfo){
userInfo.nickname = userInfo.nickName
userInfo.headimgurl = userInfo.avatarUrl
return userInfo
},
getInfo: function() {
this.requestGet('getinfo', "", res => {
if (res.code == 200) {
this.globalData.userState = 1;
this.globalData.storeData=res.data;
if (res.data.user_info){
res.data.user_info.nickName = res.data.user_info.nickname
res.data.user_info.avatarUrl = res.data.user_info.headimgurl
}
this.globalData.userInfo = res.data.user_info;
} else {
this.globalData.userState = 0;
}

+ 0
- 2
pages/coupon/coupon.js ファイルの表示

@@ -84,8 +84,6 @@ Page({
state: state
})
})

},
/**
* 添加优惠券

+ 4
- 1
pages/home/home.js ファイルの表示

@@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
phone:'',//手机号
isQuerying: false,
storeName: '', //店名
},
@@ -102,7 +103,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {

this.setData({
phone:''
})
},

/**

+ 1
- 2
pages/home/home.wxml ファイルの表示

@@ -6,8 +6,7 @@
<view class="fromBox">
<image class="arrow" src="../../static/home/arrow.png"></image>
<form bindsubmit="check">
<!-- <input name="code" maxlength="6" placeholder="请输入券码" placeholder-class="inputPlaceholder" style="margin-top:138rpx;" disabled="true" /> -->
<input name="phone" maxlength="11" placeholder="手机号核销" placeholder-class="inputPlaceholder" style="margin-top:132rpx;" type="number" />
<input name="phone" maxlength="11" value="{{phone}}" placeholder="手机号核销" placeholder-class="inputPlaceholder" style="margin-top:132rpx;" type="number" />
<button class="btn query {{isQuerying?'select':''}}" form-type="submit">查询</button>
<button class="btn scanning" bindtap="scanCode">点击扫描核销</button>
</form>

+ 8
- 1
pages/login/login.js ファイルの表示

@@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data: {
showLogin:false,
isLoginIng: false,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
hasUserInfo: false,
@@ -65,6 +66,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that=this;
wx.hideShareMenu();
if (app.globalData.userInfo) {
this.setData({
@@ -99,6 +101,10 @@ Page({
wx.switchTab({
url: '../home/home'
})
}else{
that.setData({
showLogin:true
})
}
}
}
@@ -112,7 +118,8 @@ Page({
hasUserInfo: true
})
if (e.detail.userInfo){
app.requestPost('submit', e.detail.userInfo,res=>{
var userInfo = app.setUserInfo(e.detail.userInfo)
app.requestPost('submit', userInfo,res=>{
console.log(res)
})
}

+ 1
- 1
pages/login/login.wxml ファイルの表示

@@ -1,5 +1,5 @@
<!--pages/login/login.wxml-->
<view class="container">
<view class="container" wx:if="{{showLogin}}">
<image class="bg" src="../../static/login/bg.jpg" mode="aspectFill"></image>
<image class="logo" src="../../static/login/logo.png"></image>
<view class="fromBox">

+ 6
- 3
pages/record/record.js ファイルの表示

@@ -9,7 +9,7 @@ Page({
userInfo: null,
canIUse: wx.canIUse('button.open-type.getUserInfo'),
hasUserInfo: false,
userNo: '000001', //员工编号
userNo: '', //员工编号
showIndex: 1,
data: [],
},
@@ -56,7 +56,9 @@ Page({
}
})
}
// console.log(app.globalData.userInfo)
this.setData({
userNo: app.globalData.storeData.account_id
})
},
/**
* 获取头像昵称
@@ -68,7 +70,8 @@ Page({
userInfo: e.detail.userInfo,
hasUserInfo: true
})
app.requestPost('submit', e.detail.userInfo, res => {
var userInfo = app.setUserInfo(e.detail.userInfo)
app.requestPost('submit', userInfo, res => {
console.log(res)
})
}

+ 3
- 0
pages/store/store.js ファイルの表示

@@ -28,6 +28,7 @@ Page({
this.setData({
key: ""
})
this.search()
},
/**
* 输入内容改变
@@ -60,10 +61,12 @@ Page({
openLocation(e){
var latitude = parseFloat(e.currentTarget.dataset.latitude);
var longitude = parseFloat(e.currentTarget.dataset.longitude);
var shopName = e.currentTarget.dataset.name;
wx.openLocation({
latitude: latitude,
longitude: longitude,
scale: 18,
name: shopName
})
},
/**

+ 1
- 1
pages/store/store.wxml ファイルの表示

@@ -23,7 +23,7 @@
</view>
</view>
<view class="name">{{item.shop_name}}</view>
<view class="infoBox" data-latitude="{{item.shop_latitude}}" data-longitude="{{item.shop_longtitude}}" bindtap="openLocation">
<view class="infoBox" data-name="{{item.shop_name}}" data-latitude="{{item.shop_latitude}}" data-longitude="{{item.shop_longtitude}}" bindtap="openLocation">
<image class="icon" src="../../static/store/location.png"></image>
<text>{{item.shop_addr}}</text>
</view>

+ 1
- 1
project.config.json ファイルの表示

@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,

バイナリ
static/coupon/Coupon1.png ファイルの表示

変更前 変更後
幅: 750  |  高さ: 300  |  サイズ: 86KB 幅: 750  |  高さ: 300  |  サイズ: 86KB

バイナリ
static/coupon/couponIcon.png ファイルの表示

変更前 変更後
幅: 513  |  高さ: 200  |  サイズ: 9.9KB 幅: 513  |  高さ: 200  |  サイズ: 5.9KB

バイナリ
static/coupon/logo.png ファイルの表示

変更前 変更後
幅: 155  |  高さ: 110  |  サイズ: 4.8KB 幅: 155  |  高さ: 110  |  サイズ: 4.7KB

バイナリ
static/coupon/txt.png ファイルの表示

変更前 変更後
幅: 34  |  高さ: 70  |  サイズ: 1.8KB 幅: 34  |  高さ: 70  |  サイズ: 705B

バイナリ
static/home/arrow.png ファイルの表示

変更前 変更後
幅: 33  |  高さ: 12  |  サイズ: 1.0KB 幅: 33  |  高さ: 12  |  サイズ: 291B

バイナリ
static/home/logo.png ファイルの表示

変更前 変更後
幅: 314  |  高さ: 221  |  サイズ: 16KB 幅: 314  |  高さ: 221  |  サイズ: 10.0KB

バイナリ
static/login/logo.png ファイルの表示

変更前 変更後
幅: 445  |  高さ: 486  |  サイズ: 11KB 幅: 445  |  高さ: 486  |  サイズ: 11KB

バイナリ
static/store/location.png ファイルの表示

変更前 変更後
幅: 24  |  高さ: 24  |  サイズ: 1.6KB 幅: 24  |  高さ: 24  |  サイズ: 811B

バイナリ
static/store/phone.png ファイルの表示

変更前 変更後
幅: 41  |  高さ: 40  |  サイズ: 1.7KB 幅: 41  |  高さ: 40  |  サイズ: 1.2KB

バイナリ
static/tabBar/home0.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 5.4KB 幅: 81  |  高さ: 81  |  サイズ: 4.7KB

バイナリ
static/tabBar/home1.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 5.4KB 幅: 81  |  高さ: 81  |  サイズ: 4.7KB

バイナリ
static/tabBar/record0.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 3.8KB 幅: 81  |  高さ: 81  |  サイズ: 3.5KB

バイナリ
static/tabBar/record1.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 3.8KB 幅: 81  |  高さ: 81  |  サイズ: 3.5KB

バイナリ
static/tabBar/store0.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 4.3KB 幅: 81  |  高さ: 81  |  サイズ: 3.9KB

バイナリ
static/tabBar/store1.png ファイルの表示

変更前 変更後
幅: 81  |  高さ: 81  |  サイズ: 4.3KB 幅: 81  |  高さ: 81  |  サイズ: 3.9KB

読み込み中…
キャンセル
保存