lsx 2 роки тому
батько
коміт
14bbe24518

+ 0 - 29
src/App.vue

@@ -1,27 +1,10 @@
 <script>
-	import $http from '@/utils/request.js'
-	import { urlParameter } from '@/utils/util.js'
 	export default {
 		globalData: {
 			userInfo: {},
 		},
-		onLaunch: function(options) {
-			uni.hideTabBar()
-			if (options.query && options.query.qrCode) {
-				const { qrCode } = options.query
-				let parameter = urlParameter(qrCode)
-				uni.setStorageSync('code', parameter.id)
-			}
-		},
 		onShow: function(options) {
-			uni.hideTabBar()
-			if (options.query && options.query.qrCode) {
-				const { qrCode } = options.query
-				let parameter = urlParameter(qrCode)
-				uni.setStorageSync('code', parameter.id)
-			}
 			this.updateManager()
-			// this.anotherApplet() //打包盲票小程序时候解开
 		},
 		methods: {
 			updateManager() {
@@ -53,18 +36,6 @@
 					})
 				}
 			},
-			anotherApplet() {
-				$http.post('/api/v1/mp/user/isJump', {}).then(res => {
-					if(res.data) {
-						uni.setStorageSync('anotherApplet',true)
-						uni.switchTab({
-							url:'/pages/index/index'
-						})
-					}else {
-						uni.removeStorageSync('anotherApplet')
-					}
-				})
-			},
 		}
 	}
 </script>

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

@@ -3,13 +3,7 @@
 		<u-popup :show="authShow" mode="bottom">
 			<view class="auth-wrap">
 				<view class="tip">为了正常使用功能,请授权用户信息。</view>
-				<!-- #ifdef MP-ALIPAY -->
-				<button :loading="authIng" @click="getInfoAli()" type="default">授权</button>
-				<view style="height: 100rpx;"></view>
-				<!-- #endif -->
-				<!-- #ifndef MP-ALIPAY -->
 				<button :loading="authIng" @click="getInfo()" type="default">授权</button>
-				<!-- #endif -->
 			</view>
 		</u-popup>
 	</view>

+ 6 - 15
src/components/custom-tab-bar/custom-tab-bar.vue

@@ -34,13 +34,9 @@
 					uni.switchTab({
 						url: '/pages/index/index'
 					})
