Browse Source

1、全局globalData属性首字母小写

2、首页绑定按钮边框问题
3、首次用户绑定进入cookie值的问题
master
chenxuhui 7 years ago
parent
commit
c01da94a10
12 changed files with 79 additions and 58 deletions
  1. +17
    -13
      app.js
  2. BIN
      imgs/bindImage.png
  3. BIN
      imgs/longBlueBtn.png
  4. +4
    -4
      pages/guarantee/newbill/newbill.js
  5. +3
    -7
      pages/login/login.js
  6. +8
    -2
      pages/login/login.wxml
  7. +17
    -2
      pages/login/login.wxss
  8. +12
    -12
      pages/order/order.js
  9. +5
    -5
      pages/order/query/query.js
  10. +4
    -4
      pages/saleForecastList/query/query.js
  11. +5
    -5
      pages/saleForecastList/saleForecastList.js
  12. +4
    -4
      utils/net.js

+ 17
- 13
app.js View File

@ -5,22 +5,26 @@ App({
},
globalData: {
PhoneNum: "",
OpenId: "",
AppName: "WeChat",
AppId: "wx1a89a89a80318160",
Cookie: "",
DecryptCookie: '',
UserInfo: null,
BaseUrl: "https://miniprogram.food988.com/Rest.aspx",
TranferBaseUrl: 'https://miniprogram.food988.com/RequestTransfer.aspx',
phoneNum: "",
openID: "",
appName: "WeChat",
appID: "wx1a89a89a80318160",
cookie: "",
decryptCookie: '',
userInfo: null,
baseUrl: "https://miniprogram.food988.com/Rest.aspx",
tranferBaseUrl: 'https://miniprogram.food988.com/RequestTransfer.aspx',
globalCustomerID: 0,
SelectCustomer_ID: null,
SelectStartDate: null,
SelectEndDate: null,
SelectBillState: null,
selectCustomer_ID: null,
selectStartDate: null,
selectEndDate: null,
selectBillState: null,
billInfo: [],
billInfoUp: [],
shareInState:1,
accountingUnit_ID:0,
accountingUnit_Name: "请选择会计单位",
department_ID:0,
department_Name: "请选择部门",
}
})

BIN
imgs/bindImage.png View File

Before After
Width: 376  |  Height: 80  |  Size: 10 KiB

BIN
imgs/longBlueBtn.png View File

Before After
Width: 1207  |  Height: 258  |  Size: 9.1 KiB

+ 4
- 4
pages/guarantee/newbill/newbill.js View File

