فهرست منبع

h5返回上一步优化

lsx 2 سال پیش
والد
کامیت
256c28d4dd
37فایلهای تغییر یافته به همراه445 افزوده شده و 74 حذف شده
  1. 3 1
      src/main.js
  2. 13 1
      src/packageGoods/coupon/index.vue
  3. 13 1
      src/packageGoods/goods/company.vue
  4. 13 2
      src/packageGoods/goods/detail.vue
  5. 13 1
      src/packageGoods/goods/list.vue
  6. 13 1
      src/packageGoods/order/detail.vue
  7. 13 1
      src/packageGoods/order/index.vue
  8. 13 1
      src/packageGoods/order/logistics.vue
  9. 13 1
      src/packageGoods/order/settlement.vue
  10. 13 2
      src/packageGoods/promoters/index.vue
  11. 13 1
      src/packageGoods/recovery/index.vue
  12. 13 1
      src/packageGoods/ticket/index.vue
  13. 1 3
      src/packageOperate/activity/index.vue
  14. 1 5
      src/packageOperate/activity/record.vue
  15. 13 2
      src/packageOperate/address/create.vue
  16. 13 1
      src/packageOperate/address/index.vue
  17. 13 1
      src/packageOperate/creator/index.vue
  18. 13 1
      src/packageOperate/process/index.vue
  19. 13 2
      src/packageOperate/share/index.vue
  20. 13 1
      src/packageOther/about/conceal.vue
  21. 13 2
      src/packageOther/about/index.vue
  22. 13 1
      src/packageOther/about/protect.vue
  23. 13 1
      src/packageOther/rule/index.vue
  24. 13 1
      src/packageOther/rule/purchase.vue
  25. 14 2
      src/packagePrize/address/index.vue
  26. 13 1
      src/packagePrize/bean/index.vue
  27. 13 1
      src/packagePrize/coupon/detail.vue
  28. 13 1
      src/packagePrize/coupon/use.vue
  29. 13 1
      src/packagePrize/goods/detail.vue
  30. 13 1
      src/packagePrize/goods/index.vue
  31. 4 12
      src/packagePrize/prize/index.vue
  32. 13 1
      src/packagePrize/purchase/index.vue
  33. 13 1
      src/packagePrize/ticket/index.vue
  34. 29 4
      src/pages/login/code.vue
  35. 13 2
      src/pages/login/index.vue
  36. 4 12
      src/pages/ticketBox/detail.vue
  37. 12 0
      src/utils/util.js

+ 3 - 1
src/main.js

@@ -2,12 +2,14 @@ import App from './App'
 
 import Vue from 'vue'
 
-import { parseTime, numberFormat } from "@/utils/util";
+import { parseTime, numberFormat, toIndex, pagesNum } from "@/utils/util";
 
 import uView from "uview-ui";
 Vue.use(uView);
 
 Vue.prototype.$parseTime = parseTime
+Vue.prototype.$toIndex = toIndex
+Vue.prototype.$pagesNum = pagesNum
 Vue.prototype.$numberFormat = numberFormat
 
 Vue.config.productionTip = false

+ 13 - 1
src/packageGoods/coupon/index.vue

@@ -4,9 +4,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="登录" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="登录">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 
 		<view class="coupon-title">可用优惠券:{{ total }}</view>
 		<view class="coupon-list">

+ 13 - 1
src/packageGoods/goods/company.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="商家信息" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="商家信息" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商家信息" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="商家信息">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="company">该商品由以下商家提供</view>
 		<view class="detail-description" v-for="(item,index) in merchantInfo" :key="index">
 			<image :src="item" mode="scaleToFill"></image>

+ 13 - 2
src/packageGoods/goods/detail.vue

@@ -3,10 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="商品详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="商品详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
-		
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="商品详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="detail">
 			<!-- 商品轮播 -->
 			<view class="detail-swiper">

+ 13 - 1
src/packageGoods/goods/list.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :title="name" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :title="name" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" :title="name" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" :title="name">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<!-- 固定nav -->
 		<view class="fixed-top">
 			<!-- 搜索 -->

+ 13 - 1
src/packageGoods/order/detail.vue

@@ -3,8 +3,20 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="订单详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="订单详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="订单详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="订单详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
 		<!-- #endif -->
 		<!-- 订单状态 -->
 		<view class="status">

+ 13 - 1
src/packageGoods/order/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="我的订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="我的订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的订单" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="我的订单">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="order">
 			<!-- 订单导航 -->
 			<view class="flex order-state-search">