-				} else if (e == 'core') {
+				} else if (e == 'cart') {
 					uni.switchTab({
-						url: '/pages/core/index'
-					})
-				} else if (e == 'activity') {
-					uni.switchTab({
-						url: '/pages/activity/index'
+						url: '/pages/cart/index'
 					})
 				} else if (e == 'user') {
 					uni.switchTab({
@@ -49,23 +45,18 @@
 				}
 			},
 			tabList() {
-				this.list = [{
-						name: "index",
-						iconPath: "../../static/tabbar/index.png",
-						selectedIconPath: "../../static/tabbar/index_select.png",
-						text: "首页"
-					},
+				this.list = [
 					{
-						name: "core",
+						name: "index",
 						iconPath: "../../static/tabbar/core.png",
 						selectedIconPath: "../../static/tabbar/core_select.png",
 						text: "商城"
 					},
 					{
-						name: "activity",
+						name: "cart",
 						iconPath: "../../static/tabbar/activity.png",
 						selectedIconPath: "../../static/tabbar/activity_select.png",
-						text: "免费抽奖"
+						text: "购物车"
 					},
 					{
 						name: "user",

+ 6 - 6
src/packageGoods/order/index.vue

@@ -10,7 +10,7 @@
 			<!-- 订单导航 -->
 			<view class="flex order-state-search">
 				<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="20" lineHeight="4"
-					lineColor="#E96737" :activeStyle="{
+					lineColor="#367481" :activeStyle="{
 										color: '#333',
 										transform: 'scale(1.1)',
 										width: '50px',
@@ -302,7 +302,7 @@
 					font-size: 30rpx;
 					line-height: 30rpx;
 					margin-bottom: 22rpx;
-					color: #F9822C;
+					color: $uni-text-color;
 					
 					.success {
 						color: #999;
@@ -372,7 +372,7 @@
 						text {
 							font-size: 30rpx;
 							font-weight: bold;
-							color: #F9822C;
+							color: #EA5E2C;
 						}
 					}
 				}
@@ -394,12 +394,12 @@
 					}
 					
 					.logistics {
-						border: 1px solid #F9822C;
-						color: #F9822C;
+						border: 1px solid $uni-text-color;
+						color: $uni-text-color;
 					}
 					
 					.detail {
-						background-color: rgb(249, 130, 44);
+						background-color: $uni-text-color;
 						color: #FFFFFF;
 					}
 					

+ 2 - 12
src/packageGoods/order/logistics.vue

@@ -1,11 +1,6 @@
 <template>
 	<view class="detail">
-		<!-- #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="pack" v-if="deliverList.length>1">
 			<u-tabs @change="changeTab" :scrollable="false" :list="packList" lineWidth="20" lineHeight="4"
@@ -56,18 +51,13 @@
 		<u-toast ref="uToast"></u-toast>
 		<!-- 物流信息 -->
 		<view class="logistics" v-if="deliverListData[listIndex][0].companyName && logistics!==''">
-			<!-- #ifdef MP-ALIPAY -->
-			<uni-steps :options="logistics" active-color="#F9822C" :active="0" direction="column" />
-			<!-- #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 -->
 		</view>
 		<view class="logistics" v-else-if="deliverListData[listIndex][0].companyName">
-			<view style="color: #b1b1b1;">
+			<view style="color: #b1b1b1">
 				暂无物流信息
 			</view>
 		</view>

+ 101 - 0
src/packageOperate/account/bank.vue

@@ -0,0 +1,101 @@
+<template>
+	<view>
+		<u-navbar title="银行卡设置" :border="true" :placeholder="true" :autoBack="true" leftIconColor="#fff"
+			bgColor="#E96737" />
+		<view class="withdraw">
+			<view class="withdraw-form">
+				<u--form labelPosition="left" labelWidth="90">
+					<u-form-item label="持卡人:" borderBottom required>
+						<u--input v-model="form.name" border="none" placeholder="请输入持卡人"></u--input>
+					</u-form-item>
+					<u-form-item label="银行卡号:" borderBottom required>
+						<u--input v-model="form.bankNum" border="none" placeholder="请输入银行卡号"></u--input>
+					</u-form-item>
+					<u-form-item label="开户行:" :borderBottom="false" required>
+						<u--input v-model="form.name" border="none" placeholder="请输入银行卡号"></u--input>
+					</u-form-item>
+				</u--form>
+			</view>
+		</view>
+		<view class="withdraw-btn">
+			<button :loading="loading" type="default" @click="confirm">确认</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				loading: false,
+				amt: 2000,
+				form: {
+					name: '',
+					bankNum: '',
+					bank: '',
+				},
+				info: {},
+			};
+		},
+		onLoad(opthios) {
+			if(opthios.info){
+				this.info = JSON.parse(opthios.info)
+			}
+			this.getDetail()
+		},
+		methods: {
+			toAddBank() {
+				uni.navigateTo({
+					url: '/packageOperate/account/bank'
+				})
+			},
+
+			allMoney() {
+			},
+
+			confirm() {
+
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	::v-deep .u-navbar__content__title.u-navbar__content__title {
+		color: #FFFFFF;
+	}
+</style>
+<style lang="scss" scoped>
+	.withdraw {
+		margin: 20rpx 0;
+		background-color: #FFFFFF;
+		padding: 20rpx 0;
+
+		&-form {
+			padding: 0 40rpx;
+
+			.amt-all {
+				color: rgba(53, 113, 245, 100);
+			}
+		}
+
+		&-tip {
+			padding: 20rpx 40rpx 0;
+			font-size: 24rpx;
+		}
+	}
+
+	.withdraw-btn {
+		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;
+		}
+	}
+</style>

+ 67 - 0
src/packageOperate/account/bankList.vue

@@ -0,0 +1,67 @@
+<template>
+	<view>
+		<u-navbar title="选择银行" :border="true" :placeholder="true" :autoBack="true" leftIconColor="#fff"
+			bgColor="#E96737" />
+		<view class="list">
+			<view class="flex list-item" v-for="(item, index) in bankList" :key="index" @click="selectBank(item)">
+				<text>{{ item.dictLabel }}</text>
+				<u-icon name="checkmark" v-if="item.show"></u-icon>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				bankList: []
+			};
+		},
+		onLoad(options) {
+			this.bankName = options.bankName
+		},
+		onShow() {
+			this.getBankList()
+		},
+		methods: {
+			getBankList() {
+				$http.get('/system/dict/data/type/withdraw_bank', {}).then(res => {
+					res.data.forEach(item => {
+						if(this.bankName == item.dictLabel){
+							item.show = true
+						}
+					})
+					this.bankList = res && res.data
+				})
+			},
+
+			selectBank(item) {
+				let pages = getCurrentPages()
+				let page = pages[pages.length - 2]
+				page.$vm.form.bankName = item.dictLabel
+				uni.navigateBack({
+					delta: 1
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	::v-deep .u-navbar__content__title.u-navbar__content__title {
+		color: #FFFFFF;
+	}
+</style>
+<style lang="scss" scoped>
+	.list {
+		background-color: #FFFFFF;
+
+		&-item {
+			justify-content: space-between;
+			padding: 24rpx 60rpx;
+			border-bottom: 1px solid #f8f8f8;
+		}
+	}
+</style>

+ 161 - 0
src/packageOperate/account/detail.vue

@@ -0,0 +1,161 @@
+<template>
+	<view>
+		<view class="account">
+			<u-navbar title="账户明细" :border="true" :placeholder="true" :autoBack="true" leftIconColor="#fff"
+				bgColor="#E96737" />
+			<view class="account-detail">
+				<view class="account-detail-list">
+					<view class="flex account-detail-list-item" v-for="(item, index) in list" :key="index">
+						<view class="account-detail-list-item__left">
+							<view>{{ item.type.desc }}</view>
+							<view>{{ item.logText }}</view>
+							<view>{{ $parseTime(item.createdTime) }}</view>
+						</view>
+						<view class="flex account-detail-list-item__right">
+							<view>{{ $numberFormat(item.logMoney) }}</view>
+							<view class="ing" v-if="item.withdrawStatus && item.withdrawStatus.value == 1">{{ item.withdrawStatus && item.withdrawStatus.desc }}</view>
+							<view v-else>{{ item.withdrawStatus && item.withdrawStatus.desc }}</view>
+							<view>
+								<text>余额:</text>
+								<text>{{ $numberFormat(item.money) }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="flex empty" v-if="!list.length">
+			<u-empty text="数据为空" mode="order" />
+		</view>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import {
+		accMul,
+		accDiv
+	} from "@/utils/util";
+	export default {
+		data() {
+			return {
+				pageNum: 1,
+				total: 0,
+				list: [],
+			};
+		},
+		onShow() {
+			this.pageList()
+		},
+		methods: {
+			getList() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post(`/api/v1/mp/channel/money/log?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) : ''
+							item.withdrawStatus = item.withdrawStatus ? JSON.parse(item.withdrawStatus) : ''
+						})
+						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()
+			}
+		},
+		
+		onReachBottom() {
+			// 判断是否有数据
+			if (this.total > this.pageNum * 50) {
+				setTimeout(() => {
+					++this.pageNum
+					this.getList()
+				}, 500)
+			} else {
+				uni.$u.toast('没有更多数据了')
+			}
+		},
+		
+	}
+</script>
+
+<style lang="scss" scoped>
+	::v-deep .u-navbar__content__title.u-navbar__content__title {
+		color: #FFFFFF;
+	}
+</style>
+<style lang="scss" scoped>
+	.account {
+		background-color: #FFFFFF;
+
+		&-detail {
+
+			&-list {
+				&-item {
+					justify-content: space-between;
+					padding: 30rpx 20rpx;
+					border-bottom: 1px solid rgba(236, 236, 236, 100);
+
+					&__left {
+						view:nth-child(1) {
+							font-size: 32rpx;
+							line-height: 48rpx;
+						}
+
+						view:nth-child(2) {
+							font-size: 24rpx;
+							line-height: 36rpx;
+							height: 36rpx;
+						}
+
+						view:last-child {
+							line-height: 36rpx;
+							margin-top: 30rpx;
+							color: #606060;
+						}
+					}
+
+					&__right {
+						flex-direction: column;
+						align-items: flex-end;
+
+						view:nth-child(1) {
+							font-size: 32rpx;
+							line-height: 48rpx;
+						}
+
+						view:nth-child(2) {
+							font-size: 24rpx;
+							line-height: 36rpx;
+							height: 36rpx;
+						}
+
+						view:last-child {
+							color: #606060;
+							line-height: 36rpx;
+							margin-top: 30rpx;
+						}
+
+						.ing {
+							color: $uni-text-color;
+						}
+					}
+				}
+			}
+		}
+	}
+	.empty{
+		height: 60vh;
+	}
+</style>

+ 27 - 0
src/packageOperate/account/rule.vue

@@ -0,0 +1,27 @@
+<template>
+	<view>
+		<u-navbar title="提现规则" :border="true" :placeholder="true" :autoBack="true" leftIconColor="#fff"
+			bgColor="#E96737" />
+		<view v-html="desc" class="desc"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				desc: "<p><strong>1.提现时间</strong><br />法定工作日(10:00--18:00)可进行提现,如遇节假日顺延至下周。</p>\n<p>&nbsp;</p>\n<p><strong>2.提现方式</strong><br />目前提现不限定金额,暂时仅支持银行卡提现,银行卡提现每笔将扣除0.8%的手续费:</p>\n<p>&nbsp;</p>\n<p><strong>3.温馨提示</strong><br />(1)您的提现取得的收入,我们将会按税法规定代扣代缴个人所得税,因此您需提供个人有效身份证信息和真实姓名。</p>\n<p>(2)提现成功后将无法更改其他身份证与提现账号提现,请谨慎操作。如因特殊原因需要更换绑定身份证与提现账号的,请联系客服并提供有效证件,客服人员将在5个工作日内处理完毕。</p>\n<p>(3)首次提现成功后,后续提现将同步适用您许可的《提现须知》。</p>"
+			};
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	::v-deep .u-navbar__content__title.u-navbar__content__title {
+		color: #FFFFFF;
+	}
+
+	.desc {
+		padding: 20rpx;
+	}
+</style>

+ 346 - 0
src/packageOperate/account/withdraw.vue

@@ -0,0 +1,346 @@
+<template>
+	<view class="container">
+		<u-navbar title="提现" :border="true" :placeholder="true" :autoBack="true" />
+		<view class="withdraw">
+			<view class="withdraw-form">
+				<u--form labelPosition="left" labelWidth="90">
+					<u-form-item label="持卡人:" borderBottom required>
+						<u--input v-model="form.userName" border="none" placeholder="请输入持卡人"></u--input>
+					</u-form-item>
+					<u-form-item label="银行卡号:" borderBottom required>
+						<u--input v-model="form.cardNo" type="number" border="none" placeholder="请输入银行卡号"></u--input>
+					</u-form-item>
+					<u-form-item label="银行:" borderBottom required @click="toBankList">
+						<u--input v-model="form.bankName" border="none" disabled disabledColor="#ffffff"
+							placeholder="请选择银行"></u--input>
+						<u-icon slot="right" name="arrow-right" color="#909399"></u-icon>
+					</u-form-item>
+					<u-form-item label="开户行:" borderBottom required>
+						<u--input v-model="form.branchName" border="none" placeholder="请输入开户行"></u--input>
+					</u-form-item>
+					<view class="amt">
+						<u-form-item label="¥" prop="commRate" borderBottom leftIconStyle="fosize: 25px;">
+							<u-input v-model="form.money" border="none" type="digit"
+								:placeholder="'可提现余额 ' + $numberFormat(info.money)">
+								<template slot="suffix">
+									<text class="amt-all" @click="allMoney">全部提现</text>
+								</template>
+							</u-input>
+						</u-form-item>
+					</view>
+					<u-cell :isLink="true" :border="false" url="/pages/account/rule" value="查看提现规则"
+						style="padding: 10px 0;"></u-cell>
+				</u--form>
+			</view>
+		</view>
+		<view class="withdraw-btn">
+			<button :loading="loading" type="default" @click="confirm">提交</button>
+		</view>
+		<view class="withdraw-rule">
+			<view class="title">提现规则:</view>
+			<view class="txt">1.提现时间:法定工作日(10:00--18:00)可进行提现,如遇节假日顺延至下周。</view>
+			<view class="txt">2.提现方式:目前提现不限定金额,暂时仅支持银行卡提现,银行卡提现每笔将扣除0.8%的手续费。</view>
+		</view>
+
+		<u-popup :show="withdrawShow" mode="center" @close="close" :safeAreaInsetBottom="false">
+			<view class="withdraw-popup">
+				<view class="withdraw-popup-title">提现</view>
+				<view class="withdraw-popup-money">¥{{ $numberFormat(chargeInfo.withdrawAmt) }}</view>
+				<view class="withdraw-popup-info">
+					<view>服务费</view>
+					<view>¥{{ $numberFormat(chargeInfo.chargeAmt) }}</view>
+				</view>
+				<view class="withdraw-popup-info">
+					<view>费率</view>
+					<view>{{ chargeInfo.chargeRate }}%</view>
+				</view>
+				<view class="flex withdraw-popup-btn">
+					<view class="confirm" @click="confirmCharge">确认</view>
+				</view>
+				<view class="withdraw-popup-close" @click="close">
+					<u-icon name="close" size="25"></u-icon>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import {
+		accMul,
+		accDiv
+	} from "@/utils/util";
+	export default {
+		data() {
+			return {
+				loading: false,
+				identity: true,
+				flag: false,
+				amt: 2000,
+				form: {
+					cardNo: '',
+					userName: '',
+					bankName: '',
+					branchName: '',
+					money: '',
+				},
+				info: {},
+				bankInfo: {},
+				withdrawShow: false,
+				chargeInfo: {}
+			};
+		},
+		onShow() {
+			if (this.flag) return
+			this.identity = uni.getStorageSync('identity') === 'channel' ? true : false
+			this.getDetail()
+			this.getBank()
+		},
+		methods: {
+			getDetail() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let url = this.identity ? '/api/v1/mp/channel/mine/detail' : '/api/v1/mp/channel/site/mine/detail'
+				$http.post(url, {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						let data = res.data
+						this.info = data
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			getBank() {
+				$http.post('/api/v1/mp/channel/withdraw/card/query', {}).then(res => {
+					if (res.code == 0) {
+						this.form = {
+							...this.form,
+							...res.data
+						}
+					}
+				})
+			},
+
+			toAddBank() {
+				uni.navigateTo({
+					url: `/packageOperate/account/bank?info=${ this.bankInfo ? JSON.stringify(this.bankInfo) : '' }`
+				})
+			},
+
+			toBankList() {
+				this.flag = true
+				uni.navigateTo({
+					url: `/packageOperate/account/bankList?bankName=${ this.form.bankName }`
+				})
+			},
+
+			allMoney() {
+				let money = accDiv(this.info.money, 100)
+				this.form.money = money
+			},
+
+			confirm() {
+				const rule = /^([1-9]\d*(\.\d{1,2})?|([0](\.([0][1-9]|[1-9]\d{0,1}))))$/
+				let money = Number(this.form.money)
+				if (!this.form.userName) {
+					uni.$u.toast('请输入持卡人');
+					return
+				}
+				if (!this.form.cardNo) {
+					uni.$u.toast('请输入银行卡号');
+					return
+				}
+				if (this.form.cardNo.length < 8) {
+					uni.$u.toast('银行卡号输入错误');
+					return
+				}
+				if (!this.form.bankName) {
+					uni.$u.toast('请选择银行');
+					return
+				}
+				if (!this.form.branchName) {
+					uni.$u.toast('请输入开户行');
+					return
+				}
+				if (!money) {
+					uni.$u.toast('请输入提现金额');
+					return
+				}
+				if (!rule.test(money)) {
+					uni.$u.toast('请输入正确的提现金额');
+					return
+				}
+				if (accMul(money, 100) > this.info.money) {
+					uni.$u.toast('提现金额超出账户余额');
+					return
+				}
+				// if (money < 500) {
+				// 	uni.$u.toast('最小提现金额500元');
+				// 	return
+				// }
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/channel/withdraw/settle', {
+					cardNo: this.form.cardNo,
+					userName: this.form.userName,
+					bankName: this.form.bankName,
+					branchName: this.form.branchName,
+					money: accMul(money, 100)
+				}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.withdrawShow = true
+						this.chargeInfo = res.data
+						this.chargeInfo.money = accMul(money, 100) - res.data.chargeAmt
+					} else {
+						uni.$u.toast(res.msg);
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			close() {
+				this.withdrawShow = false
+			},
+
+			confirmCharge() {
+				uni.showLoading({
+					title: '提现中'
+				});
+				$http.post('/api/v1/mp/channel/withdraw/apply', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.showToast({
+							title: '提现成功',
+							icon: 'success',
+							duration: 2000
+						})
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 500)
+					} else {
+						uni.$u.toast(res.msg);
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.container {
+		height: 100vh;
+		width: 100%;
+		overflow: hidden;
+	}
+	.withdraw {
+		margin: 20rpx 0;
+		background-color: #FFFFFF;
+		padding: 20rpx 0 0;
+
+		&-form {
+			padding: 0 40rpx;
+
+			.amt-all {
+				display: inline-block;
+				text-align: center;
+				line-height: 80rpx;
+				height: 80rpx;
+				width: 120rpx;
+				color: rgba(53, 113, 245, 100);
+				z-index: 100;
+			}
+		}
+
+		&-tip {
+			padding: 20rpx 40rpx 0;
+			font-size: 24rpx;
+		}
+	}
+
+	.withdraw-btn {
+		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;
+		}
+	}
+
+	.withdraw-rule {
+		padding: 40rpx;
+
+		.title {
+			font-weight: bold;
+			margin-bottom: 18rpx;
+		}
+
+		.txt {
+			line-height: 40rpx;
+			margin-bottom: 28rpx;
+		}
+	}
+
+	.withdraw-popup {
+		position: relative;
+		width: 80vw;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+		padding-bottom: 60rpx;
+
+		&-title {
+			text-align: center;
+			padding: 40rpx 0;
+			font-size: 30rpx;
+		}
+
+		&-money {
+			font-size: 50rpx;
+			font-weight: bold;
+			padding-bottom: 60rpx;
+			text-align: center;
+			border-bottom: 1px solid rgba(236, 236, 236, 100);
+		}
+
+		&-info {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 20rpx 40rpx;
+		}
+
+		&-btn {
+			margin-top: 40rpx;
+
+			.confirm {
+				width: 80%;
+				height: 60rpx;
+				line-height: 60rpx;
+				background-color: $uni-bg-color;
+				border-radius: 32rpx;
+				color: #FFFFFF;
+				text-align: center;
+			}
+		}
+
+		&-close {
+			position: absolute;
+			right: 30rpx;
+			top: 30rpx;
+		}
+	}
+</style>

+ 31 - 8
src/packageOperate/address/create.vue

@@ -29,9 +29,11 @@
 				</u-form-item>
 			</u-form>
 		</view>
-		<!-- 操作按钮 -->
-		<view class="save-btn">
-			<button :loading="loading" type="default" @click="saveAddress">保存</button>
+		<!-- 底部操作按钮 -->
+		<view class="footer-fixed">
+			<view class="btn-wrapper">
+				<button type="default" @click="saveAddress">保存</button>
+			</view>
 		</view>
 
 		<area-picker :area-show="areaShow" @cancel="cancel" @confirmArea="confirmArea" />
@@ -152,23 +154,44 @@
 
 <style lang="scss" scoped>
 	.address-add {
+		box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
+		border-radius: 10rpx;
 		background-color: #FFFFFF;
 		padding: 40rpx;
+		margin: 20rpx;
 	}
 
-	/* 底部操作栏 */
+	// 底部操作栏
+	.footer-fixed {
+		position: fixed;
+		bottom: var(--window-bottom);
+		left: 0;
+		right: 0;
+		min-height: 120rpx;
+		z-index: 11;
+		box-shadow: 0 -4rpx 40rpx 0 rgba(151, 151, 151, 0.24);
+		background: #fff;
 
-	.save-btn {
-		padding: 50rpx 20rpx;
+		// 设置ios刘海屏底部横线安全区域
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+
+		.btn-wrapper {
+			display: flex;
+			align-items: center;
+			padding: 20rpx 0;
+		}
 
 		::v-deep button {
+			width: 80%;
+			height: 76rpx;
 			line-height: 76rpx;
 			font-size: 28rpx;
-			height: 76rpx;
 			color: #fff;
 			background-color: $uni-bg-color;
 			border: none;
-			border-radius: 100rpx;
+			border-radius: 44rpx;
+			margin: 0 auto;
 		}
 	}
 </style>

+ 11 - 6
src/packageOperate/address/index.vue

@@ -184,6 +184,10 @@
 		box-shadow: 0 1rpx 5rpx 0px rgba(0, 0, 0, 0.05);
 		border-radius: 10rpx;
 		background: #fff;
+		
+		text {
+			color: #666;
+		}
 	}
 
 	.contacts {
@@ -234,7 +238,7 @@
 				vertical-align: middle;
 				height: 35rpx;
 				width: 35rpx;
-				background-color: red;
+				background-color: $uni-bg-color;
 				border-radius: 50%;
 				border: red;
 				font-size: 24rpx;
@@ -267,6 +271,7 @@
 
 				.title {
 					margin-left: 8rpx;
+					color: #999;
 				}
 			}
 		}
@@ -296,12 +301,12 @@
 		}
 
 		::v-deep button {
-			width: 441rpx;
-			height: 88rpx;
-			line-height: 88rpx;
-			font-size: 36rpx;
+			width: 80%;
+			height: 76rpx;
+			line-height: 76rpx;
+			font-size: 28rpx;
 			color: #fff;
-			background-color: #F9822C;
+			background-color: $uni-bg-color;
 			border: none;
 			border-radius: 44rpx;
 			margin: 0 auto;

+ 4 - 4
src/packageOperate/share/index.vue

@@ -10,16 +10,15 @@
 		<view class="flex invitation">
 			<view class="flex invitation-user">
 				<image src="../../static/public/share_bg.png" mode="aspectFit"></image>
-				<view class="title">盲票</view>
+				<view class="title">卅商城</view>
 				<image class="avatar" :src="avatar" mode="scaleToFill"></image>
 			</view>
 			<view class="invitation-name">{{ userInfo.nickName }}</view>
-			<view class="invitation-name-tip">邀请您一起来刮盲票</view>
+			<view class="invitation-name-tip">邀请您成为县(区)代理</view>
 			<view class="flex invitation-code">
 				<image :src="codeUrl" mode="aspectFill"></image>
 			</view>
 			<view class="invitation-code-tip">长按识别二维码</view>
-			<view class="invitation-bottom-tip">盲票,玩的就是有趣</view>
 		</view>
 		<view class="flex btn">
 			<button type="default" open-type="share">分享链接给好友</button>
@@ -198,7 +197,8 @@
 		.invitation-code-tip {
 			font-size: 34rpx;
 			color: rgba(181, 181, 181, 100);
-			margin-bottom: 60rpx;
+			margin-bottom: 30rpx;
+			margin-top: 30rpx;
 		}
 
 		.invitation-bottom-tip {

+ 231 - 0
src/packageOperate/share/member.vue

@@ -0,0 +1,231 @@
+<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="flex invitation">
+			<view class="flex invitation-user">
+				<image src="../../static/public/share_bg.png" mode="aspectFit"></image>
+				<view class="title">盲票</view>
+				<image class="avatar" :src="avatar" mode="scaleToFill"></image>
+			</view>
+			<view class="invitation-name">{{ userInfo.nickName }}</view>
+			<view class="invitation-name-tip">邀请您成为商城会员</view>
+			<view class="flex invitation-code">
+				<image :src="codeUrl" mode="aspectFill"></image>
+			</view>
+			<view class="invitation-code-tip">长按识别二维码</view>
+			<view class="invitation-bottom-tip">盲票,玩的就是有趣</view>
+		</view>
+		<view class="flex btn">
+			<button type="default" open-type="share">分享链接给好友</button>
+			<button type="default" @click="saveImg">保存海报</button>
+		</view>
+
+		<share-code ref="shareCode" :posterData.sync="posterData" />
+	</view>
+</template>
+
+<script>
+	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"
+	export default {
+		components: {
+			ShareCode
+		},
+		data() {
+			return {
+				codeUrl: '',
+				userInfo: {},
+				avatar: '',
+				boxId: '',
+				// 图片数据
+				posterData: {
+					poster: {
+						//根据屏幕大小自动生成图片背景大小
+						url: "https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/mp.png", //图片地址
+						r: 15, //圆角半径
+						w: 340, //图片宽度
+						h: 447, //图片高度
+						p: 20 //图片内边距padding
+					},
+					mainImg: {
+						// 头像
+						url: "", //图片地址
+						r: 33, //圆角半径
+						w: 66, //宽度
+						h: 66, //高度
+						mt: 40
+					},
+					title: {
+						// 昵称
+						text: "", //文本
+						fontSize: 26, //字体大小
+						color: "#4F4F4F", //颜色
+						lineHeight: 37, //行高#4F4F4F 100%
+						mt: 30, //margin-top
+						w: 300,
+						align: "center"
+					},
+					codeImg: {
+						// 小程序码
+						url: "", //图片地址
+						w: 124, //宽度
+						h: 124, //高度
+						mt: 20, //margin-top
+						r: 62, //圆角半径
+						mt: 55
+					},
+					tips: [
+
+					]
+				}
+			};
+		},
+
+		onLoad(options) {
+			this.boxId = options.boxId
+		},
+
+		onShow() {
+			this.getUrl()
+			this.getBaseInfo()
+		},
+		methods: {
+			getBaseInfo() {
+				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.avatar = this.posterData.mainImg.url = env.filePublic + res.data.avatar
+						this.posterData.title.text = res.data.nickName
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			getUrl() {
+				$http.post('/api/v1/mp/user/share/code/generate', {
+					boxId: this.boxId,
+					type: "1",
+					appSource: appId,
+				}).then(res => {
+					this.codeUrl = this.posterData.codeImg.url = env.filePublic + res.data
+				})
+			},
+
+			saveImg() {
+				this.$refs.shareCode.posterShow()
+			},
+		},
+
+		onShareAppMessage(res) {
+			return {
+				title: '分享盲票',
+				path: `/pages/ticketBox/detail?boxId=${ this.boxId }&userId=${ this.userInfo.userId }&type=1`,
+				type: 2,
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.invitation {
+		flex-direction: column;
+		margin: 50rpx 30rpx;
+		padding: 0 0 80rpx;
+		border: 1px solid rgba(236, 236, 236, 100);
+		border-radius: 20rpx;
+		background-color: #FFFFFF;
+
+		&-user {
+			position: relative;
+			width: 100%;
+			margin-bottom: 80rpx;
+
+			image {
+				width: 100%;
+				height: 188rpx;
+				border-top-left-radius: 20rpx;
+				border-top-right-radius: 20rpx;
+			}
+
+			.title {
+				position: absolute;
+				font-size: 52rpx;
+				color: #FFFFFF;
+				top: 20rpx;
+			}
+
+			.avatar {
+				position: absolute;
+				width: 134rpx;
+				height: 134rpx;
+				border-radius: 50%;
+				top: 120rpx;
+			}
+		}
+
+		.invitation-name {
+			font-size: 52rpx;
+			margin-bottom: 40rpx;
+		}
+
+		.invitation-name-tip {
+			font-size: 36rpx;
+			color: rgba(134, 134, 134, 100);
+			margin-bottom: 20rpx;
+		}
+
+		.invitation-code {
+			image {
+				width: 250rpx;
+				height: 250rpx;
+				margin-bottom: 20rpx;
+			}
+		}
+
+		.invitation-code-tip {
+			font-size: 34rpx;
+			color: rgba(181, 181, 181, 100);
+			margin-bottom: 30rpx;
+			margin-top: 30rpx;
+		}
+
+		.invitation-bottom-tip {
+			font-size: 28rpx;
+		}
+	}
+
+	.tip {
+		text-align: center;
+	}
+
+	.btn {
+		padding: 40rpx 20rpx;
+
+		.ge {
+			height: 40rpx;
+		}
+
+		::v-deep button {
+			line-height: 60rpx;
+			font-size: 28rpx;
+			height: 60rpx;
+			color: #fff;
+			background-color: $uni-bg-color;
+			border: none;
+			border-radius: 8rpx;
+		}
+	}
+</style>

+ 108 - 0
src/packageOperate/team/detail.vue

@@ -0,0 +1,108 @@
+<template>
+	<view>
+		<u-navbar title="代理详情" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<view class="wrap">
+			<view class="wrap-top">
+				<view class="title">基础资料</view>
+				<text>姓名:我是渠道名称</text>
+				<text>所在地区:浙江省 杭州市 西湖区</text>
+				<text>激活时间:2022-09-10</text>
+			</view>
+			<view class="wrap-bottom">
+				<view class="title">经营数据</view>
+				<view class="wrap-bottom-text flex">
+					<text>已激活直邀会员:<text class="text">{{'11111'}}</text></text>
+					<text>已激活裂变会员:<text class="text2">{{'222'}}</text></text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				id: 0,
+				info: {},
+			}
+		},
+		onLoad(opthios) {
+			if (opthios.id) {
+				this.id = opthios.id
+			}
+		},
+		onShow() {
+			this.getInfo()
+		},
+		methods: {
+			getInfo() {
+				$http.post(`/api/v1/mp/user/mall/ticket/detail`, { boxId: this.id, }).then(
+					res => {
+						if(res.code == 0) {
+							this.info = res.data
+						}
+					})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.wrap {
+	
+	&-top {
+		border-radius: 10rpx;
+		background-color: #fff;
+		margin: 25rpx;
+		padding: 10rpx 30rpx 30rpx 30rpx;
+		
+		text {
+			margin-top: 30rpx;
+			display: inline-block;
+			width: 100%;
+			font-size: 24rpx;
+			color: #666;
+		}
+	}
+	
+	&-bottom {
+		border-radius: 10rpx;
+		background-color: #fff;
+		margin: 25rpx;
+		padding: 10rpx 30rpx 30rpx 30rpx;
+		
+		text {
+			margin-top: 30rpx;
+			font-size: 24rpx;
+			color: #666;
+		}
+		
+		&-text {
+			justify-content: space-around;
+			
+			text {
+				flex: 1;
+				width: 100%;
+				text-align: left;
+			}
+			.text {
+				color: $uni-text-color;
+			}
+			.text2 {
+				color: #F9B229;
+			}
+		}
+	}
+	
+	.title {
+		line-height: 90rpx;
+		color: #171717;
+		font-size: 24rpx;
+		font-weight: bold;
+		border-bottom: 1px solid rgba(102,102,102,0.12);
+	}
+}
+</style>

+ 274 - 0
src/packageOperate/team/index.vue

@@ -0,0 +1,274 @@
+<template>
+	<view>
+		<u-navbar title="我的邀请" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
+		<view class="team">
+			<view class="status">
+				<u-tabs @change="changeTab" :scrollable="false" :list="statusArr" lineWidth="28" lineHeight="3"
+					lineColor="#367481 " :activeStyle="{
+											color: '#367481',
+											transform: 'scale(1.1)',
+											fontSize: '14px',
+											width: '120px'
+										}" :inactiveStyle="{
+											color: '#999',
+											transform: 'scale(1)',
+											fontSize: '14px',
+											width: '120px'
+										}" itemStyle="padding-left: 20px; padding-right: 15px; height: 44px; text-align: center;">
+				</u-tabs>
+			</view>
+			<!-- 会员列表 -->
+			<view class="list" v-if="state === 1">
+				<view class="list-item" v-for="(item, index) in list" :key="index">
+					<view class="list-item-top flex">
+						<view class="list-item-top-title flex">
+							<image :src="item.picUrl" mode="aspectFill"></image>
+							<text class="ells-one">{{item.title}}</text>
+						</view>
+						<view class="list-item-top-date">
+							激活日期:{{}}2022年00月00号
+						</view>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'"
+					:nomore-text="'已经到底了'" />
+			</view>
+			<!-- 县代列表 -->
+			<view class="list" v-if="state === 2">
+				<view class="list-item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
+					<view class="list-item-top flex">
+						<view class="list-item-top-title flex">
+							<image :src="item.picUrl" mode="aspectFill"></image>
+							<text class="ells-one">{{item.title}}</text>
+						</view>
+						<view class="list-item-top-date">
+							激活日期:{{}}2088-08-09
+						</view>
+					</view>
+					<view class="list-item-bottom flex">
+						<text>已激活直邀会员:<text class="text">{{'11111'}}</text></text>
+						<text>已激活裂变会员:<text class="text2">{{'222'}}</text></text>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'"
+					:nomore-text="'已经到底了'" />
+			</view>
+			<!-- 省代列表 -->
+			<view class="list" v-if="state === 3">
+				<view class="list-item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
+					<view class="list-item-top flex">
+						<view class="list-item-top-title flex">
+							<image :src="item.picUrl" mode="aspectFill"></image>
+							<text class="ells-one">{{item.title}}</text>
+						</view>
+						<!-- <view class="list-item-top-date">
+							激活日期:{{}}2088年08月09日
+						</view> -->
+					</view>
+					<view class="list-item-bottom flex">
+						<text>地区:{{}}地级市>县区</text>
+						<text>激活日期:{{}}2088年08月09日</text>
+					</view>
+				</view>
+				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'"
+					:nomore-text="'已经到底了'" />
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				statusArr: [{
+					name: '已激活会员'
+				}, {
+					name: '待激活会员',
+				}],
+				stateArr: [{
+					name: '已激活县区代理'
+				}, {
+					name: '待激活县区代理',
+				}],
+				state: 2,
+				pageNum: 1,
+				total: 0,
+				list: [],
+			}
+		},
+		onShow() {
+			this.pageList()
+		},
+		onLoad() {
+			this.rewardNum()
+		},
+		methods: {
+			pageList() {
+				this.pageNum = 1
+				this.list = []
+				this.getList()
+			},
+			getList() {
+				$http.post(`/api/v1/mp/user/mine/ticket/list?pageNum=${this.pageNum}&pageSize=20`, {
+					status: this.state
+				}).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(() => {})
+			},
+			changeTab(e) {
+				if (e.index == 0) {
+					this.state = 2
+				} else if (e.index == 1) {
+					this.state = 3
+				}
+				this.pageList()
+			},
+			
+			//跳转详情页
+			toDetail(item) {
+				uni.navigateTo({
+					url: `/packageOperate/team/detail?id=${item.boxId}`
+				})
+			},
+
+			//数量
+			rewardNum() {
+				$http.post(`/api/v1/mp/user/mine/ticket/list?pageNum=${this.pageNum}&pageSize=20`, {
+					status: 2
+				}).then(res => {
+					$http.post(`/api/v1/mp/user/mine/ticket/list?pageNum=${this.pageNum}&pageSize=20`, {
+						status: 3
+					}).then(data => {
+						if (res.code == 0) {
+							this.statusArr = [{
+									name: ' 已激活会员 (' + res.total + ') '
+								},
+								{
+									name: ' 待激活会员 (' + data.total + ') '
+								},
+							]
+							this.stateArr = [{
+									name: ' 已激活县区代理 (' + res.total + ') '
+								},
+								{
+									name: ' 待激活县区代理 (' + data.total + ') '
+								},
+							]
+
+						} else {
+							this.statusArr = [{
+								name: ' 已激活会员 (0)',
+							}, {
+								name: ' 待激活会员 (0)',
+							}, ]
+							this.stateArr = [{
+								name: ' 已激活县区代理 (0)',
+							}, {
+								name: ' 待激活县区代理 (0)',
+							}, ]
+						}
+					})
+				})
+			}
+		},
+		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>
+	.status {
+		width: 100%;
+		position: fixed;
+		z-index: 100;
+		background-color: #FFFFFF;
+		box-shadow: 0 5rpx 5rpx #ececec;
+
+		::v-deep .u-tabs__wrapper__nav__item__text.data-v-0de61367 {}
+	}
+
+	.list {
+		padding: 110rpx 0 80rpx 0;
+
+		&-item {
+			padding: 30rpx 40rpx;
+			margin: 0rpx 25rpx 25rpx;
+			background-color: #fff;
+			border-radius: 10rpx;
+
+			&-top {
+				justify-content: space-around;
+				text-align: left;
+				
+				&-title {
+					flex: 1;
+					justify-content: end;
+
+					image {
+						width: 68rpx;
+						height: 68rpx;
+						border-radius: 50%;
+						vertical-align: middle;
+					}
+
+					text {
+						width: 170rpx;
+						margin-left: 26rpx;
+						font-size: 24rpx;
+						color: #666;
+						display: inline-block;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						-webkit-line-clamp: 1;
+					}
+				}
+
+				&-date {
+					flex: 1;
+					font-size: 24rpx;
+					color: #666;
+				}
+
+			}
+
+			&-bottom {
+				margin-top: 36rpx;
+				justify-content: space-around;
+				text-align: left;
+				
+				text {
+					flex: 1;
+					font-size: 24rpx;
+					color: #666;
+					display: inline-block;
+					
+					.text {
+						color: $uni-text-color;
+					}
+					.text2 {
+						color: #F9B229;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 10 - 41
src/packagePrize/bean/index.vue

@@ -1,21 +1,19 @@
 <template>
 	<view>
 		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲豆"  leftIconSize="0"></u-navbar>
+		<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>
+		<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">
@@ -89,12 +87,7 @@
 				this.list = []
 				this.getList()
 			},
-			
-			toCore(){
-				uni.switchTab({
-					url:"/pages/core/index"
-				})
-			}
+
 		},
 
 		onReachBottom() {
@@ -118,7 +111,8 @@
 			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-color: #FFFFFF;
+			// 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;
 			
@@ -126,33 +120,8 @@
 				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 {
-				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;
-				}
+				color: $uni-text-color;
+				margin-top: 100rpx;
 			}
 		}
 
@@ -190,7 +159,7 @@
 					align-items: flex-end;
 					
 					.amt {
-						color: #FF4208;
+						color: $uni-text-color;
 						font-size: 30rpx;
 						line-height: 30rpx;
 						margin-bottom: 28rpx;

+ 33 - 18
src/pages.json

@@ -7,6 +7,11 @@
 			"style": {
 				"navigationBarTextStyle": "white"
 			}
+		},{
+			"path": "pages/cart/index",
+			"style": {
+				"navigationBarTextStyle": "white"
+			}
 		},
 		{
 			"path": "pages/index/wxofficial"
@@ -31,13 +36,13 @@
 			"path": "pages/login/code"
 		},
 		{
-			"path": "pages/lucky/index",
-			"style": {
-				"navigationBarTextStyle": "white"
-			}
+			"path": "pages/login/password"
+		},
+		{
+			"path": "pages/login/invitation"
 		},
 		{
-			"path": "pages/ticketBox/detail"
+			"path": "pages/reset/index"
 		},
 		{
 			"path": "pages/activity/index"
@@ -134,6 +139,21 @@
 		{
 			"root": "packageOperate",
 			"pages": [{
+					"path": "account/bank"
+				},
+				{
+					"path": "account/bankList"
+				},
+				{
+					"path": "account/detail"
+				},
+				{
+					"path": "account/rule"
+				},
+				{
+					"path": "account/withdraw"
+				},
+				{
 					"path": "address/index"
 				},
 				{
@@ -156,6 +176,12 @@
 				},
 				{
 					"path": "activity/wxofficial"
+				},
+				{
+					"path": "team/index"
+				},
+				{
+					"path": "team/detail"
 				}
 			]
 		},
@@ -182,14 +208,6 @@
 		"pages/index/index": {
 			"network": "all",
 			"packages": ["packageGoods", "packagePrize", "packageOperate", "packageOther"]
-		},
-		"pages/lucky/index": {
-			"network": "all",
-			"packages": ["packageOperate", "packageGoods", "packagePrize", "packageOther"]
-		},
-		"pages/ticketBox/detail": {
-			"network": "all",
-			"packages": ["packageGoods", "packagePrize", "packageOperate", "packageOther"]
 		}
 	},
 	"tabBar": {
@@ -199,13 +217,10 @@
 		"selectedColor": "red",
 		"list": [{
 			"pagePath": "pages/index/index",
-			"text": "首页"
-		}, {
-			"pagePath": "pages/core/index",
 			"text": "商城"
 		}, {
-			"pagePath": "pages/activity/index",
-			"text": "免费抽奖"
+			"pagePath": "pages/cart/index",
+			"text": "购物车"
 		}, {
 			"pagePath": "pages/user/index",
 			"text": "我的"

+ 335 - 0
src/pages/cart/index.vue

@@ -0,0 +1,335 @@
+<template>
+	<view class="core">
+		<u-navbar leftIconSize="0" :placeholder="true" bgColor="#ffffff">
+			<view slot="left" style="font-size: 32rpx;">购物车</view>
+		</u-navbar>
+		<view class="cart">
+			<view class="cart-list">
+				<view class="flex cart-list__detail" v-for="(item, index) in list" :key="index">
+					<view class="cart-list__detail__left">
+						<view class="flex checkbox">
+							<u-checkbox-group>
+								<u-checkbox :value="item.checked" shape="circle" size="24" :checked="item.checked"
+									activeColor="rgba(234,136,66,1)" @change="changeChecked($event, item)"></u-checkbox>
+							</u-checkbox-group>
+						</view>
+						<view class="img" @click="toGoods(item.boxId)">
+							<image class="img" :src="item.picUrl" mode="aspectFill">
+							</image>
+						</view>
+						<view class="info" @click="toGoods(item.boxId)">
+							<text class="title">{{ item.title }}</text>
+							<text class="value">规格:{{ item.pkgUnit }}张/包</text>
+							<text>面值:{{ $numberFormat(item.facePrice) }}元</text>
+							<text class="money">¥{{ $numberFormat(item.pkgSalePrice) }}</text>
+						</view>
+					</view>
+					<view class="cart-list__detail__right">
+						<u-number-box :min="1" :max="100" :value="item.orderNum" @change="valChange($event, item)"
+							:disabledInput="true"></u-number-box>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="flex empty" v-if="!list.length">
+			<u-empty text="购物车为空" mode="car" />
+		</view>
+		<view class="footer-fixed">
+			<view class="flex btn">
+				<view class="flex btn-left">
+					<u-checkbox-group>
+						<u-checkbox v-model="checkedAll" :checked="checkedAll" shape="circle" size="24"
+							activeColor="rgba(234,136,66,1)" @change="changeCheckedAll"></u-checkbox>
+					</u-checkbox-group>
+					<text>全选</text>
+				</view>
+				<view class="btn-right">
+					<view class="del" @click="delCart">删除</view>
+					<view class="money">
+						<text>合计:</text>
+						<text class="value">¥{{ moneyAll }}</text>
+					</view>
+					<text class="save" @click="toSettlement">去结算</text>
+				</view>
+			</view>
+		</view>
+
+		<custom-tab-bar :activeValue="'cart'" />
+	</view>
+</template>
+
+<script>
+	import env from '../../config/env.js'
+	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
+	import $http from '@/utils/request.js'
+	import {
+		accMul,
+		accDiv,
+		floatAdd
+	} from "@/utils/util";
+	export default {
+		components: {
+			CustomTabBar,
+		},
+		data() {
+			return {
+				list: [],
+				value: 1,
+				checked: false,
+				checkedAll: false,
+				moneyAll: 0.00,
+			};
+		},
+		onShow() {
+			this.getList()
+		},
+		methods: {
+			valChange(e, item) {
+				let data = {
+					cartId: item.cartId,
+					boxId: item.boxId,
+					orderNum: e.value
+				}
+				this.$set(item, 'orderNum', e.value)
+				$http.post(`/api/v1/mp/channel/mall/cart/update`, data).then(res => {
+				
+				})
+				this.getPrice()
+			},
+
+			getList() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				$http.post('/api/v1/mp/channel/mall/cart/list', {}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						res.data.forEach(item => {
+							let picUrlArr = item.picUrl.split(',')
+							item.picUrl = env.filePublic + picUrlArr[0],
+								item.checked = false
+						})
+						this.list = res.data
+						this.checkedAll = false
+						this.getPrice()
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+
+			changeChecked(e, item) {
+				this.$set(item, 'checked', e)
+				let flag = this.list.every(item => item.checked == true)
+				this.getPrice()
+				this.checkedAll = flag
+				this.$forceUpdate()
+			},
+
+			getPrice() {
+				let money = this.list.map(item => {
+					if (item.checked) {
+						return accDiv(accMul(item.pkgSalePrice, item.orderNum), 100)
+					}
+				})
+				let num = 0
+				money.forEach(item => {
+					if (item) {
+						num = floatAdd(num, item)
+					}
+				})
+				this.moneyAll = num
+			},
+
+			changeCheckedAll(e) {
+				this.checkedAll = e
+				this.list.forEach(item => {
+					item.checked = e
+				})
+				this.getPrice()
+			},
+
+			delCart() {
+				let arr = []
+				let _this = this
+				_this.list.forEach(item => {
+					if (item.checked) {
+						arr.push(item)
+					}
+				})
+				if (!arr.length) {
+					uni.$u.toast('请选择');
+					return
+				}
+				uni.showModal({
+					title: '提示',
+					content: '您确认要删除吗?',
+					success(res) {
+						if (res.confirm) {
+							$http.post('/api/v1/mp/channel/mall/cart/remove', {
+								ids: arr.map(item => item.cartId)
+							}).then(res => {
+								if (res.code == 0) {
+									uni.$u.toast('删除成功');
+									_this.getList()
+									_this.checkedAll = false
+								}
+							})
+						}
+					}
+				})
+			},
+
+			toSettlement() {
+				let arr = []
+				this.list.forEach(item => {
+					if (item.checked) {
+						arr.push(item)
+					}
+				})
+				if (!arr.length) {
+					uni.$u.toast('请选择');
+					return
+				}
+				let ids = JSON.stringify(arr.map(item => item.cartId))
+				uni.navigateTo({
+					url: `/packageGoods/order/settlement?ids=${ ids }`
+				})
+			},
+
+			toGoods(id) {
+				uni.navigateTo({
+					url: `/packageGoods/goods/detail?boxId=${ id }`
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.core {
+		background-color: #fff;
+	
+		&-none {
+			height: 120rpx;
+		}
+	}
+	
+	.cart {
+		margin: 10rpx;
+		background-color: #FFFFFF;
+
+		&-list {
+			padding: 0 16rpx;
+
+			&__detail {
+				padding: 20rpx 0;
+				justify-content: space-between;
+				border-bottom: 1px solid rgba(236, 236, 236, 100);
+
+				&__left {
+					display: flex;
+					height: 170rpx;
+
+					.img {
+						margin-left: 5rpx;
+
+						image {
+							width: 134rpx;
+							height: 170rpx;
+							margin-right: 20rpx;
+						}
+					}
+
+					.info {
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+
+						text {
+							font-size: 24rpx;
+							display: inline-block;
+						}
+
+						.title {
+							color: rgba(16, 16, 16, 100);
+							font-size: 32rpx;
+							font-weight: bold;
+							width: 270rpx;
+							overflow: hidden;
+							white-space: nowrap;
+							text-overflow: ellipsis;
+						}
+
+						.money {
+							color: rgba(234,136,66,1);
+							font-size: 32rpx;
+						}
+					}
+				}
+
+				&__right {
+					display: flex;
+					height: 170rpx;
+					flex-direction: column;
+					justify-content: flex-end;
+					align-items: flex-end;
+				}
+
+			}
+
+			&__detail:last-child {
+				border: none;
+			}
+		}
+	}
+
+	.empty {
+		height: 65vh;
+	}
+
+	.footer-fixed {
+		position: fixed;
+		bottom: 100rpx;
+		left: 0;
+		right: 0;
+		z-index: 0;
+		box-shadow: 0 -4rpx 10rpx 0 rgba(151, 151, 151, 0.24);
+		background: #fff;
+
+		// 设置ios刘海屏底部横线安全区域
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+
+		.btn {
+			justify-content: space-between;
+			padding: 20rpx 40rpx;
+
+			&-right {
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+
+				.del {
+					color: rgba(234,136,66,1);
+					margin-right: 40rpx;
+				}
+
+				.value {
+					color: rgba(234,136,66,1);
+				}
+
+				.save {
+					width: 132rpx;
+					height: 48rpx;
+					line-height: 48rpx;
+					border-radius: 24rpx;
+					background-color: rgba(234,136,66,1);
+					text-align: center;
+					margin-left: 40rpx;
+					color: rgba(255, 255, 255, 1);
+				}
+			}
+		}
+	}
+</style>

+ 0 - 1213
src/pages/index/index -2022-7-15.vue

@@ -1,1213 +0,0 @@
-<template>
-	<view>
-		<view class="box">
-			<view class="index" :style="{ top: statusHeight + 'px' }">
-				<view class="barrage">
-					<!-- 背景 -->
-					<image class="barrage-bg" src="../../static/index/barrage_bg.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">
-							<view class="barrage-swiper-item flex">
-								<view class="barrage-swiper-item-content flex">
-									<image :src="item.avatar" mode="scaleToFill" />
-									<view class="title ells-one">{{ item.nickName }}
-										{{ item.type == 1 ? '刮出了' : '兑换了' }} {{ item.prizeInfo }}
-									</view>
-								</view>
-							</view>
-						</swiper-item>
-					</swiper>
-					<view class="barrage-none"></view>
-				</view>
-
-				<!-- 查看规则 -->
-				<view class="rule">
-					<!-- #ifndef MP-ALIPAY -->
-					<view class="rule-content flex" @click="toRule">
-						<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
-						<text>查看规则</text>
-					</view>
-					<!-- #endif -->
-				</view>
-
-				<!-- 盲票轮播 -->
-				<view class="ticket">
-					<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[2]" mode="scaleToFill"></image>
-								<image class="ticket-swiper-item-prize" :src="item.picUrl[1]" mode="scaleToFill">
-								</image>
-							</view>
-						</swiper-item>
-					</swiper>
-					<view class="ticket-left" @click="ticketRight()">
-						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
-					</view>
-					<view class="ticket-right" @click="ticketLeft()">
-						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
-					</view>
-
-				</view>
-
-				<!-- 投诉建议 -->
-				<view class="proposal flex">
-					<view class="proposal-time flex" v-if="activityTime && activityTime > 0" @click="toActivity">
-						<image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
-						<view class="time">
-							<u-count-down :time="activityTime" format="HH:mm:ss:SSS" autoStart millisecond>
-							</u-count-down>
-						</view>
-					</view>
-					<view v-else></view>
-					<view class="proposal-progress">
-						<u-line-progress :percentage="percentage" height="3" :showText="false"
-							inactiveColor="rgba(255, 255, 255, .36)" activeColor="#fff" />
-					</view>
-					<!-- #ifdef MP-WEIXIN -->
-					<view class="proposal-tip" @click="contactService">
-						<image src="../../static/index/index_tip_bg.png" mode="scaleToFill"></image>
-						<text>投诉建议</text>
-					</view>
-					<!-- #endif -->
-
-				</view>
-
-				<!-- 中奖概率 -->
-				<view class="chance flex">
-					<view class="chance-title">中奖概率:</view>
-					<view class="chance-hitRate flex">
-						<view class="chance-hitRate-content flex"
-							v-for="(item, index) in ticketInfo.ticketAwardsLabelList" :key="index">
-							<image :src="item.picUrl" mode="scaleToFill"></image>
-							<text>{{ item.hitRate }}%</text>
-						</view>
-					</view>
-				</view>
-
-				<!-- 盲票名称轮播 -->
-				<view class="ticket-title" flex>
-					<swiper class="ticket-title-swiper flex" :duration="0" :current="ticketTitleIndex"
-						previous-margin="110px" next-margin="110px" :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 }">
-								<text>{{ item.title }}</text>
-							</view>
-						</swiper-item>
-					</swiper>
-				</view>
-
-				<!-- 刮开盲票 -->
-				<view class="ticket-btn flex">
-					<view class="ticket-btn-left flex" @click="toRollingGame">
-						<image src="../../static/index/index_btn_left.png" mode="scaleToFill"></image>
-						<view class="ticket-btn-left__title">试玩</view>
-					</view>
-					<view class="ticket-btn-center flex" @click="payment">
-						<view class="image-wrap flex">
-							<image class="btn" src="../../static/index/index_btn.png" mode="scaleToFill"></image>
-							<image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill">
-							</image>
-						</view>
-						<view class="ticket-btn-center-wrap flex">
-							<view class="ticket-btn-center-wrap__title">刮开<br />盲票</view>
-						</view>
-					</view>
-					<view class="ticket-btn-right flex" @click="toTicket">
-						<image src="../../static/index/index_btn_right.png" mode="scaleToFill"></image>
-						<view class="ticket-btn-right__title">更多盲票</view>
-					</view>
-				</view>
-
-				<!-- 盲票价格 -->
-				<view class="ticket-price flex">
-					<view class="ticket-price-amt flex">
-						<view class="num">{{ $numberFormat(ticketInfo.salePrice) }}</view>
-						<view class="txt">元</view>
-					</view>
-					<view class="ticket-price-discount flex" v-if="ticketInfo.originPrice != 0">
-						<view class="num">原价¥{{ $numberFormat(ticketInfo.originPrice) }}</view>
-					</view>
-				</view>
-			</view>
-
-		</view>
-		<!-- 引导页面 -->
-		<u-modal :show="showMp" content='“盲票”已升级为“码上快购”' width='530rpx' confirmText='立即前往' @confirm='toAnotherApplet'></u-modal>
-		<!-- tabbar组件 -->
-		<custom-tab-bar :activeValue="'index'" />
-		<!-- 支付弹框组件 -->
-		<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 CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
-	import PayPopup from '../../components/pay-popup/pay-popup.vue'
-	export default {
-		components: {
-			CustomTabBar,
-			PayPopup,
-		},
-		data() {
-			return {
-				loginState: false, // 登录状态
-				ticketList: [], // 盲票列表
-				prizeList: [], // 奖品列表
-				prizeNewsListOne: [], // 弹幕列表
-				prizeNewsListTwo: [], // 弹幕列表
-				payShow: false, // 支付弹框显示
-				payInfo: {}, // 支付详情
-				currentIndex: 0, // 盲票选中下标
-
-				statusHeight: 20,
-				ticketIndex: 0, // 盲票选中下标
-				ticketTitleIndex: 0, // 盲票标题选中下边
-				list: [1, 2, 3, 4, 5],
-				percentage: 0,
-				checkStatus: true,
-				filterActivityList: [],
-				activityTime: null,
-				ticketInfo: {},
-				clickLoading: true,
-				userInfo: '',
-				showMp: false,
-			};
-		},
-		onLoad(opthios) {
-			this.showMp = uni.getStorageSync('anotherApplet') ? true : false
-			
-			uni.hideTabBar()
-			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/index/index.vue.`
-							)
-						}
-					})
-				}
-			}
-			if (opthios.type) {
-				uni.setStorageSync('shareType', opthios.type)
-			}
-			/**
-			 * 票赢天下小程序分享盲票跳转接受的参数
-			 * shareUid: 用户ID
-			 * shareType: 分享类型
-			 * */
-			if (opthios.scene) {
-				let sceneStr = decodeURIComponent(opthios.scene)
-				this.sceneArr = sceneStr.split('&')
-				uni.setStorageSync('shareUid', this.sceneArr[0])
-				if (this.sceneArr[0] === undefined || this.sceneArr[0] === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/index/index.vue,来源:票赢天下小程序分享盲票,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', this.sceneArr[1])
-			}
-			/**
-			 * 外部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/index/index.vue,来源:外部app,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', opthios.t)
-			}
-			// #ifdef MP-WEIXIN
-			const res = uni.getMenuButtonBoundingClientRect()
-			this.statusHeight = res.top //胶囊距离顶部
-			// #endif
-
-			// #ifdef MP-ALIPAY
-			uni.getSystemInfo({
-				success: (res) => {
-					this.statusHeight = res.statusBarHeight + 7
-				}
-			})
-			// #endif
-
-			let num = Math.round(100 / this.list.length)
-			this.percentage = num
-
-
-			this.getList()
-		},
-		onShow() {
-			this.loginState = uni.getStorageSync('token') ? true : false
-			if (this.loginState) {
-				this.getBaseInfo()
-			}
-			this.getPrizeNews()
-			this.getActivityList()
-		},
-		methods: {
-			toAnotherApplet() {
-				/**
-				 * envVersion 类型为字符串
-				 * envVersion: 'develop', //开发版
-				 * envVersion: 'trial', //体验版
-				 * envVersion: 'release',//正式版
-				 */
-				uni.navigateToMiniProgram({
-				    appId:'wxffb4598e70b9f871',// appid
-				    path:'/pages/index/index',// 首页路径
-				    envVersion:"release",
-				    success: res => {
-				      // 打开成功
-				    },
-				})
-			},
-			// 切换盲票
-			changeTicket({
-				detail
-			}) {
-				if (this.clickLoading) {
-					this.clickLoading = false
-					this.ticketIndex = detail.current
-					this.ticketTitleIndex = detail.current
-					this.getTicketDetail(this.ticketList[detail.current].boxId)
-					this.setNum(detail.current)
-					setTimeout(() => {
-						this.clickLoading = true
-					}, 200)
-				}
-			},
-
-			// 切换盲票名称
-			changeTicketTitle({
-				detail
-			}) {
-				if (this.clickLoading) {
-					this.clickLoading = false
-					this.ticketIndex = detail.current
-					this.ticketTitleIndex = detail.current
-					this.getTicketDetail(this.ticketList[detail.current].boxId)
-					this.setNum(detail.current)
-					setTimeout(() => {
-						this.clickLoading = true
-					}, 200)
-				}
-			},
-
-			// 点击名称
-			clickTicketTitle(index) {
-				this.ticketIndex = index
-				this.ticketTitleIndex = index
-				this.getTicketDetail(this.ticketList[index].boxId)
-				this.setNum(index)
-			},
-
-			setNum(index) {
-				let num = Math.round(100 / this.list.length)
-				if (index == 0) {
-					this.percentage = uni.$u.range(0, 100, num)
-				} else if (index == this.list.length - 1) {
-					this.percentage = uni.$u.range(0, 100, 100)
-				} else {
-					this.percentage = uni.$u.range(0, 100, num * (index + 1))
-				}
-			},
-
-			// 投诉建议
-			contactService() {
-				// #ifdef MP-WEIXIN
-				if (appId == 1) {
-					// wx.openCustomerServiceChat({
-					// 	extInfo: {
-					// 		url: 'https://work.weixin.qq.com/kfid/kfc36c0d90028adbd24'
-					// 	},
-					// 	corpId: 'ww02da63d80c66284b',
-					// })
-					uni.navigateTo({
-						url: `/pages/index/wxofficial`
-					})
-				} else {
-					wx.openCustomerServiceChat({
-						extInfo: {
-							url: 'https://work.weixin.qq.com/kfid/kfcf9da505d4dc18c87'
-						},
-						corpId: 'ww8522e336cfe5045b',
-					})
-				}
-				// #endif
-			},
-
-			// 活动
-			getActivityList() {
-				$http.post(`/api/v1/mp/user/marketing/recent`, {}).then(res => {
-					if (res && res.data) {
-						let data = res && res.data
-						let timestamp = parseInt(new Date().getTime())
-						this.activityTime = data.endTime - timestamp
-					}
-				})
-			},
-
-			// 获取盲票列表
-			getList() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				let data = {
-					categoryId: '',
-					tagId: '',
-					type: 'online',
-					noToken: true
-				}
-				$http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
-					res => {
-						uni.hideLoading();
-						if (res.code == 0) {
-							res.rows.forEach(item => item.picUrl = item.picUrl.split(',').map(item => env.filePublic +
-								item + '?imageView2/2/w/750'))
-							this.ticketList = res.rows
-							this.getTicketDetail(this.ticketList[0].boxId)
-						}
-					}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			// 获取弹幕列表
-			getPrizeNews() {
-				$http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
-					const {
-						listOne,
-						listTwo
-					} = res && res.data
-					listOne.forEach(item => {
-						item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
-							'70/EJ305PQR2IBE45O9AFAI'
-						item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
-							.substring(0, 15) + '...' : item.prizeInfo
-					})
-
-					listTwo.forEach(item => {
-						item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
-							'70/EJ305PQR2IBE45O9AFAI'
-						item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
-							.substring(0, 15) + '...' : item.prizeInfo
-					})
-					this.prizeNewsListOne = listOne
-					this.prizeNewsListTwo = listTwo
-				})
-			},
-
-			// 获取当前盲票的详情
-			getTicketDetail(id) {
-				this.prizeList = []
-				$http.post('/api/v1/mp/user/mall/ticket/detail', {
-					boxId: id,
-					noToken: true
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.ticketInfo = {
-							...res.data,
-							ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
-								return {
-									...item,
-									picUrl: env.filePublic + item.picUrl
-								}
-							})
-						}
-						this.payInfo = this.ticketList[this.ticketIndex]
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			// 立即开刮
-			payment() {
-				this.payInfo = this.ticketList[this.ticketIndex]
-				if (this.payInfo) {
-					let data = {
-						userCouponIds: [],
-						autoCoupon: 1,
-						boxId: this.payInfo.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.payInfo,
-								picUrl: this.payInfo.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
-						}
-					}).catch(() => {
-						uni.$u.toast('开刮失败,请重试!');
-					})
-				} else {
-					uni.$u.toast('盲票正在准备中');
-				}
-
-			},
-
-			// 关闭支付弹框
-			close() {
-				this.payShow = false
-			},
-
-			changeList() {
-				let data = {
-					categoryId: '',
-					tagId: '',
-					type: 'online',
-					noToken: true
-				}
-				$http.post(`/api/v1/mp/user/mall/ticket/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
-					res => {
-						const boxIdStr = this.ticketList.map(item => item.boxId).join()
-						let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
-						if (boxIdStr != boxIdStrNew) {
-							this.currentIndex = 0
-							this.getList()
-						}
-					})
-			},
-
-			// 盲票向左箭头
-			ticketLeft() {
-				if ((this.ticketIndex >= 0) && (this.ticketIndex < (this.ticketList.length - 1))) {
-					this.ticketIndex++
-				} else if (this.ticketIndex == (this.ticketList.length - 1)) {
-					this.ticketIndex = 0
-				}
-				this.ticketTitleIndex = this.ticketIndex
-				this.getTicketDetail(this.ticketList[this.ticketTitleIndex].boxId)
-			},
-
-			// 盲票向右箭头
-			ticketRight() {
-				if (this.ticketIndex > 0) {
-					this.ticketIndex--
-				} else if (this.ticketIndex == 0) {
-					this.ticketIndex = this.ticketList.length - 1
-				}
-				this.ticketTitleIndex = this.ticketIndex
-				this.getTicketDetail(this.ticketList[this.ticketTitleIndex].boxId)
-			},
-
-			toRollingGame() {
-				if (!uni.getStorageSync('token')) {
-					uni.navigateTo({
-						url: '/pages/login/index'
-					})
-					return
-				}
-				if (this.ticketInfo && this.ticketInfo.boxId) {
-					uni.navigateTo({
-						url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&isTry=1`
-					})
-				} else {
-					uni.$u.toast('盲票正在准备中');
-				}
-
-			},
-
-			// 线上立即刮票成功,跳转到刮奖过程
-			toProcess(id) {
-				this.payShow = false
-				uni.navigateTo({
-					url: `/packagePrize/rolling/index?boxId=${ this.ticketInfo.boxId }&orderId=${ id }&isTry=0`
-				})
-			},
-
-			// 点击盲票,跳转盲票详情
-			toTicketBox(item) {
-				uni.navigateTo({
-					url: `/pages/ticketBox/detail?boxId=${ item.boxId }`
-				})
-			},
-
-			// 点击奖品,跳转到奖品详情
-			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`
-					})
-				}
-			},
-
-			toActivity() {
-				uni.switchTab({
-					url: '/pages/activity/index'
-				})
-			},
-
-			// 点击所有盲票
-			toTicket() {
-				uni.navigateTo({
-					url: '/packageGoods/ticket/index'
-				})
-			},
-
-			// 点击仓库
-			toPrize() {
-				if (!this.loginState) {
-					uni.navigateTo({
-						url: "/pages/login/index"
-					})
-					return
-				}
-				uni.navigateTo({
-					url: '/packagePrize/prize/index'
-				})
-			},
-
-			// 点击规则说明
-			toRule() {
-				uni.navigateTo({
-					url: '/packageOther/rule/index'
-				})
-			},
-
-			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/index/index'
-			}
-		},
-		//分享朋友圈
-		onShareTimeline() {
-			return {
-				title: '盲票,玩的就是有趣',
-				// query: { userId: this.userInfo.userId,
-				// 		type: 1, },
-				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.status_bar {
-		width: 100%;
-		height: var(--status-bar-height);
-	}
-
-	::v-deep .u-tabbar__placeholder {
-		display: none;
-	}
-</style>
-
-<style lang="scss" scoped>
-	.box {
-		position: relative;
-		width: 100%;
-		height: calc(100vh - 50px);
-		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/front_bk.png) center center no-repeat;
-		background-size: 100vw calc(100vh - 50px);
-
-		.index {
-			position: absolute;
-			width: 100%;
-		}
-	}
-
-	// 中奖信息
-	.barrage {
-		position: relative;
-		width: 518rpx;
-		height: 70rpx;
-
-		border-radius: 42rpx;
-		margin-bottom: 16rpx;
-		margin-left: 34rpx;
-
-		&-bg {
-			position: absolute;
-			width: 518rpx;
-			height: 70rpx;
-		}
-
-		&-swiper {
-			position: absolute;
-			z-index: 10;
-			width: 100%;
-			height: 100%;
-			border-radius: 42rpx;
-			overflow: hidden;
-
-			&-item {
-				width: 100%;
-				height: 100%;
-
-				&-content {
-					display: flex;
-					align-items: center;
-					width: 510rpx;
-					height: 70rpx;
-
-					image {
-						width: 58rpx;
-						height: 58rpx;
-						border-radius: 50%;
-						margin-right: 14rpx;
-						border: 1px solid #fff;
-						margin-left: 8rpx;
-					}
-
-					.title {
-						flex: 1;
-						font-size: 26rpx;
-						font-weight: 500;
-						color: #fff;
-					}
-				}
-			}
-		}
-
-		&-none {
-			position: absolute;
-			width: 518rpx;
-			height: 70rpx;
-			z-index: 20;
-		}
-	}
-
-	// 查看规则
-	.rule {
-		display: flex;
-		align-items: center;
-		justify-content: flex-end;
-		height: 34rpx;
-		padding-right: 34rpx;
-		margin-bottom: 24rpx;
-
-		&-content {
-			image {
-				width: 34rpx;
-				height: 34rpx;
-				margin-right: 14rpx;
-			}
-
-			text {
-				font-size: 40rpx;
-				font-family: 'YouSheBiaoTiHei';
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-	}
-
-	// 盲票
-	.ticket {
-		height: 36vh;
-		position: relative;
-
-		&-swiper {
-			height: 100%;
-
-			&-item {
-				position: relative;
-				height: 100%;
-
-				&-box {
-					position: absolute;
-					bottom: 0;
-					width: 75vw;
-					height: 75%;
-				}
-
-				&-prize {
-					position: absolute;
-					top: 0;
-					width: 85vw;
-					height: 75%;
-					animation: movePrize 2s linear infinite;
-				}
-			}
-		}
-
-		&-left {
-			width: 100rpx;
-			height: 100rpx;
-			position: absolute;
-			top: 45%;
-			left: 0;
-			display: table-cell;
-			vertical-align: middle;
-
-			image {
-				display: block;
-				margin: 25rpx auto;
-				width: 45rpx;
-				height: 40rpx;
-			}
-		}
-
-		&-right {
-			width: 100rpx;
-			height: 100rpx;
-			position: absolute;
-			top: 45%;
-			right: 0;
-			display: table-cell;
-			vertical-align: middle;
-
-			image {
-				display: block;
-				margin: 25rpx auto;
-				width: 45rpx;
-				height: 40rpx;
-				transform: rotate(180deg);
-			}
-		}
-	}
-
-	// 投诉建议
-	.proposal {
-		position: relative;
-		height: 66rpx;
-		margin-bottom: 30rpx;
-
-		&-time {
-			position: absolute;
-			left: 30rpx;
-			bottom: 0;
-			flex-direction: column;
-			align-items: flex-start;
-
-			image {
-				width: 140rpx;
-				height: 78rpx;
-				margin-bottom: 12rpx;
-				animation: scaleTime 3s linear infinite;
-			}
-
-			.time {
-				animation: moveTime 0.5s linear infinite;
-
-				::v-deep .u-count-down__text {
-					line-height: 30rpx;
-					font-size: 30rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-		}
-
-		&-progress {
-			position: absolute;
-			bottom: 0;
-			width: 140rpx;
-		}
-
-		&-tip {
-			display: flex;
-			align-items: center;
-			position: absolute;
-			right: 0;
-			bottom: 0;
-			width: 212rpx;
-			height: 66rpx;
-
-			image {
-				position: absolute;
-				right: 0;
-				bottom: 0;
-				width: 212rpx;
-				height: 66rpx;
-			}
-
-			text {
-				position: absolute;
-				right: 16rpx;
-				font-size: 40rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-	}
-
-	// 中奖概率
-	.chance {
-		justify-content: flex-start;
-		height: 44rpx;
-		margin: 0 34rpx 26rpx;
-		background-color: rgba(000, 000, 000, .36);
-		border-radius: 22rpx;
-		color: #FFFFFF;
-		font-family: YouSheBiaoTiHei;
-		font-size: 14px;
-
-		&-title {
-			margin-left: 8rpx;
-		}
-
-		&-hitRate {
-			flex: 1;
-			justify-content: space-evenly;
-
-			&-content {
-
-				image {
-					width: 56rpx;
-					height: 50rpx;
-				}
-			}
-		}
-	}
-
-	// 盲票名称轮播
-	.ticket-title {
-		height: 66rpx;
-		padding: 0 34rpx;
-
-		&-swiper {
-			width: calc(100vw - 34px);
-			height: 100%;
-
-			&-item {
-				height: 100%;
-				background: rgba(255, 255, 255, .16);
-				margin: 0 17rpx;
-				color: #fff;
-				font-size: 34rpx;
-			}
-
-			.action {
-				background: #FFAE00;
-				box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
-			}
-		}
-	}
-
-	// 刮开盲票
-	.ticket-btn {
-		justify-content: space-between;
-		height: 20vh;
-		padding: 0 30rpx;
-
-		&-left {
-			flex-direction: column;
-
-			image {
-				width: 142rpx;
-				height: 142rpx;
-				margin-bottom: 16rpx;
-			}
-
-			&__title {
-				line-height: 30rpx;
-				font-size: 30rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-
-		&-center {
-			position: relative;
-			flex-direction: column;
-			height: 100%;
-
-			.image-wrap {
-				position: absolute;
-				width: 310rpx;
-				height: 90%;
-				border-radius: 50%;
-				overflow: hidden;
-				box-shadow: 2px 2px 10px rgba(255, 189, 24, .8), -2px -2px 10px rgba(255, 189, 24, .8), 2px -2px 10px rgba(255, 189, 24, .8), -2px 2px 10px rgba(255, 189, 24, .8);
-
-				.btn {
-					width: 310rpx;
-					height: 100%;
-				}
-
-				.shadow {
-					position: absolute;
-					width: 310rpx;
-					height: 130%;
-					left: 0;
-					animation: shadowMove 1.5s linear infinite;
-				}
-			}
-
-			&-wrap {
-				width: 300rpx;
-				position: absolute;
-				animation: scaleBtn 1.5s linear infinite;
-
-				&__title {
-					width: 300rpx;
-					text-align: center;
-					font-size: 84rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-					line-height: 72rpx;
-					animation: shadowBtn 1.5s linear infinite;
-				}
-			}
-		}
-
-		&-right {
-			flex-direction: column;
-
-			image {
-				width: 142rpx;
-				height: 142rpx;
-				margin-bottom: 16rpx;
-			}
-
-			&__title {
-				line-height: 30rpx;
-				font-size: 30rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-	}
-
-	// 盲票价格
-	.ticket-price {
-		height: 44rpx;
-
-		&-checkbox {
-			width: 44rpx;
-			height: 44rpx;
-			background-color: #fff;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 20rpx;
-
-			image {
-				width: 44rpx;
-				height: 44rpx;
-			}
-		}
-
-		&-amt {
-			height: 44rpx;
-			font-family: YouSheBiaoTiHei;
-			font-weight: 400;
-			align-items: flex-end;
-			color: #FFFFFF;
-			margin-right: 20rpx;
-
-			.num {
-				font-size: 56rpx;
-				line-height: 40rpx;
-			}
-
-			.txt {
-				line-height: 36rpx;
-				font-size: 40rpx;
-			}
-		}
-
-		&-discount {
-			height: 44rpx;
-			align-items: flex-end;
-
-			.num {
-				line-height: 26rpx;
-				font-size: 26rpx;
-				text-decoration: line-through;
-				font-style: italic;
-				color: #FFFEFE;
-			}
-		}
-	}
-
-	// 奖品移动动画
-	@keyframes movePrize {
-		0% {
-			transform: translate(0, 10px)
-		}
-
-		25% {
-			transform: translate(0, 5px)
-		}
-
-		50% {
-			transform: translate(0, 0px)
-		}
-
-		75% {
-			transform: translate(0, 5px)
-		}
-
-		100% {
-			transform: translate(0, 10px)
-		}
-	}
-
-	// 倒计时移动动画
-	@keyframes moveTime {
-		0% {
-			transform: translate(2px, 0)
-		}
-
-		25% {
-			transform: translate(0, 0)
-		}
-
-		50% {
-			transform: translate(1px, 0)
-		}
-
-		75% {
-			transform: translate(0, 0)
-		}
-
-		100% {
-			transform: translate(2px, 0)
-		}
-	}
-
-	// 放大缩小动画
-	@keyframes scaleTime {
-		0% {
-			transform: scale(1.05)
-		}
-
-		25% {
-			transform: scale(1.02)
-		}
-
-		50% {
-			transform: scale(0.9)
-		}
-
-		75% {
-			transform: scale(1.02)
-		}
-
-		100% {
-			transform: scale(1.05)
-		}
-	}
-
-	// 刮开刮票呼吸动画
-	@keyframes scaleBtn {
-		0% {
-			transform: scale(1.04)
-		}
-
-		25% {
-			transform: scale(1.02)
-		}
-
-		50% {
-			transform: scale(1)
-		}
-
-		75% {
-			transform: scale(1.02)
-		}
-
-		100% {
-			transform: scale(1.04)
-		}
-	}
-
-	// 刮开刮票阴影动画
-	@keyframes shadowBtn {
-		0% {
-			text-shadow: 2px -2px 3px #fff;
-		}
-
-		25% {
-			text-shadow: none;
-		}
-
-		50% {
-			text-shadow: none;
-		}
-
-		75% {
-			text-shadow: none;
-		}
-
-		100% {
-			text-shadow: 2px -2px 3px #fff;
-		}
-	}
-
-	// 刮开盲票光影移动动画
-	@keyframes shadowMove {
-		0% {
-			left: -100%;
-		}
-
-		100% {
-			left: 110%;
-		}
-	}
-</style>

+ 638 - 1206
src/pages/index/index.vue

@@ -1,1209 +1,641 @@
-<template>
-	<view>
-		<view class="box">
-			<view class="index" :style="{ top: statusHeight + 'px' }">
-				<view class="barrage">
-					<!-- 背景 -->
-					<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">
-							<view class="barrage-swiper-item flex">
-								<view class="barrage-swiper-item-content flex">
-									<image :src="item.avatar" mode="scaleToFill" />
-									<view class="title ells-one">{{ item.nickName }}
-										{{ item.type == 1 ? '获得了' : '兑换了' }} {{ item.prizeInfo }}
-									</view>
-								</view>
-							</view>
-						</swiper-item>
-					</swiper>
-					<view class="barrage-none"></view>
-				</view>
-
-				<!-- 查看规则 -->
-				<view class="rule">
-					<!-- #ifndef MP-ALIPAY -->
-					<!-- <view class="rule-content flex" @click="contactService">
-						<image src="../../static/index/index_tip_bgTwo.png" mode="scaleToFill"></image>
-						<text>投诉建议</text>
-					</view> -->
-					<view class="rule-content flex" @click="toRule">
-						<image src="../../static/index/index_tip.png" mode="scaleToFill"></image>
-						<text>查看规则</text>
-					</view>
-					<!-- #endif -->
+<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 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-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>
-						</swiper-item>
-					</swiper>
-					<view class="ticket-left" @click="ticketRight()">
-						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
-					</view>
-					<view class="ticket-right" @click="ticketLeft()">
-						<image src="../../static/index/index_tip_left.png" mode="scaleToFill"></image>
-					</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>
+		<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-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="proposal flex">
-					<view class="proposal-time flex" v-if="activityTime && activityTime > 0" @click="toActivity">
-						<image src="../../static/index/index_time_top.png" mode="scaleToFill"></image>
-						<view class="time">
-							<u-count-down :time="activityTime" format="HH:mm:ss:SSS" autoStart millisecond>
-							</u-count-down>
-						</view>
-					</view>
-					<view v-else></view>
-					<view class="proposal-progress">
-						<u-line-progress :percentage="percentage" height="3" :showText="false"
-							inactiveColor="rgba(255, 255, 255, .36)" activeColor="#fff" />
-					</view>
-				</view>
-
-				<!-- 盲票名称轮播 -->
-				<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-item v-for="(item, index) in ticketList" :key="index">
-							<view class="ticket-title-swiper-item flex" @click="clickTicketTitle(index)"
-								:class="{ 'action': ticketTitleIndex == index }">
-								<text class="ells-one">{{ item.title }}</text>
-							</view>
-						</swiper-item>
-					</swiper>
-				</view>
-
-				<!-- 刮开盲票 -->
-				<view class="ticket-btn flex">
-					<view class="ticket-btn-left flex" @click="toRollingGame">
-						<image src="../../static/index/index_duihuandating.png" mode="scaleToFill"></image>
-						<view class="ticket-btn-left__title">兑换大厅</view>
-					</view>
-					<view class="ticket-btn-center flex" @click="payment">
-						<view class="image-wrap flex">
-							<image class="btn" src="../../static/index/index_btn.png" mode="scaleToFill"></image>
-							<image class="shadow" src="../../static/index/index_btn_shadow.png" mode="scaleToFill">
-							</image>
-						</view>
-						<view class="ticket-btn-center-wrap flex">
-							<view class="ticket-btn-center-wrap__title">购买<br />有礼</view>
-						</view>
-					</view>
-					<view class="ticket-btn-right flex" @click="toTicket">
-						<image src="../../static/index/index_btn_right.png" mode="scaleToFill"></image>
-						<view class="ticket-btn-right__title">更多商品</view>
-					</view>
-				</view>
-
-				<!-- 盲票价格 -->
-				<view class="ticket-price flex">
-					<view class="ticket-price-amt flex">
-						<view class="num">{{ $numberFormat(ticketInfo.salePrice) }}</view>
-						<view class="txt">元</view>
-					</view>
-					<view class="ticket-price-discount flex" v-if="ticketInfo.originPrice != 0">
-						<view class="num">原价¥{{ $numberFormat(ticketInfo.originPrice) }}</view>
-					</view>
-				</view>
-			</view>
-
-		</view>
-		<!-- 引导页面 -->
-		<!-- <u-modal :show="showMp" content='“盲票”已升级为“码上快购”' width='530rpx' confirmText='立即前往' @confirm='toAnotherApplet'> -->
-		</u-modal>
-		<!-- tabbar组件 -->
-		<custom-tab-bar :activeValue="'index'" />
-		<!-- 支付弹框组件 -->
-		<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 CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
-	import PayPopup from '../../components/pay-popup/pay-popup.vue'
-	export default {
-		components: {
-			CustomTabBar,
-			PayPopup,
-		},
-		data() {
-			return {
-				loginState: false, // 登录状态
-				ticketList: [], // 盲票列表
-				prizeList: [], // 奖品列表
-				prizeNewsListOne: [], // 弹幕列表
-				prizeNewsListTwo: [], // 弹幕列表
-				payShow: false, // 支付弹框显示
-				payInfo: {}, // 支付详情
-				currentIndex: 0, // 盲票选中下标
-
-				statusHeight: 20,
-				ticketIndex: 0, // 盲票选中下标
-				ticketTitleIndex: 0, // 盲票标题选中下边
-				list: [1, 2, 3, 4, 5],
-				percentage: 0,
-				checkStatus: true,
-				filterActivityList: [],
-				activityTime: null,
-				ticketInfo: {},
-				clickLoading: true,
-				userInfo: '',
-				showMp: false,
-				pageNum: 1,
-			};
-		},
-		onLoad(opthios) {
-			this.showMp = uni.getStorageSync('anotherApplet') ? true : false
-
-			uni.hideTabBar()
-			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/index/index.vue.`
-							)
-						}
-					})
-				}
-			}
-			if (opthios.type) {
-				uni.setStorageSync('shareType', opthios.type)
-			}
-			/**
-			 * 票赢天下小程序分享盲票跳转接受的参数
-			 * shareUid: 用户ID
-			 * shareType: 分享类型
-			 * */
-			if (opthios.scene) {
-				let sceneStr = decodeURIComponent(opthios.scene)
-				this.sceneArr = sceneStr.split('&')
-				uni.setStorageSync('shareUid', this.sceneArr[0])
-				if (this.sceneArr[0] === undefined || this.sceneArr[0] === 'undefined') {
-					uni.getSystemInfo({
-						success(res) {
-							log.error(
-								`基础库:${ res.SDKVersion },设备:${ res.model }-${ res.system },页面:/pages/index/index.vue,来源:票赢天下小程序分享盲票,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', this.sceneArr[1])
-			}
-			/**
-			 * 外部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/index/index.vue,来源:外部app,`
-							)
-						}
-					})
-				}
-				uni.setStorageSync('shareType', opthios.t)
-			}
-			// #ifdef MP-WEIXIN
-			const res = uni.getMenuButtonBoundingClientRect()
-			this.statusHeight = res.top //胶囊距离顶部
-			// #endif
-
-			// #ifdef MP-ALIPAY
-			uni.getSystemInfo({
-				success: (res) => {
-					this.statusHeight = res.statusBarHeight + 7
-				}
-			})
-			// #endif
-
-			let num = Math.round(100 / this.list.length)
-			this.percentage = num
-
-
-			this.getList()
-		},
-		onShow() {
-			this.loginState = uni.getStorageSync('token') ? true : false
-			if (this.loginState) {
-				this.getBaseInfo()
-			}
-			this.getPrizeNews()
-			this.getActivityList()
-		},
-		methods: {
-			toAnotherApplet() {
-				/**
-				 * envVersion 类型为字符串
-				 * envVersion: 'develop', //开发版
-				 * envVersion: 'trial', //体验版
-				 * envVersion: 'release',//正式版
-				 */
-				uni.navigateToMiniProgram({
-					appId: 'wxffb4598e70b9f871', // appid
-					path: '/pages/index/index', // 首页路径
-					envVersion: "release",
-					success: res => {
-						// 打开成功
-					},
-				})
-			},
-			// 切换盲票
-			changeTicket({
-				detail
-			}) {
-				if (this.clickLoading) {
-					this.clickLoading = false
-					this.ticketIndex = detail.current
-					this.ticketTitleIndex = detail.current
-					this.getTicketDetail(this.ticketList[detail.current].boxId)
-					this.setNum(detail.current)
-					setTimeout(() => {
-						this.clickLoading = true
-					}, 200)
-				}
-			},
-
-			// 切换盲票名称
-			changeTicketTitle({
-				detail
-			}) {
-				if (this.clickLoading) {
-					this.clickLoading = false
-					this.ticketIndex = detail.current
-					this.ticketTitleIndex = detail.current
-					this.getTicketDetail(this.ticketList[detail.current].boxId)
-					this.setNum(detail.current)
-					setTimeout(() => {
-						this.clickLoading = true
-					}, 200)
-				}
-			},
-
-			// 点击名称
-			clickTicketTitle(index) {
-				this.ticketIndex = index
-				this.ticketTitleIndex = index
-				this.getTicketDetail(this.ticketList[index].boxId)
-				this.setNum(index)
-			},
-
-			setNum(index) {
-				let num = Math.round(100 / this.list.length)
-				if (index == 0) {
-					this.percentage = uni.$u.range(0, 100, num)
-				} else if (index == this.list.length - 1) {
-					this.percentage = uni.$u.range(0, 100, 100)
-				} else {
-					this.percentage = uni.$u.range(0, 100, num * (index + 1))
-				}
-			},
-
-			// 投诉建议
-			contactService() {
-				// #ifdef MP-WEIXIN
-				if (appId == 1) {
-					uni.navigateTo({
-						url: `/pages/index/wxofficial`
-					})
-				} else {
-					wx.openCustomerServiceChat({
-						extInfo: {
-							url: 'https://work.weixin.qq.com/kfid/kfcf9da505d4dc18c87'
-						},
-						corpId: 'ww8522e336cfe5045b',
-					})
-				}
-				// #endif
-			},
-
-			// 活动
-			getActivityList() {
-				$http.post(`/api/v1/mp/user/marketing/recent`, {}).then(res => {
-					if (res && res.data) {
-						let data = res && res.data
-						let timestamp = parseInt(new Date().getTime())
-						this.activityTime = data.endTime - timestamp
-					}
-				})
-			},
-
-			// 获取盲票列表
-			getList() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				let data = {
-					type: 'online',
-					noToken: true
-				}
-				$http.post(`/api/v1/mp/user/mall/ticket/goods/list?pageNum=${this.pageNum}&pageSize=100`, data).then(
-					res => {
-						uni.hideLoading();
-						if (res.code == 0) {
-							res.rows.forEach(item => item.picUrl = item.picUrl.split(',').map(item => env.filePublic +
-								item + '?imageView2/2/w/750'))
-							this.ticketList = res.rows
-							this.getTicketDetail(this.ticketList[0].boxId)
-						}
-					}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			// 获取弹幕列表
-			getPrizeNews() {
-				$http.post('/api/v1/mp/user/ticket/hitPrizeBarrage', {}).then(res => {
-					const {
-						listOne,
-						listTwo
-					} = res && res.data
-					listOne.forEach(item => {
-						item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
-							'70/EJ305PQR2IBE45O9AFAI'
-						item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
-							.substring(0, 15) + '...' : item.prizeInfo
-					})
-
-					listTwo.forEach(item => {
-						item.avatar = item.avatar ? env.filePublic + item.avatar : env.filePublic +
-							'70/EJ305PQR2IBE45O9AFAI'
-						item.prizeInfo = item.prizeInfo && (item.prizeInfo.length > 14) ? item.prizeInfo
-							.substring(0, 15) + '...' : item.prizeInfo
-					})
-					this.prizeNewsListOne = listOne
-					this.prizeNewsListTwo = listTwo
-				})
-			},
-
-			// 获取当前盲票的详情
-			getTicketDetail(id) {
-				this.prizeList = []
-				$http.post('/api/v1/mp/user/mall/ticket/detail', {
-					boxId: id,
-					noToken: true
-				}).then(res => {
-					uni.hideLoading();
-					if (res.code == 0) {
-						this.ticketInfo = {
-							...res.data,
-							ticketAwardsLabelList: res.data.ticketAwardsLabelList.map(item => {
-								return {
-									...item,
-									picUrl: env.filePublic + item.picUrl
-								}
-							})
-						}
-						this.payInfo = this.ticketList[this.ticketIndex]
-					}
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-
-			// 立即开刮
-			payment() {
-				this.payInfo = this.ticketList[this.ticketIndex]
-				if (this.payInfo) {
-					let data = {
-						userCouponIds: [],
-						autoCoupon: 1,
-						boxId: this.payInfo.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.payInfo,
-								picUrl: this.payInfo.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
-						}
-					}).catch(() => {
-						uni.$u.toast('购买失败,请重试!');
-					})
-				} else {
-					uni.$u.toast('商品正在准备中');
-				}
-
-			},
-
-			// 关闭支付弹框
-			close() {
-				this.payShow = false
-			},
-
-			changeList() {
-				let data = {
-					type: 'online',
-					noToken: true
-				}
-				$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()
-						let boxIdStrNew = res && res.rows && res.rows.map(item => item.boxId).join()
-						if (boxIdStr != boxIdStrNew) {
-							this.currentIndex = 0
-							this.getList()
-						}
-					})
-			},
-
-			// 盲票向左箭头
-			ticketLeft() {
-				if ((this.ticketIndex >= 0) && (this.ticketIndex < (this.ticketList.length - 1))) {
-					this.ticketIndex++
-				} else if (this.ticketIndex == (this.ticketList.length - 1)) {
-					this.ticketIndex = 0
-				}
-				this.ticketTitleIndex = this.ticketIndex
-				this.getTicketDetail(this.ticketList[this.ticketTitleIndex].boxId)
-			},
-
-			// 盲票向右箭头
-			ticketRight() {
-				if (this.ticketIndex > 0) {
-					this.ticketIndex--
-				} else if (this.ticketIndex == 0) {
-					this.ticketIndex = this.ticketList.length - 1
-				}
-				this.ticketTitleIndex = this.ticketIndex
-				this.getTicketDetail(this.ticketList[this.ticketTitleIndex].boxId)
-			},
-
-			toRollingGame() {
-				uni.switchTab({
-					url: '/pages/core/index'
-				})
-			},
-
-			// 线上立即刮票成功,跳转到刮奖过程
-			toProcess(id) {
-				this.payShow = false
-				uni.navigateTo({
-					url: `/packagePrize/purchase/index?boxId=${ this.ticketInfo.boxId }&orderId=${ id }&isTry=0`
-				})
-			},
-
-			// 点击盲票,跳转关联商品详情
-			toTicketBox(item) {
-				if (item.refType && JSON.parse(item.refType).value === 'goods') {
-					uni.navigateTo({
-						url: `/packagePrize/goods/index?id=${ item.refId }&boxId=${ this.ticketInfo.boxId }`
-					})
-				} else if (item.refType && JSON.parse(item.refType).value === 'coin') {
-					uni.navigateTo({
-						url: `/packagePrize/goods/detail?id=424`
-					})
-				} else if (item.refType && JSON.parse(item.refType).value === 'coupon' || JSON.parse(item.refType)
-					.value === 'coupon_pkg') {
-					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`
-					})
-				}
-			},
-
-			toActivity() {
-				uni.switchTab({
-					url: '/pages/activity/index'
-				})
-			},
-
-			// 点击所有盲票
-			toTicket() {
-				uni.navigateTo({
-					url: '/packageGoods/ticket/index'
-				})
-			},
-
-			// 点击仓库
-			toPrize() {
-				if (!this.loginState) {
-					uni.navigateTo({
-						url: "/pages/login/index"
-					})
-					return
-				}
-				uni.navigateTo({
-					url: '/packagePrize/prize/index'
-				})
-			},
-
-			// 点击规则说明
-			toRule() {
-				uni.navigateTo({
-					url: '/packageOther/rule/purchase'
-				})
-			},
-
-			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/index/index'
-			}
-		},
-		//分享朋友圈
-		onShareTimeline() {
-			return {
-				title: '盲票,玩的就是有趣',
-				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.status_bar {
-		width: 100%;
-		height: var(--status-bar-height);
-	}
-
-	::v-deep .u-tabbar__placeholder {
-		display: none;
-	}
-</style>
-
-<style lang="scss" scoped>
-	.box {
-		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-size: 100vw calc(100vh - 50px);
-
-		.index {
-			position: absolute;
-			width: 100%;
-		}
-	}
-
-	// 中奖信息
-	.barrage {
-		position: relative;
-		width: 518rpx;
-		height: 70rpx;
-
-		border-radius: 42rpx;
-		margin-bottom: 16rpx;
-		margin-left: 34rpx;
-
-		&-bg {
-			position: absolute;
-			width: 518rpx;
-			height: 70rpx;
-		}
-
-		&-swiper {
-			position: absolute;
-			z-index: 10;
-			width: 100%;
-			height: 100%;
-			border-radius: 42rpx;
-			overflow: hidden;
-
-			&-item {
-				width: 100%;
-				height: 100%;
-
-				&-content {
-					display: flex;
-					align-items: center;
-					width: 510rpx;
-					height: 70rpx;
-
-					image {
-						width: 58rpx;
-						height: 58rpx;
-						border-radius: 50%;
-						margin-right: 14rpx;
-						border: 1px solid #fff;
-						margin-left: 8rpx;
-					}
-
-					.title {
-						flex: 1;
-						font-size: 26rpx;
-						font-weight: 500;
-						color: #fff;
-					}
-				}
-			}
-		}
-
-		&-none {
-			position: absolute;
-			width: 518rpx;
-			height: 70rpx;
-			z-index: 20;
-		}
-	}
-
-	// 查看规则
-	.rule {
-		display: flex;
-		align-items: center;
-		justify-content: flex-end;
-		height: 34rpx;
-		padding-right: 34rpx; //
-		margin-bottom: 24rpx;
-
-		&-content {
-			image {
-				width: 34rpx; // 210rpx
-				height: 34rpx; // 50rpx
-				margin-right: 14rpx; //
-			}
-
-			text {
-				// position: absolute;
-				// right: 20rpx;
-				font-size: 40rpx;
-				font-family: 'YouSheBiaoTiHei';
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-	}
-
-	// 盲票
-	.ticket {
-		height: 37vh;
-		position: relative;
-
-		&-bgc {
-			position: absolute;
-			top: 77%;
-			width: 100%;
-			text-align: center;
-
-			image {
-				margin: 0 auto;
-				height: 156rpx;
-				width: 570rpx;
-			}
-
-		}
-
-		&-swiper {
-			height: 100%;
-
-			&-item {
-				position: relative;
-				height: 100%;
-
-				&-box {
-					position: absolute;
-					// bottom: 100rpx;
-					bottom: 20%;
-					width: 380rpx;
-					height: 380rpx;
-					animation: movePrize 2s linear infinite;
-				}
-			}
-		}
-
-		&-left {
-			width: 100rpx;
-			height: 100rpx;
-			position: absolute;
-			top: 45%;
-			left: 0;
-			display: table-cell;
-			vertical-align: middle;
-
-			image {
-				display: block;
-				margin: 25rpx auto;
-				width: 45rpx;
-				height: 40rpx;
-			}
-		}
-
-		&-right {
-			width: 100rpx;
-			height: 100rpx;
-			position: absolute;
-			top: 45%;
-			right: 0;
-			display: table-cell;
-			vertical-align: middle;
-
-			image {
-				display: block;
-				margin: 25rpx auto;
-				width: 45rpx;
-				height: 40rpx;
-				transform: rotate(180deg);
-			}
-		}
-	}
-
-	// 投诉建议
-	.proposal {
-		position: relative;
-		height: 66rpx;
-		margin-bottom: 30rpx;
-
-		&-time {
-			position: absolute;
-			left: 30rpx;
-			bottom: 0;
-			flex-direction: column;
-			align-items: flex-start;
-
-			image {
-				width: 140rpx;
-				height: 78rpx;
-				margin-bottom: 12rpx;
-				animation: scaleTime 3s linear infinite;
-			}
-
-			.time {
-				animation: moveTime 0.5s linear infinite;
-
-				::v-deep .u-count-down__text {
-					line-height: 30rpx;
-					font-size: 30rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-				}
-			}
-		}
-
-		&-progress {
-			position: absolute;
-			bottom: 0;
-			width: 140rpx;
-		}
-
-		&-tip {
-			display: flex;
-			align-items: center;
-			position: absolute;
-			right: 0;
-			bottom: 0;
-			width: 212rpx;
-			height: 66rpx;
-
-			image {
-				position: absolute;
-				right: 0;
-				bottom: 0;
-				width: 212rpx;
-				height: 66rpx;
-			}
-
-			text {
-				position: absolute;
-				right: 16rpx;
-				font-size: 40rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #FFFFFF;
-			}
-		}
-	}
-
-	// 中奖概率
-	.chance {
-		justify-content: flex-start;
-		height: 44rpx;
-		margin: 0 34rpx 26rpx;
-		background-color: rgba(000, 000, 000, .36);
-		border-radius: 22rpx;
-		color: #FFFFFF;
-		font-family: YouSheBiaoTiHei;
-		font-size: 14px;
-
-		&-title {
-			margin-left: 8rpx;
-		}
-
-		&-hitRate {
-			flex: 1;
-			justify-content: space-evenly;
-
-			&-content {
-
-				image {
-					width: 56rpx;
-					height: 50rpx;
-				}
-			}
-		}
-	}
-
-	// 盲票名称轮播
-	.ticket-title {
-		height: 66rpx;
-		padding: 0 34rpx;
-		margin: 30rpx 0;
-		overflow: hidden;
-		// margin: 0 34rpx;
-
-		&-swiper {
-			width: calc(100vw - 34px);
-			height: 100%;
-
-			&-item {
-				height: 100%;
-				transform: skew(20deg);
-				background: rgba(255, 169, 0, 0.16);
-
-				margin: 0 17rpx;
-				color: #fff;
-				font-size: 34rpx;
-
-				text {
-					// padding: 0 20rpx;
-					transform: skew(-20deg);
-				}
-			}
-
-			.action {
-				background: #FFAE00;
-				box-shadow: 0px 3px 3px 0px rgba(220, 145, 107, 0.57);
-			}
-		}
-	}
-
-	// 刮开盲票
-	.ticket-btn {
-		justify-content: space-between;
-		height: 20vh;
-		padding: 0 30rpx;
-
-		&-left {
-			flex-direction: column;
-
-			image {
-				width: 142rpx;
-				height: 142rpx;
-				margin-bottom: 16rpx;
-			}
-
-			&__title {
-				line-height: 30rpx;
-				font-size: 30rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #666;
-			}
-		}
-
-		&-center {
-			position: relative;
-			flex-direction: column;
-			height: 100%;
-
-			.image-wrap {
-				position: absolute;
-				width: 310rpx;
-				height: 90%;
-				border-radius: 50%;
-				overflow: hidden;
-				box-shadow: 2px 2px 10px rgba(255, 189, 24, .8), -2px -2px 10px rgba(255, 189, 24, .8), 2px -2px 10px rgba(255, 189, 24, .8), -2px 2px 10px rgba(255, 189, 24, .8);
-
-				.btn {
-					width: 310rpx;
-					height: 100%;
-				}
-
-				.shadow {
-					position: absolute;
-					width: 310rpx;
-					height: 130%;
-					left: 0;
-					animation: shadowMove 1.5s linear infinite;
-				}
-			}
-
-			&-wrap {
-				width: 300rpx;
-				position: absolute;
-				animation: scaleBtn 1.5s linear infinite;
-
-				&__title {
-					width: 300rpx;
-					text-align: center;
-					font-size: 84rpx;
-					font-family: YouSheBiaoTiHei;
-					font-weight: 400;
-					color: #FFFFFF;
-					line-height: 72rpx;
-					animation: shadowBtn 1.5s linear infinite;
-				}
-			}
-		}
-
-		&-right {
-			flex-direction: column;
-
-			image {
-				width: 142rpx;
-				height: 142rpx;
-				margin-bottom: 16rpx;
-			}
-
-			&__title {
-				line-height: 30rpx;
-				font-size: 30rpx;
-				font-family: YouSheBiaoTiHei;
-				font-weight: 400;
-				color: #666;
-			}
-		}
-	}
-
-	// 盲票价格
-	.ticket-price {
-		height: 44rpx;
-
-		&-checkbox {
-			width: 44rpx;
-			height: 44rpx;
-			background-color: #fff;
-			border-radius: 50%;
-			overflow: hidden;
-			margin-right: 20rpx;
-
-			image {
-				width: 44rpx;
-				height: 44rpx;
-			}
-		}
-
-		&-amt {
-			height: 44rpx;
-			font-family: YouSheBiaoTiHei;
-			font-weight: 400;
-			align-items: flex-end;
-			color: #FE9E48;
-			margin-right: 20rpx;
-
-			.num {
-				font-size: 56rpx;
-				line-height: 40rpx;
-			}
-
-			.txt {
-				line-height: 36rpx;
-				font-size: 40rpx;
-			}
-		}
-
-		&-discount {
-			height: 44rpx;
-			align-items: flex-end;
-
-			.num {
-				line-height: 26rpx;
-				font-size: 26rpx;
-				text-decoration: line-through;
-				font-style: italic;
-				color: #FFAE00;
-			}
-		}
-	}
-
-	// 奖品移动动画
-	@keyframes movePrize {
-		0% {
-			transform: translate(0, 10px)
-		}
-
-		25% {
-			transform: translate(0, 5px)
-		}
-
-		50% {
-			transform: translate(0, 0px)
-		}
-
-		75% {
-			transform: translate(0, 5px)
-		}
-
-		100% {
-			transform: translate(0, 10px)
-		}
-	}
-
-	// 倒计时移动动画
-	@keyframes moveTime {
-		0% {
-			transform: translate(2px, 0)
-		}
-
-		25% {
-			transform: translate(0, 0)
-		}
-
-		50% {
-			transform: translate(1px, 0)
-		}
-
-		75% {
-			transform: translate(0, 0)
-		}
-
-		100% {
-			transform: translate(2px, 0)
-		}
-	}
-
-	// 放大缩小动画
-	@keyframes scaleTime {
-		0% {
-			transform: scale(1.05)
-		}
-
-		25% {
-			transform: scale(1.02)
-		}
-
-		50% {
-			transform: scale(0.9)
-		}
-
-		75% {
-			transform: scale(1.02)
-		}
-
-		100% {
-			transform: scale(1.05)
-		}
-	}
-
-	// 刮开刮票呼吸动画
-	@keyframes scaleBtn {
-		0% {
-			transform: scale(1.04)
-		}
-
-		25% {
-			transform: scale(1.02)
-		}
-
-		50% {
-			transform: scale(1)
-		}
-
-		75% {
-			transform: scale(1.02)
-		}
-
-		100% {
-			transform: scale(1.04)
-		}
-	}
-
-	// 刮开刮票阴影动画
-	@keyframes shadowBtn {
-		0% {
-			text-shadow: 2px -2px 3px #fff;
-		}
-
-		25% {
-			text-shadow: none;
-		}
-
-		50% {
-			text-shadow: none;
-		}
-
-		75% {
-			text-shadow: none;
-		}
-
-		100% {
-			text-shadow: 2px -2px 3px #fff;
-		}
-	}
-
-	// 刮开盲票光影移动动画
-	@keyframes shadowMove {
-		0% {
-			left: -100%;
-		}
-
-		100% {
-			left: 110%;
-		}
-	}
+				<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="'index'" />
+	</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: [],
+				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/index/index.vue.`
+							)
+						}
+					})
+				}
+
+			}
+			if (opthios.type) {
+				uni.setStorageSync('shareType', opthios.type)
+			}
+			this.pageList()
+			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
+				})
+			},
+
+			// 商品列表
+			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;
+		}
+	}
+
+	// 轮播
+	.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-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>

