Browse Source

1、添加图片

2、首页登录逻辑
master
chenxuhui 7 years ago
parent
commit
e6fe501249
42 changed files with 361 additions and 677 deletions
  1. +15
    -12
      app.json
  2. BIN
      imgs/avatarUrl.png
  3. BIN
      imgs/backGroundImage.png
  4. BIN
      imgs/cheaperApply.png
  5. BIN
      imgs/jiantou.png
  6. BIN
      imgs/main-bg.jpg
  7. BIN
      imgs/message.png
  8. BIN
      imgs/messageSelected.png
  9. BIN
      imgs/saleOutStore.png
  10. BIN
      imgs/selected.png
  11. BIN
      imgs/unChoice.png
  12. BIN
      imgs/zhuye.png
  13. BIN
      imgs/zhuye1.png
  14. +100
    -0
      pages/homePage/homePage.js
  15. +3
    -0
      pages/homePage/homePage.json
  16. +27
    -0
      pages/homePage/homePage.wxml
  17. +50
    -0
      pages/homePage/homePage.wxss
  18. +0
    -164
      pages/index/index.js
  19. +0
    -11
      pages/index/index.wxml
  20. +0
    -54
      pages/index/index.wxss
  21. +19
    -3
      pages/login/login.js
  22. +1
    -1
      pages/login/login.wxml
  23. +0
    -94
      pages/main/main.js
  24. +0
    -3
      pages/main/main.json
  25. +0
    -19
      pages/main/main.wxml
  26. +0
    -33
      pages/main/main.wxss
  27. +66
    -0
      pages/message/message.js
  28. +0
    -0
      pages/message/message.json
  29. +2
    -0
      pages/message/message.wxml
  30. +1
    -0
      pages/message/message.wxss
  31. +3
    -0
      pages/my/my.js
  32. +15
    -0
      pages/my/my.wxml
  33. +53
    -1
      pages/my/my.wxss
  34. +0
    -135
      pages/navigation/navigation.js
  35. +0
    -1
      pages/navigation/navigation.json
  36. +0
    -2
      pages/navigation/navigation.wxml
  37. +0
    -1
      pages/navigation/navigation.wxss
  38. +6
    -6
      pages/saleForecastList/saleForecastList.js
  39. +0
    -97
      pages/selectCustomer/selctCustomer.js
  40. +0
    -3
      pages/selectCustomer/selctCustomer.json
  41. +0
    -11
      pages/selectCustomer/selctCustomer.wxml
  42. +0
    -26
      pages/selectCustomer/selctCustomer.wxss

+ 15
- 12
app.json View File

