lyqu 4 jaren geleden
bovenliggende
commit
6477fb694d
3 gewijzigde bestanden met toevoegingen van 39 en 15 verwijderingen
  1. 18 1
      common/http/http.api.js
  2. 1 1
      components/homeViews/mine-view.vue
  3. 20 13
      pages/activityList/mine/introduction.vue

+ 18 - 1
common/http/http.api.js

@@ -77,6 +77,15 @@ let pointsGoodsUrl={
 	getUsableHotAndPoints:'cyzh-userActivityStatistical/useractivitystatistical/getUsableHotAndPoints'
 }
 
+let dictUrl = {
+	codeUrl: '/blade-system/dict-biz/dictionary',
+}
+
+let verificateUrl = {
+	getCodeUrl: 'huawei/sms/sendSms',
+	verificationCodeUrl: 'huawei/sms/validCode'
+}
+
 let musicBoostUrl = {
 	detailUrl: '/cyzh-production/production/getProductDetail'
 }
@@ -167,9 +176,17 @@ const install = (Vue, vm) => {
 		initOrder:(params = {}) => vm.$u.post(yeePayUrl.initOrder, params),
 	}
 	
+	let dict = {
+		code:(params = {}) => vm.$u.get(dictUrl.codeUrl, params),
+	}
+	
+	let verificate = {
+		getCode:(params = {}) => vm.$u.get(verificateUrl.getCodeUrl, params),
+		verificateCode:(params = {}) => vm.$u.post(verificateUrl.verificationCodeUrl, params),
+	}
 
 	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
-	vm.$u.api = {wxInfo,uploadFile, activity, user, points, boost,production,goods,medal,pointsGoods, musicBoost,yeePay};
+	vm.$u.api = {wxInfo,uploadFile, activity, user, points, boost,production,goods,medal,pointsGoods, musicBoost,yeePay,dict,verificate};
 }
 
 export default {

+ 1 - 1
components/homeViews/mine-view.vue

@@ -96,7 +96,7 @@
 				iconList: [
 					{name: '我的礼品', icon: '/static/icon-gift.png', width: '36upx', height: '33upx', url: '/pages/activityList/mine/myGift', show: true},
 					{name: '我的商品', icon: '/static/icon-delivery.png', width: '36upx', height: '36upx', url: '/pages/activityList/mine/pointsGoods/list', show: true},
-					{name: '我的音乐', icon: '/static/icon-music.png', width: '33upx', height: '32upx', url: '/pages/activityList/mine/myMusic', show: true},
+					{name: '我的作品', icon: '/static/icon-music.png', width: '33upx', height: '32upx', url: '/pages/activityList/mine/myMusic', show: true},
 					{name: '我的助力', icon: '/static/icon-history.png', width: '32upx', height: '32upx', url: '/pages/activityList/mine/myBoost', show: true},
 					{name: '我的公益', icon: '/static/icon-welfare.png', width: '31upx', height: '31upx', url: '/pages/activityList/mine/myWelfare', show: true},
 					{name: '分割线', icon: '', width: '', height: '', url: ''},

+ 20 - 13
pages/activityList/mine/introduction.vue

@@ -8,7 +8,7 @@
 		</block>
 		<view class="container" style="margin: -60upx 20upx 20upx 20upx;">
 			<view class="text-center">
-				<view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ detail.loginWebVO.avatar +')'}]"></view>
+				<view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ detail.avatar +')'}]"></view>
 				<view class="padding-tb-xs" style="font-size: 38upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{detail.personName}}</view>
 				<view class="flex justify-center align-center">
 					<view class="padding-right-sm" style="font-size: 30upx;font-family: PingFang SC;font-weight: 800;color: #222222;">{{+detail.hotValue}}</view>
@@ -31,7 +31,7 @@
 			cid="qrcode" 
 			ref="qrcode" 
 			:val="val" 
-			:size="size" 
+			:size="qrSize" 
 			:onval="onval" 
 			:loadMake="loadMake" 
 			:usingComponents="true"
@@ -80,7 +80,7 @@
 		data() {
 			return {
 				val: '', // 要生成的二维码值
-				size: 200, // 二维码大小
+				qrSize: 200, // 二维码大小
 				//unit: 'upx', // 单位
 				//icon: '', // 二维码图标
 				//iconsize: 40, // 二维码图标大小
@@ -112,6 +112,12 @@
 			this.productId = options.id;
 			this.getProductInfo();
 			this.getHelpRecord();
+			let userId = uni.getStorageSync("userId");
+			if (!this.$u.test.isEmpty(userId)) {
+				this.val = "https://yyzs.nanyue6688.com/vote-h5/index.html#/pages/activityList/activity/musicBoost?id=" + this.productId + "&agenterId=" + userId;
+			} else {
+				this.val = "https://yyzs.nanyue6688.com/vote-h5/index.html#/pages/activityList/activity/musicBoost?id=" + this.productId;
+			}
 		},
 		onReachBottom() {
 			if (this.boostList.length < this.current * this.size) {
@@ -159,6 +165,14 @@
 			},
 			pyqShare() {
 				this.qrCode = true;
+			},
+			qrR(res) {
+				base64ToPath(res).then(res => {
+					this.works.qrcode = res;
+					this.posterInfo();
+				});
+			},
+			posterInfo() {
 				uni.showLoading({
 				    title: '制作海报中...',
 					mask: true
@@ -173,17 +187,10 @@
 				this.works.rank = this.detail.rank;
 				this.works.name = this.detail.personName;
 				setTimeout(() => {
-					this.ctx.draw(true,()=>{
-						uni.hideLoading()
-						this.$refs.myCard.showCanvas();
-					})
+					uni.hideLoading()
+					this.$refs.myCard.showCanvas();
 				},800)
-			},
-			qrR(res) {
-				base64ToPath(res).then(res => {
-					this.works.qrcode = res;
-				});
-			},
+			}
 		}
 	}
 </script>