+ 26 - 32
src/pages/login/code.vue

@@ -1,20 +1,15 @@
 <template>
 	<view class="container">
-		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" leftIconSize="0" />
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true" />
-		<!-- #endif -->
-		<view class="container">
+		<u-navbar title="手机验证码登录" :border="true" :placeholder="true" :autoBack="true"/>
+		<view>
 			<view class="login">
 				<view class="login-title">验证码登录</view>
 				<view class="login-input pat">
-					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="none" clearable
+					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="bottom" clearable
 						@blur="changeNumber" />
 				</view>
-				<view class="login-input">
-					<u-input placeholder="请输入短信验证码" type="number" v-model="code" clearable @blur="changeCode">
+				<view class="login-input code">
+					<u-input placeholder="请输入短信验证码" type="number" border="bottom" v-model="code" clearable @blur="changeCode">
 						<template slot="suffix">
 							<u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
 							<u-button @click="getCode" :text="tips" type="default" size="mini"></u-button>
@@ -46,6 +41,11 @@
 				authShow: false,
 			};
 		},
+		onLoad(options) {
+			if (options.mobile) {
+				this.mobile = options.mobile
+			}
+		},
 		methods: {
 			codeChange(text) {
 				this.tips = text;
@@ -121,7 +121,7 @@
 						uni.setStorageSync('token', res.token)
 						setTimeout(() => {
 							uni.navigateBack({
-								delta: 2
+								delta: 3
 							})
 						}, 500)
 						// #endif
@@ -141,7 +141,7 @@
 							uni.$u.toast('登录成功');
 							setTimeout(() => {
 								uni.navigateBack({
-									delta: 2
+									delta: 3
 								})
 							}, 500)
 						} else {
@@ -153,7 +153,7 @@
 							uni.$u.toast('登录成功');
 							setTimeout(() => {
 								uni.navigateBack({
-									delta: 2
+									delta: 3
 								})
 							}, 500)
 						} else {
@@ -170,7 +170,7 @@
 				this.authShow = false
 				setTimeout(() => {
 					uni.navigateBack({
-						delta: 2
+						delta: 3
 					})
 				}, 500)
 			},
@@ -178,6 +178,7 @@
 	}
 </script>
 
