| | |
| | | } |
| | | }, |
| | | "requiredPrivateInfos": [ |
| | | "getLocation", |
| | | "chooseLocation" |
| | | ], |
| | | "window": { |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText": "忘记密码", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#007CFE" |
| | | } |
| | |
| | | <!--pages/forgot/forgot.wxml--> |
| | | <text>pages/forgot/forgot.wxml</text> |
| | | <view class="imageBox"> |
| | | <image src="/images/logo.png"></image> |
| | | </view> |
| | | <view style="width:100%"> |
| | | <view class="loginBox"> |
| | | |
| | | <view style="display: flex;justify-content: space-between; margin: 0px auto;width: 100%;"> |
| | | <!-- <input class="input" placeholder="请输入手机号" bindinput="bindUserName"></input> |
| | | <image class="icon" src="/images/user.png"></image> --> |
| | | <view style="width: 70%;position: relative;"> |
| | | <input class="input" placeholder="请输入手机号" bindinput="bindUserName"></input> |
| | | <image style="width: 40rpx;height: 40rpx;position: absolute;left: 45rpx;top: 45rpx;" src="/images/psw.png"></image> |
| | | </view> |
| | | <view style="width: 25%;margin: 10px auto;background-color: #1E90FF;height: 40px;border-radius: 2px;text-align: center;line-height: 40px;color: #fff;" bindtap="choseLocation">获取验证码</view> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" placeholder="请输入收到的验证码" bindinput="bindcodeNum"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入密码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入确认密码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | </view> |
| | | <button class="reg" bindtap="login">确定</button> |
| | | |
| | | |
| | | </view> |
| | |
| | | /* pages/forgot/forgot.wxss */ |
| | | /* pages/forgot/forgot.wxss */ |
| | | .imageBox{ |
| | | width: 100%; |
| | | height: 150px; |
| | | background-color: #007CFE; |
| | | position: relative; |
| | | } |
| | | .imageBox image{ |
| | | position: absolute; |
| | | top: 50px; |
| | | left: calc(50% - 85px); |
| | | width: 171px; |
| | | height: 50px; |
| | | } |
| | | .loginBox{ |
| | | width: 100%; |
| | | margin: 0 auto; |
| | | padding: 30rpx 0 30rpx 0; |
| | | border-radius: 20rpx; |
| | | position: relative; |
| | | background-color: white; |
| | | } |
| | | .input{ |
| | | margin: 10px auto; |
| | | width: 95%; |
| | | background-color: #F5F5F5; |
| | | height: 90rpx; |
| | | border-radius: 10rpx; |
| | | padding-left: 80rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | .inpicon{ |
| | | position: relative; |
| | | } |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | position: absolute; |
| | | left: 45rpx; |
| | | top: 25rpx; |
| | | } |
| | | .reg{ |
| | | width: 60%; |
| | | height: 40px; |
| | | margin: 20px auto 10px; |
| | | background-color: #1E90FF; |
| | | color: #fff; |
| | | border-radius: 20px; |
| | | } |
| | |
| | | } |
| | | .imageBox image{ |
| | | position: absolute; |
| | | top: 75px; |
| | | top: 50px; |
| | | left: calc(50% - 85px); |
| | | width: 171px; |
| | | height: 50px; |
| | |
| | | username: '', |
| | | part: '', |
| | | show: false, |
| | | phone:'' |
| | | }, |
| | | openDialog() { |
| | | this.setData({ |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow: function () { |
| | | console.log(app); |
| | | this.setData({ |
| | | username: app.username, |
| | | part: app.part, |
| | | headUrl: app.headUrl, |
| | | show: false |
| | | }) |
| | | // console.log(app); |
| | | this.getUser() |
| | | |
| | | }, |
| | | getUser() { |
| | | wx.request({ |
| | | url: `https://puyue.yhupai.com/prod-api/system/user/profile`, |
| | | method: 'GET', |
| | | header: { |
| | | "Access-Control-Allow-Headers": 'token', |
| | | Authorization: `Bearer ${wx.getStorageSync('token')}` |
| | | }, |
| | | dataType: 'json', |
| | | success: (res, header) => { |
| | | console.log(res); |
| | | if (res.data.code != 200) { |
| | | |
| | | } else { |
| | | console.log(res.data.data); |
| | | this.setData({ |
| | | username: res.data.data.nickName, |
| | | // part: app.part, |
| | | headUrl: app.headUrl, |
| | | // show: false, |
| | | phone:res.data.data.phonenumber |
| | | }) |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | |
| | | <view class="header"> |
| | | <image class="hImg" src="{{headUrl}}" mode="" /> |
| | | <view> |
| | | <view style="font-size: 18px;">仁软科技</view> |
| | | <view>136666666</view> |
| | | <view style="font-size: 18px;">{{username}}</view> |
| | | <view>{{phone}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | }) |
| | | }, |
| | | |
| | | chooseimage() { |
| | | var _this = this; |
| | | wx.chooseImage({ |
| | | count: 1, // 默认9 |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 |
| | | success: function (res) { |
| | | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 |
| | | _this.setData({ |
| | | tempFilePaths: res.tempFilePaths |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | |
| | | <view class="text"> |
| | | 用户头像 |
| | | </view> |
| | | <view style="height: 80px;line-height:80px;display: flex;"> |
| | | <view style="height: 80px;line-height:80px;display: flex;" bindtap="chooseimage"> |
| | | <image src="/images/heard.png" mode="" /> |
| | | <text class="iconfont icon-xiangyoujiantou"></text> |
| | | </view> |
| | |
| | | <view class="text"> |
| | | 用户名 |
| | | </view> |
| | | <text class="" style="margin-right: 10px;"> {{personInfo.createBy?personInfo.createBy:'--'}}</text> |
| | | <text class="" style="margin-right: 10px;"> {{personInfo.nickName?personInfo.nickName:'--'}}</text> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="text"> |
| | |
| | | <view class="text"> |
| | | 住址 |
| | | </view> |
| | | <text class="" style="margin-right: 10px;"> {{personInfo.address?personInfo.address:'--'}}</text> |
| | | <text class="" style="margin-right: 10px;"> {{personInfo.region?personInfo.region:'--'}}</text> |
| | | |
| | | <!-- <text class="iconfont icon-xiangyoujiantou"></text> --> |
| | | </view> |
| | |
| | | }) |
| | | |
| | | // 获取地点 |
| | | wx.getLocation({ |
| | | success: (res) => { |
| | | console.log(res) |
| | | app.baidumarker = {latitude:res.latitude,longitude:res.longitude} |
| | | wx.request({ |
| | | url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + ',' + res.longitude + '&key=KCQBZ-RWX3F-KKHJ2-NTS35-M6KVV-XFFTM', |
| | | success: (res) => { |
| | | // console.log(res.data.result.formatted_addresses.recommend) |
| | | // console.log(res.data.result.address) |
| | | this.setData({ |
| | | address: res.data.result.formatted_addresses.recommend, |
| | | detailedaddress: res.data.result.address |
| | | }) |
| | | } |
| | | }) |
| | | this.setData({ |
| | | locmap: res, |
| | | markers: [{ |
| | | id: 0, |
| | | latitude: res.latitude, |
| | | longitude: res.longitude, |
| | | iconPath: '/images/ProRep/weizhi.png', |
| | | width: '50rpx', |
| | | height: '50rpx' |
| | | }] |
| | | }) |
| | | }, |
| | | fail: () => { |
| | | // console.log(111) |
| | | wx.getSetting({ |
| | | success: (res) => { |
| | | var statu = res.authSetting; |
| | | if (!statu['scope.userLocation']) { //未授权 |
| | | wx.showModal({ |
| | | title: '授权定位', |
| | | content: '需要获取您的地理位置,请先设置授权', |
| | | // cancelColor: 'skyblue', |
| | | confirmText: "去设置", |
| | | success: (res) => { |
| | | if (res.cancel) { |
| | | //点击取消,默认隐藏弹框 |
| | | } else { |
| | | //点击确定 |
| | | wx.openSetting({ |
| | | withSubscriptions: true, |
| | | success: (res) => { |
| | | // console.log(1111111) |
| | | this.onLoad() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | // wx.getLocation({ |
| | | // success: (res) => { |
| | | // console.log(res) |
| | | // app.baidumarker = {latitude:res.latitude,longitude:res.longitude} |
| | | // wx.request({ |
| | | // url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude + ',' + res.longitude + '&key=KCQBZ-RWX3F-KKHJ2-NTS35-M6KVV-XFFTM', |
| | | // success: (res) => { |
| | | // // console.log(res.data.result.formatted_addresses.recommend) |
| | | // // console.log(res.data.result.address) |
| | | // this.setData({ |
| | | // address: res.data.result.formatted_addresses.recommend, |
| | | // detailedaddress: res.data.result.address |
| | | // }) |
| | | // } |
| | | // }) |
| | | // this.setData({ |
| | | // locmap: res, |
| | | // markers: [{ |
| | | // id: 0, |
| | | // latitude: res.latitude, |
| | | // longitude: res.longitude, |
| | | // iconPath: '/images/ProRep/weizhi.png', |
| | | // width: '50rpx', |
| | | // height: '50rpx' |
| | | // }] |
| | | // }) |
| | | // }, |
| | | // fail: () => { |
| | | // // console.log(111) |
| | | // wx.getSetting({ |
| | | // success: (res) => { |
| | | // var statu = res.authSetting; |
| | | // if (!statu['scope.userLocation']) { //未授权 |
| | | // wx.showModal({ |
| | | // title: '授权定位', |
| | | // content: '需要获取您的地理位置,请先设置授权', |
| | | // // cancelColor: 'skyblue', |
| | | // confirmText: "去设置", |
| | | // success: (res) => { |
| | | // if (res.cancel) { |
| | | // //点击取消,默认隐藏弹框 |
| | | // } else { |
| | | // //点击确定 |
| | | // wx.openSetting({ |
| | | // withSubscriptions: true, |
| | | // success: (res) => { |
| | | // // console.log(1111111) |
| | | // this.onLoad() |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | }, |
| | | openBaiduMap(){ |
| | | wx.navigateTo({ |
| | |
| | | psw: '', |
| | | codeNum: '', |
| | | userName: '', |
| | | tjCode:'', |
| | | tjCode:'0', |
| | | imgSrc: '', |
| | | address:'', |
| | | detailedaddress:'', |
| | |
| | | bindcodeNum(e) { |
| | | this.setData({ |
| | | codeNum: e.detail.value |
| | | }) |
| | | }, |
| | | bindTJ(e) { |
| | | this.setData({ |
| | | tjCode: e.detail.value |
| | | }) |
| | | }, |
| | | |
| | |
| | | choseLocation() { |
| | | wx.chooseLocation({ |
| | | success: (res) => { |
| | | // console.log(res) |
| | | console.log(res) |
| | | this.setData({ |
| | | address: res.name, |
| | | detailedaddress: res.address, |
| | |
| | | // cancelColor: 'skyblue', |
| | | confirmText: "去设置", |
| | | success: (res) => { |
| | | console.log(res); |
| | | if (res.cancel) { |
| | | //点击取消,默认隐藏弹框 |
| | | } else { |
| | |
| | | wx.openSetting({ |
| | | withSubscriptions: true, |
| | | success: (res) => { |
| | | console.log(res); |
| | | this.onLoad() |
| | | } |
| | | }) |
| | |
| | | <view style="width:100%"> |
| | | <view class="loginBox"> |
| | | <view class="inpicon"> |
| | | <input class="input" placeholder="请输入手机号" bindinput="bindUserName"></input> |
| | | <image class="icon" src="/images/user.png"></image> |
| | | <input class="input" password="true" placeholder="请输入真实姓名" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入密码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | <input class="input" placeholder="请输入手机号" bindinput="bindUserName"></input> |
| | | <image class="icon" src="/images/user.png"></image> |
| | | </view> |
| | | <view style="display: flex;justify-content: space-between;margin-bottom: 10px;width: 95%;padding:0 10px 0 10px;"> |
| | | <input style="width: 60%;background-color: #F5F5F5;height: 40px;padding-left: 10px;" placeholder="验证码" bindinput="bindcodeNum"></input> |
| | | <image style="width: 30%;height: 40px;" bindtap="getImg" src="{{imgSrc}}"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入密码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入确认密码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="请输入真实姓名" bindinput="bindPSW"></input> |
| | | <input class="input" placeholder="推荐码" value="{{tjCode}}" bindinput="bindTJ"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" password="true" placeholder="推荐码" bindinput="bindPSW"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | <view style="display: flex;justify-content: space-between; margin: 10px auto;width: 100%;"> |
| | | <view style="width: 75%;position: relative;"> |
| | | <input class="input" placeholder="请选择地址" value="{{detailedaddress}}"></input> |
| | | <image style="width: 40rpx;height: 40rpx;position: absolute;left: 45rpx;top: 45rpx;" src="/images/psw.png"></image> |
| | | </view> |
| | | <view style="width: 20%;margin: 10px auto;background-color: #1E90FF;height: 40px;border-radius: 2px;text-align: center;line-height: 40px;color: #fff;" bindtap="choseLocation">选取</view> |
| | | </view> |
| | | <view class="inpicon"> |
| | | <input class="input" placeholder="请选择地址" value="{{address}}"></input> |
| | | <image class="icon" src="/images/psw.png"></image> |
| | | </view> |
| | | <view style="width: 90%;margin: 10px auto;background-color: #1E90FF;height: 40px;border-radius: 2px;text-align: center;line-height: 40px;color: #fff;" bindtap="choseLocation">选取地址</view> |
| | | |
| | | </view> |
| | | <button class="reg" bindtap="login">注册</button> |
| | |
| | | } |
| | | .imageBox image{ |
| | | position: absolute; |
| | | top: 75px; |
| | | top: 50px; |
| | | left: calc(50% - 85px); |
| | | width: 171px; |
| | | height: 50px; |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | detailedaddress:'获取地址', |
| | | showType: false, |
| | | selectType: ' 请选择', |
| | | columns: ['请选择', '漏水', '制水时间过长', '其它'], |
| | |
| | | |
| | | this.setData(data); //将值赋回去 |
| | | }, |
| | | |
| | | choseLocation() { |
| | | wx.chooseLocation({ |
| | | success: (res) => { |
| | | console.log(res) |
| | | this.setData({ |
| | | // address: res.name, |
| | | detailedaddress: res.address, |
| | | locmap: { |
| | | latitude: res.latitude, |
| | | longitude: res.longitude |
| | | }, |
| | | markers: [{ |
| | | id: 0, |
| | | latitude: res.latitude, |
| | | longitude: res.longitude, |
| | | iconPath: '/images/ProRep/weizhi.png', |
| | | width: '50rpx', |
| | | height: '50rpx' |
| | | }] |
| | | }) |
| | | }, |
| | | fail: () => { |
| | | wx.getSetting({ |
| | | success: (res) => { |
| | | var statu = res.authSetting; |
| | | if (!statu['scope.userLocation']) { //未授权 |
| | | wx.showModal({ |
| | | title: '授权定位', |
| | | content: '需要获取您的地理位置,请先设置授权', |
| | | // cancelColor: 'skyblue', |
| | | confirmText: "去设置", |
| | | success: (res) => { |
| | | console.log(res); |
| | | if (res.cancel) { |
| | | //点击取消,默认隐藏弹框 |
| | | } else { |
| | | //点击确定 |
| | | wx.openSetting({ |
| | | withSubscriptions: true, |
| | | success: (res) => { |
| | | console.log(res); |
| | | this.onLoad() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | /** |
| | |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left"> |
| | | 地址 |
| | | </view> |
| | | <view class="right" bind:tap="choseLocation"> |
| | | {{detailedaddress}} > |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left"> |
| | | 预约时间 |
| | | </view> |
| | | <view class="right" bind:tap="openShowDate"> |
| | | |
| | | <picker bindtap="clickSelectTime" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}"> |
| | | {{time}} |
| | | <view class="triangle_border_down"> </view> |
| | |
| | | success = success || function () {}; |
| | | fail = fail || function () {}; |
| | | complete = complete || function () {}; |
| | | wx.getLocation({ |
| | | type: type, |
| | | success: success, |
| | | fail: fail, |
| | | complete:complete |
| | | }); |
| | | // wx.getLocation({ |
| | | // type: type, |
| | | // success: success, |
| | | // fail: fail, |
| | | // complete:complete |
| | | // }); |
| | | } |
| | | |
| | | /** |