Преглед изворни кода

Merge branch 'master' of E:\project\activitys-uniapp with conflicts.

hmp пре 4 година
родитељ
комит
fa93e975bf

+ 11 - 1
assets/http/api.js

@@ -47,9 +47,16 @@ const points={
 	list:p => http.get('sing_point/pointrecord/list', {params:p}),
 }
 
+//我的助力
 const help={
 	list:p => http.get('sing_active/activehelprecord/list', {params:p}),
 }
+//热力明细
+const heatrecord={
+	list:p => http.get('sing_heat_value/heatrecord/list', {params:p}),
+}
+
+
 
 /**
  * 积分商城
@@ -62,7 +69,9 @@ const pointgoods={
  * 道具
  */
 const order={
-	create:p => http.post('/app/help/goods/createPropsOrder', p),
+	sendCmccSms:p => http.post('/app/help/goods/sendCmccSms',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
+	create:p => http.post('/app/help/goods/createPropsOrder',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
+	exchange:p => http.post('/app/help/goods/exchangeProps',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
 }
 
 
@@ -75,6 +84,7 @@ export const api={
 	platform,
 	points,
 	help,
+	heatrecord,
 	CMCC,
 	pointgoods,
 	order

+ 2 - 0
assets/http/service.js

@@ -2,6 +2,8 @@ import Request from 'luch-request'
 
 // let baseURL = 'http://192.168.1.91:2888'
 let baseURL = 'http://192.168.1.168:2888'
+// let baseURL = 'https://vote.guosen-fumao.cn/api'
+
 
 let tokenUrl = baseURL +
 	"/blade-auth/oauth/token?tenantId=000000&password=21232f297a57a5a743894a0e4a801fc3&username=admin"

+ 3 - 0
components/alert/pointAuth.vue

@@ -40,6 +40,9 @@
 			hide(){
 				this.show = false;
 			},
+			close(){
+				this.$emit('close')
+			},
 			toAuth(){
 				let params={
 					url:encodeURIComponent(this.authUrl),

+ 68 - 39
components/alert/smsAlert.vue

@@ -1,33 +1,40 @@
 <template>
-	<u-popup v-model="show" mode="center" width="80%" border-radius="15" :closeable="true">
-		<view class="sms-alert-container">
-			<view class="title">短信验证</view>
-			<view class="info-msg">验证码已发送至{{phoneInfo}}</view>
-			<view class="input-box">
-				<u-input class="input-content" type="number" maxlength="6" placeholder="请输入验证码" v-model="code"/>
-				<view class="code-button">
-					<view v-if="sending==true">
-						<u-loading mode="circle"></u-loading>
+	<view class="">
+		<u-popup v-model="show" mode="center" width="80%" border-radius="15" :closeable="true">
+			<view class="sms-alert-container">
+				<view class="title">短信验证</view>
+				<view class="info-msg">验证码已发送至{{phoneInfo}}</view>
+				<view class="input-box">
+					<u-input class="input-content" type="number" maxlength="6" placeholder="请输入验证码" v-model="code" />
+					<view class="code-button">
+						<view v-if="sending==true">
+							<u-loading mode="circle"></u-loading>
+						</view>
+						<view v-else-if="seconds > 0"><span class="text-red">{{seconds+'s '}} </span>可重发</view>
+						<view v-else>
+							<u-button @click="$u.debounce(sendMessage, 500)" plain size="mini">重新发送</u-button>
+						</view>
 					</view>
-					<view v-else-if="seconds > 0"><span class="text-red">{{seconds+'s '}} </span>可重发</view>
-					<view v-else><u-button @click="$u.debounce(sendMessage, 500)" plain size="mini">重新发送</u-button></view>
 				</view>
+				<u-button @click="$u.debounce(exchange, 500)" :custom-style="customStyle" shape="circle">确认</u-button>
 			</view>
-			<u-button @click="$u.debounce(validateCode, 500)" :custom-style="customStyle" shape="circle" >确认</u-button>
-		</view>
-	</u-popup>
+		</u-popup>
+		<loading ref="loading" type="3"/>
+		<toast ref="toast" ></toast>
+	</view>
 </template>
 
 <script>
 	export default {
-		name:"smsAlert",
+		name: "smsAlert",
 		data() {
 			return {
-				show: true,
+				show: false,
 				sending: true,
-				phone: '13126058204',
+				phone: '19124812874',
 				code: '',
 				seconds: -1,
+				smsParams: {},
 				customStyle: {
 					color: 'white',
 					background: "#E72226",
@@ -35,70 +42,92 @@
 				}
 			};
 		},
-		computed:{
-			phoneInfo(){
-				return this.phone.substr(0,4)+"****"+this.phone.substr(7,this.phone.length);
+		computed: {
+			phoneInfo() {
+				return this.phone.substr(0, 4) + "****" + this.phone.substr(7, this.phone.length);
 			}
 		},
 		methods: {
-			async showSmsAndSend(phone){
-				if(this.$u.test.mobile(phone)){
+			async showSmsAndSend(params) {
+				this.$refs.loading.showLoading()
+				this.smsParams = params
+				let phone = params.mobile
+				if (!this.$u.test.mobile(phone)) {
 					uni.showToast({
-					    title: '手机号码格式错误',
-					    icon: 'none'
+						title: '手机号码格式错误',
+						icon: 'none'
 					});
 					return;
 				}
 				this.phone = phone;
-				await sendMessage();
+				await this.sendMessage();
 				this.show = true;
+				this.$refs.loading.hide()
 			},
-			hideSms(){
+			hideSms() {
 				this.show = false;
 			},
-			async sendMessage(){
+			async sendMessage() {
 				this.sending = true;
+				let res = await this.$api.order.sendCmccSms(this.smsParams)
+				if (!res.data.success) {
+					this.$refs.toast.error(res.data.msg)
+					this.hideSms()
+				}
 				//发送验证码
-				this.sending= false;
+				this.sending = false;
 			},
-			validateCode(){
-				this.$emit("validateResult",{result: true})
+			exchange() {
+				if (this.$isEmpty(this.code)) {
+					this.$u.toast('请输入验证码')
+					return
+				}
+				let params=this.$u.deepClone(this.smsParams)
+				params.smsCode=this.code
+				params.mobile=this.phone
+				this.$emit("exchange", params)
 			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.sms-alert-container{
+	.sms-alert-container {
 		padding: 50rpx;
-		.title{
+
+		.title {
 			width: 100%;
 			text-align: center;
-			 padding:  0rpx 10rpx 50rpx 10rpx ;
+			padding: 0rpx 10rpx 50rpx 10rpx;
 			font-weight: 500;
 			color: #353535;
 			letter-spacing: 2rpx;
 			font-size: 30rpx;
 		}
-		.info-msg{
+
+		.info-msg {
 			padding: 5rpx 5rpx 20rpx 5rpx;
 			color: #353535;
 		}
-		.input-box{
+
+		.input-box {
 			display: flex;
 			align-items: center;
 			justify-content: left;
 			border: 1rpx solid #DDDDDD;
 			border-radius: 10rpx;
 			margin: 0 0 50rpx 0;
-			padding:  5rpx 5rpx 5rpx 30rpx;
+			padding: 5rpx 5rpx 5rpx 30rpx;
 		}
-		.input-content{
+
+		.input-content {
 			width: 66%;
 		}
-		.code-button{
+
+		.code-button {
 			width: 34%;
-			border-left: 1rpx solid #DDDDDD;text-align: center;
+			border-left: 1rpx solid #DDDDDD;
+			text-align: center;
 		}
 	}
 </style>

+ 87 - 43
components/alert/votePopup.vue

@@ -3,93 +3,130 @@
 		<u-popup v-model="show" mode="bottom" width="100%" height="750" border-radius="15" :closeable="true">
 			<view class="padding-30">
 				<view class="padding-top-20 text-bold text-xl">投票助力</view>
-				<view class="padding-top-10 padding-bottom-10" style="color: #353535;font-size: 22rpx;font-family: PingFang-SC-Medium;line-height: 42rpx;" >
+				<view class="padding-top-10 padding-bottom-10"
+					style="color: #353535;font-size: 22rpx;font-family: PingFang-SC-Medium;line-height: 42rpx;">
 					中国移动用户可使用移动积分兑换活力道具,兑换后可获得移动为你发起{{gitfs[selected].activeVote}}
 					人助力和{{vuex_active_setting.voteAndPointRate*gitfs[selected].activeVote}}个普法积分(可用于积分商城兑换商品),快为喜爱的作品加油助力吧
 				</view>
 				<scroll-view style="white-space: nowrap;" :scroll-x="true">
 					<view v-for="(item,index) in gitfs" :key="index" class="gift-item">
-						<view @click.stop="selected = index;count = index" class="padding-20" :class="{'icon-box': true,'selected': index ==  selected}" >
+						<view @click.stop="selected = index;count = index" class="padding-20"
+							:class="{'icon-box': true,'selected': index ==  selected}">
 							<image mode="aspectFit" class="gift-img" :src="item.imgUrl"></image>
 							<view class="gift-name">{{item.name}}</view>
 						</view>
-						<view style="color: #999999;font-size: 20rpx;text-align: center;padding-top: 10rpx;">{{item.activeVote==0? '剩余免费次数':'剩余次数'}} {{item.remainCount}}</view>
+						<view style="color: #999999;font-size: 20rpx;text-align: center;padding-top: 10rpx;">
+							{{item.activeVote==0? '剩余免费次数':'剩余次数'}} {{item.remainCount}}</view>
 					</view>
 				</scroll-view>
-				
+
 				<view class="handle-bar">
-					<view v-if="pointNum>=0" class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分 {{pointNum}}</view>
-					<view v-else class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分 <u-loading style="margin: 10rpx;" mode="circle"></u-loading></view>
+					<view v-if="pointNum>=0" class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分:
+						{{pointNum}}</view>
+					<view v-else class="text-center padding-bottom-20" style="color: #0A9FEF;">您目前的移动积分 <u-loading
+							style="margin: 10rpx;" mode="circle"></u-loading>
+					</view>
 					<view class="button-bar">
 						<view class="button-r">
-							<u-count-to v-if="show" color="#E72226" start-val="0" :end-val="gitfs[selected].point" :duration="500"></u-count-to>
-							 <span class="info">移动积分</span>
-						 </view>
+							<u-count-to v-if="show" color="#E72226" start-val="0" :end-val="gitfs[selected].point"
+								:duration="500"></u-count-to>
+							<span class="info">移动积分</span>
+						</view>
 						<view class="button-f" @click="toVote">点击投票</view>
 					</view>
 				</view>
 			</view>
 		</u-popup>
-		<point-auth ref="pointAuth"></point-auth>
+		<point-auth ref="pointAuth" @close="pointAuthClose"></point-auth>
+		<loading ref="loading" type="3" />
 	</view>
 </template>
 
 <script>
 	import pointAuth from '../../components/alert/pointAuth.vue'
 	export default {
-		name:"votePopup",
-		components:{ pointAuth },
+		name: "votePopup",
+		components: {
+			pointAuth
+		},
 		data() {
 			return {
 				show: false,
 				selected: 0,
 				count: 0,
-				pointNum: -1,
+				pointNum: 0,
 				gitfs: [],
 			};
 		},
-		
+
 		methods: {
-			async showVote(mobile){
-				// let params = {mobile}
-				let params = {mobile:'15016452204'}
-				const queryRes = (await this.$api.CMCC.queryCmccPoint(this.$u.queryParams(params)));
-				if(queryRes.data.data.resultCode == '0001' ){
-					this.$refs.pointAuth.showAuth(queryRes.data.data.data);
-					return;
+			pointAuthClose(){
+				this.$refs.loading.hide()
+			},
+			async showVote(mobile,productId) {
+				this.$refs.loading.showLoading("礼物获取中")
+				let params = {
+					mobile
+				}
+				let isCmcc=await this.checkIsCmcc()
+				if (isCmcc) {
+					const queryRes = (await this.$api.CMCC.queryCmccPoint(this.$u.queryParams(params)));
+					if (queryRes.data.data.resultCode == '0001') {
+						this.$refs.pointAuth.showAuth(queryRes.data.data.data);
+						return;
+					}
+					const pointDetail = JSON.parse(queryRes.data.data.data);
+					this.pointNum = pointDetail['points'];
+				}
+				let data = {
+					productId,
+					userId: this.vuex_userId,
+					current: 1,
+					size: 99
 				}
-				const pointDetail = JSON.parse(queryRes.data.data.data);
-				this.pointNum = pointDetail['points'];
-				const res = await this.$api.activity.getGiftList({userId: 1,current: 1,size: 99});
+				const res = await this.$api.activity.getGiftList(data);
 				this.gitfs = res.data.data.records;
+				this.$refs.loading.hide()
 				this.show = true;
 			},
-			hideVote(){
+			hideVote() {
 				this.show = false;
 			},
-			toVote(){
-				this.$emit('toVote',this.gitfs[this.selected])
+			toVote() {
+				let item=this.gitfs[this.selected]
+				
+				if (this.pointNum==0 && item.point !=0) {
+					this.$u.toast('您无可用移动积分')
+					return
+				}
+				if (item.remainCount == 0) {
+					this.$u.toast('今天已无该道具兑换次数')
+					return
+				}
+				this.$emit('toVote', this.gitfs[this.selected])
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.gift-item{
+	.gift-item {
 		width: 150rpx;
 		height: 250rpx;
 		margin: 12rpx;
 		// box-shadow: 0rpx 2rpx 2rpx 2rpx #DDDDDD;
 		// background: #007AFF;
 		display: inline-block;
-		.icon-box{
+
+		.icon-box {
 			width: 150rpx;
 			height: 200rpx;
 			border: 1rpx solid #DDDDDD;
-			box-shadow: 3rpx 3rpx 4rpx rgba(26,26,26,0.2);
+			box-shadow: 3rpx 3rpx 4rpx rgba(26, 26, 26, 0.2);
 			border-radius: 10rpx;
 		}
-		.gift-img{
+
+		.gift-img {
 			width: 100rpx;
 			height: 100rpx;
 			border: 1rpx dashed #DDDDDD;
@@ -97,41 +134,46 @@
 			transition: border 0.5s;
 			border: 0 solid transparent;
 		}
-		.selected{
+
+		.selected {
 			border: 2rpx solid #E72226;
 		}
-		.selected::before{
+
+		.selected::before {
 			content: "";
 			position: absolute;
 			margin-top: 147rpx;
 			margin-left: 97rpx;
-			border-radius: 5rpx 0 0 0 ;
+			border-radius: 5rpx 0 0 0;
 			height: 30rpx;
 			width: 30rpx;
 			background: url(../../static/icon/selected.png) no-repeat center/22rpx red;
 		}
-		
-		.gift-name{
-			font-size:22rpx ;
+
+		.gift-name {
+			font-size: 22rpx;
 			color: #353535;
 			padding-top: 10rpx;
 		}
-		
+
 	}
-	.handle-bar{
+
+	.handle-bar {
 		position: absolute;
 		width: 100%;
 		bottom: 0;
 		left: 0;
 		padding-bottom: 80rpx;
-		.button-bar{
+
+		.button-bar {
 			width: 80%;
 			height: 80rpx;
 			border: 2rpx solid #E72226;
 			margin: auto;
 			border-radius: 100rpx;
 			display: flex;
-			.button-f{
+
+			.button-f {
 				flex-basis: 50%;
 				color: white;
 				display: flex;
@@ -141,7 +183,8 @@
 				background: #E72226;
 				border-radius: 0 100rpx 100rpx 0;
 			}
-			.button-r{
+
+			.button-r {
 				color: #E82E3E;
 				font-weight: 800;
 				flex-basis: 50%;
@@ -149,7 +192,8 @@
 				font-size: 40rpx;
 				justify-content: center;
 				align-items: center;
-				.info{
+
+				.info {
 					color: #AAAAAA;
 					font-weight: 500;
 					margin-left: 15rpx;

+ 2 - 2
components/poster/poster.vue

@@ -20,11 +20,11 @@
 		props: {
 			headerImg: {
 				type: String,
-				default: 'https://music.nanyue6688.com/obsfile/b894874df7184a5d9caa961aab70cac8-poster.jpg'
+				default: 'https://gx.vote.activity.obs.cn-south-1.myhuaweicloud.com:443/a9d4b65ba1cd4bc88ef9da08cb8fcd26-poster.jpg'
 			},
 			avatar: {
 				type: String,
-				default: 'https://music.nanyue6688.com/obsfile/4620dd0fe1634138b73e0e12d2f02131-bc7e8021890d422d330851995fb8aae.jpg'
+				default: ''
 			},
 			title: {
 				type: String,

+ 17 - 8
pages.json

@@ -94,13 +94,22 @@
 
 		}
 	    ,{
-            "path" : "pages/auth/getfingerprint",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
+            "path" : "pages/webview/createOrder",
+            "style" :
+            {
+                "navigationBarTitleText": "创建订单",
+                "enablePullDownRefresh": false
+            }
+
+        }
+        ,{
+            "path" : "pages/mine/my-help/help-records",
+            "style" :
+            {
+                "navigationBarTitleText": "热力明细",
+                "enablePullDownRefresh": false
+            }
+
         }
     ],
 	"tabBar": {
@@ -136,4 +145,4 @@
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8"
 	}
-}
+}

+ 116 - 29
pages/activity/activityDetail.vue

@@ -2,7 +2,7 @@
 	<view :style="vuex_skin">
 		<u-navbar :custom-back="customBack" :is-back="true" title="作品详情"></u-navbar>
 		<view class="" v-show="!loading">
-			<video class="works-video" ::autoplay="true" :src="activity.videoUrl"></video>
+			<video class="works-video" :autoplay="true" :src="activity.videoUrl"></video>
 			<view style="padding: 20rpx 30rpx 50rpx 30rpx;background: white;">
 				<view class="title" style="border-bottom: 1rpx solid #EEEEEE ;">
 					<span class="bg-red work-no"> {{activity.productNo}}号</span>
@@ -22,7 +22,7 @@
 				<view class="basis-xs">
 					<image style="width: 84rpx;height: 84rpx;" src="../../static/icon/ic_zhuanfa.png"></image>
 				</view>
-				<view class="basis-lg flex flex-direction">
+				<view class="basis-lg flex flex-direction" style="margin-left: -20rpx;">
 					<view style="font-size: 28rpx;color: #353535;">转发邀请投票</view>
 					<view style="font-size: 22rpx;color: #AEACAF;padding-top: 10rpx;">
 						成功邀请一位好友投票,获得{{vuex_active_setting.voteAndHeatRate}}热力值</view>
@@ -46,8 +46,7 @@
 		<uqrcode class="canvas-hide" ref="uqrcode"></uqrcode>
 		<share-popup ref="sharePopup" @confirm="shareConfirm"></share-popup>
 		<timeline-popup ref="timelinePopup"></timeline-popup>
-
-
+		<sms-alert ref="smsAlert"  @exchange="cmccVote"></sms-alert>
 	</view>
 </template>
 
@@ -57,8 +56,10 @@
 	import votePopup from '@/components/alert/votePopup.vue'
 	import poster from "@/components/poster/poster.vue"
 	import uqrcode from "@/components/uqrcode/uqrcode.vue"
+	import smsAlert from "@/components/alert/smsAlert.vue"
 	export default {
 		components: {
+			smsAlert,
 			sharePopup,
 			timelinePopup,
 			votePopup,
@@ -66,16 +67,15 @@
 			uqrcode
 		},
 		async onLoad(props) {
-			console.log("onLoad");
 			this.$refs.loading.showLoading()
-			const {
-				id
-			} = props;
-			this.activity = (await this.$api.activity.getWorksDetail(id)).data.data
+			//作品id
+			this.id = props.id;
+			//获取详情
+			this.fetchData()
 			//处理授权结果
 			this.handelAuthResult(props)
 			//处理创建订单结果
-
+			this.handelOrderResult(props)
 			//隐藏loading
 			setTimeout(() => {
 				this.$refs.loading.hide()
@@ -94,18 +94,23 @@
 		data() {
 			return {
 				loading: false,
+				//作品id
+				id: '',
 				//订单结果
 				orderResult: {},
 				//授权结果
 				authResult: {},
 				//分享
 				qrCodeImg: '',
+				//选中的道具
+				selectGoods:{},
+				
 				posetrParams: {
 					avatar: '',
 					title: '我是普法帮帮代言人',
 					subTitle: '邀请您为888号作品投票!'
 				},
-				
+
 				activity: {},
 				customStyle: {
 					color: 'white',
@@ -114,26 +119,29 @@
 					width: '500rpx',
 					margin: '25rpx auto'
 				},
-				
+
 			}
 		},
 		methods: {
+			async fetchData() {
+				this.activity = (await this.$api.activity.getWorksDetail(this.id)).data.data
+			},
 			async handelShareParams() {
 				this.posetrParams = {
-					avatar: 'https://music.nanyue6688.com/obsfile/9867edfa4d34464bb1f5f938da5c2730-avatar.png',
+					avatar: 'https://gx.vote.activity.obs.cn-south-1.myhuaweicloud.com:443/446d9e043f3748e4a47ea4d0de81b140-3b748fea4150c469b8eb66f98cd29e2.png',
 					title: '我是普法帮帮代言人',
 					subTitle: `邀请您为${this.activity.productNo}号作品投票!`
 				}
-				let userId=this.vuex_userId || '000000' //游客
-				let sharePath='/pages/activity/activityDetail?id='+this.activity.id+'&userId='+userId
-				let encodePath=encodeURIComponent(sharePath)
+				let userId = this.vuex_userId || '000000' //游客
+				let sharePath = '/pages/activity/activityDetail?id=' + this.activity.id + '&userId=' + userId
+				let encodePath = encodeURIComponent(sharePath)
 				this.$u.mpShare = {
-					title: '我是普法帮帮代言人,'+this.posetrParams.subTitle, 
-					path: '/pages/index/home?path='+encodePath, 
-					imageUrl: '' 
+					title: '我是普法帮帮代言人,' + this.posetrParams.subTitle,
+					path: '/pages/index/home?path=' + encodePath,
+					imageUrl: ''
 				}
-				
-				let qrText=this.$config.PRODUCT_PATH +'?path=' +encodePath
+
+				let qrText = this.$config.PRODUCT_PATH + '?path=' + encodePath
 				this.qrCodeImg = (await this.$refs.uqrcode.make({
 					size: 150,
 					text: qrText
@@ -156,13 +164,13 @@
 				}
 			},
 			handelOrderResult(options) {
-				if (options.orderResult == undefined) {
-					return
+				if (options.orderPass&&this.$cache.get('orderResult')) {
+					this.orderResult = this.$cache.get('orderResult')
+					this.createOrder()
 				}
-				this.orderResult = JSON.parse(options.orderResult)
 			},
 			async showVote() {
-				this.$refs.votePopup.showVote(this.vuex_phone);
+				this.$refs.votePopup.showVote(this.vuex_phone, this.id);
 			},
 			init() {
 				if (this.vuex_phone) {
@@ -171,11 +179,89 @@
 			},
 			//去投票
 			toVote(item) {
+				this.orderResult=this.$cache.get('orderResult')
+				this.orderResult.goodsId=item.id
+				this.selectGoods=item
+				if (item.point == 0) {
+					//免费投票
+					this.freeVote()
+					return
+				}
+				this.$refs.votePopup.hideVote()
+				//移动积分投票,创建订单
+				if (this.$cache.get('orderResult')) {
+					this.createOrder()
+					return
+				}
 				let params = {
 					url: 'https://ldt.guosen-fumao.cn/wapp/order.html',
-					title: '创建订单'
+					goodsId: this.selectGoods.id
+				}
+				this.$jump('/pages/webview/createOrder' + this.$u.queryParams(params))
+			},
+			//移动积分创建订单
+			async createOrder() {
+				if (this.$isEmpty(this.orderResult.fingerprint) ||
+					this.$isEmpty(this.orderResult.sessionId) ||
+					this.$isEmpty(this.orderResult.goodsId)) {
+					this.$refs.toast.error('创建订单失败')
+					return
+				}
+				let params = {
+					fingerprint: this.orderResult.fingerprint,
+					helpGoodsId: this.orderResult.goodsId,
+					sessionId: this.orderResult.sessionId,
+					num: 1,
+					phone: this.vuex_phone,
+					userId: this.vuex_userId
+				}
+				let res=await this.$api.order.create(params)
+				if (res.data.success) {
+					this.orderResult.outOrderId=res.data.data
+					this.orderResult.mobile=this.vuex_phone
+					console.log(this.orderResult,"/***********");
+					this.$refs.smsAlert.showSmsAndSend(this.orderResult)
+				}else{
+					this.$refs.toast.error(res.data.msg)
+				}
+			},
+			async cmccVote(item){
+				this.$refs.smsAlert.hideSms()
+				let params = {
+					...item,
+					machinetype:'phone',
+					productId:this.id,
+					helpGoodsId: this.orderResult.goodsId,
+					userId: this.vuex_userId,
+					num: 1,
+				}
+				let res = await this.$api.order.exchange(params)
+				if (res.data.success) {
+					this.$refs.toast.info('助力成功')
+				}else{
+					this.$refs.toast.error(res.data.msg)
+				}
+			},
+			async freeVote() {
+				let params = {
+					helpGoodsId: this.selectGoods.id,
+					userId: this.vuex_userId,
+					num: 1,
+					productId: this.activity.id,
+				}
+				let res = await this.$api.order.exchange(params)
+				if (res.data.success) {
+					this.$refs.votePopup.hideVote()
+					this.fetchData()
+					setTimeout(() => {
+						this.$refs.toast.info("助力成功")
+					}, 200)
+				} else {
+					this.$refs.votePopup.hideVote()
+					setTimeout(() => {
+						this.$refs.toast.error(res.data.msg)
+					}, 200)
 				}
-				this.$jump('/pages/webview/webview' + this.$u.queryParams(params))
 			},
 			customBack() {
 				uni.switchTab({
@@ -198,7 +284,7 @@
 					this.$refs.timelinePopup.show()
 				}
 			},
-			showShare(){
+			showShare() {
 				this.$refs.sharePopup.show()
 			}
 		},
@@ -236,13 +322,14 @@
 		}
 
 		.vote-count {
-			padding: 0 40rpx 0 20rpx;
+			padding: 0 40rpx 0 10rpx;
 			font-size: 40rpx;
 			color: #353535;
 			font-weight: 800;
 		}
 
 		.work-rank {
+			margin-left: -10rpx;
 			color: #353535;
 			background: #FDEBEC;
 			border-radius: 21px 21px 21px 21px;

+ 5 - 1
pages/auth/order.vue

@@ -13,6 +13,7 @@
 			}
 		},
 		onLoad(options) {
+			options.fingerprint=decodeURIComponent(options.fingerprint)
 			this.$refs.loading.showLoading()
 			let _this=this
 			_this.$refs.loading.showLoading()
@@ -20,7 +21,10 @@
 			var page = pages[pages.length - 3];
 			let url='/'+page.route
 			let params=page.options
-			params.orderResult=JSON.stringify(options)
+			if (this.$isNotEmpty(options)) {
+				this.$cache.put('orderResult',options,1*60*60)
+				params.orderPass=true
+			}
 			let path=url + this.$u.queryParams(params)
 			uni.reLaunch({
 				url:path,

+ 1 - 1
pages/index/home.vue

@@ -42,7 +42,7 @@
 						<text>3</text>
 					</view>
 					<view class="left">
-						<image :src="item.imgUrl" mode=""></image>
+						<image :src="item.imgUrl" mode="aspectFill"></image>
 					</view>
 					<view class="right" style="width: 100%;">
 						<view class="flex-direction flex">

+ 3 - 0
pages/index/index.vue

@@ -11,6 +11,9 @@
 			}else{
 				this.$jump( path );
 			}
+		},
+		onLoad() {
+			
 		},
 		methods :{
 			async initParams(){

+ 17 - 3
pages/mine/mine.vue

@@ -52,7 +52,7 @@
 						<view class="text-gray text-sm" style="font-weight: 400;">消费赚积分</view>
 					</view>
 				</view>
-				<view class="flex" @click="jump('/pages/mine/my-help/my-help',true)">
+				<view class="flex" @click="jump('/pages/mine/my-help/help-records',true)">
 					<image src="../../static/mine/hot-value.png" style="width: 80upx;height: 80upx;"></image>
 					<view class="padding-left-sm">
 						<view class="text-bold text-lg">热力明细</view>
@@ -107,7 +107,7 @@
 					{
 						name: '我的助力',
 						icon: '/static/mine/zhuli.png',
-						url: '',
+						url: '/pages/mine/my-help/my-help',
 						auth: true //是否登录验证
 					},
 					{
@@ -119,7 +119,7 @@
 					{
 						name: '花积分',
 						icon: '/static/mine/huajifen.png',
-						url: '',
+						url: '/pages/shop/shop',
 						auth: false //是否登录验证
 					},
 					{
@@ -151,6 +151,16 @@
 				this.fetchUserInfo()
 			},
 			jump(url,auth){
+				if (this.$isEmpty(url)) {
+					this.$u.toast('暂未开放')
+					return
+				}
+				if (url=='/pages/shop/shop') {
+					uni.switchTab({
+						url
+					})
+					return
+				}
 				if (auth && this.$isEmpty(this.vuex_userId)) {
 					this.showLogin()
 					return
@@ -166,6 +176,10 @@
 				this.$api.loginUser.detail(params).then(res => {
 					if (this.$isNotEmpty(res.data.data)) {
 						this.userData=res.data.data
+						let userInfo=this.userData
+						userInfo.sessionKey=this.$cache.get('userInfo').sessionKey
+						this.$cache.put('userInfo',userInfo)
+						this.$u.vuex('vuex_phone',this.userData.phone)
 					}
 				})
 			},

+ 32 - 24
pages/mine/my-help/my-help.vue

@@ -2,19 +2,17 @@
 	<view>
 		<mescroll-body-diy ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
 			@up="upCallback">
-			<view class="card" v-for="(item,index) in list" :key="index">
-				<view class="card-top">
-					<view>少儿普法课堂</view>
-					<view class="flex">
-						<image src="/static/icon/remen.png" style="width: 36rpx;height: 36rpx;margin-right: 6rpx;">
-						</image>
-						<text class="center">+10</text>
-					</view>
+			<view class="card" @click="goDetail(item)" v-for="(item,index) in list" :key="index">
+				<view class="card-left">
+					<view class="title">{{item.productTitle}}</view>
+					<view class="center time">{{item.createTime}}</view>
 				</view>
 
-				<view class="card-bottom">
-					<view class="center">2021-11-09 09:13:38</view>
-					<view class="center">移动积分 -1000</view>
+				<view class="card-right">
+					<view class="center">
+						<image style="height: 52rpx;width: 90rpx;"   :src="item.helpGoods.imgUrl"></image>
+					</view>
+					<view class="center margin-left-20">x {{item.voteCount}}</view>
 				</view>
 			</view>
 		</mescroll-body-diy>
@@ -39,6 +37,11 @@
 			}
 		},
 		methods: {
+			goDetail(item){
+				uni.navigateTo({
+					url:"/pages/activity/activityDetail?id="+item.productId
+				})
+			},
 			downCallback() {
 				setTimeout(() => {
 					this.mescroll.resetUpScroll();
@@ -47,6 +50,7 @@
 			upCallback(mescroll) {
 				try {
 					let params = {
+						userId: this.vuex_userId,
 						current: mescroll.num,
 						size: mescroll.size,
 					}
@@ -71,23 +75,27 @@
 		background-color: #FFFFFF;
 		margin: 20rpx 0;
 		padding: 35rpx;
+		justify-content: space-between;
+		display: flex;
 
-		.card-top {
-			display: flex;
-			justify-content: space-between;
-			color: #353535;
-			font-size: 32rpx;
-			margin-bottom: 20rpx;
-			font-family: PingFang-SC-Bold;
+		.card-left {
+			.title {
+				color: #353535;
+				font-size: 32rpx;
+				margin-bottom: 20rpx;
+				font-family: PingFang-SC-Bold;
+			}
+
+			.time {
+				margin-top: 20rpx;
+				color: #999999;
+				font-size: 26rpx;
+				font-weight: 400;
+			}
 		}
 
-		.card-bottom {
+		.card-right {
 			display: flex;
-			justify-content: space-between;
-			margin-top: 20rpx;
-			color: #999999;
-			font-size: 26rpx;
-			font-weight: 400;
 		}
 	}
 </style>

+ 12 - 2
pages/mine/points/pointsDetail.vue

@@ -5,11 +5,11 @@
 			:background="{'backgroundColor': vuex_theme.shopBg}"></u-navbar>
 		<view class="" >
 			<view class="bg-img flex justify-center align-center"
-				style="background-image: url('https://music.nanyue6688.com/obsfile/29a50aaf357d45cc96033d470eb2b971-bg_mingxi@2x.png');height: 340upx;z-index: 9999999999999;">
+				style="background-image: url('/static/icon/mingxi.png');height: 340upx;z-index: 9999999999999;">
 				<view class="text-center" style="margin-top: 150upx;">
 					<view style="font-size: 26upx;color: #FFFFFF;font-weight: 400;">可用积分</view>
 					<view style="font-size: 58upx;margin-top: 7rpx;color: #ffffff;">
-						{{$cache.get('userInfo').pufaPoint}}
+						{{userData.pufaPoint}}
 					</view>
 				</view>
 			</view>
@@ -43,6 +43,7 @@
 		},
 		data() {
 			return {
+				userData:{},
 				title: '积分明细',
 				backShow: true,
 
@@ -82,8 +83,17 @@
 		},
 		onLoad() {
 			this.mescroll.resetUpScroll();
+			this.fetchPoints()
 		},
 		methods: {
+			fetchPoints(){
+				let params={
+					id:this.vuex_userId
+				}
+				this.$api.loginUser.detail(params).then(res=>{
+					this.userData=res.data.data
+				})
+			},
 			downCallback() {
 				setTimeout(() => {
 					this.mescroll.resetUpScroll();

+ 7 - 7
pages/rank/rank.vue

@@ -22,11 +22,11 @@
 						<u-image width="220" height="220" border-radius="10" :src="item.imgUrl"></u-image>
 						<view class="flex justify-between container" style="width: 100%;">
 							<view class="left" style="width: 95%;">
-								<view class="name text-cut">{{item.title}}</view>
+								<view class="name text-cut ">{{item.title}}</view>
 								<view class="padding-tb-sm text-sm center"
 									style="color: #888888;justify-content: flex-start">
-									<u-avatar :src="item.userImg" size="56"></u-avatar>
-									<text class="margin-left-10">{{item.username}}</text>
+									<u-avatar :src="item.userImg?item.userImg:'/static/icon/unlogin.png'" size="56"></u-avatar>
+									<text class="margin-left-10">{{item.username || '暂无信息'}}</text>
 								</view>
 
 								<view class="flex justify-between">
@@ -64,12 +64,12 @@
 						<u-image width="190" height="190" border-radius="10" :src="item.imgUrl"></u-image>
 						<view class="flex justify-between container" style="width: 100%;">
 							<view class="left" style="width: 95%;">
-								<view class="name text-cut"
-									style="font-size: 28rpx;font-weight: 600;padding-top: 20rpx;">{{item.title}}</view>
+								<view class="name text-cut " 
+									style="font-size: 28rpx;font-weight: 600;padding-top: 20rpx;width: 430rpx;">{{item.title}}</view>
 								<view class="padding-top-20 text-sm center"
 									style="color: #888888;justify-content: flex-start">
-									<u-avatar :src="item.userImg" size="56"></u-avatar>
-									<text class="margin-left-10">{{item.username}}</text>
+									<u-avatar :src="item.userImg?item.userImg:'/static/icon/unlogin.png'" size="56"></u-avatar>
+									<text class="margin-left-10">{{item.username || '暂无信息'}}</text>
 								</view>
 								<view class="flex justify-between">
 									<view class="hot-value center" style="justify-content: flex-start;">

+ 25 - 6
pages/shop/shop.vue

@@ -8,11 +8,11 @@
 			<view class="bg-card">
 				<view class="info" style="display: flex;justify-content: space-between;">
 					<view class="flex" v-if="vuex_userId">
-						<image style="width: 90rpx;height: 90rpx;border-radius: 50%;" :src="$cache.get('userInfo').avatar">
+						<image style="width: 90rpx;height: 90rpx;border-radius: 50%;" :src="userData.avatar">
 						</image>
 						<view class="center data">
 							<text style="color: #FFD7D9;">我的积分:</text>
-							<text class="text-bold text-xxl">{{$cache.get('userInfo').pufaPoint}}</text>
+							<text class="text-bold text-xxl">{{userData.pufaPoint}}</text>
 						</view>
 					</view>
 					<view class="flex" v-else @click="showLogin">
@@ -47,7 +47,7 @@
 								<text class="max">{{item.point}}积分</text>
 							</view>
 						</view>
-						<view class="bottom padding-top-20">
+						<view class="bottom padding-top-20" @click="$u.toast('暂未开放')">
 							<button class="cu-btn round text-white bg-base"
 								style="width: 140upx;height: 50upx;">兑换</button>
 						</view>
@@ -70,17 +70,36 @@
 		data() {
 			return {
 				swiperList: [
-					'https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/a20288db71c24a8983801f0c0cd66ea8-bg.jpg'
+					'https://gx.vote.activity.obs.cn-south-1.myhuaweicloud.com:443/3b23192e2b684e1e8d606790216d9d19-bff40cda56a61fb3151002945d87ad7.jpg'
 				],
-
 				downOption: {
 					auto: false
 				},
-				top: 0,
+				userData: {},
 				list: []
 			}
 		},
+		onShow() {
+			this.fetchUserInfo()
+		},
 		methods: {
+			fetchUserInfo(){
+				if (!this.vuex_userId) {
+					return
+				}
+				let params = {
+					id: this.vuex_userId
+				}
+				this.$api.loginUser.detail(params).then(res => {
+					if (this.$isNotEmpty(res.data.data)) {
+						this.userData=res.data.data
+						let userInfo=this.userData
+						userInfo.sessionKey=this.$cache.get('userInfo').sessionKey
+						this.$cache.put('userInfo',userInfo)
+						this.$u.vuex('vuex_phone',this.userData.phone)
+					}
+				})
+			},
 			downCallback() {
 				setTimeout(() => {
 					this.mescroll.resetUpScroll();

+ 0 - 2
pages/webview/webview.vue

@@ -14,8 +14,6 @@
 		},
 		onLoad(options) {
 			this.src = decodeURIComponent(options.url);
-			console.log(this.src);
-			console.log(options);
 			if (options.title) {
 				uni.setNavigationBarTitle({
 					title:options.title

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js

@@ -19,7 +19,7 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "https://music.nanyue6688.com/obsfile/115ad1afeb7748b9b7794808d49d63de-empty0.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			icon: "https://gx.vote.activity.obs.cn-south-1.myhuaweicloud.com:443/2603aec6466f4b5fb7010df377b0c680-%E6%97%A0%E6%95%B0%E6%8D%AE.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
 		}
 	},
 	// 国际化配置

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js

@@ -20,7 +20,7 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "https://music.nanyue6688.com/obsfile/115ad1afeb7748b9b7794808d49d63de-empty0.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			icon: "https://gx.vote.activity.obs.cn-south-1.myhuaweicloud.com:443/2603aec6466f4b5fb7010df377b0c680-%E6%97%A0%E6%95%B0%E6%8D%AE.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
 		}
 	},
 	// 国际化配置

+ 2 - 6
utils/mixin.js

@@ -63,12 +63,8 @@ let page = {
 				phone:this.vuex_phone
 			}
 			let res=await this.$api.CMCC.isCMCC(params)
-			this.$u.vuex('vuex_isCMCC',!res.data.data)
-			if (this.vuex_isCMCC) {
-				uni.navigateTo({
-					url:"/pages/webview/webview?mobile="+this.vuex_phone
-				})
-			}
+			console.log(res,"res....");
+			return res.data.data
 		},
 		phoneSuccess(){
 			console.log('手机号获取成功>>>>>>>>');