| | |
| | | // const apiHost = 'https://okyueche.com:443/user' |
| | | // const apiHost = 'http://120.220.4.138:9591/user' |
| | | const apiHost = 'https://xn95128.cn/user' |
| | | // const apiHost = 'http://192.168.110.64:7777/user' |
| | | // const apiHost = 'http://192.168.110.85:7777/user' |
| | | // const apiHost = 'http://221.182.45.100:7777/user' |
| | | |
| | | |
| | |
| | | initSocket() { |
| | | let that = this; |
| | | that.globalData.localSocket = wx.connectSocket({ |
| | | // url: "ws://192.168.110.34:9978", |
| | | // url: "ws://192.168.110.85:9978", |
| | | // url: "ws://221.182.45.100:9978", |
| | | |
| | | // url: "ws://221.182.45.100:900", |
| | |
| | | cityName:wx.getStorageSync('cityName')||'', |
| | | userLatitude:wx.getStorageSync('latitude')||'', |
| | | userLongitude:wx.getStorageSync('longitude')||'', |
| | | // Url:'http://192.168.110.64:7777/user', |
| | | // Url:'http://192.168.110.85:7777/user', |
| | | // Url:'http://221.182.45.100:7777/user', |
| | | // Url:'http://39.108.148.228:80/user', |
| | | // Url:'https://okyueche.com:443/user', |
| | |
| | | ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key |
| | | }) |
| | | |
| | | console.log('shuju', bmap); |
| | | console.log('shuju//////////', e); |
| | | |
| | | bmap.geocoding({ |
| | | address: self, |
| | |
| | | location: `${res.result.location.lat},${res.result.location.lng}`, //获取到的位置信息 |
| | | success: (resp) => { |
| | | var data = resp.originalData.result |
| | | console.log('wdawda',resp); |
| | | |
| | | var latitude = data.location.lat; |
| | | var longitude = data.location.lng; //根据地址解析在地图上标记解析地址位置 |
| | | wx.setStorageSync('latitude', latitude) |
| | | wx.setStorageSync('longitude', longitude) |
| | | wx.setStorageSync('cityName', data.addressComponent.city) |
| | | wx.setStorageSync('adcode', parseInt(data.addressComponent.adcode/100) * 100) |
| | | prevPage.setData({ |
| | | cityName: data.addressComponent.city, |
| | | latitude: latitude, |
| | |
| | | <!-- <van-index-anchor index="{{item.key}}" >{{item.key}}</van-index-anchor> --> |
| | | <view index="{{item.key}}" class="{{modeSelectId == 2 ? 'font40' : ''}}" style="padding:var(--index-anchor-padding,0 16px);">{{item.key}}</view> |
| | | <view wx:for="{{item.list}}" wx:for-item="it"> |
| | | <van-cell title="{{it.keyName}}" bindtap="selectCity" data-self="{{it.keyName}}" title-class="{{modeSelectId == 2 ? 'font40' : ''}}" /> |
| | | <van-cell title="{{it.keyName}}" bindtap="selectCity" data-item="{{it}}" data-self="{{it.keyName}}" title-class="{{modeSelectId == 2 ? 'font40' : ''}}" /> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | couponList:[], |
| | | state:1, |
| | | pageNum:1 |
| | | couponList: [], |
| | | state: 1, |
| | | pageNum: 1, |
| | | showModel: false, |
| | | itemInfo: {}, |
| | | }, |
| | | |
| | | onClose() { |
| | | this.setData({ |
| | | showModel: false |
| | | }) |
| | | }, |
| | | |
| | | showModeCity(e) { |
| | | if (e.currentTarget.dataset.item.city) { |
| | | this.setData({ |
| | | itemInfo: e.currentTarget.dataset.item, |
| | | showModel: true |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | onLoad: function (options) { |
| | | this.setContainerHeight() |
| | | }, |
| | | onChange(e){ |
| | | onChange(e) { |
| | | console.log(e) |
| | | this.setData({ |
| | | state:e.detail.index+1, |
| | | couponList:[], |
| | | pageNum:1 |
| | | state: e.detail.index + 1, |
| | | couponList: [], |
| | | pageNum: 1 |
| | | }) |
| | | this.getCoupon() |
| | | }, |
| | | otherPage(){ |
| | | otherPage() { |
| | | console.log("1") |
| | | }, |
| | | //获取优惠券 |
| | | getCoupon(){ |
| | | unit.post(app.globalData.Url+'/api/coupon/queryMyCoupons',{ |
| | | pageNum :this.data.pageNum, |
| | | size :8, |
| | | state :this.data.state |
| | | }) |
| | | .then((res)=>{ |
| | | console.log(res) |
| | | if(res.data.code==200&&res.data.data.length>0){ |
| | | this.data.pageNum = this.data.pageNum + 1; |
| | | //获取当前数据 |
| | | let Data = this.data.couponList; |
| | | //合并数据 |
| | | Data = Data.concat(res.data.data); |
| | | this.setData({ |
| | | couponList : Data |
| | | getCoupon() { |
| | | unit.post(app.globalData.Url + '/api/coupon/queryMyCoupons', { |
| | | pageNum: this.data.pageNum, |
| | | size: 8, |
| | | state: this.data.state |
| | | }) |
| | | .then((res) => { |
| | | res.data.data.map(item=>{ |
| | | item.city = JSON.parse(item.city).join(',') |
| | | }) |
| | | } |
| | | if(this.data.pageNum == 1&&res.data.data.length==0){ |
| | | this.setData({ |
| | | couponList:[] |
| | | }) |
| | | } |
| | | //停止刷新 |
| | | wx.stopPullDownRefresh(); |
| | | |
| | | }) |
| | | console.log(res) |
| | | if (res.data.code == 200 && res.data.data.length > 0) { |
| | | this.data.pageNum = this.data.pageNum + 1; |
| | | //获取当前数据 |
| | | let Data = this.data.couponList; |
| | | //合并数据 |
| | | Data = Data.concat(res.data.data); |
| | | this.setData({ |
| | | couponList: Data |
| | | }) |
| | | } |
| | | if (this.data.pageNum == 1 && res.data.data.length == 0) { |
| | | this.setData({ |
| | | couponList: [] |
| | | }) |
| | | } |
| | | //停止刷新 |
| | | wx.stopPullDownRefresh(); |
| | | |
| | | }) |
| | | }, |
| | | //导航栏高度 |
| | | onMyEvent: function(e) { |
| | | onMyEvent: function (e) { |
| | | this.setData({ |
| | | sendHeight: e.detail.sendHeight |
| | | }); |
| | |
| | | let that = this; |
| | | //设置容器高度 |
| | | that.setData({ |
| | | containersHeight: |
| | | wx.getSystemInfoSync().windowHeight - this.data.sendHeight |
| | | containersHeight: wx.getSystemInfoSync().windowHeight - this.data.sendHeight |
| | | }); |
| | | }, |
| | | //删除优惠券 |
| | | deleteRow (id) { |
| | | deleteRow(id) { |
| | | |
| | | }, |
| | | deltaCoupon(e){ |
| | | console.log(e) |
| | | unit.post(app.globalData.Url+'/api/coupon/delMyCoupon',{ |
| | | id: e.currentTarget.dataset.id |
| | | }) |
| | | .then((res)=>{ |
| | | console.log(res) |
| | | if(res.data.code==200){ |
| | | this.setData({ |
| | | couponList:[], |
| | | pageNum:1 |
| | | }) |
| | | this.getCoupon() |
| | | } |
| | | }) |
| | | }, |
| | | delBtn(e){ |
| | | unit.post(app.globalData.Url+'/api/coupon/delMyCoupon',{ |
| | | id: e.currentTarget.dataset.id |
| | | }) |
| | | .then((res)=>{ |
| | | console.log(res) |
| | | if(res.data.code==200){ |
| | | this.setData({ |
| | | couponList:[], |
| | | pageNum:1 |
| | | }) |
| | | this.getCoupon() |
| | | } |
| | | }) |
| | | }, |
| | | deltaCoupon(e) { |
| | | console.log(e) |
| | | unit.post(app.globalData.Url + '/api/coupon/delMyCoupon', { |
| | | id: e.currentTarget.dataset.id |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.setData({ |
| | | couponList: [], |
| | | pageNum: 1 |
| | | }) |
| | | this.getCoupon() |
| | | } |
| | | }) |
| | | }, |
| | | delBtn(e) { |
| | | unit.post(app.globalData.Url + '/api/coupon/delMyCoupon', { |
| | | id: e.currentTarget.dataset.id |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.setData({ |
| | | couponList: [], |
| | | pageNum: 1 |
| | | }) |
| | | this.getCoupon() |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | |
| | | <!-- pages/personal/couponlist/couponlist.wxml --> |
| | | <navBar title-text="{{'我的优惠卷'}}" other-title="{{'赠送'}}" bind:myevent="onMyEvent" step="{{3}}"></navBar> |
| | | <navBar title-text="{{'我的优惠券'}}" other-title="{{'赠送'}}" bind:myevent="onMyEvent" step="{{3}}"></navBar> |
| | | <view class="containers" style="padding-top:{{sendHeight}}px;height:{{containersHeight}}px;"> |
| | | <!-- <van-popup custom-class="custom-class" show="{{ titleShow }}" position="top" overlay="{{ true }}" bind:close="onClose"> |
| | | <!-- <van-popup custom-class="custom-class" show="{{ titleShow }}" position="top" overlay="{{ true }}" bind:close="onClose"> |
| | | <view class="title-list" style="margin-top:{{sendHeight}}px;"> |
| | | <view wx:for="{{titleList}}" wx:key="index" bindtap="selectCouponType" data-index="{{index}}" class="{{currentTab==index?'title-list-selected':''}}"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | </van-popup> --> |
| | | <van-tabs bind:change="onChange" line-width="0" sticky> |
| | | <van-tab title="可使用"> |
| | | <view wx:for="{{couponList}}" wx:key="index" style="margin-top:20rpx;"> |
| | | <van-swipe-cell bind:click="onClick" right-width="{{70}}"> |
| | | <view class="coupon-item" id="coupon-item" wx:if="{{item.state==1}}" bindtouchmove="couponItemtouchmove"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="{{item.userType==0?'/img/bg_coupom_blue.png':item.userType==2?'../../img/bg_coupom_orange.png':item.userType==1?'../../img/bg_coupom_green.png':item.userType==3?'../../img/bg_coupom_red.png':''}}"></image> |
| | | <view wx:if="{{item.type==2}}" class="fullmoney">满{{item.fullMoney}}元可用</view> |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.money:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车使用':item.userType==2?'仅限出租车使用':item.userType==3?'仅限城际使用':''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view catchtap="deltaCoupon" data-id="{{item.id}}" data-index="{{index}}" slot="right" class="delete-btn"> |
| | | 删除 |
| | | </view> |
| | | </van-swipe-cell> |
| | | </view> |
| | | </van-tab> |
| | | <van-tab title="已失效"> |
| | | <view wx:for="{{couponList}}" wx:key="index" style="margin-top:20rpx;"> |
| | | <van-swipe-cell bind:click="onClick" right-width="{{70}}"> |
| | | <view class="coupon-item" id="coupon-item" bindtouchmove="couponItemtouchmove"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="../../img/guoqi.png"></image> |
| | | <van-tabs bind:change="onChange" line-width="0" sticky> |
| | | <van-tab title="可使用"> |
| | | <view wx:for="{{couponList}}" wx:key="index" style="margin-top:20rpx;"> |
| | | <van-swipe-cell bind:click="onClick" right-width="{{70}}"> |
| | | <view class="coupon-item" id="coupon-item" wx:if="{{item.state==1}}" bindtouchmove="couponItemtouchmove"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="{{item.userType==0?'/img/bg_coupom_blue.png':item.userType==2?'../../img/bg_coupom_orange.png':item.userType==1?'../../img/bg_coupom_green.png':item.userType==3?'../../img/bg_coupom_red.png':''}}"></image> |
| | | <view wx:if="{{item.type==2}}" class="fullmoney">满{{item.fullMoney}}元可用</view> |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.money:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车使用':item.userType==2?'仅限出租车使用':item.userType==3?'仅限城际使用':''}} |
| | | </view> |
| | | <view data-item="{{item}}" bindtap="showModeCity" style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | 适用城市:{{item.city}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view catchtap="deltaCoupon" data-id="{{item.id}}" data-index="{{index}}" slot="right" class="delete-btn"> |
| | | 删除 |
| | | </view> |
| | | </van-swipe-cell> |
| | | </view> |
| | | </van-tab> |
| | | <van-tab title="已失效"> |
| | | <view wx:for="{{couponList}}" wx:key="index" style="margin-top:20rpx;"> |
| | | <van-swipe-cell bind:click="onClick" right-width="{{70}}"> |
| | | <view class="coupon-item" id="coupon-item" bindtouchmove="couponItemtouchmove"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="../../img/guoqi.png"></image> |
| | | |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.fullMoney:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车':item.userType==2?'仅限出租车':item.userType==3?'仅限城际':''}} |
| | | </view> |
| | | <image src="../../img/used@3x.png" class="used-img" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <view bindtap="delBtn" data-id="{{item.id}}" data-index="{{index}}" slot="right" class="delete-btn"> |
| | | 删除 |
| | | </view> |
| | | </van-swipe-cell> |
| | | </view> |
| | | </van-tab> |
| | | </van-tabs> |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.fullMoney:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车':item.userType==2?'仅限出租车':item.userType==3?'仅限城际':''}} |
| | | </view> |
| | | <view data-item="{{item}}" bindtap="showModeCity" style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);text-overflow: ellipsis;white-space: nowrap;overflow: hidden;"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | 适用城市:{{item.city}} |
| | | </view> |
| | | <image src="../../img/used@3x.png" class="used-img" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <view bindtap="delBtn" data-id="{{item.id}}" data-index="{{index}}" slot="right" class="delete-btn"> |
| | | 删除 |
| | | </view> |
| | | </van-swipe-cell> |
| | | </view> |
| | | </van-tab> |
| | | </van-tabs> |
| | | |
| | | <van-popup position="center" overlay="{{ true }}" show="{{showModel}}" bind:close="onClose"> |
| | | <view class="van_top"> |
| | | <view class="van_title" style="font-weight: 600;">适用城市</view> |
| | | <!-- <image src="../../img/icon_close.png" catchtap="onClose"></image> --> |
| | | </view> |
| | | <view class="van-content" style="display: flex;justify-content: center; align-items: center;margin-top: 30rpx;"> |
| | | {{itemInfo.city || ''}} |
| | | </view> |
| | | |
| | | <button catchtap="onClose" class="sure-btn">关闭</button> |
| | | </van-popup> |
| | | </view> |
| | |
| | | |
| | | .van-tab--active { |
| | | color: #4D8BFF !important; |
| | | } |
| | | |
| | | |
| | | .van_title { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 31rpx; |
| | | color: rgba(0, 0, 0, .8); |
| | | text-align: center; |
| | | margin-top: 34.62rpx; |
| | | } |
| | | |
| | | .check-icon-item { |
| | | width: 34.62rpx; |
| | | height: 34.62rpx; |
| | | margin-right: 19.23rpx; |
| | | } |
| | | |
| | | .van-item { |
| | | margin-left: 26.92rpx; |
| | | margin-right: 26.92rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 90.38rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | border-bottom: 1rpx solid rgba(151, 151, 151, .15); |
| | | } |
| | | |
| | | .sure-btn { |
| | | width: 200rpx !important; |
| | | height: 77rpx; |
| | | background: #4D8BFF; |
| | | border-radius: 8rpx; |
| | | margin-top: 65.38rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 29rpx; |
| | | color: #FFFFFF; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .van-content{ |
| | | width: 80vw; |
| | | } |
| | |
| | | }) |
| | | bmap.suggestion({ |
| | | query: inputValue, |
| | | region: this.data.adcode, |
| | | region:wx.getStorageSync('cityName'), |
| | | coordtype: 'bd09ll', |
| | | citylimit: true, |
| | | success: (res) => { |
| | |
| | | // 协议痰喘显示隐藏 |
| | | agreementShow: wx.getStorageSync('token') ? false : !wx.getStorageSync('isAgreement') && true, |
| | | showModel: false, |
| | | jumpUrl: '', |
| | | priceObj:{}, |
| | | }, |
| | | |
| | | |
| | |
| | | this.setData({ |
| | | showModel: false |
| | | }) |
| | | }, |
| | | |
| | | bindTap(e) { |
| | | console.log('shuju', e); |
| | | }, |
| | | |
| | | |
| | |
| | | }, |
| | | |
| | | |
| | | //邀请有礼跳转 |
| | | shareGift(){ |
| | | //邀请有礼跳转 |
| | | shareGift() { |
| | | wx.navigateTo({ |
| | | url: '/pages/invite/invite', |
| | | }) |
| | |
| | | showSwiperTop: false |
| | | }) |
| | | }, |
| | | |
| | | |
| | | //获取广告 |
| | | getadver(adcode) { |
| | | if (wx.getStorageSync('adcode') !== "") { |
| | |
| | | // app.getFloatStr(5) |
| | | // this.show() |
| | | |
| | | console.log('shuju1111111111',options); |
| | | console.log('shuju1111111111', options); |
| | | |
| | | if(options.scene){ |
| | | console.log(1111111111,); |
| | | if (options.scene) { |
| | | console.log(1111111111, ); |
| | | const uidMatch = options.scene.match(/uid%3D(\d+)/); |
| | | const userTypeMatch = options.scene.match(/userType%3D(\d+)/); |
| | | // 提取匹配到的值 |
| | |
| | | getNotice() { |
| | | unit.post(app.globalData.Url + '/base/notice/allert').then(res => { |
| | | if (res.data.data[0]?.id) { |
| | | // let regex = /<a[^>]*\shref="([^"]+)"[^>]*>([^<]+)<\/a>/gi; |
| | | // let url = regex.exec(res.data.data[0].content)[1] |
| | | // console.log('shuju45645648488464',url); |
| | | this.setData({ |
| | | noticeInfo: res.data.data[0], |
| | | showNotice: true |
| | | showNotice: true, |
| | | // jumpUrl: url |
| | | }) |
| | | unit.post(app.globalData.Url + '/api/confitm', { |
| | | id: res.data.data.id |
| | | unit.post(app.globalData.Url + '/api/systemNotice/delSystemNotice', { |
| | | id: res.data.data[0].id |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //跳转广告配置的h5 |
| | | |
| | | goWebView() { |
| | | // if(this.data.jumpUrl){ |
| | | // let idStr = this.data.jumpUrl.split('?')[1].split('=')[1] |
| | | // // let urlStr = `/pages/home/webh5/webh5?act=1&url=${this.data.jumpUrl}&${idStr}` |
| | | // console.log('//////////',idStr); |
| | | // wx.navigateTo({ |
| | | // url: `/pages/home/webh5/webh5?act=1&id=${idStr}&url=` + this.data.jumpUrl, |
| | | // }) |
| | | // } |
| | | wx.navigateTo({ |
| | | url: '/pages/setting/userHelp/userHelp?type=5', |
| | | }) |
| | | }, |
| | | getSetting() { |
| | |
| | | // longitude: res.originalData.result.location.lng, |
| | | adcode: res.originalData.result.addressComponent.adcode, |
| | | cityNameStart: res.originalData.result.formatted_address, |
| | | changeStartName:res.originalData.result.formatted_address, |
| | | changeStartName: res.originalData.result.formatted_address, |
| | | district: res.originalData.result.addressComponent.district, |
| | | province: res.originalData.result.addressComponent.province, |
| | | formatted_address: res.originalData.result.formatted_address |
| | |
| | | success: (res) => { |
| | | btnCarData.startLon = res.data.result[0].x |
| | | btnCarData.startLat = res.data.result[0].y |
| | | btnCarData.endLon = res.data.result[1]?.x |
| | | btnCarData.endLat = res.data.result[1]?.y |
| | | // btnCarData.endLon = res.data.result[1]?.x |
| | | // btnCarData.endLat = res.data.result[1]?.y |
| | | if (Object.keys(btnCarData).length == 17) { |
| | | btnCarData.oldPeople = Number(!mode) |
| | | if (Number(!mode)) { |
| | |
| | | success: (res) => { |
| | | btnCarData.startLon = res.data.result[0].x |
| | | btnCarData.startLat = res.data.result[0].y |
| | | btnCarData.endLon = res.data.result[1]?.x |
| | | btnCarData.endLat = res.data.result[1]?.y |
| | | // btnCarData.endLon = res.data.result[1]?.x |
| | | // btnCarData.endLat = res.data.result[1]?.y |
| | | if (Object.keys(btnCarData).length == 17) { |
| | | btnCarData.oldPeople = Number(!mode) |
| | | if (Number(!mode)) { |
| | |
| | | success: (resp) => { |
| | | console.log('获取当前地理位置 获取当前地理位置', resp, 'longitude', longitude, 'latitude', latitude, 'move move move', move) |
| | | bmap.regeocoding({ |
| | | location:move?(latitude+ ',' +longitude):(resp.data.result[0].y + ',' + resp.data.result[0].x), |
| | | location: move ? (latitude + ',' + longitude) : (resp.data.result[0].y + ',' + resp.data.result[0].x), |
| | | // location:latitude+ ',' +longitude, |
| | | // location: '30.657469'+','+'104.06669', |
| | | success: (res)=> { |
| | | success: (res) => { |
| | | //这里的res参数里有具体的城市数据 |
| | | console.log('这里的res参数里有具体的城市数据', res) |
| | | var name = res.originalData.result.addressComponent |
| | | that.setData({ |
| | | changeStartName: res.originalData.result.formatted_address, |
| | | startLat: move?'':resp.data.result[0].y, |
| | | startLon: move?'':resp.data.result[0].x, |
| | | startLat: move ? '' : resp.data.result[0].y, |
| | | startLon: move ? '' : resp.data.result[0].x, |
| | | cityNameStart: res.originalData.result.formatted_address, |
| | | adcode: res.originalData.result.addressComponent.adcode, |
| | | latitude:move?latitude:resp.data.result[0].y, |
| | | longitude:move?longitude:resp.data.result[0].x |
| | | latitude: move ? latitude : resp.data.result[0].y, |
| | | longitude: move ? longitude : resp.data.result[0].x |
| | | // latitude:'30.657469', |
| | | // longitude:"104.06669" |
| | | }) |
| | |
| | | |
| | | //选择目的地后开始对地图绘制信息 |
| | | pointAddress() { |
| | | // qqmapsdk = new QQMapWX({ |
| | | // key: 'SVIBZ-4RN6J-LPRF2-XZOZF-EAZKF-USFTD' //这里自己的key秘钥进行填充 |
| | | // }); |
| | | var that = this; |
| | | // 标注起点终点 |
| | | if (that.data.nextBoolean) { |
| | |
| | | }, |
| | | |
| | | ] |
| | | |
| | | |
| | | |
| | | |
| | | let startLat = that.data.startLat || that.data.latitude |
| | | let startLon = that.data.startLon || that.data.longitude |
| | | wx.request({ |
| | |
| | | nextLongitude: that.data.nextLongitude, |
| | | }) |
| | | .then((res) => { |
| | | |
| | | unit.post(app.globalData.Url + '/api/taxi/getAllForecastPrice', { |
| | | payManner: that.data.changeModel == '线上计费' ? 1 : 2, |
| | | startLat:resp.data.result[0].y, |
| | | startLon:resp.data.result[0].x, |
| | | endLat: that.data.nextLatitude, |
| | | endLon: that.data.nextLongitude |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | res.data.data.online = res.data.data.online.toFixed(2) |
| | | res.data.data.offline = res.data.data.offline.toFixed(2) |
| | | |
| | | this.setData({ |
| | | priceObj:res.data.data |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | var coors = res.data.data |
| | | var polyline = []; |
| | | coors.forEach(function (step, index) { |
| | |
| | | longitude: lng |
| | | }); |
| | | |
| | | if (coors.length == index + 1 && list.length==ind+1) { |
| | | if (coors.length == index + 1 && list.length == ind + 1) { |
| | | unit.post(app.globalData.Url + '/base/taxi/queryExpectedTime', { |
| | | // slat:that.data.latitude, |
| | | // slon:that.data.longitude, |
| | |
| | | // let markers1 = that.data.markers[0] |
| | | // let markers2 = |
| | | // that.data.markers[1]+ that.data.markers[1][callout] |
| | | |
| | | |
| | | // this.setData({ |
| | | // markers:[markers1,markers2] |
| | | // }) |
| | | console.log(list, '2222222222222222222222'); |
| | | |
| | | |
| | | var markers = [{ |
| | | iconPath: "../../img/start_icon.png", |
| | | id: 1, |
| | |
| | | } |
| | | }) |
| | | // } |
| | | |
| | | |
| | | }); |
| | | that.setData({ |
| | | polyline: [{ |
| | |
| | | </view> |
| | | </view> |
| | | <!--滑动选择框--> |
| | | <!-- <scroll-view scroll-x="true" style=" white-space: nowrap;height:40px"> |
| | | <view class="bus_style {{busId==item.id?'active_style':''}}" wx:key='index' catchtap="changCarID" wx:for="{{busStyle}}" data-id="{{item.id}}">{{item.name}}</view> |
| | | </scroll-view> --> |
| | | <view style="display: flex;width: 100%;" wx:if="{{!chartered}}"> |
| | | <view style="flex: 1;overflow: auto;"> |
| | | <scroll-view scroll-x="true" style="white-space: nowrap; height:24px;margin-bottom: 20rpx;background-color: #fff;padding-bottom: 20rpx;"> |
| | | <view class="bus_styles {{busId==item.id?'active_style':''}}" wx:key='index' catchtap="changCarID" wx:for="{{busStyle}}" data-id="{{item.id}}">{{item.name}}</view> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="more-serve" bindtap="showgengduos" wx:if="{{visibleMoreServe}}"> |
| | | <image src="https://cy-kuanzhai.oss-cn-shenzhen.aliyuncs.com/applet/static/img/gengduo.png"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 普通与老人模式切换 --> |
| | | <view style="display: flex;justify-content: center; align-items: center;"> |
| | |
| | | <view class="car_style" wx:if="{{busId==2}}"> |
| | | <view class="car_name">出租车</view> |
| | | <image src="../../img/taxi.png" class="taxi_img"></image> |
| | | <view class="car_driveText">打表计费</view> |
| | | <view class="car_driveText">预估{{changeModel=='线上计费'?priceObj.online:priceObj.offline}}元</view> |
| | | <!-- <view class="sosPeople" catchtap="setSosPeople">紧急联系人<image src="../../img/icon_nav_open.png" class="jiantou"></image> |
| | | </view> --> |
| | | </view> |
| | |
| | | </view> |
| | | <view wx:if="{{showNotice}}" class="overlay"> |
| | | <view class="notice"> |
| | | <image src="{{noticeInfo.imgUrl}}" mode="aspectFill"></image> |
| | | <view class="subTitle"> |
| | | <rich-text nodes="{{ noticeInfo.content }}"></rich-text> |
| | | <view bindtap="goWebView"> |
| | | <image src="{{noticeInfo.imgUrl}}" mode="aspectFill"></image> |
| | | <view class="subTitle"> |
| | | <rich-text nodes="{{ noticeInfo.content }}"></rich-text> |
| | | </view> |
| | | </view> |
| | | <image bindtap="closeNotice" class="close" src="/img/icon_close1.png"></image> |
| | | </view> |
| | |
| | | <view class="van-item" bindtap="changeTab1"> |
| | | <image src="../../img/xuanzhong@2x.png" wx:if="{{changeModel=='线上计费'}}" class="check-icon-item" /> |
| | | <image src="../../img/icon_raidobutton.png" wx:if="{{changeModel=='打表计费'}}" class="check-icon-item" /> |
| | | <text style="font-weight: 600;"> 线上计费</text> (平台计费在线付款给平台) |
| | | <view style="width: 100%;"> |
| | | <view style="font-weight: 600; display: flex; justify-content: space-between;width: 100%;"> <view>线上计费</view> <view>预估{{priceObj.online}}元</view></view> |
| | | <view>平台计费在线付款给平台</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="van-item" bindtap="changeTab2"> |
| | | <image src="../../img/icon_raidobutton.png" wx:if="{{changeModel=='线上计费'}}" class="check-icon-item" /> |
| | | <image src="../../img/xuanzhong@2x.png" wx:if="{{changeModel=='打表计费'}}" class="check-icon-item" /> |
| | | <text style="font-weight: 600;">打表计费</text> (司机打表计费) |
| | | <view style="width: 100%;"> |
| | | <view style="font-weight: 600; display: flex; justify-content: space-between;width: 100%;"> <view>打表计费</view> <view>预估{{priceObj.offline}}元</view></view> |
| | | <view>司机打表计费</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <button disabled="{{btnDisabled}}" catchtap="changePayModel" class="sure-btn">确认</button> |
| | | </van-popup> |
| | | </van-popup> |
| | |
| | | } |
| | | |
| | | .active_style { |
| | | color: #4D8BFF; |
| | | color: #4D8BFF !important; |
| | | } |
| | | |
| | | .can_use_car { |
| | |
| | | padding: 23rpx 35rpx 27rpx 31rpx; |
| | | max-height: 200rpx; |
| | | overflow-x: hidden; |
| | | margin-top: -10rpx; |
| | | } |
| | | |
| | | .notice .close { |
| | |
| | | margin-right: 19.23rpx; |
| | | } |
| | | |
| | | .bus_styles { |
| | | display: inline-block; |
| | | font-size: 30rpx; |
| | | font-family: PingFangSC-Medium, PingFang SC; |
| | | font-weight: 500; |
| | | color: rgba(140, 144, 151, 1); |
| | | line-height: 60rpx; |
| | | padding: 0 35rpx; |
| | | } |
| | | |
| | | .van-item { |
| | | margin-left: 26.92rpx; |
| | | margin-right: 26.92rpx; |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad: function (options) { |
| | | this.setData({ |
| | | userId:wx.getStorageSync('userId'), |
| | | if (options.act == 1) { |
| | | let url = options.url + '?id=' + options.id |
| | | this.setData({ |
| | | url: url, |
| | | userId: wx.getStorageSync('userId'), |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | userId: wx.getStorageSync('userId'), |
| | | // url:'http://120.220.4.138:9591/user/share/shareIndex.html?uid='+wx.getStorageSync('userId')+'&type='+1, |
| | | url:'https://xn95128.cn/user/share/shareIndex.html?uid='+wx.getStorageSync('userId')+'&type='+1, |
| | | url: 'https://xn95128.cn/user/share/shareIndex.html?uid=' + wx.getStorageSync('userId') + '&type=' + 1, |
| | | // url1:'http://39.108.148.228:8080/orderShare/index.html?orderId=1622' |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | }, |
| | | //登录验证手机号正确性 |
| | | goLogin: function () { |
| | | let uid = wx.getStorageSync('uid')?wx.getStorageSync('uid'):'' |
| | | let userType = wx.getStorageSync('userType')?wx.getStorageSync('userType'):'' |
| | | let uid = wx.getStorageSync('uid') ? wx.getStorageSync('uid') : '' |
| | | let userType = wx.getStorageSync('userType') ? wx.getStorageSync('userType') : '' |
| | | if (this.data.codeId == 1) { |
| | | if (app.testPhone(this.data.getPhoneNumber) && this.data.checked == true && wx.getStorageSync('longitude') !== '' && wx.getStorageSync('latitude') !== '' && this.data.getCodeNum !== "") { |
| | | if (this.data.getCodeNum !== '') { |
| | | unit.post(app.globalData.Url + '/base/user/captchaLogin', { |
| | | code: this.data.getCodeNum, |
| | | phone: this.data.getPhoneNumber, |
| | | registAreaCode: wx.getStorageSync('adcode')|| '370500', |
| | | registAreaCode: wx.getStorageSync('adcode') || '370500', |
| | | loginType: "Applets", |
| | | uid:uid, |
| | | userType:userType, |
| | | uid: uid, |
| | | userType: userType, |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | wx.setStorageSync('havePhone', true) |
| | | wx.setStorageSync('phone',this.data.getPhoneNumber) |
| | | wx.setStorageSync('phone', this.data.getPhoneNumber) |
| | | wx.setStorageSync('token', res.data.data.token) |
| | | wx.setStorageSync('userId', res.data.data.id) |
| | | this.setData({ |
| | |
| | | app.showToastSuccess('请确认阅读协议', null, 'none', 1500) |
| | | return |
| | | } |
| | | console.log(e) |
| | | let uid = wx.getStorageSync('uid')?wx.getStorageSync('uid'):'' |
| | | let userType = wx.getStorageSync('userType')?wx.getStorageSync('userType'):'' |
| | | console.log('///////////wwwwwwwwwwwww', e) |
| | | let uid = wx.getStorageSync('uid') ? wx.getStorageSync('uid') : '' |
| | | let userType = wx.getStorageSync('userType') ? wx.getStorageSync('userType') : '' |
| | | wx.login({ |
| | | success: (res) => { |
| | | console.log(res) |
| | | if (res.code) { |
| | | wx.getUserInfo({ |
| | | complete: (res1) => { |
| | | console.log('sadasdadwee12',this.data.getPhoneNumber,this.data.getCode); |
| | | unit.post(app.globalData.Url + '/base/user/wxLogin', { |
| | | jscode: res.code, |
| | | registAreaCode: wx.getStorageSync('adcode') || '370500', |
| | | type: 2, |
| | | loginType: "Applets", |
| | | uid:uid, |
| | | userType:userType, |
| | | uid: uid, |
| | | userType: userType, |
| | | phone: this.data.getPhoneNumber && this.data.getCodeNum ? this.data.getPhoneNumber : '' |
| | | }) |
| | | .then((res) => { |
| | | |
| | | if (res.data.code == 200) { |
| | | wx.setStorageSync('token', res.data.data.token) |
| | | wx.setStorageSync('userId', res.data.data.id) |
| | |
| | | </view> |
| | | </view> |
| | | <!--登录按钮--> |
| | | <view class="login_button" catchtap="goLogin">登录</view> |
| | | <view class="login_button" bindtap="goLogin">登录</view> |
| | | <!--密码登录时忘记密码--> |
| | | <view class="forget_password" hidden="{{codeId==1}}" catchtap="forgetPassword">忘记密码?</view> |
| | | <view class="other_login">其他方式登录</view> |
| | | <view class="wx_box"> |
| | | <!-- <view class="other_login">其他方式登录</view> --> |
| | | <!-- <view class="wx_box"> |
| | | <image src="../../img/login_wx.png" class="wx_login"></image> |
| | | <button class="button_wx_login" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"></button> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="Pop" wx:if="{{showPop}}"> |
| | | <view class="pop_view"> |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | userInfo:wx.getStorageSync('userInfo'), |
| | | detail:{}, |
| | | userInfo: wx.getStorageSync('userInfo'), |
| | | detail: {}, |
| | | }, |
| | | |
| | | goRecord(){ |
| | | goRecord() { |
| | | wx.navigateTo({ |
| | | url: '/pages/inviteRecord/inviteRecord', |
| | | }) |
| | | }, |
| | | |
| | | downLoadCode(){ |
| | | downLoadCode() { |
| | | wx.downloadFile({ |
| | | url: this.data.detail.code, |
| | | success(res) { |
| | | if(res.statusCode ==200){ |
| | | let tempFilePath = res.tempFilePath; |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: tempFilePath, |
| | | success (res) { |
| | | console.log('保存成功', res); |
| | | }, |
| | | fail (err) { |
| | | if (err.errMsg === "saveImageToPhotosAlbum:fail cancel") { |
| | | console.log('用户取消保存'); |
| | | } else { |
| | | console.log('保存失败', err); |
| | | } |
| | | } |
| | | }); |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '下载失败', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | success(res) { |
| | | if (res.statusCode == 200) { |
| | | let tempFilePath = res.tempFilePath; |
| | | wx.saveImageToPhotosAlbum({ |
| | | filePath: tempFilePath, |
| | | success(res) { |
| | | console.log('保存成功', res); |
| | | }, |
| | | fail(err) { |
| | | if (err.errMsg === "saveImageToPhotosAlbum:fail cancel") { |
| | | console.log('用户取消保存'); |
| | | } else { |
| | | console.log('保存失败', err); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | wx.showToast({ |
| | | title: '下载失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | onLoad(options) { |
| | | unit.post(app.globalData.Url + "/api/user/getCode") |
| | | .then((res) => { |
| | | console.log('shuju',res); |
| | | if(res.data.code==200){ |
| | | this.setData({ |
| | | detail:res.data.data |
| | | }) |
| | | } |
| | | }) |
| | | .then((res) => { |
| | | console.log('shuju', res); |
| | | if (res.data.code == 200) { |
| | | this.setData({ |
| | | detail: res.data.data |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | |
| | | { |
| | | "usingComponents": {}, |
| | | "navigationBarTitleText":"邀请好友" |
| | | "navigationBarTitleText":"邀请好友", |
| | | "requiredPrivateInfos": ["getSetting", "saveImageToPhotosAlbum"] |
| | | } |
| | |
| | | <!--pages/invite/invite.wxml--> |
| | | <view class="invite-page"> |
| | | <view class="invite-page" id="invite-page"> |
| | | <view class="top-img"> |
| | | <image src="../../img/tip.png" class="invite-icon" mode="aspectFit" /> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view class="btns-box"> |
| | | <view class="btns" bindtap="downLoadCode">下载邀请码</view> |
| | | <!-- bindtap="downLoadCode" --> |
| | | <view class="btns" bindtap="savePageToAlbum" >截图分享</view> |
| | | </view> |
| | | |
| | | <view class="invite-record"> |
| | |
| | | </view> |
| | | <view class="okTrip_car_style"> |
| | | {{orderMessage.brand}} · {{orderMessage.carColor}} |
| | | <view class="okTrip_money" catchtap="lookMoneyInfo"> |
| | | <view class="okTrip_money" catchtap="lookMoneyInfo" wx:if="{{orderMessage.payManner==1}}"> |
| | | {{orderMoney}}元 |
| | | <image src="/img/arrows@3x.png"></image> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="okTrip_car_style"> |
| | | {{orderMessage.brand}} · {{orderMessage.carColor}} |
| | | <view class="okTrip_money" catchtap="lookMoneyInfo" wx:if="{{OrderInfo.payManner!=3}}"> |
| | | <view class="okTrip_money" catchtap="lookMoneyInfo" wx:if="{{OrderInfo.payManner==1}}"> |
| | | {{orderMoney}}元 |
| | | <image src="/img/arrows@3x.png"></image> |
| | | </view> |
| | |
| | | ak: 'fi3HGJjW153NCNsaTb9FekxeX1Lj3auo' // 必填,您的key |
| | | }) |
| | | |
| | | console.log('shuju22222222222',this.data.adcode); |
| | | |
| | | bmap.suggestion({ |
| | | query: inputValue, |
| | | region:this.data.adcode, |
| | | region:wx.getStorageSync('cityName'), |
| | | success:(res)=>{ |
| | | this.setData({ |
| | | addressList : res.result |
| | |
| | | id:"", |
| | | money:0, |
| | | orderType:"", |
| | | newMoney:"" |
| | | newMoney:"", |
| | | itemInfo:{}, |
| | | showModel:false, |
| | | }, |
| | | |
| | | showModeCity(e) { |
| | | if (e.currentTarget.dataset.item.city) { |
| | | this.setData({ |
| | | itemInfo: e.currentTarget.dataset.item, |
| | | showModel: true |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | onClose() { |
| | | this.setData({ |
| | | showModel: false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | size:20 |
| | | }) |
| | | .then((res)=>{ |
| | | console.log(res) |
| | | res.data.data.map(item=>{ |
| | | item.city = JSON.parse(item.city).join(',') |
| | | }) |
| | | if(res.data.code==200){ |
| | | let data = res.data.data |
| | | if(data.length>0){ |
| | |
| | | </view> |
| | | </view> --> |
| | | <view wx:key="index" wx:if="{{couponList.length>0}}" style="margin-top:20rpx;" class="list"> |
| | | <view class="coupon-item {{indexs==index?'active':''}}" wx:for="{{couponList}}" data-index="{{index}}" id="coupon-item" catchtap="getIt" data-money="{{item.money}}" data-id="{{item.id}}"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="{{item.userType==0?'/img/bg_coupom_blue.png':item.userType==2?'/img/bg_coupom_orange.png':item.userType==1?'/img/bg_coupom_green.png':item.userType==3?'/img/bg_coupom_red.png':''}}"></image> |
| | | <!--优惠券的框框--> |
| | | <view class="white_radio"></view> |
| | | <image wx:if="{{indexs==index}}" src="../../../img/icon_raidobutton_selected.png" class="checkOk"></image> |
| | | <view wx:if="{{item.type==2}}" class="fullmoney">满{{item.fullMoney}}元可用</view> |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.money:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车':item.userType==2?'仅限出租车':item.userType==3?'仅限城际':''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-item {{indexs==index?'active':''}}" wx:for="{{couponList}}" data-index="{{index}}" id="coupon-item" catchtap="getIt" data-money="{{item.money}}" data-id="{{item.id}}"> |
| | | <view class="coupon-img-container"> |
| | | <image class="coupon_img" src="{{item.userType==0?'/img/bg_coupom_blue.png':item.userType==2?'/img/bg_coupom_orange.png':item.userType==1?'/img/bg_coupom_green.png':item.userType==3?'/img/bg_coupom_red.png':''}}"></image> |
| | | <!--优惠券的框框--> |
| | | <view class="white_radio"></view> |
| | | <image wx:if="{{indexs==index}}" src="../../../img/icon_raidobutton_selected.png" class="checkOk"></image> |
| | | <view wx:if="{{item.type==2}}" class="fullmoney">满{{item.fullMoney}}元可用</view> |
| | | <view class="coupon-price"> |
| | | <view>¥</view> |
| | | <view style="font-size:50rpx;font-weight:500;"> |
| | | {{item.type==1?item.money:item.type==2?item.money:''}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="coupon-content" style="margin-right: {{deleteWidth}}rpx;"> |
| | | <view style="font-weight:500;display:flex;justify-content:space-between;align-items:center;"> |
| | | <view> |
| | | {{item.userType==0?'通用优惠券':item.userType==1?'专车优惠券':item.userType==2?'出租车优惠券':item.userType==3?'城际优惠券':''}} |
| | | </view> |
| | | <view style="font-size:24rpx;color:rgba(51,51,51,1);" class="complant_view"> |
| | | {{item.name}} |
| | | </view> |
| | | </view> |
| | | <view style="font-size:24rpx;color:#999999;"> |
| | | <image src="../../../img/icon_time@2x.png" class="timeImg" mode="widthFix"></image> |
| | | 有效期至 {{item.time}} |
| | | </view> |
| | | <view style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | {{item.userType==0?'专车、出租车、跨城出行都可使用':item.userType==1?'仅限专车':item.userType==2?'仅限出租车':item.userType==3?'仅限城际':''}} |
| | | </view> |
| | | <view data-item="{{item}}" bindtap="showModeCity" style="font-size:24rpx;font-weight:500; color:rgba(0,0,0,.4);"> |
| | | <image src="../../img/jg.png" class="timeImg" mode="widthFix"></image> |
| | | 适用城市:{{item.city}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <van-popup position="center" overlay="{{ true }}" show="{{showModel}}" bind:close="onClose"> |
| | | <view class="van_top"> |
| | | <view class="van_title" style="font-weight: 600;">适用城市</view> |
| | | <!-- <image src="../../img/icon_close.png" catchtap="onClose"></image> --> |
| | | </view> |
| | | <view class="van-content" style="display: flex;justify-content: center; align-items: center;margin-top: 30rpx;"> |
| | | {{itemInfo.city || ''}} |
| | | </view> |
| | | |
| | | |
| | | <button catchtap="onClose" class="sure-btn">关闭</button> |
| | | </van-popup> |
| | | <view class="noHb" wx:if="{{couponList.length==0}}">暂无可用优惠券</view> |
| | | <view class="goon" catchtap="goon" wx:if="{{couponList.length!=0}}">确定</view> |
| | |
| | | .active{ |
| | | opacity: 1!important; |
| | | |
| | | } |
| | | |
| | | |
| | | .van_title { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 31rpx; |
| | | color: rgba(0, 0, 0, .8); |
| | | text-align: center; |
| | | margin-top: 34.62rpx; |
| | | } |
| | | |
| | | .check-icon-item { |
| | | width: 34.62rpx; |
| | | height: 34.62rpx; |
| | | margin-right: 19.23rpx; |
| | | } |
| | | |
| | | .van-item { |
| | | margin-left: 26.92rpx; |
| | | margin-right: 26.92rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | height: 90.38rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 23rpx; |
| | | border-bottom: 1rpx solid rgba(151, 151, 151, .15); |
| | | } |
| | | |
| | | .sure-btn { |
| | | width: 200rpx !important; |
| | | height: 77rpx; |
| | | background: #4D8BFF; |
| | | border-radius: 8rpx; |
| | | margin-top: 65.38rpx; |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 500; |
| | | font-size: 29rpx; |
| | | color: #FFFFFF; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .van-content{ |
| | | width: 80vw; |
| | | } |
| | |
| | | //根据经纬度路线规划 |
| | | //获取行车路线 |
| | | getDriverLine(fromValue, toValue) { |
| | | console.log('shhuji', fromValue, toValue); |
| | | // console.log('shhuji', fromValue, toValue); |
| | | let that = this; |
| | | unit.post(app.globalData.Url + '/base/loadLine', { |
| | | startLat: fromValue.latitude, |
| | |
| | | waitTingApi(type) { |
| | | // console.log('---------------111') |
| | | let resData = JSON.parse(type); |
| | | console.log("订单", resData.data); |
| | | // console.log("订单", resData.data); |
| | | // console.log("订单状态", resData.method); |
| | | if (resData.method == 'ORDER_CANCEL') { |
| | | wx.navigateBack() |
| | |
| | | waitTing: false |
| | | }) |
| | | var state = resData.data.state |
| | | console.log('////+++++++1111111', state); |
| | | if (state == 1) { |
| | | this.setData({ |
| | | sendTitle: "等待应答" |
| | |
| | | }) |
| | | this.getMessage() |
| | | clearInterval(this.data.getDriveIng) |
| | | app.globalData.state == 0 |
| | | // app.globalData.state == 0 |
| | | } else if (state == 8) { |
| | | console.log('//////////////////////', '走这个位置'); |
| | | this.setData({ |
| | | showMap: false, |
| | | payEnd: true, |
| | | showPay: true, |
| | | sendTitle: "已完成" |
| | | }) |
| | | this.getMessage() |
| | | clearInterval(this.data.getDriveIng) |
| | | app.globalData.state == 0 |
| | | if (this.data.orderType == 3) { |
| | |
| | | }) |
| | | } |
| | | } else if (state == 9) { |
| | | console.log(11111111111111111111 + '//////////////////////////'); |
| | | this.setData({ |
| | | sendTitle: "已取消" |
| | | }) |
| | |
| | | }) |
| | | } else if (resData.method == 'REASSIGN') { |
| | | this.getMessage() |
| | | } else if (resData.method == 'ORDER_STATUS' && resData.data.state == 8) { |
| | | console.log('//////////////////////', '走这个位置'); |
| | | this.getMessage() |
| | | this.setData({ |
| | | showMap: false, |
| | | payEnd: true, |
| | | showPay: true, |
| | | sendTitle: "已完成" |
| | | }) |
| | | |
| | | clearInterval(this.data.getDriveIng) |
| | | app.globalData.state == 0 |
| | | if (this.data.orderType == 3) { |
| | | this.setData({ |
| | | showSuccess: true |
| | | }) |
| | | } |
| | | } |
| | | |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | getDriveIng() { |
| | | wx.request({ |
| | |
| | | showPay: true, |
| | | sendTitle: "已完成" |
| | | }) |
| | | this.getMessage() |
| | | clearInterval(this.data.getDriveIng) |
| | | app.globalData.state == 0 |
| | | } else if (res.data.data.state == 9) { |
| | |
| | | }, |
| | | method: "POST", |
| | | success: (res) => { |
| | | console.log(res) |
| | | // console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.setData({ |
| | | OrderInfo: res.data.data |
| | |
| | | orderType: this.data.orderType |
| | | }) |
| | | .then((res2) => { |
| | | console.log('////////////////////////////////////') |
| | | // console.log('////////////////////////////////////') |
| | | // var markers = [{ |
| | | // iconPath: "../../img/map_car@3x.png", |
| | | // id: 1, |
| | |
| | | <!--start--> |
| | | <view class="start" hidden="{{!payEnd}}" style="{{modeSelectId == 2 ? 'padding-top:191rpx' : ''}}"> |
| | | <view class="car_monery" wx:if="{{money>0}}">¥{{money||0}}</view> |
| | | <view class="please_pay" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view> |
| | | <view class="please_pay" wx:if="{{OrderInfo.payManner==1}}" style="text-decoration:underline;padding-bottom:15rpx" catchtap="lookMoneyInfo">查看费用明细</view> |
| | | <view class="noname {{modeSelectId == 2 ? 'font60' :''}}" wx:if="{{nmpj}}">匿名评价司机</view> |
| | | <view class="noname {{modeSelectId == 2 ? 'font60' :''}}" wx:if="{{pjxq}}">评价详情</view> |
| | | <!--遮罩层--> |
| | |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/invite/invite", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | }, |
| | | { |
| | | "name": "", |
| | | "pathName": "pages/coupon/coupon", |
| | | "query": "", |
| | | "launchMode": "default", |
| | | "scene": null |
| | | } |
| | | ] |
| | | } |
| | |
| | | }, { |
| | | key: "suggestion", |
| | | value: function (t) { |
| | | console.log('///////////////',t); |
| | | var a = this; |
| | | t = t || {}; |
| | | var e = { |
| | |
| | | Authorization: "Bearer" + " " + wx.getStorageSync('token'), |
| | | }, |
| | | success: function (res) { //服务器返回数据 |
| | | console.log(res, '========================'); |
| | | // console.log(res, '========================'); |
| | | if (res.statusCode == 200) { |
| | | resolve(res); |
| | | wx.hideLoading({}) |