| @ -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 () { | |||
| } | |||
| }) | |||
| @ -0,0 +1,3 @@ | |||
| { | |||
| "navigationBarTitleText": "我的业务" | |||
| } | |||
| @ -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> | |||
| @ -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; | |||
| } | |||
| @ -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 | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| @ -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> | |||
| @ -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%; | |||
| } | |||
| @ -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', | |||
| }) | |||
| } | |||
| }) | |||
| @ -1,3 +0,0 @@ | |||
| { | |||
| "navigationBarTitleText": "首页" | |||
| } | |||
| @ -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> | |||
| @ -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; | |||
| } | |||
| @ -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 () { | |||
| } | |||
| }) | |||
| @ -0,0 +1,2 @@ | |||
| <!--pages/message/message.wxml--> | |||
| <text>pages/message/message.wxml</text> | |||
| @ -0,0 +1 @@ | |||
| /* pages/message/message.wxss */ | |||
| @ -1 +1,16 @@ | |||
| <!--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> | |||
| @ -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; | |||
| } | |||
| @ -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() { | |||
| } | |||
| }) | |||
| @ -1 +0,0 @@ | |||
| {} | |||
| @ -1,2 +0,0 @@ | |||
| <!--pages/navigation/navigation.wxml--> | |||
| @ -1 +0,0 @@ | |||
| /* pages/navigation/navigation.wxss */ | |||
| @ -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', | |||
| }) | |||
| } | |||
| }, | |||
| }) | |||
| } | |||
| }) | |||
| @ -1,3 +0,0 @@ | |||
| { | |||
| "navigationBarTitleText": "选择企业" | |||
| } | |||
| @ -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> | |||
| @ -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); | |||
| } | |||