Просмотр исходного кода

[活动报名,优惠券][修改]:[样式的修改]

tags/C.7.1.0
meo 6 лет назад
Родитель
Сommit
e8d81c53d6
3 измененных файлов: 49 добавлений и 3 удалений
  1. +1
    -1
      pages/coupon/detail/index.wxss
  2. +47
    -1
      pages/radetail/joinActivity/edit.js
  3. +1
    -1
      pages/radetail/joinActivity/edit.wxml

+ 1
- 1
pages/coupon/detail/index.wxss Просмотреть файл

@@ -231,7 +231,7 @@ button::after {
display: flex; display: flex;
padding: 20rpx 0; padding: 20rpx 0;
background: #fff; background: #fff;
z-index: 10000;
z-index: 10;
} }


.posi_logo view:nth-child(1) { .posi_logo view:nth-child(1) {


+ 47
- 1
pages/radetail/joinActivity/edit.js Просмотреть файл

@@ -12,6 +12,7 @@ Page({
answerflag: "", answerflag: "",
flagsex: 0, flagsex: 0,
useImg:0, useImg:0,
disabled:false,
showReceiptUrl:false, showReceiptUrl:false,
receiptUrl:"", receiptUrl:"",
items: [{ items: [{
@@ -77,6 +78,9 @@ Page({
}, },
formSubmit: function(e) { formSubmit: function(e) {
let that = this; let that = this;
that.setData({
disabled:true
})
/** /**
* sex * sex
* 0 保密 * 0 保密
@@ -160,11 +164,17 @@ Page({
data: data data: data
}) })
.then(res => { .then(res => {
that.setData({
disabled: false
})
wx.reLaunch({ wx.reLaunch({
url: `/pages/radetail/success/index?activityId=${that.data.activityId}`, url: `/pages/radetail/success/index?activityId=${that.data.activityId}`,
}) })
}) })
.catch(err => { .catch(err => {
that.setData({
disabled: false
})
wx.showToast({ wx.showToast({
title: err.message, title: err.message,
icon: 'none', icon: 'none',
@@ -186,6 +196,7 @@ Page({
*/ */
onLoad: function(options) { onLoad: function(options) {
let that = this; let that = this;
that.getLocation();
if (options && options.activityId) { if (options && options.activityId) {
that.setData({ that.setData({
activityId: options.activityId activityId: options.activityId
@@ -270,5 +281,40 @@ Page({
mask: false mask: false
}) })
}) })
}
},
/**
* 获得经纬度
*/
getLocation() {
let that = this;
wx.getLocation({
type: "wgs84",
success: function (res) {
console.log(res)
if (res && res.longitude && res.latitude) {
Http.post({
url: config.api.updateLBS,
data: {
latitude: res.latitude,
longitude: res.longitude
}
}).then(res => {
console.log(res)
})
}
},
fail: error => {
console.log(error);
wx.showModal({
title: '提醒',
content: '您拒绝了地理位置的授权,将无法参加报名活动,请删除小程序重新登录',
showCancel:false,
success:function(res){
if (res.confirm){
}
}
})
}
})
},
}) })

+ 1
- 1
pages/radetail/joinActivity/edit.wxml Просмотреть файл

@@ -40,5 +40,5 @@
<text>+</text> <text>+</text>
</view> </view>
</view> </view>
<button class='btn' formType="submit" hover-class='active'>提交</button>
<button class='btn' formType="submit" disabled='{{disabled}}' hover-class='active'>提交</button>
</form> </form>

Загрузка…
Отмена
Сохранить