+
 <style lang="scss" scoped>
 	.container {
 		height: 100vh;
@@ -186,11 +187,13 @@
 	}
 
 	.login {
-		padding: 70rpx 70rpx 0;
+		padding: 70rpx 30rpx 0;
 
 		&-title {
-			font-size: 56rpx;
+			text-align: center;
+			font-size: 32rpx;
 			color: #333;
+			font-weight: bold;
 			line-height: 80rpx;
 			margin-bottom: 60rpx;
 		}
@@ -199,22 +202,6 @@
 			display: flex;
 			align-items: center;
 			margin-bottom: 50rpx;
-			height: 80rpx;
-			background-color: #EDEDED !important;
-			border-radius: 100rpx;
-			padding: 10rpx 48rpx;
-
-			::v-deep .u-input__content__field-wrapper__field {
-				background: none;
-			}
-
-			::v-deep .u-border {
-				border: none;
-			}
-		}
-
-		.pat {
-			padding: 10rpx 66rpx;
 		}
 
 		::v-deep .u-button {
@@ -228,4 +215,11 @@
 			background-color: none;
 		}
 	}
+	.code {
+		::v-deep .u-button {
+			border: 2rpx solid #367481;
+			color: #367481;
+			background: none;
+		}
+	}
 </style>

+ 28 - 20
src/pages/login/index.vue