+ 13 - 1
src/packageGoods/order/logistics.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="物流详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="物流详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="物流详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="物流详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<!-- 包裹 -->
 		<view class="pack" v-if="deliverList.length>1">
 			<u-tabs @change="changeTab" :scrollable="false" :list="packList" lineWidth="20" lineHeight="4"

+ 13 - 1
src/packageGoods/order/settlement.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="提交订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="提交订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="提交订单" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="提交订单">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="settlement">
 			<view class="settlement-address">
 				<!-- 选择地址、获取微信地址 -->

+ 13 - 2
src/packageGoods/promoters/index.vue

@@ -4,10 +4,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择盲票天使" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择盲票天使"></u-navbar>
 		<!-- #endif -->
-
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择盲票天使" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="选择盲票天使">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="coupon-title">
 			<u-search placeholder="请输入名字或工号" v-model="searchValue" @blur="pageList()" :showAction="false"></u-search>
 		</view>

+ 13 - 1
src/packageGoods/recovery/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="兑换" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="兑换"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="兑换" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="兑换">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="settlement">
 			<!-- 商品 -->
 			<view class="settlement-goods" style="background-color: #fff">

+ 13 - 1
src/packageGoods/ticket/index.vue

@@ -5,9 +5,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="商品列表">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="ticket-box">
 			<view class="flex ticket-box-list">
 				<!-- <navigator :url="`/pages/ticketBox/detail?boxId=${ item.boxId }`" class="flex ticket-box-list-item"

+ 1 - 3
src/packageOperate/activity/index.vue

@@ -5,7 +5,7 @@
 		<u-navbar title="免费抽奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar title="免费抽奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		</view>
 		<view v-else>
@@ -258,7 +258,6 @@
 				inviteCode: '', //邀请码
 				activityTime: 0,
 				activityTimeTwo: 0,
-				pagesNum: "",
 				activityShow: false, //助力邀请弹框
 				inviteCodeTa: '', //邀请码
 				marketingId: '', //活动id
@@ -299,7 +298,6 @@
 			this.getDetail()
 		},
 		onShow() {
-			this.pagesNum = getCurrentPages().length
 			this.getBaseInfo()
 		},
 		methods: {

+ 1 - 5
src/packageOperate/activity/record.vue

@@ -4,7 +4,7 @@
 		<u-navbar title="获奖名单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0"/>
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar title="获奖名单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		</view>
 		<view v-else>
@@ -112,7 +112,6 @@
 				closeShow: false,
 				activityShow: false,
 				listData: {},
-				pagesNum: "",
 				total: 0,
 			}
 		},
@@ -120,9 +119,6 @@
 			this.marketingId = opthios.id
 			this.pageList()
 		},
