Browse Source

【积分不足问题修改02】

tags/C.10.02
海洋之声 5 years ago
parent
commit
17dbe3243c
2 changed files with 28 additions and 1 deletions
  1. +27
    -0
      index/index.js
  2. +1
    -1
      pages/integralmall/payIntegcoupondetail/index.wxml

+ 27
- 0
index/index.js View File

@@ -186,6 +186,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onLoad: function(options) {
this.getLocation();
let that = this;
let optionss;
if (wx.getStorageSync('options')){
@@ -207,6 +208,32 @@ Page({
//获取条形码
// util.barcode("barcode", optionss.quancode, 510, 100);
},
/**
* 获得经纬度
*/
getLocation() {
let that = this;
wx.getLocation({
type: "wgs84",
success: function (res) {
console.log(res, 9999)
if (res && res.longitude && res.latitude) {
Http.post({
url: config.api.updateLBS,
data: {
latitude: res.latitude,
longitude: res.longitude
}
}).then(res => {
console.log(res,9999)
})
}
},
fail: error => {
console.log(error);
}
})
},
onShow: function() {
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {


+ 1
- 1
pages/integralmall/payIntegcoupondetail/index.wxml View File

@@ -35,7 +35,7 @@
</view>
</view>
<view class='edit'>
<button class='user-motto user-enough' wx:if="{{remainingPoints>=0}}" bindtap='gotoPay'>{{'确认'+data.creditPrice+'积分支付'}}</button>
<button class='user-motto user-enough' wx:if="{{remainingPoints>=0}}" bindtap='{{"submitAble"?gotoPay:""}}'>{{'确认'+data.creditPrice+'积分支付'}}</button>
<button class='user-motto user-enough' style='' wx:if="{{remainingPoints<0}}" bindtap='cannotPay'>积分不足</button>
</view>
</view>

Loading…
Cancel
Save