@@ -1,38 +1,26 @@
 <template>
 	<view class="container">
-		<!-- #ifdef MP-ALIPAY -->
-		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录" leftIconSize="0"></u-navbar>
-		<!-- #endif -->
-
-		<!-- #ifndef MP-ALIPAY -->
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
-		<!-- #endif -->
 
 		<view class="flex login">
 			<view class="flex login-image">
 				<image src="../../static/public/logo.png" mode="scaleToFill"></image>
-				<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 class="login-image-txt">卅商城</view>
 			</view>
-			<!-- #endif -->
-			<!-- #ifndef MP-ALIPAY -->
 			<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>
+			<!-- <view class="flex login-code" @click="toCode">手机号登录/注册</view> -->
+			<view class="flex login-code" @click="toPassword">手机号登录/注册</view>
+			<view class="flex login-code" @click="toPassword1">注册会员</view>
 		</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="#367481"
 							@change="changeChecked"></u-checkbox>
 					</u-checkbox-group>
 				</view>
@@ -172,6 +160,21 @@
 					url: '/pages/login/code'
 				})
 			},
+			toPassword() {
+				if (!this.checked) {
+					uni.$u.toast('请阅读并勾选底部协议');
+					return
+				}
+				uni.navigateTo({
+					url: '/pages/login/password'
+				})
+			},
+			
+			toPassword1() {
+				uni.navigateTo({
+					url: '/pages/login/invitation'
+				})
+			},
 
 			getBaseInfo() {
 				$http.post('/api/v1/mp/user/getLoginUserinfo', { appSource: appId }).then(res => {
@@ -244,6 +247,11 @@
 	}
 </script>
 
+<style lang="scss" scoped>
+	::v-deep .u-navbar__content__title.u-navbar__content__title {
+		color: #FFFFFF;
+	}
+</style>
 <style lang="scss" scoped>
 	.container {
 		height: 100vh;
@@ -295,8 +303,8 @@
 				height: 80rpx;
 				line-height: 80rpx;
 				border-radius: 40rpx;
-				background-color: rgba(235, 112, 9, 100);
-				color: rgba(255, 255, 255, 100);
+				background-color: #367481;
+				color: rgba(255, 255, 255, 1);
 				text-align: center;
 				font-size: 28rpx;
 			}
@@ -304,7 +312,7 @@
 
 		&-code {
 			text-align: center;
-			color: rgba(242, 113, 32, 100);
+			color: #367481;
 		}
 	}
 

+ 256 - 0
src/pages/login/invitation.vue

@@ -0,0 +1,256 @@
+<template>
+	<view class="container">
+		<!-- <u-navbar title="注册" leftIconSize="0" :border="true" :placeholder="true"
+			leftIconColor="#fff" bgColor="#fff" /> -->
+		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="注册"></u-navbar>
+		<view>
+			<view class="login">
+				<view class="login-title" v-if="type == 'promoter'">注册成为卅商城会员</view>
+				<view class="login-title" v-else>注册成为卅商城县(区)代理</view>
+				<view class="login-input pat">
+					<u-input placeholder="请输入姓名"  v-model="name" border="bottom" clearable/>
+				</view>
+				<view class="login-input pat">
+					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="bottom" clearable/>
+				</view>
+				<view class="login-input code">
+					<u-input placeholder="请输入短信验证码" type="number" v-model="code" border="bottom" style="padding: 0;">
+						<template slot="suffix">
+							<u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
+							<u-button @tap="getCode" :text="tips" type="default" size="mini"></u-button>
+						</template>
+					</u-input>
+				</view>
+				<view class="login-input pat" @click="selectArea()">
+					<u-input placeholder="请选择地区" v-model="cityShow" border="bottom" clearable suffixIcon="arrow-down" suffixIconStyle="color: #909399"/>
+				</view>
+				<u-button @click="login" text="下一步" shape="circle" :loading="loading"></u-button>
+			</view>
+		</view>
+		
+		<area-picker :area-show="areaShow" @cancel="cancel" @confirmArea="confirmArea" />
+		<auth :auth-show="authShow" :auth-token="token" :auth-mobile="mobile" @close="authClose" />
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
+	import AreaPicker from '../../components/area-picker/area-picker.vue'
+	export default {
+		components: {
+			Auth,
+			AreaPicker
+		},
+		data() {
+			return {
+				workNo: '', //
+				name: '', //
+				mobile: '',
+				codeId: '',
+				code: '',
+				loading: false,
+				tips: '',
+				
+				areaShow: false,
+
+				channelId: '',
+				authShow: false,
+				token: null,
+
+				commRate: '', //推广员佣金比例
+				storesName: '', //门店名称
+				type: '',
+			};
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.channelId = options.id
+			}
+			if (options.mobile) {
+				this.mobile = options.mobile
+			}
+			if (options.type) {
+				this.type = options.type
+			}
+			if (options.commRate) {
+				this.commRate = options.commRate
+				this.getStoresName()
+			}
+		},
+		methods: {
+			//获取门店名称
+			getStoresName() {
+				$http.post(`/api/v1/mp/channel/saleSite/info/${this.channelId}`, {}).then(res => {
+					if (res.code === 0) {
+						this.storesName = res.data
+					}
+				})
+			},
+			codeChange(text) {
+				this.tips = text;
+			},
+			getCode() {
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号!');
+					return
+				}
+				if (this.$refs.uCode.canGetCode) {
+					// 模拟向后端请求验证码
+					uni.showLoading({
+						title: '正在获取验证码'
+					})
+					// 这里此提示会被this.start()方法中的提示覆盖
+					uni.$u.toast('验证码已发送');
+					// 通知验证码组件内部开始倒计时
+					this.$refs.uCode.start();
+					$http.post('/api/v1/mp/sms/sendSmsCode', {
+						mobile: this.mobile,
+						noToken: true
+					}).then(res => {
+						if (res.code === 0 && res.data) {
+							this.codeId = res.data
+						}
+					})
+				} else {
+					uni.$u.toast('倒计时结束后再发送');
+				}
+			},
+
+			login() {
+				let _this = this
+				if (!this.name && this.type == 'promoter') {
+					uni.$u.toast('请输入姓名');
+					return
+				}
+				if (!this.workNo && this.type == 'promoter') {
+					uni.$u.toast('请输入工号');
+					return
+				}
+				if (!this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号');
+					return
+				}
+				if (!this.code) {
+					uni.$u.toast('请输入验证码');
+					return
+				}
+				this.loading = true
+
+				let data = {
+					channelId: this.channelId, // 所属渠道/门店
+					mobile: this.mobile, //手机号
+					messageId: this.codeId, //短信id
+					code: this.code, //验证码
+					noToken: true
+				}
+				if (this.type == 'promoter') {
+					data = {
+						...data,
+						commRate: this.commRate, //佣金比例
+						workNo: this.workNo, //工号
+						name: this.name, //名字
+					}
+				} else {
+					data = {
+						...data,
+						type: 'salesite',
+					}
+				}
+				let url = this.type == 'promoter' ? '/api/v1/mp/channel/promoter/register' :
+					'/api/v1/mp/channel/invite/register'
+				$http.post(url, data).then(res => {
+					this.loading = false
+					if (res.code === 0) {
+						// #ifdef MP-WEIXIN
+						uni.setStorageSync('token', res.token)
+						uni.setStorageSync('identity', res.channelRole)
+						this.authShow = true
+						// #endif
+						// #ifdef H5
+						uni.$u.toast('注册成功');
+						uni.setStorageSync('token', res.token)
+						uni.setStorageSync('identity', res.channelRole)
+						setTimeout(() => {
+							uni.switchTab({
+								url: "/pages/index/index"
+							})
+						}, 200)
+						// #endif
+					}
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+			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
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		height: 100vh;
+		width: 100%;
+	}
+	.login {
+		padding: 70rpx 30rpx 0;
+
+		&-title {
+			text-align: center;
+			font-size: 32rpx;
+			color: #333;
+			font-weight: bold;
+			line-height: 80rpx;
+			margin-bottom: 60rpx;
+		}
+
+		&-name {
+			// font-size: 42rpx;
+			color: #333;
+			text-align: center;
+			// line-height: 80rpx;
+			margin-bottom: 40rpx;
+		}
+
+		&-input {
+			display: flex;
+			align-items: center;
+			margin-bottom: 50rpx;
+		}
+		
+		::v-deep .u-button {
+			width: 100%;
+			background-color: $uni-bg-color;
+			color: #fff;
+			border-radius: 32px;
+		}
+	}
+	.code {
+		::v-deep .u-button {
+			border: 2rpx solid #367481;
+			color: #367481;
+			background: none;
+		}
+	}
+</style>

+ 161 - 0
src/pages/login/password.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="container">
+		<u-navbar title="登录" :border="true" :placeholder="true" :autoBack="true" />
+		<view class="container">
+			<view class="login">
+				<view class="login-title">账号密码登录</view>
+				<view class="login-input">
+					<u-input placeholder="请输入手机号" type="number" v-model="mobile" border="bottom" shape="square" clearable></u-input>
+				</view>
+				<view class="login-input">
+					<u-input type="password" placeholder="请输入密码" v-model="password" border="bottom" shape="square"
+						clearable></u-input>
+				</view>
+				<u-button @click="login" text="登录" shape="circle" :loading="loading"></u-button>
+				<view class="flex tip">
+					<text class="tip-code-login" @click="switchToCode">验证码登录</text>
+					<text class="tip-forget" @click="switchToCode">忘记密码</text>
+				</view>
+			</view>
+		</view>
+		<auth :auth-show="authShow" :auth-token="token" :auth-mobile="mobile" @close="authClose" />
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	import Auth from '../../components/auth/auth.vue'
+	export default {
+		components: {
+			Auth
+		},
+		data() {
+			return {
+				loading: false,
+				mobile: '',
+				password: '',
+				authShow: false,
+				token: null
+			};
+		},
+		methods: {
+			login() {
+				let _this = this
+				if (!this.mobile) {
+					uni.$u.toast('请输入手机号');
+					return
+				}
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号!');
+					return
+				}
+				if (!this.password) {
+					uni.$u.toast('请输入密码');
+					return
+				}
+				this.loading = true
+				$http.post('/wxlogin', {
+					username: _this.mobile,
+					password: _this.password,
+					identity: 2,
+					noToken: true
+				}).then(res => {
+					this.loading = false
+					if (res.code === 0 && res.token) {
+						uni.setStorageSync('token', res.token)
+						uni.setStorageSync('identity', res.channelRole)
+						this.authShow = true
+					}
+				}).catch(() => {
+					this.loading = false
+				})
+			},
+
+			switchToCode() {
+				let mobile = ''
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (rule.test(this.mobile)) {
+					mobile = this.mobile
+				}
+				uni.navigateTo({
+					url: '/pages/login/code?mobile=' + mobile
+				})
+			},
+			
+			getBaseInfo() {
+				$http.post('/api/v1/mp/user/getLoginUserinfo', {
+					username: this.mobile
+				}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						uni.setStorageSync('userInfo', res.data)
+						if (res.data.channelOpenId) {
+							uni.$u.toast('登录成功');
+							setTimeout(() => {
+								uni.navigateBack({
+									delta: 2
+								})
+							}, 500)
+						} else {
+							this.authShow = true
+						}
+					}
+				}).catch(() => {
+					uni.hideLoading();
+				})
+			},
+			
+			authClose() {
+				this.authShow = false
+				setTimeout(() => {
+					uni.navigateBack({
+						delta: 2
+					})
+				}, 500)
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		height: 100vh;
+		width: 100%;
+		overflow: hidden;
+	}
+	
+	.login {
+		padding: 70rpx 30rpx 0;
+
+		&-title {
+			text-align: center;
+			font-size: 32rpx;
+			color: #333;
+			font-weight: bold;
+			margin-bottom: 60rpx;
+		}
+
+		&-input {
+			display: flex;
+			align-items: center;
+			margin-bottom: 50rpx;
+		}
+
+		::v-deep .u-button {
+			width: 100%;
+			background-color: $uni-bg-color;
+			color: #fff;
+			border-radius: 32px;
+		}
+
+		.tip {
+			padding-top: 40rpx;
+			justify-content: space-between;
+
+			&-code-login {
+				color: $uni-text-color;
+			}
+		}
+	}
+</style>

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

@@ -1,590 +0,0 @@
-<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>

+ 181 - 0
src/pages/reset/index.vue

@@ -0,0 +1,181 @@
+<template>
+	<view class="container">
+		<u-navbar title="修改密码" :border="true" :placeholder="true" :autoBack="true" />
+		<view>
+			<view class="reset">
+				<view class="reset-title">账号:{{ mobile }}</view>
+				<view class="reset-input code">
+					<u-input placeholder="请输入短信验证码" type="number" border="bottom" v-model="code" style="padding: 0;">
+						<template slot="suffix">
+							<u-code ref="uCode" @change="codeChange" seconds="60" changeText="Xs"></u-code>
+							<u-button @tap="getCode" :text="tips" type="default" size="mini"></u-button>
+						</template>
+					</u-input>
+				</view>
+				<view class="reset-tip">请设置密码,8-20个字符,不可以是纯数字</view>
+				<view class="reset-input">
+					<u-input type="password" placeholder="请输入密码" v-model="password" border="bottom"
+						clearable/>
+				</view>
+				<view class="reset-input">
+					<u-input type="password" placeholder="请再次输入密码" v-model="checkPassword" border="bottom" clearable/>
+				</view>
+				<u-button @click="resetPass" text="确认修改" shape="circle" :loading="loading"></u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $http from '@/utils/request.js'
+	export default {
+		data() {
+			return {
+				loading: false,
+				mobile: '',
+				codeId: '',
+				code: '',
+				password: '',
+				checkPassword: '',
+				tips: '',
+			};
+		},
+		onLoad(opthios) {
+			this.mobile = opthios.mobile
+		},
+		methods: {
+			codeChange(text) {
+				this.tips = text;
+			},
+			getCode() {
+				const rule = /^[1][0-9][0-9]{9}$/
+				if (!rule.test(this.mobile)) {
+					uni.$u.toast('请输入正确的手机号!');
+					return
+				}
+				if (this.$refs.uCode.canGetCode) {
+					// 模拟向后端请求验证码
+					uni.showLoading({
+						title: '正在获取验证码'
+					})
+					// 这里此提示会被this.start()方法中的提示覆盖
+					uni.$u.toast('验证码已发送');
+					// 通知验证码组件内部开始倒计时
+					this.$refs.uCode.start();
+					$http.post('/api/v1/mp/sms/authsend', {
+						mobile: this.mobile
+					}).then(res => {
+						if (res.code === 0 && res.data) {
+							this.codeId = res.data
+						}
+					})
+				} else {
+					uni.$u.toast('倒计时结束后再发送');
+				}
+			},
+
+			resetPass() {
+				if (!this.code) {
+					uni.$u.toast('请输入验证码!');
+					return
+				}
+				if (!this.password) {
+					uni.$u.toast('请输入密码!');
+					return
+				}
+				if (!this.checkPassword) {
+					uni.$u.toast('请再次输入密码!');
+					return
+				}
+				if (this.password !== this.checkPassword) {
+					uni.$u.toast('两次输入的密码不一致!');
+					return
+				}
+				if (this.password.length < 8 || this.password.length > 20) {
+					uni.$u.toast('请输入8到20位密码!');
+					return
+				}
+				if (this.password.length < 8 || this.password.length > 20) {
+					uni.$u.toast('请输入8到20位密码!');
+					return
+				}
+				const regPos = /^\d+(\.\d+)?$/ //非负浮点数
+				const regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/ //负浮点数
+				if (regPos.test(this.password) || regNeg.test(this.password)) {
+					uni.$u.toast('密码不能是纯数字!');
+					return
+				}
+				this.loading = true
+				$http.post('/api/v1/mp/user/resetPwd', {
+					userName: this.mobile,
+					messageId: this.codeId,
+					code: this.code,
+					password: this.password
+				}).then(res => {
+					this.loading = false
+					if (res.code === 0) {
+						uni.showToast({
+							title: '密码修改成功!',
+							icon: 'success'
+						})
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1,
+							})
+						}, 1000);
+					}
+				}).catch(() => {
+					this.loading = false
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		height: 100vh;
+		width: 100%;
+		overflow: hidden;
+	}
+	
+	.reset {
+		padding: 70rpx 30rpx 0;
+
+		&-title {
+			font-size: 32rpx;
+			color: #333;
+			font-weight: bold;
+			line-height: 80rpx;
+			border-bottom:1px solid #dadbde;
+			margin-bottom: 40rpx;
+			padding-left: 9px;
+			
+		}
+
+		&-input {
+			display: flex;
+			align-items: center;
+			margin-bottom: 40rpx;
+		}
+
+		&-tip {
+			padding: 0 16rpx 40rpx;
+			font-size: 26rpx;
+		}
+
+		::v-deep .u-button {
+			width: 100%;
+			background-color: $uni-bg-color;
+			color: #fff;
+			border-radius: 32px;
+		}
+	}
+	.code {
+		::v-deep .u-button {
+			border: 2rpx solid #367481;
+			color: #367481;
+			background: none;
+		}
+	}
+</style>

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

@@ -1,792 +0,0 @@
-<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>

+ 231 - 40
src/pages/user/index.vue

@@ -5,50 +5,59 @@
 		<!-- 头部背景 -->
 		<view class="user"></view>
 		<!-- 账户信息 -->
-		<view class="account">
+		<view class="account flex">
 			<view class="flex account-ava">
 				<image :src="avatar" mode="aspectFill" v-if="loginState"></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-no" @click="toLogin" v-else>登录</view>
 			</view>
-			<view class="flex account-info" v-if="loginState">
-				<navigator url="/packagePrize/prize/index" class="flex account-info-item" hover-class="navigator-hover">
-					<view>{{ initData.prizeNum }}</view>
-					<view>我的仓库</view>
-				</navigator>
-				<navigator url="/packagePrize/ticket/index" class="flex account-info-item" hover-class="navigator-hover">
-					<view>{{ initData.ticketNum }}</view>
-					<view>我的盲票</view>
-				</navigator>
-				<navigator url="/packagePrize/bean/index" class="flex account-info-item" hover-class="navigator-hover">
-					<view>{{ initData.coinNum }}</view>
-					<view>我的盲豆</view>
-				</navigator>
+			<view class="share" @click="toShare">
+				<u-icon name="share-square" color="#fff" size="20"></u-icon>
+				<view class="title">邀请会员</view>
 			</view>
-			<view class="flex account-info" v-else @click="notLogin">
-				<view class="flex account-info-item">
-					<view>-</view>
-					<view>我的仓库</view>
-				</view>
-				<view class="flex account-info-item">
-					<view>-</view>
-					<view>我的盲票</view>
+		</view>
+		<view class="accountTwo">
+			<view class="flex accountTwo-action">
+				<view>账户余额</view>
+				<view class="flex accountTwo-action-icon" @click="toAccountDatail">
+					<text>明细</text>
+					<u-icon name="arrow-right" color="#999" size="16"></u-icon>
 				</view>
-				<view class="flex account-info-item">
-					<view>-</view>
-					<view>我的盲豆</view>
+			</view>
+			<view class="flex accountTwo-info">
+				<view class="accountTwo-info-amt">¥{{ $numberFormat(info.money) }}</view>
+			</view>
+			<view class="accountTwo-details">
+				<view class="flex accountTwo-details-item">
+					<view class="flex title">
+						<text>提现金额</text>
+						<u-icon name="question-circle-fill" @click="tipShow = true" color="#666"></u-icon>:
+						<text>¥{{ $numberFormat(info.frozenMoney) }}</text>
+					</view>
+					<view class="btn">
+						<button type="default" @click="toWithdraw">提现</button>
+					</view>
+					
 				</view>
 			</view>
 		</view>
 		<!-- 操作项 -->
 		<view class="action">
-			<!-- <u-cell-group :border="false">
-				<u-cell icon="order" title="我的订单" :isLink="true" @click="toOrder" />
-				<u-cell icon="map" title="我的地址" :isLink="true" @click="toAddress" />
-				<u-cell icon="kefu-ermai" title="联系我们" :isLink="true" @click="contactService" />
-				<u-cell icon="info-circle" title="关于我们" :border="false" :isLink="true" :url="'/packageOther/about/index'" />
-			</u-cell-group> -->
+			<view class="action-item flex" @click="toBean">
+				<view class="action-item-left flex">
+					<image src="../../static/user/user_order.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="toTeam">
+				<view class="action-item-left flex">
+					<image src="../../static/user/user_order.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="toOrder">
 				<view class="action-item-left flex">
 					<image src="../../static/user/user_order.png" mode="scaleToFill"></image>
@@ -63,7 +72,6 @@
 				</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">
 					<image src="../../static/user/user_kefu.png" mode="scaleToFill"></image>
@@ -71,7 +79,13 @@
 				</view>
 				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
 			</view>
-			<!-- #endif -->
+			<view class="action-item flex" @click="toReset">
+				<view class="action-item-left flex">
+					<image src="../../static/user/user_kefu.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="toAbout">
 				<view class="action-item-left flex">
@@ -91,6 +105,14 @@
 				<u-icon name="arrow-right" color="#666" size="16"></u-icon>
 			</view>
 		</view>
+		<u-popup :show="tipShow" :round="10" mode="center" :safeAreaInsetBottom="false" @touchmove.prevent.stop>
+			<view class="tip-show">
+				<view class="tip-show-txt">提现金额:正在提现中的金额,包含提现手续费部分。</view>
+				<view class="flex tip-show-btn">
+					<view class="confirm" @click="tipShow = false">知道了</view>
+				</view>
+			</view>
+		</u-popup>
 		
 		<custom-tab-bar :activeValue="'user'" />
 	</view>
@@ -109,6 +131,7 @@
 		},
 		data() {
 			return {
+				tipShow: false,
 				loginState: false, // 判断是否登录
 				authState: false,
 				userInfo: {}, //
@@ -162,7 +185,16 @@
 					url: "/pages/login/index"
 				})
 			},