-		onShow() {
-			this.pagesNum = getCurrentPages().length
-		},
 		methods: {
 			toActivity() {
 				uni.reLaunch({

+ 13 - 2
src/packageOperate/address/create.vue

@@ -4,11 +4,22 @@
 		<u-navbar :title="addrId ? '编辑地址' : '添加地址'" :border="true" :placeholder="true" :autoBack="true"
 			bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :title="addrId ? '编辑地址' : '添加地址'" :border="true" :placeholder="true" :autoBack="true"
 			bgColor="#fff" />
 		<!-- #endif -->
-		
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" :title="addrId ? '编辑地址' : '添加地址'" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" :title="addrId ? '编辑地址' : '添加地址'">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<!-- 表单组件 -->
 		<view class="address-add">
 			<u-form labelPosition="left" ref="form" labelWidth="90">

+ 13 - 1
src/packageOperate/address/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="我的地址" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="我的地址" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的地址" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="我的地址">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="addres-list">
 			<view class="address-item" v-for="(item, index) in list" :key="index">
 				<view class="contacts">

+ 13 - 1
src/packageOperate/creator/index.vue

@@ -4,8 +4,20 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="申请创客" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="申请创客" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="申请创客" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="申请创客">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
 		<!-- #endif -->
 		<view class="creator">
 			<u-form labelPosition="left" ref="form" labelWidth="90">

+ 13 - 1
src/packageOperate/process/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="兑奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="兑奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="兑奖" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="兑奖">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="process">
 			<view class="flex box-wrap">
 				<view class="flex box">

+ 13 - 2
src/packageOperate/share/index.vue

@@ -3,10 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="分享" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="分享" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
-
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="分享" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="分享">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="flex invitation">
 			<view class="flex invitation-user">
 				<image src="../../static/public/share_bg.png" mode="aspectFit"></image>

+ 13 - 1
src/packageOther/about/conceal.vue

@@ -3,9 +3,21 @@
 		 <!-- #ifdef MP-ALIPAY -->
 		 <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="隐私保护声明" leftIconSize="0" ></u-navbar>
 		 <!-- #endif -->
-		 <!-- #ifndef MP-ALIPAY -->
+		 <!-- #ifndef MP-ALIPAY || H5 -->
 		 <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="隐私保护声明"  ></u-navbar>
 		 <!-- #endif -->
+		 <!-- #ifdef H5 -->
+		 <view v-if="$pagesNum() > 1">
+		 	<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="隐私保护声明" />
+		 </view>
+		 <view v-else>
+		 	<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="隐私保护声明">
+		 		<view class="nav-left flex" slot="left" @click="$toIndex()">
+		 			<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+		 		</view>
+		 	</u-navbar>
+		 </view>
+		 <!-- #endif -->
 		<view v-html="descMsdq" class="desc" v-if="appId == 2"></view>
 		<view v-html="desc" class="desc" v-else></view>
 	</view>

+ 13 - 2
src/packageOther/about/index.vue

@@ -3,10 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们"></u-navbar>
 		<!-- #endif -->
-		
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="关于我们">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="about">
 			<view class="flex about-logo">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>

+ 13 - 1
src/packageOther/about/protect.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="用户使用协议" leftIconSize="0" ></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="用户使用协议"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="用户使用协议" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="用户使用协议">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view v-html="descMsdq" class="desc" v-if="appId == 2"></view>
 		<view v-html="desc" class="desc" v-else></view>
 	</view>

+ 13 - 1
src/packageOther/rule/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票产品规则" leftIconSize="0" ></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票产品规则"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票产品规则" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="盲票产品规则">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view  v-html="descMsdq" class="desc" v-if="appId == 2"></view>
 		<view v-html="desc" class="desc" v-else></view>
 	</view>

+ 13 - 1
src/packageOther/rule/purchase.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品购买服务协议" leftIconSize="0" ></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品购买服务协议"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品购买服务协议" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="商品购买服务协议">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view v-html="descMsdq" class="desc" v-if="appId == 2"></view>
 		<view v-html="desc" class="desc" v-else></view>
 	</view>

+ 14 - 2
src/packagePrize/address/index.vue

@@ -4,10 +4,22 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="使用范围" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="使用范围"></u-navbar>
 		<!-- #endif -->
-
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="使用范围" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="使用范围">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+		
 		<view class="address-wrap">
 			<view class="header-title" @click="selectAddress">
 				<view class="adderss-select">

+ 13 - 1
src/packagePrize/bean/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"  leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="我的盲豆">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		
 		<view class="bean">
 			<!-- 盲豆数 -->

+ 13 - 1
src/packagePrize/coupon/detail.vue

@@ -4,9 +4,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券详情" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券详情"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="优惠券详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 
 		<view class="detail">
 			<!-- 优惠券信息 -->

+ 13 - 1
src/packagePrize/coupon/use.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券使用记录" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券使用记录"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券使用记录" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="优惠券使用记录">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<!-- 优惠券筛选 -->
 		<view class="prize-state">
 			<u-tabs @change="changeTab" :scrollable="false" :list="stateArr" lineWidth="20" lineHeight="4"

+ 13 - 1
src/packagePrize/goods/detail.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="奖品详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		
 		<view class="detail">
 			<view class="detail-swiper">

+ 13 - 1
src/packagePrize/goods/index.vue

@@ -4,9 +4,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品详情" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品详情"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品详情" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="商品详情">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 
 		<view class="detail">
 			<view class="detail-swiper">

+ 4 - 12
src/packagePrize/prize/index.vue

@@ -1,24 +1,24 @@
 <template>
 	<view>
 		<!-- #ifdef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的仓库" leftIconSize="0"></u-navbar>
 		</view>
 		<view v-else>
 			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="我的仓库">
-				<view class="nav-left flex" slot="left" @click="toIndex">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
 					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
 				</view>
 			</u-navbar>
 		</view>
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的仓库"></u-navbar>
 		</view>
 		<view v-else>
 			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="我的仓库">
-				<view class="nav-left flex" slot="left" @click="toIndex">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
 					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
 				</view>
 			</u-navbar>
@@ -207,7 +207,6 @@
 				list: [],
 
 				currentIndex: 0,
-				pagesNum: "",
 				
 				statusIndex: 1,
 				
@@ -222,7 +221,6 @@
 			};
 		},
 		onShow() {
-			this.pagesNum = getCurrentPages().length
 			this.pageList()
 			this.couponNum()
 		},
@@ -306,12 +304,6 @@
 					this.getListTwo()
 				}
 			},