@ -103,12 +103,12 @@ Page({
onLoad: function(options) {
this.setData({
accountUnit: [{
ID: app.globalData.AccountingUnit_ID,
Name: app.globalData.AccountingUnit_Name
ID: app.globalData.accountingUnit_ID,
Name: app.globalData.accountingUnit_Name
}],
department: [{
ID: app.globalData.Department_ID,
Name: app.globalData.Department_Name
ID: app.globalData.department_ID,
Name: app.globalData.department_Name
}],
})
var that = this


+ 3
- 7
pages/login/login.js View File

@ -159,14 +159,10 @@ Page({
// 获取授权 成功 绑定信息到客户服务器 回调函数绑定中转服务器
getUserInfo: function (e) {
wx.switchTab({
url: '/pages/homePage/homePage',
})
/*
var that = this;
if (e.detail.userInfo != null) {
app.globalData.userInfo = e.detail.userInfo
if (that.data.array[that.data.index].ID == 0) {
if (that.data.customerArray[that.data.index].ID == 0) {
wx.showToast({
title: '请选择所属客户',
})
@ -184,7 +180,7 @@ Page({
return false;
}
let userInfos = app.globalData.userInfo
let method = '/MainSystem/B3MiniProgramRpc/Rpcs/ManagerRpc/AccountRpc/QinBindByPhone';
let method = isBindByPhone;
let params = [{
"OpenId": app.globalData.openID,
"Phone": this.data.phoneNum,
@ -199,6 +195,7 @@ Page({
network.transfer_request(method, params, function (res) {
if (res.result != null) {
app.globalData.phoneNum = that.data.phoneNum;
// 判断是否绑定成功
Bind(that)
}
})
@ -209,7 +206,6 @@ Page({
showCancel: false
})
}
*/
},


+ 8
- 2
pages/login/login.wxml View File

@ -21,12 +21,18 @@
</view>
<view class='imageView' catchtap='getUserInfo'>
<!-- <view class="but_login">
<button class='btn_btn' open-type="getUserInfo" bindgetuserinfo="getUserInfo">绑定</button>
</view> -->
<button class='btn_btn' plain="true" style='border:none' open-type="getUserInfo" bindgetuserinfo="getUserInfo"><image class='currentImage' src="/imgs/bindImage.png" mode='widthFix'></image></button>
<!-- <view class='imageView' open-type="getUserInfo" catchtap='getUserInfo'>
<image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'>
<text class='btnText'>确认绑定</text>
</view>
</image>
</view>
</view> -->
<official-account class="wxmp"></official-account>

+ 17
- 2
pages/login/login.wxss View File

@ -53,10 +53,10 @@
box-sizing: content-box;
}
.currentImage {
/* .currentImage {
width: 100%;
height: 100%;
}
} */
.btnTextView {
position: absolute;
@ -69,4 +69,19 @@
.btnText {
color: white;
font-size: 34rpx;
}
.btn_btn {
font-size: 40rpx;
color: white;
margin-top: 10%;
padding: 0, auto;
display: block;
border: none;
background: transparent;
}
.currentImage {
width: 100%;
height: 80px;
}

+ 12
- 12
pages/order/order.js View File

@ -9,10 +9,10 @@ var getListPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/OrderRpc/GetList
function getList(that, PageIndex, PageSize) {
let method = getListPath
let params = [{
"BillState": app.globalData.SelectBillState,
"StartLoadTime": app.globalData.SelectStartDate,
"EndLoadTime": app.globalData.SelectEndDate,
"Customer_ID": app.globalData.SelectCustomer_ID,
"BillState": app.globalData.selectBillState,
"StartLoadTime": app.globalData.selectStartDate,
"EndLoadTime": app.globalData.selectEndDate,
"Customer_ID": app.globalData.selectCustomer_ID,
"PageIndex": PageIndex,
"PageSize": PageSize
}];
@ -112,10 +112,10 @@ Page({
array: [],
arry: []
})
app.globalData.SelectCustomer_ID = null
app.globalData.SelectStartDate = null
app.globalData.SelectEndDate = null
app.globalData.SelectBillState = 0
app.globalData.selectCustomer_ID = null
app.globalData.selectStartDate = null
app.globalData.selectEndDate = null
app.globalData.selectBillState = 0
},
/**
@ -143,10 +143,10 @@ Page({
PageSize = 10;
let method = getListPath;
let params = [{
"BillState": app.globalData.SelectBillState,
"StartLoadTime": app.globalData.SelectStartDate,
"EndLoadTime": app.globalData.SelectEndDate,
"Customer_ID": app.globalData.SelectCustomer_ID,
"BillState": app.globalData.selectBillState,
"StartLoadTime": app.globalData.selectStartDate,
"EndLoadTime": app.globalData.selectEndDate,
"Customer_ID": app.globalData.selectCustomer_ID,
"PageIndex": PageIndex,
"PageSize": PageSize
}];


+ 5
- 5
pages/order/query/query.js View File

@ -116,14 +116,14 @@ Page({
let sDate = timechage.formatymdERTDate(this.data.Sdate);
let eDate = timechage.formatymdERTDate(this.data.Edate);
if (customerID == 0) {
app.globalData.SelectCustomer_ID = null;
app.globalData.selectCustomer_ID = null;
} else {
app.globalData.SelectCustomer_ID = customerID;
app.globalData.selectCustomer_ID = customerID;
}
app.globalData.SelectStartDate = sDate;
app.globalData.SelectEndDate = eDate;
app.globalData.selectStartDate = sDate;
app.globalData.selectEndDate = eDate;
app.globalData.SelectBillState = this.data.billState[this.data.billIndex].ID
app.globalData.selectBillState = this.data.billState[this.data.billIndex].ID
wx.navigateBack({
delta: 1


+ 4
- 4
pages/saleForecastList/query/query.js View File

@ -102,12 +102,12 @@ Page({
let sDate = timechage.formatymdERTDate(this.data.Sdate);
let eDate = timechage.formatymdERTDate(this.data.Edate);
if (customerID == 0) {
app.globalData.SelectCustomer_ID = null;
app.globalData.selectCustomer_ID = null;
} else {
app.globalData.SelectCustomer_ID = customerID;
app.globalData.selectCustomer_ID = customerID;
}
app.globalData.SaleOutStartDate = sDate;
app.globalData.SaleOutEndDate = eDate;
app.globalData.saleOutStartDate = sDate;
app.globalData.saleOutEndDate = eDate;
wx.navigateBack({
delta: 1


+ 5
- 5
pages/saleForecastList/saleForecastList.js View File

@ -157,7 +157,7 @@ Page({
this.setData({
checkedDataArr: [],
unCheckDataArr: [],
Customer_ID: app.globalData.SelectCustomer_ID,
Customer_ID: app.globalData.selectCustomer_ID,
})
var that = this;
wx.getSystemInfo({
@ -179,10 +179,10 @@ Page({
*/
onUnload: function () {
app.globalData.SelectCustomer_ID = null
app.globalData.SelectStartDate = null
app.globalData.SelectEndDate = null
app.globalData.SelectBillState = 0
app.globalData.selectCustomer_ID = null
app.globalData.selectStartDate = null
app.globalData.selectEndDate = null
app.globalData.selectBillState = 0
},
//未审核订单滑动到底部加载
unCheckedScrollLower: function (event) {


+ 4
- 4
utils/net.js View File

@ -24,7 +24,7 @@ function requestLoading(method, params, successaction) {
};
wx.request({
url: app.globalData.BaseUrl,
url: app.globalData.baseUrl,
data: data,
header: {
'content-type': 'application/json',
@ -36,7 +36,7 @@ function requestLoading(method, params, successaction) {
if (res.data.error != null) {
if (res.data.error.code == 401) {
wx.request({
url: app.globalData.BaseUrl,
url: app.globalData.baseUrl,
data: {
'id': 1,
'method': "/MainSystem/MainSystem/Auth/WeixinLogin",
@ -92,7 +92,7 @@ function transfer_request(method, params, successaction) {
"Data": params
};
var baseUrl = app.globalData.TranferBaseUrl;
var baseUrl = app.globalData.tranferBaseUrl;
wx.request({
url: baseUrl,
data: newData,
@ -106,7 +106,7 @@ function transfer_request(method, params, successaction) {
if (res.data.error != null) {
if (res.data.error.code == 401) {
wx.request({
url: app.globalData.TransferUrl,
url: app.globalData.transferUrl,
data: {
"DecryptCookie": app.globalData.cookie,
"CustomerId": app.globalData.globalCustomerID,


Loading…
Cancel
Save