-
+			toBean() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packagePrize/bean/index'
+				})
+			},
+			
 			// 我的订单
 			toOrder() {
 				if (!this.loginState) {
@@ -173,6 +205,17 @@
 					url: '/packageGoods/order/index'
 				})
 			},
+			
+			//跳转我的团队
+			toTeam() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packageOperate/team/index'
+				})
+			},
 
 			// 我的地址
 			toAddress() {
@@ -185,6 +228,13 @@
 				})
 			},
 			
+			//邀请会员
+			toShare() {
+				uni.navigateTo({
+					url: '/packageOperate/share/index'
+				})
+			},
+			
 			// 关于我们
 			toAbout() {
 				uni.navigateTo({
@@ -216,10 +266,18 @@
 					}
 				})
 			},
-
+			//跳转修改密码
+			toReset() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: `/pages/reset/index?mobile=${this.userInfo.userName}`
+				})
+			},
 			// 联系客服
 			contactService() {
-				// #ifdef MP-WEIXIN
 				if(appId == 1) {
 					// wx.openCustomerServiceChat({
 					// 	extInfo: {
@@ -238,7 +296,26 @@
 						corpId: 'ww8522e336cfe5045b',
 					})
 				}
-				// #endif
+			},
+			//跳转明细
+			toAccountDatail() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packageOperate/account/detail'
+				})
+			},
+			//跳转提现
+			toWithdraw() {
+				if (!this.loginState) {
+					uni.$u.toast('请登录');
+					return
+				}
+				uni.navigateTo({
+					url: '/packageOperate/account/withdraw'
+				})
 			},
 		},
 		//分享好友
