作者 吴旭

2022.11.08

... ... @@ -400,6 +400,7 @@ Page({
url: '/pages/details/details?id=' + id + '&type=' + type + '&inviter_id=' + inviter
})
} else if (type == 3) {
// let inviter_id = '0'
wx.navigateTo({
url: '/pages/detail/detail?id=' + id
})
... ...
... ... @@ -35,7 +35,7 @@ page {
.container .health .top_new {
width: 100%;
height: 404rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://xiaoxiangauto.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ...
... ... @@ -35,7 +35,7 @@ page {
.container .health .top_new {
width: 100%;
height: 404rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://xiaoxiangauto.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ...
... ... @@ -35,7 +35,7 @@ page {
.container .health .top_new {
width: 100%;
height: 404rpx;
background: url('http://qiniu.dsh.brotop.cn/uploads/20201014/9e850768de598c4606ccde43e015d03f.png') no-repeat;
background: url('https://xiaoxiangauto.com/assets/static/img/v-q.png') no-repeat;
background-size: 100% 100%;
padding: 0 32rpx;
box-sizing: border-box;
... ...
... ... @@ -3,6 +3,8 @@ import {
} from "../../request/index.js";
const a = getApp()
var WxParse = require('../../wxParse/wxParse.js');
var QQMapWX = require('../../qqmap/qqmap-wx-jssdk.min.js');
var qqmapsdk;
var timerPageA; // 计时器
var intPageATime = 0
... ... @@ -46,7 +48,11 @@ Page({
autoplay: false,
interval: 2000,
duration: 500,
testlist: []
testlist: [],
numberpeople:0,
latitude: null,//纬度
longitude: null,//经度
is_exist: null,//是否有红包
},
onShow: function () {
console.log('页面再展示')
... ... @@ -59,6 +65,7 @@ Page({
personsun: num
})
that.countTime()
that.getCitied()//获取位置
},
onLoad: function (options) {
let that = this
... ... @@ -207,7 +214,7 @@ Page({
}
},
async zhanshilist(s4_id) { // 展示列表
async zhanshilist() { // 展示列表
let that = this
try {
const {
... ... @@ -215,13 +222,14 @@ Page({
} = await request({
url: 'api/active/applyActiveUserList',
data: {
id: s4_id
id: that.data.id
}
})
if (data.code == 1) {
console.log(data.data.data)
console.log(data)
that.setData({
testlist: data.data.data
testlist: data.data.data,
numberpeople: data.data.count
})
} else {
... ... @@ -255,14 +263,16 @@ Page({
that.setData({
is_start: true,
time: data.start_time_num,
timename: '距开始还有'
timename: '距开始还有',
is_exist: data.is_exist
})
} else if (Number(data.time_num) >= 0) {
that.countown()
that.setData({
is_start: false,
time: data.time_num,
timename: '距结束还有'
timename: '距结束还有',
is_exist: data.is_exist
})
} else {
that.setData({
... ... @@ -469,12 +479,16 @@ Page({
},
// 发送浏览时间
sendCountTime() {
let that = this
console.log(this.data.id,intPageATime)
request({
url: '/api/new2/userOperateTime',
data: {
type: 2,
active_id: this.data.id,
time: intPageATime
time: intPageATime,
lat: this.data.latitude,
lng: this.data.longitude,
}
})
},
... ... @@ -519,6 +533,21 @@ Page({
}, 1000)
})
},
//获取位置信息
getCitied() { // 获取城市信息
let that = this
wx.getLocation({
type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 
success: function (res) {
console.log(res.latitude,res.longitude)
that.setData({
latitude: res.latitude,
longitude: res.longitude
})
}
})
return
},
/**
* 生命周期函数--监听页面隐藏
... ... @@ -539,7 +568,6 @@ Page({
this.sendCountTime()
console.log(intPageATime)
intPageATime = 0
},
})
\ No newline at end of file
... ...
... ... @@ -97,7 +97,7 @@
<view class="share_name">已有{{can_num}}人参加</view>
</view>
</view> -->
<view class="img-Box">
<view class="img-Box" wx:if="{{is_exist == 1}}">
<button open-type="share" class="buttonShare" style="background-color: #ffffff;">
<image class="Img" src="/static/img/tu4-7.png"></image>
</button>
... ... @@ -106,7 +106,7 @@
<view class="lunbo-Box">
<view class="lunboTextONe-Box flex alignCenter">
<view class="Text1">已有</view>
<view class="Text2">16</view>
<view class="Text2">{{numberpeople}}</view>
<view class="Text1">人参加</view>
</view>
<swiper indicator-dots="{{false}}" interval="2000" autoplay vertical circular display-multiple-items="5">
... ...
... ... @@ -30,7 +30,7 @@ Page({
})
} else if (type == 2) {
wx.navigateTo({
url: '/pages/details/details?id=' + id + '&type=' + type
url: '/pages/details/details?id=' + id + '&type=' + type + '&inviter_id=' + 0
})
} else if (type == 3) {
wx.navigateTo({
... ...
... ... @@ -756,7 +756,7 @@ Page({
break;
case -2: //限时活动详情
wx.navigateTo({
url: '/pages/details/details?id=' + good_id + '&type=2'
url: '/pages/details/details?id=' + good_id + '&type=2' + '&inviter_id=' + 0
})
break;
default:
... ...
... ... @@ -28,6 +28,7 @@ Page({
qqmapsdk = new QQMapWX({
key: 'B4MBZ-3VICV-THBPQ-UCLHB-SLCEK-B7FIK'
});
console.log(qqmapsdk)
},
onShow() {
this.getPromotion()
... ...
... ... @@ -4,7 +4,7 @@
<!-- tab切换 -->
<view class="switch flex justifyaround">
<view class="switchtimeBox flex flexColumn alignCenter" bindtap="switchdianji" data-current="0">
<view class="{{activeindex == 0?'switchtext':'switchtextOne'}}">分享经验</view>
<view class="{{activeindex == 0?'switchtext':'switchtextOne'}}">分享奖励</view>
<view class="gangImg" wx:if="{{activeindex == 0}}"></view>
</view>
<view class="switchtimeBox flex flexColumn alignCenter" data-current="1" bindtap="switchdianji">
... ...
{
"setting": {
"compileHotReLoad": true,
"urlCheck": false
"urlCheck": true
},
"condition": {
"miniprogram": {
... ...
... ... @@ -2,8 +2,8 @@
export const request = (params) => {
wx.showNavigationBarLoading()
// const baseUrl = "http://chemai.t.brotop.cn/"
// const baseUrl = "https://xiaoxiangauto.com/"
const baseUrl = "http://test.xiaoxiangauto.com/"
const baseUrl = "https://xiaoxiangauto.com/"
// const baseUrl = "http://test.xiaoxiangauto.com/"
return new Promise((resolve, reject) => {
let header = {
... ...