jiazhipeng 10 months ago
parent
commit
780c0f7181
  1. 4
      main.js
  2. 30
      pages/index/index.vue
  3. 4
      pages/map/map.vue
  4. 4
      pages/user/user.vue

4
main.js

@ -23,12 +23,12 @@ let qdTracker;
// #ifdef MP // #ifdef MP
// 小程序的初始化 // 小程序的初始化
QDTracker.init({ QDTracker.init({
debug: true, // 开启调试模式,默认关闭 debug: false, // 开启调试模式,默认关闭
disableCache: true, disableCache: true,
appid: 'wxcb555ab174f22ec9', //小程序appid appid: 'wxcb555ab174f22ec9', //小程序appid
// kfuin: 2852150212, // kfuin: 2852150212,
appkey: '0MA006654M5XP4YR', // 上面第二步里新增的appKey appkey: '0MA006654M5XP4YR', // 上面第二步里新增的appKey
application: '同里测试_1', // 小程序名称 application: '同里', // 小程序名称
apiHost: 'https://qidian.tongli.net', // 接口请求域名,请联系项目交付同事提供上报域名。 apiHost: 'https://qidian.tongli.net', // 接口请求域名,请联系项目交付同事提供上报域名。
apiMethod: 'post', apiMethod: 'post',
encryptMode: 'close', // 加密模式 close-关闭 default-base64 aes-aes加密 encryptMode: 'close', // 加密模式 close-关闭 default-base64 aes-aes加密

30
pages/index/index.vue

@ -6,7 +6,7 @@
<swiper class="top-banner" :circular="true" :interval="6000" :current="current" @change="swiperChange" <swiper class="top-banner" :circular="true" :interval="6000" :current="current" @change="swiperChange"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="topBanner"> :duration="800" :indicator-dots="false" :autoplay="true" v-if="topBanner">
<swiper-item v-for="(item, index) in topBanner" :key="index" @click.stop="gotoUrlNew(item)"> <swiper-item v-for="(item, index) in topBanner" :key="index" @click.stop="gotoUrlNew(item,index)">
<image class="top-banner" :src="showImg(item.head_img)" mode="aspectFill"></image> <image class="top-banner" :src="showImg(item.head_img)" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -26,19 +26,19 @@
<image src="https://static.ticket.sz-trip.com/tongli/images/index/horns.png" mode=""></image> <image src="https://static.ticket.sz-trip.com/tongli/images/index/horns.png" mode=""></image>
<view class="notice-text text-overflow">{{notice}}</view> <view class="notice-text text-overflow">{{notice}}</view>
</view> </view>
<view class="notice-more" @click="gotoPath('/subPackages/notice/noticeList')"> <view class="notice-more" @click="gotoPathMd({path: '/subPackages/notice/noticeList', text: '首页资讯'}, '1')">
更多 更多
<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image> <image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image>
</view> </view>
</view> </view>
<view class="notice-bottom flex-between" v-if="Object.keys(homeUi).length > 0"> <view class="notice-bottom flex-between" v-if="Object.keys(homeUi).length > 0">
<view :style="{backgroundImage: 'url('+showImg(homeUi['mpyd'])+')'}" @click="gotoPath('/subPackages/ticketBooking/ticketBooking')"> <view :style="{backgroundImage: 'url('+showImg(homeUi['mpyd'])+')'}" @click="gotoPathMd({path: '/subPackages/ticketBooking/ticketBooking', text: '门票预订'}, '1')">
<view class="title">门票预订</view> <view class="title">门票预订</view>
<view class="subtitle">便民快捷购票入口</view> <view class="subtitle">便民快捷购票入口</view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcons1.png" mode=""></image> <image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcons1.png" mode=""></image>
</view> </view>
<view :style="{backgroundImage: 'url('+showImg(homeUi['dtdl'])+')'}" @click="gotoMap"> <view :style="{backgroundImage: 'url('+showImg(homeUi['dtdl'])+')'}" @click="gotoMap();qdTracker('navButtonClick', {buttonName: '导览', buttonSort: '1'})">
<view class="title">地图导览</view> <view class="title">地图导览</view>
<view class="subtitle">随时随地发现新旅程</view> <view class="subtitle">随时随地发现新旅程</view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcons.png" mode=""></image> <image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcons.png" mode=""></image>
@ -48,7 +48,7 @@
<!-- 金刚区 --> <!-- 金刚区 -->
<view class="nav-box" v-if="Object.keys(homeUi).length > 0"> <view class="nav-box" v-if="Object.keys(homeUi).length > 0">
<view class="nav-item" v-for="(item,index) in navList" :key="index" @click="gotoPath(item.path)"> <view class="nav-item" v-for="(item,index) in navList" :key="index" @click="gotoPathMd(item, index)">
<image :src="showImg(homeUi[item.img])" mode="" class="nav-img"></image> <image :src="showImg(homeUi[item.img])" mode="" class="nav-img"></image>
<view>{{item.text}}</view> <view>{{item.text}}</view>
</view> </view>
@ -58,7 +58,7 @@
<view v-if="scenicList && scenicList.length > 0"> <view v-if="scenicList && scenicList.length > 0">
<view class="title-box flex-between"> <view class="title-box flex-between">
景点展览 景点展览
<view @click="gotoPath('/subPackages/leyou/index')">更多<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image></view> <view @click="gotoPath('/subPackages/leyou/index');qdTracker('homepageAttractionClick', {buttonName: '景点展览', buttonSort: '1'})">更多<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image></view>
</view> </view>
<view class="scenic-box"> <view class="scenic-box">
<view v-for="(item,index) in scenicList" :key="index" @click="gotoScenic(item)"> <view v-for="(item,index) in scenicList" :key="index" @click="gotoScenic(item)">
@ -72,7 +72,7 @@
<view v-if="eventsList && eventsList.length > 0"> <view v-if="eventsList && eventsList.length > 0">
<view class="title-box flex-between"> <view class="title-box flex-between">
精彩推荐 精彩推荐
<view @click="gotoPath('/subPackages/eventCalendar/eventCalendar')">更多<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image></view> <view @click="gotoPath('/subPackages/eventCalendar/eventCalendar');qdTracker('homepageRecommendClick', {buttonName: '精彩推荐', buttonSort: '1'})">更多<image src="https://static.ticket.sz-trip.com/tongli/images/index/rightIcon.png" mode=""></image></view>
</view> </view>
<view class="line-box"> <view class="line-box">
<view v-for="(item,index) in eventsList" :key="index" class="line-item" @click="goLineDetail(item)"> <view v-for="(item,index) in eventsList" :key="index" class="line-item" @click="goLineDetail(item)">
@ -121,11 +121,11 @@
</view> </view>
</view> </view>
<view class="strategy-more" @click="strategyMore" v-show="showMore">查看更多</view> <view class="strategy-more" @click="strategyMore();qdTracker('homepageNewsClick', {buttonName: '同里新鲜事', buttonSort: '1'})" v-show="showMore">查看更多</view>
</view> </view>
<!-- 领券中心 --> <!-- 领券中心 -->
<image src="https://static.ticket.sz-trip.com/tongli/images/index/getCoupons.png" @click="gotoPath('/subPackages/user/getCoupon')" class="couponImg"></image> <image src="https://static.ticket.sz-trip.com/tongli/images/index/getCoupons.png" @click="gotoPathMd({path: '/subPackages/user/getCoupon', text: '领券中心'}, '1')" class="couponImg"></image>
</view> </view>
</template> </template>
@ -206,7 +206,16 @@
this.getArticleByType() this.getArticleByType()
this.getLatest() this.getLatest()
}, },
//
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '首页', buttonSort: '1'})
},
methods: { methods: {
//
gotoPathMd(item,index) {
this.qdTracker('homepageMainButtonClick', {buttonName: item.text, buttonSort: index})
this.gotoPath(item.path)
},
// //
gotoMap() { gotoMap() {
// //
@ -246,7 +255,8 @@
}) })
}, },
// 234 // 234
gotoUrlNew(item) { gotoUrlNew(item, index) {
this.qdTracker('homepageBannerClick', {buttonName: '首页banner点击', buttonSort: index})
let url = ''; let url = '';
switch (item.jump_type) { switch (item.jump_type) {
case 0: case 0:

4
pages/map/map.vue

@ -18,6 +18,10 @@
onShow() { onShow() {
this.gotoMap() this.gotoMap()
}, },
//
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '导览', buttonSort: '2'})
},
methods: { methods: {
gotoMap() { gotoMap() {
// //

4
pages/user/user.vue

@ -174,6 +174,10 @@
// } // }
// }); // });
}, },
//
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '我的', buttonSort: '3'})
},
methods: { methods: {
// //
gotoProfile() { gotoProfile() {

Loading…
Cancel
Save