@@ -279,13 +356,15 @@
 		display: flex;
 		align-items: center;
 		height: 560rpx;
-		background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/mine_bkg.png) center center no-repeat;
+		background-color: $uni-bg-color;
+		// background: url(https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/mine_bkg.png) center center no-repeat;
 		background-size: 100vw 560rpx;
 	}
 
 	.account {
 		margin-top: -350rpx;
 		margin-bottom: 34rpx;
+		justify-content: space-between;
 
 		// 头像
 		&-ava {
@@ -347,7 +426,7 @@
 	}
 
 	.action {
-		margin: 0 34rpx;
+		margin: 0 25rpx;
 		padding: 0 34rpx;
 		background-color: #FFFFFF;
 		border-radius: 18rpx;
@@ -355,7 +434,7 @@
 		
 		&-item {
 			justify-content: space-between;
-			padding: 36rpx 0;
+			padding: 20rpx 0;
 			border-bottom: 1px solid #eee;
 			
 			&-left {
@@ -383,4 +462,116 @@
 			border-bottom: none;
 		}
 	}
+	
+	.accountTwo {
+		margin: 0 25rpx;
+		padding: 30rpx;
+		background-color: #FFFFFF;
+		border-radius: 18rpx;
+		margin-top: -30rpx;
+		margin-bottom: 20rpx;
+	
+		&-action {
+			justify-content: space-between;
+			margin-bottom: 28rpx;
+	
+			&-icon {
+				text {
+					color: #999;
+					margin-right: 10rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+	
+		&-info {
+			justify-content: space-between;
+			margin-bottom: 30rpx;
+	
+			&-amt {
+				font-size: 40rpx;
+				font-weight: bold;
+			}
+		}
+	
+		&-details {
+			display: flex;
+			justify-content: space-between;
+			font-size: 28rpx;
+	
+			&-item {
+				width: 100%;
+				justify-content: space-between;
+
+	
+				.title {
+					
+					text {
+						padding-right: 4rpx;
+						color: #666;
+					}
+				}
+				
+				.btn {
+					display: inline-block;
+					
+					button {
+						width: 144rpx;
+						height: 48rpx;
+						line-height: 48rpx;
+						font-size: 28rpx;
+						border-radius: 30rpx;
+						background-color: #367481;
+						color: rgba(255, 255, 255, 100);
+						// margin: 0;
+					}
+				}
+			}
+		}
+	}
+	.share {
+		float: right;
+		display: flex;
+		align-items: center;
+		padding-right: 40rpx;
+	
+		image {
+			width: 30rpx;
+			height: 30rpx;
+		}
+	
+		.title {
+			line-height: 40rpx;
+			margin-left: 8rpx;
+			color: #FFFFFF;
+		}
+	}
+	.tip-show {
+		width: 80vw;
+		padding: 40rpx 30rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+	
+		&-title {
+			text-align: center;
+			font-size: 28rpx;
+		}
+	
+		&-txt {
+			margin: 40rpx 0;
+			font-size: 32rpx;
+		}
+	
+		&-btn {
+			.confirm {
+				width: 140rpx;
+				height: 60rpx;
+				text-align: center;
+				line-height: 60rpx;
+				background-color: #F9822C;
+				color: #FFFFFF;
+				border-radius: 10rpx;
+			}
+		}
+	}
 </style>

BIN
src/static/public/share_bg.png


BIN
src/static/public/share_bg_daili.png


BIN
src/static/public/share_bg_huiyuan.png


+ 6 - 6
src/uni.scss

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