Prechádzať zdrojové kódy

Merge branch 'dev' of http://43.143.46.76:3000/mangpiao/mp-ui-user into dev

m 1 rok pred
rodič
commit
ebc23c4b02
80 zmenil súbory, kde vykonal 26926 pridanie a 3939 odobranie
  1. 1 0
      .env.staging
  2. 19584 1
      package-lock.json
  3. 0 1
      package.json
  4. 6 1
      src/common/poster.js
  5. 6 0
      src/components/auth/auth.vue
  6. 1 1
      src/components/custom-tab-bar/custom-tab-bar.vue
  7. 40 16
      src/components/pay-popup/pay-popup.vue
  8. 4 2
      src/config/dev.js
  9. 2 1
      src/main.js
  10. 3 2
      src/manifest.json
  11. 45 9
      src/packageGoods/coupon/index.vue
  12. 15 1
      src/packageGoods/goods/company.vue
  13. 16 3
      src/packageGoods/goods/detail.vue
  14. 18 3
      src/packageGoods/goods/list.vue
  15. 28 6
      src/packageGoods/order/detail.vue
  16. 37 5
      src/packageGoods/order/index.vue
  17. 20 4
      src/packageGoods/order/logistics.vue
  18. 110 0
      src/packageGoods/order/payOrder.vue
  19. 35 3
      src/packageGoods/order/settlement.vue
  20. 19 6
      src/packageGoods/promoters/index.vue
  21. 15 1
      src/packageGoods/recovery/index.vue
  22. 198 173
      src/packageGoods/ticket/index.vue
  23. 37 17
      src/packageOperate/activity/index.vue
  24. 19 16
      src/packageOperate/activity/record.vue
  25. 27 3
      src/packageOperate/address/create.vue
  26. 17 3
      src/packageOperate/address/index.vue
  27. 7 7
      src/packageOperate/components/activity-help/activity-help.vue
  28. 0 0
      src/packageOperate/components/share-code/share-code.vue
  29. 194 0
      src/packageOperate/creator/index.vue
  30. 264 0
      src/packageOperate/exchange/index.vue
  31. 17 1
      src/packageOperate/process/index.vue
  32. 16 4
      src/packageOperate/share/index.vue
  33. BIN
      src/packageOperate/static/image1.png
  34. BIN
      src/packageOperate/static/phone.png
  35. 236 0
      src/packageOperate/store/index.vue
  36. 14 1
      src/packageOther/about/conceal.vue
  37. 19 5
      src/packageOther/about/index.vue
  38. 14 1
      src/packageOther/about/protect.vue
  39. 220 0
      src/packageOther/avatar/index.vue
  40. 14 1
      src/packageOther/rule/index.vue
  41. 14 1
      src/packageOther/rule/purchase.vue
  42. 18 2
      src/packagePrize/address/index.vue
  43. 164 0
      src/packagePrize/bean/components/transfer.vue
  44. 275 217
      src/packagePrize/bean/index.vue
  45. 892 690
      src/packagePrize/choice/index.vue
  46. 470 0
      src/packagePrize/components/hch-poster/hch-poster.vue
  47. 21 6
      src/packagePrize/coupon/detail.vue
  48. 16 2
      src/packagePrize/coupon/use.vue
  49. 291 252
      src/packagePrize/goods/detail.vue
  50. 61 19
      src/packagePrize/goods/index.vue
  51. 208 38
      src/packagePrize/prize/index.vue
  52. 214 0
      src/packagePrize/prize/redpkg.vue
  53. 20 4
      src/packagePrize/purchase/index.vue
  54. 13 4
      src/packagePrize/rolling/animation.vue
  55. 18 4
      src/packagePrize/rolling/index.vue
  56. BIN
      src/packagePrize/static/download1.png
  57. 23 4
      src/packagePrize/ticket/index.vue
  58. 24 2
      src/pages.json
  59. 8 2
      src/pages/activity/index.vue
  60. 967 939
      src/pages/core/index.vue
  61. 2 2
      src/pages/index/index -2022-7-15.vue
  62. 79 50
      src/pages/index/index.vue
  63. 137 0
      src/pages/index/payExternal.vue
  64. 50 6
      src/pages/login/code.vue
  65. 31 6
      src/pages/login/index.vue
  66. 722 590
      src/pages/lucky/index.vue
  67. 811 792
      src/pages/ticketBox/detail.vue
  68. 45 2
      src/pages/user/index.vue
  69. BIN
      src/static/index/barrage_bg.png
  70. BIN
      src/static/index/games.png
  71. BIN
      src/static/index/index_tip_bg.png
  72. BIN
      src/static/lucky/lucky_gkmp.png
  73. BIN
      src/static/lucky/zi.png
  74. BIN
      src/static/lucky/zioff.png
  75. BIN
      src/static/user/user_exchange.png
  76. BIN
      src/static/user/user_slice.png
  77. 3 3
      src/uni.scss
  78. 2 2
      src/utils/request.js
  79. 6 0
      src/utils/util.js
  80. 3 2
      vue.config.js

+ 1 - 0
.env.staging

@@ -3,3 +3,4 @@ NODE_ENV = staging
 
 # 盲票/测试环境
 VUE_APP_BASE_API = '/test-api'
+# VUE_APP_BASE_API = '/mptest'

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 19584 - 1
package-lock.json


+ 0 - 1
package.json

@@ -69,7 +69,6 @@
     "@dcloudio/uni-stat": "^2.0.1-34720220422002",
     "@vue/shared": "^3.0.0",
     "core-js": "^3.6.5",
-    "flyio": "^0.6.2",
     "mini-html-parser2": "^0.3.0",
     "regenerator-runtime": "^0.12.1",
     "uview-ui": "^2.0.31",

+ 6 - 1
src/common/poster.js

@@ -72,7 +72,12 @@ export function drawSquarePic(ctx, x, y, w, h, r, url, color) {
  * @author: hch
  */
 export function getSystem() {
-  let system = wx.getSystemInfoSync()
+	// #ifdef H5
+	let system = uni.getSystemInfoSync()
+	// #endif
+	// #ifndef H5
+	let system = wx.getSystemInfoSync()
+	// #endif
   let scale = system.windowWidth / 375 //按照苹果留 375*667比例 其他型号手机等比例缩放 显示
   return { w: system.windowWidth, h: system.windowHeight, scale: scale }
 }

+ 6 - 0
src/components/auth/auth.vue

@@ -68,6 +68,12 @@
 								}).catch(() => {
 									_this.authIng = false
 								})
+							},
+							fail: (res) => {
+								uni.$u.toast('授权失败');
+								uni.removeStorageSync('token')
+								_this.authIng = false
+								_this.$emit('fail')
 							}
 						})
 					},

+ 1 - 1
src/components/custom-tab-bar/custom-tab-bar.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-tabbar :value="activeValue" @change="changeTabbar" zIndex="999" :fixed="true" activeColor="#E96737" :placeholder="true"
+		<u-tabbar :value="activeValue" @change="changeTabbar" zIndex="999" :fixed="true" activeColor="#F9822C" :placeholder="true"
 			:safeAreaInsetBottom="true">
 			<u-tabbar-item :text="item.text" :name="item.name" v-for="(item, index) in list" :key="index">
 				<image class="icon" slot="active-icon" :src="item.selectedIconPath"></image>

+ 40 - 16
src/components/pay-popup/pay-popup.vue

@@ -14,7 +14,7 @@
 					</view>
 				</view>
 				<!-- 推广员信息 -->
-				<view class="flex coupon" @click="toPromoters" v-if="promoterNum > 0">
+				<view class="flex coupon" @click="toPromoters" v-if="promoterNum > 0">
 					<view class="flex coupon-left">
 						<image src="../../static/public/promoter.png" mode="scaleToFill"></image>
 						<view class="txt">盲票天使</view>
@@ -61,19 +61,18 @@
 				</view>
 			</view>
 		</u-popup>
-
-		<auth :auth-show="authShow" @close="authShow = false" />
+		<auth :auth-show="authShow" @close="authShow = false" />
 	</view>
 </template>
 
 <script>
 	import $http from '@/utils/request.js'
 	import appId from '@/config/appId.js'
-	import Auth from '../../components/auth/auth.vue'
+	import Auth from '../../components/auth/auth.vue'
 	export default {
 		name: "pay-popup",
 		components: {
-			Auth
+			Auth,
 		},
 		props: {
 			payShow: {
@@ -95,16 +94,17 @@
 					name: "", //名字
 					workNo: "" //工号
 				},
-				promoterNum: 0, //推广员
+				promoterNum: 0, //推广员
+				siteId: "", // 门店id
 			};
 		},
 		created() {
 			if (this.payInfo.promoter) {
 				this.promoters = this.payInfo.promoter
 			}
-			this.getTotal()
-			if(this.payInfo.channelId) {
-				this.getPromoterNum()
+			this.getTotal()
+			if (this.payInfo.channelId) {
+				this.getPromoterNum()
 			}
 		},
 		mounted() {
@@ -128,7 +128,7 @@
 					channelId: this.payInfo.channelId,
 				}).then(res => {
 					if (res.code == 0) {
-						this.promoterNum = res.total
+						this.promoterNum = res.total
 					}
 				}).catch(() => {})
 			},
@@ -148,10 +148,16 @@
 				})
 			},
 
-			toCoupon() {
-				uni.navigateTo({
-					url: `/packageGoods/coupon/index?couponId=${ this.payInfo.couponId }&boxId=${ this.payInfo.boxId }&ticketId=${ this.payInfo.ticketId }`
-				})
+			toCoupon() {
+				if(this.payInfo && this.payInfo.siteId){
+					uni.navigateTo({
+						url: `/packageGoods/coupon/index?channelId=${ this.payInfo.channelId }&couponId=${ this.payInfo.couponId }&boxId=${ this.payInfo.boxId }&ticketId=${ this.payInfo.ticketId }&siteId=${ this.payInfo.siteId }`
+					})
+				}else{
+					uni.navigateTo({
+						url: `/packageGoods/coupon/index?channelId=${ this.payInfo.channelId }&couponId=${ this.payInfo.couponId }&boxId=${ this.payInfo.boxId }&ticketId=${ this.payInfo.ticketId }`
+					})
+				}
 			},
 
 			toRule() {
@@ -195,13 +201,20 @@
 								appSource: appId
 							}
 							// #endif
-							// #ifndef MP-ALIPAY
+							// #ifdef MP-WEIXIN
 							let data = {
 								orderId: res.data.orderId,
 								payType: 2,
 								appSource: appId
 							}
 							// #endif
+							// #ifdef H5
+							let data = {
+								orderId: res.data.orderId,
+								payType: 3,
+								appSource: appId
+							}
+							// #endif
 							$http.post('/api/v1/mp/user/ticket/order/pay', data).then(ele => {
 								if (ele.code == 0) {
 									// #ifdef MP-ALIPAY
@@ -226,7 +239,7 @@
 										}
 									})
 									// #endif
-									// #ifndef MP-ALIPAY
+									// #ifdef MP-WEIXIN
 									uni.requestPayment({
 										timeStamp: ele.data.timeStamp,
 										nonceStr: ele.data.nonceStr,
@@ -247,6 +260,17 @@
 										}
 									})
 									// #endif
+									// #ifdef H5
+									let data = ele.data
+									_this.close()
+									sessionStorage.setItem('viewUrlData', JSON.stringify(data))
+									uni.navigateTo({
+										url: `/pages/index/payExternal?orderId=${ res.data.orderId }`
+									})
+									// uni.navigateTo({
+									// 	url: `/pages/index/payExternal?viewUrl=${ encodeURIComponent(JSON.stringify(data)) }&orderId=${ res.data.orderId }`
+									// })
+									// #endif
 
 								} else if (ele.code == 1005) {
 									_this.authShow = true

+ 4 - 2
src/config/dev.js

@@ -1,10 +1,12 @@
 export default {
   env: "dev",
   // #ifndef H5
-  apiBase: "https://test-mp.quanshu123.com",
+  // apiBase: "https://test-mp.quanshu123.com",
+  // apiBase: "https://mptest.kaimanghe.net",
+  apiBase: "https://test-mp-h5.kaimanghe.net",
   // #endif
   // #ifdef H5
   apiBase: process.env.VUE_APP_BASE_API,
   // #endif
-  filePublic: "https://mp-public-test-1307117429.cos.ap-shanghai.myqcloud.com/"
+  filePublic: "https://mp-public-test-1309783959.cos.ap-shanghai.myqcloud.com/"
 }

+ 2 - 1
src/main.js

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

+ 3 - 2
src/manifest.json

@@ -58,7 +58,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx8533800e393dbd6b",
+        "appid" : "wxffb4598e70b9f871",
         "setting" : {
             "urlCheck" : false,
             "es6" : true,
@@ -68,7 +68,8 @@
         "optimization" : {
             "subPackages" : true
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+				"requiredPrivateInfos": ["chooseAddress"]
     },
     "mp-alipay" : {
         "usingComponents" : true,

+ 45 - 9
src/packageGoods/coupon/index.vue

@@ -4,16 +4,28 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
-			<u-radio-group v-model="radiovalue1" placement="column" @change="changeChechk()">
+			<!-- <u-radio-group v-model="radiovalue1" placement="column" @change="changeChechk($event)"> -->
 				<view class="flex coupon-list-item" v-for="(item,index) in list" :key="index"
-					:style="{backgroundImage:`url(${ index == isActive ? backOn : backOff })`}">
-					<view class="flex coupon-list-item-info">
+					:style="{backgroundImage:`url(${ index == isActive ? backOn : backOff })`}" @click="changeChechk(item.id)">
+					<view class="flex coupon-list-item-info" @click="exclusive(index)">
 						<view class="money">
 							<!-- <view class="">¥<text>{{ item.discount / 100 }}</text></view> -->
 							<view class="price flex">
@@ -29,15 +41,25 @@
 							</view>
 						</view>
 					</view>
-					<view class="uradio">
-						<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.id" activeColor="#E96737" size="24"
+					<view class="uradio" @click="exclusive(index)">
+						<view class="" style="background-color: #F9822C;width: 24px;height: 24px;border-radius: 50%;" v-if="index == isActive">
+							<div style="display: inline-block;margin: 4px;">
+								<u-icon name="checkbox-mark" color="#fff" size="16"></u-icon>
+							</div>
+						</view>
+						<view class="" style="background-color: rgb(200, 201, 204);width: 24px;height: 24px;border-radius: 50%;" v-else>
+							<div style="display: inline-block;margin: 4px;">
+								<u-icon name="checkbox-mark" color="#fff" size="16"></u-icon>
+							</div>
+						</view>
+						<!-- <u-radio :customStyle="{ marginBottom: '8px' }" :name="item.id" activeColor="#F9822C" size="24"
 							@change="exclusive(index)">
-						</u-radio>
+						</u-radio> -->
 					</view>
 				</view>
 				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'"
 					:nomore-text="'已经到底了'" />
-			</u-radio-group>
+			<!-- </u-radio-group> -->
 		</view>
 
 		<view class="flex empty" v-if="!list.length">
@@ -80,10 +102,13 @@
 				isActive: undefined,
 				backOn: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/coupon_bkg2.png",
 				backOff: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/coupon_bkg1.png",
-
+				channelId: '',
+				pagesNum: '',
+				siteId: '',
 			};
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.pageList()
 			this.exclusive()
 		},
@@ -94,9 +119,13 @@
 				this.ticketId = opthios.ticketId
 			}
 			if (opthios.couponId) {
+				this.channelId = opthios.channelId
 				this.couponId = opthios.couponId
 				this.radiovalue1 = opthios.couponId
 			}
+			if(opthios.siteId){
+				this.siteId = opthios.siteId
+			}
 		},
 		methods: {
 			pageList() {
@@ -154,12 +183,16 @@
 					orderNum: 1,
 					appSource: appId
 				}
+				if( this.siteId ){
+					data.siteId = this.siteId
+				}
 				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
 					if (res.code == 0) {
 						let pages = getCurrentPages()
 						let page = pages[pages.length - 2]
 						let payInfo = {
 							...res.data,
+							channelId: this.channelId,
 							picUrl: env.filePublic + res.data.picUrl.split(',')[0],
 							couponDiscount: res.data && res.data.couponList && res.data.couponList.length &&
 								res
@@ -168,6 +201,9 @@
 								.couponList[0].id,
 							listNum: this.listNum
 						}
+						if(this.siteId){
+							payInfo.siteId = this.siteId
+						}
 						page.$vm.payInfo = payInfo
 						uni.navigateBack({
 							delta: 1

+ 15 - 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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="商家信息" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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>
@@ -22,12 +34,14 @@
 				merchantInfo: [],
 				goodsId:'',
 				data:[],
+				pagesNum: '',
 			}
 		},
 		onLoad(opthios) {
 			this.goodsId = opthios.goodsId
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.getDetail()
 		},
 		methods: {

+ 16 - 3
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="商品详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
-		
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -135,13 +146,15 @@
 				tipShow: false,
 				
 				exchangePopupShow: false,
-				purchasePopupShow: false
+				purchasePopupShow: false,
+				pagesNum: '',
 			};
 		},
 		onLoad(opthios) {
 			this.goodsId = opthios.id
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.getDetail()
 			if(uni.getStorageSync('token')) {
 				this.getBean()

+ 18 - 3
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :title="name" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
 			<!-- 搜索 -->
@@ -88,10 +100,13 @@
 				choiceIndex: 1,
 				priceSort: null,
 				saleSort: null,
-				priceShow: false
+				priceShow: false,
+				pagesNum: '',
 			};
 		},
-		
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(opthios) {
 			this.title = opthios.title
 			if(opthios.name) {

+ 28 - 6
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="订单详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -37,8 +49,8 @@
 		<view class="goods">
 			<view class="goods-title">商品信息</view>
 			<view class="goods-item" v-for="(item, index) in list" :key="index">
-				<image :src="item.picUrl" mode="aspectFit"></image>
-				<view class="info">
+				<image :src="item.picUrl" mode="aspectFit" @click="toGoodsDetail(item)"></image>
+				<view class="info" @click="toGoodsDetail(item)">
 					<view class="info-title ells">{{ item.title }}</view>
 					<view class="info-num flex">
 						<view class="info-num-sku ells-one" v-if="info.type === 1">规格:{{ item.properties || '-' }}</view>
@@ -133,9 +145,9 @@
 		</view>
 
 		<!-- 操作按钮 -->
-		<view class="footer-fixed" v-if="status.value == 2 || status.value == 3 || status.value == 0">
+		<view class="footer-fixed" v-if="status.value == 4 || status.value == 2 || status.value == 3 || status.value == 0">
 			<view class="btn flex">
-				<view class="btn-item flex logistics" v-if="status.value == 2 || status.value == 3 && info.type === 1"
+				<view class="btn-item flex logistics" v-if="status.value == 4 || status.value == 2 || status.value == 3 && info.type === 1"
 					@click="getLogistics"><text>查看物流</text></view>
 				<view class="btn-item flex pay" v-if="status.value == 2" @click="confirmOne"><text>确认收货</text></view>
 				<view class="btn-item flex cancel" v-if="status.value == 0" @click="cancelOrder"><text>取消订单</text>
@@ -166,8 +178,12 @@
 				list: [],
 				deliverList: [],
 				autoConfirmTime: '',
-				authShow: false,
+				authShow: false,
+				pagesNum: '',
 			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
 		},
 		onLoad(opthios) {
 			this.orderId = opthios.id
@@ -200,6 +216,12 @@
 				}).catch(() => {
 					uni.hideLoading();
 				})
+			},
+			
+			toGoodsDetail(item) {
+				uni.navigateTo({
+					url: `/packagePrize/goods/detail?id=${ item.goodsId }`
+				})
 			},
 
 			cancelOrder() {

+ 37 - 5
src/packageGoods/order/index.vue

@@ -3,14 +3,26 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="我的订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0"/>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="我的订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
 				<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="20" lineHeight="4"
-					lineColor="#E96737" :activeStyle="{
+					lineColor="#F9822C" :activeStyle="{
 										color: '#333',
 										transform: 'scale(1.1)',
 										width: '50px',
@@ -46,7 +58,7 @@
 						<view class="order-list-item-price__total">总金额:<text>¥</text><text>{{ $numberFormat(item.payAmt) }}</text></view>
 					</view>
 					<view class="order-list-item-btn flex">
-						<view class="order-list-item-btn-item flex logistics" v-if="item.status.value == 2 || item.status.value == 3 && item.type === 1" @click="toLogistics(item)"><text>查看物流</text></view>
+						<view class="order-list-item-btn-item flex logistics" v-if="item.status.value == 4 || item.status.value == 2 || item.status.value == 3 && item.type === 1" @click="toLogistics(item)"><text>查看物流</text></view>
 						<view class="order-list-item-btn-item flex cancel" v-if="item.status.value == 0" @click="cancelOrder(item.orderId)"><text>取消订单</text></view>
 						<view class="order-list-item-btn-item flex detail" @click="toDetail(item)"><text>查看详情</text></view>
 						<view class="order-list-item-btn-item flex pay"v-if="item.status.value == 0"  @click="payOrder(item)"><text>去支付</text></view>
@@ -96,10 +108,12 @@
 					name: '已完成'
 				}, ],
 				authShow: false,
+				pagesNum: '',
 			};
 		},
 		onLoad(opthios) {},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.pageList()
 		},
 		methods: {
@@ -179,13 +193,20 @@
 					appSource: appId 
 				}
 				// #endif
-				// #ifndef MP-ALIPAY
+				// #ifdef MP-WEIXIN
 				let data = {
 					orderId: item.orderId,
 					payType: 2,
 					appSource: appId
 				}
 				// #endif
+				// #ifdef H5
+				let data = {
+					orderId: item.orderId,
+					payType: 3,
+					appSource: appId
+				}
+				// #endif
 				$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
 					uni.hideLoading();
 					payIng = true
@@ -210,7 +231,7 @@
 							}
 						})
 						// #endif
-						// #ifndef MP-ALIPAY
+						// #ifdef MP-WEIXIN
 						uni.requestPayment({
 							timeStamp: ele.data.timeStamp,
 							nonceStr: ele.data.nonceStr,
@@ -230,6 +251,17 @@
 							}
 						})
 						// #endif
+						// #ifdef H5
+						let data = ele.data
+						sessionStorage.setItem('viewUrlData', JSON.stringify(data))
+						uni.redirectTo({
+							url: `/packageGoods/order/payOrder?orderId=${ item.orderId }`
+						})
+						// uni.redirectTo({
+						// 	url: `/packageGoods/order/payOrder?viewUrl=${ encodeURIComponent(JSON.stringify(data)) }&orderId=${ item.orderId }`
+						// })
+						// #endif
+						
 					} else if (ele.code == 1005) {
 						_this.authShow = true
 					} else if (ele.code == 1026) {

+ 20 - 4
src/packageGoods/order/logistics.vue

@@ -3,13 +3,25 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar title="物流详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="物流详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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"
-				lineColor="#E96737" :activeStyle="{
+				lineColor="#F9822C" :activeStyle="{
 									color: '#333',
 									transform: 'scale(1.1)',
 									width: '50px',
@@ -61,7 +73,7 @@
 			<!-- #endif -->
 			<!-- #ifndef MP-ALIPAY -->
 			<u-steps current="0" direction="column" dot activeColor="#F9822C">
-				<u-steps-item :desc="item.desc" :title="item.title" v-for="(item,index) in logistics">
+				<u-steps-item :desc="item.desc" :title="item.title" v-for="(item,index) in logistics" :key="index">
 				</u-steps-item>
 			</u-steps>
 			<!-- #endif -->
@@ -98,9 +110,13 @@
 				ListData: [],
 				listIndex: 0,
 				logistics: '',
-				packList: []
+				packList: [],
+				pagesNum: '',
 			}
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(opthios) {
 			this.orderId = opthios.id
 			this.getDetail()

+ 110 - 0
src/packageGoods/order/payOrder.vue

@@ -0,0 +1,110 @@
+<template>
+	<view class="">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="支付中" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="支付中"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<view v-if="pagesNum > 1">
+			<!-- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="支付中" /> -->
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :border="true" title="支付中">
+				<view class="nav-left flex" slot="left" @click="toOrder()">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</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 -->
+		<!-- <web-view :src='info'></web-view> -->
+		<view class="btn" v-if="paystatus == 0">
+			<u-button class="btn1" @click="openPay(1)" text="前往第三方支付" shape="circle"></u-button>
+		</view>
+		<view class="btn" v-else>
+			<u-button class="btn1" @click="toOrder" text="前往订单列表页查看" shape="circle"></u-button>
+			<u-button class="btn2" @click="openPay(2)" text="还未支付,前往第三方支付" shape="circle"></u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				info: 'https://openapi.ysepay.com/gateway.do?',
+				pagesNum: '',
+				orderId: '',
+				paystatus: 0,
+			}
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.paystatus = sessionStorage.getItem('paystatus') ? 1 : 0
+		},
+		onLoad(opthios) {
+			if(opthios.orderId){
+				this.orderId = opthios.orderId
+			}
+			
+			let data = sessionStorage.getItem('viewUrlData')
+			data = JSON.parse(data)
+			Object.keys(data).forEach(item=>{
+				this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
+			})
+			
+			// if(opthios.viewUrl){
+			// 	let data = JSON.parse(decodeURIComponent(opthios.viewUrl))
+			// 	Object.keys(data).forEach(item=>{
+			// 		this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
+			// 	})
+			// }
+			// location.href =  this.info
+			// window.open(this.info);
+		},
+		onUnload() {
+			sessionStorage.removeItem('paystatus');
+			sessionStorage.removeItem('viewUrlData');
+		},
+		methods: {
+			openPay(e) {
+				if(e == 1){
+					sessionStorage.setItem('paystatus', '1');
+					window.open(this.info);
+				}else{
+					window.open(this.info);
+				}
+			},
+			toOrder() {
+				uni.redirectTo({
+					url: `/packageGoods/order/index`
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.btn {
+	 margin: 156rpx 41rpx 0 41rpx;
+	 .btn1 {
+		 background: linear-gradient(180deg, #FEA052 0%, #FF8D2F 100%);
+		 border-radius: 2px;
+		 color: #FFFFFF;
+	 }
+	 .btn2 {
+		 margin-top: 51rpx;
+		 border-radius: 2px;
+		 background-color: #EFEFEF;
+		 color: #666666;
+	 }
+}
+</style>

+ 35 - 3
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="提交订单" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
 				<!-- 选择地址、获取微信地址 -->
@@ -153,6 +165,7 @@
 				wxAddress: {},
 				payment: '',
 				authShow: false,
+				pagesNum: '',
 			}
 		},
 		onLoad(opthios) {
@@ -171,6 +184,7 @@
 			}
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			if (this.toAddressShow) {
 				this.getDetail()
 			}
@@ -199,13 +213,20 @@
 								appSource: appId 
 							}
 							// #endif
-							// #ifndef MP-ALIPAY
+							// #ifdef MP-WEIXIN
 							let data = {
 								orderId: res.data.orderId,
 								payType: 2,
 								appSource: appId
 							}
 							// #endif
+							// #ifdef H5
+							let data = {
+								orderId: res.data.orderId,
+								payType: 3,
+								appSource: appId
+							}
+							// #endif
 							$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
 								if (ele.code == 0) {
 									// #ifdef MP-ALIPAY
@@ -244,7 +265,7 @@
 									})
 									// #endif
 									
-									// #ifndef MP-ALIPAY
+									// #ifdef MP-WEIXIN
 									uni.requestPayment({
 										timeStamp: ele.data.timeStamp,
 										nonceStr: ele.data.nonceStr,
@@ -274,6 +295,17 @@
 									})
 									// #endif
 									
+									// #ifdef H5
+									let data = ele.data
+									sessionStorage.setItem('viewUrlData', JSON.stringify(data))
+									uni.redirectTo({
+										url: `/packageGoods/order/payOrder?orderId=${ res.data.orderId }`
+									})
+									// uni.redirectTo({
+									// 	url: `/packageGoods/order/payOrder?viewUrl=${ encodeURIComponent(JSON.stringify(data)) }&orderId=${ res.data.orderId }`
+									// })
+									// #endif
+									
 								} else if (ele.code == 1005) {
 									_this.authShow = true
 								} else if (ele.code == 1026) {

+ 19 - 6
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择盲票天使"></u-navbar>
 		<!-- #endif -->
-
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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>
@@ -19,7 +30,7 @@
 						<text>工号:{{item.workNo}}</text>
 					</view>
 					<view class="uradio">
-						<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.channelId" activeColor="#E96737"
+						<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.channelId" activeColor="#F9822C"
 							size="24">
 						</u-radio>
 					</view>
@@ -50,10 +61,12 @@
 				channelId: '', //选中项的id
 				id: '', //门店的channelId
 				status: 'nomore', //上拉刷新状态
-				searchValue: '', //搜索
+				searchValue: '', //搜索
+				pagesNum: '',
 			};
 		},
-		onShow() {
+		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.pageList()
 		},
 		onLoad(opthios) {
@@ -142,7 +155,7 @@
 
 		&-list {
 			margin-top: 110rpx;
-
+			padding-bottom: 200rpx;
 
 			&-item {
 				justify-content: space-between;

+ 15 - 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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="兑换"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -61,6 +73,7 @@
 				list: [],
 				value: '',
 				recovery: {},
+				pagesNum: '',
 			}
 		},
 		onLoad(opthios) {
@@ -79,6 +92,7 @@
 			}
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.getDetail()
 		},
 		methods: {

+ 198 - 173
src/packageGoods/ticket/index.vue

@@ -1,174 +1,199 @@
-<template>
-	<view>
-		<!-- #ifdef MP-ALIPAY -->
-		<!-- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0"> -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表" leftIconSize="0">
-		</u-navbar>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表"></u-navbar>
-		<!-- #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"
-					hover-class="navigator-hover" v-for="(item, index) in list" :key="index"> -->
-				<navigator :url="JSON.parse(item.refType).value === 'goods' ? `/packagePrize/goods/index?id=${ item.refId }&boxId=${ item.boxId }`:JSON.parse(item.refType).value === 'coin' ?`/packagePrize/goods/index?id=424`:`/packagePrize/goods/index?id=425`" class="flex ticket-box-list-item"
-					hover-class="navigator-hover" v-for="(item, index) in list" :key="index">
-					<image :src="item.picUrl" mode="aspectFill"></image>
-					<view class="info">
-						<!-- #ifdef MP-ALIPAY -->
-						<view class="titletwo">{{ item.title }}</view>
-						<!-- #endif -->
-						<!-- #ifndef MP-ALIPAY -->
-						<view class="titletwo">{{ item.title }}</view>
-						<!-- #endif -->
-
-						<view class="price">¥{{ $numberFormat(item.salePrice) }}</view>
-					</view>
-				</navigator>
-				<view style="width: 100%;">
-					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'"
-						:nomore-text="'已经到底了'" />
-				</view>
-			</view>
-			<view class="flex empty" v-if="!list.length">
-				<view class="center">
-					<image class="center-img"
-						src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png"
-						mode="scaleToFill"></image>
-					<view class="center-font">还没有商品</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	export default {
-		data() {
-			return {
-				status: 'nomore', //上拉刷新状态
-				pageNum: 1,
-				total: 0,
-				list: [],
-				ids: [],
-			};
-		},
-		onLoad(options) {
-			if (options.ids) {
-				this.ids = JSON.parse(options.ids)
-			}
-			this.getList()
-		},
-		methods: {
-			getList() {
-				let data = {
-					categoryId: '',
-					tagId: '',
-					type: 'online',
-					noToken: true,
-					boxIds: this.ids,
-					salePriceSort: 1,
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<!-- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="盲票列表" leftIconSize="0"> -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表" leftIconSize="0">
+		</u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品列表"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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"
+					hover-class="navigator-hover" v-for="(item, index) in list" :key="index"> -->
+				<navigator @click="couponStorage(item)"
+					:url="JSON.parse(item.refType).value === 'goods' ? `/packagePrize/goods/index?id=${ item.refId }&boxId=${ item.boxId }`:JSON.parse(item.refType).value === 'coin' ?`/packagePrize/goods/index?id=424&boxId=${ item.boxId }`:`/packagePrize/goods/index?id=425&boxId=${ item.boxId }`"
+					class="flex ticket-box-list-item" hover-class="navigator-hover" v-for="(item, index) in list" :key="index">
+					<image :src="item.picUrl" mode="aspectFill"></image>
+					<view class="info">
+						<!-- #ifdef MP-ALIPAY -->
+						<view class="titletwo">{{ item.title }}</view>
+						<!-- #endif -->
+						<!-- #ifndef MP-ALIPAY -->
+						<view class="titletwo">{{ item.title }}</view>
+						<!-- #endif -->
+
+						<view class="price">¥{{ $numberFormat(item.salePrice) }}</view>
+					</view>
+				</navigator>
+				<view style="width: 100%;">
+					<u-loadmore :line="true" v-if="list.length>8" :status="status" :loading-text="'努力加载中'"
+						:nomore-text="'已经到底了'" />
+				</view>
+			</view>
+			<view class="flex empty" v-if="!list.length">
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png"
+						mode="scaleToFill"></image>
+					<view class="center-font">还没有商品</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				status: 'nomore', //上拉刷新状态
+				pageNum: 1,
+				total: 0,
+				list: [],
+				ids: [],
+				pagesNum: '',
+			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
+		onLoad(options) {
+			if (options.ids) {
+				this.ids = JSON.parse(options.ids)
+			}
+			this.getList()
+		},
+		methods: {
+			getList() {
+				let data = {
+					categoryId: '',
+					tagId: '',
+					type: 'online',
+					noToken: true,
+					boxIds: this.ids,
+					salePriceSort: 1,
 				}
-				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
-					res => {
-						if (res.code == 0) {
-							res.rows.forEach(item => {
-								let picUrlArr = item.picUrl.split(',')
-								item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/750'
-							})
-							this.total = res.total
-							this.list = this.list.concat(res.rows)
-						}
-					}).catch(() => {
-				})
-			},
-		},
-
-		onReachBottom() {
-			if (this.total < this.pageNum * 20) return;
-			this.status = 'loading';
-			++this.pageNum
-			if (this.total < this.pageNum * 20) this.status = 'nomore';
-			else this.status = 'loading';
-			this.getList()
-		},
-	}
-</script>
-
-<style lang="scss">
-	.ticket-box {
-		margin: 34rpx 0;
-
-		&-list {
-			justify-content: space-between;
-			padding: 0 34rpx;
-			flex-wrap: wrap;
-			padding-bottom: 100rpx;
-
-			&-item {
-				flex-direction: column;
-				box-sizing: border-box;
-				padding: 12rpx;
-				width: 330rpx;
-				border-radius: 22rpx;
-				margin-bottom: 34rpx;
-				background-color: #FFFFFF;
-
-				image {
-					width: 300rpx;
-					height: 240rpx;
-					border-radius: 22rpx;
-					margin-bottom: 34rpx;
-				}
-
-				.info {
-					width: 100%;
-				}
-
-				.titletwo {
-					width: 100%;
-					line-height: 40rpx;
-					height: 40rpx;
-					font-size: 36rpx;
-					font-weight: bold;
-					white-space: nowrap;
-					overflow: hidden;
-					text-overflow: ellipsis;
-				}
-
-				.price {
-					font-size: 26rpx;
-					font-weight: bold;
-					margin-top: 20rpx;
-					color: #FF4208;
-					line-height: 42rpx;
-					margin-bottom: 24rpx;
-				}
-			}
-
-		}
-
-		.empty {
-			height: 50vh;
-
-			.center {
-				text-align: center;
-
-				&-img {
-					width: 228rpx;
-					height: 320rpx;
-				}
-
-				&-font {
-					font-size: 30rpx;
-					font-weight: 400;
-					color: #999999;
-					margin-bottom: 250rpx;
-				}
-			}
-		}
-	}
-</style>
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
+				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
+					res => {
+						if (res.code == 0) {
+							res.rows.forEach(item => {
+								let picUrlArr = item.picUrl.split(',')
+								item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/750'
+							})
+							this.total = res.total
+							this.list = this.list.concat(res.rows)
+						}
+					}).catch(() => {})
+			},
+			couponStorage(item) {
+				if (item.refType && JSON.parse(item.refType).value === 'coupon' || JSON.parse(item.refType).value === 'coupon_pkg') {
+					if (item.couponDetail) {
+						uni.setStorageSync('couponDetail', item.couponDetail);
+					}
+				}
+			}
+		},
+
+		onReachBottom() {
+			if (this.total < this.pageNum * 20) return;
+			this.status = 'loading';
+			++this.pageNum
+			if (this.total < this.pageNum * 20) this.status = 'nomore';
+			else this.status = 'loading';
+			this.getList()
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.ticket-box {
+		margin: 34rpx 0;
+
+		&-list {
+			justify-content: space-between;
+			padding: 0 34rpx;
+			flex-wrap: wrap;
+			padding-bottom: 100rpx;
+
+			&-item {
+				flex-direction: column;
+				box-sizing: border-box;
+				padding: 12rpx;
+				width: 330rpx;
+				border-radius: 22rpx;
+				margin-bottom: 34rpx;
+				background-color: #FFFFFF;
+
+				image {
+					width: 300rpx;
+					height: 240rpx;
+					border-radius: 22rpx;
+					margin-bottom: 34rpx;
+				}
+
+				.info {
+					width: 100%;
+				}
+
+				.titletwo {
+					width: 100%;
+					line-height: 40rpx;
+					height: 40rpx;
+					font-size: 36rpx;
+					font-weight: bold;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+
+				.price {
+					font-size: 26rpx;
+					font-weight: bold;
+					margin-top: 20rpx;
+					color: #FF4208;
+					line-height: 42rpx;
+					margin-bottom: 24rpx;
+				}
+			}
+
+		}
+
+		.empty {
+			height: 50vh;
+
+			.center {
+				text-align: center;
+
+				&-img {
+					width: 228rpx;
+					height: 320rpx;
+				}
+
+				&-font {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #999999;
+					margin-bottom: 250rpx;
+				}
+			}
+		}
+	}
+</style>

+ 37 - 17
src/packageOperate/activity/index.vue

@@ -56,13 +56,13 @@
 			</view>
 
 			<!-- 一等奖 -->
-			<view v-for="(item,index) in awardsList" :key="index">
-				<view class="wrap-fixed" v-for="(itemTwo,index) in item.prizeList" :key="index"
+			<view v-for="(item,index) in awardsList" :key="item.id">
+				<view class="wrap-fixed" v-for="(itemTwo,index1) in item.prizeList" :key="index1"
 					v-if="item.name == '一等奖'">
 					<view class="wrap-fixed-effectstwo">
 						<view class="effectsthree">
-							<navigator
-								:url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
+							<navigator @click="couponStorage(itemTwo)"
+								:url="itemTwo.prizeType && JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
 								hover-class="none">
 								<view class="effectsthree-width">
 									<image src="../static/activity/effectsthree.png" mode="aspectFit"></image>
@@ -104,9 +104,9 @@
 							</view>
 							<view class="effectsthree-position">{{item.quantity}}个名额 </view>
 							<view style="padding-top: 120rpx;"></view>
-							<view class="effectsthree-positionTwo" v-for="(itemTwo,index) in item.prizeList"
-								:key="index">
-								<navigator
+							<view class="effectsthree-positionTwo" v-for="(itemTwo,index1) in item.prizeList"
+								:key="index1">
+								<navigator @click="couponStorage(itemTwo)"
 									:url="JSON.parse(itemTwo.prizeType).value == 'goods' ? `/packagePrize/goods/detail?id=${ itemTwo.refId }`:JSON.parse(itemTwo.prizeType).value == 'coin' ?`/packagePrize/goods/detail?id=424`:`/packagePrize/goods/detail?id=425`"
 									hover-class="none">
 									<view class="flex justify">
@@ -127,7 +127,7 @@
 								</navigator>
 							</view>
 						</view>
-						<view v-if="item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
+						<view v-if="item.prizeList && item.prizeList.length > 1 " class="wrap-award-explain">以上奖品随机获得一件</view>
 					</view>
 				</view>
 			</view>
@@ -137,8 +137,8 @@
 			<!-- 抽奖码 -->
 			<view class="wrap-description">
 				<view class="wrap-description-code"> 我的抽奖码</view>
-				<view v-if="info.codeList.length > 0" class="wrap-description-codetwo">
-					<view class="codeList" v-for="(item,index) in info.codeList">
+				<view v-if="info.codeList && info.codeList.length > 0" class="wrap-description-codetwo">
+					<view class="codeList" v-for="(item,index) in info.codeList" :key="index">
 						<view class="codeList-bottom">{{item}}</view>
 					</view>
 				</view>
@@ -198,8 +198,8 @@
 		<view class="footer-fixed">
 			<view class="flex btn">
 				<button type="default" v-if="info.codeType == 1 && info.codeList.length < 1"
-					@click="exChangeCode">立即参与抽奖</button>
-				<button type="default" class="buttoncol" v-else>请在微信“码上快购”小程序分享助力</button>
+					@click="exChangeCodeH5">立即参与抽奖</button>
+				<button type="default" @click="toWeChatProgram" class="buttoncol" v-else>请在微信“码上快购”小程序分享助力</button>
 			</view>
 		</view>
 		<!-- #endif -->
@@ -239,7 +239,7 @@
 	import $http from '@/utils/request.js'
 	import log from '@/common/log.js'
 	import appId from '@/config/appId.js'
-	import ActivityHelp from '@/components/activity-help/activity-help.vue'
+	import ActivityHelp from '../components/activity-help/activity-help.vue'
 	import {
 		formatRichText
 	} from '@/utils/util.js'
@@ -258,12 +258,11 @@
 				inviteCode: '', //邀请码
 				activityTime: 0,
 				activityTimeTwo: 0,
-				pagesNum: "",
 				activityShow: false, //助力邀请弹框
 				inviteCodeTa: '', //邀请码
 				marketingId: '', //活动id
 				userInfo: '', //uid
-
+				pagesNum: '',
 			}
 		},
 		onLoad(opthios) {
@@ -390,6 +389,16 @@
 				})
 				this.exChange()
 			},
+			exChangeCodeH5() {
+				$http.post(`/api/v1/mp/user/marketing/generateCode/${this.id}`, {}).then(res => {
+					if (res.code == 0) {
+						this.getDetail()
+						setTimeout(() => {
+							uni.$u.toast('参与成功,您已获得1个抽奖码');
+						}, 500)
+					}
+				})
+			},
 			close() {
 				//弹出层收起
 				// this.popupShow = false
@@ -404,6 +413,18 @@
 					url: `/packageOperate/activity/wxofficial`
 				})
 			},
+			
+			//跳转微信小程序
+			toWeChatProgram() {
+				// location.href = 'weixin://dl/business/?t=xxxxxx'
+			},
+			couponStorage(item) {
+				if (item.prizeType && JSON.parse(item.prizeType).value === 'coupon' || JSON.parse(item.prizeType).value === 'coupon_pkg') {
+					if (item.couponDetail) {
+						uni.setStorageSync('couponDetail', item.couponDetail);
+					}
+				}
+			},
 
 			getBaseInfo() {
 				$http.post('/api/v1/mp/user/getLoginUserinfo', {
@@ -414,7 +435,7 @@
 						this.userInfo = res.data
 					}
 				})
-			},
+			}
 		},
 		onShareAppMessage(res) {
 			return {
@@ -425,7 +446,6 @@
 		},
 		//分享朋友圈
 		onShareTimeline() {
-			console.log(this.userInfo.userId);
 			return {
 				title: '超值宝贝免费抽,参与活动仅需3秒',
 				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/free_draw_bkg.jpeg',

+ 19 - 16
src/packageOperate/activity/record.vue

@@ -112,16 +112,17 @@
 				closeShow: false,
 				activityShow: false,
 				listData: {},
-				pagesNum: "",
 				total: 0,
+				pagesNum: '',
 			}
 		},
-		onLoad(opthios) {
-			this.marketingId = opthios.id
-			this.pageList()
-		},
 		onShow() {
 			this.pagesNum = getCurrentPages().length
+			this.pageList()
+		},
+		onLoad(opthios) {
+			this.marketingId = opthios.id
+			// this.pageList()
 		},
 		methods: {
 			toActivity() {
@@ -159,23 +160,25 @@
 						})
 						this.total = res.total
 						this.list = this.list.concat(res.rows)
+						
+						try {
+							const value = uni.getStorageSync(this.marketingId);
+							if (value) {
+						
+							} else {
+								this.successFail()
+								uni.setStorageSync(this.marketingId, this.marketingId);
+							}
+						} catch (e) {
+							// error
+						}
 					}
 				}).catch(() => {
 					uni.hideLoading();
 					this.loading = false
 				});
 
-				try {
-					const value = uni.getStorageSync(this.marketingId);
-					if (value) {
-
-					} else {
-						this.successFail()
-						uni.setStorageSync(this.marketingId, this.marketingId);
-					}
-				} catch (e) {
-					// error
-				}
+				
 
 			},
 			close() {

+ 27 - 3
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :title="addrId ? '编辑地址' : '添加地址'" :border="true" :placeholder="true" :autoBack="true"
 			bgColor="#fff" />
 		<!-- #endif -->
-		
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -63,9 +74,12 @@
 					area: '', // 区
 				},
 				areaShow: false,
+				pagesNum: '',
 			}
 		},
-
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			if (options.addrId) {
 				this.addrId = options.addrId
@@ -112,25 +126,32 @@
 			},
 
 			saveAddress() {
+				if(this.loading) return
+				this.loading = true
 				let _this = this
 				if (!_this.form.receiver) {
+					this.loading = false
 					uni.$u.toast('请输入收货人');
 					return
 				}
 				if (!_this.form.mobile) {
+					this.loading = false
 					uni.$u.toast('请输入手机号码');
 					return
 				}
 				const rule = /^[1][0-9][0-9]{9}$/
 				if (!rule.test(_this.form.mobile)) {
+					this.loading = false
 					uni.$u.toast('请输入正确的手机号');
 					return
 				}
 				if (!_this.form.cityShow) {
+					this.loading = false
 					uni.$u.toast('请选择所在地区');
 					return
 				}
 				if (!_this.form.addr) {
+					this.loading = false
 					uni.$u.toast('请输入详细地址');
 					return
 				}
@@ -139,10 +160,13 @@
 					if (res.code == 0) {
 						uni.$u.toast('保存成功');
 						setTimeout(() => {
+							this.loading = false
 							uni.navigateBack({
 								delta: 1
 							})
 						}, 1000)
+					}else {
+						this.loading = false
 					}
 				})
 			},

+ 17 - 3
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="我的地址" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -20,7 +32,7 @@
 				<view class="item-option">
 					<view class="_left" @click.stop="handleSetDefault(item.addrId)">
 						<label class="item-radio">
-							<view :class="item.addrId == defaultId? 'radioon' : 'radiooff' "></view>
+							<view :class="item.addrId == defaultId? 'radioon' : 'radiooff' "><u-icon name="checkbox-mark" color="#fff"></u-icon></view>
 							<text class="text">{{ item.addrId == defaultId ? '默认' : '选择' }}</text>
 						</label>
 					</view>
@@ -66,7 +78,8 @@
 				// 收货地址列表
 				list: [],
 				// 默认收货地址
-				defaultId: null
+				defaultId: null,
+				pagesNum: '',
 			}
 		},
 
@@ -77,6 +90,7 @@
 		},
 
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			// 获取页面数据
 			this.getPageData()
 		},

+ 7 - 7
src/components/activity-help/activity-help.vue → src/packageOperate/components/activity-help/activity-help.vue

@@ -8,16 +8,16 @@
 					<image :src="avatar" mode="scaleToFill" class="activityShow-one-img"></image>
 				</view>
 				<view class="activityShow-two">
-					<image src="../../static/activity/beijingtwo.png" mode="scaleToFill" class="activityShow-two-img"></image>
+					<image src="../../../static/activity/beijingtwo.png" mode="scaleToFill" class="activityShow-two-img"></image>
 					<text class="activityShow-two-text ells-one">{{ nickName }}</text>
 				</view>
 				<view class="activityShow-three">邀请您一起免费抽奖</view>
-				<image class="activityShow-four" src="../../static/activity/tupian.jpg" mode="scaleToFill"></image>
+				<image class="activityShow-four" src="../../../static/activity/tupian.jpg" mode="scaleToFill"></image>
 				<view class="activityShow-five">一起免费抽奖</view>
 				<view class="activityShow-six">收下好意可以帮助好友完成抽奖助力</view>
 				<view class="activityShow-sixtwo">您也可以获得一个免费抽奖机会</view>
 				<view class="activityShow-seven" @click="activityHelp()">
-					<image src="../../static/activity/yuanjiao.png" mode="scaleToFill" class="activityShow-seven-img"></image>
+					<image src="../../../static/activity/yuanjiao.png" mode="scaleToFill" class="activityShow-seven-img"></image>
 					<view class="activityShow-seven-view">收下好意</view>
 				</view>
 			</view>
@@ -27,13 +27,13 @@
 			@touchmove.prevent.stop>
 			<view class="closeShow">
 				<view class="closeShow-one">
-					<image class="closeShow-one-imgone" src="../../static/activity/beijing.png" mode="scaleToFill"></image>
-					<image class="closeShow-one-imgtwo" src="../../static/activity/beijingtwo.png" mode="scaleToFill"></image>
+					<image class="closeShow-one-imgone" src="../../../static/activity/beijing.png" mode="scaleToFill"></image>
+					<image class="closeShow-one-imgtwo" src="../../../static/activity/beijingtwo.png" mode="scaleToFill"></image>
 					<view class="closeShow-one-view">助力成功!</view>
 					<view class="closeShow-one-viewtwo">您已获得一个免费抽奖机会</view>
 				</view>
 				<view class="closeShow-two" @click="close();exChange()">
-					<image class="closeShow-two-img" src="../../static/activity/yuanjiao.png" mode="scaleToFill"></image>
+					<image class="closeShow-two-img" src="../../../static/activity/yuanjiao.png" mode="scaleToFill"></image>
 					<view class="closeShow-two-view">确定</view>
 				</view>
 			</view>
@@ -42,7 +42,7 @@
 </template>
 
 <script>
-	import env from '../../config/env.js'
+	import env from '../../../config/env.js'
 	import appId from '@/config/appId.js'
 	import $http from '@/utils/request.js'
 	export default {

+ 0 - 0
src/components/share-code/share-code.vue → src/packageOperate/components/share-code/share-code.vue


+ 194 - 0
src/packageOperate/creator/index.vue

@@ -0,0 +1,194 @@
+<template>
+	<view>
+		//申请创客
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar title="申请创客" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" leftIconSize="0" />
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar title="申请创客" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
+				<u-form-item label="姓名:" borderBottom required>
+					<u-input v-model="form.name" border="none" placeholder="请输入姓名" maxlength="10"></u-input>
+				</u-form-item>
+				<u-form-item label="手机号码:" borderBottom required>
+					<u-input v-model="form.phone" type="number" border="none" placeholder="请输入手机号码"></u-input>
+				</u-form-item>
+				<u-form-item label="所在地区:" borderBottom @click="selectArea">
+					<u-input v-model="form.cityShow" border="none" disabled disabledColor="#ffffff" placeholder="请选择地区">
+					</u-input>
+					<u-icon slot="right" name="arrow-right"></u-icon>
+				</u-form-item>
+				<u-form-item label="行业资源:" :borderBottom="false">
+					<u-textarea v-model="form.resource" placeholder="请输入行业资源" count></u-textarea>
+				</u-form-item>
+			</u-form>
+		</view>
+		<!-- 操作按钮 -->
+		<view class="save-btn">
+			<button :loading="loading" type="default" @click="saveCreator">提交</button>
+		</view>
+		
+		<view class="tip">
+			<view class="tip-text">
+				申请成为盲票创客 利用业余时间  推广您公司、家附近门店商户,创客和门店都无需投资、销售额分佣、长期收益 点击提交按钮后,客服会联系您。
+			</view>
+			<view class="tip-phone">
+				<image src="../static/phone.png" mode=""></image>
+				<view class="">
+					咨询电话:400-081-1913
+				</view>
+			</view>
+		</view>
+		
+
+		<area-picker :area-show="areaShow" @cancel="cancel" @confirmArea="confirmArea" />
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import AreaPicker from '../../components/area-picker/area-picker.vue'
+	export default {
+		components: {
+			AreaPicker
+		},
+		data() {
+			return {
+				loading: false,
+				form: {
+					phone: '',
+					name: '',
+					cityShow: '', //省市区拼接
+					resource: '', //行业资源
+					provinceId: '', // 省ID/编码
+					province: '', // 省
+					cityId: '', // 市ID/编码
+					city: '', // 市
+					areaId: '', // 区ID/编码
+					area: '', // 区
+				},
+				areaShow: false,
+				pagesNum: '',
+			}
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
+		methods: {
+
+			//打开地址选项
+			selectArea() {
+				this.areaShow = true
+			},
+			//隐藏地址选项
+			cancel() {
+				this.areaShow = false
+			},
+			confirmArea(obj) {
+				this.form.province = obj.province
+				this.form.provinceId = obj.provinceId
+				this.form.city = obj.city
+				this.form.cityId = obj.cityId
+				this.form.area = obj.area
+				this.form.areaId = obj.areaId
+				this.form.cityShow = obj.cityShow
+				this.areaShow = false
+			},
+			//提交
+			saveCreator() {
+				if(this.loading) return
+				this.loading = true
+				let _this = this
+				if (!_this.form.name) {
+					this.loading = false
+					uni.$u.toast('请输入姓名');
+					return
+				}
+				if (!_this.form.phone) {
+					this.loading = false
+					uni.$u.toast('请输入手机号码');
+					return
+				}
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(_this.form.phone)) {
+					this.loading = false
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				$http.post('/api/v1/mp/admin/channel/apply/submit', this.form).then(res => {
+					if (res.code == 0) {
+						uni.$u.toast('提交成功');
+						setTimeout(() => {
+							this.loading = false
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 1000)
+					}else {
+						this.loading = false
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.creator {
+		background-color: #FFFFFF;
+		padding: 10rpx 40rpx 0rpx;
+	}
+
+	.save-btn {
+		margin-top: 20rpx;
+		padding: 50rpx 20rpx;
+
+		::v-deep button {
+			line-height: 76rpx;
+			font-size: 28rpx;
+			height: 76rpx;
+			color: #fff;
+			background-color: $uni-bg-color;
+			border: none;
+			border-radius: 100rpx;
+		}
+	}
+	
+	.tip {
+		padding: 40rpx 40rpx 0;
+		line-height: 46rpx;
+		font-size: 26rpx;
+		color: #999;
+		
+		&-phone {
+			text-align: center;
+			margin-top: 60rpx;
+			image {
+				width: 40rpx;
+				height: 40rpx;
+				vertical-align: top;
+				margin-top: 4rpx;
+			}
+			view {
+				display: inline-block;
+				margin-left: 10rpx;
+				
+			}
+		}
+		
+	}
+</style>

+ 264 - 0
src/packageOperate/exchange/index.vue

@@ -0,0 +1,264 @@
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar title="兑换码" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff"  leftIconSize="0" />
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<u-navbar title="兑换码" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<!-- #endif -->
+		
+		<view class="wrap">
+			<view class="wrap-code">
+				<view class="wrap-code-input">
+					<u-input :placeholder="placeholder" v-model="code" border="none" maxlength="16" placeholderStyle="color:#333" inputAlign="center" @focus="setPlaceholder" @blur = "setPlaceholder2"/>
+				</view>
+				<view class="wrap-code-text">
+					兑换规则说明:<br>
+					1、输入兑换码即可兑换相应奖品。<br>
+					2、兑换码有效期有限制,超期失效。<br>
+					3、兑换码不找零、不兑现,使用支配权归用户所有,可自用也可转赠他人
+				</view>
+			</view>
+			<button @click="submit" type="button">提交兑换</button>
+		</view>
+
+		<u-overlay :show="exchangeShow" mask-click-able="false" >
+			<view class="rect">
+				<view class="rect-popup">
+					<view class="rect-popup-top">
+						<view class="image1">
+							<image src="../static/image1.png" mode="aspectFit"></image>
+						</view>
+						<view class="text">~恭喜您得到奖品~</view>
+						<view class="title">{{ info.type == 'coin' ? (info.goodsName + ' x' + info.value): info.goodsName }}</view>
+						<view class="image2">
+							<image :src="info.picUrl" mode="aspectFit"></image>
+						</view>
+						<view class="btn" v-if="info.type != 'coin'">
+							<button @click="toPrize(info.type)">去查看我的奖品</button>
+						</view>
+						<view class="btn" v-if="info.type == 'coin'">
+							<button @click="toPrize(info.type)">去商城兑换商品</button>
+						</view>
+						<view class="tip">温馨提示:实物商品需前往提货才可提交订单</view>
+					</view>
+					<view class="rect-popup-bottom" @click="close">
+						<u-icon name="close" size="24"></u-icon>
+					</view>
+				</view>
+			</view>
+		</u-overlay>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				code: '',
+				info: {},
+				placeholder: '请输入兑换码',
+				loading: false,
+				exchangeShow: false,
+			}
+		},
+
+		methods: {
+			setPlaceholder() {
+				if(this.code == '' &&  this.placeholder ==  '请输入兑换码'){
+					this.placeholder = ''
+				}
+			},
+			setPlaceholder2() {
+				if(this.code == '' &&  this.placeholder ==  ''){
+					this.placeholder = '请输入兑换码'
+				}
+			},
+			submit() {
+				if(this.loading) return
+				this.loading = true
+				
+				let _this = this
+				if(_this.code == '') {
+					_this.loading = false
+					uni.$u.toast('请输入兑换码');
+					return
+				}
+				if(_this.code.length != 16) {
+					_this.loading = false
+					uni.$u.toast('兑换码错误');
+					return
+				}
+				const rule = /^[a-zA-Z0-9]+$/
+				if (!rule.test(_this.code)) {
+					_this.loading = false
+					uni.$u.toast('兑换码错误');
+					return
+				}
+				let data = {
+					cdKey: _this.code
+				}
+				$http.post('/api/v1/mp/user/mine/cdKey/exchange', data).then(res => {
+					if (res.code == 0) {
+						res.data.picUrl = env.filePublic + res.data.picUrl.split(',')[0] + '?imageView2/2/w/170'
+						_this.info = res.data
+						_this.exchangeShow = true
+						_this.loading = false
+					}else {
+						_this.loading = false
+					}
+				})
+			},
+			
+			toPrize(data) {
+				if (data == 'goods') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index'
+					})
+				}
+				if (data == 'coupon') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index?coupon=1'
+					})
+				}
+				if (data == 'coupon_pkg') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index?coupon=1'
+					})
+				}
+				if (data == 'coin') {
+					uni.switchTab({
+						url: '/pages/core/index'
+					})
+				}
+			},
+			
+			close() {
+				this.exchangeShow = false
+			}
+		},
+	}
+</script>
+<style lang="scss" scoped>
+.wrap {
+	padding: 30rpx;
+	&-code {
+		background-color: #fff;
+		padding: 40rpx;
+		margin-bottom: 80rpx;
+		&-input {
+			margin-top: 28rpx;
+			margin-bottom: 50rpx;
+			height: 88rpx;
+			border: 1px solid #FD7A21;
+			background-color: rgba(253,122,33,0.12);
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			justify-content: space-between;
+			flex: 1;
+		}
+		&-text {
+			font-size: 24rpx;
+			color: #666666;
+			line-height: 56rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			font-weight: 400;
+		}
+	}
+	
+	button {
+		margin: 0 auto;
+		width: 666rpx;
+		height: 98rpx;
+		line-height: 98rpx;
+		background: linear-gradient(180deg, #FEA052 0%, #FF8D2F 100%);
+		border-radius: 56rpx;
+		color: #fff;
+	}
+}
+
+.rect {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	height: 100%;
+	&-popup {
+		width: 85vw;
+		text-align: center;
+		&-top {
+			background-color: #fff;
+			margin-bottom: 80rpx;
+			padding: 0 80rpx 40rpx;
+			.image1 {
+				display: inline-block;
+				width: 374rpx;
+				height: 148rpx;
+				margin-top: -74rpx;
+				image {
+					width: 374rpx;
+					height: 148rpx;
+				}
+			}
+			.text {
+				margin-top: 20rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 500;
+				color: #FF9056;
+				line-height: 36rpx;
+			}
+			.title {
+				margin: 8rpx 0 15rpx;
+				font-size: 26rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #666666;
+				line-height: 50rpx;
+			}
+			.image2 {
+				margin: 0 auto;
+				width: 218rpx;
+				height: 218rpx;
+				image {
+					width: 218rpx;
+					height: 218rpx;
+				}
+			}
+			.btn {
+				margin: 40rpx 0 12rpx;
+				button {
+					height: 68rpx;
+					line-height: 68rpx;
+					background: #FF9056;
+					border-radius: 50rpx;
+					color: #fff;
+					font-size: 26rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 500;
+				}
+			}
+			
+			.tip {
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #999999;
+				line-height: 50rpx;
+			}
+		}
+		&-bottom {
+			width: 80rpx;
+			height: 80rpx;
+			background: rgba(255,255,255,0.5);
+			margin: 0 auto;
+			border-radius: 50%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+}
+</style>

+ 17 - 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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="兑奖" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -32,9 +44,13 @@
 			return {
 				id: '',
 				info: {},
+				pagesNum: '',
 				picUrlArr: []
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			this.id = options.id
 			this.getDetail()

+ 16 - 4
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="分享" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
 		<!-- #endif -->
-
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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>
@@ -34,7 +45,7 @@
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
 	import appId from '@/config/appId.js'
-	import ShareCode from "../../components/share-code/share-code.vue"
+	import ShareCode from "../components/share-code/share-code.vue"
 	export default {
 		components: {
 			ShareCode
@@ -45,6 +56,7 @@
 				userInfo: {},
 				avatar: '',
 				boxId: '',
+				pagesNum: '',
 				// 图片数据
 				posterData: {
 					poster: {
@@ -92,8 +104,8 @@
 		onLoad(options) {
 			this.boxId = options.boxId
 		},
-
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.getUrl()
 			this.getBaseInfo()
 		},

BIN
src/packageOperate/static/image1.png


BIN
src/packageOperate/static/phone.png


+ 236 - 0
src/packageOperate/store/index.vue

@@ -0,0 +1,236 @@
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" bgColor="#fff" leftIconSize="0" /> -->
+			<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
+				<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>
+			</u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<!-- <u-navbar :title="siteName" :border="true" :placeholder="true" leftIconSize="0" bgColor="#fff" /> -->
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#fff" :title="siteName">
+			<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>
+		</u-navbar>
+		<!-- #endif -->
+		
+		<view class="list">
+			<view class="list-item" v-for="(item, index) in list" :key="index">
+				<image :src="item.picUrl" mode="aspectFit" @click="toTicketBox(item)"></image>
+				<view class="list-item-content flex" @click="toTicketBox(item)">
+					<view class="top">{{ item.title }}</view>
+					<view class="bottom flex">
+						<view class="bottom-price">价格:<view style="font-size: 12px; display: inline-block;">¥</view>{{ $numberFormat(item.salePrice) }}<view class="view1" v-if="item.originPrice"><text style="font-size: 10px; display: inline-block;">¥</text>{{ $numberFormat(item.originPrice) }}</view></view>
+					</view>
+				</view>
+			</view>
+			<u-loadmore :line="true" v-if="list.length > 5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+		</view>
+		<view class="flex empty" v-if="!list.length">
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode="scaleToFill"></image>
+				<view class="center-font">暂无盲票</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				status: 'nomore',//上拉刷新状态
+				pageNum: 1,
+				total: 0,
+				list: [],
+				pagesNum: '',
+				
+				sceneArr: [],
+				channelId: '',
+				userId: '',
+				siteName: '门店',
+			}
+		},
+
+		onLoad(options) {
+			// 测试用
+			if(options.channelId){
+				this.channelId = options.channelId
+			}
+			
+			/**
+			 * 票赢天下小程序分享门店二维码跳转接收的参数
+			 * channelId: 门店ID
+			 * userId: 分享类型
+			 * siteName: 门店名称
+			 * */
+			if (options.scene) {
+				let sceneStr = decodeURIComponent(options.scene)
+				this.sceneArr = sceneStr.split('&')
+				this.channelId = this.sceneArr[0]
+				this.userId = this.sceneArr[1]
+			}
+		},
+		onShow() {
+			// 获取页面数据
+			this.pageList()
+			this.getSiteName()
+		},
+		methods: {
+			//获取门店名称
+			getSiteName() {
+				$http.post(`/api/v1/mp/channel/saleSite/info/${this.channelId}`,{}).then(res => {
+					if (res.code == 0) {
+						this.siteName = res.data ? res.data : ('门店' + this.channelId)
+					}
+				}).catch(() => {
+				})
+			},
+			
+			// 获取页面数据
+			pageList() {
+				this.pageNum = 1
+				this.list = []
+				this.getList()
+			},
+			getList() {
+				$http.post(`/api/v1/mp/user/ticket/list/underChannel?pageNum=${this.pageNum}&pageSize=20`,{
+					channelId: this.channelId
+				}).then(res => {
+					if (res.code == 0) {
+						res.rows.forEach(item => {
+							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/170'
+						})
+						this.total = res.total
+						this.list = this.list.concat(res.rows)
+					}
+				}).catch(() => {
+				})
+			},
+			
+			// 点击盲票,跳转盲票详情
+			toTicketBox(item) {
+				uni.navigateTo({
+					url: `/pages/ticketBox/detail?boxId=${ item.boxId }&share=1&siteId=${ this.channelId }`
+				})
+			},
+		},
+		onReachBottom() {
+			if(this.total < this.pageNum * 20) return ;
+			this.status = 'loading';
+			++this.pageNum
+			if(this.total < this.pageNum * 20) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getList()
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	.nav-left {
+		&__code {
+			margin-left: 10rpx;
+		}
+	}
+	// 状态
+	.state {
+		display: flex;
+		position: fixed;
+		background-color: #FFFFFF;
+		width: 100%;
+		z-index: 10;
+		box-shadow: 0 5rpx 5rpx #ececec;
+	}
+	// 列表
+	.list {
+		padding: 20rpx 0 100rpx;
+		margin: 0 20rpx 0;
+		
+		&-item {
+			display: flex;
+			background: #FFFFFF;
+			padding: 30rpx 20rpx;
+			border-radius: 1px;
+			box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.12);
+			margin-bottom: 28rpx;
+			
+			image {
+				width: 140rpx;
+				height: 189rpx;
+				border-radius: 22rpx;
+				margin-right: 60rpx;
+			}
+			
+			&-content {
+				width: 70%;
+				// flex: 1;
+				flex-direction: column;
+				justify-content: space-between;
+				padding: 26rpx 0;
+				
+				
+				.top {
+					width: 100%;
+					display: inline-block;
+					font-size: 30rpx;
+					line-height: 30rpx;
+					font-weight: bold;
+					margin-bottom: 46rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					
+				}
+				
+				.bottom {
+					width: 100%;
+					justify-content: space-between;
+					
+					&-price {
+						height: 30rpx;
+						overflow: hidden;
+						font-size: 30rpx;
+						line-height: 30rpx;
+						
+						.view1 {
+							color: #999;
+							display: inline-block;
+							text-decoration: line-through;
+							margin-left: 10rpx;
+							font-size: 24rpx;
+							text {
+								text-decoration: line-through;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	
+	.empty {
+		height: 60vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
+	}
+</style>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 14 - 1
src/packageOther/about/conceal.vue


+ 19 - 5
src/packageOther/about/index.vue

@@ -3,15 +3,26 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们"></u-navbar>
 		<!-- #endif -->
-		
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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>
 				<!-- #ifndef MP-ALIPAY -->
-				<view class="edition">v 1.0.13</view>
+				<view class="edition">v 1.1.7</view>
 				<!-- #endif -->
 				<!-- #ifdef MP-ALIPAY -->
 				<view class="edition">v 2.2.6</view>
@@ -31,9 +42,12 @@
 	export default {
 		data() {
 			return {
-
+				pagesNum: '',
 			};
-		}
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 	}
 </script>
 <style lang="scss" scoped>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 14 - 1
src/packageOther/about/protect.vue


+ 220 - 0
src/packageOther/avatar/index.vue

@@ -0,0 +1,220 @@
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="个人信息"
+			leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<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="">
+					<u-icon name="arrow-left" size="20" color="#333"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY || MP-WEIXIN -->
+		<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">
+					<u-icon name="arrow-left" size="20" color="#fff"></u-icon>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+
+		<view class="wrap">
+			<view class="wrap-avatar flex">
+				<view class="title">头像</view>
+				<!-- <view><u-avatar :src="avatarUrl"></u-avatar></view> -->
+				<!-- #ifdef H5 -->
+				<button type="button" class="button" @click="onChooseImage">
+					<u-avatar :src="avatarUrl" mode="aspectFill"></u-avatar>
+				</button>
+				<!-- #endif -->
+
+				<!-- #ifndef H5 -->
+				<button type="balanced" class="button" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
+					<u-avatar :src="avatarUrl" mode="aspectFill"></u-avatar>
+				</button>
+				<!-- #endif -->
+			</view>
+			<view class="wrap-avatar flex">
+				<view class="title">昵称</view>
+				<view class="setName">
+					<!-- <u-input v-model="userInfo.nickName" placeholder="请设置昵称" inputAlign="right" border="none" /> -->
+					<input v-model="userInfo.nickName" class="input" type="nickname" placeholder="请设置昵称" />
+				</view>
+			</view>
+			<!-- #ifdef MP-WEIXIN -->
+			<view class="tip">建议使用您的微信头像与昵称</view>
+			<!-- #endif -->
+			<view class="btn">
+				<u-button type="primary" text="确定" @click="setAvatar" shape="circle"></u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	export default {
+		data() {
+			return {
+				avatarUrl: '', //展示用
+				avatar: '', //上传用
+				userInfo: {},
+				pagesNum: '',
+			}
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.getInfo()
+			// this.userInfo = uni.getStorageSync('userInfo')
+			// this.avatarUrl = env.filePublic + this.userInfo.avatar
+			// this.avatar = this.userInfo.avatar 
+		},
+		methods: {
+			// 我的信息
+			getInfo() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.userInfo = res.data
+						this.avatarUrl = env.filePublic + res.data.avatar
+						this.avatar = res.data.avatar
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			setAvatar() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let data = {
+					nickName: this.userInfo.nickName ? this.userInfo.nickName : '默认昵称', //昵称
+					userId: this.userInfo.userId, //用户id
+					avatar: this.avatar ? this.avatar : ((process.env.NODE_ENV == 'development') || (process.env.NODE_ENV == 'staging') ? 'EQX15D97SFN4OUMORGGH.jpg' :  'static/avatar.jpeg'), //文件地址
+				}
+				$http.post('/api/v1/mp/user/mine/updateUserInfo', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+							if (res.code == 0) {
+								uni.setStorageSync('userInfo', res.data)
+								this.toUserIndex()
+							}
+						})
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			onChooseImage() {
+				let _this = this
+				uni.chooseImage({ //选择本地图片
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album'], //从相册选择
+					success: (res) => {
+						_this.avatarUrl = res.tempFilePaths[0] // 将选择的图片路径预览
+						$http.upload(res.tempFilePaths[0]).then(res2 => {
+							uni.hideLoading();
+							if (res2.code == 0) {
+								this.avatarUrl = res.tempFilePaths[0]
+								this.avatar = res2.data.fileName
+							}
+						}).catch(() => {
+							uni.hideLoading();
+						})
+					}
+				});
+			},
+			onChooseavatar(e) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.upload(e.detail.avatarUrl).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.avatarUrl = e.detail.avatarUrl
+						this.avatar = res.data.fileName
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			toUserIndex() {
+				uni.switchTab({
+					url: `/pages/user/index`
+				})
+			},
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.wrap {
+		min-height: calc(100vh - 64px - var(--status-bar-height));
+		background-color: #FFFFFF;
+		padding: 15px;
+
+		&-avatar {
+			justify-content: space-between;
+			border-bottom: 1px solid rgba(102, 102, 102, 0.12);
+			line-height: 50px;
+
+			.title {
+				color: #666;
+				font-size: 30rpx
+			}
+
+			.setName {
+				.input {
+					text-align: right;
+					width: 600rpx;
+					line-height: 100rpx;
+					height: 100rpx;
+				}
+			}
+
+			.button {
+				border: none;
+				border-radius: 50%;
+				background-color: #fff;
+				padding: 0;
+				margin: 0;
+			}
+		}
+
+		&-avatar:first-child {
+			margin-bottom: 10px;
+		}
+
+		.tip {
+			margin: 5px 0;
+			font-size: 24rpx;
+			color: #999;
+		}
+
+		.btn {
+			::v-deep .u-button {
+				margin-top: 80rpx;
+				border: none;
+				color: #fff;
+				background: $uni-text-color;
+			}
+		}
+	}
+</style>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 14 - 1
src/packageOther/rule/index.vue


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 14 - 1
src/packageOther/rule/purchase.vue


+ 18 - 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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="使用范围"></u-navbar>
 		<!-- #endif -->
-
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -58,9 +70,13 @@
 				info: {},
 				total: 0,
 				pageNum: 1,
+				pagesNum: '',
 				status: 'nomore', //上拉刷新状态
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			this.couponId = options.couponId
 			this.pageList()

+ 164 - 0
src/packagePrize/bean/components/transfer.vue

@@ -0,0 +1,164 @@
+<template>
+	<view>
+		<u-popup :show="popupShow" :round="10" mode="center" :safeAreaInsetBottom="false" @touchmove.prevent.stop>
+			<view class="set-turn">
+				<view class="set-turn-title">请输入对方手机号码:</view>
+				<view class="set-turn-input">
+					<u-input placeholder="请输入手机号码" type="number" border="surround" v-model="mobile" @change="change" />
+				</view>
+				<view class="set-turn-title" style="display: inline-block;">对方用户昵称:</view>
+				<view style="display: inline-block;">
+					<view class="" v-if="info && info.nickName ">{{ info.nickName }}</view>
+					<view class="red" v-else-if="!info">未查询到用户</view>
+					<view class="" v-else>-</view>
+				</view>
+				<view class="set-turn-title">请输入盲豆转赠数量:</view>
+				<view class="set-turn-input">
+					<u-input placeholder="请输入转赠数量" type="number" border="surround" v-model="beanNum" />
+				</view>
+				<view class="loss">
+					<view>盲豆转赠折损说明:</view>
+					<view>(20个盲豆起转,每次扣除10盲豆)</view>
+				</view>
+				<view class="flex set-turn-btn">
+					<view class="btn close" @click="close">取消</view>
+					<view class="btn confirm" @click="confirm">确认</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script> 
+	import $http from '@/utils/request.js'
+	export default {
+		name: "set-turn",
+		props: {
+			popupShow: {
+				type: [Boolean],
+				default: false
+			},
+			coinNum: {
+				type: [String, Number],
+				default: ''
+			}
+		},
+		data() {
+			return {
+				mobile: '',
+				info: {},
+				beanNum: '',
+			};
+		},
+		methods: {
+			change(e) {
+				if(!e) { this.info = {} }
+				if(e.length < 11) {
+					this.info = {}
+				}
+				if(e.length > 11) { 
+					uni.$u.toast('请输入正确的手机号') 
+					this.info = {}
+				}
+				if(e.length != 11) return
+				$http.post(`/api/v1/mp/user/mine/sysUser/mobile/${ e }`, {}).then(res => {
+					this.info = res && res.data
+				})
+				
+			},
+			
+			close() {
+				this.$emit('close')
+			},
+			
+			confirm() {
+				if(this.info == null) {
+					uni.$u.toast('未查询到用户')
+					return
+				}
+				if(Object.keys(this.info).length  == 0) {
+					uni.$u.toast('请确认转赠用户')
+					return
+				}
+				if(!this.beanNum) {
+					uni.$u.toast('请输入盲豆数量')
+					return
+				}
+				if(this.beanNum < 20) {
+					uni.$u.toast('每次转赠盲豆不少于20')
+					return
+				}
+				if(this.beanNum > 1000) {
+					uni.$u.toast('每次最多转赠1000')
+					return
+				}
+				if(this.beanNum > this.coinNum) {
+					uni.$u.toast('超过现有盲豆数量')
+					return
+				}
+				$http.post('/api/v1/mp/user/mine/coin/transfer/save', {
+					phone: this.mobile,
+					transferCoin: this.beanNum,
+				}).then( res => {
+					if(res.code == 0){
+						this.close()
+						this.$emit('confirm')
+						setTimeout(()=>{
+							uni.$u.toast('转赠成功')
+						},500)
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.set-turn {
+		width: 75vw;
+		padding: 40rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+
+		&-title {
+			margin-bottom: 30rpx;
+			color: #666666;
+			font-size: 28rpx
+		}
+
+		&-input {
+			padding-bottom: 30rpx;
+		}
+		
+		.red {
+			color: red;
+		}
+		
+		&-btn {
+			justify-content: space-around;
+			margin-top: 20rpx;
+			
+			.btn {
+				width: 160rpx;
+				height: 60rpx;
+				line-height: 60rpx;
+				border-radius: 8rpx;
+				text-align: center;
+			}
+			
+			.close {
+				border: 1px solid rgba(187, 187, 187, 100);
+			}
+			
+			.confirm {
+				color: #FFFFFF;
+				background-color: $uni-bg-color;
+			}
+		}
+		.loss {
+			padding: 5px 0 10px 0;
+			font-size: 26rpx;
+			color: #999999;
+		}
+	}
+</style>

+ 275 - 217
src/packagePrize/bean/index.vue

@@ -1,229 +1,287 @@
-<template>
-	<view>
-		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"  leftIconSize="0"></u-navbar>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"></u-navbar>
-		<!-- #endif -->
-		
-		<view class="bean">
-			<!-- 盲豆数 -->
-			<view class="bean-balance flex">
-				<view class="bean-balance-num">{{ initData.coinNum }}</view>
-				<view class="bean-balance-title">盲豆余额</view>
-				<view class="bean-balance-btn flex" @click="toCore">立即兑换</view>
-			</view>
-			
-			<!-- 盲豆流水 -->
-			<view class="bean-list">
-				<view class="flex bean-list-item" v-for="(item, index) in list" :key="index">
-					<view class="flex left">
-						<view class="date">{{ $parseTime(item.createdTime) }}</view>
-						<view class="title">{{ item.logText }}</view>
-					</view>
-					<view class="flex right">
-						<view class="amt">{{ item.logMoney > 0 ? '+' : '' }}{{ item.logMoney }}</view>
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"
+			leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
+			<!-- 盲豆数 -->
+			<view class="bean-balance flex">
+				<view class="bean-balance-num">{{ initData.coinNum }}</view>
+				<view class="bean-balance-title">盲豆余额</view>
+				<view class="">
+					<view class="bean-balance-btn flex" @click="toCore">立即兑换</view>
+					<view class="bean-balance-btn flex" @click="onTransfer">盲豆转赠</view>
+				</view>
+			</view>
+
+			<!-- 盲豆流水 -->
+			<view class="bean-list">
+				<view class="flex bean-list-item" v-for="(item, index) in list" :key="index">
+					<view class="flex left">
+						<view class="date">{{ $parseTime(item.createdTime) }}</view>
+						<view class="title">{{ item.logText.split('|')[1] ? item.logText.split('|')[0] : item.logText }}</view>
+						<view class="beanNum" v-if="item.logText.split('|')[1]">{{ item.logText.split('|')[1] }}</view>
+					</view>
+					<view class="flex right">
+						<view class="amt">{{ item.logMoney > 0 ? '+' : '' }}{{ item.logMoney }}</view>
 						<view class="balance">余额:{{ item.money }}</view>
+						<view class="beanNum" v-if="item.logText.split('|')[1]">-</view>
 					</view>
-				</view>
-			</view>
-			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
-			<view class="flex empty" v-if="!list.length">
-				<view class="center">
-					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_6.png" mode="scaleToFill"></image>
-					<view class="center-font">还没有记录</view>
-				</view>
-			</view>
+				</view>
+			</view>
+			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+			<view class="flex empty" v-if="!list.length">
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_6.png"
+						mode="scaleToFill"></image>
+					<view class="center-font">还没有记录</view>
+				</view>
+			</view>
 		</view>
-	</view>
-</template>
-
-<script>
-	import $http from '@/utils/request.js'
-	export default {
-		data() {
-			return {
-				status: 'nomore',//上拉刷新状态
-				initData: {},
-				pageNum: 1,
-				total: 0,
-				list: [],
-			};
-		},
-		onShow() {
-			this.getBean()
-			this.pageList()
-		},
-		methods: {
-			getBean() {
-				$http.post('/api/v1/mp/user/mine/init', {}).then(res => {
-					if (res.code == 0) {
+		<Transfer :popup-show="popupShow" @close="close" @confirm="confirm" :coin-num="coinNum"
+					v-if="popupShow" />
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import Transfer from './components/transfer.vue'
+	export default {
+		components: {
+			Transfer
+		},
+		data() {
+			return {
+				status: 'nomore', //上拉刷新状态
+				initData: {},
+				pageNum: 1,
+				total: 0,
+				list: [],
+				pagesNum: '',
+				popupShow: false,
+				coinNum: 0,
+			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.getBean()
+			this.pageList()
+		},
+		methods: {
+			getBean() {
+				$http.post('/api/v1/mp/user/mine/init', {}).then(res => {
+					if (res.code == 0) {
 						this.initData = res.data
-					}
-				}).catch(() => {
-				})
-			},
-
-			getList() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post(`/api/v1/mp/user/mine/coin/log/list?pageNum=${this.pageNum}&pageSize=50`, {}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						res.rows.forEach(item => {
-							item.type = item.type ? JSON.parse(item.type) : ''
-						})
-						this.total = res.total
-						this.list = this.list.concat(res.rows)
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
+						this.coinNum = this.initData.coinNum
+					}
+				}).catch(() => {})
+			},
+
+			getList() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post(`/api/v1/mp/user/mine/coin/log/list?pageNum=${this.pageNum}&pageSize=50`, {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						res.rows.forEach(item => {
+							item.type = item.type ? JSON.parse(item.type) : ''
+						})
+						this.total = res.total
+						this.list = this.list.concat(res.rows)
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			pageList() {
+				this.pageNum = 1
+				this.total = 0
+				this.list = []
+				this.getList()
 			},
-
-			pageList() {
-				this.pageNum = 1
-				this.total = 0
-				this.list = []
-				this.getList()
-			},
-			
-			toCore(){
-				uni.switchTab({
-					url:"/pages/core/index"
-				})
-			}
-		},
-
-		onReachBottom() {
-			if(this.total < this.pageNum * 50) return ;
-			this.status = 'loading';
-			++this.pageNum
-			if(this.total < this.pageNum * 50) this.status = 'nomore';
-				else this.status = 'loading';
-			this.getList()
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.bean {
-		margin: 34rpx 34rpx;
-		padding-bottom: 100rpx;
-
-		// 盲豆数
-		&-balance {
-			height: 264rpx;
-			flex-direction: column;
-			justify-content: flex-start;
-			background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/coin_bkg.png) center center no-repeat;
-			background-size: calc(100vw - 68rpx) 264rpx;
-			margin-bottom: 34rpx;
 			
-			&-num {
-				font-size: 52rpx;
-				line-height: 52rpx;
-				font-weight: bold;
-				color: #FFFFFF;
-				margin: 36rpx 0 16rpx;
-			}
+			//盲票转赠
+			onTransfer() {
+				this.popupShow = true
+			},
 			
-			&-title {
-				font-size: 26rpx;
-				line-height: 26rpx;
-				margin-bottom: 24rpx;
-				font-weight: 500;
-				color: #FFFFFF;
-				opacity: 0.72;
-			}
+			close() {
+				this.popupShow = false
+			},
 			
-			&-btn {
-				width: 200rpx;
-				height: 70rpx;
-				line-height: 70rpx;
-				font-size: 30rpx;
-				text-align: center;
-				background: #fff;
-				border-radius: 16rpx;
-				
-				image {
-					width: 56rpx;
-					height: 56rpx;
-					margin-right: 10rpx;
-				}
-			}
-		}
-
-		// 盲豆流水
-		&-list {
-			background-color: #FFFFFF;
-			padding: 0 34rpx;
-			border-radius: 22rpx;
-
-			&-item {
-				justify-content: space-between;
-				padding: 40rpx 0;
-				border-bottom: 1px solid #eee;
-
-				.left {
-					flex-direction: column;
-					justify-content: space-between;
-					align-items: flex-start;
-					
-					.date {
-						color: #AAAAAA;
-						line-height: 24rpx;
-						margin-bottom: 28rpx;
+			confirm() {
+				//刷新盲豆数量
+				this.getBean()
+				//刷新盲豆记录
+				this.pageList()
+			},
+
+			toCore() {
+				uni.switchTab({
+					url: "/pages/core/index"
+				})
+			},
+		},
+
+		onReachBottom() {
+			if (this.total < this.pageNum * 50) return;
+			this.status = 'loading';
+			++this.pageNum
+			if (this.total < this.pageNum * 50) this.status = 'nomore';
+			else this.status = 'loading';
+			this.getList()
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.bean {
+		margin: 34rpx 34rpx;
+		padding-bottom: 100rpx;
+
+		// 盲豆数
+		&-balance {
+			height: 264rpx;
+			flex-direction: column;
+			justify-content: flex-start;
+			background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/coin_bkg.png) center center no-repeat;
+			background-size: calc(100vw - 68rpx) 264rpx;
+			margin-bottom: 34rpx;
+
+			&-num {
+				font-size: 52rpx;
+				line-height: 52rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+				margin: 36rpx 0 16rpx;
+			}
+
+			&-title {
+				font-size: 26rpx;
+				line-height: 26rpx;
+				margin-bottom: 24rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				opacity: 0.72;
+			}
+
+			&-btn {
+				display: inline-block;
+				margin: 0 20px;
+				width: 200rpx;
+				height: 70rpx;
+				line-height: 70rpx;
+				font-size: 30rpx;
+				text-align: center;
+				background: #fff;
+				border-radius: 16rpx;
+
+				image {
+					width: 56rpx;
+					height: 56rpx;
+					margin-right: 10rpx;
+				}
+			}
+		}
+
+		// 盲豆流水
+		&-list {
+			background-color: #FFFFFF;
+			padding: 0 34rpx;
+			border-radius: 22rpx;
+
+			&-item {
+				justify-content: space-between;
+				padding: 40rpx 0;
+				border-bottom: 1px solid #eee;
+
+				.left {
+					flex-direction: column;
+					justify-content: space-between;
+					align-items: flex-start;
+
+					.date {
+						color: #AAAAAA;
+						line-height: 24rpx;
+						margin-bottom: 28rpx;
+					}
+
+					.title {
+						font-size: 30rpx;
+						line-height: 30rpx;
 					}
 					
-					.title {
-						font-size: 30rpx;
-						line-height: 30rpx;
-					}
-				}
-
-				.right {
-					flex-direction: column;
-					justify-content: space-between;
-					align-items: flex-end;
-					
-					.amt {
-						color: #FF4208;
-						font-size: 30rpx;
-						line-height: 30rpx;
-						margin-bottom: 28rpx;
-					}
-					
-					.balance {
+					.beanNum {
+						margin-top: 20rpx;
 						color: #AAAAAA;
 					}
-				}
-			}
-
-			&-item:last-child {
-				border-bottom: none;
-			}
-		}
-	}
-
-	.empty {
-		height: 60vh;
-		.center {
-			text-align: center;
-			
-			&-img {
-				width: 228rpx;
-				height: 320rpx;
-			}
-			
-			&-font {
-				font-size: 30rpx;
-				font-weight: 400;
-				color: #999999;
-				margin-bottom: 250rpx;
-			}
-		}
-	}
-</style>
+					
+				}
+
+				.right {
+					flex-direction: column;
+					justify-content: space-between;
+					align-items: flex-end;
+
+					.amt {
+						color: #FF4208;
+						font-size: 30rpx;
+						line-height: 30rpx;
+						margin-bottom: 28rpx;
+					}
+
+					.balance {
+						color: #AAAAAA;
+					}
+					.beanNum{
+						margin-top: 20rpx;
+						color: #fff;
+					}
+				}
+			}
+
+			&-item:last-child {
+				border-bottom: none;
+			}
+		}
+	}
+
+	.empty {
+		height: 60vh;
+
+		.center {
+			text-align: center;
+
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
+	}
+</style>

+ 892 - 690
src/packagePrize/choice/index.vue

@@ -1,693 +1,895 @@
-	<template>
-	<view>
-		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false">
-			<view class="null-prize">
-				<view class="title">该盲票已被他人买走了</view>
-				<!-- <navigator open-type="exit" target="miniProgram" hover-class="none" class="btn">确认</navigator> -->
-				<view class="btn" @click="toUser">确认</view>
-			</view>
-		</u-popup>
-
-		<view class="choice">
-			<!-- 返回 -->
-			<!-- #ifndef MP-ALIPAY -->
-			<!-- <view class="choice-navLeft flex" :style="{ top: statusHeight + 'px' }" @click="back">
-				<u-icon size="19" color="#fff" name="arrow-left"></u-icon>
-			</view> -->
-			<!-- #endif -->
-			
-			<!-- 标题 -->
-			<view class="choice-title flex">
-				<image src="../../packagePrize/static/rolling_title.png" mode="scaleToFill" v-if="!comfirmShow"></image>
-				<image src="../../packagePrize/static/choice_title.png" mode="scaleToFill" v-else></image>
-			</view>
-			<!-- 提示 -->
-			<view class="choice-tip flex" v-if="!comfirmShow">
-				<view class="choice-tip-content">以下奖品任选一件</view>
-			</view>
-			<!-- 奖品列表 -->
-			<view class="choice-list" v-if="!comfirmShow">
-				<view class="choice-list-item flex" v-for="(item, index) in prizeList" :key="index">
-					<view class="checkbox flex" :class="{ 'checkbox-action': actionIndex == index }" @click="selectPrize(index)">
-						<u-icon name="checkmark" color="#fff" size="14"></u-icon>
-					</view>
-					<view class="info flex" @click="selectPrize(index)">
-						<image :src="item.picUrl" mode="aspectFill"></image>
-						<view class="info-content flex">
-							<!-- #ifdef MP-ALIPAY -->
-							<view class="info-content__titletwo ells" v-if="item.prizeType && item.prizeType.value != 'coin'">{{ item.title }}</view>
-							<view class="info-content__titletwo ells" v-else>盲豆</view>
-							<!-- #endif -->
-							<!-- #ifndef MP-ALIPAY -->
-							<view class="info-content__title ells" v-if="item.prizeType && item.prizeType.value != 'coin'">{{ item.title }}</view>
-							<view class="info-content__title ells" v-else>盲豆</view>
-							<!-- #endif -->
-							
-							<view class="info-content__price" v-if="item.prizeType && item.prizeType.value != 'coin'">¥{{ $numberFormat(item.value) }}</view>
-							<view class="info-content__price" v-else>{{ item.value }}个</view>
-						</view>
-					</view>
-					<view class="detail" @click="toPrizeGoods(item)">查看</view>
-				</view>
-			</view>
-			<!-- 按钮 -->
-			<view class="footer-fixed flex" v-if="!comfirmShow">
-				<view class="footer-fixed-btn flex" @click="confirmPrize">
-					<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
-					<view class="footer-fixed-btn-txt">确认</view>
-				</view>
-			</view>
-			
-			<view class="choice-box flex" v-if="comfirmShow">
-				<view class="choice-box-popup flex">
-					<view class="choice-box-popup__image flex">
-						<image :src="actionInfo.picUrl" mode="aspectFit"></image>
-					</view>
-				</view>
-			</view>
-			<view class="choice-info flex" v-if="comfirmShow">
-				<view class="choice-info-content">
-					<view class="choice-info-content-price" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'"><text>¥</text>{{ $numberFormat(actionInfo.value) }}</view>
-					<view class="choice-info-content-price" v-else>{{ actionInfo.value }}个</view>
-					<view class="choice-info-content-title ells" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">{{ actionInfo.title }}</view>
-					<view class="choice-info-content-title" v-else>盲豆</view>
-					<view class="choice-info-content-btn flex">
-						<view class="choice-info-content-btn-content flex"  @click="toPrize(actionInfo.prizeType)">
-							<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
-							<view class="choice-info-content-btn-content-txt" v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
-							<view class="choice-info-content-btn-content-txt" v-else>去商城兑换商品</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="choice-tip flex" @click="again" v-if="comfirmShow && type == 'offline'">
-				<view class="txt">再来一张</view>
-			</view>
-			<view class="choice-tip flex" @click="again" v-if="comfirmShow && type == 'online'">
-				<view class="txt">再买一个</view>
-			</view>
-		</view>
-		
-		<!-- 详情 -->
-		<u-popup :show="detailShow" :round="11" mode="bottom" @close="detailShow = false" :closeable="true">
-			<view class="prize-detail flex">
-				<view class="prize-detail-title">奖品详情</view>
-				<view class="prize-detail-content">
-					<u-parse :content="description" :selectable="true"></u-parse>
-				</view>
-			</view>
-		</u-popup>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	import { formatRichText,urlParameter } from '@/utils/util.js'
-	export default {
-		data() {
-			return {
-				ticketId: '',
-				prizeList: [],
-				total: 0,
-				actionIndex: 0,
-				tipShow: false,
-				comfirmShow: false,
-				actionInfo: {},
-				type: '',
-				
-				statusHeight: 30,
-				detailShow: false,
-				description: '',
-			};
-		},
-		onLoad(options) {
-			this.ticketId = options.id
-			
-			// #ifdef MP-WEIXIN
-			const res = uni.getMenuButtonBoundingClientRect()
-			this.statusHeight = res.top //胶囊距离顶部
-			// #endif
-			this.getPrizeList()
-		},
-		methods: {
-			getPrizeList() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				let data = {
-					ticketId: this.ticketId
+<template>
+	<view>
+		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false">
+			<view class="null-prize">
+				<view class="title">该盲票已被他人买走了</view>
+				<!-- <navigator open-type="exit" target="miniProgram" hover-class="none" class="btn">确认</navigator> -->
+				<view class="btn" @click="toUser">确认</view>
+			</view>
+		</u-popup>
+
+		<view class="choice" v-if="comfirmShow1">
+			<!-- 返回 -->
+			<!-- #ifndef MP-ALIPAY -->
+			<!-- <view class="choice-navLeft flex" :style="{ top: statusHeight + 'px' }" @click="back">
+				<u-icon size="19" color="#fff" name="arrow-left"></u-icon>
+			</view> -->
+			<!-- #endif -->
+
+			<!-- 标题 -->
+			<view class="choice-title flex">
+				<image src="../../packagePrize/static/rolling_title.png" mode="scaleToFill" v-if="!comfirmShow">
+				</image>
+				<image src="../../packagePrize/static/choice_title.png" mode="scaleToFill" v-else></image>
+			</view>
+			<!-- 提示 -->
+			<view class="choice-tip flex" v-if="!comfirmShow">
+				<view class="choice-tip-content">以下奖品任选一件</view>
+			</view>
+			<!-- 奖品列表 -->
+			<view class="choice-list" v-if="!comfirmShow">
+				<view class="choice-list-item flex" v-for="(item, index) in prizeList" :key="index">
+					<view class="checkbox flex" :class="{ 'checkbox-action': actionIndex == index }"
+						@click="selectPrize(index)">
+						<u-icon name="checkmark" color="#fff" size="14"></u-icon>
+					</view>
+					<view class="info flex" @click="selectPrize(index)">
+						<image :src="item.picUrl" mode="aspectFit"></image>
+						<view class="info-content flex">
+							<!-- #ifdef MP-ALIPAY -->
+							<view class="info-content__titletwo ells"
+								v-if="item.prizeType && item.prizeType.value != 'coin'">{{ item.title }}</view>
+							<view class="info-content__titletwo ells" v-else>盲豆</view>
+							<!-- #endif -->
+							<!-- #ifndef MP-ALIPAY -->
+							<view class="info-content__title ells"
+								v-if="item.prizeType && item.prizeType.value != 'coin'">{{ item.title }}</view>
+							<view class="info-content__title ells" v-else>盲豆</view>
+							<!-- #endif -->
+
+							<view class="info-content__price" v-if="item.prizeType && item.prizeType.value != 'coin'">
+								¥{{ $numberFormat(item.value) }}</view>
+							<view class="info-content__price" v-else>{{ item.value }}个</view>
+						</view>
+					</view>
+					<view class="detail" @click="toPrizeGoods(item)" v-if="item.prizeType && item.prizeType.value != 'red_pkg'">查看</view>
+				</view>
+			</view>
+			<!-- 按钮 -->
+			<view class="footer-fixed flex" v-if="!comfirmShow">
+				<view class="footer-fixed-btn flex" @click="confirmPrize">
+					<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
+					<view class="footer-fixed-btn-txt">确认</view>
+				</view>
+			</view>
+
+			<view class="choice-box flex" v-if="comfirmShow">
+				<view class="choice-box-popup flex">
+					<view class="choice-box-popup__image flex">
+						<image :src="actionInfo.picUrl" mode="aspectFit"></image>
+					</view>
+				</view>
+			</view>
+			<view class="choice-info flex" v-if="comfirmShow">
+				<view class="choice-info-content">
+					<view class="choice-info-content-price"
+						v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">
+						<text>¥</text>{{ $numberFormat(actionInfo.value) }}
+					</view>
+					<view class="choice-info-content-price" v-else>{{ actionInfo.value }}个</view>
+					<view class="choice-info-content-title ells"
+						v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">{{ actionInfo.title }}
+					</view>
+					<view class="choice-info-content-title" v-else>盲豆</view>
+					<view class="choice-info-content-btn flex">
+						<view class="choice-info-content-btn-content flex" @click="toPrize(actionInfo.prizeType)">
+							<image src="../../packagePrize/static/rolling_btn.png" mode="aspectFit"></image>
+							<view class="choice-info-content-btn-content-txt"
+								v-if="actionInfo.prizeType && actionInfo.prizeType.value != 'coin'">去查看我的奖品</view>
+							<view class="choice-info-content-btn-content-txt" v-else>去商城兑换商品</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="choice-tip flex" @click="again" v-if="comfirmShow && type == 'offline'">
+				<view class="txt">再来一张</view>
+			</view>
+			<view class="choice-tip flex" @click="again" v-if="comfirmShow && type == 'online'">
+				<view class="txt">再买一个</view>
+			</view>
+			<!-- #ifdef MP-WEIXIN -->
+				<view class="choice-download flex" @click="saveImg" v-if="comfirmShow">
+					<image src="../../packagePrize/static/download1.png" mode="aspectFit"></image>
+					<view>下载海报</view>
+				</view>
+			<!-- #endif -->
+		</view>
+		<view v-else class="poster">
+		</view>
+
+		<!-- 详情 -->
+		<u-popup :show="detailShow" :round="11" mode="bottom" @close="detailShow = false" :closeable="true">
+			<view class="prize-detail flex">
+				<view class="prize-detail-title">奖品详情</view>
+				<view class="prize-detail-content">
+					<u-parse :content="description" :selectable="true"></u-parse>
+				</view>
+			</view>
+		</u-popup>
+
+		<!-- 海报 -->
+		<share-code ref="shareCode" :posterData.sync="posterData" />
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import { formatRichText, urlParameter } from '@/utils/util.js'
+	import ShareCode from "../components/hch-poster/hch-poster.vue"
+	export default {
+		components: {
+			ShareCode
+		},
+		data() {
+			return {
+				ticketId: '',
+				prizeList: [],
+				total: 0,
+				actionIndex: 0,
+				tipShow: false,
+				comfirmShow: false,
+				comfirmShow1: false,
+				actionInfo: {},
+				type: '',
+
+				statusHeight: 30,
+				detailShow: false,
+				description: '',
+
+				// 图片数据
+				// #ifdef H5
+				posterData: {
+					poster: {
+						//根据屏幕大小自动生成图片背景大小
+						url: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/prizeBackground.png", //图片地址
+						r: 15, //圆角半径
+						w: 350, //图片宽度
+						h: 600, //图片高度
+						p: 20 //图片内边距padding
+					},
+					title: {
+						// 商品名称
+						text: "", //文本
+						fontSize: 26, //字体大小
+						color: "#fff", //颜色
+						lineHeight: 44, //行高#4F4F4F 100%
+						mt: 90, //margin-top
+						w: 310,
+						align: "left"
+					},
+					mainImg: {
+						// 商品图
+						url: "", //图片地址
+						r: 5, //圆角半径
+						w: 160, //宽度
+						h: 160, //高度
+						mt: 270
+					},
+					codeImg: {
+						// 小程序码
+						url: "", //图片地址
+						w: 60, //宽度
+						h: 60, //高度
+						r: 2, //圆角半径
+						mt: 475
+					},
+					tips: []
+				},
+				// #endif
+				// #ifndef H5
+				posterData: {
+					poster: {
+						//根据屏幕大小自动生成图片背景大小
+						url: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/prizeBackground.png", //图片地址
+						r: 15, //圆角半径
+						w: 350, //图片宽度
+						h: 600, //图片高度
+						p: 20 //图片内边距padding
+					},
+					title: {
+						// 商品名称
+						text: "", //文本
+						fontSize: 26, //字体大小
+						color: "#fff", //颜色
+						lineHeight: 44, //行高#4F4F4F 100%
+						mt: 90, //margin-top
+						w: 310,
+						align: "left"
+					},
+					mainImg: {
+						// 商品图
+						url: "", //图片地址
+						r: 5, //圆角半径
+						w: 160, //宽度
+						h: 160, //高度
+						mt: 270
+					},
+					codeImg: {
+						// 小程序码
+						url: "", //图片地址
+						w: 60, //宽度
+						h: 60, //高度
+						r: 2, //圆角半径
+						mt: 475
+					},
+					tips: []
+				},
+				// #endif
+			};
+		},
+		onLoad(options) {
+			if(options.toIndex) {
+				this.toIndex()
+				return
+			}else {
+				this.comfirmShow1 = true
+			}
+			this.ticketId = options.id
+			// #ifdef MP-WEIXIN
+			const res = uni.getMenuButtonBoundingClientRect()
+			this.statusHeight = res.top //胶囊距离顶部
+			// #endif
+			this.getPrizeList()
+		},
+		onShow() {
+			this.getUrl()
+		},
+		methods: {
+			getPrizeList() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let data = {
+					ticketId: this.ticketId
+				}
+				$http.post('/api/v1/mp/user/ticket/queryHitPrizeList', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.type = res.data.type
+						res.data.prizeList.forEach(item => {
+							let picUrlArr = item.picUrl.split(',')
+							item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
+							item.prizeType = JSON.parse(item.prizeType)
+						})
+						if (res.data.prizeList.length == 1) {
+							let item = res.data.prizeList[this.actionIndex]
+							// this.posterData.title.text = item.title || ''
+							this.posterData.title.text = item.title.length > 11 ? item.title.slice(0, 11).concat("...") : item.title ;
+							this.posterData.mainImg.url = item.picUrl
+							this.actionInfo = item
+							$http.post('/api/v1/mp/user/ticket/cashPrize', {
+								ticketId: this.ticketId,
+								awardsId: item.awardsId,
+								prizeId: item.prizeId
+							}).then(res => {
+								if (res.code == 0) {
+									this.comfirmShow = true
+								}
+							})
+							return
+						}
+						this.ticketId = res.data.ticketId
+						this.total = this.prizeList.length
+						this.prizeList = res.data.prizeList
+					} else if (res.code == 1018) {
+						this.tipShow = true
+					} else {
+						this.tipShow = true
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			selectPrize(index) {
+				this.actionIndex = index
+			},
+
+			confirmPrize() {
+				let _this = this
+				let item = _this.prizeList[_this.actionIndex]
+				// this.posterData.title.text = item.title || ''
+				this.posterData.title.text = item.title.length > 11 ? item.title.slice(0, 11).concat("...") : item.title ;
+				this.posterData.mainImg.url = item.picUrl
+				_this.actionInfo = item
+				if (_this.prizeList.length > 1) {
+					uni.showModal({
+						title: '提示',
+						content: '确定选择该奖品吗?',
+						success(res) {
+							if (res.confirm) {
+								$http.post('/api/v1/mp/user/ticket/cashPrize', {
+									ticketId: _this.ticketId,
+									awardsId: item.awardsId,
+									prizeId: item.prizeId
+								}).then(res => {
+									if (res.code == 0) {
+										_this.comfirmShow = true
+									}
+								})
+							}
+						}
+					})
+				} else {
+					$http.post('/api/v1/mp/user/ticket/cashPrize', {
+						ticketId: _this.ticketId,
+						awardsId: item.awardsId,
+						prizeId: item.prizeId
+					}).then(res => {
+						if (res.code == 0) {
+							_this.comfirmShow = true
+						}
+					})
+				}
+			},
+
+			toIndex() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+
+			back() {
+				let pages = getCurrentPages();
+				if (pages.length > 1) {
+					uni.navigateBack({
+						delta: 1
+					})
+				} else {
+					uni.switchTab({
+						url: '/pages/core/index'
+					})
+				}
+			},
+
+			toPrize(data) {
+				if (data.value == 'goods') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index'
+					})
+				}
+				if (data.value == 'coupon') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index?coupon=1'
+					})
+				}
+				if (data.value == 'coupon_pkg') {
+					uni.redirectTo({
+						url: '/packagePrize/prize/index?coupon=1'
+					})
+				}
+				if (data.value == 'coin') {
+					uni.switchTab({
+						url: '/pages/core/index'
+					})
 				}
-				$http.post('/api/v1/mp/user/ticket/queryHitPrizeList', data).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.type = res.data.type
-						res.data.prizeList.forEach(item => {
-							let picUrlArr = item.picUrl.split(',')
-							item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
-							item.prizeType = JSON.parse(item.prizeType)
-						})
-						if(res.data.prizeList.length == 1) {
-							let item = res.data.prizeList[this.actionIndex]
-							this.actionInfo = item
-							$http.post('/api/v1/mp/user/ticket/cashPrize', {
-								ticketId: this.ticketId,
-								awardsId: item.awardsId,
-								prizeId: item.prizeId
-							}).then(res => {
-								if (res.code == 0) {
-									this.comfirmShow = true
-								}
-							})
-							return
-						}
-						this.ticketId = res.data.ticketId
-						this.total = this.prizeList.length
-						this.prizeList = res.data.prizeList
-					} else if (res.code == 1018) {
-						this.tipShow = true
-					} else {
-						this.tipShow = true
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			selectPrize(index) {
-				this.actionIndex = index
-			},
-
-			confirmPrize() {
-				let _this = this
-				let item = _this.prizeList[_this.actionIndex]
-				_this.actionInfo = item
-				if (_this.prizeList.length > 1) {
-					uni.showModal({
-						title: '提示',
-						content: '确定选择该奖品吗?',
-						success(res) {
-							if (res.confirm) {
-								$http.post('/api/v1/mp/user/ticket/cashPrize', {
-									ticketId: _this.ticketId,
-									awardsId: item.awardsId,
-									prizeId: item.prizeId
-								}).then(res => {
-									if (res.code == 0) {
-										_this.comfirmShow = true
-									}
-								})
-							}
-						}
-					})
-				} else {
-					$http.post('/api/v1/mp/user/ticket/cashPrize', {
-						ticketId: _this.ticketId,
-						awardsId: item.awardsId,
-						prizeId: item.prizeId
-					}).then(res => {
-						if (res.code == 0) {
-							_this.comfirmShow = true
-						}
-					})
-				}
-			},
-
-			toIndex() {
-				uni.switchTab({
-					url: '/pages/index/index'
-				})
-			},
-
-			back() {
-				let pages = getCurrentPages();
-				if (pages.length > 1) {
-					uni.navigateBack({
-						delta: 1
-					})
-				} else {
-					uni.switchTab({
-						url: '/pages/core/index'
-					})
-				}
-			},
-
-			toPrize(data) {
-				if (data.value == 'goods') {
-					uni.redirectTo({
-						url: '/packagePrize/prize/index'
-					})
-				}
-				if (data.value == 'coupon') {
+				if (data.value == 'red_pkg') {
 					uni.redirectTo({
-						url: '/packagePrize/prize/index?coupon=1'
-					})
-				}
-				if (data.value == 'coupon_pkg') {
-					uni.redirectTo({
-						url: '/packagePrize/prize/index?coupon=1'
-					})
-				}
-				if (data.value == 'coin') {
-					uni.switchTab({
-						url: '/pages/core/index'
+						url: '/packagePrize/prize/index?coupon=2'
 					})
-				}
-			},
-			
-			toPrizeGoods(item) {
-				if (item.prizeType.value == "goods") {
-					this.getGoodsDetail(item.refId)
-				}
-				//门店优惠券
-				if (item.prizeType.value == "coupon" || item.prizeType.value == "coupon_pkg") {
-					this.getGoodsDetail(425)
-				}
-				// 盲豆
-				if (item.prizeType.value == "coin") {
-					this.getGoodsDetail(424)
-				}
-			},
-			
-			toUser() {
-				uni.switchTab({
-					url: '/pages/user/index'
-				})
-			},
-			
-			getGoodsDetail(id) {
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/exchange/goods/detail', {
-					noToken: true,
-					goodsId: id
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.detailShow = true
-						// 处理富文本
-						// #ifndef MP-ALIPAY
-						const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
-							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
-								".png?imageView2/2/w/750\"");
-						this.description = formatRichText(description);
-						// #endif
-						
-						// #ifdef MP-ALIPAY
-						res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
-						res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
-						res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
-						this.description = formatRichText(res.data.description);
-						// #endif
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-			
-			again() {
-				let _this = this
-				if(this.type == 'online') {
-					uni.switchTab({
-						url: '/pages/index/index'
-					})
-				} else {
-					uni.scanCode({
-						scanType: ['qrCode'],
-						success(res) {
-							const url = res.result
-							let serialNo = urlParameter(url).id
-							uni.redirectTo({
-								url: `/pages/lucky/index?id=${ serialNo }&type=offline`
-							})
-						},
-						fail() {
-							uni.$u.toast('请扫二维码');
-						}
-					});
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.choice {
-		display: flex;
-		flex-direction: column;
-		position: relative;
-		width: 100%;
-		height: 100vh;
-		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/offline_prize_bkg.png) center center no-repeat;
-		background-size: 100vw 100vh;
-		overflow: hidden;
-		
-		// 返回
-		&-navLeft {
-			position: absolute;
-			left: 34rpx;
-			width: 66rpx;
-			height: 66rpx;
-			background-color: rgba(255, 255, 255, .36);
-			border-radius: 50%;
-		}
-		
-		// 标题
-		&-title {
-			padding-top: 15vh;
-			margin-bottom: 72rpx;
-			
-			image {
-				width: 484rpx;
-				height: 108rpx;
-			}
-		}
-		
-		// 提示
-		&-tip {
-			&-content {
-				width: 50vw;
-				height: 56rpx;
-				line-height: 56rpx;
-				background: rgba(255, 211, 157, .44);
-				border-radius: 24rpx;
-				color: #FB900B;
-				font-size: 30rpx;
-				text-align: center;
-			}
-		}
-		
-		// 奖品列表
-		&-list {
-			flex: 1;
-			margin: 72rpx 48rpx 0;
-			padding-bottom: 200rpx;
-			overflow-y: auto;
-			
-			&-item {
-				justify-content: space-between;
-				background-color: #fff;
-				border-radius: 12rpx;
-				padding: 38rpx 24rpx;
-				margin-bottom: 54rpx;
-				
-				.checkbox {
-					width: 46rpx;
-					height: 46rpx;
-					border: 1px solid #F56D1B;
-					border-radius: 50%;
-				}
-				
-				.checkbox-action {
-					background: #F56D1B;
-				}
-				
-				.info {
-					margin: 0 30rpx;
-					flex: 1;
-					justify-content: flex-start;
-					
-					image {
-						width: 120rpx;
-						height: 120rpx;
-						margin-right: 34rpx;
-					}
-					
-					&-content {
-						height: 120rpx;
-						flex: 1;
-						align-items: flex-start;
-						flex-direction: column;
-						justify-content: space-between;
-						
-						&__title {
-							width: 100%;
-							height: 70rpx;
-							font-size: 30rpx;
-							line-height: 35rpx;
-						}
-						&__titletwo {
-							width: 100%;
-							height: 67rpx;
-							font-size: 30rpx;
-							line-height: 35rpx;
-							overflow: hidden;
-						}
-						
-						&__price {
-							font-weight: bold;
-						}
-					}
-				}
-				
-				.detail {
-					color: #F56D1B;
-				}
-			}
-		}
-		
-		&-box {
-			margin-bottom: 34rpx;
-			
-			&-popup {
-				flex-direction: column;
-				width: 75vw;
-				height: 38vh;
-				background-color: #FFFFFF;
-				border-radius: 22rpx;
-				
-				&__image {
-					width: 65%;
-					height: 65%;
-					
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-			}
-		}
-		
-		&-info {
-			margin-bottom: 40rpx;
-			
-			&-content {
-				width: 70vw;
-				
-				&-price {
-					text-align: center;
-					font-size: 40rpx;
-					line-height: 40rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #FFFFFF;
-					margin-bottom: 20rpx;
-					
-					text {
-						font-size: 28rpx;
-					}
-				}
-				
-				&-title {
-					height: 36rpx;
-					overflow: hidden;
-					text-align: center;
-					font-size: 36rpx;
-					line-height: 36rpx;
-					color: #FFFFFF;
-					margin-bottom: 40rpx;
-				}
-				
-				&-btn {
-					&-content {
-						position: relative;
-						width: 70vw;
-						
-						image {
-							width: 70vw;
-							height: 112rpx;
-						}
-						
-						&-txt {
-							position: absolute;
-							top: 0;
-							height: 112rpx;
-							line-height: 112rpx;
-							font-size: 30rpx;
-							text-align: center;
-							color: #FFFFFF;
-						}
-					}
-				}
-			}
-		}
-		
-		&-tip {
-			.txt {
-				width: 332rpx;
-				height: 66rpx;
-				line-height: 66rpx;
-				text-align: center;
-				background: rgba(255, 211, 157, .3);
-				border-radius: 34rpx;
-				font-size: 34rpx;
-				font-weight: 500;
-				color: #FB930D;
-			}
-		}
-	}
-	
-	// 按钮
-	.footer-fixed {
-		position: fixed;
-		bottom: var(--window-bottom);
-		left: 0;
-		right: 0;
-		z-index: 11;
-		// 设置ios刘海屏底部横线安全区域
-		padding-bottom: constant(safe-area-inset-bottom);
-		padding-bottom: env(safe-area-inset-bottom);
-		
-		&-btn {
-			padding: 0 0 20rpx;
-			position: relative;
-			width: 70vw;
-			
-			image {
-				width: 70vw;
-				height: 112rpx;
-			}
-			
-			&-txt {
-				position: absolute;
-				top: 0;
-				height: 112rpx;
-				line-height: 112rpx;
-				font-size: 30rpx;
-				text-align: center;
-				color: #FFFFFF;
-			}
-		}
-
-		.btn {
-			padding: 20rpx 0;
-
-			::v-deep button {
-				width: 640rpx;
-				height: 90rpx;
-				line-height: 90rpx;
-				font-size: 36rpx;
-				color: #fff;
-				background-color: $uni-bg-color;
-				border: none;
-				border-radius: 20rpx;
-			}
-		}
-	}
-	
-	.prize-detail {
-		flex-direction: column;
-		height: 60vh;
-
-		&-title {
-			padding: 40rpx 0;
-			text-align: center;
-			font-size: 34rpx;
-			line-height: 34rpx;
-			font-weight: bold;
-		}
-		
-		&-content {
-			width: 100vw;
-			flex: 1;
-			overflow-y: auto;
-		}
-	}
-
-	.null-prize {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		width: 80vw;
-		height: 320rpx;
-		background-color: #FFFFFF;
-		border: 1px solid rgba(187, 187, 187, 100);
-
-		.btn {
-			margin-top: 60rpx;
-			width: 160rpx;
-			height: 60rpx;
-			line-height: 60rpx;
-			border-radius: 8rpx;
-			background-color: rgba(235, 112, 9, 100);
-			color: rgba(255, 255, 255, 100);
-			font-size: 28rpx;
-			text-align: center;
-		}
-	}
-
-	.confirm-prize {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		width: 80vw;
-		padding: 40rpx 0;
-
-		&-info {
-			width: 80%;
-			margin-bottom: 60rpx;
-			justify-content: space-around;
-
-			image {
-				width: 150rpx;
-				height: 200rpx;
-			}
-
-			.title {
-				flex: 1;
-				padding-left: 40rpx;
-			}
-		}
-
-		&-tip {
-			text-align: center;
-			margin-bottom: 60rpx;
-
-			text {
-				padding-left: 24rpx;
-				color: rgba(32, 163, 242, 100);
-			}
-		}
-
-		&-btn {
-			width: 80%;
-			justify-content: space-around;
-
-			.back {
-				width: 160rpx;
-				height: 60rpx;
-				line-height: 60rpx;
-				border-radius: 8rpx;
-				color: rgba(235, 112, 9, 100);
-				font-size: 28rpx;
-				text-align: center;
-				font-family: Microsoft Yahei;
-				border: 1px solid rgba(235, 112, 9, 100);
-			}
-
-			.confirm {
-				width: 160rpx;
-				height: 60rpx;
-				line-height: 60rpx;
-				border-radius: 8rpx;
-				background-color: rgba(235, 112, 9, 100);
-				color: rgba(253, 253, 253, 100);
-				font-size: 28rpx;
-				text-align: center;
-			}
-		}
-	}
-</style>
+				}
+			},
+
+			toPrizeGoods(item) {
+				if (item.prizeType.value == "goods") {
+					this.getGoodsDetail(item.refId)
+				}
+				//门店优惠券
+				if (item.prizeType.value == "coupon" || item.prizeType.value == "coupon_pkg") {
+					if(item.couponDetail && item.couponDetail != '') {
+						this.detailShow = true
+						// 处理富文本
+						// #ifndef MP-ALIPAY
+						const description = item.couponDetail.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+								".png?imageView2/2/w/750\"");
+						this.description = formatRichText(description);
+						// #endif
+						// #ifdef MP-ALIPAY
+						item.couponDetail.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+						item.couponDetail.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+						item.couponDetail.split(".png\"").join(".png?imageView2/2/w/750\"")
+						this.description = formatRichText(item.couponDetail);
+						// #endif
+					}else {
+						this.getGoodsDetail(425)
+					}
+					
+				}
+				// 盲豆
+				if (item.prizeType.value == "coin") {
+					this.getGoodsDetail(424)
+				}
+			},
+
+			toUser() {
+				uni.switchTab({
+					url: '/pages/user/index'
+				})
+			},
+
+			getGoodsDetail(id) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/exchange/goods/detail', {
+					noToken: true,
+					goodsId: id
+				}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.detailShow = true
+						// 处理富文本
+						// #ifndef MP-ALIPAY
+						const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+								".png?imageView2/2/w/750\"");
+						this.description = formatRichText(description);
+						// #endif
+
+						// #ifdef MP-ALIPAY
+						res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+						res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+						res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
+						this.description = formatRichText(res.data.description);
+						// #endif
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			again() {
+				let _this = this
+				if (this.type == 'online') {
+					uni.switchTab({
+						url: '/pages/index/index'
+					})
+				} else {
+					uni.scanCode({
+						scanType: ['qrCode'],
+						success(res) {
+							const url = res.result
+							let serialNo = urlParameter(url).id
+							uni.redirectTo({
+								url: `/pages/lucky/index?id=${ serialNo }&type=offline`
+							})
+						},
+						fail() {
+							uni.$u.toast('请扫二维码');
+						}
+					});
+				}
+			},
+			
+			getUrl() {
+				//获取二维码
+				$http.post('/api/v1/mp/user/share/code/generate', {
+					boxId: this.boxId,
+					type: "1",
+					poster: "1",
+				}).then(res => {
+					this.posterData.codeImg.url = env.filePublic + res.data
+				})
+			},
+
+			saveImg() {
+				//下载海报
+				this.$refs.shareCode.posterShow()
+			},
+		},
+		onShareAppMessage(res) {
+			return {
+				title: '分享奖品',
+				path: `/pages/index/index`,
+				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/sharePosterCover.png',
+			}
+		},
+		//分享朋友圈
+		onShareTimeline() {
+			return {
+				title: '分享奖品',
+				query: `toIndex=true`,
+				imageUrl: 'https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/sharePosterCover.png',
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.poster {
+		display: flex;
+		flex-direction: column;
+		position: relative;
+		width: 100%;
+		height: 100vh;
+		background: url(https://mp-public-test-1309783959.cos.ap-shanghai.myqcloud.com/EQCE9TSY4VTY2C4RCTPW.jpg) center center no-repeat;
+		background-size: 100vw 100vh;
+		overflow: hidden;
+	}
+	.choice {
+		display: flex;
+		flex-direction: column;
+		position: relative;
+		width: 100%;
+		height: 100vh;
+		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/offline_prize_bkg.png) center center no-repeat;
+		background-size: 100vw 100vh;
+		overflow: hidden;
+
+		// 返回
+		&-navLeft {
+			position: absolute;
+			left: 34rpx;
+			width: 66rpx;
+			height: 66rpx;
+			background-color: rgba(255, 255, 255, .36);
+			border-radius: 50%;
+		}
+
+		// 标题
+		&-title {
+			padding-top: 12vh;
+			margin-bottom: 72rpx;
+
+			image {
+				width: 484rpx;
+				height: 108rpx;
+			}
+		}
+
+		// 提示
+		&-tip {
+			&-content {
+				width: 50vw;
+				height: 56rpx;
+				line-height: 56rpx;
+				background: rgba(255, 211, 157, .44);
+				border-radius: 24rpx;
+				color: #FB900B;
+				font-size: 30rpx;
+				text-align: center;
+			}
+		}
+
+		//下载海报
+		&-download {
+			margin-top: 50rpx;
+
+			>image {
+				width: 40rpx;
+				height: 40rpx;
+			}
+
+			>view {
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #fff;
+			}
+		}
+
+		// 奖品列表
+		&-list {
+			flex: 1;
+			margin: 72rpx 48rpx 0;
+			padding-bottom: 200rpx;
+			overflow-y: auto;
+
+			&-item {
+				justify-content: space-between;
+				background-color: #fff;
+				border-radius: 12rpx;
+				padding: 38rpx 24rpx;
+				margin-bottom: 54rpx;
+
+				.checkbox {
+					width: 46rpx;
+					height: 46rpx;
+					border: 1px solid #F56D1B;
+					border-radius: 50%;
+				}
+
+				.checkbox-action {
+					background: #F56D1B;
+				}
+
+				.info {
+					margin: 0 30rpx;
+					flex: 1;
+					justify-content: flex-start;
+
+					image {
+						width: 120rpx;
+						height: 120rpx;
+						margin-right: 34rpx;
+					}
+
+					&-content {
+						height: 120rpx;
+						flex: 1;
+						align-items: flex-start;
+						flex-direction: column;
+						justify-content: space-between;
+
+						&__title {
+							width: 100%;
+							height: 70rpx;
+							font-size: 30rpx;
+							line-height: 35rpx;
+						}
+
+						&__titletwo {
+							width: 100%;
+							height: 67rpx;
+							font-size: 30rpx;
+							line-height: 35rpx;
+							overflow: hidden;
+						}
+
+						&__price {
+							font-weight: bold;
+						}
+					}
+				}
+
+				.detail {
+					color: #F56D1B;
+				}
+			}
+		}
+
+		&-box {
+			margin-bottom: 34rpx;
+
+			&-popup {
+				flex-direction: column;
+				width: 75vw;
+				height: 38vh;
+				background-color: #FFFFFF;
+				border-radius: 22rpx;
+
+				&__image {
+					width: 65%;
+					height: 65%;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
+
+		&-info {
+			margin-bottom: 40rpx;
+
+			&-content {
+				width: 70vw;
+
+				&-price {
+					text-align: center;
+					font-size: 40rpx;
+					line-height: 40rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #FFFFFF;
+					margin-bottom: 20rpx;
+
+					text {
+						font-size: 28rpx;
+					}
+				}
+
+				&-title {
+					height: 36rpx;
+					overflow: hidden;
+					text-align: center;
+					font-size: 36rpx;
+					line-height: 36rpx;
+					color: #FFFFFF;
+					margin-bottom: 40rpx;
+				}
+
+				&-btn {
+					&-content {
+						position: relative;
+						width: 70vw;
+
+						image {
+							width: 70vw;
+							height: 112rpx;
+						}
+
+						&-txt {
+							position: absolute;
+							top: 0;
+							height: 112rpx;
+							line-height: 112rpx;
+							font-size: 30rpx;
+							text-align: center;
+							color: #FFFFFF;
+						}
+					}
+				}
+			}
+		}
+
+		&-tip {
+			.txt {
+				width: 332rpx;
+				height: 66rpx;
+				line-height: 66rpx;
+				text-align: center;
+				background: rgba(255, 211, 157, .3);
+				border-radius: 34rpx;
+				font-size: 34rpx;
+				font-weight: 500;
+				color: #FB930D;
+			}
+		}
+	}
+
+	// 按钮
+	.footer-fixed {
+		position: fixed;
+		bottom: var(--window-bottom);
+		left: 0;
+		right: 0;
+		z-index: 11;
+		// 设置ios刘海屏底部横线安全区域
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+
+		&-btn {
+			padding: 0 0 20rpx;
+			position: relative;
+			width: 70vw;
+
+			image {
+				width: 70vw;
+				height: 112rpx;
+			}
+
+			&-txt {
+				position: absolute;
+				top: 0;
+				height: 112rpx;
+				line-height: 112rpx;
+				font-size: 30rpx;
+				text-align: center;
+				color: #FFFFFF;
+			}
+		}
+
+		.btn {
+			padding: 20rpx 0;
+
+			::v-deep button {
+				width: 640rpx;
+				height: 90rpx;
+				line-height: 90rpx;
+				font-size: 36rpx;
+				color: #fff;
+				background-color: $uni-bg-color;
+				border: none;
+				border-radius: 20rpx;
+			}
+		}
+	}
+
+	.prize-detail {
+		flex-direction: column;
+		height: 60vh;
+
+		&-title {
+			padding: 40rpx 0;
+			text-align: center;
+			font-size: 34rpx;
+			line-height: 34rpx;
+			font-weight: bold;
+		}
+
+		&-content {
+			width: 100vw;
+			flex: 1;
+			overflow-y: auto;
+		}
+	}
+
+	.null-prize {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		width: 80vw;
+		height: 320rpx;
+		background-color: #FFFFFF;
+		border: 1px solid rgba(187, 187, 187, 100);
+
+		.btn {
+			margin-top: 60rpx;
+			width: 160rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+			border-radius: 8rpx;
+			background-color: rgba(235, 112, 9, 100);
+			color: rgba(255, 255, 255, 100);
+			font-size: 28rpx;
+			text-align: center;
+		}
+	}
+
+	.confirm-prize {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		width: 80vw;
+		padding: 40rpx 0;
+
+		&-info {
+			width: 80%;
+			margin-bottom: 60rpx;
+			justify-content: space-around;
+
+			image {
+				width: 150rpx;
+				height: 200rpx;
+			}
+
+			.title {
+				flex: 1;
+				padding-left: 40rpx;
+			}
+		}
+
+		&-tip {
+			text-align: center;
+			margin-bottom: 60rpx;
+
+			text {
+				padding-left: 24rpx;
+				color: rgba(32, 163, 242, 100);
+			}
+		}
+
+		&-btn {
+			width: 80%;
+			justify-content: space-around;
+
+			.back {
+				width: 160rpx;
+				height: 60rpx;
+				line-height: 60rpx;
+				border-radius: 8rpx;
+				color: rgba(235, 112, 9, 100);
+				font-size: 28rpx;
+				text-align: center;
+				font-family: Microsoft Yahei;
+				border: 1px solid rgba(235, 112, 9, 100);
+			}
+
+			.confirm {
+				width: 160rpx;
+				height: 60rpx;
+				line-height: 60rpx;
+				border-radius: 8rpx;
+				background-color: rgba(235, 112, 9, 100);
+				color: rgba(253, 253, 253, 100);
+				font-size: 28rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 470 - 0
src/packagePrize/components/hch-poster/hch-poster.vue

@@ -0,0 +1,470 @@
+<!--
+ * @Description: 生成图片组件
+ * @Version: 1.0.0
+ * @Autor: 
+ * @Date: 2020-08-07 14:48:41
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2021-07-31 18:11:35
+ * 保存图片按钮和关闭按钮 在html代码中写出来 绑定点击方法然后透明 再用canvas 覆盖
+-->
+
+<template>
+	<view class="canvas-content" v-show="canvasShow" :style="'width:' + system.w + 'px; height:' + system.h + 'px;'">
+		<!-- 遮罩层 -->
+		<view class="canvas-mask"></view>
+		<!-- 图片 -->
+		<!-- :width="system.w" :height="system.h" 支付宝必须要这样设置宽高才有效果 -->
+		<canvas class="canvas" canvas-id="myCanvas" id="myCanvas"
+			:style="'width:' + system.w + 'px; height:' + system.h + 'px;'" :width="system.w"
+			:height="system.h"></canvas>
+		<view class="button-wrapper">
+			<!-- 保存图片按钮 -->
+			<!-- #ifndef MP-QQ -->
+			<!-- cover-view 标签qq小程序有问题 -->
+			<cover-view class="save-btn" @tap="handleSaveCanvasImage">保存</cover-view>
+			<cover-view class="save-btn cancel-btn" @tap="handleCanvasCancel">取消</cover-view>
+			<!-- #endif -->
+			<!-- #ifdef MP-QQ -->
+			<view class="save-btn" @tap="handleSaveCanvasImage">保存</view>
+			<view class="save-btn cancel-btn" @tap="handleCanvasCancel">取消</view>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		drawSquarePic,
+		drawTextReturnH,
+		getSystem
+	} from '@/common/poster'
+	export default {
+		data() {
+			return {
+				system: {},
+				canvasShow: false
+			}
+		},
+		props: {
+			posterData: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		computed: {
+			/**
+			 * @description: 计算图片背景数据
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			poster() {
+				let data = this.posterData
+				let system = this.system
+				let posterBg = {
+					url: data.poster.url,
+					r: data.poster.r * system.scale,
+					w: data.poster.w * system.scale,
+					h: data.poster.h * system.scale,
+					x: (system.w - data.poster.w * system.scale) / 2,
+					y: (system.h - data.poster.h * system.scale) / 2,
+					p: data.poster.p * system.scale
+				}
+				return posterBg
+			},
+			
+			// #ifdef H5
+			/**
+			 * @description: 计算图片标题
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			title() {
+				let data = this.posterData
+				let system = this.system
+				let posterTitle = data.title
+				posterTitle.x = (system.w - data.title.w * system.scale) / 2
+				posterTitle.y = this.poster.y + data.poster.p + data.title.mt * system.scale
+				return posterTitle
+			},
+			/**
+			 * @description: 计算图片头部主图
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			mainImg() {
+				let data = this.posterData
+				let system = this.system
+				let posterMain = {
+					url: data.mainImg.url,
+					r: data.mainImg.r * system.scale,
+					w: data.mainImg.w * system.scale,
+					h: data.mainImg.h * system.scale,
+					x: (system.w - data.mainImg.w * system.scale) / 1.7,
+					y: this.poster.y + data.poster.p + data.mainImg.mt * system.scale
+				}
+				return posterMain
+			},
+			/**
+			 * @description: 计算小程序码
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			codeImg() {
+				let data = this.posterData
+				let system = this.system
+				let posterCode = {
+					url: data.codeImg.url,
+					r: data.codeImg.r * system.scale,
+					w: data.codeImg.w * system.scale,
+					h: data.codeImg.h * system.scale,
+					x: (system.w - data.codeImg.w * system.scale) / 2.8,
+					y: this.poster.y + data.poster.p + data.codeImg.mt * system.scale //y需要加上绘图后文本的y
+				}
+				return posterCode
+			}
+			// #endif
+			
+			
+			// #ifndef H5
+			/**
+			 * @description: 计算图片标题
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			title() {
+				let data = this.posterData
+				let system = this.system
+				let posterTitle = data.title
+				posterTitle.x = (system.w - data.title.w * system.scale) / 2
+				posterTitle.y = this.poster.y + data.poster.p + data.title.mt * system.scale
+				return posterTitle
+			},
+			/**
+			 * @description: 计算图片头部主图
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			mainImg() {
+				let data = this.posterData
+				let system = this.system
+				let posterMain = {
+					url: data.mainImg.url,
+					r: data.mainImg.r * system.scale,
+					w: data.mainImg.w * system.scale,
+					h: data.mainImg.h * system.scale,
+					x: (system.w - data.mainImg.w * system.scale) / 1.7,
+					y: this.poster.y + data.poster.p + data.mainImg.mt * system.scale
+				}
+				return posterMain
+			},
+			/**
+			 * @description: 计算小程序码
+			 * @param {*}
+			 * @return {*}
+			 * @author: hch
+			 */
+			codeImg() {
+				let data = this.posterData
+				let system = this.system
+				let posterCode = {
+					url: data.codeImg.url,
+					r: data.codeImg.r * system.scale,
+					w: data.codeImg.w * system.scale,
+					h: data.codeImg.h * system.scale,
+					x: (system.w - data.codeImg.w * system.scale) / 2.8,
+					y: this.poster.y + data.poster.p + data.codeImg.mt * system.scale //y需要加上绘图后文本的y
+				}
+				return posterCode
+			}
+			// #endif
+			
+		},
+		created() {
+			// 获取设备信息
+			this.system = getSystem()
+		},
+		methods: {
+			/**
+			 * @description: 展示图片
+			 * @param {type}
+			 * @return {type}
+			 * @author: hch
+			 */
+			posterShow() {
+				this.canvasShow = true
+				this.creatPoster()
+			},
+			/**
+			 * @description: 生成图片
+			 * @author: hch
+			 */
+			async creatPoster() {
+				uni.showLoading({
+					title: '生成海报中...'
+				})
+				const ctx = uni.createCanvasContext('myCanvas', this)
+				this.ctx = ctx
+				ctx.clearRect(0, 0, this.system.w, this.system.h) //清空之前的图片
+				ctx.draw() //清空之前的图片
+				// 根据设备屏幕大小和距离屏幕上下左右距离,及圆角绘制背景
+				let poster = this.poster
+				let mainImg = this.mainImg
+				let codeImg = this.codeImg
+				let title = this.title
+				await drawSquarePic(ctx, poster.x, poster.y, poster.w, poster.h, poster.r, poster.url)
+				await drawSquarePic(ctx, mainImg.x, mainImg.y, mainImg.w, mainImg.h, mainImg.r, mainImg.url)
+				// await drawSquarePic(ctx, codeImg.x, codeImg.y, codeImg.w, codeImg.h, codeImg.r, codeImg.url)
+				// 绘制标题 textY 绘制文本的y位置
+				console.log('creatPoster -> mainImg.x', mainImg.x)
+				let textY = drawTextReturnH(
+					ctx,
+					title.text,
+					title.x,
+					title.y,
+					title.w,
+					title.fontSize,
+					title.color,
+					title.background,
+					title.lineHeight,
+					title.align
+				)
+				// 绘制小程序码
+				await drawSquarePic(
+					ctx,
+					codeImg.x,
+					codeImg.y,
+					codeImg.w,
+					codeImg.h,
+					codeImg.r,
+					codeImg.url
+				)
+				// 小程序的名称
+				// 长按/扫描识别查看商品
+				let y = 0
+				this.posterData.tips.forEach((element, i) => {
+					if (i == 0) {
+						y = codeImg.y + textY + element.mt + codeImg.h
+					} else {
+						y += element.mt
+					}
+					y = drawTextReturnH(
+						ctx,
+						element.text,
+						title.x,
+						y,
+						mainImg.w,
+						element.fontSize,
+						element.color,
+						element.background,
+						element.lineHeight,
+						element.align
+					)
+				})
+				uni.hideLoading()
+			},
+			/**
+			 * @description: 保存到系统相册
+			 * @param {type}
+			 * @return {type}
+			 * @author: hch
+			 */
+			handleSaveCanvasImage() {
+				uni.showLoading({
+					title: '保存中...'
+				})
+				let _this = this
+				// 把画布转化成临时文件
+				// #ifndef MP-ALIPAY
+				// 支付宝小程序外,其他都是用这个方法 canvasToTempFilePath
+				uni.canvasToTempFilePath({
+						x: this.poster.x,
+						y: this.poster.y,
+						width: this.poster.w, // 画布的宽
+						height: this.poster.h, // 画布的高
+						destWidth: this.poster.w * 5,
+						destHeight: this.poster.h * 5,
+						canvasId: 'myCanvas',
+						success(res) {
+							//保存图片至相册
+							// #ifndef H5
+							// 除了h5以外的其他端
+							uni.saveImageToPhotosAlbum({
+								filePath: res.tempFilePath,
+								success(res) {
+									uni.hideLoading()
+									uni.showToast({
+										title: '海报保存成功,可以去分享啦~',
+										duration: 2000,
+										icon: 'none'
+									})
+									_this.handleCanvasCancel()
+								},
+								fail(res1) {
+									uni.showToast({
+										title: '保存失败,稍后再试',
+										duration: 2000,
+										icon: 'none'
+									})
+									uni.hideLoading()
+								}
+							})
+							// #endif
+
+							// #ifdef H5
+							// h5的时候
+							uni.showToast({
+								title: '请长按保存',
+								duration: 3000,
+								icon: 'none'
+							})
+							_this.handleCanvasCancel()
+							_this.$emit('previewImage', res.tempFilePath)
+							// #endif
+						},
+						fail(res) {
+							console.log('fail -> res', res)
+							uni.showToast({
+								title: '保存失败,稍后再试',
+								duration: 2000,
+								icon: 'none'
+							})
+							uni.hideLoading()
+						}
+					},
+					this
+				)
+				// #endif
+				// #ifdef MP-ALIPAY
+				// 支付宝小程序条件下 toTempFilePath
+				this.ctx.toTempFilePath({
+						x: this.poster.x,
+						y: this.poster.y,
+						width: this.poster.w, // 画布的宽
+						height: this.poster.h, // 画布的高
+						destWidth: this.poster.w * 5,
+						destHeight: this.poster.h * 5,
+						success(res) {
+							//保存图片至相册
+							my.saveImage({
+								url: res.apFilePath,
+								showActionSheet: true,
+								success(res) {
+									uni.hideLoading()
+									uni.showToast({
+										title: '图片保存成功,可以去分享啦~',
+										duration: 2000,
+										icon: 'none'
+									})
+									_this.handleCanvasCancel()
+								},
+								fail() {
+									uni.showToast({
+										title: '保存失败,稍后再试',
+										duration: 2000,
+										icon: 'none'
+									})
+									uni.hideLoading()
+								}
+							})
+						},
+						fail(res) {
+							// console.log('fail -> res', res)
+							uni.showToast({
+								title: '保存失败,稍后再试',
+								duration: 2000,
+								icon: 'none'
+							})
+							uni.hideLoading()
+						}
+					},
+					this
+				)
+				// #endif
+			},
+			/**
+			 * @description: 取消图片
+			 * @param {type}
+			 * @return {type}
+			 * @author: hch
+			 */
+			handleCanvasCancel() {
+				this.canvasShow = false
+				this.$emit('cancel', true)
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		height: 100%;
+		text-align: center;
+	}
+
+	.canvas-content {
+		position: absolute;
+		top: 0;
+
+		.canvas-mask {
+			position: fixed;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			z-index: 9;
+			width: 100%;
+			height: 100%;
+			background: rgba(0, 0, 0, 0.5);
+		}
+
+		.canvas {
+			z-index: 10;
+		}
+
+		.button-wrapper {
+			position: fixed;
+			bottom: 80rpx;
+			z-index: 16;
+			display: flex;
+			width: 100%;
+			height: 72rpx;
+			justify-content: space-around;
+		}
+
+		.save-btn {
+			z-index: 16;
+			width: 40%;
+			height: 100%;
+			font-size: 30rpx;
+			line-height: 72rpx;
+			color: #fff;
+			text-align: center;
+			background: $uni-btn-color;
+			border-radius: 45rpx;
+			border-radius: 36rpx;
+		}
+
+		.cancel-btn {
+			color: #fff;
+			background: #4D402F;
+		}
+
+		.canvas-close-btn {
+			position: fixed;
+			top: 30rpx;
+			right: 0;
+			z-index: 12;
+			width: 60rpx;
+			height: 60rpx;
+			padding: 20rpx;
+		}
+	}
+</style>

+ 21 - 6
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券详情"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
 			<!-- 优惠券信息 -->
@@ -37,7 +49,7 @@
 							适用范围:点击查看</view>
 						<view class="desc"
 							v-else-if="info.type && JSON.parse(info.type).value == 2 && info.useArea && JSON.parse(info.useArea).value == 0">
-							适用范围:点击查看</view>
+							适用范围:门店消费</view>
 						<view class="desc" v-else>适用范围:{{ info.useAreaDesc || '-' }}</view>
 						<view class="desc">使用期限:{{ $parseTime(info.validStart, '{y}.{m}.{d}') }} ~
 							{{ $parseTime(info.validEnd, '{y}.{m}.{d}') }}</view>
@@ -62,11 +74,10 @@
 				<view class="txt detail">共{{info.channelTotal}}家门店可使用 <view class="detail-address" @click="toAddress">立即查看</view>
 				</view>
 			</view>
-			<view class="detail-explain" v-if="info && info.useArea && JSON.parse(info.useArea).value  == 0">
+			<!-- <view class="detail-explain" v-if="info && info.useArea && JSON.parse(info.useArea).value  == 0">
 				<view class="txt">使用范围:</view>
-				<view class="txt detail">共{{info.channelTotal}}家门店可使用 <view class="detail-address" @click="toAddress">立即查看</view>
-				</view>
-			</view>
+				<view class="txt detail">门店通用</view>
+			</view> -->
 			<!-- 说明 -->
 			<view class="detail-explain">
 				<view class="txt">使用说明:</view>
@@ -85,8 +96,12 @@
 			return {
 				info: {},
 				id: null,
+				pagesNum: '',
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			this.id = options.id
 			this.getDetail()

+ 16 - 2
src/packagePrize/coupon/use.vue

@@ -3,13 +3,25 @@
 		<!-- #ifdef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券使用记录" leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="优惠券使用记录"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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"
-				lineColor="#E96737" :activeStyle="{
+				lineColor="#F9822C" :activeStyle="{
 									color: '#333',
 									transform: 'scale(1.1)',
 									width: '50px',
@@ -71,9 +83,11 @@
 				pageNum: 1,
 				total: 0,
 				list: [],
+				pagesNum: '',
 			};
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.pageList()
 		},
 		methods: {

+ 291 - 252
src/packagePrize/goods/detail.vue

@@ -1,252 +1,291 @@
-<template>
-	<view>
-		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情" leftIconSize="0"></u-navbar>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情"></u-navbar>
-		<!-- #endif -->
-		
-		<view class="detail">
-			<view class="detail-swiper">
-				<u-swiper :list="picUrlArr" height="375" radius="0" :indicator="true" :circular="true" indicatorMode="dot" indicatorActiveColor="#FA822C"></u-swiper>
-			</view>
-			<!-- 详情 -->
-			<view class="detail-info flex">
-				<view class="detail-info-left">
-					<view class="detail-info-left__title ells">{{ info.title }}</view>
-					<!-- <view class="detail-info-left__coin">
-						<view class="content flex">
-							<image src="../../static/public/goods_coin.png" mode=""></image>
-							<view><text>×</text>{{ info.exchangePrice }}</view>
-						</view>
-						<view class="txt" v-if="info.originPrice">原盲豆:<text>{{ info.originPrice }}</text></view>
-					</view>
-					<view class="detail-info-left__price">¥{{ $numberFormat(info.value) }}</view> -->
-				</view>
-				<view class="detail-info-right" v-show="false">销量:30个</view>
-			</view>
-			<view class="detail-goods">产品介绍</view>
-			<view class="detail-description">
-				<u-parse :content="description" :selectable="true"></u-parse>
-			</view>
-			<view style="detail-merchant" @click="toCompanyData" v-if="info.merchantInfo?true:false">
-				<view class="detail-merchant-warp">
-					<view class="detail-merchant-warp-one">商家信息</view>
-					<view class="detail-merchant-warp-two">
-						<view style="float: left;">前往查看</view>
-						<u-icon style="float: right;" name="arrow-right" size="18"></u-icon>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	import appId from '@/config/appId.js'
-	import { formatRichText } from '@/utils/util.js'
-	export default {
-		data() {
-			return {
-				boxId: '',
-				picUrlArr: [],
-				info: {},
-				prizeList: [],
-				description: '',
-				goodsId: '',
-
-				payShow: false,
-				payInfo: {},
-			};
-		},
-		onLoad(opthios) {
-			this.getDetail(opthios.id)
-			this.goodsId = opthios.id
-		},
-		methods: {
-			getDetail(id) {
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/exchange/goods/detail', {
-					noToken: true,
-					goodsId: id
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.info = res.data
-						let picUrlArr = res.data.picUrl.split(',')
-						picUrlArr.forEach(item => {
-							this.picUrlArr.push(env.filePublic + item + '?imageView2/2/w/750')
-						})
-						// 处理富文本
-						// #ifndef MP-ALIPAY
-						const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
-							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
-								".png?imageView2/2/w/750\"");
-						this.description = formatRichText(description);
-						// #endif
-						
-						// #ifdef MP-ALIPAY
-						res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
-						res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
-						res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
-						this.description = formatRichText(res.data.description);
-						// #endif
-						
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			close() {
-				this.payShow = false
-			},
-
-			exchange() {
-				let data = {
-					couponIds: [],
-					autoCoupon: 1,
-					boxId: this.info.boxId,
-					ticketId: this.info.ticketId,
-					orderNum: 1,
-					appSource: appId
-				}
-				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
-					if (res.code == 0) {
-						let info = {
-							...res.data,
-							...this.info,
-							picUrl: env.filePublic + res.data.picUrl,
-						}
-						this.payInfo = info
-						this.payShow = true
-					}
-				})
-			},
-			
-			toCompanyData(){
-				uni.navigateTo({
-					url:`/packageGoods/goods/company?goodsId=${ this.goodsId }`
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.detail {
-
-		// 商品轮播
-		&-swiper {
-			background-color: #FFFFFF;
-		}
-		
-		// 详情
-		&-info {
-			background-color: #fff;
-			justify-content: space-between;
-			padding: 34rpx;
-			margin-bottom: 22rpx;
-			
-			&-left {
-				flex: 1;
-				
-				&__title {
-					font-size: 34rpx;
-					line-height: 40rpx;
-					max-height: 80rpx;
-					overflow: hidden;
-					// margin-bottom: 26rpx;
-					font-weight: bold;
-				}
-				
-				&__coin {
-					display: flex;
-					line-height: 30rpx;
-					margin-bottom: 26rpx;
-					
-					.content {
-						color: #FA822C;
-						margin-right: 34rpx;
-						font-weight: bold;
-						font-size: 30rpx;
-						
-						image {
-							width: 34rpx;
-							height: 30rpx;
-						}
-						
-						text {
-							font-weight: normal;
-						}
-					}
-					
-					.txt {
-						font-size: 26rpx;
-						color: #666666;
-						text-decoration: line-through;
-					}
-				}
-				
-				&__price {
-					line-height: 24rpx;
-					color: #666666;
-				}
-			}
-			
-			&-right {
-				color: #666666;
-			}
-		}
-		
-		&-goods {
-			height: 90rpx;
-			text-align: center;
-			line-height: 90rpx;
-			font-weight: bold;
-			font-size: 30rpx;
-			background-color: #FFFFFF;
-		}
-
-		&-description {
-			image {
-				width: 100%;
-			}
-		}
-
-		&-merchant {
-			height: 88rpx;
-			// text-align: center;
-			line-height: 88rpx;
-			font-weight: bold;
-			background-color: #FFFFFF;
-
-			&-warp {
-				height: 88rpx;
-				width: 100%;
-				background-color: #ffffff;
-
-				&-one {
-					float: left;
-					margin: 20rpx;
-					font-weight: 600;
-				}
-
-				&-two {
-					float: right;
-					margin: 20rpx;
-					font-weight: 600;
-				}
-			}
-		}
-
-		// 设置ios刘海屏底部横线安全区域
-		padding-bottom: constant(safe-area-inset-bottom);
-		padding-bottom: env(safe-area-inset-bottom);
-	}
-</style>
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情"
+			leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="奖品详情"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
+				<u-swiper :list="picUrlArr" height="375" radius="0" :indicator="true" :circular="true" indicatorMode="dot"
+					indicatorActiveColor="#FA822C"></u-swiper>
+			</view>
+			<!-- 详情 -->
+			<view class="detail-info flex">
+				<view class="detail-info-left">
+					<view class="detail-info-left__title ells">{{ info.title }}</view>
+					<!-- <view class="detail-info-left__coin">
+						<view class="content flex">
+							<image src="../../static/public/goods_coin.png" mode=""></image>
+							<view><text>×</text>{{ info.exchangePrice }}</view>
+						</view>
+						<view class="txt" v-if="info.originPrice">原盲豆:<text>{{ info.originPrice }}</text></view>
+					</view>
+					<view class="detail-info-left__price">¥{{ $numberFormat(info.value) }}</view> -->
+				</view>
+				<view class="detail-info-right" v-show="false">销量:30个</view>
+			</view>
+			<view class="detail-goods">产品介绍</view>
+			<view class="detail-description">
+				<u-parse :content="description" :selectable="true"></u-parse>
+			</view>
+			<view style="detail-merchant" @click="toCompanyData" v-if="info.merchantInfo?true:false">
+				<view class="detail-merchant-warp">
+					<view class="detail-merchant-warp-one">商家信息</view>
+					<view class="detail-merchant-warp-two">
+						<view style="float: left;">前往查看</view>
+						<u-icon style="float: right;" name="arrow-right" size="18"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	import { formatRichText } from '@/utils/util.js'
+	export default {
+		data() {
+			return {
+				boxId: '',
+				picUrlArr: [],
+				info: {},
+				prizeList: [],
+				description: '',
+				goodsId: '',
+
+				payShow: false,
+				payInfo: {},
+				pagesNum: '',
+				couponDetail: '',
+			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
+		onLoad(opthios) {
+			this.couponDetail = uni.getStorageSync('couponDetail') ? uni.getStorageSync('couponDetail') : ''
+			this.getDetail(opthios.id)
+			this.goodsId = opthios.id
+		},
+		methods: {
+			getDetail(id) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/exchange/goods/detail', {
+					noToken: true,
+					goodsId: id
+				}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.info = res.data
+						let picUrlArr = res.data.picUrl.split(',')
+						picUrlArr.forEach(item => {
+							this.picUrlArr.push(env.filePublic + item + '?imageView2/2/w/750')
+						})
+						if (this.couponDetail && this.couponDetail != '') {
+							// 处理富文本
+							// #ifndef MP-ALIPAY
+							const description = this.couponDetail.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+								.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+									".png?imageView2/2/w/750\"");
+							this.description = formatRichText(description);
+							// #endif
+
+							// #ifdef MP-ALIPAY
+							this.couponDetail.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+							this.couponDetail.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+							this.couponDetail.split(".png\"").join(".png?imageView2/2/w/750\"")
+							this.description = formatRichText(this.couponDetail);
+							// #endif
+						} else {
+							// 处理富文本
+							// #ifndef MP-ALIPAY
+							const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+								.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+									".png?imageView2/2/w/750\"");
+							this.description = formatRichText(description);
+							// #endif
+
+							// #ifdef MP-ALIPAY
+							res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+							res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+							res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
+							this.description = formatRichText(res.data.description);
+							// #endif
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			close() {
+				this.payShow = false
+			},
+
+			exchange() {
+				let data = {
+					couponIds: [],
+					autoCoupon: 1,
+					boxId: this.info.boxId,
+					ticketId: this.info.ticketId,
+					orderNum: 1,
+					appSource: appId
+				}
+				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
+					if (res.code == 0) {
+						let info = {
+							...res.data,
+							...this.info,
+							picUrl: env.filePublic + res.data.picUrl,
+						}
+						this.payInfo = info
+						this.payShow = true
+					}
+				})
+			},
+
+			toCompanyData() {
+				uni.navigateTo({
+					url: `/packageGoods/goods/company?goodsId=${ this.goodsId }`
+				})
+			},
+		},
+		onUnload() {
+			uni.removeStorageSync('couponDetail')
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.detail {
+
+		// 商品轮播
+		&-swiper {
+			background-color: #FFFFFF;
+		}
+
+		// 详情
+		&-info {
+			background-color: #fff;
+			justify-content: space-between;
+			padding: 34rpx;
+			margin-bottom: 22rpx;
+
+			&-left {
+				flex: 1;
+
+				&__title {
+					font-size: 34rpx;
+					line-height: 40rpx;
+					max-height: 80rpx;
+					overflow: hidden;
+					// margin-bottom: 26rpx;
+					font-weight: bold;
+				}
+
+				&__coin {
+					display: flex;
+					line-height: 30rpx;
+					margin-bottom: 26rpx;
+
+					.content {
+						color: #FA822C;
+						margin-right: 34rpx;
+						font-weight: bold;
+						font-size: 30rpx;
+
+						image {
+							width: 34rpx;
+							height: 30rpx;
+						}
+
+						text {
+							font-weight: normal;
+						}
+					}
+
+					.txt {
+						font-size: 26rpx;
+						color: #666666;
+						text-decoration: line-through;
+					}
+				}
+
+				&__price {
+					line-height: 24rpx;
+					color: #666666;
+				}
+			}
+
+			&-right {
+				color: #666666;
+			}
+		}
+
+		&-goods {
+			height: 90rpx;
+			text-align: center;
+			line-height: 90rpx;
+			font-weight: bold;
+			font-size: 30rpx;
+			background-color: #FFFFFF;
+		}
+
+		&-description {
+			image {
+				width: 100%;
+			}
+		}
+
+		&-merchant {
+			height: 88rpx;
+			// text-align: center;
+			line-height: 88rpx;
+			font-weight: bold;
+			background-color: #FFFFFF;
+
+			&-warp {
+				height: 88rpx;
+				width: 100%;
+				background-color: #ffffff;
+
+				&-one {
+					float: left;
+					margin: 20rpx;
+					font-weight: 600;
+				}
+
+				&-two {
+					float: right;
+					margin: 20rpx;
+					font-weight: 600;
+				}
+			}
+		}
+
+		// 设置ios刘海屏底部横线安全区域
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+	}
+</style>

+ 61 - 19
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="商品详情"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -74,10 +86,16 @@
 
 				payShow: false,
 				payInfo: {},
-				purchasePopupShow: false
+				purchasePopupShow: false,
+				pagesNum: '',
+				couponDetail: '',
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(opthios) {
+			this.couponDetail = uni.getStorageSync('couponDetail') ? uni.getStorageSync('couponDetail') : ''
 			this.getDetail(opthios.id)
 			this.goodsId = opthios.id
 			this.boxId = opthios.boxId
@@ -98,21 +116,37 @@
 						picUrlArr.forEach(item => {
 							this.picUrlArr.push(env.filePublic + item + '?imageView2/2/w/750')
 						})
-						// 处理富文本
-						// #ifndef MP-ALIPAY
-						const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
-							.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
-								".png?imageView2/2/w/750\"");
-						this.description = formatRichText(description);
-						// #endif
-
-						// #ifdef MP-ALIPAY
-						res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
-						res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
-						res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
-						this.description = formatRichText(res.data.description);
-						// #endif
-
+						if(this.couponDetail && this.couponDetail != ''){
+							// 处理富文本
+							// #ifndef MP-ALIPAY
+							const description = this.couponDetail.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+								.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+									".png?imageView2/2/w/750\"");
+							this.description = formatRichText(description);
+							// #endif
+							
+							// #ifdef MP-ALIPAY
+							this.couponDetail.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+							this.couponDetail.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+							this.couponDetail.split(".png\"").join(".png?imageView2/2/w/750\"")
+							this.description = formatRichText(this.couponDetail);
+							// #endif
+						}else {
+							// 处理富文本
+							// #ifndef MP-ALIPAY
+							const description = res.data.description.replaceAll(".jpg\"", ".jpg?imageView2/2/w/750\"")
+								.replaceAll(".jpeg\"", ".jpeg?imageView2/2/w/750\"").replaceAll(".png\"",
+									".png?imageView2/2/w/750\"");
+							this.description = formatRichText(description);
+							// #endif
+							
+							// #ifdef MP-ALIPAY
+							res.data.description.split(".jpg\"").join(".jpg?imageView2/2/w/750\"")
+							res.data.description.split(".jpeg\"").join(".jpeg?imageView2/2/w/750\"")
+							res.data.description.split(".png\"").join(".png?imageView2/2/w/750\"")
+							this.description = formatRichText(res.data.description);
+							// #endif
+						}
 					}
 				}).catch(() => {
 					uni.hideLoading();
@@ -130,7 +164,6 @@
 			},
 			
 			exchange() {
-				console.log(this.info);
 				let data = {
 					couponIds: [],
 					autoCoupon: 1,
@@ -144,6 +177,12 @@
 							...res.data,
 							...this.info,
 							picUrl: env.filePublic + res.data.goodsPicUrl.split(',')[0],
+							couponTitle: res.data && res.data.couponList && res.data.couponList.length &&
+								res
+								.data.couponList[0].title,
+							couponId: res.data && res.data.couponList && res.data.couponList.length && res
+								.data
+								.couponList[0].id
 						}
 						this.payInfo = info
 						this.payShow = true
@@ -156,7 +195,10 @@
 					url: `/packageGoods/goods/company?goodsId=${ this.goodsId }`
 				})
 			},
-		}
+		},
+		onUnload() {
+			uni.removeStorageSync('couponDetail')
+		},
 	}
 </script>
 

+ 208 - 38
src/packagePrize/prize/index.vue

@@ -6,7 +6,7 @@
 		</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>
@@ -18,7 +18,7 @@
 		</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>
@@ -32,12 +32,12 @@
 					:current='currentIndex' lineColor="#F9822C " :activeStyle="{
 										color: '#333 ',
 										transform: 'scale(1.1)',
-										width: '120px'
+										width: '100px'
 									}" :inactiveStyle="{
 										color: '#999',
 										transform: 'scale(1)',
-										width: '120px'
-									}" itemStyle="padding-left: 20px; padding-right: 15px; height: 44px; text-align: center;">
+										width: '100px'
+									}" itemStyle="height: 44px; text-align: center;">
 				</u-tabs>
 			</view>
 			<!-- 商品状态 -->
@@ -92,7 +92,7 @@
 			</view>
 		</view>
 		<!-- 优惠券 -->
-		<view class="prize-coupon" v-else>
+		<view class="prize-coupon" v-if="state == 1">
 			<view class="prize-coupon-list">
 				<view @click="toPrizeDetail(item)" class="prize-coupon-list-item" v-for="(item, index) in list" :key="index">
 					<view class="content flex">
@@ -125,6 +125,32 @@
 				</view>
 			</view>
 		</view>
+		<!-- 红包 -->
+		<view class="prize-red" v-if="state == 2">
+			<view class="prize-red-list">
+				<view class="prize-red-list-item" v-for="(item, index) in list" :key="index">
+					<view class="content flex">
+						<view class="content-left flex">
+							<image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/redPkg2.png" mode="scaleToFill"></image>
+						</view>
+						<view class="content-right flex">
+							<view class="title ells-one">{{ item.title }}</view>
+							<view class="desc">{{ item.value / 100 }}<text>元</text></view>
+						</view>
+						<view class="content-btn">
+							<view class="btn" @click="toDrawShow(item)">立即领取</view>
+						</view>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+			</view>
+			<view class="flex empty" v-if="!list.length && !loading">
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode="scaleToFill"></image>
+					<view class="center-font">还没有红包</view>
+				</view>
+			</view>
+		</view>
 		<view class="prize-action">
 			<!-- 实物商品提货 -->
 			<view class="flex prize-action-goods" v-if="state == 0 && statusIndex == 1">
@@ -142,6 +168,11 @@
 				<view class="title">优惠券使用记录</view>
 				<u-icon name="arrow-right" size="15" color="#999"></u-icon>
 			</view>
+			<!-- 红包提现记录 -->
+			<view class="flex prize-action-coupon" @click="toRedpkg" v-if="state == 2">
+				<view class="title">红包领取记录</view>
+				<u-icon name="arrow-right" size="15" color="#999"></u-icon>
+			</view>
 		</view>
 		
 		<!-- 兑换成功 -->
@@ -160,6 +191,19 @@
 			</view>
 		</u-popup>
 		
+		<!-- 红包领取 -->
+		<u-popup :show="drawShow" mode="center">
+			<view class="tip-show">
+				<view class="tip-show-title" style="text-align: center;">
+					<view>确认领取该微信红包吗?</view>
+				</view>
+				<view class="flex tip-show-btn">
+					<view class="close" @click="drawShow = false">取消</view>
+					<view class="prize" @click="drawSubmit">确认</view>
+				</view>
+			</view>
+		</u-popup>
+		
 		<!-- 商品选择sku -->
 		<sku-popup 
 			:popup-show="skuPopupShow" 
@@ -186,10 +230,13 @@
 			return {
 				status: 'nomore',//上拉刷新状态
 				loading: false,
+				drawLoading: false,
 				stateArr: [{
 					name: ' 商品',
 				}, {
 					name: ' 优惠券',
+				}, {
+					name: ' 红包',
 				}],
 				// typeList: [{
 				// 	name: '待提货'
@@ -205,9 +252,9 @@
 				pageNum: 1,
 				total: 0,
 				list: [],
-
+				drawShow: false,//红包弹框
+				drawId: '',//要提现的红包id
 				currentIndex: 0,
-				pagesNum: "",
 				
 				statusIndex: 1,
 				
@@ -215,10 +262,11 @@
 				skuPopupShow: false,//选择框
 				skuList: [],
 				skuListInit: [],
-				tipShow: false,
+				tipShow: false, //选择多sku
 				tipData: {},
 				payInfo: {},
 				// infoItem: {},
+				pagesNum: '',
 			};
 		},
 		onShow() {
@@ -231,6 +279,9 @@
 				if (opthios.coupon == 1) {
 					this.currentIndex = 1
 					this.state = 1
+				} else if(opthios.coupon == 2) {
+					this.currentIndex = 2
+					this.state = 2
 				} else {
 					this.currentIndex = 0
 					this.state = 0
@@ -240,10 +291,8 @@
 		methods: {
 			getList() {
 				let _this = this
-				let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : '/api/v1/mp/user/mine/coupon/list'
-				let data = _this.state == 0 ? { } : {
-					status: 1
-				}
+				let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : _this.state == 1 ?'/api/v1/mp/user/mine/coupon/list': '/api/v1/mp/user/mine/red/pkg/list'//商品、优惠券、红包
+				let data = _this.state == 0 ? { } : _this.state == 1 ? { status: 1 }: { status: 0 }
 				this.loading = true
 				this.checkedAll = false
 				$http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, data).then(res => {
@@ -306,12 +355,6 @@
 					this.getListTwo()
 				}
 			},
-
-			toIndex() {
-				uni.switchTab({
-					url: '/pages/user/index'
-				})
-			},
 			
 			toRecovery(item) {
 				uni.navigateTo({
@@ -333,6 +376,8 @@
 					this.statusIndex = 1
 				} else if (e.index == 1) {
 					this.state = 1
+				} else if (e.index == 2) {
+					this.state = 2
 				}
 				this.pageList()
 				this.checkedAll = false
@@ -341,6 +386,8 @@
 			close() {
 				this.skuPopupShow = false
 				this.tipShow = false
+				this.drawId = ''
+				this.drawShow = false
 			},
 			skuSuccess(data) {
 				this.tipData = data
@@ -434,6 +481,12 @@
 					url: '/packagePrize/coupon/use'
 				})
 			},
+			// 查看红包提现记录
+			toRedpkg() {
+				uni.navigateTo({
+					url: '/packagePrize/prize/redpkg'
+				})
+			},
 
 			// 立即提货
 			toSettlement() {
@@ -512,23 +565,33 @@
 					$http.post(`/api/v1/mp/user/mine/coupon/list?pageNum=1&pageSize=20`, {
 						status: 1
 					}).then(data => {
-						if (res.code == 0) {
-							this.stateArr = [{
-									name: ' 商品 (' + res.total + ') '
-								},
-								{
-									name: ' 优惠券 (' + data.total + ') '
-								},
-							]
-						} else {
-							this.stateArr = [{
-									name: ' 商品 (0)'
-								},
-								{
-									name: ' 优惠券 (0)'
-								},
-							]
-						}
+						$http.post(`/api/v1/mp/user/mine/red/pkg/list?pageNum=1&pageSize=20`, {
+							status: 0
+						}).then(item => {
+							if (res.code == 0) {
+								this.stateArr = [{
+										name: ' 商品 (' + res.total + ') '
+									},
+									{
+										name: ' 优惠券 (' + data.total + ') '
+									},
+									{
+										name: ' 红包 (' + item.total + ') '
+									},
+								]
+							} else {
+								this.stateArr = [{
+										name: ' 商品 (0)'
+									},
+									{
+										name: ' 优惠券 (0)'
+									},
+									{
+										name: ' 红包 (0)'
+									},
+								]
+							}
+						})
 					})
 				});
 			},
@@ -538,14 +601,39 @@
 					url: `/packagePrize/goods/detail?id=${ item.goodsId }`
 				})
 			},
+			
+			toDrawShow(item) {
+				this.drawShow = true
+				this.drawId = item.id
+			},
+			drawSubmit() {
+				if(this.drawLoading) return
+				this.drawLoading = true
+				uni.showLoading({
+					title: '提现中'
+				});
+				$http.post('/api/v1/mp/user/mine/red/pkg/draw', { id: this.drawId }).then(res => {
+					uni.hideLoading();
+					this.drawLoading = false
+					if (res.code == 0) {
+						this.pageList()
+						this.couponNum()
+						this.close()
+					} 
+					uni.$u.toast(res.msg);
+				}).catch(() => {
+					uni.hideLoading();
+					this.drawLoading = false
+				});
+			},
 
 			toPrizeDetail(item) {
 				let boxIds = JSON.stringify(item.boxIds)
 				let useArea = JSON.parse(item.useArea)
 				let type = JSON.parse(item.type)
 				// 1判断type,如果为门店直接跳转不需要判断useArec
-				if (type.value == 2) {
-					// data.value 2为指定优惠券 0为通用优惠券
+				if (type.value == 2 || type.value == 4) {
+					// data.value 2为指定优惠券 0为通用优惠券 4为采购优惠券
 					uni.navigateTo({
 						url: `/packagePrize/coupon/detail?id=${ item.id }`
 					})
@@ -802,6 +890,88 @@
 			}
 		}
 	}
+	
+	// 红包
+	.prize-red {
+		margin-top: 85rpx;
+		padding: 20rpx 20rpx 150rpx;
+	
+		&-list {
+			&-item {
+				// padding-top: 30rpx;
+				margin-bottom: 30rpx;
+				background-color: #fff;
+				
+				.content {
+					width: 100%;
+					height: 178rpx;
+					justify-content: flex-start;
+					
+					&-left {
+						width: 186rpx;
+						height: 100%;
+						background-color: #FFD6BE;
+						margin-right: 36rpx;
+						
+						image {
+							width: 148rpx;
+							height: 128rpx;
+						}
+					}
+					
+					&-right {
+						flex: 1;
+						align-items: flex-start;
+						flex-direction: column;
+						justify-content: space-between;
+						height: 100%;
+						padding: 24rpx 0;
+						
+						.title {
+							font-size: 30rpx;
+							line-height: 30rpx;
+							height: 30rpx;
+							overflow: hidden;
+							font-weight: 400;
+							color: #333333;
+						}
+						
+						.desc {
+							font-size: 32rpx;
+							line-height: 32rpx;
+							color: #FA352A;
+							font-weight: 500;
+							
+							text {
+								font-size: 22rpx
+							}
+						}
+					}
+					&-btn {
+							padding: 20rpx 0 22rpx;
+							margin: 0 30rpx 0;
+							
+							.btn {
+								padding: 0 36rpx;
+								display: inline-block;
+								height: 68rpx;
+								background: linear-gradient(270deg, #FF9056 0%, #FF5137 100%);
+								border-radius: 2px;
+								font-size: 30rpx;
+								line-height: 68rpx;
+								font-weight: 500;
+								color: #FFFFFF;
+							}
+					}
+				}
+			}
+	
+			&-item:last-child {
+				margin-bottom: 0;
+			}
+		}
+	}
+	
 
 	.prize-action {
 		position: fixed;

+ 214 - 0
src/packagePrize/prize/redpkg.vue

@@ -0,0 +1,214 @@
+<template>
+	<view>
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="红包领取记录" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="红包领取记录"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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-red">
+			<view class="prize-red-list">
+				<view class="prize-red-list-item" v-for="(item, index) in list" :key="index">
+					<view class="content flex">
+						<view class="content-left flex">
+							<image src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/static/redPkg2.png" mode="scaleToFill"></image>
+						</view>
+						<view class="content-right flex">
+							<view class="title ells-one">{{ item.title }}</view>
+							<view class="desc">{{ item.value / 100 }}<text>元</text></view>
+							<view class="desc2">领取时间:{{ $parseTime(item.drawTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</text></view>
+						</view>
+						<view class="content-btn">
+							<view class="btn">已领取</view>
+						</view>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>6" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
+			</view>
+		</view>
+		<view class="flex empty" v-if="!list.length">
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode="scaleToFill"></image>
+				<view class="center-font">暂无红包</view>
+			</view>
+			<!-- <u-empty text="数据为空" mode="order" /> -->
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				status: 'nomore',//上拉刷新状态
+				state: 1,
+				pageNum: 1,
+				total: 0,
+				list: [],
+				pagesNum: '',
+			};
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.pageList()
+		},
+		methods: {
+			getList() {
+				let _this = this
+				let url = '/api/v1/mp/user/mine/red/pkg/list'
+				this.loading = true
+				$http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, {
+					status: this.state
+				}).then(res => {
+					this.loading = false
+					if (res.code == 0) {
+						_this.total = res.total
+						_this.list = _this.list.concat(res.rows)
+					}
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			pageList() {
+				this.pageNum = 1
+				this.list = []
+				this.getList()
+			},
+		},
+
+		onReachBottom() {
+			if(this.total < this.pageNum * 20) return ;
+			this.status = 'loading';
+			++this.pageNum
+			if(this.total < this.pageNum * 20) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getList()
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+
+	.prize-red {
+		padding: 20rpx 20rpx 150rpx;
+	
+		&-list {
+			&-item {
+				// padding-top: 30rpx;
+				margin-bottom: 30rpx;
+				background-color: #fff;
+				
+				.content {
+					width: 100%;
+					height: 178rpx;
+					justify-content: flex-start;
+					
+					&-left {
+						width: 186rpx;
+						height: 100%;
+						background-color: #FFD6BE;
+						margin-right: 36rpx;
+						
+						image {
+							width: 148rpx;
+							height: 128rpx;
+						}
+					}
+					
+					&-right {
+						flex: 1;
+						align-items: flex-start;
+						flex-direction: column;
+						justify-content: space-between;
+						height: 100%;
+						padding: 24rpx 0;
+						
+						.title {
+							font-size: 30rpx;
+							line-height: 30rpx;
+							height: 30rpx;
+							overflow: hidden;
+							font-weight: 400;
+							color: #333333;
+						}
+						
+						.desc {
+							font-size: 32rpx;
+							line-height: 32rpx;
+							color: #666;
+							font-weight: 500;
+							
+							text {
+								font-size: 22rpx
+							}
+						}
+						.desc2 {
+							font-size: 26rpx;
+							line-height: 26rpx;
+							color: #999;
+							font-weight: 500;
+						}
+					}
+					&-btn {
+							padding: 20rpx 0 22rpx;
+							margin: 0 30rpx 0;
+							right: 30rpx;
+							position: absolute;
+							
+							.btn {
+								border: 1px solid #999;
+								display: inline-block;
+								transform: rotate(-20deg);
+								border-radius: 2px;
+								font-size: 34rpx;
+								line-height: 36rpx;
+								font-weight: 400;
+								color: #999;
+							}
+					}
+				}
+			}
+	
+			&-item:last-child {
+				margin-bottom: 0;
+			}
+		}
+	}
+	
+
+	.empty {
+		height: 60vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
+	}
+</style>

+ 20 - 4
src/packagePrize/purchase/index.vue

@@ -4,13 +4,25 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功" leftIconSize="0">
 		</u-navbar>
 		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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"
+			<image class="imgOne" src="https://mp-public-test-1309783959.cos.ap-shanghai.myqcloud.com/v2/buy_suc.png"
 				mode="scaleToFill"></image>
-			<image class="imgTwo" :src="picUrl" mode="scaleToFill"></image>
+			<image class="imgTwo" :src="picUrl" mode="aspectFit"></image>
 		</view>
 
 		<view class="package">
@@ -30,8 +42,12 @@
 				boxId: 0,
 				orderId: 0,
 				picUrl: '',
+				pagesNum: '',
 			}
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(opthios) {
 			this.boxId = opthios.boxId
 			this.orderId = opthios.orderId
@@ -50,7 +66,7 @@
 			},
 			// 线上立即刮票成功,跳转到刮奖过程
 			toProcess() {
-				uni.navigateTo({
+				uni.redirectTo({
 					url: `/packagePrize/rolling/animation?boxId=${ this.boxId }&orderId=${ this.orderId }&isTry=0`
 				})
 				

+ 13 - 4
src/packagePrize/rolling/animation.vue

@@ -60,9 +60,12 @@
 				infoimg: false,
 				Choice: false,
 				ChoiceData: '',
+				pagesNum: '',
 			};
 		},
-
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			if (options.orderId) {
 				this.orderId = options.orderId
@@ -117,9 +120,15 @@
 								if (num == 10) {
 									uni.hideLoading();
 									clearInterval(time)
-									uni.navigateBack({
-										delta: 2
-									})
+									if(_this.pagesNum > 2) {
+										uni.navigateBack({
+											delta: 2
+										})
+									}else {
+										uni.switchTab({
+											url: `/pages/index/index`
+										})
+									}
 								}
 							}, 1000)
 						}

+ 18 - 4
src/packagePrize/rolling/index.vue

@@ -6,11 +6,22 @@
 			<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="抽奖中" v-if="rollingShow"
 				leftIconSize="0"></u-navbar>
 		<!-- #endif -->
-
-		<!-- #ifndef MP-ALIPAY -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="抽奖中" v-if="rollingShow">
 		</u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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="rolling" v-if="rollingShow">
 			<!-- 奖品滚动 -->
@@ -144,10 +155,13 @@
 				orderId: '',
 				ticketId: '',
 				rotateShow: true,
-				circularShow: true
+				circularShow: true,
+				pagesNum: '',
 			}
 		},
-
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		onLoad(options) {
 			if (options) {
 				this.boxId = options.boxId

BIN
src/packagePrize/static/download1.png


+ 23 - 4
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲票"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -37,10 +49,14 @@
 					</view>
 					<view class="bottom" v-else>
 						<!-- #ifdef MP-ALIPAY -->
-						<view class="bottom-pricetwo"><view>奖品:</view><text>{{ item.prizeInfo || '-' }}</text></view>
+						<view class="bottom-pricetwo">
+							<view>奖品:</view>
+							<text v-if="item.prizeType == 'red_pkg' ">{{ item.prizeInfo + $numberFormat(item.value) + '元' }}</text>
+							<text v-else>{{ item.prizeInfo || '-' }}</text>
+						</view>
 						<!-- #endif -->
 						<!-- #ifndef MP-ALIPAY -->
-						<view class="bottom-price ells-one">奖品:<text>{{ item.prizeInfo || '-' }}</text></view>
+						<view class="bottom-price ells-one">奖品:<text v-if="item.prizeType == 'red_pkg' ">{{ item.prizeInfo + $numberFormat(item.value) + '元' }}</text><text v-else>{{ item.prizeInfo || '-' }}</text></view>
 						<!-- #endif -->
 					</view>
 				</view>
@@ -74,11 +90,12 @@
 				pageNum: 1,
 				total: 0,
 				list: [],
-
+				pagesNum: '',
 
 			};
 		},
 		onShow() {
+			this.pagesNum = getCurrentPages().length
 			this.pageList()
 		},
 		onLoad(){
@@ -127,8 +144,10 @@
 			changeTab(e) {
 				if (e.index == 0) {
 					this.state = 2
+					this.status = 'nomore'
 				} else if (e.index == 1) {
 					this.state = 3
+					this.status = 'nomore'
 				}
 				this.pageList()
 			},

+ 24 - 2
src/pages.json

@@ -11,6 +11,9 @@
 		{
 			"path": "pages/index/wxofficial"
 		},
+		{
+			"path": "pages/index/payExternal"
+		},
 		{
 			"path": "pages/core/index",
 			"style": {
@@ -72,6 +75,9 @@
 				{
 					"path": "order/settlement"
 				},
+				{
+					"path": "order/payOrder"
+				},
 				{
 					"path": "ticket/index"
 				},
@@ -108,6 +114,9 @@
 				{
 					"path": "prize/index"
 				},
+				{
+					"path": "prize/redpkg"
+				},
 				{
 					"path": "ticket/index"
 				},
@@ -156,6 +165,15 @@
 				},
 				{
 					"path": "activity/wxofficial"
+				},
+				{
+					"path": "creator/index"
+				},
+				{
+					"path": "store/index"
+				},
+				{
+					"path": "exchange/index"
 				}
 			]
 		},
@@ -172,8 +190,12 @@
 				},
 				{
 					"path": "rule/index"
-				},{
+				},
+				{
 					"path": "rule/purchase"
+				},
+				{
+					"path": "avatar/index"
 				}
 			]
 		}
@@ -193,7 +215,7 @@
 		}
 	},
 	"tabBar": {
-		"custom": true,
+		// "custom": true,
 		"color": "black",
 		"backgroundColor": "#FFFFFF",
 		"selectedColor": "red",

+ 8 - 2
src/pages/activity/index.vue

@@ -5,8 +5,8 @@
 		</u-navbar>
 		<view class="status">
 			<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="30" lineHeight="3"
-				lineColor="#E96737" :activeStyle="{
-									color: '#E96737',
+				lineColor="#F9822C" :activeStyle="{
+									color: '#F9822C',
 									transform: 'scale(1)',
 									width: '150rpx',
 									
@@ -68,7 +68,11 @@
 	import env from '../../config/env.js'
 	import $http from '@/utils/request.js'
 	import appId from '@/config/appId.js'
+	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
 	export default {
+		components: {
+			CustomTabBar,
+		},
 		data() {
 			return {
 				status: 'nomore',//上拉刷新状态
@@ -132,8 +136,10 @@
 			changeTab(e) {
 				if (e.index == 0) {
 					this.triggerStatus = 0
+					this.status = 'nomore'
 				} else if (e.index == 1) {
 					this.triggerStatus = 1
+					this.status = 'nomore'
 				}
 				this.pageList()
 			},

+ 967 - 939
src/pages/core/index.vue

@@ -1,939 +1,967 @@
-<template>
-	<view class="core">
-		<!-- nav -->
-		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
-			<view class="u-nav-slot" slot="left">
-				<view class="u-nav-slot__input flex">
-					<u-input v-model="goodsTitle" @confirm="toGoodsList()" confirmType="search" placeholder="搜索商品"
-						border="none" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" />
-					<!-- <view class="u-nav-slot__input__btn" @click="toGoodsList()">搜索</view> -->
-				</view>
-			</view>
-		</u-navbar>
-		<!-- 固定顶部搜索、分类 -->
-		<view class="fixed-top">
-			<view class="fixed-top-classify">
-				<u-tabs @change="changeClassify" :scrollable="true" :list="classifyList" lineWidth="20" lineHeight="2"
-					lineColor="#FF8D0B" :activeStyle="{
-										color: '#333',
-										transform: 'scale(1.1)'
-									}" :inactiveStyle="{
-										color: '#999',
-										transform: 'scale(1.1)'
-									}" itemStyle="padding-left: 15px; padding-right: 15px; height: 44px; text-align: center;">
-				</u-tabs>
-			</view>
-			<!-- 盲豆筛选 -->
-			<view class="fixed-top-screen" v-if="scrollTop > 50">
-				<view class="fixed-top-screen-content flex">
-					<view class="fixed-top-screen-content__item flex">
-						<view class="title">我的盲豆:</view>
-						<view class="num">{{ initData.coinNum ? `${ initData.coinNum }` : '--' }}</view>
-					</view>
-					<view class="fixed-top-screen-content__item flex" @click="changeScreen(1)">
-						<view class="title">盲豆价格</view>
-						<view class="select flex" v-if="screenIndex == 1">
-							<image src="../../static/core/core_up.png" mode="scaleToFill" v-if="priceShow" />
-							<image src="../../static/core/core_down.png" mode="scaleToFill" v-else />
-						</view>
-						<view class="select flex" v-else>
-							<image src="../../static/core/core_null.png" mode="scaleToFill" />
-						</view>
-					</view>
-					<view class="fixed-top-screen-content__item flex" @click="changeScreen(2)">
-						<view class="title" v-if="!coinActionInfo.min && !coinActionInfo.max">盲豆区间</view>
-						<view class="title flex" v-else>
-							<view v-if="coinActionInfo.min">{{ coinActionInfo.min }}</view>
-							<view v-if="coinActionInfo.max">-{{ coinActionInfo.max }}</view>
-							<view>{{ coinActionInfo.desc }}</view>
-						</view>
-						<u-icon name="arrow-up" size="13" color="#fff" v-if="screenShow"></u-icon>
-						<u-icon name="arrow-down" size="13" color="#fff" v-else></u-icon>
-					</view>
-					<view class="fixed-top-screen-content__coin" v-if="screenShow">
-						<view class="fixed-top-screen-content__coin__list">
-							<view class="item flex" :class="{ 'action': coinActionIndex == index }"
-								v-for="(item, index) in coinList" :key="index" @click="selectCoin(item, index)">
-								<text v-if="item.min">{{ item.min }}</text>
-								<text v-if="item.max">-{{ item.max }}</text>
-								<text>{{ item.desc }}</text>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="core-none"></view>
-
-		<!-- 轮播 -->
-		<view class="core-swiper" v-if="swiperList.length">
-			<swiper class="core-swiper-centent" circular :indicator-dots="true" :autoplay="true" :interval="3000"
-				indicator-active-color="#fff">
-				<swiper-item class="swiper-item" v-for="(item, index) in swiperList" :key="index">
-					<image :src="item.picUrl" mode="scaleToFill" @click="toPage(item)"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-
-		<!-- 二级分类 -->
-		<view class="core-category">
-			<swiper class="core-category-swiper" :autoplay="false">
-				<swiper-item class="swiper-item"
-					v-for="(item, index) in classifyIndex == 0 ? classifyListFilter : classifyList[classifyIndex].list"
-					:key="index">
-					<view class="swiper-item-wrap">
-						<view class="swiper-item-wrap__content" v-for="(items, indexs) in item" :key="indexs">
-							<image :src="items.picUrl" mode="aspectFit" @click="toCategoryGoods(index, indexs)"></image>
-							<view class="name">{{ items.name }}</view>
-						</view>
-					</view>
-
-				</swiper-item>
-			</swiper>
-		</view>
-
-		<!-- 标签商品 -->
-		<view class="tag-goods" v-for="(item, index) in exclusiveSingle" :key="index">
-			<image class="tag-goods-imgBg" src="../../static/core/core_bg.png" mode="scaleToFill"></image>
-			<view class="tag-goods-content">
-				<view class="tag-goods-content-nav flex">
-					<view class="tag-goods-content-nav__left flex">
-						<image src="../../static/core/core_tag.png" mode="scaleToFill"></image>
-						<view class="title">{{ item.name }}</view>
-						<image src="../../static/core/core_tag.png" mode="scaleToFill"></image>
-					</view>
-					<view class="tag-goods-content-nav__right flex" @click="toTagGoods(item)">
-						<view class="title">更多</view>
-						<image src="../../static/core/core_right.png" mode="scaleToFill"></image>
-					</view>
-				</view>
-
-				<view class="tag-goods-content-list">
-					<view class="tag-goods-content-list-item flex" v-for="(items, indexs) in item.data" :key="indexs"
-						@click="toGoodsDetail(items)">
-						<view class="image flex">
-							<image :src="items.picUrl" mode="aspectFit"></image>
-						</view>
-						<view class="title">{{ items.exchangePrice }}盲豆</view>
-					</view>
-				</view>
-			</view>
-		</view>
-
-		<!-- 商品列表 -->
-		<view class="core-goods">
-			<view class="core-goods-list flex">
-				<view class="core-goods-list-item flex" v-for="(item, index) in list" :key="index"
-					@click="toGoodsDetail(item)">
-					<view class="image-wrap flex">
-						<image :src="item.picUrl" mode="aspectFit"></image>
-					</view>
-					<view class="content">
-						<!-- #ifdef MP-ALIPAY -->
-						<view class="content-titletwo">{{ item.title }}</view>
-						<!-- #endif -->
-						<!-- #ifndef MP-ALIPAY -->
-						<view class="content-title ells-one">{{ item.title }}</view>
-						<!-- #endif -->
-						<view class="content-coin flex">
-							<view class="content-coin__left flex">
-								<image src="../../static/public/goods_coin.png" mode="scaleToFill"></image>
-								<view class="num"><text>×</text>{{ item.exchangePrice }}</view>
-							</view>
-							<view class="content-coin__right" v-if="item.originPrice">{{ item.originPrice }}</view>
-						</view>
-						<view class="content-price">¥{{ $numberFormat(item.value) }}</view>
-					</view>
-				</view>
-				<!-- <view class="core-goods-list-item"></view> -->
-				<view class=""></view>
-			</view>
-			<view class="flex empty" v-if="!list.length">
-				<view class="center">
-					<image class="center-img"
-						src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png"
-						mode="scaleToFill"></image>
-					<view class="center-font">还没有商品</view>
-				</view>
-			</view>
-			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'"
-				:nomore-text="'已经到底了'" />
-		</view>
-
-		<custom-tab-bar :activeValue="'core'" />
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	import appId from '@/config/appId.js'
-	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
-	export default {
-		components: {
-			CustomTabBar,
-		},
-		data() {
-			return {
-				status: 'nomore', //上拉刷新状态
-				pageNum: 1,
-				total: 0,
-				list: [],
-				exclusiveSingle: [],
-				categoryId: '',
-				classifyList: [], // 分类列表
-				classifyIndex: 0, // 分类选中下标
-				classifyListFilter: [],
-				swiperList: [], // 轮播图
-				goodsTitle: '',
-				scrollTop: 0,
-				screenIndex: 0,
-				priceShow: false,
-				priceSort: null,
-				priceStep: 0,
-				screenShow: false,
-				initData: {},
-				coinNum: {
-					startPrice: null,
-					endPrice: null
-				},
-				coinActionIndex: 0,
-				coinActionInfo: {},
-				coinList: [{
-						min: null,
-						max: null,
-						desc: '全部'
-					},
-					{
-						min: 1,
-						max: 100,
-						desc: ''
-					},
-					{
-						min: 101,
-						max: 200,
-						desc: ''
-					},
-					{
-						min: 201,
-						max: 500,
-						desc: ''
-					},
-					{
-						min: 501,
-						max: 1000,
-						desc: ''
-					},
-					{
-						min: 1001,
-						max: 5000,
-						desc: ''
-					},
-					{
-						min: 5000,
-						max: null,
-						desc: '以上'
-					},
-				],
-				userInfo: '',
-				loginState: '',
-			};
-		},
-		onLoad(opthios) {
-			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
-				if (opthios.userId === undefined || opthios.userId === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/core/index.vue.`
-							)
-						}
-					})
-				}
-
-			}
-			if (opthios.type) {
-				uni.setStorageSync('shareType', opthios.type)
-			}
-			this.pageList()
-			this.getExclusive()
-			this.getClassify()
-			this.getSwiper()
-		},
-		onShow() {
-			this.loginState = uni.getStorageSync('token') ? true : false
-			if (this.loginState) {
-				this.getBean()
-				this.getBaseInfo()
-			}
-		},
-		onPageScroll: function(e) {
-			this.scrollTop = e.scrollTop
-		},
-		methods: {
-			pageList() {
-				this.pageNum = 1
-				this.total = 0
-				this.list = []
-				this.getList()
-			},
-
-			// 获取分类
-			getClassify() {
-				$http.post('/api/v1/mp/user/exchange/category/listTree', {}).then(res => {
-					if (res.code == 0) {
-						let interval = 10
-						this.classifyList = res && res.rows
-						this.classifyList.forEach(item => {
-							item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
-								'?imageView2/2/w/340'
-							item.goodsCategoryList.forEach(ele => {
-								ele.picUrl = env.filePublic + ele.picUrl.split(',')[0] +
-									'?imageView2/2/w/340'
-							})
-							item.list = []
-							if (item.goodsCategoryList.length > interval) {
-								let num = Math.ceil(item.goodsCategoryList.length / interval)
-								let arr = []
-
-								let a = 0
-								let stop = interval
-								for (let i = 1; i <= num; i++) {
-									arr = item.goodsCategoryList.slice(a, stop)
-									a = i * interval
-									stop = stop + interval
-
-								}
-							} else {
-								item.list.push(item.goodsCategoryList)
-							}
-						})
-						if (this.classifyList.length > interval) {
-							let num = Math.ceil(this.classifyList.length / interval)
-							let arr = []
-
-							let a = 0
-							let stop = interval
-							for (let i = 1; i <= num; i++) {
-								arr = this.classifyList.slice(a, stop)
-								a = i * interval
-								stop = stop + interval
-								this.classifyListFilter.push(arr)
-							}
-						} else {
-							this.classifyListFilter = [
-								[...this.classifyList]
-							]
-						}
-						this.classifyList.unshift({ name: '全部', categoryId: '' })
-					}
-				})
-			},
-
-			//轮播图
-			getSwiper() {
-				$http.post(`/api/v1/mp/user/exchange/banner/list`, {
-					noToken: true,
-					location: "top"
-				}).then(res => {
-					res.data.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0])
-					this.swiperList = res.data
-				})
-			},
-
-			// 标签商品
-			async getExclusive() {
-				let resData = await $http.post(`/api/v1/mp/user/exchange/activity/list`, {
-					noToken: true
-				})
-				let goodsList = []
-				for (let item of resData.data) {
-					let resDatas = await $http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=1&pageSize=10`, {
-						noToken: true,
-						tagIds: item.tagId
-					})
-					goodsList.push({
-						data: resDatas.rows,
-						name: item.name,
-						tagId: item.tagId
-					})
-				}
-				goodsList.forEach(item => {
-					item.data.forEach(items => {
-						items.picUrl = env.filePublic + items.picUrl.split(',')[0] +
-							'?imageView2/2/w/340'
-					})
-				})
-				this.exclusiveSingle = goodsList
-			},
-
-			// 商品列表
-			getList() {
-				let data = {
-					categoryId: this.categoryId,
-					priceSort: this.priceSort,
-					...this.coinNum,
-					noToken: true
-				}
-				$http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
-					res => {
-						if (res.code == 0) {
-							res.rows.forEach(item => {
-								let picUrlArr = item.picUrl.split(',')
-								item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
-							})
-
-							this.total = res.total
-							this.list = this.list.concat(res.rows)
-						}
-					}).catch(() => {
-				})
-			},
-
-			getBean() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/mine/init', {}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.initData = res.data
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			// 切换分类
-			changeClassify(e) {
-				this.categoryId = e.categoryId
-				this.classifyIndex = e.index
-				this.screenIndex = 0
-				this.priceStep = 0
-				this.priceShow = false
-				this.priceSort = null
-				this.coinActionIndex = 0
-				this.screenShow = false
-				this.coinNum.endPrice = null
-				this.coinNum.startPrice = null
-				this.coinActionInfo = {}
-				this.pageList()
-			},
-
-			// 盲豆筛选切换
-			changeScreen(num) {
-				this.screenIndex = num
-				if (num == 1) {
-					if (this.priceStep == 0) {
-						this.priceStep++
-						this.priceShow = true
-						this.priceSort = 1
-					} else if (this.priceStep == 1) {
-						this.priceStep++
-						this.priceShow = false
-						this.priceSort = 2
-					} else if (this.priceStep == 2) {
-						this.priceStep = 0
-						this.priceShow = false
-						this.priceSort = null
-						this.screenIndex = 0
-					}
-					this.pageList()
-				} else if (num == 2) {
-					this.priceStep = 0
-					this.screenShow = !this.screenShow
-					this.priceShow = false
-					this.priceSort = null
-				}
-			},
-
-			selectCoin(item, index) {
-				this.coinActionIndex = index
-				this.coinActionInfo = item
-				this.screenShow = !this.screenShow
-				this.coinNum.endPrice = item.max
-				this.coinNum.startPrice = item.min
-				this.pageList()
-			},
-
-			// 跳转点击事件
-			toPage(item) {
-				if (item.type == "link") {
-					uni.navigateTo({
-						url: `/packageOperate/webview/index?linkUrl=${ item.linkUrl }`,
-					})
-				} else if (item.type == "tag") {
-					uni.navigateTo({
-						url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.goodsTags ? item.goodsTags : '' }`
-					})
-				}
-			},
-
-			// 商品详情
-			toGoodsDetail(item) {
-				uni.navigateTo({
-					url: `/packageGoods/goods/detail?id=${ item.goodsId }`
-				})
-			},
-
-			// 商品列表
-			toGoodsList() {
-				uni.navigateTo({
-					url: `/packageGoods/goods/list?title=${ this.goodsTitle }`
-				})
-			},
-
-			// 商品标签
-			toTagGoods(item) {
-				uni.navigateTo({
-					url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.tagId ? item.tagId : '' }`
-				})
-			},
-
-			// 商品分类
-			toCategoryGoods(index, indexs) {
-				let list = this.classifyIndex == 0 ? this.classifyListFilter : this.classifyList[this.classifyIndex].list
-				let item = list[index][indexs]
-				uni.navigateTo({
-					url: `/packageGoods/goods/list?name=${ item.name }&categoryId=${ item.categoryId ? item.categoryId : '' }`
-				})
-			},
-			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.userInfo = res.data
-					}
-				})
-			},
-		},
-		onReachBottom() {
-			// 判断是否有数据
-			if (this.total < this.pageNum * 20) return;
-			this.status = 'loading';
-			++this.pageNum
-			if (this.total < this.pageNum * 20) this.status = 'nomore';
-			else this.status = 'loading';
-			this.getList()
-		},
-		//分享好友
-		onShareAppMessage(res) {
-			return {
-				title: '盲票,玩的就是有趣',
-				path: '/pages/index/index',
-			}
-		},
-		//分享朋友圈
-		onShareTimeline() {
-			return {
-				title: '盲票,玩的就是有趣',
-				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.core {
-		background-color: #fff;
-
-		&-none {
-			height: 120rpx;
-		}
-	}
-
-	// 搜索
-	.u-nav-slot {
-		text {
-			font-size: 32rpx;
-		}
-
-		&__input {
-			position: relative;
-			height: 70rpx;
-			width: 518rpx;
-			padding-left: 30rpx;
-			background: #F4F5F6;
-			border-radius: 35rpx;
-			padding-right: 30rpx;
-
-			&__btn {
-				z-index: 200;
-				width: 140rpx;
-				height: 70rpx;
-				line-height: 70rpx;
-				font-size: 30rpx;
-				text-align: center;
-				font-weight: bold;
-				color: #fff;
-				background-color: #FF8D0B;
-				border-radius: 35rpx;
-			}
-		}
-	}
-
-	// 固定搜索、分类
-	.fixed-top {
-		position: fixed;
-		z-index: 100;
-		width: 100%;
-		background-color: #fff;
-
-		// 搜索
-		&-search {
-			justify-content: space-between;
-			padding: 14rpx 30rpx 34rpx;
-
-			&__input {
-				position: relative;
-				flex: 1;
-				height: 84rpx;
-				padding-left: 46rpx;
-				background: #F4F5F6;
-				border-radius: 20rpx;
-
-				&__btn {
-					position: absolute;
-					right: 0;
-					width: 110rpx;
-					height: 76rpx;
-					line-height: 76rpx;
-					font-size: 34rpx;
-					text-align: center;
-					font-weight: bold;
-					color: #FFC062;
-					background-color: #333333;
-					border-radius: 18rpx;
-				}
-			}
-
-			image {
-				width: 52rpx;
-				height: 52rpx;
-				margin-left: 50rpx;
-			}
-		}
-
-		// 分类
-		&-classify {
-			padding-bottom: 20rpx;
-		}
-
-		// 盲豆筛选
-		&-screen {
-			height: 64rpx;
-
-			&-content {
-				position: relative;
-				justify-content: space-between;
-				padding: 0 34rpx;
-				color: #fff;
-				height: 100%;
-				background: #F9822C;
-
-				&__item {
-					.title {
-						margin-right: 14rpx;
-					}
-
-					.select {
-						flex-direction: column;
-
-						image {
-							width: 18rpx;
-							height: 26rpx;
-						}
-					}
-				}
-
-				&__coin {
-					position: absolute;
-					right: 0;
-					bottom: -390rpx;
-					width: 200rpx;
-					height: 390rpx;
-					background: #FFFFFF;
-					box-shadow: 0px 0px 2px 0px rgba(100, 100, 100, 0.1);
-
-					&__list {
-						padding-top: 20rpx;
-						color: #666;
-
-						.item {
-							margin-bottom: 30rpx;
-							font-size: 26rpx;
-							line-height: 26rpx;
-						}
-
-						.action {
-							color: #F9822C;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	// 轮播
-	.core-swiper {
-		margin: 0 34rpx 20rpx;
-		border-radius: 16rpx;
-
-		&-centent {
-			height: 300rpx;
-
-			.swiper-item {
-				width: 100%;
-				height: 100%;
-
-				image {
-					width: 100%;
-					height: 100%;
-					border-radius: 16rpx;
-				}
-			}
-		}
-	}
-
-	// 二级分类
-	.core-category {
-		width: 100%;
-		height: 360rpx;
-		margin-bottom: 34rpx;
-		padding: 0 34rpx;
-
-		&-swiper {
-
-			width: 100%;
-			height: 360rpx;
-
-			.swiper-item {
-				width: 100%;
-				height: 360rpx;
-
-				&-wrap {
-					width: 100%;
-					height: 100%;
-					display: flex;
-					flex-wrap: wrap;
-
-					&__content {
-						display: flex;
-						align-items: center;
-						flex-direction: column;
-						justify-content: space-between;
-						width: 20%;
-						height: 50%;
-
-						image {
-							width: 90%;
-							height: 70%;
-						}
-					}
-				}
-
-			}
-		}
-	}
-
-	// 标签商品
-	.tag-goods {
-		display: flex;
-		align-items: center;
-		position: relative;
-		margin: 0 34rpx 34rpx;
-		height: 350rpx;
-
-		&-imgBg {
-			position: absolute;
-			top: 0;
-			width: 100%;
-			height: 350rpx;
-		}
-
-		&-content {
-			width: 100%;
-			position: absolute;
-			top: 0;
-			z-index: 5;
-			padding: 26rpx 22rpx;
-
-			&-nav {
-				justify-content: space-between;
-				height: 40rpx;
-				margin-bottom: 10rpx;
-
-				&__left {
-					image {
-						width: 40rpx;
-						height: 30rpx;
-					}
-
-					.title {
-						font-family: YouSheBiaoTiHei;
-						font-weight: 400;
-						font-size: 40rpx;
-						color: #FFFFFF;
-						padding: 0 36rpx;
-					}
-				}
-
-				&__right {
-					.title {
-						font-family: YouSheBiaoTiHei;
-						font-weight: 400;
-						color: #FFFFFF;
-						margin-right: 12rpx;
-					}
-
-					image {
-						width: 22rpx;
-						height: 20rpx;
-					}
-				}
-			}
-
-			&-list {
-				display: flex;
-				height: 260rpx;
-				overflow-x: auto;
-
-				&-item {
-					flex-direction: column;
-					margin-right: 14rpx;
-
-					.image {
-						width: 180rpx;
-						height: 180rpx;
-						background: #FFFFFF;
-						box-shadow: 0px 0px 4px 0px rgba(100, 100, 100, 0.13);
-						border-radius: 4rpx;
-						margin-bottom: 24rpx;
-
-						image {
-							width: 100%;
-							height: 100%;
-						}
-					}
-
-					.title {
-						text-align: center;
-						line-height: 28rpx;
-						color: #FFFFFF;
-					}
-				}
-			}
-		}
-	}
-
-	// 商品列表
-	.core-goods {
-		padding: 0 34rpx;
-
-		&-list {
-			width: 100%;
-			justify-content: space-between;
-			flex-wrap: wrap;
-
-			&-item {
-				flex-direction: column;
-				justify-content: flex-start;
-				width: 48%;
-				padding-bottom: 32rpx;
-				background: #FFFFFF;
-				box-shadow: 0px 0px 3px 0px rgba(100, 100, 100, 0.1);
-				border-radius: 16rpx;
-				margin-bottom: 30rpx;
-
-				.image-wrap {
-					width: 100%;
-					height: 320rpx;
-					margin-bottom: 16rpx;
-
-					image {
-						width: 100%;
-						height: 100%;
-						border-radius: 16rpx 16rpx 0 0;
-					}
-				}
-
-				.content {
-					width: 100%;
-					padding: 0 22rpx;
-
-					&-title {
-						height: 28rpx;
-						font-size: 28rpx;
-						line-height: 28rpx;
-						font-weight: bold;
-						overflow: hidden;
-					}
-
-					&-titletwo {
-						height: 34rpx;
-						font-size: 28rpx;
-						line-height: 34rpx;
-						font-weight: bold;
-						white-space: nowrap;
-						overflow: hidden;
-						text-overflow: ellipsis;
-					}
-
-					&-coin {
-						height: 34rpx;
-						font-size: 24rpx;
-						justify-content: space-between;
-						margin-top: 30rpx;
-						margin-bottom: 24rpx;
-
-						&__left {
-							margin-right: 24rpx;
-							font-size: 28rpx;
-							font-weight: bold;
-
-							text {
-								font-weight: normal;
-							}
-
-							image {
-								width: 34rpx;
-								height: 34rpx;
-							}
-						}
-
-						&__right {
-							color: #666666;
-							text-decoration: line-through;
-						}
-					}
-
-					&-price {
-						font-size: 24rpx;
-						line-height: 24rpx;
-						color: #666666;
-					}
-				}
-
-			}
-		}
-
-		.empty {
-			.center {
-				text-align: center;
-
-				&-img {
-					width: 228rpx;
-					height: 320rpx;
-				}
-
-				&-font {
-					font-size: 30rpx;
-					font-weight: 400;
-					color: #999999;
-					margin-bottom: 200rpx;
-				}
-			}
-		}
-	}
-</style>
+<template>
+	<view class="core">
+		<!-- nav -->
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
+			<view class="u-nav-slot" slot="left">
+				<view class="u-nav-slot__input flex">
+					<u-input v-model="goodsTitle" @confirm="toGoodsList()" confirmType="search" placeholder="搜索商品"
+						border="none" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" />
+					<!-- <view class="u-nav-slot__input__btn" @click="toGoodsList()">搜索</view> -->
+				</view>
+			</view>
+		</u-navbar>
+		<!-- 固定顶部搜索、分类 -->
+		<view class="fixed-top">
+			<view class="fixed-top-classify">
+				<u-tabs @change="changeClassify" :scrollable="true" :list="classifyList" lineWidth="20" lineHeight="2"
+					lineColor="#FF8D0B" :activeStyle="{
+										color: '#333',
+										transform: 'scale(1.1)'
+									}" :inactiveStyle="{
+										color: '#999',
+										transform: 'scale(1.1)'
+									}" itemStyle="padding-left: 15px; padding-right: 15px; height: 44px; text-align: center;">
+				</u-tabs>
+			</view>
+			<!-- 盲豆筛选 -->
+			<view class="fixed-top-screen" v-if="scrollTop > 50">
+				<view class="fixed-top-screen-content flex">
+					<view class="fixed-top-screen-content__item flex">
+						<view class="title">我的盲豆:</view>
+						<view class="num">{{ initData.coinNum ? `${ initData.coinNum }` : '--' }}</view>
+					</view>
+					<view class="fixed-top-screen-content__item flex" @click="changeScreen(1)">
+						<view class="title">盲豆价格</view>
+						<view class="select flex" v-if="screenIndex == 1">
+							<image src="../../static/core/core_up.png" mode="scaleToFill" v-if="priceShow" />
+							<image src="../../static/core/core_down.png" mode="scaleToFill" v-else />
+						</view>
+						<view class="select flex" v-else>
+							<image src="../../static/core/core_null.png" mode="scaleToFill" />
+						</view>
+					</view>
+					<view class="fixed-top-screen-content__item flex" @click="changeScreen(2)">
+						<view class="title" v-if="!coinActionInfo.min && !coinActionInfo.max">盲豆区间</view>
+						<view class="title flex" v-else>
+							<view v-if="coinActionInfo.min">{{ coinActionInfo.min }}</view>
+							<view v-if="coinActionInfo.max">-{{ coinActionInfo.max }}</view>
+							<view>{{ coinActionInfo.desc }}</view>
+						</view>
+						<u-icon name="arrow-up" size="13" color="#fff" v-if="screenShow"></u-icon>
+						<u-icon name="arrow-down" size="13" color="#fff" v-else></u-icon>
+					</view>
+					<view class="fixed-top-screen-content__coin" v-if="screenShow">
+						<view class="fixed-top-screen-content__coin__list">
+							<view class="item flex" :class="{ 'action': coinActionIndex == index }"
+								v-for="(item, index) in coinList" :key="index" @click="selectCoin(item, index)">
+								<text v-if="item.min">{{ item.min }}</text>
+								<text v-if="item.max">-{{ item.max }}</text>
+								<text>{{ item.desc }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="core-none"></view>
+
+		<!-- 轮播 -->
+		<view class="core-swiper" v-if="swiperList.length">
+			<swiper class="core-swiper-centent" circular :indicator-dots="true" :autoplay="true" :interval="3000"
+				indicator-active-color="#fff">
+				<swiper-item class="swiper-item" v-for="(item, index) in swiperList" :key="index">
+					<image :src="item.picUrl" mode="scaleToFill" @click="toPage(item)"></image>
+				</swiper-item>
+			</swiper>
+		</view>
+
+		<!-- 二级分类 -->
+		<view class="core-category">
+			<swiper class="core-category-swiper" :autoplay="false">
+				<swiper-item class="swiper-item"
+					v-for="(item, index) in classifyIndex == 0 ? classifyListFilter : classifyList[classifyIndex].list"
+					:key="index">
+					<view class="swiper-item-wrap">
+						<view class="swiper-item-wrap__content" v-for="(items, indexs) in item" :key="indexs">
+							<image :src="items.picUrl" mode="aspectFit" @click="toCategoryGoods(index, indexs)"></image>
+							<view class="name">{{ items.name }}</view>
+						</view>
+					</view>
+
+				</swiper-item>
+			</swiper>
+		</view>
+
+		<!-- 标签商品 -->
+		<view class="tag-goods" v-for="(item, index) in exclusiveSingle" :key="index">
+			<image class="tag-goods-imgBg" src="../../static/core/core_bg.png" mode="scaleToFill"></image>
+			<view class="tag-goods-content">
+				<view class="tag-goods-content-nav flex">
+					<view class="tag-goods-content-nav__left flex">
+						<image src="../../static/core/core_tag.png" mode="scaleToFill"></image>
+						<view class="title">{{ item.name }}</view>
+						<image src="../../static/core/core_tag.png" mode="scaleToFill"></image>
+					</view>
+					<view class="tag-goods-content-nav__right flex" @click="toTagGoods(item)">
+						<view class="title">更多</view>
+						<image src="../../static/core/core_right.png" mode="scaleToFill"></image>
+					</view>
+				</view>
+
+				<view class="tag-goods-content-list">
+					<view class="tag-goods-content-list-item flex" v-for="(items, indexs) in item.data" :key="indexs"
+						@click="toGoodsDetail(items)">
+						<view class="image flex">
+							<image :src="items.picUrl" mode="aspectFit"></image>
+						</view>
+						<view class="title">{{ items.exchangePrice }}盲豆</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 商品列表 -->
+		<view class="core-goods">
+			<view class="core-goods-list flex">
+				<view class="core-goods-list-item flex" v-for="(item, index) in list" :key="index"
+					@click="toGoodsDetail(item)">
+					<view class="image-wrap flex">
+						<image :src="item.picUrl" mode="aspectFit"></image>
+					</view>
+					<view class="content">
+						<!-- #ifdef MP-ALIPAY -->
+						<view class="content-titletwo">{{ item.title }}</view>
+						<!-- #endif -->
+						<!-- #ifndef MP-ALIPAY -->
+						<view class="content-title ells-one">{{ item.title }}</view>
+						<!-- #endif -->
+						<view class="content-coin flex">
+							<view class="content-coin__left flex">
+								<image src="../../static/public/goods_coin.png" mode="scaleToFill"></image>
+								<view class="num"><text>×</text>{{ item.exchangePrice }}</view>
+							</view>
+							<view class="content-coin__right" v-if="item.originPrice">{{ item.originPrice }}</view>
+						</view>
+						<view class="content-price">¥{{ $numberFormat(item.value) }}</view>
+					</view>
+				</view>
+				<!-- <view class="core-goods-list-item"></view> -->
+				<view class=""></view>
+			</view>
+			<view class="flex empty" v-if="!list.length">
+				<view class="center">
+					<image class="center-img"
+						src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png"
+						mode="scaleToFill"></image>
+					<view class="center-font">还没有商品</view>
+				</view>
+			</view>
+			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'"
+				:nomore-text="'已经到底了'" />
+		</view>
+
+		<custom-tab-bar :activeValue="'core'" />
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
+	export default {
+		components: {
+			CustomTabBar,
+		},
+		data() {
+			return {
+				status: 'nomore', //上拉刷新状态
+				pageNum: 1,
+				total: 0,
+				list: [],
+				exclusiveSingle: [],
+				categoryId: '',
+				classifyList: [], // 分类列表
+				classifyIndex: 0, // 分类选中下标
+				classifyListFilter: [],
+				swiperList: [], // 轮播图
+				goodsTitle: '',
+				scrollTop: 0,
+				screenIndex: 0,
+				priceShow: false,
+				priceSort: null,
+				priceStep: 0,
+				screenShow: false,
+				initData: {},
+				coinNum: {
+					startPrice: null,
+					endPrice: null
+				},
+				coinActionIndex: 0,
+				coinActionInfo: {},
+				coinList: [{
+						min: null,
+						max: null,
+						desc: '全部'
+					},
+					{
+						min: 1,
+						max: 100,
+						desc: ''
+					},
+					{
+						min: 101,
+						max: 200,
+						desc: ''
+					},
+					{
+						min: 201,
+						max: 500,
+						desc: ''
+					},
+					{
+						min: 501,
+						max: 1000,
+						desc: ''
+					},
+					{
+						min: 1001,
+						max: 5000,
+						desc: ''
+					},
+					{
+						min: 5000,
+						max: null,
+						desc: '以上'
+					},
+				],
+				userInfo: '',
+				loginState: '',
+			};
+		},
+		onLoad(opthios) {
+			if (opthios.userId) {
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/core/index.vue.`
+							)
+						}
+					})
+				}
+
+			}
+			if (opthios.type) {
+				uni.setStorageSync('shareType', opthios.type)
+			}
+			this.pageList()
+			this.getExclusive()
+			this.getClassify()
+			this.getSwiper()
+		},
+		onShow() {
+			this.loginState = uni.getStorageSync('token') ? true : false
+			if (this.loginState) {
+				this.getBean()
+				this.getBaseInfo()
+			}
+		},
+		onPageScroll: function(e) {
+			this.scrollTop = e.scrollTop
+		},
+		methods: {
+			pageList() {
+				this.pageNum = 1
+				this.total = 0
+				this.list = []
+				this.getList()
+			},
+
+			// 获取分类
+			getClassify() {
+				$http.post('/api/v1/mp/user/exchange/category/listTree', {}).then(res => {
+					if (res.code == 0) {
+						let interval = 10
+						this.classifyList = res && res.rows
+						this.classifyList.forEach(item => {
+							item.picUrl = env.filePublic + item.picUrl.split(',')[0] +
+								'?imageView2/2/w/340'
+							item.goodsCategoryList.forEach(ele => {
+								ele.picUrl = env.filePublic + ele.picUrl.split(',')[0] +
+									'?imageView2/2/w/340'
+							})
+							item.list = []
+							if (item.goodsCategoryList.length > interval) {
+								let num = Math.ceil(item.goodsCategoryList.length / interval)
+								let arr = []
+
+								let a = 0
+								let stop = interval
+								for (let i = 1; i <= num; i++) {
+									arr = item.goodsCategoryList.slice(a, stop)
+									a = i * interval
+									stop = stop + interval
+
+								}
+							} else {
+								item.list.push(item.goodsCategoryList)
+							}
+						})
+						if (this.classifyList.length > interval) {
+							let num = Math.ceil(this.classifyList.length / interval)
+							let arr = []
+
+							let a = 0
+							let stop = interval
+							for (let i = 1; i <= num; i++) {
+								arr = this.classifyList.slice(a, stop)
+								a = i * interval
+								stop = stop + interval
+								this.classifyListFilter.push(arr)
+							}
+						} else {
+							this.classifyListFilter = [
+								[...this.classifyList]
+							]
+						}
+						this.classifyList.unshift({ name: '全部', categoryId: '' })
+					}
+				})
+			},
+
+			//轮播图
+			getSwiper() {
+				$http.post(`/api/v1/mp/user/exchange/banner/list`, {
+					noToken: true,
+					location: "top"
+				}).then(res => {
+					res.data.forEach(item => item.picUrl = env.filePublic + item.picUrl.split(',')[0])
+					this.swiperList = res.data
+				})
+			},
+
+			// 标签商品
+			async getExclusive() {
+				let resData = await $http.post(`/api/v1/mp/user/exchange/activity/list`, {
+					noToken: true
+				})
+				let goodsList = []
+				for (let item of resData.data) {
+					let resDatas = await $http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=1&pageSize=10`, {
+						noToken: true,
+						tagIds: item.tagId
+					})
+					goodsList.push({
+						data: resDatas.rows,
+						name: item.name,
+						tagId: item.tagId
+					})
+				}
+				goodsList.forEach(item => {
+					item.data.forEach(items => {
+						items.picUrl = env.filePublic + items.picUrl.split(',')[0] +
+							'?imageView2/2/w/340'
+					})
+				})
+				this.exclusiveSingle = goodsList
+			},
+
+			// 商品列表
+			getList() {
+				let data = {
+					categoryId: this.categoryId,
+					priceSort: this.priceSort,
+					...this.coinNum,
+					noToken: true
+				}
+				$http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=${this.pageNum}&pageSize=20`, data).then(
+					res => {
+						if (res.code == 0) {
+							res.rows.forEach(item => {
+								let picUrlArr = item.picUrl.split(',')
+								item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
+							})
+
+							this.total = res.total
+							this.list = this.list.concat(res.rows)
+						}
+					}).catch(() => {
+				})
+			},
+
+			getBean() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/mine/init', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.initData = res.data
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			// 切换分类
+			changeClassify(e) {
+				this.categoryId = e.categoryId
+				this.classifyIndex = e.index
+				this.screenIndex = 0
+				this.priceStep = 0
+				this.priceShow = false
+				this.priceSort = null
+				this.coinActionIndex = 0
+				this.screenShow = false
+				this.coinNum.endPrice = null
+				this.coinNum.startPrice = null
+				this.coinActionInfo = {}
+				this.pageList()
+			},
+
+			// 盲豆筛选切换
+			changeScreen(num) {
+				this.screenIndex = num
+				if (num == 1) {
+					if (this.priceStep == 0) {
+						this.priceStep++
+						this.priceShow = true
+						this.priceSort = 1
+					} else if (this.priceStep == 1) {
+						this.priceStep++
+						this.priceShow = false
+						this.priceSort = 2
+					} else if (this.priceStep == 2) {
+						this.priceStep = 0
+						this.priceShow = false
+						this.priceSort = null
+						this.screenIndex = 0
+					}
+					this.pageList()
+				} else if (num == 2) {
+					this.priceStep = 0
+					this.screenShow = !this.screenShow
+					this.priceShow = false
+					this.priceSort = null
+				}
+			},
+
+			selectCoin(item, index) {
+				this.coinActionIndex = index
+				this.coinActionInfo = item
+				this.screenShow = !this.screenShow
+				this.coinNum.endPrice = item.max
+				this.coinNum.startPrice = item.min
+				this.pageList()
+			},
+
+			// 跳转点击事件
+			toPage(item) {
+				if (item.type == "link") {
+					uni.navigateTo({
+						url: `/packageOperate/webview/index?linkUrl=${ item.linkUrl }`,
+					})
+				} else if (item.type == "tag") {
+					uni.navigateTo({
+						url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.goodsTags ? item.goodsTags : '' }`
+					})
+				}
+			},
+
+			// 商品详情
+			toGoodsDetail(item) {
+				uni.navigateTo({
+					url: `/packageGoods/goods/detail?id=${ item.goodsId }`
+				})
+			},
+
+			// 商品列表
+			toGoodsList() {
+				uni.navigateTo({
+					url: `/packageGoods/goods/list?title=${ this.goodsTitle }`
+				})
+			},
+
+			// 商品标签
+			toTagGoods(item) {
+				uni.navigateTo({
+					url: `/packageGoods/goods/list?name=${ item.name }&tagIds=${ item.tagId ? item.tagId : '' }`
+				})
+			},
+
+			// 商品分类
+			toCategoryGoods(index, indexs) {
+				let list = this.classifyIndex == 0 ? this.classifyListFilter : this.classifyList[this.classifyIndex].list
+				let item = list[index][indexs]
+				uni.navigateTo({
+					url: `/packageGoods/goods/list?name=${ item.name }&categoryId=${ item.categoryId ? item.categoryId : '' }`
+				})
+			},
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.userInfo = res.data
+					}
+				})
+			},
+		},
+		onReachBottom() {
+			// 判断是否有数据
+			if (this.total < this.pageNum * 20) return;
+			this.status = 'loading';
+			++this.pageNum
+			if (this.total < this.pageNum * 20) this.status = 'nomore';
+			else this.status = 'loading';
+			this.getList()
+		},
+		//分享好友
+		onShareAppMessage(res) {
+			return {
+				title: '盲票,玩的就是有趣',
+				path: '/pages/index/index',
+			}
+		},
+		//分享朋友圈
+		onShareTimeline() {
+			return {
+				title: '盲票,玩的就是有趣',
+				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.core {
+		background-color: #fff;
+
+		&-none {
+			height: 120rpx;
+		}
+	}
+
+	// 搜索
+	.u-nav-slot {
+		text {
+			font-size: 32rpx;
+		}
+
+		/* #ifdef H5 */
+		&__input {
+			position: relative;
+			height: 70rpx;
+			width: 700rpx;
+			padding: 0 30rpx;
+			background: #F4F5F6;
+			border-radius: 35rpx;
+
+			&__btn {
+				z-index: 200;
+				width: 300rpx;
+				height: 70rpx;
+				line-height: 70rpx;
+				font-size: 30rpx;
+				text-align: center;
+				font-weight: bold;
+				color: #fff;
+				background-color: #FF8D0B;
+				border-radius: 35rpx;
+			}
+		}
+
+		/* #endif */
+		/* #ifndef H5 */
+		&__input {
+			position: relative;
+			height: 70rpx;
+			width: 518rpx;
+			padding-left: 30rpx;
+			background: #F4F5F6;
+			border-radius: 35rpx;
+			padding-right: 30rpx;
+
+			&__btn {
+				z-index: 200;
+				width: 140rpx;
+				height: 70rpx;
+				line-height: 70rpx;
+				font-size: 30rpx;
+				text-align: center;
+				font-weight: bold;
+				color: #fff;
+				background-color: #FF8D0B;
+				border-radius: 35rpx;
+			}
+		}
+
+		/* #endif */
+
+	}
+
+	// 固定搜索、分类
+	.fixed-top {
+		position: fixed;
+		z-index: 100;
+		width: 100%;
+		background-color: #fff;
+
+		// 搜索
+		&-search {
+			justify-content: space-between;
+			padding: 14rpx 30rpx 34rpx;
+
+			&__input {
+				position: relative;
+				flex: 1;
+				height: 84rpx;
+				padding-left: 46rpx;
+				background: #F4F5F6;
+				border-radius: 20rpx;
+
+				&__btn {
+					position: absolute;
+					right: 0;
+					width: 110rpx;
+					height: 76rpx;
+					line-height: 76rpx;
+					font-size: 34rpx;
+					text-align: center;
+					font-weight: bold;
+					color: #FFC062;
+					background-color: #333333;
+					border-radius: 18rpx;
+				}
+			}
+
+			image {
+				width: 52rpx;
+				height: 52rpx;
+				margin-left: 50rpx;
+			}
+		}
+
+		// 分类
+		&-classify {
+			padding-bottom: 20rpx;
+		}
+
+		// 盲豆筛选
+		&-screen {
+			height: 64rpx;
+
+			&-content {
+				position: relative;
+				justify-content: space-between;
+				padding: 0 34rpx;
+				color: #fff;
+				height: 100%;
+				background: #F9822C;
+
+				&__item {
+					.title {
+						margin-right: 14rpx;
+					}
+
+					.select {
+						flex-direction: column;
+
+						image {
+							width: 18rpx;
+							height: 26rpx;
+						}
+					}
+				}
+
+				&__coin {
+					position: absolute;
+					right: 0;
+					bottom: -390rpx;
+					width: 200rpx;
+					height: 390rpx;
+					background: #FFFFFF;
+					box-shadow: 0px 0px 2px 0px rgba(100, 100, 100, 0.1);
+
+					&__list {
+						padding-top: 20rpx;
+						color: #666;
+
+						.item {
+							margin-bottom: 30rpx;
+							font-size: 26rpx;
+							line-height: 26rpx;
+						}
+
+						.action {
+							color: #F9822C;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	// 轮播
+	.core-swiper {
+		margin: 0 34rpx 20rpx;
+		border-radius: 16rpx;
+
+		&-centent {
+			height: 300rpx;
+
+			.swiper-item {
+				width: 100%;
+				height: 100%;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 16rpx;
+				}
+			}
+		}
+	}
+
+	// 二级分类
+	.core-category {
+		width: 100%;
+		height: 360rpx;
+		margin-bottom: 34rpx;
+		padding: 0 34rpx;
+
+		&-swiper {
+
+			width: 100%;
+			height: 360rpx;
+
+			.swiper-item {
+				width: 100%;
+				height: 360rpx;
+
+				&-wrap {
+					width: 100%;
+					height: 100%;
+					display: flex;
+					flex-wrap: wrap;
+
+					&__content {
+						display: flex;
+						align-items: center;
+						flex-direction: column;
+						justify-content: space-between;
+						width: 20%;
+						height: 50%;
+
+						image {
+							width: 90%;
+							height: 70%;
+						}
+					}
+				}
+
+			}
+		}
+	}
+
+	// 标签商品
+	.tag-goods {
+		display: flex;
+		align-items: center;
+		position: relative;
+		margin: 0 34rpx 34rpx;
+		height: 350rpx;
+
+		&-imgBg {
+			position: absolute;
+			top: 0;
+			width: 100%;
+			height: 350rpx;
+		}
+
+		&-content {
+			width: 100%;
+			position: absolute;
+			top: 0;
+			z-index: 5;
+			padding: 26rpx 22rpx;
+
+			&-nav {
+				justify-content: space-between;
+				height: 40rpx;
+				margin-bottom: 10rpx;
+
+				&__left {
+					image {
+						width: 40rpx;
+						height: 30rpx;
+					}
+
+					.title {
+						font-family: YouSheBiaoTiHei;
+						font-weight: 400;
+						font-size: 40rpx;
+						color: #FFFFFF;
+						padding: 0 36rpx;
+					}
+				}
+
+				&__right {
+					.title {
+						font-family: YouSheBiaoTiHei;
+						font-weight: 400;
+						color: #FFFFFF;
+						margin-right: 12rpx;
+					}
+
+					image {
+						width: 22rpx;
+						height: 20rpx;
+					}
+				}
+			}
+
+			&-list {
+				display: flex;
+				height: 260rpx;
+				overflow-x: auto;
+
+				&-item {
+					flex-direction: column;
+					margin-right: 14rpx;
+
+					.image {
+						width: 180rpx;
+						height: 180rpx;
+						background: #FFFFFF;
+						box-shadow: 0px 0px 4px 0px rgba(100, 100, 100, 0.13);
+						border-radius: 4rpx;
+						margin-bottom: 24rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+
+					.title {
+						text-align: center;
+						line-height: 28rpx;
+						color: #FFFFFF;
+					}
+				}
+			}
+		}
+	}
+
+	// 商品列表
+	.core-goods {
+		padding: 0 34rpx;
+
+		&-list {
+			width: 100%;
+			justify-content: space-between;
+			flex-wrap: wrap;
+
+			&-item {
+				flex-direction: column;
+				justify-content: flex-start;
+				width: 48%;
+				padding-bottom: 32rpx;
+				background: #FFFFFF;
+				box-shadow: 0px 0px 3px 0px rgba(100, 100, 100, 0.1);
+				border-radius: 16rpx;
+				margin-bottom: 30rpx;
+
+				.image-wrap {
+					width: 100%;
+					height: 320rpx;
+					margin-bottom: 16rpx;
+
+					image {
+						width: 100%;
+						height: 100%;
+						border-radius: 16rpx 16rpx 0 0;
+					}
+				}
+
+				.content {
+					width: 100%;
+					padding: 0 22rpx;
+
+					&-title {
+						height: 28rpx;
+						font-size: 28rpx;
+						line-height: 28rpx;
+						font-weight: bold;
+						overflow: hidden;
+					}
+
+					&-titletwo {
+						height: 34rpx;
+						font-size: 28rpx;
+						line-height: 34rpx;
+						font-weight: bold;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+					&-coin {
+						height: 34rpx;
+						font-size: 24rpx;
+						justify-content: space-between;
+						margin-top: 30rpx;
+						margin-bottom: 24rpx;
+
+						&__left {
+							margin-right: 24rpx;
+							font-size: 28rpx;
+							font-weight: bold;
+
+							text {
+								font-weight: normal;
+							}
+
+							image {
+								width: 34rpx;
+								height: 34rpx;
+							}
+						}
+
+						&__right {
+							color: #666666;
+							text-decoration: line-through;
+						}
+					}
+
+					&-price {
+						font-size: 24rpx;
+						line-height: 24rpx;
+						color: #666666;
+					}
+				}
+
+			}
+		}
+
+		.empty {
+			.center {
+				text-align: center;
+
+				&-img {
+					width: 228rpx;
+					height: 320rpx;
+				}
+
+				&-font {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #999999;
+					margin-bottom: 200rpx;
+				}
+			}
+		}
+	}
+</style>

+ 2 - 2
src/pages/index/index -2022-7-15.vue

@@ -4,7 +4,7 @@
 			<view class="index" :style="{ top: statusHeight + 'px' }">
 				<view class="barrage">
 					<!-- 背景 -->
-					<image class="barrage-bg" src="../../static/index/barrage_bg.png" mode="scaleToFill"></image>
+					<image class="barrage-bg" src="../../static/index/barrage_bgTwo.png" mode="scaleToFill"></image>
 					<!-- 中奖信息轮播 -->
 					<swiper class="barrage-swiper" :interval="2000" :autoplay="true" :vertical="true" :circular="true">
 						<swiper-item v-for="(item, index) in prizeNewsListOne" :key="index">
@@ -68,7 +68,7 @@
 					</view>
 					<!-- #ifdef MP-WEIXIN -->
 					<view class="proposal-tip" @click="contactService">
-						<image src="../../static/index/index_tip_bg.png" mode="scaleToFill"></image>
+						<image src="../../static/index/index_tip_bgTwo.png" mode="scaleToFill"></image>
 						<text>投诉建议</text>
 					</view>
 					<!-- #endif -->

+ 79 - 50
src/pages/index/index.vue

@@ -23,6 +23,11 @@
 
 				<!-- 查看规则 -->
 				<view class="rule">
+					<!-- #ifdef MP-WEIXIN -->
+					<view class="rule-gameimg flex">
+						<image src="../../static/index/games.png" @click="toExternalGames" mode="scaleToFill"></image>
+					</view>
+					<!-- #endif -->
 					<!-- #ifndef MP-ALIPAY -->
 					<!-- <view class="rule-content flex" @click="contactService">
 						<image src="../../static/index/index_tip_bgTwo.png" mode="scaleToFill"></image>
@@ -33,18 +38,20 @@
 						<text>查看规则</text>
 					</view>
 					<!-- #endif -->
-				</view>
-				
+				</view>
+				<!-- <view @click="toLucky">这是测试盲票开奖入口</view> -->
+				<!-- <view @click="toStore">这是测试门店盲票列表入口</view> -->
 				<!-- 盲票轮播 -->
 				<view class="ticket">
 					<view class="ticket-bgc" @click="ticketLeft()">
 						<image src="../../static/index/index_anniu.png" mode="scaleToFill"></image>
 					</view>
-					<swiper class="ticket-swiper" :current="ticketIndex" :autoplay="false" :circular="true"
-						:duration="200" @change="changeTicket">
+					<swiper class="ticket-swiper" :current="ticketIndex" :autoplay="false" :circular="true" :duration="200"
+						@change="changeTicket">
 						<swiper-item v-for="(item, index) in ticketList" :key="index">
-							<view class="ticket-swiper-item flex" @click="toTicketBox(item)">
-								<image class="ticket-swiper-item-box" :src="item.picUrl[0]" mode="aspectFit"></image>
+							<view class="ticket-swiper-item flex">
+								<image class="ticket-swiper-item-box" @click="toTicketBox(item)" :src="item.picUrl[0]" mode="aspectFit">
+								</image>
 							</view>
 						</swiper-item>
 					</swiper>
@@ -54,8 +61,8 @@
 					<view class="ticket-right" @click="ticketLeft()">
 						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
 					</view>
-				</view>
-				
+				</view>
+
 				<!-- 投诉建议 -->
 				<view class="proposal flex">
 					<view class="proposal-time flex" v-if="activityTime && activityTime > 0" @click="toActivity">
@@ -74,9 +81,8 @@
 
 				<!-- 盲票名称轮播 -->
 				<view class="ticket-title" flex>
-					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex"
-						previous-margin="80px" next-margin="80px" :autoplay="false" :circular="true"
-						@change="changeTicketTitle">
+					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex" previous-margin="80px"
+						next-margin="80px" :autoplay="false" :circular="true" @change="changeTicketTitle">
 						<swiper-item v-for="(item, index) in ticketList" :key="index">
 							<view class="ticket-title-swiper-item flex" @click="clickTicketTitle(index)"
 								:class="{ 'action': ticketTitleIndex == index }">
@@ -320,6 +326,17 @@
 				}
 			},
 
+			toLucky() {
+				uni.navigateTo({
+					url: `/pages/lucky/index?id=ffe7fab722472a6fd5692a38287366aa0a0a812329c145e1280edaf54b1840c7`
+				})
+			},
+			toStore() {
+				uni.navigateTo({
+					url: `/packageOperate/store/index?channelId=26`
+				})
+			},
+
 			// 投诉建议
 			contactService() {
 				// #ifdef MP-WEIXIN
@@ -338,6 +355,24 @@
 				// #endif
 			},
 
+			// 跳转酷玩星球
+			toExternalGames() {
+					/**
+					 * envVersion 类型为字符串
+					 * envVersion: 'develop', //开发版
+					 * envVersion: 'trial', //体验版
+					 * envVersion: 'release',//正式版
+					 */
+					uni.navigateToMiniProgram({
+						appId: 'wx6b4030841ccd653b', // appid
+						// path: '/pages/index/index', // 首页路径
+						envVersion: "release",
+						success: res => {
+							// 打开成功
+						},
+					})
+			},
+
 			// 活动
 			getActivityList() {
 				$http.post(`/api/v1/mp/user/marketing/recent`, {}).then(res => {
@@ -357,7 +392,10 @@
 				let data = {
 					type: 'online',
 					noToken: true
-				}
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
 				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
 					res => {
 						uni.hideLoading();
@@ -467,7 +505,10 @@
 				let data = {
 					type: 'online',
 					noToken: true
-				}
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
 				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
 					res => {
 						const boxIdStr = this.ticketList.map(item => item.boxId).join()
@@ -523,44 +564,15 @@
 					})
 				} else if (item.refType && JSON.parse(item.refType).value === 'coin') {
 					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=424`
+						url: `/packagePrize/goods/index?id=424&boxId=${ this.ticketInfo.boxId }`
 					})
 				} else if (item.refType && JSON.parse(item.refType).value === 'coupon' || JSON.parse(item.refType)
 					.value === 'coupon_pkg') {
+					if (item.couponDetail) {
+						uni.setStorageSync('couponDetail', item.couponDetail);
+					}
 					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=425`
-					})
-				}
-
-			},
-
-			// 点击奖品,跳转到奖品详情
-			toPrizeGoods(item) {
-				if (item.prizeType == "goods") {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=${ item.refId }`
-					})
-				}
-				//门店优惠券
-				if (item.prizeType == "coupon") {
-					// if (item.couponType == "1") {
-					// 	uni.navigateTo({
-					// 		url: `/packagePrize/goods/detail?id=426`
-					// 	})
-					// }
-					// if (item.couponType == "2") {
-					// uni.navigateTo({
-					// 	url: `/packagePrize/goods/detail?id=425`
-					// })
-					// }
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=425`
-					})
-				}
-				// 盲豆
-				if (item.prizeType == "coin") {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=424`
+						url: `/packagePrize/goods/index?id=425&boxId=${ this.ticketInfo.boxId }`
 					})
 				}
 			},
@@ -642,7 +654,7 @@
 		position: relative;
 		width: 100%;
 		height: calc(100vh - 50px);
-		background: url(https://mp-public-test-1307117429.cos.ap-shanghai.myqcloud.com/v2/bkg1.png) center center no-repeat;
+		background: url(https://mp-public-test-1309783959.cos.ap-shanghai.myqcloud.com/v2/bkg1.png) center center no-repeat;
 		background-size: 100vw calc(100vh - 50px);
 
 		.index {
@@ -716,9 +728,14 @@
 	.rule {
 		display: flex;
 		align-items: center;
+		/* #ifndef MP-WEIXIN */
 		justify-content: flex-end;
+		/* #endif */
+		/* #ifdef MP-WEIXIN */
+		justify-content: space-between;
+		/* #endif */
 		height: 34rpx;
-		padding-right: 34rpx; //
+		padding: 0 34rpx; //
 		margin-bottom: 24rpx;
 
 		&-content {
@@ -737,6 +754,18 @@
 				color: #FFFFFF;
 			}
 		}
+
+		&-gameimg {
+			width: 165rpx;
+			height: 155rpx;
+
+			image {
+				width: 165rpx;
+				height: 155rpx;
+				margin-top: 64px;
+				z-index: 100000;
+			}
+		}
 	}
 
 	// 盲票
@@ -1206,4 +1235,4 @@
 			left: 110%;
 		}
 	}
-</style>
+</style>

+ 137 - 0
src/pages/index/payExternal.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="">
+		<!-- #ifdef MP-ALIPAY -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="支付中" leftIconSize="0"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifdef MP-WEIXIN -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="支付中"></u-navbar>
+		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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 -->
+		<!-- <web-view :src='info'></web-view> -->
+		<view class="btn" v-if="paystatus == 0">
+			<u-button class="btn1" @click="openPay(1)" text="前往第三方支付" shape="circle"></u-button>
+		</view>
+		<view class="btn" v-else>
+			<u-button class="btn1" @click="toPurchase" text="我已支付,去开奖" shape="circle"></u-button>
+			<u-button class="btn2" @click="openPay(2)" text="还未支付,前往第三方支付" shape="circle"></u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				info: 'https://openapi.ysepay.com/gateway.do?',
+				pagesNum: '',
+				orderId: '',
+				paystatus: 0,
+			}
+		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.paystatus = sessionStorage.getItem('paystatus') ? 1 : 0
+		},
+		onLoad(opthios) {
+			if(opthios.orderId){
+				this.orderId = opthios.orderId
+			}
+			let data = sessionStorage.getItem('viewUrlData')
+			data = JSON.parse(data)
+			Object.keys(data).forEach(item=>{
+				this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
+			})
+			
+			// if(opthios.viewUrl){
+			// 	let data = JSON.parse(decodeURIComponent(opthios.viewUrl))
+			// 	Object.keys(data).forEach(item=>{
+			// 		this.info = this.info + item + '=' + encodeURIComponent(data[item]) + '&'
+			// 	})
+			// }
+			// location.href =  this.info
+			// window.open(this.info);
+		},
+		onUnload() {
+			sessionStorage.removeItem('paystatus');
+			sessionStorage.removeItem('viewUrlData');
+		},
+		methods: {
+			openPay(e) {
+				if(e == 1){
+					sessionStorage.setItem('paystatus', '1');
+					window.open(this.info);
+				}else{
+					window.open(this.info);
+				}
+				
+			},
+			
+			toPurchase() {
+				let _this = this
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/ticket/query', {
+					orderId: this.orderId,
+				}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						if(res.data.status != 3) {
+							uni.showToast({
+								title: '支付成功',
+								icon: 'success',
+								duration: 2000
+							})
+							setTimeout(() => {
+								uni.redirectTo({
+									url: `/packagePrize/purchase/index?boxId=${ res.data.boxId }&orderId=${ this.orderId }&isTry=0`
+								})
+							}, 500)
+						}else {
+							uni.$u.toast('盲票已开奖');
+							setTimeout(() => {
+								uni.switchTab({
+									url: `/pages/index/index`
+								})
+							}, 500)
+						}
+					}else {
+						uni.$u.toast(res.msg);
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.btn {
+	 margin: 156rpx 41rpx 0 41rpx;
+	 .btn1 {
+		 background: linear-gradient(180deg, #FEA052 0%, #FF8D2F 100%);
+		 border-radius: 2px;
+		 color: #FFFFFF;
+	 }
+	 .btn2 {
+		 margin-top: 51rpx;
+		 border-radius: 2px;
+		 background-color: #EFEFEF;
+		 color: #666666;
+	 }
+}
+</style>

+ 50 - 6
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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;
 			},
@@ -119,17 +140,37 @@
 						// #ifdef H5 
 						uni.$u.toast('登录成功');
 						uni.setStorageSync('token', res.token)
-						setTimeout(() => {
-							uni.navigateBack({
-								delta: 2
-							})
-						}, 500)
+						_this.getInfoAvatar()
 						// #endif
 					}
 				}).catch(() => {
 					_this.loading = false
 				})
 			},
+			
+			getInfoAvatar() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					if(res.code == 0) {
+						//判断有没有头像
+						// if(res.data.avatar) {
+							let Pages = getCurrentPages()
+							setTimeout(() => {
+								if(this.pagesNum > 2 && (Pages[this.pagesNum-3].route != "pages/login/index")) {
+									uni.navigateBack({
+										delta: 2
+									})
+								}else {
+									this.toIndex()
+								}
+							}, 500)
+						// }else{
+						// 	uni.reLaunch({
+						// 		url: '/packageOther/avatar/index'
+						// 	})
+						// }
+					}
+				})
+			},
 
 			getBaseInfo() {
 				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
@@ -172,6 +213,9 @@
 					uni.navigateBack({
 						delta: 2
 					})
+					// uni.reLaunch({
+					// 	url: '/packageOther/avatar/index'
+					// })
 				}, 500)
 			},
 		}

+ 31 - 6
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 -->
+		<!-- #ifdef MP-WEIXIN -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
 		<!-- #endif -->
+		<!-- #ifndef MP-WEIXIN || MP-ALIPAY -->
+		<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">
@@ -14,25 +25,32 @@
 				<view class="login-image-txt" v-if="appId == 2">码上快购</view>
 				<view class="login-image-txt" v-else>盲票</view>
 			</view>
+			
 			<!-- #ifdef MP-ALIPAY -->
 			<view class="login-btn">
 				<button open-type="getAuthorize" @getAuthorize="onGetAuthorize" scope='phoneNumber'>支付宝登录</button>
 			</view>
+			<view class="flex login-code" @click="toCode">手机号登录/注册</view>
 			<!-- #endif -->
-			<!-- #ifndef MP-ALIPAY -->
+			<!-- #ifdef MP-WEIXIN -->
 			<view class="login-btn">
 				<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="checked">微信登录</button>
 				<button @click="getPhoneNumber" v-else>微信登录</button>
 			</view>
-			<!-- #endif -->
 			<view class="flex login-code" @click="toCode">手机号登录/注册</view>
+			<!-- #endif -->
+			<!-- #ifdef H5 -->
+			<view class="login-btn">
+				<button type="button" @click="toCode">手机号登录/注册</button>
+			</view>
+			<!-- #endif -->
 		</view>
 
 		<view class="footer-fixed">
 			<view class="flex about">
 				<view class="checked">
 					<u-checkbox-group>
-						<u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#E96737"
+						<u-checkbox :value="checked" :checked="checked" size="20" shape="circle" activeColor="#F9822C"
 							@change="changeChecked"></u-checkbox>
 					</u-checkbox-group>
 				</view>
@@ -59,10 +77,14 @@
 			return {
 				authShow: false,
 				token: '',
-				checked: true,
+				checked: false,
 				appId: 1,
+				pagesNum: '',
 			};
 		},
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+		},
 		created() {
 			this.appId = appId
 		},
@@ -156,6 +178,9 @@
 					uni.navigateBack({
 						delta: 1
 					})
+					// uni.reLaunch({
+					// 	url: '/packageOther/avatar/index'
+					// })
 				}, 500)
 			},
 

+ 722 - 590
src/pages/lucky/index.vue

@@ -1,590 +1,722 @@
-<template>
-	<view>
-		<view class="lucky"></view>
-		<u-overlay :show="luckyShow" :opacity="0.8" zIndex="100">
-			<view class="flex luck-warp" @touchmove.prevent.stop>
-				<view class="luck-info">
-					<view class="luck-info-bg">
-						<image src="../../static/lucky/lucky_bg.png" mode="scaleToFill"></image>
-					</view>
-					<view class="luck-info-content flex">
-						<view class="luck-info-content-num">
-							<image src="../../static/lucky/lucky_gkmp.png" mode="aspectFit"
-								v-if="info.salePrice == 0"></image>
-							<image src="../../static/lucky/zioff.png" mode="aspectFit" v-else></image>
-						</view>
-						<view class="luck-info-content-img">
-							<view class="luck-info-content-img-word">
-								<image class="img" src="../../static/lucky/lucky_tu.png" mode="scaleToFill"></image>
-								<view class="luck-info-content-img-word__content">
-									<text>{{ info.awardsName }}</text>
-								</view>
-								<image class="imgtwo" src="../../static/lucky/lucky_xiaoguo.png" mode="scaleToFill"
-									v-if="infoimg">
-								</image>
-								<image class="img" src="../../static/lucky/lucky_guajiangqu.png" mode="scaleToFill"
-									v-if="info.status == 1">
-									<image class="imgone" src="../../static/lucky/lucky_yidong.png"
-										v-else-if="info.status == 2"></image>
-							</view>
-						</view>
-						<view class="luck-info-content-ticket">
-							<image src="../../static/lucky/lucky_piaohao.png" mode="scaleToFill"></image>
-							<view class="luck-info-content-ticket-info flex">
-								<view class="title" :class="{ 'action': info.status == 2 }">{{ info.title }}</view>
-								<view class="serialNo" :class="{ 'action': info.status == 2 }">序列号:{{ info.serialNo }}
-								</view>
-							</view>
-						</view>
-						<view class="luck-info-content-btn" style="width: 500rpx;" @click="pay"
-							v-if="info.status == 1 && info.salePrice != 0">
-							支付{{ info.salePrice / 100 }}元,立即刮奖</view>
-						<view class="luck-info-content-btn" style="width: 500rpx;" @click="payDetail"
-							v-else-if="info.status == 1 && info.salePrice == 0">收下盲票,立即刮奖</view>
-						<!-- <view class=" code" v-else>开奖啦!</view> -->
-						<view class="luck-info-content-btn" style="width: 500rpx;" @click="toChoice" v-if="Choice">领取奖品
-						</view>
-					</view>
-					<view class="luck-info-close flex">
-						<navigator open-type="exit" target="miniProgram" hover-class="none"
-							class="luck-info-close-content flex">
-							<u-icon name="close" color="#fff" size="20"></u-icon>
-						</navigator>
-					</view>
-				</view>
-			</view>
-		</u-overlay>
-
-		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="getDetailInfo" v-if="payShow" />
-
-		<u-popup :show="showNull" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
-			@touchmove.prevent.stop>
-			<view class="null-prize">
-				<view class="title">该盲票已兑奖</view>
-				<view class="btn" @click="toUser">确认</view>
-			</view>
-		</u-popup>
-
-		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
-			@touchmove.prevent.stop>
-			<view class="null-prize">
-				<view class="title">该盲票已被他人买走了</view>
-				<view class="btn" @click="toUser">确认</view>
-			</view>
-		</u-popup>
-
-		<u-popup :show="showAction" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
-			@touchmove.prevent.stop>
-			<view class="null-prize">
-				<view class="title">该盲票未激活</view>
-				<navigator open-type="exit" target="miniProgram" hover-class="none" class="btn">确认</navigator>
-			</view>
-		</u-popup>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	import appId from '@/config/appId.js'
-	import PayPopup from '../../components/pay-popup/pay-popup.vue'
-	import {
-		urlParameter
-	} from '@/utils/util.js'
-	export default {
-		components: {
-			PayPopup
-		},
-		data() {
-			return {
-				serialNo: '',
-				info: '',
-				payInfo: {},
-				payShow: false,
-				payLookFlag: true,
-				showNull: false,
-				luckyShow: false,
-				status: 2,
-				showAction: false,
-				infoimg: false,
-				Choice: false,
-				ChoiceData: '',
-			};
-		},
-
-		onLoad(options) {
-			if (options.id) {
-				this.serialNo = options.id
-				this.getDetail()
-			}	
-			if (options.q) {
-				let obj = urlParameter(decodeURIComponent(options.q))
-				this.serialNo = obj.id
-				this.getDetail()
-			}
-			if(uni.getStorageSync('code')){
-				this.serialNo = uni.getStorageSync('code')
-			}
-		},
-		onShow() {
-			if(uni.getStorageSync('code')){
-				this.serialNo = uni.getStorageSync('code')
-				this.getDetail()
-			}
-		},
-
-		methods: {
-			getDetail() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
-					serialNo: this.serialNo,
-					noToken: true
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						if (res.data.status == 1) {
-							this.info = res.data
-							this.luckyShow = true
-						} else if (res.data.status == 2) {
-							this.info = res.data
-							if (uni.getStorageSync('token')) {
-								uni.redirectTo({
-									url: `/packagePrize/choice/index?id=${ res.data.ticketId }&type=offline`
-								})
-							} else {
-								this.luckyShow = true
-								uni.showModal({
-									title: '提示',
-									content: '您未登录或登录失效!',
-									confirmText: '去登录',
-									showCancel: false,
-									success(res) {
-										if (res.confirm) {
-											uni.navigateTo({
-												url: "/pages/login/index"
-											})
-										}
-									}
-								})
-							}
-						} else {
-							this.showNull = true
-							this.luckyShow = false
-						}
-					} else if (res.code == 1023) {
-						this.showAction = true
-						this.luckyShow = false
-					} else {
-						uni.$u.toast('该盲票不存在!');
-						setTimeout(() => {
-							uni.switchTab({
-								url: '/pages/index/index'
-							})
-						}, 1000)
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			getDetailInfo() {
-				let _this = this
-				_this.payShow = false
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
-					serialNo: _this.serialNo,
-					noToken: true
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						if (res.data.status == 2) {
-							_this.info = res.data
-							setTimeout(() => {
-								this.infoimg = true
-								setTimeout(() => {
-									this.ChoiceData = res.data.ticketId
-									this.Choice = true
-								}, 500)
-							}, 500)
-						} else {
-							let num = 0
-							let time = setInterval(() => {
-								num++
-								uni.showLoading({
-									title: '加载中'
-								});
-								$http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
-									serialNo: _this.serialNo,
-									noToken: true
-								}).then(ele => {
-									if (ele.data.status == 2) {
-										uni.hideLoading();
-										clearInterval(time)
-										_this.info = res.data
-										setTimeout(() => {
-											this.infoimg = true
-											setTimeout(() => {
-												this.ChoiceData = res.data.ticketId
-												this.Choice = true
-
-											}, 500)
-										}, 500)
-									}
-								})
-								if (num == 10) {
-									uni.hideLoading();
-									clearInterval(time)
-								}
-							}, 1000)
-						}
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			//跳转奖品页
-			toChoice() {
-				uni.redirectTo({
-					url: `/packagePrize/choice/index?id=${ this.ChoiceData }&type=offline`
-				})
-			},
-
-			close() {
-				this.payShow = false
-			},
-			payDetail() {
-				let data = {
-					ticketId: this.info.ticketId,
-					autoCoupon: 0,
-					userCouponIds: [],
-					orderNum: 1,
-					appSource: appId
-				}
-				uni.showLoading();
-				let suid = uni.getStorageSync('shareUid')
-				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						if (res.data.payAmt == 0) {
-							$http.post('/api/v1/mp/user/ticket/order/submit', {
-								suid: suid !== 'undefined' && suid !== undefined ? suid : null,
-								type: uni.getStorageSync('shareType')
-							}).then(res => {
-								uni.hideLoading();
-								if (res.code == 0) {
-									this.getDetailInfo()
-								} else {
-									this.tipShow = true
-									this.luckyShow = false
-								}
-							}).catch(() => {
-								uni.hideLoading();
-							})
-						}
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			pay() {
-				let data = {
-					ticketId: this.info.ticketId,
-					autoCoupon: 1,
-					userCouponIds: [],
-					orderNum: 1,
-					appSource: appId
-				}
-				this.payLookFlag = false
-				uni.showLoading({
-					title: '加载中'
-				});
-				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						let info = {
-							...res.data,
-							...this.info,
-							picUrl: env.filePublic + res.data.picUrl,
-							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
-								.data.couponList[0].title,
-							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
-								.couponList[0].id,
-						}
-						this.payInfo = info
-						this.payShow = true
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			toUser() {
-				uni.switchTab({
-					url: '/pages/user/index'
-				})
-			},
-
-			saveImg() {
-				this.$refs.hchPoster.posterShow()
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.luck-warp {
-		height: 100%;
-
-		.luck-info {
-			position: relative;
-			width: 87vw;
-			height: 60vh;
-
-			&-bg {
-				position: absolute;
-				top: 0;
-
-				image {
-					width: 87vw;
-					height: 60vh;
-				}
-			}
-
-			&-content {
-				flex-direction: column;
-				justify-content: flex-start;
-				position: absolute;
-				top: 0;
-				z-index: 10;
-				width: 100%;
-				height: 100%;
-
-				&-num {
-					position: relative;
-					width: 422rpx;
-					height: 8vh;
-					margin-top: 16vh;
-					margin-bottom: 3vh;
-
-					image {
-						position: absolute;
-						top: 0;
-						width: 100%;
-						height: 100%;
-					}
-
-
-				}
-
-				&-img {
-					position: relative;
-					width: 73%;
-					height: 10vh;
-					background-color: #fff;
-					border-radius: 12rpx;
-
-					&-word {
-						position: absolute;
-						top: 15%;
-						left: 5%;
-						width: 90%;
-						height: 85%;
-						overflow: hidden;
-
-						.img {
-							position: absolute;
-							width: 100%;
-							height: 82.6%;
-						}
-
-						.imgtwo {
-							position: absolute;
-							width: 20%;
-							height: 82%;
-							left: -20%;
-							animation: shadowTwoMove 0.5s linear infinite;
-							animation-iteration-count: 1;
-						}
-
-						.imgone {
-							position: absolute;
-							left: 100%;
-							width: 100%;
-							height: 100%;
-							animation: shadowMove 0.5s linear infinite;
-							animation-iteration-count: 1;
-						}
-
-						&__content {
-							position: absolute;
-							top: 25%;
-							text-align: center;
-							width: 100%;
-							height: 100%;
-							font-size: 36rpx;
-							font-family: YouSheBiaoTiHei;
-							font-weight: 400;
-							color: #fff;
-						}
-					}
-
-				}
-
-				&-title {
-					font-size: 40rpx;
-					line-height: 40rpx;
-					color: #FEFEFE;
-					margin-bottom: 1vh;
-				}
-
-				&-tip {
-					width: 80%;
-					font-size: 26rpx;
-					line-height: 35rpx;
-					text-align: center;
-					color: #fff;
-				}
-
-				&-ticket {
-					position: relative;
-					width: 73%;
-					height: 10vh;
-					margin-top: 2vh;
-
-					image {
-						position: absolute;
-						top: 0;
-						width: 100%;
-						height: 95%;
-					}
-
-					&-info {
-						width: 90%;
-						height: 75%;
-						left: 5%;
-						position: absolute;
-						top: 0;
-						z-index: 5;
-
-						flex-direction: column;
-
-						.title {
-							font-size: 30rpx;
-							line-height: 30rpx;
-							color: #FF6D2C;
-							margin-top: 1vh;
-							margin-bottom: 1vh;
-							width: 90%;
-							white-space: nowrap;
-							overflow: hidden;
-							text-overflow: ellipsis;
-						}
-
-						.serialNo {
-							font-size: 24rpx;
-							color: #FF6D2C;
-						}
-
-						.action {
-							color: #FFCBAA;
-						}
-					}
-				}
-
-				&-btn {
-					padding: 0 8%;
-					height: 7vh;
-					line-height: 7vh;
-					background: linear-gradient(0deg, #FF4924, #F9D448);
-					box-shadow: 0px 6px 9px 0px rgba(135, 19, 3, 0.49);
-					border-radius: 4vh;
-					text-align: center;
-					color: #FEFEFE;
-					font-size: 40rpx;
-					margin-top: 1vh;
-				}
-
-				.code {
-					padding: 0 20%;
-					height: 7vh;
-					line-height: 10vh;
-					text-align: center;
-					color: #FEFEFE;
-					font-family: YouSheBiaoTiHei;
-					font-size: 38rpx
-				}
-			}
-
-			&-close {
-				width: 100%;
-				position: absolute;
-				bottom: -140rpx;
-
-				&-content {
-					width: 70rpx;
-					height: 70rpx;
-					border-radius: 50%;
-					border: 1px solid #fff;
-				}
-			}
-		}
-	}
-
-	.lucky {
-		width: 100%;
-		height: 100vh;
-		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/hit_bkg.png) center center no-repeat;
-		background-size: 100vw 100vh;
-	}
-
-	.null-prize {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		width: 80vw;
-		height: 320rpx;
-		background-color: #FFFFFF;
-		border: 1px solid rgba(187, 187, 187, 100);
-
-		.btn {
-			margin-top: 60rpx;
-			width: 160rpx;
-			height: 60rpx;
-			line-height: 60rpx;
-			border-radius: 8rpx;
-			background-color: rgba(235, 112, 9, 100);
-			color: rgba(255, 255, 255, 100);
-			font-size: 28rpx;
-			text-align: center;
-		}
-	}
-
-	// 支付后移动动画
-	@keyframes shadowMove {
-		0% {
-			left: 0%;
-		}
-
-		100% {
-			left: 100%;
-		}
-	}
-
-	// 支付后移动动画
-	@keyframes shadowTwoMove {
-		0% {
-			left: -20%;
-		}
-
-		100% {
-			left: 100%;
-		}
-	}
-</style>
+<template>
+	<view>
+		<view class="lucky"></view>
+		<u-overlay :show="luckyShow" :opacity="0.8" zIndex="100">
+			<view class="flex luck-warp" @touchmove.prevent.stop>
+				<view class="luck-info">
+					<view class="luck-info-bg">
+						<image src="../../static/lucky/lucky_bg.png" mode="scaleToFill"></image>
+					</view>
+					<view class="luck-info-content flex">
+						<view class="luck-info-content-num">
+							<image src="../../static/lucky/lucky_gkmp.png" mode="aspectFit" v-if="info.salePrice == 0">
+							</image>
+							<image src="../../static/lucky/zioff.png" mode="aspectFit" v-else></image>
+						</view>
+						<view class="luck-info-content-img" v-if="info.status != 1">
+							<view class="luck-info-content-img-word">
+								<image class="img" src="../../static/lucky/lucky_tu.png" mode="scaleToFill"></image>
+								<view class="luck-info-content-img-word__content">
+									<text>{{ info.awardsName }}</text>
+								</view>
+								<image class="imgtwo" src="../../static/lucky/lucky_xiaoguo.png" mode="scaleToFill"
+									v-if="infoimg">
+								</image>
+								<image class="img" src="../../static/lucky/lucky_guajiangqu.png" mode="scaleToFill"
+									v-if="info.status == 1">
+									<image class="imgone" src="../../static/lucky/lucky_yidong.png"
+										v-else-if="info.status == 2"></image>
+							</view>
+						</view>
+						<view class="luck-info-content-ticket">
+							<image src="../../static/lucky/lucky_piaohao.png" mode="scaleToFill"></image>
+							<view class="luck-info-content-ticket-info flex">
+								<view class="title" :class="{ 'action': info.status == 2 }">{{ info.title }}</view>
+								<view class="serialNo" :class="{ 'action': info.status == 2 }">序列号:{{ info.serialNo }}
+								</view>
+							</view>
+						</view>
+						<view class="luck-info-content-nearby" v-if="info.status == 1 ">
+							附近已有<view class="num" style="display: inline-block; padding: 0 2px;">{{ nearbyNum }}</view>人刮开<view class="dots"><view>.</view><view>.</view><view>.</view></view>
+						</view>
+						<view class="luck-info-content-btn" style="width: 500rpx;" @click="pay"
+							v-if="info.status == 1 && info.salePrice != 0">
+							点击支付</view>
+						<view class="luck-info-content-btn" style="width: 500rpx;" @click="payDetail"
+							v-else-if="info.status == 1 && info.salePrice == 0">收下盲票,立即刮奖</view>
+						<!-- <view class=" code" v-else>开奖啦!</view> -->
+						<view class="luck-info-content-btn" style="width: 500rpx;" @click="toChoice" v-if="Choice">领取奖品
+						</view>
+					</view>
+					<view class="luck-info-close flex">
+						<navigator open-type="exit" target="miniProgram" hover-class="none"
+							class="luck-info-close-content flex">
+							<u-icon name="close" color="#fff" size="20"></u-icon>
+						</navigator>
+					</view>
+				</view>
+			</view>
+		</u-overlay>
+
+		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="getDetailInfo" v-if="payShow" />
+
+		<u-popup :show="showNull" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
+			@touchmove.prevent.stop>
+			<view class="null-prize">
+				<view class="title">该盲票已兑奖</view>
+				<view class="btn" @click="toUser">确认</view>
+			</view>
+		</u-popup>
+		
+		<u-popup :show="showStop" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
+			@touchmove.prevent.stop>
+			<view class="null-prize">
+				<view class="title">该盲票已停售</view>
+				<view class="btn" @click="toUser">确认</view>
+			</view>
+		</u-popup>
+
+		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
+			@touchmove.prevent.stop>
+			<view class="null-prize">
+				<view class="title">该盲票已被他人买走了</view>
+				<view class="btn" @click="toUser">确认</view>
+			</view>
+		</u-popup>
+
+		<u-popup :show="showAction" :round="10" mode="center" :safeAreaInsetBottom="false" overlayOpacity="0.8"
+			@touchmove.prevent.stop>
+			<view class="null-prize">
+				<view class="title">该盲票未激活</view>
+				<navigator open-type="exit" target="miniProgram" hover-class="none" class="btn">确认</navigator>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	import PayPopup from '../../components/pay-popup/pay-popup.vue'
+	import {
+		urlParameter
+	} from '@/utils/util.js'
+	export default {
+		components: {
+			PayPopup
+		},
+		data() {
+			return {
+				serialNo: '',
+				info: '',
+				payInfo: {},
+				payShow: false,
+				payLookFlag: true,
+				showNull: false,
+				showStop: false,
+				luckyShow: false,
+				status: 2,
+				showAction: false,
+				infoimg: false,
+				Choice: false,
+				ChoiceData: '',
+				nearbyNum: 0,
+			};
+		},
+
+		onLoad(options) {
+			if (options.id) {
+				this.serialNo = options.id
+				this.getDetail()
+			}	
+			if (options.q) {
+				let obj = urlParameter(decodeURIComponent(options.q))
+				this.serialNo = obj.id
+				this.getDetail()
+			}
+			if(uni.getStorageSync('code')){
+				this.serialNo = uni.getStorageSync('code')
+			}
+			this.jumpNumber()
+		},
+		onShow() {
+			if(uni.getStorageSync('code')){
+				this.serialNo = uni.getStorageSync('code')
+				this.getDetail()
+			}
+		},
+
+		methods: {
+			getDetail() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let data = {
+					serialNo: this.serialNo,
+					noToken: true
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
+				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						if (res.data.status == 1) {
+							this.info = res.data
+							this.luckyShow = true
+						} else if (res.data.status == 2) {
+							this.info = res.data
+							if (uni.getStorageSync('token')) {
+								uni.redirectTo({
+									url: `/packagePrize/choice/index?id=${ res.data.ticketId }&type=offline`
+								})
+							} else {
+								this.luckyShow = true
+								uni.showModal({
+									title: '提示',
+									content: '您未登录或登录失效!',
+									confirmText: '去登录',
+									showCancel: false,
+									success(res) {
+										if (res.confirm) {
+											uni.navigateTo({
+												url: "/pages/login/index"
+											})
+										}
+									}
+								})
+							}
+						} else if(res.data.status == 5){
+							this.showStop = true
+							this.luckyShow = false
+						} else {
+							this.showNull = true
+							this.luckyShow = false
+						}
+					} else if (res.code == 1023) {
+						this.showAction = true
+						this.luckyShow = false
+					} else if (res.code == 1027){
+						this.showStop = true
+						this.luckyShow = false
+					}  else {
+						uni.$u.toast('该盲票不存在!');
+						setTimeout(() => {
+							uni.switchTab({
+								url: '/pages/index/index'
+							})
+						}, 1000)
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			getDetailInfo() {
+				let _this = this
+				_this.payShow = false
+				uni.showLoading({
+					title: '加载中'
+				});
+				let data = {
+					serialNo: _this.serialNo,
+					noToken: true
+				}
+				// #ifdef MP-WEIXIN
+				data.appSource = 1
+				// #endif
+				$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						if (res.data.status == 2) {
+							_this.info = res.data
+							setTimeout(() => {
+								this.infoimg = true
+								setTimeout(() => {
+									this.ChoiceData = res.data.ticketId
+									this.Choice = true
+								}, 500)
+							}, 500)
+						} else {
+							let num = 0
+							let time = setInterval(() => {
+								num++
+								uni.showLoading({
+									title: '加载中'
+								});
+								let data = {
+									serialNo: _this.serialNo,
+									noToken: true
+								}
+								// #ifdef MP-WEIXIN
+								data.appSource = 1
+								// #endif
+								$http.post('/api/v1/mp/user/ticket/queryLuckyNum', data ).then(ele => {
+									if (ele.data.status == 2) {
+										uni.hideLoading();
+										clearInterval(time)
+										_this.info = res.data
+										setTimeout(() => {
+											this.infoimg = true
+											setTimeout(() => {
+												this.ChoiceData = res.data.ticketId
+												this.Choice = true
+
+											}, 500)
+										}, 500)
+									}
+								})
+								if (num == 10) {
+									uni.hideLoading();
+									clearInterval(time)
+								}
+							}, 1000)
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			
+			jumpNumber() {
+			      this.nearbyNum = 0 //起始数据
+			      let endNum = Math.floor(Math.random()*10+1) //最终数据
+			      let step = 0  //累加步长
+						let time = 200 //动画时间
+			      const timer = setInterval(() => {
+			        if(this.nearbyNum < (endNum - step)) {
+			          step++
+			          //小数
+			          this.nearbyNum = step
+			        } else {
+			          clearInterval(timer)
+			          this.nearbyNum = endNum
+			        }
+			    }, time)
+			},
+			
+			//跳转奖品页
+			toChoice() {
+				uni.redirectTo({
+					url: `/packagePrize/choice/index?id=${ this.ChoiceData }&type=offline`
+				})
+			},
+
+			close() {
+				this.payShow = false
+			},
+			payDetail() {
+				let data = {
+					ticketId: this.info.ticketId,
+					autoCoupon: 0,
+					userCouponIds: [],
+					orderNum: 1,
+					appSource: appId
+				}
+				uni.showLoading();
+				let suid = uni.getStorageSync('shareUid')
+				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						if (res.data.payAmt == 0) {
+							$http.post('/api/v1/mp/user/ticket/order/submit', {
+								suid: suid !== 'undefined' && suid !== undefined ? suid : null,
+								type: uni.getStorageSync('shareType')
+							}).then(res => {
+								uni.hideLoading();
+								if (res.code == 0) {
+									this.getDetailInfo()
+								} else {
+									this.tipShow = true
+									this.luckyShow = false
+								}
+							}).catch(() => {
+								uni.hideLoading();
+							})
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			pay() {
+				let data = {
+					ticketId: this.info.ticketId,
+					autoCoupon: 1,
+					userCouponIds: [],
+					orderNum: 1,
+					appSource: appId
+				}
+				this.payLookFlag = false
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						let info = {
+							...res.data,
+							...this.info,
+							picUrl: env.filePublic + res.data.picUrl,
+							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
+								.data.couponList[0].title,
+							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
+								.couponList[0].id,
+						}
+						this.payInfo = info
+						this.payShow = true
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			toUser() {
+				uni.switchTab({
+					url: '/pages/user/index'
+				})
+			},
+
+			saveImg() {
+				this.$refs.hchPoster.posterShow()
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.luck-warp {
+		height: 100%;
+
+		.luck-info {
+			position: relative;
+			width: 87vw;
+			height: 60vh;
+
+			&-bg {
+				position: absolute;
+				top: 0;
+
+				image {
+					width: 87vw;
+					height: 60vh;
+				}
+			}
+
+			&-content {
+				flex-direction: column;
+				justify-content: flex-start;
+				position: absolute;
+				top: 0;
+				z-index: 10;
+				width: 100%;
+				height: 100%;
+
+				&-num {
+					position: relative;
+					width: 73%;
+					height: 8vh;
+					margin-top: 16vh;
+					margin-bottom: 3vh;
+
+					image {
+						position: absolute;
+						top: 4rpx;
+						width: 100%;
+						height: 110%;
+					}
+
+
+				}
+
+				&-img {
+					position: relative;
+					width: 73%;
+					height: 10vh;
+					background-color: #fff;
+					border-radius: 12rpx;
+
+					&-word {
+						position: absolute;
+						top: 15%;
+						left: 5%;
+						width: 90%;
+						height: 85%;
+						overflow: hidden;
+
+						.img {
+							position: absolute;
+							width: 100%;
+							height: 82.6%;
+						}
+
+						.imgtwo {
+							position: absolute;
+							width: 20%;
+							height: 82%;
+							left: -20%;
+							animation: shadowTwoMove 0.5s linear infinite;
+							animation-iteration-count: 1;
+						}
+
+						.imgone {
+							position: absolute;
+							left: 100%;
+							width: 100%;
+							height: 100%;
+							// animation: shadowMove 0.5s linear infinite;
+							// animation-iteration-count: 1;
+						}
+
+						&__content {
+							position: absolute;
+							top: 25%;
+							text-align: center;
+							width: 100%;
+							height: 100%;
+							font-size: 36rpx;
+							font-family: YouSheBiaoTiHei;
+							font-weight: 400;
+							color: #fff;
+						}
+					}
+
+				}
+
+				&-title {
+					font-size: 40rpx;
+					line-height: 40rpx;
+					color: #FEFEFE;
+					margin-bottom: 1vh;
+				}
+
+				&-tip {
+					width: 80%;
+					font-size: 26rpx;
+					line-height: 35rpx;
+					text-align: center;
+					color: #fff;
+				}
+
+				&-ticket {
+					position: relative;
+					width: 73%;
+					height: 10vh;
+					margin-top: 2vh;
+
+					image {
+						position: absolute;
+						top: 0;
+						width: 100%;
+						height: 95%;
+					}
+
+					&-info {
+						text-align: center;
+						width: 90%;
+						height: 75%;
+						left: 5%;
+						position: absolute;
+						top: 0;
+						z-index: 5;
+
+						flex-direction: column;
+
+						.title {
+							font-size: 30rpx;
+							line-height: 30rpx;
+							color: #FF6D2C;
+							margin-top: 1vh;
+							margin-bottom: 1vh;
+							width: 90%;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
+
+						.serialNo {
+							font-size: 24rpx;
+							color: #FF6D2C;
+						}
+
+						.action {
+							color: #FFCBAA;
+						}
+					}
+				}
+				
+				&-nearby {
+					position: relative;
+					text-align: center;
+					width: 73%;
+					height: 6vh;
+					margin-top: 4vh;
+					font-size: 30rpx;
+					color: #fff;
+					
+					.num {
+						font-size: 46rpx;
+					}
+					.dots {
+						display: inline-block;
+						view {
+							display: inline-block;
+						}
+					}
+					.dots view {
+						animation: dots-1 2s infinite steps(1);
+						-webkit-animation: dots-1 2s infinite steps(1);
+					}
+					.dots view:first-child+view {
+						animation-name: dots-2;
+						-webkit-animation-name: dots-2;
+					}
+					.dots view:first-child+view+view {
+						animation-name: dots-3;//第三个点的动画名称
+						-webkit-animation-name: dots-3;
+					}
+				}
+
+				&-btn {
+					padding: 0 8%;
+					height: 7vh;
+					line-height: 7vh;
+					background: linear-gradient(0deg, #FF4924, #F9D448);
+					box-shadow: 0px 6px 9px 0px rgba(135, 19, 3, 0.49);
+					border-radius: 4vh;
+					text-align: center;
+					color: #FEFEFE;
+					font-size: 40rpx;
+					margin-top: 1vh;
+				}
+
+				.code {
+					padding: 0 20%;
+					height: 7vh;
+					line-height: 10vh;
+					text-align: center;
+					color: #FEFEFE;
+					font-family: YouSheBiaoTiHei;
+					font-size: 38rpx
+				}
+			}
+
+			&-close {
+				width: 100%;
+				position: absolute;
+				bottom: -140rpx;
+
+				&-content {
+					width: 70rpx;
+					height: 70rpx;
+					border-radius: 50%;
+					border: 1px solid #fff;
+				}
+			}
+		}
+	}
+
+	.lucky {
+		width: 100%;
+		height: 100vh;
+		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/hit_bkg.png) center center no-repeat;
+		background-size: 100vw 100vh;
+	}
+
+	.null-prize {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		width: 80vw;
+		height: 320rpx;
+		background-color: #FFFFFF;
+		border: 1px solid rgba(187, 187, 187, 100);
+
+		.btn {
+			margin-top: 60rpx;
+			width: 160rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+			border-radius: 8rpx;
+			background-color: rgba(235, 112, 9, 100);
+			color: rgba(255, 255, 255, 100);
+			font-size: 28rpx;
+			text-align: center;
+		}
+	}
+
+	// 支付后移动动画
+	@keyframes shadowMove {
+		0% {
+			left: 0%;
+		}
+
+		100% {
+			left: 100%;
+		}
+	}
+
+	// 支付后移动动画
+	@keyframes shadowTwoMove {
+		0% {
+			left: -20%;
+		}
+
+		100% {
+			left: 100%;
+		}
+	}
+	
+	//动态省略号
+	@keyframes dots-1 {
+		from {
+			opacity: 0
+		}
+		25% {
+			opacity: 1
+		}
+	}
+	@keyframes dots-2 {
+		from {
+			opacity: 0
+		}
+		50% {
+			opacity: 1
+		}
+	}
+	@keyframes dots-3 {
+		from {
+			opacity: 0
+		}
+		75% {
+			opacity: 1
+		}
+	}
+	@-webkit-keyframes dots-1 {
+		from {
+			opacity: 0
+		}
+		25% {
+			opacity: 1
+		}
+	}
+	@-webkit-keyframes dots-2 {
+		from {
+			opacity: 0
+		}
+		50% {
+			opacity: 1
+		}
+	}
+	@-webkit-keyframes dots-3 {
+		from {
+			opacity: 0
+		}
+		75% {
+			opacity: 1
+		}
+	}
+</style>

+ 811 - 792
src/pages/ticketBox/detail.vue

@@ -1,792 +1,811 @@
-<template>
-	<view class="ticket-wrap">
-		<!-- #ifdef MP-ALIPAY -->
-		<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">
-					<u-icon name="home" size="20" color="#333"></u-icon>
-					<view class="nav-left__code">首页</view>
-				</view>
-			</u-navbar>
-		</view>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<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">
-					<u-icon name="home" size="20" color="#333"></u-icon>
-					<view class="nav-left__code">首页</view>
-				</view>
-			</u-navbar>
-		</view>
-		<!-- #endif -->
-		
-		<!-- 奖品轮播 -->
-		<view class="prize">
-			<!-- 查看规则 -->
-			<view class="prize-rule" @click="toRule">
-				<!-- #ifndef MP-ALIPAY -->
-				<view class="prize-rule-content flex">
-					<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
-					<text>查看规则</text>
-				</view>
-			<!-- #endif -->
-			</view>
-			
-			<!-- 奖品 -->
-			<swiper class="prize-swiper" previous-margin="100px" next-margin="100px" :interval="4000" :autoplay="true" :circular="true" @change="changePrizeSwiper">
-				<swiper-item :class="prizeIndex == index ? 'swiper-item' : 'swiper-item-side'" v-for="(item, index) in prizeList.slice(0, 10)" :key="index">
-					<view class="prize-swiper-item flex" @click="toPrizeGoods(item)">
-						<image :class="prizeIndex == index ? 'img' : 'img-side'" :src="item.picUrl" mode="aspectFit"></image>
-					</view>
-				</swiper-item>
-			</swiper>
-
-			<!-- 奖品价格 -->
-			<view class="prize-price flex">
-				<view class="prize-price-present" v-if="prizeInfo.prizeType != 'coin'">¥{{ $numberFormat(prizeInfo.value) }}</view>
-				<view class="prize-price-present" v-else>{{ prizeInfo.value }}个</view>
-				<view class="prize-price-txt ells-one">{{ prizeInfo.title }}</view>
-				<view class="prize-price__ticket-price flex">
-					<image src="../../static/ticketBox/ticket_block.png" mode="scaleToFill"></image>
-					<view class="txt">¥{{ $numberFormat(info.salePrice) }}</view>
-				</view>
-				<view class="prize-price-past" v-if="info.originPrice != 0">原价:¥{{ $numberFormat(info.originPrice) }}</view>
-			</view>
-			
-			<!-- 开启盲票 -->
-			<view class="ticket-btn flex">
-				<!-- <image class="ticket-btn-game" src="../../static/ticketBox/ticket_game.png" mode="scaleToFill" @click="toRollingGame"></image> -->
-				<image class="ticket-btn-game" src="" mode="scaleToFill" ></image>
-				<view class="ticket-btn-center flex" @click="exchange">
-					<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
-					<view class="ticket-btn-center-txt">刮开盲票</view>
-				</view>
-				<view class="ticket-btn-share flex">
-					<!-- #ifdef MP-WEIXIN -->
-					<image src="../../static/ticketBox/ticket_share.png" mode="scaleToFill" @click="toShare"></image>
-					<button type="default" open-type="share" v-if="loginState"></button>
-					<!-- #endif -->
-				</view>
-			</view>
-		</view>
-		
-		<!-- 盲票奖品说明 -->
-		<view class="explain flex">
-			<image class="image-left" src="../../static/ticketBox/ticket_explain_left.png" mode="aspectFit"></image>
-			<view class="explain-title">刮开必出以下宝贝之一</view>
-			<image class="image-right" src="../../static/ticketBox/ticket_explain_right.png" mode="aspectFit"></image>
-		</view>
-		
-		<!-- 盲票奖品数量、概率 -->
-		<view class="prize-total">
-			<view class="prize-total-num">共{{ total }}款</view>
-			<!-- 中奖概率 -->
-			<view class="prize-total-chance flex">
-				<view class="prize-total-chance-content flex" v-for="(item, index) in info.ticketAwardsLabelList">
-					<image :src="item.picUrl" mode="scaleToFill"></image>
-					<text>{{ item.hitRate }}%</text>
-				</view>
-			</view>
-			<!-- 文字说明 -->
-			<view class="prize-total-txt">因概率对小数点后三位进行四舍五入处理,故存在总值不为100%的可能。商品抽奖存在概率性,付费请谨慎!未成年人请在家长监督下使用。</view>
-		</view>
-		
-		<!-- 盲票奖品列表 -->
-		<view class="prize-list">
-			<view class="prize-list-item flex" v-for="(item, index) in prizeList" :key="index" @click="toPrizeGoods(item)">
-				<image :src="item.picUrl" mode="aspectFit"></image>
-				<view class="prize-list-item-info flex">
-					<view class="title ells">{{ item.title }}</view>
-					<view class="price" v-if="item.prizeType != 'coin'">¥{{ $numberFormat(item.value) }}</view>
-					<view class="price" v-else>{{ item.value }}个</view>
-				</view>
-				<view class="prize-list-item-grade">
-					<image :src="item.awardsLabelPicUrl" />
-				</view>
-			</view>
-			<u-loadmore :line="true" v-if="prizeList.length>10" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
-		</view>
-		
-		<view class="footer-fixed" v-if="btnFixed">
-			<view class="footer-fixed-btn flex">
-				<view class="footer-fixed-btn-center flex" @click="exchange">
-					<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
-					<view class="footer-fixed-btn-center-txt">刮开盲票</view>
-				</view>
-			</view>
-		</view>
-		
-		<!-- 支付弹层 -->
-		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="toProcess" v-if="payShow" />
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import $http from '@/utils/request.js'
-	import appId from '@/config/appId.js'
-	import PayPopup from '../../components/pay-popup/pay-popup.vue'
-	export default {
-		components: {
-			PayPopup
-		},
-		data() {
-			return {
-				boxId: '',
-				picUrlArr: [],
-				info: {},
-				status: 'nomore',//上拉刷新状态
-				pageNum: 1,
-				total: 0,
-				prizeList: [],
-
-				payShow: false,
-				payInfo: {},
-				pagesNum: null,
-				sceneArr: null,
-				
-				prizeIndex: 0,
-				contnetHeight: 0,
-				btnFixed: false,
-				prizeInfo: {},
-				userInfo: {},
-				loginState: false,
-			};
-		},
-
-		onLoad(opthios) {
-			//票赢天下跳转
-			if (opthios.scene) {
-				let sceneStr = decodeURIComponent(opthios.scene)
-				this.sceneArr = sceneStr.split('&')
-				this.boxId = this.sceneArr[0]
-				uni.setStorageSync('shareUid', this.sceneArr[1])
-				if (this.sceneArr[1] === undefined || this.sceneArr[1] === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:票赢天下小程序分享盲票,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', this.sceneArr[2])
-			}
-			
-			if (opthios.boxId) {
-				this.boxId = opthios.boxId
-			}
-			if (opthios.userId) {
-				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId:null)
-				if (opthios.userId === undefined || opthios.userId === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue.`
-							)
-						}
-					})
-				}
-			}
-			if (opthios.type) {
-				uni.setStorageSync('shareType', opthios.type)
-			}
-			
-			/**
-			* 外部app跳转接受的参数
-			* shareUid: 用户ID
-			* shareType: 分享类型
-			* */
-			if(opthios.uid) {
-				uni.setStorageSync('shareUid', opthios.uid != 'undefined' ? opthios.uid:null)
-				if (opthios.uid === undefined || opthios.uid === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:外部app,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', opthios.t)
-			}
-		},
-		
-		mounted() {
-			let _this = this;
-			let info = uni.createSelectorQuery().select(".prize");
-			info.boundingClientRect(function(data) { //data - 各种参数
-				_this.contnetHeight = data.height
-			}).exec()
-		},
-		
-		onPageScroll: function(e) {
-			let _this = this;
-			_this.btnFixed = _this.contnetHeight <= e.scrollTop;
-		},
-		
-		onShow() {
-			this.loginState = uni.getStorageSync('token') ? true : false
-			if(this.loginState) {
-				this.getBaseInfo()
-			}
-			this.pagesNum = getCurrentPages().length
-			if (this.boxId && this.boxId != undefined) {
-				this.getDetail()
-			}
-			
-		},
-
-		methods: {
-			changePrizeSwiper({ detail }) {
-				this.prizeIndex = detail.current
-				this.prizeInfo = this.prizeList[detail.current]
-			},
-			
-			getDetail() {
-				$http.post('/api/v1/mp/user/mall/ticket/detail/new', {
-					boxId: this.boxId,
-					noToken: true
-				}).then(res => {
-					if (res.code == 0) {
-						this.info = {
-							...res.data,
-							picUrl: res.data.picUrl.split(',').map(item => env.filePublic + item + '?imageView2/2/w/375'),
-							ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
-								return { ...item, picUrl: env.filePublic + item.picUrl }
-							})
-						}
-						this.pageNum = 1
-						this.total = 0
-						this.prizeList = []
-						this.getPrizeList()
-					}
-				}).catch(() => {
-				})
-			},
-			getPrizeList() {
-				$http.post(`/api/v1/mp/user/ticket/prize/list/${this.boxId}?pageNum=${this.pageNum}&pageSize=10`,{}).then(res => {
-					if (res.code == 0) {
-						let prizeList = res.rows
-						prizeList.forEach(item => {
-							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/375'
-							item.awardsLabelPicUrl = env.filePublic + item.awardsLabelPicUrl
-						})
-						this.total = res.total
-						this.prizeList = this.prizeList.concat(prizeList)
-						this.prizeInfo = this.prizeList[this.prizeIndex]
-					}
-				})
-			},
-
-			getPageNum() {
-				let pages = getCurrentPages();
-			},
-
-			close() {
-				this.payShow = false
-			},
-
-			toProcess(id) {
-				this.payShow = false
-				// uni.navigateTo({
-				// 	url: `/packagePrize/rolling/index?boxId=${ this.info.boxId }&orderId=${ id }&isTry=0`
-				// })
-				uni.navigateTo({
-					url: `/packagePrize/purchase/index?boxId=${ this.info.boxId }&orderId=${ id }&isTry=0`
-				})
-			},
-
-			exchange() {
-				let data = {
-					userCouponIds: [],
-					autoCoupon: 1,
-					boxId: this.info.boxId,
-					orderNum: 1,
-					appSource: appId
-				}
-				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
-					if (res.code == 0) {
-						let info = {
-							...res.data,
-							...this.info,
-							picUrl: this.info.picUrl[0],
-							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
-								.data.couponList[0].title,
-							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
-								.couponList[0].id
-						}
-						this.payInfo = info
-						this.payShow = true
-					}
-				})
-			},
-			
-			toRollingGame() {
-				if (!uni.getStorageSync('token')) {
-					uni.navigateTo({
-						url: '/pages/login/index'
-					})
-					return
-				}
-				uni.navigateTo({
-					url: `/packagePrize/rolling/index?boxId=${ this.info.boxId }&isTry=1`
-				})
-			},
-
-			toShare() {
-				this.getBaseInfo()
-				// if (!uni.getStorageSync('token')) {
-				// 	uni.navigateTo({
-				// 		url: "/pages/login/index"
-				// 	})
-				// 	return
-				// }
-				// uni.navigateTo({
-				// 	url: `/packageOperate/share/index?boxId=${ this.info.boxId }`
-				// })
-			},
-
-			toIndex() {
-				uni.switchTab({
-					url: '/pages/index/index'
-				})
-			},
-			
-			// 点击规则说明
-			toRule() {
-				uni.navigateTo({
-					url: '/packageOther/rule/index'
-				})
-			},
-
-			toPrizeGoods(item) { 
-				if (item.prizeType == "goods") {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=${ item.refId }`
-					})
-				}
-				//门店优惠券
-				if (item.prizeType == "coupon" || item.prizeType == "coupon_pkg") {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=425`
-					})
-				}
-				// 盲豆
-				if (item.prizeType == "coin") {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=424`
-					})
-				}
-			},
-			
-			getBaseInfo() {
-				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.userInfo = res.data
-					}
-				})
-			},
-		},
-		
-		onShareAppMessage(res) {
-			return {
-				title: '一起来刮盲票吧',
-				path: `/pages/ticketBox/detail?boxId=${ this.info.boxId }&userId=${ this.userInfo.userId }&type=1`,
-				type: 2,
-			}
-		},
-		//分享朋友圈
-		onShareTimeline() {
-			return {
-				title: '一起来刮盲票吧',
-				query: `boxId=${ this.info.boxId }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
-						
-			}
-		},
-		onReachBottom() {
-			if(this.total < this.pageNum * 10) return ;
-			this.status = 'loading';
-			++this.pageNum
-			if(this.total < this.pageNum * 10) this.status = 'nomore';
-				else this.status = 'loading';
-			this.getPrizeList()
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.ticket-wrap {
-		background: #FFF3EB;
-		padding-bottom: 100rpx;
-	}
-	.nav-left {
-		&__code {
-			margin-left: 10rpx;
-		}
-	}
-	
-	// 奖品轮播
-	.prize {
-		// height: 71vh;
-		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/detail_3.png) center center no-repeat;
-		background-size: 100vw 71vh;
-		margin-bottom: 14rpx;
-		
-		// 查看规则
-		&-rule {
-			display: flex;
-			align-items: center;
-			height: 34rpx;
-			padding: 44rpx 0 0 34rpx;
-			margin-bottom: 60rpx;
-			
-			&-content {
-				image {
-					width: 34rpx;
-					height: 34rpx;
-					margin-right: 14rpx;
-				}
-				
-				text {
-					font-size: 40rpx;
-					font-family: 'YouSheBiaoTiHei';
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-		}
-		
-		// 奖品轮播
-		&-swiper {
-			height: 534rpx;
-			
-			.swiper-item {
-				width: 100%;
-				height: 100%;
-				// 80
-			}
-			
-			.swiper-item-side {
-				width: 100%;
-				height: 100%;
-				margin: 0;
-			}
-			
-			&-item {
-				height: 267px;
-				
-				.img {
-					position: absolute;
-	
-					width: 100%;
-					height: 100%;
-					animation: prizeBig .3s;
-				}
-				
-				.img-side {
-					width: 60%;
-					height: 60%;
-					animation: prizeMini .3s;
-					opacity: .5;
-				}
-			}
-		}
-		
-		// 奖品价格
-		&-price {
-			flex-direction: column;
-			justify-content: space-between;
-			height: 14vh;
-			margin-bottom: 30rpx;
-			
-			&-present {
-				font-size: 26rpx;
-				font-weight: bold;
-			}
-			
-			&-txt {
-				padding: 0 34rpx;
-				font-size: 30rpx;
-				font-weight: bold;
-			}
-			
-			&__ticket-price {
-				position: relative;
-				height: 66rpx;
-				
-				image {
-					width: 276rpx;
-					height: 66rpx;
-				}
-				
-				.txt {
-					position: absolute;
-					font-size: 40rpx;
-					line-height: 66rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-			
-			&-past {
-				font-size: 26rpx;
-				font-weight: bold;
-				text-decoration: line-through;
-				color: #5E3909;
-			}
-		}
-		
-		// 开启盲票
-		.ticket-btn {
-			justify-content: space-between;
-			height: 10vh;
-			padding: 0 34rpx;
-			
-			&-game {
-				width: 110rpx;
-				height: 110rpx;
-			}
-			
-			&-center {
-				position: relative;
-				height: 100%;
-				
-				image {
-					height: 100%;
-					width: 55vw;
-				}
-				
-				&-txt {
-					position: absolute;
-					top: 30rpx;
-					font-size: 72rpx;
-					line-height: 72rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-			
-			&-share {
-				position: relative;
-				width: 110rpx;
-				height: 110rpx;
-				
-				image {
-					position: absolute;
-					width: 110rpx;
-					height: 110rpx;
-				}
-				
-				::v-deep button {
-					position: absolute;
-					z-index: 5;
-					width: 110rpx;
-					height: 110rpx;
-					background: none;
-					border: none !important;
-				}
-				::v-deep uni-button:after {
-					border: none !important;
-				}
-				::v-deep button:after {
-					border: none !important;
-				}
-			}
-		}
-	}
-	
-	// 盲票奖品说明
-	.explain {
-		width: 100vw;
-		position: relative;
-		height: 40rpx;
-		margin-bottom: 32rpx;
-		
-		.image-left {
-			width: 18vw;
-			height: 40rpx;
-		}
-		
-		.image-right {
-			width: 18vw;
-			height: 40rpx;
-		}
-		
-		&-title {
-			font-size: 46rpx;
-			line-height: 46rpx;
-			font-family: YouSheBiaoTiHei;
-			font-weight: 400;
-			color: #5E3909;
-			padding: 0 8rpx;
-		}
-	}
-	
-	// 盲票奖品数量、概率
-	.prize-total {
-		margin-bottom: 34rpx;
-		
-		&-num {
-			font-size: 26rpx;
-			text-align: center;
-			font-weight: bold;
-			color: #744111;
-			margin-bottom: 24rpx;
-		}
-		
-		&-chance {
-			margin-bottom: 32rpx;
-			
-			&-content {
-				margin-right: 40rpx;
-				
-				image {
-					width: 56rpx;
-					height: 50rpx;
-				}
-				
-				text {
-					font-size: 28rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #622C06;
-				}
-			}
-			
-			&-content:last-child {
-				margin: 0;
-			}
-		}
-		
-		&-txt {
-			padding: 0 100rpx;
-			font-size: 26rpx;
-			font-weight: 500;
-			color: #956B33;
-			line-height: 42rpx;
-			text-align: center;
-		}
-	}
-	
-	// 盲票奖品列表
-	.prize-list {
-		padding: 0 34rpx 70rpx;
-		
-		&-item {
-			position: relative;
-			padding: 0 110rpx 0 84rpx;
-			justify-content: flex-start;
-			height: 264rpx;
-			background: #FFFFFF;
-			border-radius: 22rpx;
-			margin-bottom: 26rpx;
-			
-			image {
-				width: 166rpx;
-				height: 166rpx;
-				margin-right: 34rpx;
-			}
-			
-			&-info {
-				height: 166rpx;
-				flex: 1;
-				flex-direction: column;
-				align-items: flex-start;
-				justify-content: space-between;
-				
-				.title {
-					font-size: 30rpx;
-					font-weight: bold;
-					line-height: 42rpx;
-				}
-				
-				.price {
-					font-size: 36rpx;
-					font-weight: bold;
-					color: #FF4208;
-					line-height: 42rpx;
-				}
-			}
-			
-			&-grade {
-				position: absolute;
-				top: -12rpx;
-				left: 0;
-				
-				image {
-					width: 66rpx;
-					height: 60rpx;
-				}
-			}
-		}
-	}
-	
-	// 滚动固定按钮
-	.footer-fixed {
-		position: fixed;
-		bottom: var(--window-bottom);
-		left: 0;
-		right: 0; 
-		
-		&-btn {
-			height: 10vh;
-			
-			&-center {
-				position: relative;
-				height: 100%;
-				
-				image {
-					height: 100%;
-					width: 55vw;
-				}
-				
-				&-txt {
-					position: absolute;
-					top: 30rpx;
-					font-size: 72rpx;
-					line-height: 72rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-		}
-	}
-	
-	// 奖品缩小动画
-	@keyframes prizeMini
-	{
-		from {
-			width: 100%;
-			height: 100%;
-		}
-		to {
-			width: 60%;
-			height: 60%;
-		}
-	}
-	
-	// 奖品放大动画
-	@keyframes prizeBig
-	{
-		from {
-			width: 60%;
-			height: 60%;
-		}
-		to {
-			width: 100%;
-			height: 100%;
-		}
-	}
-</style>
+<template>
+	<view class="ticket-wrap">
+		<!-- #ifdef MP-ALIPAY -->
+		<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()">
+					<u-icon name="home" size="20" color="#333"></u-icon>
+					<view class="nav-left__code">首页</view>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+		<!-- #ifndef MP-ALIPAY -->
+		<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()">
+					<u-icon name="home" size="20" color="#333"></u-icon>
+					<view class="nav-left__code">首页</view>
+				</view>
+			</u-navbar>
+		</view>
+		<!-- #endif -->
+
+		<!-- 奖品轮播 -->
+		<view class="prize">
+			<!-- 查看规则 -->
+			<view class="prize-rule" @click="toRule">
+				<!-- #ifndef MP-ALIPAY -->
+				<view class="prize-rule-content flex">
+					<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
+					<text>查看规则</text>
+				</view>
+				<!-- #endif -->
+			</view>
+
+			<!-- 奖品 -->
+			<swiper class="prize-swiper" previous-margin="100px" next-margin="100px" :interval="4000" :autoplay="true"
+				:circular="true" @change="changePrizeSwiper">
+				<swiper-item :class="prizeIndex == index ? 'swiper-item' : 'swiper-item-side'"
+					v-for="(item, index) in prizeList.slice(0, 10)" :key="index">
+					<view class="prize-swiper-item flex" @click="toPrizeGoods(item)">
+						<image :class="prizeIndex == index ? 'img' : 'img-side'" :src="item.picUrl" mode="aspectFit"></image>
+					</view>
+				</swiper-item>
+			</swiper>
+
+			<!-- 奖品价格 -->
+			<view class="prize-price flex">
+				<view class="prize-price-present" v-if="prizeInfo.prizeType != 'coin'">¥{{ $numberFormat(prizeInfo.value) }}
+				</view>
+				<view class="prize-price-present" v-else>{{ prizeInfo.value }}个</view>
+				<view class="prize-price-txt ells-one">{{ prizeInfo.title }}</view>
+				<view class="prize-price__ticket-price flex">
+					<image src="../../static/ticketBox/ticket_block.png" mode="scaleToFill"></image>
+					<view class="txt">¥{{ $numberFormat(info.salePrice) }}</view>
+				</view>
+				<view class="prize-price-past" v-if="info.originPrice != 0">原价:¥{{ $numberFormat(info.originPrice) }}</view>
+			</view>
+
+			<!-- 开启盲票 -->
+			<view class="ticket-btn flex">
+				<!-- <image class="ticket-btn-game" src="../../static/ticketBox/ticket_game.png" mode="scaleToFill" @click="toRollingGame"></image> -->
+				<image class="ticket-btn-game" src="" mode="scaleToFill"></image>
+				<view class="ticket-btn-center flex" @click="exchange">
+					<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
+					<view class="ticket-btn-center-txt">刮开盲票</view>
+				</view>
+				<view class="ticket-btn-share flex">
+					<!-- #ifdef MP-WEIXIN -->
+					<image src="../../static/ticketBox/ticket_share.png" mode="scaleToFill" @click="toShare" v-if="!share"></image>
+					<button type="default" open-type="share" v-if="loginState && !share"></button>
+					<!-- #endif -->
+				</view>
+			</view>
+		</view>
+
+		<!-- 盲票奖品说明 -->
+		<view class="explain flex">
+			<image class="image-left" src="../../static/ticketBox/ticket_explain_left.png" mode="aspectFit"></image>
+			<view class="explain-title">刮开必出以下宝贝之一</view>
+			<image class="image-right" src="../../static/ticketBox/ticket_explain_right.png" mode="aspectFit"></image>
+		</view>
+
+		<!-- 盲票奖品数量、概率 -->
+		<view class="prize-total">
+			<view class="prize-total-num">共{{ total }}款</view>
+			<!-- 中奖概率 -->
+			<view class="prize-total-chance flex">
+				<view class="prize-total-chance-content flex" v-for="(item, index) in info.ticketAwardsLabelList" :key="index">
+					<image :src="item.picUrl" mode="scaleToFill"></image>
+					<text>{{ item.hitRate }}%</text>
+				</view>
+			</view>
+			<!-- 文字说明 -->
+			<view class="prize-total-txt">因概率对小数点后三位进行四舍五入处理,故存在总值不为100%的可能。商品抽奖存在概率性,付费请谨慎!未成年人请在家长监督下使用。</view>
+		</view>
+
+		<!-- 盲票奖品列表 -->
+		<view class="prize-list">
+			<view class="prize-list-item flex" v-for="(item, index) in prizeList" :key="index" @click="toPrizeGoods(item)">
+				<image :src="item.picUrl" mode="aspectFit"></image>
+				<view class="prize-list-item-info flex">
+					<view class="title ells">{{ item.title }}</view>
+					<view class="price" v-if="item.prizeType != 'coin'">¥{{ $numberFormat(item.value) }}</view>
+					<view class="price" v-else>{{ item.value }}个</view>
+				</view>
+				<view class="prize-list-item-grade">
+					<image :src="item.awardsLabelPicUrl" />
+				</view>
+			</view>
+			<u-loadmore :line="true" v-if="prizeList.length>10" :status="status" :loading-text="'努力加载中'"
+				:nomore-text="'已经到底了'" />
+		</view>
+
+		<view class="footer-fixed" v-if="btnFixed">
+			<view class="footer-fixed-btn flex">
+				<view class="footer-fixed-btn-center flex" @click="exchange">
+					<image src="../../static/ticketBox/ticket_btn_center.png" mode="scaleToFill"></image>
+					<view class="footer-fixed-btn-center-txt">刮开盲票</view>
+				</view>
+			</view>
+		</view>
+
+		<!-- 支付弹层 -->
+		<pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" @success="toProcess" v-if="payShow" />
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	import appId from '@/config/appId.js'
+	import PayPopup from '../../components/pay-popup/pay-popup.vue'
+	export default {
+		components: {
+			PayPopup
+		},
+		data() {
+			return {
+				boxId: '',
+				picUrlArr: [],
+				info: {},
+				status: 'nomore', //上拉刷新状态
+				pageNum: 1,
+				total: 0,
+				prizeList: [],
+
+				payShow: false,
+				payInfo: {},
+				sceneArr: null,
+
+				prizeIndex: 0,
+				contnetHeight: 0,
+				btnFixed: false,
+				prizeInfo: {},
+				userInfo: {},
+				loginState: false,
+				pagesNum: '',
+				share: 0,
+				siteId: '',
+			};
+		},
+		onLoad(opthios) {
+			// 从门店盲票列表跳转
+			if(opthios.share) {
+				this.share = opthios.share
+			}
+			if(opthios.siteId){
+				this.siteId = opthios.siteId
+			}
+			//票赢天下跳转
+			if (opthios.scene) {
+				let sceneStr = decodeURIComponent(opthios.scene)
+				this.sceneArr = sceneStr.split('&')
+				this.boxId = this.sceneArr[0]
+				uni.setStorageSync('shareUid', this.sceneArr[1])
+				if (this.sceneArr[1] === undefined || this.sceneArr[1] === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:票赢天下小程序分享盲票,`
+							)
+						}
+					})
+				}
+				uni.setStorageSync('shareType', this.sceneArr[2])
+			}
+
+			if (opthios.boxId) {
+				this.boxId = opthios.boxId
+			}
+			if (opthios.userId) {
+				uni.setStorageSync('shareUid', opthios.userId != 'undefined' ? opthios.userId : null)
+				if (opthios.userId === undefined || opthios.userId === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue.`
+							)
+						}
+					})
+				}
+			}
+			if (opthios.type) {
+				uni.setStorageSync('shareType', opthios.type)
+			}
+
+			/**
+			 * 外部app跳转接受的参数
+			 * shareUid: 用户ID
+			 * shareType: 分享类型
+			 * */
+			if (opthios.uid) {
+				uni.setStorageSync('shareUid', opthios.uid != 'undefined' ? opthios.uid : null)
+				if (opthios.uid === undefined || opthios.uid === 'undefined') {
+					uni.getSystemInfo({
+						success(res) {
+							log.error(
+								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/ticketBox/detail.vue,来源:外部app,`
+							)
+						}
+					})
+				}
+				uni.setStorageSync('shareType', opthios.t)
+			}
+		},
+
+		mounted() {
+			let _this = this;
+			let info = uni.createSelectorQuery().select(".prize");
+			info.boundingClientRect(function(data) { //data - 各种参数
+				_this.contnetHeight = data.height
+			}).exec()
+		},
+
+		onPageScroll: function(e) {
+			let _this = this;
+			_this.btnFixed = _this.contnetHeight <= e.scrollTop;
+		},
+
+		onShow() {
+			this.pagesNum = getCurrentPages().length
+			this.loginState = uni.getStorageSync('token') ? true : false
+			if (this.loginState) {
+				this.getBaseInfo()
+			}
+			if (this.boxId && this.boxId != undefined) {
+				this.getDetail()
+			}
+
+		},
+
+		methods: {
+			changePrizeSwiper({ detail }) {
+				this.prizeIndex = detail.current
+				this.prizeInfo = this.prizeList[detail.current]
+			},
+
+			getDetail() {
+				$http.post('/api/v1/mp/user/mall/ticket/detail/new', {
+					boxId: this.boxId,
+					noToken: true
+				}).then(res => {
+					if (res.code == 0) {
+						this.info = {
+							...res.data,
+							picUrl: res.data.picUrl.split(',').map(item => env.filePublic + item + '?imageView2/2/w/375'),
+							ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
+								return { ...item, picUrl: env.filePublic + item.picUrl }
+							})
+						}
+						this.pageNum = 1
+						this.total = 0
+						this.prizeList = []
+						this.getPrizeList()
+					}
+				}).catch(() => {})
+			},
+			getPrizeList() {
+				$http.post(`/api/v1/mp/user/ticket/prize/list/${this.boxId}?pageNum=${this.pageNum}&pageSize=10`, {}).then(
+				res => {
+					if (res.code == 0) {
+						let prizeList = res.rows
+						prizeList.forEach(item => {
+							item.picUrl = env.filePublic + item.picUrl.split(',')[0] + '?imageView2/2/w/375'
+							item.awardsLabelPicUrl = env.filePublic + item.awardsLabelPicUrl
+						})
+						this.total = res.total
+						this.prizeList = this.prizeList.concat(prizeList)
+						this.prizeInfo = this.prizeList[this.prizeIndex]
+					}
+				})
+			},
+
+			getPageNum() {
+				let pages = getCurrentPages();
+			},
+
+			close() {
+				this.payShow = false
+			},
+
+			toProcess(id) {
+				this.payShow = false
+				// uni.navigateTo({
+				// 	url: `/packagePrize/rolling/index?boxId=${ this.info.boxId }&orderId=${ id }&isTry=0`
+				// })
+				uni.navigateTo({
+					url: `/packagePrize/purchase/index?boxId=${ this.info.boxId }&orderId=${ id }&isTry=0`
+				})
+			},
+
+			exchange() {
+				let data = {
+					userCouponIds: [],
+					autoCoupon: 1,
+					boxId: this.info.boxId,
+					orderNum: 1,
+					appSource: appId,
+				}
+				if( this.siteId ){
+					data.siteId = this.siteId
+				}
+				$http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
+					if (res.code == 0) {
+						let info = {
+							...res.data,
+							...this.info,
+							picUrl: this.info.picUrl[0],
+							couponTitle: res.data && res.data.couponList && res.data.couponList.length && res
+								.data.couponList[0].title,
+							couponId: res.data && res.data.couponList && res.data.couponList.length && res.data
+								.couponList[0].id
+						}
+						if( this.siteId ){
+							info.siteId = this.siteId
+						}
+						this.payInfo = info
+						this.payShow = true
+					}
+				})
+			},
+
+			toRollingGame() {
+				if (!uni.getStorageSync('token')) {
+					uni.navigateTo({
+						url: '/pages/login/index'
+					})
+					return
+				}
+				uni.navigateTo({
+					url: `/packagePrize/rolling/index?boxId=${ this.info.boxId }&isTry=1`
+				})
+			},
+
+			toShare() {
+				this.getBaseInfo()
+				// if (!uni.getStorageSync('token')) {
+				// 	uni.navigateTo({
+				// 		url: "/pages/login/index"
+				// 	})
+				// 	return
+				// }
+				// uni.navigateTo({
+				// 	url: `/packageOperate/share/index?boxId=${ this.info.boxId }`
+				// })
+			},
+
+			// 点击规则说明
+			toRule() {
+				uni.navigateTo({
+					url: '/packageOther/rule/index'
+				})
+			},
+
+			toPrizeGoods(item) {
+				if (item.prizeType == "goods") {
+					uni.navigateTo({
+						url: `/packagePrize/goods/detail?id=${ item.refId }`
+					})
+				}
+				//门店优惠券
+				if (item.prizeType == "coupon" || item.prizeType == "coupon_pkg") {
+					if (item.couponDetail) {
+						uni.setStorageSync('couponDetail', item.couponDetail);
+					}
+					uni.navigateTo({
+						url: `/packagePrize/goods/detail?id=425`
+					})
+				}
+				// 盲豆
+				if (item.prizeType == "coin") {
+					uni.navigateTo({
+						url: `/packagePrize/goods/detail?id=424`
+					})
+				}
+			},
+
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.userInfo = res.data
+					}
+				})
+			},
+		},
+
+		onShareAppMessage(res) {
+			return {
+				title: '一起来刮盲票吧',
+				path: `/pages/ticketBox/detail?boxId=${ this.info.boxId }&userId=${ this.userInfo.userId }&type=1`,
+				type: 2,
+			}
+		},
+		//分享朋友圈
+		onShareTimeline() {
+			return {
+				title: '一起来刮盲票吧',
+				query: `boxId=${ this.info.boxId }&userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
+
+			}
+		},
+		onReachBottom() {
+			if (this.total < this.pageNum * 10) return;
+			this.status = 'loading';
+			++this.pageNum
+			if (this.total < this.pageNum * 10) this.status = 'nomore';
+			else this.status = 'loading';
+			this.getPrizeList()
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.ticket-wrap {
+		background: #FFF3EB;
+		padding-bottom: 100rpx;
+	}
+
+	.nav-left {
+		&__code {
+			margin-left: 10rpx;
+		}
+	}
+
+	// 奖品轮播
+	.prize {
+		// height: 71vh;
+		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/detail_3.png) center center no-repeat;
+		background-size: 100vw 71vh;
+		margin-bottom: 14rpx;
+
+		// 查看规则
+		&-rule {
+			display: flex;
+			align-items: center;
+			height: 34rpx;
+			padding: 44rpx 0 0 34rpx;
+			margin-bottom: 60rpx;
+
+			&-content {
+				image {
+					width: 34rpx;
+					height: 34rpx;
+					margin-right: 14rpx;
+				}
+
+				text {
+					font-size: 40rpx;
+					font-family: 'YouSheBiaoTiHei';
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+		}
+
+		// 奖品轮播
+		&-swiper {
+			height: 534rpx;
+
+			.swiper-item {
+				width: 100%;
+				height: 100%;
+				// 80
+			}
+
+			.swiper-item-side {
+				width: 100%;
+				height: 100%;
+				margin: 0;
+			}
+
+			&-item {
+				height: 267px;
+
+				.img {
+					position: absolute;
+
+					width: 100%;
+					height: 100%;
+					animation: prizeBig .3s;
+				}
+
+				.img-side {
+					width: 60%;
+					height: 60%;
+					animation: prizeMini .3s;
+					opacity: .5;
+				}
+			}
+		}
+
+		// 奖品价格
+		&-price {
+			flex-direction: column;
+			justify-content: space-between;
+			height: 14vh;
+			margin-bottom: 30rpx;
+
+			&-present {
+				font-size: 26rpx;
+				font-weight: bold;
+			}
+
+			&-txt {
+				padding: 0 34rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+			}
+
+			&__ticket-price {
+				position: relative;
+				height: 66rpx;
+
+				image {
+					width: 276rpx;
+					height: 66rpx;
+				}
+
+				.txt {
+					position: absolute;
+					font-size: 40rpx;
+					line-height: 66rpx;
+					font-family: YouSheBiaoTiHei;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+
+			&-past {
+				font-size: 26rpx;
+				font-weight: bold;
+				text-decoration: line-through;
+				color: #5E3909;
+			}
+		}
+
+		// 开启盲票
+		.ticket-btn {
+			justify-content: space-between;
+			height: 10vh;
+			padding: 0 34rpx;
+
+			&-game {
+				width: 110rpx;
+				height: 110rpx;
+			}
+
+			&-center {
+				position: relative;
+				height: 100%;
+
+				image {
+					height: 100%;
+					width: 55vw;
+				}
+
+				&-txt {
+					position: absolute;
+					top: 30rpx;
+					font-size: 72rpx;
+					line-height: 72rpx;
+					font-family: YouSheBiaoTiHei;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+
+			&-share {
+				position: relative;
+				width: 110rpx;
+				height: 110rpx;
+
+				image {
+					position: absolute;
+					width: 110rpx;
+					height: 110rpx;
+				}
+
+				::v-deep button {
+					position: absolute;
+					z-index: 5;
+					width: 110rpx;
+					height: 110rpx;
+					background: none;
+					border: none !important;
+				}
+
+				::v-deep uni-button:after {
+					border: none !important;
+				}
+
+				::v-deep button:after {
+					border: none !important;
+				}
+			}
+		}
+	}
+
+	// 盲票奖品说明
+	.explain {
+		width: 100vw;
+		position: relative;
+		height: 40rpx;
+		margin-bottom: 32rpx;
+
+		.image-left {
+			width: 18vw;
+			height: 40rpx;
+		}
+
+		.image-right {
+			width: 18vw;
+			height: 40rpx;
+		}
+
+		&-title {
+			font-size: 46rpx;
+			line-height: 46rpx;
+			font-family: YouSheBiaoTiHei;
+			font-weight: 400;
+			color: #5E3909;
+			padding: 0 8rpx;
+		}
+	}
+
+	// 盲票奖品数量、概率
+	.prize-total {
+		margin-bottom: 34rpx;
+
+		&-num {
+			font-size: 26rpx;
+			text-align: center;
+			font-weight: bold;
+			color: #744111;
+			margin-bottom: 24rpx;
+		}
+
+		&-chance {
+			margin-bottom: 32rpx;
+
+			&-content {
+				margin-right: 40rpx;
+
+				image {
+					width: 56rpx;
+					height: 50rpx;
+				}
+
+				text {
+					font-size: 28rpx;
+					font-family: YouSheBiaoTiHei;
+					font-weight: 400;
+					color: #622C06;
+				}
+			}
+
+			&-content:last-child {
+				margin: 0;
+			}
+		}
+
+		&-txt {
+			padding: 0 100rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #956B33;
+			line-height: 42rpx;
+			text-align: center;
+		}
+	}
+
+	// 盲票奖品列表
+	.prize-list {
+		padding: 0 34rpx 70rpx;
+
+		&-item {
+			position: relative;
+			padding: 0 110rpx 0 84rpx;
+			justify-content: flex-start;
+			height: 264rpx;
+			background: #FFFFFF;
+			border-radius: 22rpx;
+			margin-bottom: 26rpx;
+
+			image {
+				width: 166rpx;
+				height: 166rpx;
+				margin-right: 34rpx;
+			}
+
+			&-info {
+				height: 166rpx;
+				flex: 1;
+				flex-direction: column;
+				align-items: flex-start;
+				justify-content: space-between;
+
+				.title {
+					font-size: 30rpx;
+					font-weight: bold;
+					line-height: 42rpx;
+				}
+
+				.price {
+					font-size: 36rpx;
+					font-weight: bold;
+					color: #FF4208;
+					line-height: 42rpx;
+				}
+			}
+
+			&-grade {
+				position: absolute;
+				top: -12rpx;
+				left: 0;
+
+				image {
+					width: 66rpx;
+					height: 60rpx;
+				}
+			}
+		}
+	}
+
+	// 滚动固定按钮
+	.footer-fixed {
+		position: fixed;
+		bottom: var(--window-bottom);
+		left: 0;
+		right: 0;
+
+		&-btn {
+			height: 10vh;
+
+			&-center {
+				position: relative;
+				height: 100%;
+
+				image {
+					height: 100%;
+					width: 55vw;
+				}
+
+				&-txt {
+					position: absolute;
+					top: 30rpx;
+					font-size: 72rpx;
+					line-height: 72rpx;
+					font-family: YouSheBiaoTiHei;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+
+	// 奖品缩小动画
+	@keyframes prizeMini {
+		from {
+			width: 100%;
+			height: 100%;
+		}
+
+		to {
+			width: 60%;
+			height: 60%;
+		}
+	}
+
+	// 奖品放大动画
+	@keyframes prizeBig {
+		from {
+			width: 60%;
+			height: 60%;
+		}
+
+		to {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 45 - 2
src/pages/user/index.vue

@@ -7,9 +7,9 @@
 		<!-- 账户信息 -->
 		<view class="account">
 			<view class="flex account-ava">
-				<image :src="avatar" mode="aspectFill" v-if="loginState"></image>
+				<image :src="avatar + '?imageView2/2/w/150'" mode="aspectFill" v-if="loginState" @click="toSetAvatar()"></image>
 				<view class="no-ava" v-else @click="toLogin"></view>
-				<view class="account-ava-name" v-if="loginState">{{ userInfo.nickName }}</view>
+				<view class="account-ava-name" v-if="loginState" @click="toSetAvatar()">{{ userInfo.nickName }}</view>
 				<view class="account-ava-no" @click="toLogin" v-else>登录</view>
 			</view>
 			<view class="flex account-info" v-if="loginState">
@@ -56,6 +56,13 @@
 				</view>
 				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
 			</view>
+			<view class="action-item flex" @click="toExchange">
+				<view class="action-item-left flex">
+					<image src="../../static/user/user_exchange.png" mode="scaleToFill"></image>
+					<view class="title">兑换码</view>
+				</view>
+				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
+			</view>
 			<view class="action-item flex" @click="toAddress">
 				<view class="action-item-left flex">
 					<image src="../../static/user/user_addr.png" mode="scaleToFill"></image>
@@ -63,6 +70,13 @@
 				</view>
 				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
 			</view>
+			<view class="action-item flex" @click="toCreator">
+				<view class="action-item-left flex">
+					<image src="../../static/user/user_slice.png" mode="scaleToFill"></image>
+					<view class="title">申请创客</view>
+				</view>
+				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
+			</view>
 			<!-- #ifdef MP-WEIXIN -->
 			<view class="action-item flex" @click="contactService">
 				<view class="action-item-left flex">
@@ -155,6 +169,13 @@
 
 				})
 			},
+			
+			// 跳转编辑头像与昵称页面
+			toSetAvatar() {
+				uni.navigateTo({
+					url: "/packageOther/avatar/index"
+				})
+			},
 
 			// 跳转登录
 			toLogin() {
@@ -173,6 +194,17 @@
 					url: '/packageGoods/order/index'
 				})
 			},
+			
+			//兑换专区
+			toExchange() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packageOperate/exchange/index'
+				})
+			},
 
 			// 我的地址
 			toAddress() {
@@ -185,6 +217,17 @@
 				})
 			},
 			
+			//申请创客
+			toCreator() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packageOperate/creator/index'
+				})
+			},
+			
 			// 关于我们
 			toAbout() {
 				uni.navigateTo({

BIN
src/static/index/barrage_bg.png


BIN
src/static/index/games.png


BIN
src/static/index/index_tip_bg.png


BIN
src/static/lucky/lucky_gkmp.png


BIN
src/static/lucky/zi.png


BIN
src/static/lucky/zioff.png


BIN
src/static/user/user_exchange.png


BIN
src/static/user/user_slice.png


+ 3 - 3
src/uni.scss

@@ -13,7 +13,7 @@
  */
 
 /* 颜色变量 */
-$uni-btn-color: #E96737;
+$uni-btn-color: #F9822C;
 
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;
@@ -22,14 +22,14 @@ $uni-color-warning: #f0ad4e;
 $uni-color-error: #dd524d;
 
 /* 文字基本颜色 */
-$uni-text-color:#E96737;//基本色
+$uni-text-color:#F9822C;//基本色
 $uni-text-color-inverse:#fff;//反色
 $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
 $uni-text-color-placeholder: #808080;
 $uni-text-color-disable:#c0c0c0;
 
 /* 背景颜色 */
-$uni-bg-color:#E96737;
+$uni-bg-color:#F9822C;
 $uni-bg-color-grey:#f8f8f8;
 $uni-bg-color-hover:#f1f1f1;//点击状态颜色
 $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色

+ 2 - 2
src/utils/request.js

@@ -65,7 +65,9 @@ const $upload = (fileUrl, type) => {
 		uni.uploadFile({
 			url: getSignUrl(`/api/v1/mp/image/remote/upload/post/${type || 0}`, {}, timestamp),
 			header: {
+				// #ifndef H5
 				'Content-Type': 'multipart/form-data',
+				// #endif
 				'Authorization': uni.getStorageSync('token') ?
 					`Bearer ${uni.getStorageSync('token')}` : '',
 				'x-zz-timestamp': timestamp
@@ -100,11 +102,9 @@ const $put = (url, data) => {
 			name: 'file',
 
 			success: res => {
-
 				reslove(res.data)
 			},
 			fail: () => {
-
 				reject()
 			}
 		})

+ 6 - 0
src/utils/util.js

@@ -41,6 +41,12 @@ export function parseTime(time, pattern) {
 	return time_str
 }
 
+// 跳转首页
+export function toIndex() {
+	uni.switchTab({
+		url: `/pages/index/index`
+	})
+}
 
 /**
  * 解决两个数相加精度丢失问题

+ 3 - 2
vue.config.js

@@ -8,7 +8,8 @@ module.exports = {
 	      [process.env.VUE_APP_BASE_API]: {
 	      // target: `https://mp-api.51jiazhu.com`,
 	      // target: `https://test-mp.quanshu123.com`,
-			  target: `https://mptest.kaimanghe.net`,
+				// target: `https://mptest.kaimanghe.net`,
+				target: `https://test-mp-h5.kaimanghe.net`,
 	        changeOrigin: true,
 	        pathRewrite: {
 	          ['^' + process.env.VUE_APP_BASE_API]: ''
@@ -17,4 +18,4 @@ module.exports = {
 	    },
 	    disableHostCheck: true
 	}
-}
+}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov