|
|
@@ -85,10 +85,10 @@
|
|
|
<view class="index-box-title">热门活动</view>
|
|
|
<view class="ddflex" style="margin-top: 20rpx;">
|
|
|
<view style="margin-right: 20rpx;">
|
|
|
- <image class="pic230" :src="hotActivityList[0].pic"></image>
|
|
|
- <image class="pic230" style="margin-top: 20rpx;" :src="hotActivityList[1].pic"></image>
|
|
|
+ <image class="pic230" :src="hotActivityList[0].pic" @click="getUrl2(hotActivityList[0])"></image>
|
|
|
+ <image class="pic230" style="margin-top: 20rpx;" :src="hotActivityList[1].pic" @click="getUrl2(hotActivityList[1])"></image>
|
|
|
</view>
|
|
|
- <image class="pic480" :src="hotActivityList[2].pic"></image>
|
|
|
+ <image class="pic480" :src="hotActivityList[2].pic" @click="getUrl2(hotActivityList[2])"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -475,14 +475,14 @@
|
|
|
});
|
|
|
}, 10000); // this.init();
|
|
|
|
|
|
- QQMapWX.initMap();
|
|
|
- req.getLocation(res => {
|
|
|
- const to = {
|
|
|
- latitude: res.latitude,
|
|
|
- longitude: res.longitude
|
|
|
- };
|
|
|
- QQMapWX.reverseGeocoder(to, resp => {});
|
|
|
- });
|
|
|
+ // QQMapWX.initMap();
|
|
|
+ // req.getLocation(res => {
|
|
|
+ // const to = {
|
|
|
+ // latitude: res.latitude,
|
|
|
+ // longitude: res.longitude
|
|
|
+ // };
|
|
|
+ // QQMapWX.reverseGeocoder(to, resp => {});
|
|
|
+ // });
|
|
|
|
|
|
},
|
|
|
|
|
|
@@ -503,7 +503,15 @@
|
|
|
this.getTbal()
|
|
|
this.getLpal()
|
|
|
this.getFx()
|
|
|
- this.getRecommendCard()
|
|
|
+ QQMapWX.initMap();
|
|
|
+ req.getLocation(res => {
|
|
|
+ const to = {
|
|
|
+ latitude: res.latitude,
|
|
|
+ longitude: res.longitude
|
|
|
+ };
|
|
|
+ QQMapWX.reverseGeocoder(to, resp => {});
|
|
|
+ this.getRecommendCard(to)
|
|
|
+ });
|
|
|
// console.log('this.freshen=='+this.freshen)
|
|
|
let first = req.getStorage('first');
|
|
|
if (first !== false)
|
|
|
@@ -559,8 +567,9 @@
|
|
|
}
|
|
|
},
|
|
|
// 获取推荐销售
|
|
|
- getRecommendCard() {
|
|
|
- req.getRequest('/api/visiting/card/recommendCardInfo', {}, res => {
|
|
|
+ getRecommendCard(loction) {
|
|
|
+ let params = loction
|
|
|
+ req.getRequest('/api/visiting/card/recommendCardInfo', params, res => {
|
|
|
this.recommendCard = res
|
|
|
console.log('获取推荐销售》》》》》', res);
|
|
|
setTimeout(() => {
|
|
|
@@ -686,59 +695,6 @@
|
|
|
that.logo = true;
|
|
|
},
|
|
|
|
|
|
- getUrl2(e) {
|
|
|
- // 2 普通产品详情 4社区团购产品详情 5优惠券列表 6直播列表 7社区团购列表 9分类列表 10直播间 11拼团列表 12秒杀列表 13砍价列表 14新客列表 15新客详情 16秒杀详情 17砍价详情 18 拼团详情
|
|
|
- var dt = e.currentTarget.dataset;
|
|
|
- var url = '';
|
|
|
- var id = '';
|
|
|
- var acid = '';
|
|
|
-
|
|
|
- if (dt.content != '') {
|
|
|
- let conunt = dt.content.split('_');
|
|
|
- id = conunt[1];
|
|
|
- acid = conunt[0];
|
|
|
- }
|
|
|
-
|
|
|
- if (dt.type * 1 == 2 && dt.content != '') {
|
|
|
- url = 'product/detail/detail?id=' + dt.content;
|
|
|
- } else if (dt.type * 1 == 4) {
|
|
|
- url = 'product/groupDetail/groupDetail?acid=' + acid + '&id=' + id;
|
|
|
- } else if (dt.type * 1 == 5) {
|
|
|
- url = 'product/coupon/coupon';
|
|
|
- } else if (dt.type * 1 == 6) {
|
|
|
- url = 'pages/live/live';
|
|
|
- } else if (dt.type * 1 == 7) {
|
|
|
- url = 'product/groupList/groupList' + dt.merchant;
|
|
|
- } else if (dt.type * 1 == 9 && dt.content != '') {
|
|
|
- url = 'product/list/list?id=' + dt.content;
|
|
|
- } else if (dt.type * 1 == 10) {
|
|
|
- url = 'plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=' + dt.content;
|
|
|
- // console.log(
|
|
|
- // url); // url=`plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${dt.content}`
|
|
|
- } else if (dt.type * 1 == 11) {
|
|
|
- url = 'activity/group/index/index' + dt.merchant;
|
|
|
- } else if (dt.type * 1 == 12) {
|
|
|
- url = 'activity/seckill/seckill' + dt.merchant;
|
|
|
- } else if (dt.type * 1 == 13) {
|
|
|
- url = 'activity/bargain/index/index' + dt.merchant;
|
|
|
- } else if (dt.type * 1 == 14) {
|
|
|
- url = 'activity/newbornZone/newbornZone' + dt.merchant;
|
|
|
- } else if (dt.type * 1 == 15 && dt.content != '') {
|
|
|
- url = 'activity/newbornDetails/newbornDetails?acid=' + acid + '&id=' + id;
|
|
|
- } else if (dt.type * 1 == 16 && dt.content != '') {
|
|
|
- url = 'activity/seckillDetails/seckillDetails?acid=' + acid + '&id=' + id;
|
|
|
- } else if (dt.type * 1 == 17 && dt.content != '') {
|
|
|
- url = 'activity/bargain/detail/detail?acid=' + acid + '&id=' + id;
|
|
|
- } else if (dt.type * 1 == 18 && dt.content != '') {
|
|
|
- url = 'activity/group/detail/detail?acid=' + acid + '&id=' + id;
|
|
|
- } else {
|
|
|
- url = '';
|
|
|
- }
|
|
|
-
|
|
|
- if (dt.type * 1 == 6) app.globalData.switchTab(url);
|
|
|
- else app.globalData.openPage(url);
|
|
|
- this.hideAd();
|
|
|
- },
|
|
|
|
|
|
//获取首页模板配置
|
|
|
getHomeTemplateConfig() {
|
|
|
@@ -1005,7 +961,79 @@
|
|
|
},
|
|
|
getAge(date) {
|
|
|
return utils.getAge(date)
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 热门活动
|
|
|
+ getUrl2(item) {
|
|
|
+ console.log(item)
|
|
|
+ var dt = item
|
|
|
+ var url = "";
|
|
|
+ var id = "";
|
|
|
+ var acid = "";
|
|
|
+
|
|
|
+ if (dt.content != "") {
|
|
|
+ let conunt = dt.content.split("_");
|
|
|
+ id = conunt[1];
|
|
|
+ acid = conunt[0];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dt.type * 1 == 2 && dt.content != "") {
|
|
|
+ url = "product/detail/detail?id=" + dt.content;
|
|
|
+ } else if (dt.type * 1 == 3) {
|
|
|
+ url = dt.content;
|
|
|
+ console.log('url===',url)
|
|
|
+ if(!url){
|
|
|
+ req.msg('功能待接入')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if(url=='pages/index/index'||url=='pages/matchList/index'||url=='pages/interactive/index'||url=='pages/found/found'||url=='pages/user/user'){
|
|
|
+ app.globalData.switchTab(url)
|
|
|
+ return false
|
|
|
+ }else{
|
|
|
+ if(url.indexOf('http')!=-1){
|
|
|
+ app.globalData.openPage('pages/web/web?url='+url);
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (dt.type * 1 == 4) {
|
|
|
+ url = "product/groupDetail/groupDetail?acid=" + acid + "&id=" + id;
|
|
|
+ } else if (dt.type * 1 == 5) {
|
|
|
+ url = "product/coupon/coupon";
|
|
|
+ } else if (dt.type * 1 == 6) {
|
|
|
+ url = "pages/live/live";
|
|
|
+ } else if (dt.type * 1 == 7) {
|
|
|
+ url = "product/groupList/groupList" + dt.merchant;
|
|
|
+ } else if (dt.type * 1 == 9 && dt.content != "") {
|
|
|
+ url = "product/list/list?id=" + dt.content + '&title=' + dt.title + this.web;
|
|
|
+ } else if (dt.type * 1 == 10) {
|
|
|
+ url = "plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=" + dt.content;
|
|
|
+ // console.log(
|
|
|
+ // url); // url=`plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${dt.content}`
|
|
|
+ } else if (dt.type * 1 == 11) {
|
|
|
+ url = "activity/group/index/index" + dt.merchant;
|
|
|
+ } else if (dt.type * 1 == 12) {
|
|
|
+ url = "activity/seckill/seckill" + dt.merchant;
|
|
|
+ } else if (dt.type * 1 == 13) {
|
|
|
+ url = "activity/bargain/index/index" + dt.merchant;
|
|
|
+ } else if (dt.type * 1 == 14) {
|
|
|
+ url = "activity/newbornZone/newbornZone" + dt.merchant;
|
|
|
+ } else if (dt.type * 1 == 15 && dt.content != "") {
|
|
|
+ url = "activity/newbornDetails/newbornDetails?acid=" + acid + "&id=" + id;
|
|
|
+ } else if (dt.type * 1 == 16 && dt.content != "") {
|
|
|
+ url = "activity/seckillDetails/seckillDetails?acid=" + acid + "&id=" + id;
|
|
|
+ } else if (dt.type * 1 == 17 && dt.content != "") {
|
|
|
+ url = "activity/bargain/detail/detail?acid=" + acid + "&id=" + id;
|
|
|
+ } else if (dt.type * 1 == 18 && dt.content != "") {
|
|
|
+ url = "activity/group/detail/detail?acid=" + acid + "&id=" + id;
|
|
|
+ }else if (dt.type * 1 == 19 && dt.content != "") {
|
|
|
+ url = "topic/content/content?id=" + dt.content;
|
|
|
+ } else {
|
|
|
+ url = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dt.type * 1 == 6) app.globalData.switchTab(url);
|
|
|
+ else app.globalData.openPage(url);
|
|
|
+ this.hideAd();
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
const systemInfo = uni.getSystemInfoSync();
|