-
-			toIndex() {
-				uni.switchTab({
-					url: '/pages/user/index'
-				})
-			},
 			
 			toRecovery(item) {
 				uni.navigateTo({

+ 13 - 1
src/packagePrize/purchase/index.vue

@@ -4,9 +4,21 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="购买成功">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="purchase">
 			<image class="imgOne" src="https://mp-public-test-1307117429.cos.ap-shanghai.myqcloud.com/v2/buy_suc.png"
 				mode="scaleToFill"></image>

+ 13 - 1
src/packagePrize/ticket/index.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲票" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲票"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲票" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="我的盲票">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		
 		<!-- 状态 -->
 		<view class="state">

+ 29 - 4
src/pages/login/code.vue

@@ -3,9 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="登录">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 		<view class="container">
 			<view class="login">
 				<view class="login-title">验证码登录</view>
@@ -44,9 +56,18 @@
 				code: '',
 				tips: '',
 				authShow: false,
+				pagesNum: "",
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		methods: {
+			toIndex() {
+				uni.switchTab({
+					url: `/pages/index/index`
+				})
+			},
 			codeChange(text) {
 				this.tips = text;
 			},
@@ -120,9 +141,13 @@
 						uni.$u.toast('登录成功');
 						uni.setStorageSync('token', res.token)
 						setTimeout(() => {
-							uni.navigateBack({
-								delta: 2
-							})
+							if(this.pagesNum > 2) {
+								uni.navigateBack({
+									delta: 2
+								})
+							}else {
+								this.toIndex()
+							}
 						}, 500)
 						// #endif
 					}

+ 13 - 2
src/pages/login/index.vue

@@ -3,10 +3,21 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifndef MP-ALIPAY || H5 -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifdef H5 -->
+		<view v-if="$pagesNum() > 1">
+			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" />
+		</view>
+		<view v-else>
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="登录">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
 
 		<view class="flex login">
 			<view class="flex login-image">

+ 4 - 12
src/pages/ticketBox/detail.vue

@@ -1,12 +1,12 @@
 <template>
 	<view class="ticket-wrap">
 		<!-- #ifdef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票详情" leftIconSize="0"></u-navbar>
 		</view>
 		<view v-else>
 			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="盲票详情">
-				<view class="nav-left flex" slot="left" @click="toIndex">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
 					<u-icon name="home" size="20" color="#333"></u-icon>
 					<view class="nav-left__code">首页</view>
 				</view>
@@ -14,12 +14,12 @@
 		</view>
 		<!-- #endif -->
 		<!-- #ifndef MP-ALIPAY -->
-		<view v-if="pagesNum > 1">
+		<view v-if="$pagesNum() > 1">
 			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票详情"></u-navbar>
 		</view>
 		<view v-else>
 			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" title="盲票详情">
-				<view class="nav-left flex" slot="left" @click="toIndex">
+				<view class="nav-left flex" slot="left" @click="$toIndex()">
 					<u-icon name="home" size="20" color="#333"></u-icon>
 					<view class="nav-left__code">首页</view>
 				</view>
@@ -149,7 +149,6 @@
 
 				payShow: false,
 				payInfo: {},
-				pagesNum: null,
 				sceneArr: null,
 				
 				prizeIndex: 0,
@@ -237,7 +236,6 @@
 			if(this.loginState) {
 				this.getBaseInfo()
 			}
-			this.pagesNum = getCurrentPages().length
 			if (this.boxId && this.boxId != undefined) {
 				this.getDetail()
 			}
@@ -353,12 +351,6 @@
 				// 	url: `/packageOperate/share/index?boxId=${ this.info.boxId }`
 				// })
 			},
-
-			toIndex() {
-				uni.switchTab({
-					url: '/pages/index/index'
-				})
-			},
 			
 			// 点击规则说明
 			toRule() {

+ 12 - 0
src/utils/util.js

@@ -41,6 +41,18 @@ export function parseTime(time, pattern) {
 	return time_str
 }
 
+// 跳转首页
+export function toIndex() {
+	uni.switchTab({
+		url: `/pages/index/index`
+	})
+}
+
+// 获取当前页面的历史路径数量
+export function pagesNum() {
+	let pagesNum = getCurrentPages().length
+	return pagesNum
+}
 
 /**
  * 解决两个数相加精度丢失问题