@ -1,10 +1,8 @@
{ {
"pages": [ "pages": [
"pages/login/login", "pages/login/login",
"pages/navigation/navigation",
"pages/selectCustomer/selctCustomer",
"pages/index/index",
"pages/main/main",
"pages/homePage/homePage",
"pages/message/message",
"pages/my/my", "pages/my/my",
"pages/saleForecastList/saleForecastList", "pages/saleForecastList/saleForecastList",
"pages/saleForecastList/Detail/Detail", "pages/saleForecastList/Detail/Detail",
@ -19,25 +17,30 @@
"pages/guarantee/newbill/newbill", "pages/guarantee/newbill/newbill",
"pages/guarantee/selectbill/selectbill", "pages/guarantee/selectbill/selectbill",
"pages/guarantee/detailshow/detailshow" "pages/guarantee/detailshow/detailshow"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#2589f8",
"navigationBarTitleText": "业务易",
"navigationBarTextStyle": "#FFFFFF",
"disableScroll": true
"navigationBarTitleText": "畜业务员易",
"navigationBarBackgroundColor": "#2689f8",
"navigationBarTextStyle": "#FFFFFF"
}, },
"tabBar": { "tabBar": {
"selectedColor": "#00C7B3",
"color": "#CFCFCF",
"borderStyle": "white",
"selectedColor": "#2689f8",
"color": "#999999",
"list": [ "list": [
{ {
"pagePath": "pages/main/main",
"pagePath": "pages/homePage/homePage",
"text": "主页", "text": "主页",
"iconPath": "/imgs/main1.png", "iconPath": "/imgs/main1.png",
"selectedIconPath": "/imgs/main.png" "selectedIconPath": "/imgs/main.png"
}, },
{
"pagePath": "pages/message/message",
"text": "消息",
"iconPath": "/imgs/message.png",
"selectedIconPath": "/imgs/messageSelected.png"
},
{ {
"pagePath": "pages/my/my", "pagePath": "pages/my/my",
"text": "我的", "text": "我的",


BIN
imgs/avatarUrl.png View File

Before After
Width: 140  |  Height: 140  |  Size: 8.7 KiB

BIN
imgs/backGroundImage.png View File

Before After
Width: 1242  |  Height: 434  |  Size: 358 KiB

BIN
imgs/cheaperApply.png View File

Before After
Width: 140  |  Height: 140  |  Size: 12 KiB

BIN
imgs/jiantou.png View File

Before After
Width: 50  |  Height: 50  |  Size: 1.6 KiB

BIN
imgs/main-bg.jpg View File

Before After
Width: 1242  |  Height: 434  |  Size: 41 KiB

BIN
imgs/message.png View File

Before After
Width: 81  |  Height: 81  |  Size: 2.8 KiB

BIN
imgs/messageSelected.png View File

Before After
Width: 81  |  Height: 81  |  Size: 2.4 KiB

BIN
imgs/saleOutStore.png View File

Before After
Width: 140  |  Height: 140  |  Size: 10 KiB

BIN
imgs/selected.png View File

Before After
Width: 70  |  Height: 70  |  Size: 2.3 KiB

BIN
imgs/unChoice.png View File

Before After
Width: 70  |  Height: 70  |  Size: 2.5 KiB

BIN
imgs/zhuye.png View File

Before After
Width: 86  |  Height: 86  |  Size: 2.0 KiB

BIN
imgs/zhuye1.png View File

Before After
Width: 86  |  Height: 86  |  Size: 2.4 KiB

+ 100
- 0
pages/homePage/homePage.js View File

@ -0,0 +1,100 @@
// pages/homePage/homePage.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 点击页面按钮进行跳转
*/
transBtnClicked: function (event) {
var btnID = event.currentTarget.dataset.itemid;
var transferURL = '';
switch (btnID) {
// 销售预报
case "1":
transferURL = '/pages/saleForecastList/saleForecastList';
break;
// 销售订单
case "2":
transferURL = '/pages/order/order';
break;
// 特价申请
case "3":
transferURL = '/pages/orderList/orderList';
break;
// 销售出库
case "4":
transferURL = '/pages/myCars/myCars';
break;
// 担保单
case "5":
transferURL = '/pages/guarantee/guarantee';
break;
}
wx.navigateTo({
url: transferURL,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

+ 3
- 0
pages/homePage/homePage.json View File

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "我的业务"
}

+ 27
- 0
pages/homePage/homePage.wxml View File

@ -0,0 +1,27 @@
<!--pages/homePage/homePage.wxml-->
<view class='imageContainer'>
<image class='beijingtu' src='/imgs/backGroundImage.png'></image>
</view>
<view class="body-box">
<view class="ico" catchtap='transBtnClicked' data-itemid='1'>
<image src="/imgs/saleForecast.png"></image>
<text class='text'>销售预报</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='2'>
<image src="/imgs/order.png"></image>
<text class='text'>销售订单</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='3'>
<image src="/imgs/cheaperApply.png"></image>
<text class='text'>特价申请</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='4'>
<image src="/imgs/saleOutStore.png"></image>
<text class='text'>销售出库</text>
</view>
<view class="ico" catchtap='transBtnClicked' data-itemid='5'>
<image src="/imgs/guarantee.png"></image>
<text class='text'>担保单</text>
</view>
</view>

+ 50
- 0
pages/homePage/homePage.wxss View File

@ -0,0 +1,50 @@
/* pages/homePage/homePage.wxss */
page{
background:#EAF1F8;
}
.imageContainer{
width: 100%;
height: 280rpx;
background-color: #2E8CF5;
}
.beijingtu{
width: 100%;
height: 100%;
}
.body-box{
width: 100%;
display: flex;
flex-wrap: wrap;
background: white;
background: #FEFFFF;
overflow: hidden;
margin-top: 1rpx;
}
.ico{
height: 190rpx;
width:25%;
text-align: center;
display: flex;
flex-direction: column;
padding-top: 15rpx;
}
.ico image{
display: block;
width: 50%;
height: 50%;
margin-left: 25%;
margin-top: 15rpx;
}
.text{
color: #353535;
margin-top: 10rpx;
font-size: 28rpx;
}

+ 0
- 164
pages/index/index.js View File

@ -1,164 +0,0 @@
//index.js
const app = getApp();
var network = require("../../utils/net.js");
var isBindedPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/IsBinded';
var isBindByPhone = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/XuBindByPhone';
var isBindWeixinPath = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/IsBindWeixinMP';
var getOpenIdByCode = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode';
var bindPath = "/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/Bind";
var getBindCustomer = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer';
function WeixinLogin() {
let method = app.globalData.LoginPath;
let params = [app.globalData.AppId, app.globalData.OpenId];
network.transfer_request(method, params, function(res) {
app.globalData.DecryptCookie = res.result;
})
}
function IsBindWeixinMP(phone) {
let method = isBindWeixinPath
let params = [phone];
network.requestLoading(method, params, function(res) {
res.result = true;
if (res.result == true) {
WeixinLogin()
wx.switchTab({
url: '/pages/main/main',
})
} else {
wx.showModal({
title: '提示',
content: '请关注公众号',
showCancel: false,
})
}
})
}
function Bind(page) {
let userInfos = app.globalData.UserInfo
let method = bindPath;
let params = [{
"AppId": app.globalData.AppId,
"OpenId": app.globalData.OpenId,
"Phone": page.data.phoneNum,
"NickName": userInfos.nickName,
"Sex": userInfos.gender,
"Province": userInfos.province,
"City": userInfos.city,
"Country": userInfos.country,
"HeadImgUrl": userInfos.avatarUrl,
"UnionId": "",
"CustomerId": app.globalData.CustomerId
}];
network.requestLoading(method, params, function (res) {
if (res.result == true) {
IsBindWeixinMP(app.globalData.PhoneNum)
}
})
}
Page({
data: {
userInfo: "", //用户信息
phoneNum: ""
},
getPhoneNum: function(e) {
let val = e.detail.value;
this.data.phoneNum = val;
},
onLoad: function(options) {
},
onShow: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
var that = this;
var shareObj = {
title: "", // 默认是小程序的名称(可以写slogan等)
path: '/pages/index/index', // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function(res) {   
if (res.errMsg == 'shareAppMessage:ok') {
}
},
fail: function() { // 转发失败之后的回调       
if (res.errMsg == 'shareAppMessage:fail cancel') { // 用户取消转发
wx.showToast({
title: '取消转发',
})
} else if (res.errMsg == 'shareAppMessage:fail') { // 转发失败,其中 detail message 为详细失败信息
wx.showToast({
title: '转发失败,重新分享',
})
}
},
complete: function() {
}
};
return shareObj;
},
getUserInfo: function(e) {
var that = this;
if (e.detail.userInfo != null) {
app.globalData.UserInfo = e.detail.userInfo
if (this.data.phoneNum == "") {
wx.showToast({
title: '请输入手机号码',
})
return false;
} else if (!(/^1[34578]\d{9}$/.test(this.data.phoneNum))) {
wx.showToast({
title: '号码不正确',
})
return false;
}
let userInfos = app.globalData.UserInfo
let method = isBindByPhone;
let params = [{
"OpenId": app.globalData.OpenId,
"Phone": this.data.phoneNum,
"NickName": userInfos.nickName,
"Sex": userInfos.gender,
"Province": userInfos.province,
"City": userInfos.city,
"Country": userInfos.country,
"HeadImgUrl": userInfos.avatarUrl,
"UnionId": ""
}];
network.transfer_request(method, params, function(res) {
app.globalData.PhoneNum = that.data.PhoneNum;
Bind(that)
})
} else {
wx.showModal({
title: '授权提示',
content: '请给予权限,不涉及个人隐私',
showCancel: false
})
}
}
})

+ 0
- 11
pages/index/index.wxml View File

@ -1,11 +0,0 @@
<!--index.wxml-->
<image class='img1' src='/imgs/tuceng.png'></image>
<view class='view2'>
<input class='input' placeholder='请输入手机号' type='number' bindinput="getPhoneNum" maxlength="11" placeholder-style='color:rgb(202, 202, 202)' ></input>
</view>
<button open-type="getUserInfo" bindgetuserinfo="getUserInfo" class='denglu'>绑定</button>
<official-account class="wxmp"></official-account>

+ 0
- 54
pages/index/index.wxss View File

@ -1,54 +0,0 @@
/**index.wxss**/
page {
background: #fff;
}
.img1 {
margin-left: 35%;
height: 150px;
width: 150px;
margin-top: 20%;
}
.view1 {
color: #fff;
font-size: 25px;
margin-top: -10%;
margin-left: 30%;
margin-bottom: 10%;
}
.view2 {
border-top: 1px solid #fafafa;
border-right: 1px solid #fafafa;
border-left: 1px solid #fafafa;
border-bottom: 1px solid #fafafa;
width: 90%;
height: 40px;
margin-left: 5%;
margin-right: 5%;
border-radius: 0.2em;
margin-top: 10%;
}
.input {
text-align: center;
height: 40px;
background: #fafafa;
}
.denglu {
margin-left: 5%;
margin-top: 10%;
width: 90%;
margin-right: 5%;
color: #fff;
background: linear-gradient(to right, #39c4fd, #539eef);
}
.wxmp {
position: fixed;
bottom: 0rpx;
width: 100%;
}

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

@ -4,6 +4,14 @@ var network = require("../../utils/net.js");
var app = getApp(); var app = getApp();
var openID; var openID;
var isBindedPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/IsBinded';
var isBindByPhone = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/XuBindByPhone';
var isBindWeixinPath = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/IsBindWeixinMP';
var getOpenIdByCode = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode';
var bindPath = "/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/Bind";
var getBindCustomer = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer';
/** /**
* 获取绑定客户ID及用户电话 参数1appID 2openID * 获取绑定客户ID及用户电话 参数1appID 2openID
* 返回值globalCustomerIDWeixinUser_Phone * 返回值globalCustomerIDWeixinUser_Phone
@ -39,7 +47,7 @@ function IsBinded(openid) {
} }
// 判断是否关注公众号 参数phone 返回值bool 成功进入首页 // 判断是否关注公众号 参数phone 返回值bool 成功进入首页
function IsBindWeixinMP(phone) { function IsBindWeixinMP(phone) {
let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/IsBindWeixinMP';
let method = isBindWeixinPath;
let params = [phone]; let params = [phone];
network.requestLoading(method, params, function (res) { network.requestLoading(method, params, function (res) {
// res.result = false; // res.result = false;
@ -109,9 +117,10 @@ Page({
// 页面生命周期函数 // 页面生命周期函数
onShow: function () { onShow: function () {
var that = this;
/*
//由登录页面进入详情页变更值为0;分享直接进入为1 //由登录页面进入详情页变更值为0;分享直接进入为1
app.globalData.shareInState = 0; app.globalData.shareInState = 0;
var that = this;
wx.login({ wx.login({
success: function (res) { success: function (res) {
let code = res.code; let code = res.code;
@ -123,6 +132,7 @@ Page({
}) })
} }
}); });
*/
let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList'; let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList';
let params = []; let params = [];
network.requestLoading(method, params, function (res) { network.requestLoading(method, params, function (res) {
@ -144,6 +154,10 @@ Page({
// 获取授权 成功 绑定信息到客户服务器 回调函数绑定中转服务器 // 获取授权 成功 绑定信息到客户服务器 回调函数绑定中转服务器
getUserInfo: function (e) { getUserInfo: function (e) {
wx.switchTab({
url: '/pages/homePage/homePage',
})
/*
var that = this; var that = this;
if (e.detail.userInfo != null) { if (e.detail.userInfo != null) {
app.globalData.userInfo = e.detail.userInfo app.globalData.userInfo = e.detail.userInfo
@ -190,7 +204,9 @@ Page({
showCancel: false showCancel: false
}) })
} }
}
*/
},
}) })

+ 1
- 1
pages/login/login.wxml View File

@ -21,7 +21,7 @@
</view> </view>
<view class='imageView' catchtap='saveCarsChange'>
<view class='imageView' catchtap='getUserInfo'>
<image class='currentImage' src="/imgs/blueBtn.png"> <image class='currentImage' src="/imgs/blueBtn.png">
<view class='btnTextView'> <view class='btnTextView'>
<text class='btnText'>确认绑定</text> <text class='btnText'>确认绑定</text>


+ 0
- 94
pages/main/main.js View File

@ -1,94 +0,0 @@
// pages/main/main.js
// pages/indexL/indexL.js
var network = require("../../utils/net.js")
var app = getApp()
function WeixinLogin() {
let method = app.globalData.LoginPath;
let params = [app.globalData.AppId, app.globalData.OpenId];
network.transfer_request(method, params, function(res) {
app.globalData.Cookie = res.result;
})
}
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
saleForecast: function(e) {
wx.navigateTo({
url: '/pages/saleForecastList/saleForecastList',
})
},
order: function(e) {
wx.navigateTo({
url: '/pages/order/order',
})
},
guarantee: function(e) {
wx.navigateTo({
url: '/pages/guarantee/guarantee',
})
}
})

+ 0
- 3
pages/main/main.json View File

@ -1,3 +0,0 @@
{
"navigationBarTitleText": "首页"
}

+ 0
- 19
pages/main/main.wxml View File

@ -1,19 +0,0 @@
<!--pages/main/main.wxml-->
<image class='index_img' src='/imgs/main-bg.jpg' mode='widthFix'></image>
<view class="body-box">
<view class="ico" catchtap='saleForecast'>
<image src="/imgs/saleForecast.png"></image>
<text class='text'>销售预报</text>
</view>
<view class="ico" catchtap='order'>
<image src="/imgs/order.png"></image>
<text class='text'>销售订单</text>
</view>
<view class="ico" catchtap='guarantee'>
<image src="/imgs/guarantee.png"></image>
<text class='text'>业务担保</text>
</view>
</view>

+ 0
- 33
pages/main/main.wxss View File

@ -1,33 +0,0 @@
/* pages/main/main.wxss */
page{
background: rgb(240, 239, 245)
}
.index_img{
width: 100%;
}
.body-box {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
background: white;
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.ico {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
font-size: 12px;
box-sizing: border-box;
padding-bottom: 10px;
padding-top: 10px;
}
.ico image {
width: 90rpx;
height: 90rpx;
margin-bottom: 10rpx;
}

+ 66
- 0
pages/message/message.js View File

@ -0,0 +1,66 @@
// pages/message/message.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

pages/index/index.json → pages/message/message.json View File


+ 2
- 0
pages/message/message.wxml View File

@ -0,0 +1,2 @@
<!--pages/message/message.wxml-->
<text>pages/message/message.wxml</text>

+ 1
- 0
pages/message/message.wxss View File

@ -0,0 +1 @@
/* pages/message/message.wxss */

+ 3
- 0
pages/my/my.js View File

@ -5,6 +5,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
meName: "",
mePhone: 0,
avatarUrl: "../../imgs/avatarUrl.png"
}, },


+ 15
- 0
pages/my/my.wxml View File

@ -1 +1,16 @@
<!--pages/my/my.wxml--> <!--pages/my/my.wxml-->
<view class='view_me_main'>
<image class="userinfo-avatar" src="{{avatarUrl}}" mode="cover"></image>
<view class='view_me_infos'>
<text class='view_me_text'>{{meName}}李丽丽</text>
<text class='view_me_text'>{{mePhone}}1234567890</text>
</view>
</view>
<view class='unregirst'>设置
<image class='unregirstImage' src='/imgs/jiantou.png'>
</image>
</view>

+ 53
- 1
pages/my/my.wxss View File

@ -1 +1,53 @@
/* pages/my/my.wxss */
/* pages/my/my.wxss */
page {
background:#EAF1F8;
}
.view_me_main {
display: flex;
flex-direction: row;
background: #2689f8;
padding-top: 40rpx;
padding-left: 5%;
padding-bottom: 40rpx;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
border-radius: 50%;
}
.view_me_infos {
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 30rpx;
}
.view_me_text {
font-size: 32rpx;
color: white;
margin-top: 10rpx;
}
.unregirst {
font-size: 32rpx;
text-align: left;
background: white;
padding-left: 20rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
margin-top: 20rpx;
color: #353535;
}
.unregirstImage{
height: 30rpx;
width: 30rpx;
padding-top: 10rpx;
padding-bottom: 15rpx;
position: absolute;
right: 20rpx;
}

+ 0
- 135
pages/navigation/navigation.js View File

@ -1,135 +0,0 @@
// pages/navigation/navigation.js
var network = require("../../utils/net.js")
var app = getApp()
var getBindCustomer = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetBindCustomer';
var getMiniOpenId = '/MainSystem/B3WeChatMiniProgram/Rpcs/CommonRpc/GetMiniOpenIdByCode';
var isBindedPath = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/IsBinded';
function GetBindCustomer(that) {
let method = getBindCustomer;
let params = [app.globalData.AppId, app.globalData.OpenId];
network.requestLoading(method, params, function(res) {
if (res.result != null) {
app.globalData.CustomerId = res.result.ID;
app.globalData.PhoneNum = res.result.WeixinUser_Phone;
IsBinded();
}
}, function(res) {
wx.redirectTo({
url: '/pages/selectCustomer/selctCustomer',
})
})
}
function WeixinLogin() {
let method = app.globalData.LoginPath;
let params = [app.globalData.AppId, app.globalData.OpenId];
network.transfer_request(method, params, function(res) {
app.globalData.DecryptCookie = res.result;
})
}
function IsBinded() {
let method = isBindedPath
let params = [app.globalData.OpenId];
network.transfer_request(method, params, function(res) {
if (res.result != "") {
app.globalData.PhoneNum = res.result;
WeixinLogin();
wx.switchTab({
url: '/pages/main/main',
})
} else {
wx.redirectTo({
url: '/pages/index/index',
})
}
})
}
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
wx.login({
success: function(res) {
let code = res.code;
let method = getMiniOpenId;
let params = [app.globalData.AppId, code];
network.requestLoading(method, params, function(res) {
app.globalData.OpenId = res.result;
GetBindCustomer(that)
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})

+ 0
- 1
pages/navigation/navigation.json View File

@ -1 +0,0 @@
{}

+ 0
- 2
pages/navigation/navigation.wxml View File

@ -1,2 +0,0 @@
<!--pages/navigation/navigation.wxml-->

+ 0
- 1
pages/navigation/navigation.wxss View File

@ -1 +0,0 @@
/* pages/navigation/navigation.wxss */

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

@ -155,8 +155,8 @@ Page({
onShow: function (options) { onShow: function (options) {
this.setData({ this.setData({
checkedDataArr: [],
unCheckDataArr: [],
checkedDataArr: [1,2,3],
unCheckDataArr: [1,2,3],
Customer_ID: app.globalData.SelectCustomer_ID, Customer_ID: app.globalData.SelectCustomer_ID,
}) })
var that = this; var that = this;
@ -168,10 +168,10 @@ Page({
}); });
} }
}); });
UnCheckPageIndex = 0;
CheckedPageIndex = 0;
getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize);
getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
// UnCheckPageIndex = 0;
// CheckedPageIndex = 0;
// getUnCheckOrderList(that, UnCheckPageIndex, UnCheckPageSize);
// getCheckedOrderList(that, CheckedPageIndex, CheckedPageSize);
}, },
/** /**


+ 0
- 97
pages/selectCustomer/selctCustomer.js View File

@ -1,97 +0,0 @@
var network = require("../../utils/net.js")
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
var that = this;
let method = '/MainSystem/B3WeChatMiniProgram/Rpcs/CustomerRpc/GetList';
let params = [];
network.requestLoading(method, params, function(res) {
that.setData({
array: res.result,
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
itemclick: function(e) {
let ID = e.currentTarget.dataset.data.ID;
let Name = e.currentTarget.dataset.data.Name;
wx.showModal({
title: '提示',
content: '是否确定选择' + Name,
success: function(res) {
if (res.cancel) {
} else {
app.globalData.CustomerId = ID;
wx.redirectTo({
url: '/pages/index/index',
})
}
},
})
}
})

+ 0
- 3
pages/selectCustomer/selctCustomer.json View File

@ -1,3 +0,0 @@
{
"navigationBarTitleText": "选择企业"
}

+ 0
- 11
pages/selectCustomer/selctCustomer.wxml View File

@ -1,11 +0,0 @@
<!--pages/selectCustomer/selctCustomer.wxml-->
<view class="custmer_list">
<view class="custmer_list_view_main" wx:for="{{array}}" wx:key="item">
<view class='custmer_list_view' catchtap='itemclick' data-Data='{{item}}'>
<text class='text_name'>{{item.Name}}</text>
</view>
<view class='view_line_main'>
<view class='view_line'></view>
</view>
</view>
</view>

+ 0
- 26
pages/selectCustomer/selctCustomer.wxss View File

@ -1,26 +0,0 @@
page {
background: rgb(240, 239, 245);
}
.custmer_list_view{
display: flex;
flex-direction: column;
padding-left: 5%;
padding-top: 16rpx;
padding-bottom: 16rpx;
background: white;
}
.text_name{
font-size: 40rpx;
color: rgb(48, 48, 48);
}
.view_line_main{
background: white
}
.view_line{
width: 100%;
height: 2rpx;
background: rgb(219, 219, 219);
}

Loading…
Cancel
Save