|
@@ -18,7 +18,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="service-person" :style="'top:' + systems.ktxStatusHeight + 'rpx;'" v-if="recommendCard">
|
|
<view class="service-person" :style="'top:' + systems.ktxStatusHeight + 'rpx;'" v-if="recommendCard">
|
|
|
<view class="ddflex" @click="jumpUrl('/card/index/index?cardId='+recommendCard.id)">
|
|
<view class="ddflex" @click="jumpUrl('/card/index/index?cardId='+recommendCard.id)">
|
|
|
- <image class="service-person-header" :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
|
|
|
|
|
|
|
+ <image class="service-person-header"
|
|
|
|
|
+ :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
|
|
|
<view>
|
|
<view>
|
|
|
<view class="service-person-name ddflex">
|
|
<view class="service-person-name ddflex">
|
|
|
<view>{{recommendCard.realName}}的微页</view>
|
|
<view>{{recommendCard.realName}}的微页</view>
|
|
@@ -49,7 +50,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
- <view class="service-person-phone" v-if="recommendCard.phone" @click="callPhone(recommendCard.phone)">
|
|
|
|
|
|
|
+ <view class="service-person-phone" v-if="recommendCard.phone"
|
|
|
|
|
+ @click="callPhone(recommendCard.phone)">
|
|
|
<image src="../../static/pages/images/dh.png"></image>
|
|
<image src="../../static/pages/images/dh.png"></image>
|
|
|
<view>电话</view>
|
|
<view>电话</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -64,12 +66,15 @@
|
|
|
<view v-for="(item, index) in contact" :key="index">
|
|
<view v-for="(item, index) in contact" :key="index">
|
|
|
<!-- 弹窗广告 -->
|
|
<!-- 弹窗广告 -->
|
|
|
<view style="position: absolute;top:290rpx;left: 0;right: 0;">
|
|
<view style="position: absolute;top:290rpx;left: 0;right: 0;">
|
|
|
- <banner v-if="item == 'ad' && bannerShow" :bannerList="bannerList" :url="site" :web="url" :config="about" :couponList="couponList" :officeList="officeList" :districtTemplate="districtTemplate"></banner>
|
|
|
|
|
|
|
+ <banner v-if="item == 'ad' && bannerShow" :bannerList="bannerList" :url="site" :web="url"
|
|
|
|
|
+ :config="about" :couponList="couponList" :officeList="officeList"
|
|
|
|
|
+ :districtTemplate="districtTemplate"></banner>
|
|
|
</view>
|
|
</view>
|
|
|
- <district v-if="item == 'king_kong_district' && districtShow" :url="site" :web="url" :districtTemplate="districtTemplate"></district>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <district v-if="item == 'king_kong_district' && districtShow" :url="site" :web="url"
|
|
|
|
|
+ :districtTemplate="districtTemplate"></district>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<view class="index-box" style="margin-top: 10rpx;" v-if="hotActivityList.length>0">
|
|
<view class="index-box" style="margin-top: 10rpx;" v-if="hotActivityList.length>0">
|
|
|
<view class="index-box-title">热门活动</view>
|
|
<view class="index-box-title">热门活动</view>
|
|
|
<view class="ddflex" style="margin-top: 20rpx;">
|
|
<view class="ddflex" style="margin-top: 20rpx;">
|
|
@@ -80,13 +85,14 @@
|
|
|
<image class="pic480" :src="hotActivityList[2].pic"></image>
|
|
<image class="pic480" :src="hotActivityList[2].pic"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 参与活动 -->
|
|
<!-- 参与活动 -->
|
|
|
<view class="index-box" style="margin-top: 50rpx;" v-if="matchList.length>0">
|
|
<view class="index-box" style="margin-top: 50rpx;" v-if="matchList.length>0">
|
|
|
<view class="index-box-title">更多活动</view>
|
|
<view class="index-box-title">更多活动</view>
|
|
|
<view class="map-ac">
|
|
<view class="map-ac">
|
|
|
- <scroll-view scroll-x="true" class="map-acs" >
|
|
|
|
|
- <view class="li" v-for="(item,index) in matchList" :key="index" @click="jumpUrl('/match/activityDetail/activityDetail?id='+item.id)">
|
|
|
|
|
|
|
+ <scroll-view scroll-x="true" class="map-acs">
|
|
|
|
|
+ <view class="li" v-for="(item,index) in matchList" :key="index"
|
|
|
|
|
+ @click="jumpUrl('/match/activityDetail/activityDetail?id='+item.id)">
|
|
|
<view style="position: relative;border-radius: 20rpx;overflow: hidden;">
|
|
<view style="position: relative;border-radius: 20rpx;overflow: hidden;">
|
|
|
<image :src="item.pic ? item.pic : '/static/images/def_zw1.png'" mode="aspectFill"></image>
|
|
<image :src="item.pic ? item.pic : '/static/images/def_zw1.png'" mode="aspectFill"></image>
|
|
|
<view class="ac-type" v-if="item.categoryName">{{ item.categoryName }}</view>
|
|
<view class="ac-type" v-if="item.categoryName">{{ item.categoryName }}</view>
|
|
@@ -94,15 +100,16 @@
|
|
|
<view class="ac-title tovers">{{ item.title }}</view>
|
|
<view class="ac-title tovers">{{ item.title }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 投保案例 -->
|
|
<!-- 投保案例 -->
|
|
|
<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="tbalList.length>0">
|
|
<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="tbalList.length>0">
|
|
|
<view class="index-box-title">投保案例</view>
|
|
<view class="index-box-title">投保案例</view>
|
|
|
<view>
|
|
<view>
|
|
|
<view class="tbal-nav ddflex">
|
|
<view class="tbal-nav ddflex">
|
|
|
- <view :class="'tbal-nav-item '+(tbalIndex==index?'tbal-nav-item-active':'' )" v-for="item,index in tbalList" @click="changeTbalTab(index)">
|
|
|
|
|
|
|
+ <view :class="'tbal-nav-item '+(tbalIndex==index?'tbal-nav-item-active':'' )"
|
|
|
|
|
+ v-for="item,index in tbalList" @click="changeTbalTab(index)">
|
|
|
<view>{{item.name}}</view>
|
|
<view>{{item.name}}</view>
|
|
|
<view class="tbal-nav-label">20~30岁</view>
|
|
<view class="tbal-nav-label">20~30岁</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -119,36 +126,43 @@
|
|
|
<view class="tbal-nav-label">20~30岁</view>
|
|
<view class="tbal-nav-label">20~30岁</view>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<block v-if="tbalList[tbalIndex].contentList">
|
|
<block v-if="tbalList[tbalIndex].contentList">
|
|
|
- <view class="tbal-item ddflex" v-for="it in tbalList[tbalIndex].contentList" @click="jumpUrl('/topic/alContent/alContent?id='+it.id)">
|
|
|
|
|
|
|
+ <view class="tbal-item ddflex" v-for="it in tbalList[tbalIndex].contentList"
|
|
|
|
|
+ @click="jumpUrl('/topic/alContent/alContent?id='+it.id)">
|
|
|
<image class="tbal-pic" :src="it.pic?it.pic:'/static/images/lj_img.png'"></image>
|
|
<image class="tbal-pic" :src="it.pic?it.pic:'/static/images/lj_img.png'"></image>
|
|
|
<view class="flex">
|
|
<view class="flex">
|
|
|
<view class="tbal-title">{{it.title}}</view>
|
|
<view class="tbal-title">{{it.title}}</view>
|
|
|
<view class="ddflex">
|
|
<view class="ddflex">
|
|
|
<view class="ddflex flex">
|
|
<view class="ddflex flex">
|
|
|
- <view class="tbal-price" >{{it.fieldValues&&it.fieldValues.yearMoney?it.fieldValues.yearMoney:'0'}}</view>
|
|
|
|
|
|
|
+ <view class="tbal-price">
|
|
|
|
|
+ {{it.fieldValues&&it.fieldValues.yearMoney?it.fieldValues.yearMoney:'0'}}
|
|
|
|
|
+ </view>
|
|
|
<view class="tbal-price-text">年缴费</view>
|
|
<view class="tbal-price-text">年缴费</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tbal-line"></view>
|
|
<view class="tbal-line"></view>
|
|
|
<view class="ddflex flex">
|
|
<view class="ddflex flex">
|
|
|
- <view class="tbal-price" >{{it.fieldValues&&it.fieldValues.allMoney?it.fieldValues.allMoney:'0'}}</view>
|
|
|
|
|
|
|
+ <view class="tbal-price">
|
|
|
|
|
+ {{it.fieldValues&&it.fieldValues.allMoney?it.fieldValues.allMoney:'0'}}
|
|
|
|
|
+ </view>
|
|
|
<view class="tbal-price-text">总保额 </view>
|
|
<view class="tbal-price-text">总保额 </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tbal-btn">去看看</view>
|
|
<view class="tbal-btn">去看看</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="tbal-tag" v-if="it.fieldValues&&it.fieldValues.version">{{it.fieldValues.version}}</view>
|
|
|
|
|
|
|
+ <view class="tbal-tag" v-if="it.fieldValues&&it.fieldValues.version">{{it.fieldValues.version}}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 真实理赔故事 -->
|
|
<!-- 真实理赔故事 -->
|
|
|
<view class="index-box" v-if="lpalList.length>0">
|
|
<view class="index-box" v-if="lpalList.length>0">
|
|
|
<view class="index-box-title ddflex">
|
|
<view class="index-box-title ddflex">
|
|
|
<text class="fflex">真实理赔故事</text>
|
|
<text class="fflex">真实理赔故事</text>
|
|
|
- <view class="fx-header-more ddflex" @click="jumpUrl('/topic/contentList/contentList?code='+lpalCode+'&title=理赔案例')">
|
|
|
|
|
|
|
+ <view class="fx-header-more ddflex"
|
|
|
|
|
+ @click="jumpUrl('/topic/contentList/contentList?code='+lpalCode+'&title=理赔案例')">
|
|
|
更多
|
|
更多
|
|
|
<image src="/static/pages/images/more.png"></image>
|
|
<image src="/static/pages/images/more.png"></image>
|
|
|
</view>
|
|
</view>
|
|
@@ -161,7 +175,8 @@
|
|
|
<view>{{items.name}}</view>
|
|
<view>{{items.name}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="lpgs-content">
|
|
<view class="lpgs-content">
|
|
|
- <view class="lpgs-item-content ddflex" v-for="item in items.contentList" @click="jumpUrl('/topic/content/content?id='+item.id)">
|
|
|
|
|
|
|
+ <view class="lpgs-item-content ddflex" v-for="item in items.contentList"
|
|
|
|
|
+ @click="jumpUrl('/topic/content/content?id='+item.id)">
|
|
|
<view class="flex" style="min-width: 0;">
|
|
<view class="flex" style="min-width: 0;">
|
|
|
<view class="lpgs-item-content-title tovers">{{item.title}}</view>
|
|
<view class="lpgs-item-content-title tovers">{{item.title}}</view>
|
|
|
<view class="lpgs-item-content-look ddflex">
|
|
<view class="lpgs-item-content-look ddflex">
|
|
@@ -169,19 +184,21 @@
|
|
|
<view>{{unitFormat(item.browse)}}</view>
|
|
<view>{{unitFormat(item.browse)}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <image class="lpgs-item-content-pic" :src="item.pic?item.pic:'/static/images/lj_img.png'"></image>
|
|
|
|
|
|
|
+ <image class="lpgs-item-content-pic"
|
|
|
|
|
+ :src="item.pic?item.pic:'/static/images/lj_img.png'"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 发现 -->
|
|
<!-- 发现 -->
|
|
|
<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="fxList.length>0">
|
|
<view class="index-box" style="margin:0;padding: 30rpx;background-color: #f5f5f5;" v-if="fxList.length>0">
|
|
|
<view class="map-ac">
|
|
<view class="map-ac">
|
|
|
<scroll-view scroll-x="true" class="map-acs ddflex" style="height: 70rpx;">
|
|
<scroll-view scroll-x="true" class="map-acs ddflex" style="height: 70rpx;">
|
|
|
- <view :class="'fx-nav '+(fxIndex==index?'fx-nav-active':'')" v-for="item,index in fxList" @click="changeFxTab(index)">{{item.name}}</view>
|
|
|
|
|
|
|
+ <view :class="'fx-nav '+(fxIndex==index?'fx-nav-active':'')" v-for="item,index in fxList"
|
|
|
|
|
+ @click="changeFxTab(index)">{{item.name}}</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="fx-bar">
|
|
<view class="fx-bar">
|
|
@@ -190,13 +207,15 @@
|
|
|
<view class="fx-header-title">{{fxList[fxIndex].name}}</view>
|
|
<view class="fx-header-title">{{fxList[fxIndex].name}}</view>
|
|
|
<view class="fx-header-more">2.2万人转发</view>
|
|
<view class="fx-header-more">2.2万人转发</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="fx-header-more ddflex" @click="jumpUrl('/topic/contentList/contentList?code='+fxList[fxIndex].code+'&title='+fxList[fxIndex].name)">
|
|
|
|
|
|
|
+ <view class="fx-header-more ddflex"
|
|
|
|
|
+ @click="jumpUrl('/topic/contentList/contentList?code='+fxList[fxIndex].code+'&title='+fxList[fxIndex].name)">
|
|
|
更多
|
|
更多
|
|
|
<image src="/static/pages/images/more.png"></image>
|
|
<image src="/static/pages/images/more.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view>
|
|
<view>
|
|
|
- <view class="fx-item ddflex" v-for="item in fxContentList" @click="jumpUrl('/topic/content/content?id='+item.id)">
|
|
|
|
|
|
|
+ <view class="fx-item ddflex" v-for="item in fxContentList"
|
|
|
|
|
+ @click="jumpUrl('/topic/content/content?id='+item.id)">
|
|
|
<view class="flex" style="min-width: 0;">
|
|
<view class="flex" style="min-width: 0;">
|
|
|
<view class="fx-item-title tovers">{{item.title}}</view>
|
|
<view class="fx-item-title tovers">{{item.title}}</view>
|
|
|
<view class="ddflex" style="margin-top: 24rpx;">
|
|
<view class="ddflex" style="margin-top: 24rpx;">
|
|
@@ -212,7 +231,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- <component v-for="(item,index) in contact" ></component> -->
|
|
<!-- <component v-for="(item,index) in contact" ></component> -->
|
|
|
<!-- <ad></ad> -->
|
|
<!-- <ad></ad> -->
|
|
|
<block v-if="contactShow">
|
|
<block v-if="contactShow">
|
|
@@ -243,15 +262,19 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <footer-copyright v-if="logo"></footer-copyright> -->
|
|
<!-- <footer-copyright v-if="logo"></footer-copyright> -->
|
|
|
<!-- <contact-button img-url="/static/pages/images/kfico1_1.png" class-name="contact_index" button-text="客服"></contact-button> -->
|
|
<!-- <contact-button img-url="/static/pages/images/kfico1_1.png" class-name="contact_index" button-text="客服"></contact-button> -->
|
|
|
- <view class="guide" @tap="hideGuide" v-if="first"><image src="/static/pages/images/guide.png" mode="widthFix"></image></view>
|
|
|
|
|
|
|
+ <view class="guide" @tap="hideGuide" v-if="first">
|
|
|
|
|
+ <image src="/static/pages/images/guide.png" mode="widthFix"></image>
|
|
|
|
|
+ </view>
|
|
|
<!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 115) + 'rpx'"></view> -->
|
|
<!-- <view class="placeholder-view" :style="'height:' + (bottomBlankHeight + 115) + 'rpx'"></view> -->
|
|
|
<foot channel="home" :isUpdate="isUpdate"></foot>
|
|
<foot channel="home" :isUpdate="isUpdate"></foot>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle"></view>
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <view class="ceng2" v-if="isShowCodePop" @click="isShowCodePop = false" @touchmove.stop.prevent="moveHandle">
|
|
|
|
|
+ </view>
|
|
|
<view class="code-pop" v-if="isShowCodePop">
|
|
<view class="code-pop" v-if="isShowCodePop">
|
|
|
<view class="code-content" v-if="recommendCard.wechatCode">
|
|
<view class="code-content" v-if="recommendCard.wechatCode">
|
|
|
- <image :src="recommendCard.wechatCode?recommendCard.wechatCode:'/static/images/wxCode.jpg'" show-menu-by-longpress="true"></image>
|
|
|
|
|
|
|
+ <image :src="recommendCard.wechatCode?recommendCard.wechatCode:'/static/images/wxCode.jpg'"
|
|
|
|
|
+ show-menu-by-longpress="true"></image>
|
|
|
<view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
|
|
<view style="text-align: center;font-size: 24rpx;color: #999;margin-bottom: 50rpx;">长按识别微信二维码</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="code-text" v-else>
|
|
<view class="code-text" v-else>
|
|
@@ -263,9 +286,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<msgNumber></msgNumber>
|
|
<msgNumber></msgNumber>
|
|
|
-
|
|
|
|
|
- <view class="chat-fixed">
|
|
|
|
|
- <view class="chat-box ddflex">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view class="chat-fixed" v-if="recommendCard">
|
|
|
|
|
+ <view class="chat-box ddflex" @click="jumpSingleChatRoom()">
|
|
|
<image :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
|
|
<image :src="recommendCard.avatar?recommendCard.avatar:'../../static/pages/images/userimg.png'"></image>
|
|
|
<view class="chat-lyl">聊一聊</view>
|
|
<view class="chat-lyl">聊一聊</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -274,662 +297,688 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-//index.js
|
|
|
|
|
-//获取应用实例
|
|
|
|
|
-const app = getApp();
|
|
|
|
|
-const req = require('../../utils/request.js');
|
|
|
|
|
-const api = require('../../utils/api.js');
|
|
|
|
|
-const utils = require('../../utils/util.js');
|
|
|
|
|
-const mes = require('../../utils/requestmessage.js');
|
|
|
|
|
-const route = require('../../utils/route');
|
|
|
|
|
-const QQMapWX = require("../../utils/qqmap.js");
|
|
|
|
|
-import foot from '../../components/nav-bar/index';
|
|
|
|
|
-import footerCopyright from '../../components/footer-copyright/footer-copyright';
|
|
|
|
|
-import banner from '../../template/banner/banner';
|
|
|
|
|
-import district from '../../template/king_kong_district/king_kong_district';
|
|
|
|
|
-import msgNumber from '../../components/msg-number/index.vue';
|
|
|
|
|
-
|
|
|
|
|
-export default {
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- skinNotColor: req.public.skinNotColor,
|
|
|
|
|
- systems: {},
|
|
|
|
|
- header: req.header,
|
|
|
|
|
- bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
|
|
|
|
|
- bannerList: [],
|
|
|
|
|
- //产品分类列表
|
|
|
|
|
- page: 1,
|
|
|
|
|
- //产品列表
|
|
|
|
|
- merchant: {},
|
|
|
|
|
- activityGroup: {
|
|
|
|
|
- products: []
|
|
|
|
|
- },
|
|
|
|
|
- couponList: {},//优惠券,
|
|
|
|
|
- isUpdate: false,
|
|
|
|
|
- // 是否更新消息
|
|
|
|
|
- first: true,
|
|
|
|
|
- //是否显示提示加入我的小程序
|
|
|
|
|
- isLayerAd: true,
|
|
|
|
|
- //广告
|
|
|
|
|
- homeTemplate: [],
|
|
|
|
|
- //首页栏目配置
|
|
|
|
|
- storeShow: true,
|
|
|
|
|
- templateType: {
|
|
|
|
|
- module_ad: 'ad',
|
|
|
|
|
|
|
+ //index.js
|
|
|
|
|
+ //获取应用实例
|
|
|
|
|
+ const app = getApp();
|
|
|
|
|
+ const req = require('../../utils/request.js');
|
|
|
|
|
+ const api = require('../../utils/api.js');
|
|
|
|
|
+ const utils = require('../../utils/util.js');
|
|
|
|
|
+ const mes = require('../../utils/requestmessage.js');
|
|
|
|
|
+ const route = require('../../utils/route');
|
|
|
|
|
+ const QQMapWX = require("../../utils/qqmap.js");
|
|
|
|
|
+ import foot from '../../components/nav-bar/index';
|
|
|
|
|
+ import footerCopyright from '../../components/footer-copyright/footer-copyright';
|
|
|
|
|
+ import banner from '../../template/banner/banner';
|
|
|
|
|
+ import district from '../../template/king_kong_district/king_kong_district';
|
|
|
|
|
+ import msgNumber from '../../components/msg-number/index.vue';
|
|
|
|
|
+
|
|
|
|
|
+ export default {
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ skinNotColor: req.public.skinNotColor,
|
|
|
|
|
+ systems: {},
|
|
|
|
|
+ header: req.header,
|
|
|
|
|
+ bottomBlankHeight: app.globalData.isIPhoneX ? 68 : 0,
|
|
|
|
|
+ bannerList: [],
|
|
|
|
|
+ //产品分类列表
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ //产品列表
|
|
|
|
|
+ merchant: {},
|
|
|
|
|
+ activityGroup: {
|
|
|
|
|
+ products: []
|
|
|
|
|
+ },
|
|
|
|
|
+ couponList: {}, //优惠券,
|
|
|
|
|
+ isUpdate: false,
|
|
|
|
|
+ // 是否更新消息
|
|
|
|
|
+ first: true,
|
|
|
|
|
+ //是否显示提示加入我的小程序
|
|
|
|
|
+ isLayerAd: true,
|
|
|
//广告
|
|
//广告
|
|
|
- module_type_district: 'type_district',
|
|
|
|
|
- //分类导航
|
|
|
|
|
- module_king_kong_district: 'king_kong_district', //金刚区
|
|
|
|
|
- },
|
|
|
|
|
- isNotice: false,
|
|
|
|
|
- joingroupList: {
|
|
|
|
|
- products: []
|
|
|
|
|
- },
|
|
|
|
|
- //拼团
|
|
|
|
|
- bargainList: {
|
|
|
|
|
- products: []
|
|
|
|
|
- },
|
|
|
|
|
- //砍价
|
|
|
|
|
- customersList: {
|
|
|
|
|
- products: []
|
|
|
|
|
- },
|
|
|
|
|
- //新客
|
|
|
|
|
- freshen: true,
|
|
|
|
|
- url: '',
|
|
|
|
|
- web: '',
|
|
|
|
|
- site: '',
|
|
|
|
|
- districtTemplate: {},
|
|
|
|
|
- contact: [],
|
|
|
|
|
- seckillList: {
|
|
|
|
|
- products: []
|
|
|
|
|
- },
|
|
|
|
|
- about: {},
|
|
|
|
|
- Is_Store_Price_Stock: '',
|
|
|
|
|
- guarantee: [],
|
|
|
|
|
- animationData: '',
|
|
|
|
|
- content: '',
|
|
|
|
|
- popAdList: {},
|
|
|
|
|
- iscouponAd: false,
|
|
|
|
|
- logo: false,
|
|
|
|
|
- top: Boolean,
|
|
|
|
|
- top_type: Boolean,
|
|
|
|
|
- switchStoreShow: Boolean,
|
|
|
|
|
- contactShow: true,
|
|
|
|
|
- districtShow: false,
|
|
|
|
|
- bannerShow: false,
|
|
|
|
|
- officeList: [],//互动
|
|
|
|
|
- hotActivityList:[],//热门活动
|
|
|
|
|
- matchList:[],//活动列表
|
|
|
|
|
-
|
|
|
|
|
- tbalList:[],//投保案例
|
|
|
|
|
- tbalIndex:0,//投保案例tab
|
|
|
|
|
-
|
|
|
|
|
- lpalList:[],//理赔案例
|
|
|
|
|
-
|
|
|
|
|
- fxList:[],//发现
|
|
|
|
|
- fxIndex:0,
|
|
|
|
|
- fxContentList:[],
|
|
|
|
|
-
|
|
|
|
|
- recommendCard:{},//销售
|
|
|
|
|
-
|
|
|
|
|
- isShowCodePop:false,
|
|
|
|
|
-
|
|
|
|
|
- lpalCode:req.public.lpalCode
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- components: {
|
|
|
|
|
- foot,
|
|
|
|
|
- footerCopyright,
|
|
|
|
|
- banner,
|
|
|
|
|
- district,
|
|
|
|
|
- msgNumber
|
|
|
|
|
- },
|
|
|
|
|
- props: {},
|
|
|
|
|
- onLoad: async function(options) {
|
|
|
|
|
- // console.log("扫码进去参数===" + JSON.stringify(options));
|
|
|
|
|
- // if (options.scene) {
|
|
|
|
|
- // // this.scene = options.scene || '1290926887903780865';
|
|
|
|
|
- // this.scene = options.scene;
|
|
|
|
|
- // await this.loadCodeParams();
|
|
|
|
|
- // }
|
|
|
|
|
- // wx.setNavigationBarColor({
|
|
|
|
|
- // frontColor: '#ffffff',
|
|
|
|
|
- // backgroundColor: req.public.titleTopBgColor,
|
|
|
|
|
- // })
|
|
|
|
|
- // this.getPopAd()
|
|
|
|
|
- this.query = options;
|
|
|
|
|
- req.silenceLogin(options.userId, '');
|
|
|
|
|
- if (options.custom_params) {
|
|
|
|
|
- let obj = decodeURIComponent(opt.custom_params);
|
|
|
|
|
- obj = JSON.parse(obj);
|
|
|
|
|
- // console.log(obj)
|
|
|
|
|
- req.setStorage('pidCode', obj.userId);
|
|
|
|
|
- }
|
|
|
|
|
- if (options.isShare) {
|
|
|
|
|
- if (options.userId) {
|
|
|
|
|
- req.setStorage('pidCode', options.userId);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- setInterval(() => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isNotice: true
|
|
|
|
|
- });
|
|
|
|
|
- }, 10000); // this.init();
|
|
|
|
|
-
|
|
|
|
|
- QQMapWX.initMap();
|
|
|
|
|
- req.getLocation(res => {
|
|
|
|
|
- const to = {
|
|
|
|
|
- latitude: res.latitude,
|
|
|
|
|
- longitude: res.longitude
|
|
|
|
|
|
|
+ homeTemplate: [],
|
|
|
|
|
+ //首页栏目配置
|
|
|
|
|
+ storeShow: true,
|
|
|
|
|
+ templateType: {
|
|
|
|
|
+ module_ad: 'ad',
|
|
|
|
|
+ //广告
|
|
|
|
|
+ module_type_district: 'type_district',
|
|
|
|
|
+ //分类导航
|
|
|
|
|
+ module_king_kong_district: 'king_kong_district', //金刚区
|
|
|
|
|
+ },
|
|
|
|
|
+ isNotice: false,
|
|
|
|
|
+ joingroupList: {
|
|
|
|
|
+ products: []
|
|
|
|
|
+ },
|
|
|
|
|
+ //拼团
|
|
|
|
|
+ bargainList: {
|
|
|
|
|
+ products: []
|
|
|
|
|
+ },
|
|
|
|
|
+ //砍价
|
|
|
|
|
+ customersList: {
|
|
|
|
|
+ products: []
|
|
|
|
|
+ },
|
|
|
|
|
+ //新客
|
|
|
|
|
+ freshen: true,
|
|
|
|
|
+ url: '',
|
|
|
|
|
+ web: '',
|
|
|
|
|
+ site: '',
|
|
|
|
|
+ districtTemplate: {},
|
|
|
|
|
+ contact: [],
|
|
|
|
|
+ seckillList: {
|
|
|
|
|
+ products: []
|
|
|
|
|
+ },
|
|
|
|
|
+ about: {},
|
|
|
|
|
+ Is_Store_Price_Stock: '',
|
|
|
|
|
+ guarantee: [],
|
|
|
|
|
+ animationData: '',
|
|
|
|
|
+ content: '',
|
|
|
|
|
+ popAdList: {},
|
|
|
|
|
+ iscouponAd: false,
|
|
|
|
|
+ logo: false,
|
|
|
|
|
+ top: Boolean,
|
|
|
|
|
+ top_type: Boolean,
|
|
|
|
|
+ switchStoreShow: Boolean,
|
|
|
|
|
+ contactShow: true,
|
|
|
|
|
+ districtShow: false,
|
|
|
|
|
+ bannerShow: false,
|
|
|
|
|
+ officeList: [], //互动
|
|
|
|
|
+ hotActivityList: [], //热门活动
|
|
|
|
|
+ matchList: [], //活动列表
|
|
|
|
|
+
|
|
|
|
|
+ tbalList: [], //投保案例
|
|
|
|
|
+ tbalIndex: 0, //投保案例tab
|
|
|
|
|
+
|
|
|
|
|
+ lpalList: [], //理赔案例
|
|
|
|
|
+
|
|
|
|
|
+ fxList: [], //发现
|
|
|
|
|
+ fxIndex: 0,
|
|
|
|
|
+ fxContentList: [],
|
|
|
|
|
+
|
|
|
|
|
+ recommendCard: '', //销售
|
|
|
|
|
+
|
|
|
|
|
+ isShowCodePop: false,
|
|
|
|
|
+
|
|
|
|
|
+ lpalCode: req.public.lpalCode
|
|
|
};
|
|
};
|
|
|
- QQMapWX.reverseGeocoder(to, resp => {
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ components: {
|
|
|
|
|
+ foot,
|
|
|
|
|
+ footerCopyright,
|
|
|
|
|
+ banner,
|
|
|
|
|
+ district,
|
|
|
|
|
+ msgNumber
|
|
|
|
|
+ },
|
|
|
|
|
+ props: {},
|
|
|
|
|
+ onLoad: async function(options) {
|
|
|
|
|
+ // console.log("扫码进去参数===" + JSON.stringify(options));
|
|
|
|
|
+ // if (options.scene) {
|
|
|
|
|
+ // // this.scene = options.scene || '1290926887903780865';
|
|
|
|
|
+ // this.scene = options.scene;
|
|
|
|
|
+ // await this.loadCodeParams();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // wx.setNavigationBarColor({
|
|
|
|
|
+ // frontColor: '#ffffff',
|
|
|
|
|
+ // backgroundColor: req.public.titleTopBgColor,
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.getPopAd()
|
|
|
|
|
+ this.query = options;
|
|
|
|
|
+ req.silenceLogin(options.userId, '');
|
|
|
|
|
+ if (options.custom_params) {
|
|
|
|
|
+ let obj = decodeURIComponent(opt.custom_params);
|
|
|
|
|
+ obj = JSON.parse(obj);
|
|
|
|
|
+ // console.log(obj)
|
|
|
|
|
+ req.setStorage('pidCode', obj.userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (options.isShare) {
|
|
|
|
|
+ if (options.userId) {
|
|
|
|
|
+ req.setStorage('pidCode', options.userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ setInterval(() => {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ isNotice: true
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 10000); // this.init();
|
|
|
|
|
+
|
|
|
|
|
+ QQMapWX.initMap();
|
|
|
|
|
+ req.getLocation(res => {
|
|
|
|
|
+ const to = {
|
|
|
|
|
+ latitude: res.latitude,
|
|
|
|
|
+ longitude: res.longitude
|
|
|
|
|
+ };
|
|
|
|
|
+ QQMapWX.reverseGeocoder(to, resp => {});
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- async onShow() {
|
|
|
|
|
- let _ts = this;
|
|
|
|
|
- await this.getConfig().then(res => {
|
|
|
|
|
- });
|
|
|
|
|
- await this.getHomeTemplateConfig();
|
|
|
|
|
- uni.setNavigationBarColor({
|
|
|
|
|
- frontColor: this.skinNotColor?'#000':'#ffffff',
|
|
|
|
|
- backgroundColor: req.public.titleTopBgColor
|
|
|
|
|
- });
|
|
|
|
|
- _ts.setData({
|
|
|
|
|
- isUpdate: !_ts.isUpdate
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- this.getHotActivity()
|
|
|
|
|
- this.getMatchList()
|
|
|
|
|
- this.getTbal()
|
|
|
|
|
- this.getLpal()
|
|
|
|
|
- this.getFx()
|
|
|
|
|
- this.getRecommendCard()
|
|
|
|
|
- // console.log('this.freshen=='+this.freshen)
|
|
|
|
|
- let first = req.getStorage('first');
|
|
|
|
|
- if (first !== false)
|
|
|
|
|
- _ts.setData({
|
|
|
|
|
- first: true
|
|
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ async onShow() {
|
|
|
|
|
+ let _ts = this;
|
|
|
|
|
+ await this.getConfig().then(res => {});
|
|
|
|
|
+ await this.getHomeTemplateConfig();
|
|
|
|
|
+ uni.setNavigationBarColor({
|
|
|
|
|
+ frontColor: this.skinNotColor ? '#000' : '#ffffff',
|
|
|
|
|
+ backgroundColor: req.public.titleTopBgColor
|
|
|
});
|
|
});
|
|
|
- else
|
|
|
|
|
_ts.setData({
|
|
_ts.setData({
|
|
|
- first: false
|
|
|
|
|
|
|
+ isUpdate: !_ts.isUpdate
|
|
|
});
|
|
});
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- onUnload() {
|
|
|
|
|
- // this.isShowTime = false;
|
|
|
|
|
- this.clearAllTimer(1);
|
|
|
|
|
- this.clearAllTimer(2);
|
|
|
|
|
- this.clearAllTimer(3);
|
|
|
|
|
- this.clearAllTimer(4);
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- onHide() {
|
|
|
|
|
- // this.isShowTime = false;
|
|
|
|
|
- this.clearAllTimer(1);
|
|
|
|
|
- this.clearAllTimer(2);
|
|
|
|
|
- this.clearAllTimer(3);
|
|
|
|
|
- this.clearAllTimer(4);
|
|
|
|
|
- },
|
|
|
|
|
- onShareAppMessage: function() {
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- onShareTimeline() {
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- onReachBottom() {},
|
|
|
|
|
-
|
|
|
|
|
- methods: {
|
|
|
|
|
- jumpUrl(url){
|
|
|
|
|
- if(req.isLogins(false)){
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url:url
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- // 获取推荐销售
|
|
|
|
|
- getRecommendCard(){
|
|
|
|
|
- req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
|
|
|
|
|
- this.recommendCard = res
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 获取热门活动
|
|
|
|
|
- getHotActivity(){
|
|
|
|
|
- req.getRequest('/api/banner',{code:'index_hot_activity'},res=>{
|
|
|
|
|
- this.hotActivityList = res
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.getHotActivity()
|
|
|
|
|
+ this.getMatchList()
|
|
|
|
|
+ this.getTbal()
|
|
|
|
|
+ this.getLpal()
|
|
|
|
|
+ this.getFx()
|
|
|
|
|
+ this.getRecommendCard()
|
|
|
|
|
+ // console.log('this.freshen=='+this.freshen)
|
|
|
|
|
+ let first = req.getStorage('first');
|
|
|
|
|
+ if (first !== false)
|
|
|
|
|
+ _ts.setData({
|
|
|
|
|
+ first: true
|
|
|
|
|
+ });
|
|
|
|
|
+ else
|
|
|
|
|
+ _ts.setData({
|
|
|
|
|
+ first: false
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- // 获取更多活动
|
|
|
|
|
- getMatchList(){
|
|
|
|
|
- req.getRequest('/api/match/list',{page:1,limit:10},res=>{
|
|
|
|
|
- this.matchList = res
|
|
|
|
|
- })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ onUnload() {
|
|
|
|
|
+ // this.isShowTime = false;
|
|
|
|
|
+ this.clearAllTimer(1);
|
|
|
|
|
+ this.clearAllTimer(2);
|
|
|
|
|
+ this.clearAllTimer(3);
|
|
|
|
|
+ this.clearAllTimer(4);
|
|
|
},
|
|
},
|
|
|
- // 获取投保案例
|
|
|
|
|
- async getTbal(){
|
|
|
|
|
- this.tbalList = await this.getContentList(req.public.tbalCode)
|
|
|
|
|
- this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex].code)
|
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
|
|
+
|
|
|
|
|
+ onHide() {
|
|
|
|
|
+ // this.isShowTime = false;
|
|
|
|
|
+ this.clearAllTimer(1);
|
|
|
|
|
+ this.clearAllTimer(2);
|
|
|
|
|
+ this.clearAllTimer(3);
|
|
|
|
|
+ this.clearAllTimer(4);
|
|
|
},
|
|
},
|
|
|
- // 获取理赔案例
|
|
|
|
|
- async getLpal(){
|
|
|
|
|
- this.lpalList = await this.getContentList(req.public.lpalCode)
|
|
|
|
|
- this.lpalList.map(async item=>{
|
|
|
|
|
- item.contentList = await this.getContentPageList(item.code)
|
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ onShareAppMessage: function() {
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
- // 获取发现
|
|
|
|
|
- async getFx(){
|
|
|
|
|
- this.fxList = await this.getContentList('faxian')
|
|
|
|
|
- this.getFxContenteList(this.fxList[this.fxIndex].code)
|
|
|
|
|
|
|
+ onShareTimeline() {
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- // 获取文章栏目列表
|
|
|
|
|
- getContentList(code){
|
|
|
|
|
- return new Promise((r,j)=>{
|
|
|
|
|
- req.getRequest('/api/content/category/list',{parentCode:code},res=>{
|
|
|
|
|
- r(res?res:[])
|
|
|
|
|
|
|
+
|
|
|
|
|
+ onReachBottom() {},
|
|
|
|
|
+
|
|
|
|
|
+ methods: {
|
|
|
|
|
+
|
|
|
|
|
+ jumpSingleChatRoom() {
|
|
|
|
|
+ if (this.recommendCard) {
|
|
|
|
|
+ req.jumpSingleChatRoom(this.recommendCard.userId, this.recommendCard.avatar, this.recommendCard
|
|
|
|
|
+ .realName);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ jumpUrl(url) {
|
|
|
|
|
+ if (req.isLogins(false)) {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: url
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取推荐销售
|
|
|
|
|
+ getRecommendCard() {
|
|
|
|
|
+ req.getRequest('/api/visiting/card/recommendCardInfo', {}, res => {
|
|
|
|
|
+ this.recommendCard = res
|
|
|
|
|
+ console.log('获取推荐销售》》》》》', res);
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 获取文章列表
|
|
|
|
|
- getContentPageList(code){
|
|
|
|
|
- return new Promise((r,j)=>{
|
|
|
|
|
- req.getRequest('/api/content/list',{code:code,page:1,limit:2},res=>{
|
|
|
|
|
- r(res?res:[])
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取热门活动
|
|
|
|
|
+ getHotActivity() {
|
|
|
|
|
+ req.getRequest('/api/banner', {
|
|
|
|
|
+ code: 'index_hot_activity'
|
|
|
|
|
+ }, res => {
|
|
|
|
|
+ this.hotActivityList = res
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- // 获取发现文章列表
|
|
|
|
|
- getFxContenteList(code){
|
|
|
|
|
- return new Promise((r,j)=>{
|
|
|
|
|
- req.getRequest('/api/content/list',{code:code,page:1,limit:10},res=>{
|
|
|
|
|
- this.fxContentList = res?res:[]
|
|
|
|
|
- r(res?res:[])
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取更多活动
|
|
|
|
|
+ getMatchList() {
|
|
|
|
|
+ req.getRequest('/api/match/list', {
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 10
|
|
|
|
|
+ }, res => {
|
|
|
|
|
+ this.matchList = res
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 投保案例tab切换
|
|
|
|
|
- async changeTbalTab(index){
|
|
|
|
|
- if(this.tbalIndex==index) return false;
|
|
|
|
|
- this.tbalIndex = index
|
|
|
|
|
- this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex].code)
|
|
|
|
|
- },
|
|
|
|
|
- // 发现tab切换
|
|
|
|
|
- changeFxTab(index){
|
|
|
|
|
- if(this.fxIndex==index) return false;
|
|
|
|
|
- this.fxIndex = index
|
|
|
|
|
- this.getFxContenteList(this.fxList[this.fxIndex].code)
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- async getRqeDatas() {
|
|
|
|
|
- console.log('getRqeDatas');
|
|
|
|
|
- let that = this; //多门店
|
|
|
|
|
-
|
|
|
|
|
- // 金刚区
|
|
|
|
|
- let district = that.homeTemplate.filter(it => it.module == that.templateType.module_king_kong_district);
|
|
|
|
|
- if (district && district.length > 0 && district[0].state == 0) {
|
|
|
|
|
- let data = district[0];
|
|
|
|
|
- data.content = JSON.parse(district[0].content);
|
|
|
|
|
- that.districtTemplate = data;
|
|
|
|
|
- if (data.contentId == 2) {
|
|
|
|
|
- that.districtShow = true;
|
|
|
|
|
- }
|
|
|
|
|
- console.log(that.districtTemplate, '=============');
|
|
|
|
|
- }
|
|
|
|
|
- //顶部banner
|
|
|
|
|
- let ad = that.homeTemplate.filter(it => it.module == that.templateType.module_ad);
|
|
|
|
|
- if (ad && ad.length > 0 && ad[0].state == 0) {
|
|
|
|
|
- if (that.freshen) {
|
|
|
|
|
- await that.getBannerList(ad[0].module, ad[0].contentId);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- that.logo = true;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取投保案例
|
|
|
|
|
+ async getTbal() {
|
|
|
|
|
+ this.tbalList = await this.getContentList(req.public.tbalCode)
|
|
|
|
|
+ this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex]
|
|
|
|
|
+ .code)
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取理赔案例
|
|
|
|
|
+ async getLpal() {
|
|
|
|
|
+ this.lpalList = await this.getContentList(req.public.lpalCode)
|
|
|
|
|
+ this.lpalList.map(async item => {
|
|
|
|
|
+ item.contentList = await this.getContentPageList(item.code)
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取发现
|
|
|
|
|
+ async getFx() {
|
|
|
|
|
+ this.fxList = await this.getContentList('faxian')
|
|
|
|
|
+ this.getFxContenteList(this.fxList[this.fxIndex].code)
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- 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];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 获取文章栏目列表
|
|
|
|
|
+ getContentList(code) {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ req.getRequest('/api/content/category/list', {
|
|
|
|
|
+ parentCode: code
|
|
|
|
|
+ }, res => {
|
|
|
|
|
+ r(res ? res : [])
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- 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 = '';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 获取文章列表
|
|
|
|
|
+ getContentPageList(code) {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ req.getRequest('/api/content/list', {
|
|
|
|
|
+ code: code,
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 2
|
|
|
|
|
+ }, res => {
|
|
|
|
|
+ r(res ? res : [])
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- if (dt.type * 1 == 6) app.globalData.switchTab(url);
|
|
|
|
|
- else app.globalData.openPage(url);
|
|
|
|
|
- this.hideAd();
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // 获取发现文章列表
|
|
|
|
|
+ getFxContenteList(code) {
|
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
|
+ req.getRequest('/api/content/list', {
|
|
|
|
|
+ code: code,
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 10
|
|
|
|
|
+ }, res => {
|
|
|
|
|
+ this.fxContentList = res ? res : []
|
|
|
|
|
+ r(res ? res : [])
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 投保案例tab切换
|
|
|
|
|
+ async changeTbalTab(index) {
|
|
|
|
|
+ if (this.tbalIndex == index) return false;
|
|
|
|
|
+ this.tbalIndex = index
|
|
|
|
|
+ this.tbalList[this.tbalIndex].contentList = await this.getContentPageList(this.tbalList[this.tbalIndex]
|
|
|
|
|
+ .code)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 发现tab切换
|
|
|
|
|
+ changeFxTab(index) {
|
|
|
|
|
+ if (this.fxIndex == index) return false;
|
|
|
|
|
+ this.fxIndex = index
|
|
|
|
|
+ this.getFxContenteList(this.fxList[this.fxIndex].code)
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- //获取首页模板配置
|
|
|
|
|
- getHomeTemplateConfig() {
|
|
|
|
|
- let _ts = this;
|
|
|
|
|
- let page = 'index';
|
|
|
|
|
- //荣康模板配置、小店产品==门店产品
|
|
|
|
|
- // if (this.merchant && this.merchant.type == 5 || this.shopId && this.merchantId) page = 'shopIndex'
|
|
|
|
|
- req.getRequest(
|
|
|
|
|
- '/api/template/getTemplate',
|
|
|
|
|
- {
|
|
|
|
|
- page: page
|
|
|
|
|
- },
|
|
|
|
|
- data => {
|
|
|
|
|
- let arr = [];
|
|
|
|
|
- data.forEach(it => {
|
|
|
|
|
- arr.push(it.module);
|
|
|
|
|
- });
|
|
|
|
|
- this.setData({
|
|
|
|
|
- contact: [...new Set(arr)],
|
|
|
|
|
- contactShow: false
|
|
|
|
|
- });
|
|
|
|
|
- if (this.contact.indexOf('sou') != -1 && this.contact.indexOf('store_options') != -1) {
|
|
|
|
|
- this.top = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.top = true;
|
|
|
|
|
|
|
+ async getRqeDatas() {
|
|
|
|
|
+ console.log('getRqeDatas');
|
|
|
|
|
+ let that = this; //多门店
|
|
|
|
|
+
|
|
|
|
|
+ // 金刚区
|
|
|
|
|
+ let district = that.homeTemplate.filter(it => it.module == that.templateType
|
|
|
|
|
+ .module_king_kong_district);
|
|
|
|
|
+ if (district && district.length > 0 && district[0].state == 0) {
|
|
|
|
|
+ let data = district[0];
|
|
|
|
|
+ data.content = JSON.parse(district[0].content);
|
|
|
|
|
+ that.districtTemplate = data;
|
|
|
|
|
+ if (data.contentId == 2) {
|
|
|
|
|
+ that.districtShow = true;
|
|
|
}
|
|
}
|
|
|
- if (this.contact.indexOf('sou') != -1 && this.contact.indexOf('type_district') != -1) {
|
|
|
|
|
- this.top_type = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.top_type = true;
|
|
|
|
|
|
|
+ console.log(that.districtTemplate, '=============');
|
|
|
|
|
+ }
|
|
|
|
|
+ //顶部banner
|
|
|
|
|
+ let ad = that.homeTemplate.filter(it => it.module == that.templateType.module_ad);
|
|
|
|
|
+ if (ad && ad.length > 0 && ad[0].state == 0) {
|
|
|
|
|
+ if (that.freshen) {
|
|
|
|
|
+ await that.getBannerList(ad[0].module, ad[0].contentId);
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ that.logo = true;
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- console.log(this.contact.indexOf('sou') != -1, this.contact.indexOf('store_options') != -1, this.contact.indexOf('type_district') != -1, this.top);
|
|
|
|
|
- console.log(this.contact);
|
|
|
|
|
- this.setData({
|
|
|
|
|
- homeTemplate: data
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ 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];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.getRqeDatas();
|
|
|
|
|
|
|
+ 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 = '';
|
|
|
}
|
|
}
|
|
|
- );
|
|
|
|
|
- },
|
|
|
|
|
- getConfig() {
|
|
|
|
|
- var _this = this;
|
|
|
|
|
- return new Promise((res, rej) => {
|
|
|
|
|
- req.g(
|
|
|
|
|
- '/api/other/config',
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (dt.type * 1 == 6) app.globalData.switchTab(url);
|
|
|
|
|
+ else app.globalData.openPage(url);
|
|
|
|
|
+ this.hideAd();
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ //获取首页模板配置
|
|
|
|
|
+ getHomeTemplateConfig() {
|
|
|
|
|
+ let _ts = this;
|
|
|
|
|
+ let page = 'index';
|
|
|
|
|
+ //荣康模板配置、小店产品==门店产品
|
|
|
|
|
+ // if (this.merchant && this.merchant.type == 5 || this.shopId && this.merchantId) page = 'shopIndex'
|
|
|
|
|
+ req.getRequest(
|
|
|
|
|
+ '/api/template/getTemplate', {
|
|
|
|
|
+ page: page
|
|
|
|
|
+ },
|
|
|
data => {
|
|
data => {
|
|
|
- req.setStorage('configRes', JSON.stringify(data));
|
|
|
|
|
- this.about = data;
|
|
|
|
|
- if (!data.Index_Store_Confirm || data.Index_Store_Confirm == 0) {
|
|
|
|
|
- _this.setData({
|
|
|
|
|
- switchStoreShow: false,
|
|
|
|
|
- storeShow: false
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ let arr = [];
|
|
|
|
|
+ data.forEach(it => {
|
|
|
|
|
+ arr.push(it.module);
|
|
|
|
|
+ });
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ contact: [...new Set(arr)],
|
|
|
|
|
+ contactShow: false
|
|
|
|
|
+ });
|
|
|
|
|
+ if (this.contact.indexOf('sou') != -1 && this.contact.indexOf('store_options') != -1) {
|
|
|
|
|
+ this.top = false;
|
|
|
} else {
|
|
} else {
|
|
|
- _this.setData({
|
|
|
|
|
- switchStoreShow: true
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ this.top = true;
|
|
|
}
|
|
}
|
|
|
- // console.log(data.Index_Store_Confirm, "====", !data.Index_Store_Confirm, typeof(res
|
|
|
|
|
- // .Index_Store_Confirm))
|
|
|
|
|
- uni.setNavigationBarTitle({
|
|
|
|
|
- // title: res['CONFIG_PROJECT_TITLE'],
|
|
|
|
|
- title: data['CONFIG_PROJECT_TITLE']
|
|
|
|
|
- });
|
|
|
|
|
- // console.log(data.Is_Store_Price_Stock);
|
|
|
|
|
-
|
|
|
|
|
- if (data.Is_Store_Price_Stock) {
|
|
|
|
|
- this.Is_Store_Price_Stock = data.Is_Store_Price_Stock;
|
|
|
|
|
|
|
+ if (this.contact.indexOf('sou') != -1 && this.contact.indexOf('type_district') != -1) {
|
|
|
|
|
+ this.top_type = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.top_type = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ console.log(this.contact.indexOf('sou') != -1, this.contact.indexOf('store_options') != -1,
|
|
|
|
|
+ this.contact.indexOf('type_district') != -1, this.top);
|
|
|
|
|
+ console.log(this.contact);
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- Is_Store_Price_Stock: data.Is_Store_Price_Stock
|
|
|
|
|
|
|
+ homeTemplate: data
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- if (data.b2c_service_guarantee && data.b2c_service_guarantee != null) {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- guarantee: data.b2c_service_guarantee.split(';').filter(it => {
|
|
|
|
|
- return (it = it && it.trim());
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.getRqeDatas();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ getConfig() {
|
|
|
|
|
+ var _this = this;
|
|
|
|
|
+ return new Promise((res, rej) => {
|
|
|
|
|
+ req.g(
|
|
|
|
|
+ '/api/other/config',
|
|
|
|
|
+ data => {
|
|
|
|
|
+ req.setStorage('configRes', JSON.stringify(data));
|
|
|
|
|
+ this.about = data;
|
|
|
|
|
+ if (!data.Index_Store_Confirm || data.Index_Store_Confirm == 0) {
|
|
|
|
|
+ _this.setData({
|
|
|
|
|
+ switchStoreShow: false,
|
|
|
|
|
+ storeShow: false
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.setData({
|
|
|
|
|
+ switchStoreShow: true
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ // console.log(data.Index_Store_Confirm, "====", !data.Index_Store_Confirm, typeof(res
|
|
|
|
|
+ // .Index_Store_Confirm))
|
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
|
+ // title: res['CONFIG_PROJECT_TITLE'],
|
|
|
|
|
+ title: data['CONFIG_PROJECT_TITLE']
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ // console.log(data.Is_Store_Price_Stock);
|
|
|
|
|
|
|
|
- req.setStorage('appName', data['CONFIG_PROJECT_TITLE']);
|
|
|
|
|
- req.setStorage('productDiy', data['Product_Foot-Diy']);
|
|
|
|
|
- res(data);
|
|
|
|
|
- },
|
|
|
|
|
- true
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ if (data.Is_Store_Price_Stock) {
|
|
|
|
|
+ this.Is_Store_Price_Stock = data.Is_Store_Price_Stock;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- merchantFun() {
|
|
|
|
|
- app.globalData.openPage('pages/nearby/nearby');
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ Is_Store_Price_Stock: data.Is_Store_Price_Stock
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- saoma() {
|
|
|
|
|
- var _this = this; // 允许从相机和相册扫码
|
|
|
|
|
|
|
+ if (data.b2c_service_guarantee && data.b2c_service_guarantee != null) {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ guarantee: data.b2c_service_guarantee.split(';').filter(it => {
|
|
|
|
|
+ return (it = it && it.trim());
|
|
|
|
|
+ })
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ req.setStorage('appName', data['CONFIG_PROJECT_TITLE']);
|
|
|
|
|
+ req.setStorage('productDiy', data['Product_Foot-Diy']);
|
|
|
|
|
+ res(data);
|
|
|
|
|
+ },
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- uni.scanCode({
|
|
|
|
|
- success: res => {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '/' + res.path
|
|
|
|
|
- }); // this.scene = '1290926887903780865';
|
|
|
|
|
|
|
+ merchantFun() {
|
|
|
|
|
+ app.globalData.openPage('pages/nearby/nearby');
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- this.loadCodeParams();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ saoma() {
|
|
|
|
|
+ var _this = this; // 允许从相机和相册扫码
|
|
|
|
|
|
|
|
- update(content) {
|
|
|
|
|
- var that = this;
|
|
|
|
|
- var animation = uni.createAnimation(); // 旧消息向上平移
|
|
|
|
|
|
|
+ uni.scanCode({
|
|
|
|
|
+ success: res => {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/' + res.path
|
|
|
|
|
+ }); // this.scene = '1290926887903780865';
|
|
|
|
|
|
|
|
- animation.translateY(-50).step({
|
|
|
|
|
- duration: 1000,
|
|
|
|
|
- timingFunction: 'ease-in'
|
|
|
|
|
- }); // 为了实现下一条新内容向上平移的效果,必须把内容很快平移到下方,并且不能被用户看见,这里其原理类似轮播图的思路。
|
|
|
|
|
- // 实现方法:动画时间设置为1ms,过渡效果设置为’动画第一帧就跳至结束状态直到结束‘
|
|
|
|
|
|
|
+ this.loadCodeParams();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- animation
|
|
|
|
|
- .opacity(0)
|
|
|
|
|
- .translateY(50)
|
|
|
|
|
- .step({
|
|
|
|
|
- duration: 1000,
|
|
|
|
|
- timingFunction: 'step-start'
|
|
|
|
|
- }); // 新消息向上平移的同时恢复透明
|
|
|
|
|
|
|
+ update(content) {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ var animation = uni.createAnimation(); // 旧消息向上平移
|
|
|
|
|
|
|
|
- animation
|
|
|
|
|
- .opacity(1)
|
|
|
|
|
- .translateY(0)
|
|
|
|
|
- .step({
|
|
|
|
|
|
|
+ animation.translateY(-50).step({
|
|
|
duration: 1000,
|
|
duration: 1000,
|
|
|
- timingFunction: 'ease-out'
|
|
|
|
|
- });
|
|
|
|
|
- that.setData({
|
|
|
|
|
- animationData: animation.export()
|
|
|
|
|
- }); // 更新内容的延时必须大于第一步动画时间
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
|
|
+ timingFunction: 'ease-in'
|
|
|
|
|
+ }); // 为了实现下一条新内容向上平移的效果,必须把内容很快平移到下方,并且不能被用户看见,这里其原理类似轮播图的思路。
|
|
|
|
|
+ // 实现方法:动画时间设置为1ms,过渡效果设置为’动画第一帧就跳至结束状态直到结束‘
|
|
|
|
|
+
|
|
|
|
|
+ animation
|
|
|
|
|
+ .opacity(0)
|
|
|
|
|
+ .translateY(50)
|
|
|
|
|
+ .step({
|
|
|
|
|
+ duration: 1000,
|
|
|
|
|
+ timingFunction: 'step-start'
|
|
|
|
|
+ }); // 新消息向上平移的同时恢复透明
|
|
|
|
|
+
|
|
|
|
|
+ animation
|
|
|
|
|
+ .opacity(1)
|
|
|
|
|
+ .translateY(0)
|
|
|
|
|
+ .step({
|
|
|
|
|
+ duration: 1000,
|
|
|
|
|
+ timingFunction: 'ease-out'
|
|
|
|
|
+ });
|
|
|
that.setData({
|
|
that.setData({
|
|
|
- content: content
|
|
|
|
|
- });
|
|
|
|
|
- }, 500000);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ animationData: animation.export()
|
|
|
|
|
+ }); // 更新内容的延时必须大于第一步动画时间
|
|
|
|
|
|
|
|
- loadCodeParams() {
|
|
|
|
|
- let _ts = this;
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ content: content
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 500000);
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
|
- if (!_ts.scene) {
|
|
|
|
|
- resolve();
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ loadCodeParams() {
|
|
|
|
|
+ let _ts = this;
|
|
|
|
|
|
|
|
- req.getRequest(
|
|
|
|
|
- '/api/code/params',
|
|
|
|
|
- {
|
|
|
|
|
- scene: _ts.scene
|
|
|
|
|
- },
|
|
|
|
|
- data => {
|
|
|
|
|
- req.setStorage('pidCode', data.userId);
|
|
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ if (!_ts.scene) {
|
|
|
resolve();
|
|
resolve();
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- getBannerList(module, contentId) {
|
|
|
|
|
- //banner图
|
|
|
|
|
- let that = this;
|
|
|
|
|
- return new Promise((resolve,reject)=>{
|
|
|
|
|
- req.getRequest(
|
|
|
|
|
- '/api/banner',
|
|
|
|
|
- {
|
|
|
|
|
- groupId: contentId
|
|
|
|
|
- },
|
|
|
|
|
- data => {
|
|
|
|
|
- if (module == that.templateType.module_ad) {
|
|
|
|
|
- that.setData({
|
|
|
|
|
- bannerList: data,
|
|
|
|
|
- bannerShow: true
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.setData({
|
|
|
|
|
- popAdList: data[0]
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ req.getRequest(
|
|
|
|
|
+ '/api/code/params', {
|
|
|
|
|
+ scene: _ts.scene
|
|
|
|
|
+ },
|
|
|
|
|
+ data => {
|
|
|
|
|
+ req.setStorage('pidCode', data.userId);
|
|
|
|
|
+ resolve();
|
|
|
}
|
|
}
|
|
|
- resolve();
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- clearAllTimer(type) {
|
|
|
|
|
- // console.log(this.activityGroup, this.joingroupList, this.bargainList, this.customersList);
|
|
|
|
|
-
|
|
|
|
|
- if (type == 1) {
|
|
|
|
|
- this.activityGroup.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
- this.activityGroup.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
- } else if (type == 2) {
|
|
|
|
|
- this.joingroupList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
- this.joingroupList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
- } else if (type == 3) {
|
|
|
|
|
- this.bargainList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
- this.bargainList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
- } else if (type == 4) {
|
|
|
|
|
- this.customersList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
- this.customersList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
- } else if (type == 5) {
|
|
|
|
|
- this.seckillList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
- this.seckillList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- hideGuide() {
|
|
|
|
|
- //关闭提示加入我的小程序
|
|
|
|
|
- this.setData({
|
|
|
|
|
- first: false
|
|
|
|
|
- });
|
|
|
|
|
- req.setStorage('first', false);
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ getBannerList(module, contentId) {
|
|
|
|
|
+ //banner图
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ req.getRequest(
|
|
|
|
|
+ '/api/banner', {
|
|
|
|
|
+ groupId: contentId
|
|
|
|
|
+ },
|
|
|
|
|
+ data => {
|
|
|
|
|
+ if (module == that.templateType.module_ad) {
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ bannerList: data,
|
|
|
|
|
+ bannerShow: true
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ popAdList: data[0]
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- hideAd() {
|
|
|
|
|
- //关闭广告
|
|
|
|
|
- // if(this.data.first==false){
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isLayerAd: false
|
|
|
|
|
- }); // }
|
|
|
|
|
- app.globalData.isLayerAd = false;
|
|
|
|
|
- },
|
|
|
|
|
- click(e) {
|
|
|
|
|
- // console.log(e)
|
|
|
|
|
- this.storeShow = e;
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
- goUrl(event) {
|
|
|
|
|
- //跳转链接
|
|
|
|
|
- let url = event.currentTarget.dataset.url;
|
|
|
|
|
- app.globalData.openPage(url);
|
|
|
|
|
- },
|
|
|
|
|
- // 拨打电话
|
|
|
|
|
- callPhone(val) {
|
|
|
|
|
- if(!val) return false
|
|
|
|
|
- uni.makePhoneCall({
|
|
|
|
|
- phoneNumber: val
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- copy(val){
|
|
|
|
|
- this.isShowCodePop = false
|
|
|
|
|
- uni.setClipboardData({
|
|
|
|
|
- data: val,
|
|
|
|
|
- complete() {
|
|
|
|
|
- req.msg('复制成功')
|
|
|
|
|
|
|
+ clearAllTimer(type) {
|
|
|
|
|
+ // console.log(this.activityGroup, this.joingroupList, this.bargainList, this.customersList);
|
|
|
|
|
+
|
|
|
|
|
+ if (type == 1) {
|
|
|
|
|
+ this.activityGroup.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
+ this.activityGroup.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
+ } else if (type == 2) {
|
|
|
|
|
+ this.joingroupList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
+ this.joingroupList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
+ } else if (type == 3) {
|
|
|
|
|
+ this.bargainList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
+ this.bargainList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
+ } else if (type == 4) {
|
|
|
|
|
+ this.customersList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
+ this.customersList.products.forEach(it => clearInterval(it.times));
|
|
|
|
|
+ } else if (type == 5) {
|
|
|
|
|
+ this.seckillList.products.forEach(it => clearInterval(it.timer));
|
|
|
|
|
+ this.seckillList.products.forEach(it => clearInterval(it.times));
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- unitFormat(data){
|
|
|
|
|
- return req.unitConverter(data).text
|
|
|
|
|
- },
|
|
|
|
|
- formatTime(date){
|
|
|
|
|
- date = new Date(date.replace(/-/g, '/'))
|
|
|
|
|
- return utils.formatTime(date).t3
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ hideGuide() {
|
|
|
|
|
+ //关闭提示加入我的小程序
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ first: false
|
|
|
|
|
+ });
|
|
|
|
|
+ req.setStorage('first', false);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ hideAd() {
|
|
|
|
|
+ //关闭广告
|
|
|
|
|
+ // if(this.data.first==false){
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ isLayerAd: false
|
|
|
|
|
+ }); // }
|
|
|
|
|
+ app.globalData.isLayerAd = false;
|
|
|
|
|
+ },
|
|
|
|
|
+ click(e) {
|
|
|
|
|
+ // console.log(e)
|
|
|
|
|
+ this.storeShow = e;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ goUrl(event) {
|
|
|
|
|
+ //跳转链接
|
|
|
|
|
+ let url = event.currentTarget.dataset.url;
|
|
|
|
|
+ app.globalData.openPage(url);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 拨打电话
|
|
|
|
|
+ callPhone(val) {
|
|
|
|
|
+ if (!val) return false
|
|
|
|
|
+ uni.makePhoneCall({
|
|
|
|
|
+ phoneNumber: val
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ copy(val) {
|
|
|
|
|
+ this.isShowCodePop = false
|
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
|
+ data: val,
|
|
|
|
|
+ complete() {
|
|
|
|
|
+ req.msg('复制成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ unitFormat(data) {
|
|
|
|
|
+ return req.unitConverter(data).text
|
|
|
|
|
+ },
|
|
|
|
|
+ formatTime(date) {
|
|
|
|
|
+ date = new Date(date.replace(/-/g, '/'))
|
|
|
|
|
+ return utils.formatTime(date).t3
|
|
|
|
|
+ },
|
|
|
|
|
+ getAge(date) {
|
|
|
|
|
+ return utils.getAge(date)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
- getAge(date){
|
|
|
|
|
- return utils.getAge(date)
|
|
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
+ // px转换到rpx的比例
|
|
|
|
|
+ let pxToRpxScale = 750 / systemInfo.windowWidth;
|
|
|
|
|
+ let systems = {
|
|
|
|
|
+ ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
|
|
|
|
|
+ navigationHeight: 44 * pxToRpxScale // 导航栏的高度
|
|
|
|
|
+ };
|
|
|
|
|
+ systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
|
|
|
|
|
+ this.systems = systems;
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- mounted() {
|
|
|
|
|
- const systemInfo = uni.getSystemInfoSync();
|
|
|
|
|
- // px转换到rpx的比例
|
|
|
|
|
- let pxToRpxScale = 750 / systemInfo.windowWidth;
|
|
|
|
|
- let systems = {
|
|
|
|
|
- ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
|
|
|
|
|
- navigationHeight: 44 * pxToRpxScale // 导航栏的高度
|
|
|
|
|
- };
|
|
|
|
|
- systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
|
|
|
|
|
- this.systems = systems;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ };
|
|
|
</script>
|
|
</script>
|
|
|
<style>
|
|
<style>
|
|
|
-@import './index.css';
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+ @import './index.css';
|
|
|
|
|
+</style>
|