Parcourir la source

Merge branch 'master' of http://git.lcpcp.cc/root/lcoco

py il y a 2 ans
Parent
commit
bce0538b81

+ 1 - 0
README.md

@@ -1,5 +1,6 @@
 # 功能列表
 (优先做登录,首页,个人中心这三个部分,其余往后放)
+http://www.icoco.tech:9999/doc.html
 
 ## 1.登录&注册
 

+ 3 - 3
api/common.js

@@ -1,8 +1,8 @@
-import {request} from '../service/ajax.js'
+import {request} from '@/service/ajax'
 
-const commonUrl = '/api/common/'
+const commonUrl = '/utility/'
 // 发送短信
 export const commonSend = (data) => request(commonUrl + 'send', 'post', { ...data })
 // 获取sts
-export const getSts = (data) => request(commonUrl + 'sts', 'post', { ...data })
+export const getTxySts = (data) => request(commonUrl + 'credential', 'get', { ...data })
 

+ 5 - 0
main.js

@@ -5,6 +5,11 @@ import {
 	router,
 	RouterMount
 } from './service/router.js' //路径换成自己的
+import cosServe from "@/service/txOssSts";
+Vue.prototype.getCosPath = (urlName) => {
+	console.log('getCosPath:路径转换调用')
+	return cosServe.getSignUrl(urlName);
+};
 Vue.use(router)
 // #ifndef VUE3
 import Vue from 'vue'

+ 30 - 0
package-lock.json

@@ -6,6 +6,7 @@
     "": {
       "dependencies": {
         "animate.css": "^4.1.1",
+        "cos-js-sdk-v5": "^1.4.18",
         "inobounce": "^0.2.1",
         "jquery": "^3.6.4",
         "uni-read-pages": "^1.0.5",
@@ -56,11 +57,27 @@
         "source-map": "^0.6.1"
       }
     },
+    "node_modules/@xmldom/xmldom": {
+      "version": "0.8.8",
+      "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
+      "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==",
+      "engines": {
+        "node": ">=10.0.0"
+      }
+    },
     "node_modules/animate.css": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
       "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
     },
+    "node_modules/cos-js-sdk-v5": {
+      "version": "1.4.18",
+      "resolved": "https://registry.npmjs.org/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.18.tgz",
+      "integrity": "sha512-vTy8p59qnEoNJH/1chBSU8lSJDEcKV5PeOlAngmPbmHEwoMNJmKmA71nnquGIWHI4KpR4n57yC+RKP6RZkgsBg==",
+      "dependencies": {
+        "@xmldom/xmldom": "^0.8.6"
+      }
+    },
     "node_modules/crypto-js": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
@@ -211,11 +228,24 @@
         "source-map": "^0.6.1"
       }
     },
+    "@xmldom/xmldom": {
+      "version": "0.8.8",
+      "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
+      "integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
+    },
     "animate.css": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
       "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
     },
+    "cos-js-sdk-v5": {
+      "version": "1.4.18",
+      "resolved": "https://registry.npmjs.org/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.18.tgz",
+      "integrity": "sha512-vTy8p59qnEoNJH/1chBSU8lSJDEcKV5PeOlAngmPbmHEwoMNJmKmA71nnquGIWHI4KpR4n57yC+RKP6RZkgsBg==",
+      "requires": {
+        "@xmldom/xmldom": "^0.8.6"
+      }
+    },
     "crypto-js": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",

+ 1 - 0
package.json

@@ -1,6 +1,7 @@
 {
   "dependencies": {
     "animate.css": "^4.1.1",
+    "cos-js-sdk-v5": "^1.4.18",
     "inobounce": "^0.2.1",
     "jquery": "^3.6.4",
     "uni-read-pages": "^1.0.5",

+ 16 - 1
pages.json

@@ -398,6 +398,21 @@
 	    "navigationBarTitleText": "",
 	    "enablePullDownRefresh": false
 	  }
+	},
+	{
+	  "path": "pages/wallet/like-me",
+	  "style": {
+	    "navigationBarTitleText": "",
+	    "enablePullDownRefresh": false
+	  }
+	},
+	{
+	  "path": "pages/wallet/wave-point",
+	  "style": {
+	    "navigationBarTitleText": "",
+	    "enablePullDownRefresh": false,
+		"navigationBarTextStyle": "white"
+	  }
 	}
   ],
   "globalStyle": {
@@ -412,7 +427,7 @@
     "list": [
       {
         "name": "列表调试",
-        "path": "pages/login/index",
+        "path": "/pages/perfect/cards",
         "query": ""
       }
     ]

+ 1 - 0
pages/login/model/loginContent.nvue

@@ -55,6 +55,7 @@ export default {
         console.log(res)
         console.log(res.errCode)
         console.log(res.errMsg)
+        that.isPreLogin=false
       }
     })
     //#endif

+ 10 - 2
pages/my/index.vue

@@ -53,7 +53,7 @@
                 </view>
                 <view class="statistics-text sys-color-gray-9 sys-weight-400">访客</view>
               </view>
-              <view class="statistics-item">
+              <view class="statistics-item" @click="goToUrl(7)">
                 <view class="statistics-num sys-color-black sys-weight-600">
                   165
                   <view class="statistics-dot sys-color-white">..</view>
@@ -145,6 +145,9 @@ export default {
 		  })
 	  }else if(type === 3){
 		  // 波点兑换
+		  uni.navigateTo({
+		    'url':'/pages/wallet/wave-point'
+		  })
 	  }else if(type === 4){
 		  // 礼物墙
 		  uni.navigateTo({
@@ -153,13 +156,18 @@ export default {
 	  }else if(type === 5){
 		  // 喜欢的人
 		  uni.navigateTo({
-		    'url':'/pages/wallet/like-user'
+		    'url':'/pages/wallet/like-user?isUrlType=1'
 		  })
 	  }else if(type === 6){
 		  // 喜欢的人
 		  uni.navigateTo({
 		    'url':'/pages/wallet/visitor'
 		  })
+	  }else if(type === 7){
+		  // 喜欢我的人
+		  uni.navigateTo({
+		    'url':'/pages/wallet/like-me'
+		  })
 	  }
     }
   }

+ 18 - 6
pages/perfect/cards.vue

@@ -11,7 +11,7 @@
           <text class="sys-color-green">真实照片</text>
           <text class="sys-color-gray-9">,否则部分功能可能会受限</text>
         </view>
-        <view class="card-img" :class="{'open-img':imgBg}" @click="openPopup" :style="{'height':'calc(100vh - '+navHeight+'px  - 278rpx - 270rpx - env(safe-area-inset-bottom)','background-image':'url('+imgBg+')'}">
+        <view class="card-img" :class="{'open-img':imgBg}" @click="openPopup" :style="{'height':'calc(100vh - '+navHeight+'px  - 278rpx - 270rpx - env(safe-area-inset-bottom)','background-image':'url('+getCosPath(imgBg)+')'}">
           <view class="add-box" v-if="!imgBg">
             <image class="add-img" src="/static/img/common/add.png" mode="aspectFill"></image>
           </view>
@@ -71,6 +71,7 @@ import tools from "@/service/tools";
 import LoginAgreement from "@/pages/login/model/loginAgreement";
 import EnPopup from "@/components/en-utils/en-popup/en-popup";
 import {register} from "@/api/login";
+import cosServe from "@/service/txOssSts";
 export default {
   components: {EnPopup, LoginAgreement, EnNav},
   data() {
@@ -94,12 +95,23 @@ export default {
         sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
         sourceType: ['album'], //从相册选择
         success:  (res) =>{
-          if(res.tempFilePaths.length>0){
-            this.imgBg=res.tempFilePaths[0]
-            this.imgList=res.tempFilePaths
+          console.log(res)
+          if(res.tempFiles.length>0){
+            console.log(res.tempFiles)
+            res.tempFiles.forEach((item,key)=>{
+              cosServe.txUploadFile(item,'gallery').then((res)=>{
+                if(key===0){
+                  this.imgBg=res.Location
+                  console.log('this.imgBg:'+this.imgBg)
+                  this.imgBg=cosServe.getSignUrl(this.imgBg)
+                  console.log(this.imgBg)
+                }
+                this.imgList.push(res.Location)
+              })
+            })
+            console.log( this.imgList)
             this.isOK=true
           }
-          console.log(JSON.stringify(res.tempFilePaths));
           this.$refs.cardPopup.close()
         }
       });
@@ -109,7 +121,7 @@ export default {
     },
     setNextStep(){
       if(this.isOK){
-       
+
         uni.switchTab({
           'url':'/pages/index/index'
         })

+ 14 - 2
pages/perfect/nickname.vue

@@ -34,6 +34,7 @@
 <script>
 import EnNav from "@/components/en-utils/en-nav/en-nav";
 import tools from "@/service/tools";
+import {register} from "@/api/login";
 export default {
   components: {EnNav},
   data() {
@@ -58,9 +59,20 @@ export default {
   methods: {
     setNextStep(){
       if(this.isOK){
-        uni.navigateTo({
-          'url':'/pages/perfect/cards'
+        let mobile=uni.getStorageSync('mobile')
+        let dateOfBirth=uni.getStorageSync('dateOfBirth')
+        let gender=uni.getStorageSync('gender')
+        register({'mobile':mobile,'dateOfBirth':dateOfBirth,'gender':gender,'nickname':this.nickname,'password':this.password}).then((res)=>{
+          if(res.code===0){
+            tools.setLoginData(res.data)
+            uni.navigateTo({
+              'url':'/pages/perfect/cards'
+            })
+          }else {
+            tools.error(res.msg)
+          }
         })
+
       }else {
         tools.error('请完善信息')
         this.isShakeBut=true

+ 284 - 0
pages/wallet/like-me.vue

@@ -0,0 +1,284 @@
+<template>
+	<view class="like-me flex-common-css box-sizing-border iPhone-bottom">
+		<Nav title='谁喜欢我' titleColor='#333' bgckgroundBox='#fff'></Nav>
+		
+		<scroll-view scroll-y="true" class="info-box box-sizing-border" 
+		 @scrolltolower="scrolltolower()" >
+			<view class="" :class="true?'flex-box':''">
+				<view class="card">
+					<view class="car-home">
+						<view class="car-info">
+							<view class="sys-size-40 sys-weight-600 sys-color-white">10000</view>
+							<view class="sys-size-24 sys-color-gray-9">最近收到</view>
+						</view>
+						<view class="car-info-xian"></view>
+						<view class="car-info">
+							<view class="sys-size-40 sys-weight-600 sys-color-white">100</view>
+							<view class="sys-size-24 sys-color-gray-9">收到的喜欢</view>
+						</view>
+					</view>
+					<image class="card-b-img" src="@/static/img/wallet/jiasu.png" mode="aspectFill"></image>
+				</view>
+				<view class="info-title">
+					<view class="title-box">
+						<image src="@/static/img/wallet/xd-black.png" mode="aspectFill"></image>
+						<text class="sys-size-32 sys-color-gray-3 sys-weight-600">心动擦亮</text>
+					</view>
+					<view class="title-box" @click="to(1)">
+						<text class="sys-size-24 sys-color-gray-9">全部</text>
+						<uni-icons type="forward" size="12" color="#999"></uni-icons>
+					</view>
+				</view>
+				<scroll-view scroll-x="true" class="x-scroll" @scrolltoupper="scrolltoupper">
+					<view class="x-box" v-for="(item,i) in 10" :key="i">
+						<image src="@/static/img/circle/1.png" mode="aspectFill"></image>
+						<view class="box-text sys-size-24 sys-color-white">24/处女座</view>
+					</view>
+				</scroll-view>
+				<view class="info-title">
+					<view class="title-box">
+						<image src="@/static/img/wallet/like-black.png" mode="aspectFill"></image>
+						<text class="sys-size-32 sys-color-gray-3 sys-weight-600">新的喜欢</text>
+					</view>
+				</view>
+				<!-- <view class="y-list">
+					<view class="y-box" v-for="(item,i) in 10" :key="i">
+						<image src="@/static/img/circle/1.png" mode="aspectFill"></image>
+						<view class="list-info box-sizing-border">
+							<view class="">
+								<view class="info-name sys-size-36 sys-color-white sys-weight-600 sys-webkit-box">仰看辉煌仰看辉煌仰看辉煌</view>
+								<view class="sys-size-24 sys-color-white">18/女/处女座</view>
+							</view>
+							<view class="info-right" @click="to(2)">	
+								<image src="@/static/img/wallet/s-xin.png" mode="aspectFill"></image>
+								<image src="@/static/img/wallet/n-xin.png" mode="aspectFill"></image>
+							</view>
+						</view>
+					</view>
+				</view> -->
+				<view class="n-list y-list">
+					<view class="y-box" v-for="(item,i) in 4" :key="i">
+						<image class="image-1" src="@/static/img/circle/1.png" mode="aspectFill"></image>
+						<view class="list-info box-sizing-border">
+							<view class="">
+								<view class="info-name-1"></view>
+								<view class="info-name-1"></view>
+							</view>
+							<image class="image-2" src="@/static/img/wallet/n-xin.png" mode="aspectFill"></image>
+						</view>
+					</view>
+					<view class="list-m">
+						<view class="list-m-b box-sizing-border">
+							<view class="b-view sys-size-32 sys-color-gray-3">
+								<uni-icons type="locked-filled" size="14" color="#333"></uni-icons>
+								立即解锁
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return{
+				
+			}
+		},
+		methods:{
+			scrolltoupper(){
+				// x 轴触底
+			},
+			scrolltolower(){
+				// y 轴触底
+				console.log('触底');
+			},
+			to(type,item){
+				if(type === 1){
+					// 更多心动擦亮
+					uni.navigateTo({
+					  'url':'/pages/wallet/like-user?isUrlType=2'
+					})
+				}
+			},
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.like-me{
+		.flex-box{
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			.n-list{
+				width: 100%;
+				flex: 1;
+				overflow: hidden;
+				position: relative;
+				.list-m{
+					width: 100%;
+					height: 100%;
+					background: rgba(255,255,255,0.6);
+					position: absolute;
+					top:0;
+					left: 0;
+					z-index: 110;
+					.list-m-b{
+						position: absolute;
+						bottom: 0;
+						z-index: 130;
+						width: 100%;
+						height: 190rpx;
+						background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
+						padding-top: 70rpx;
+						.b-view{
+							margin: 0 auto;
+							width: 590rpx;
+							height: 88rpx;
+							background: #FFC107;
+							border-radius: 200rpx;
+							line-height: 88rpx;
+							text-align: center;
+						}
+					}
+				}
+			}
+		}
+		.info-box{
+			flex: 1;
+			overflow: auto;
+			padding: 32rpx;
+			.info-title{
+				display: flex;
+				justify-content: space-between;
+				.title-box{
+					line-height: 20rpx;
+					display: flex;
+					align-items: center;
+					image{
+						width: 40rpx;
+						height: 40rpx;
+						margin-right: 8rpx;
+					}
+				}
+			}
+			.y-list{
+				display: flex;
+				justify-content: space-between;
+				flex-flow: row wrap;
+				margin-top: 32rpx;
+				.y-box{
+					width: 334rpx;
+					height: 440rpx;
+					margin-bottom: 18rpx;
+					border-radius: 20rpx;
+					position: relative;
+					.image-1{
+						width: 334rpx;
+						height: 440rpx;
+						border-radius: 20rpx;
+						
+					}
+					.list-info{
+						width: 334rpx;
+						padding: 24rpx;
+						z-index: 14;
+						position: absolute;
+						bottom: 0;
+						display: flex;
+						justify-content: space-between;
+						.info-name{
+							width: 200rpx;
+							margin-bottom: 4rpx;
+						}
+						.info-name-1{
+							margin-top: 16rpx;
+							width: 154rpx;
+							height: 16rpx;
+							background: #D9D9D9;
+							border-radius: 200rpx;
+						}
+						.info-right{
+							width: 80rpx;
+							height: 80rpx;
+							background-color: #fff;
+							border-radius: 50%;
+							text-align: center;
+							image{
+								width: 52rpx;
+								height: 52rpx;
+								margin-top: 14rpx;
+							}
+						}
+						.image-2{
+							width: 80rpx;
+							height: 80rpx;
+							border-radius: 50%;
+						}
+					}
+				}
+			}
+			.x-scroll{
+				width: 100%;
+				height: 212rpx;
+				white-space: nowrap;
+				display: flex;
+				padding: 36rpx 0;
+				.x-box{
+					display: inline-block;
+					width: 160rpx;
+					height: 212rpx;
+					border-radius: 12rpx;
+					margin-right: 16rpx;
+					position: relative;
+					.box-text{
+						position: absolute;
+						bottom: 8rpx;
+						left: 8rpx;
+					}
+					image{
+						width: 160rpx;
+						height: 212rpx;
+						border-radius: 12rpx;
+					}
+				}
+			}
+		}
+		.card{
+			width: 100%;
+			height: 302rpx;
+			border-radius: 16rpx;
+			background: url('@/static/img/wallet/like-me.png') no-repeat;
+			background-size: 100% 100%;
+			padding: 24rpx 30rpx;
+			box-sizing: border-box;
+			margin-bottom: 46rpx;
+			.car-home{
+				display: flex;
+				align-items: center;
+				.car-info{
+					min-width: 120rpx;
+					text-align: center;
+				}
+				.car-info-xian{
+					width: 2rpx;
+					height: 62rpx;
+					background-color: #999;
+					margin: 0 80rpx;
+				}
+			}
+			.card-b-img{
+				margin-top: 60rpx;
+				width: 100%;
+				height: 108rpx;
+				border-radius: 16rpx;
+			}
+		}
+		
+	}
+</style>

+ 25 - 5
pages/wallet/like-user.vue

@@ -1,13 +1,14 @@
 <template>
 	<view class="like-user flex-common-css box-sizing-border iPhone-bottom">
-		<Nav title='喜欢的人' titleColor='#333' :rightShow='true' :rightType='2'>
+		<Nav :title='title' titleColor='#333' :rightShow='true' :rightType='2'>
 			<template v-slot:right>
-				<image @click="to(1)" class="nav-img" src="@/static/img/wallet/sd.png" mode="aspectFill"></image>
+				<image v-if="isUrlType === 1" @click="to(1)" class="nav-img" src="@/static/img/wallet/sd.png" mode="aspectFill"></image>
 			</template>
 		</Nav>
 		<view class="like-text">
-			<image src="@/static/img/wallet/h.png" mode="aspectFill"></image>
-			<text class="sys-size-28 sys-color-gray-3">送出小花,搭讪心仪的他</text>
+			<image v-if="isUrlType === 1" src="@/static/img/wallet/h.png" mode="aspectFill"></image>
+			<image v-else src="@/static/img/wallet/xd-black.png" mode="aspectFill"></image>
+			<text class="sys-size-28 sys-color-gray-3">{{isUrlType===1?'送出小花,搭讪心仪的他':'点击喜欢直接匹配'}}</text>
 		</view>
 		
 		<view v-if="false" class="no-list sys-size-28 sys-color-gray-9">暂无心动</view>
@@ -24,9 +25,13 @@
 							<view class="info-name sys-size-36 sys-color-white sys-weight-600 sys-webkit-box">仰看辉煌仰看辉煌仰看辉煌</view>
 							<view class="sys-size-24 sys-color-white">18/女/处女座</view>
 						</view>
-						<view class="info-right" @click="to(2)">	
+						<view v-if="isUrlType===1" class="info-right" @click="to(2)">	
 							<image src="@/static/img/wallet/h.png" mode="aspectFill"></image>
 						</view>
+						<view v-else class="">
+							<image class="image-2" src="@/static/img/wallet/s-xin.png" mode="aspectFill"></image>
+							<!-- <image class="image-2" src="@/static/img/wallet/n-xin.png" mode="aspectFill"></image> -->
+						</view>
 					</view>
 				</view>
 			</view>
@@ -38,11 +43,21 @@
 	export default {
 		data(){
 			return{
+				title:'',
+				isUrlType:1,//1 喜欢的人 2 心动擦亮
 				page:1,
 				total:0,
 				list:[],
 			}
 		},
+		onLoad(e) {
+			this.isUrlType = e.isUrlType * 1
+			if(this.isUrlType === 1){
+				this.title = '喜欢的人';
+			}else{
+				this.title = '心动擦亮';
+			}
+		},
 		methods:{
 			scrolltolower(){
 				// 触底
@@ -119,6 +134,11 @@
 							margin-top: 14rpx;
 						}
 					}
+					.image-2{
+						width: 80rpx;
+						height: 80rpx;
+						border-radius: 50%;
+					}
 				}
 				.image-bg{
 					position: absolute;

+ 79 - 4
pages/wallet/visitor.vue

@@ -13,13 +13,32 @@
 		
 		<scroll-view v-else scroll-y="true" class="list-scroll box-sizing-border" @scrolltolower="scrolltolower">
 			<view class="list-home">
-				<view class="list-box box-sizing-border">
+				<view class="list-box box-sizing-border" v-for="(item,i) in 10" :key="i">
 					<view class="box-head">
 						<image src="@/static/img/circle/1.png" mode="aspectFill"></image>
-						<view class="head-icon">√</view>
+						<view class="head-icon" :class="true?'view-1':'view-2'">
+							<uni-icons v-if="true" type="checkmarkempty" size="10" color="#fff"></uni-icons>
+						</view>
 					</view>
 					<view class="box-right">
-						
+						<view class="box-1">
+							<view class="">
+								<view class="box-name sys-size-32 sys-color-gray-3 sys-weight-600">
+									WANGXIAOMI
+									<image class="img-vip" src="@/static/img/wallet/vip-type.png" mode="aspectFill"></image>
+									<!-- <image class="img-svip" src="@/static/img/wallet/vip-type.png" mode="aspectFill"></image> -->
+								</view>
+								<view class="sys-size-28 sys-color-gray-9">2小时前 8.06km</view>
+							</view>
+							<view class="list-h">
+								<image src="@/static/img/wallet/h.png" mode="aspectFill"></image>
+							</view>
+						</view>
+						<view class="img-list" v-if="i>5">
+							<image v-for="(v,x) in 4" :key="x"
+							src="@/static/img/circle/1.png" mode="aspectFill"></image>
+							<view class="img-oly" v-if="4>3&&4%3!=0"></view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -29,6 +48,13 @@
 
 <script>
 	export default {
+		data(){
+			return{
+				page:1,
+				total:0,
+				list:[],
+			}
+		},
 		methods:{
 			scrolltolower(){
 				// 触底
@@ -63,6 +89,7 @@
 			padding: 32rpx;
 			.list-home{
 				.list-box{
+					margin-bottom: 40rpx;
 					display: flex;
 					.box-head{
 						width: 112rpx;
@@ -81,18 +108,66 @@
 							z-index: 10;
 							width: 25rpx;
 							height: 25rpx;
+							line-height: 20rpx;
+							text-align: center;
 							border-radius: 50%;
 							border: 2rpx solid #fff;
 						}
 						.view-1{
 							background: #FEC631;
 						}
-						.view-1{
+						.view-2{
 							background: #4BC285;
 						}
 					}
 					.box-right{
 						flex: 1;
+						.box-1{
+							display: flex;
+							justify-content: space-between;
+							.list-h{
+								width: 80rpx;
+								height: 80rpx;
+								background-color: #eee;
+								border-radius: 50%;
+								text-align: center;
+								margin-top: 16rpx;
+								image{
+									width: 52rpx;
+									height: 52rpx;
+									margin-top: 14rpx;
+								}
+							}
+							.box-name{
+								display: flex;
+								align-items: center;
+								margin: 10rpx 0 4rpx 0;
+								.img-vip{
+									width: 84rpx;
+									height: 28rpx;
+								}
+								.img-svip{
+									width: 92rpx;
+									height: 28rpx;
+								}
+							}
+						}
+						.img-list{
+							margin-top: 18rpx;
+							display: flex;
+							justify-content: space-between;
+							flex-flow: row wrap; 
+							image{
+								width: 180rpx;
+								height: 180rpx;
+								border-radius: 16rpx;
+								margin-bottom: 8rpx;
+							}
+							.img-oly{
+								width: 180rpx;
+								height: 180rpx;
+							}
+						}
 					}
 				}
 			}

+ 161 - 0
pages/wallet/wave-point.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="wave-point flex-common-css box-sizing-border iPhone-bottom">
+		<Nav class='nav-view' :title="isScroll?'波点兑换中心':''" :titleColor="isScroll?'#333':'#fff'" 
+		:bgckgroundBox="isScroll?'#fff':'transparent'" :rightShow='true' :rightType='2'>
+			<template v-slot:right>
+				<view class="nav-right-box sys-size-24" :class="isScroll?'view-n':'view-s'">兑换记录</view>
+			</template>
+		</Nav>
+		<image class="bg-img" src="@/static/img/wallet/bd-bg.png" mode="aspectFill"></image>
+		<view class="nav-box">
+			<view :class="navId === item.id?'text-s':'text-n'" 
+			v-for="(item,i) in navList" :key="i" @click="select(item,i)">
+				{{item.name}}
+			</view>
+			<view class="nav-only" :style="{left:navLeft+'rpx',}"></view>
+		</view>
+		<scroll-view scroll-y="true" class="list-scroll" @scrolltolower="scrolltolower">
+			<view class="list-home">
+				<view class="list-box" v-for="(item,i) in 10" :key="i">
+					<view class="box-top">
+						<view class="box-1 sys-size-24">剩余0</view>
+						<image class="type-3" src="@/static/img/circle/1.png" mode="scaleToFill"></image>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return{
+				isScroll:false,
+				navId:1,
+				navIndex:0,
+				navLeft:110, //差值250 起点110
+				navList:[{name:'特权',id:1},{name:'道具',id:2},{name:'其他',id:3},],
+			}
+		},
+		methods:{
+			scrolltolower(){
+				console.log('触底');
+			},
+			select(item,i){
+				if(this.navId!=item.id){
+					this.navId =item.id;
+					this.navIndex = i;
+					this.navLeft = i * 250 + 110;
+				}
+			},
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.wave-point{
+		position: relative;
+		.bg-img{
+			width: 100%;
+			height: 690rpx;
+		}
+		.nav-view{
+			position: absolute;
+			top: 0;
+			left: 0;
+			.nav-right-box{
+				width: 120rpx;
+				height: 34rpx;
+				background: rgba(235,235,235,0.14);
+				border-radius: 200rpx;
+				line-height: 34rpx;
+				text-align: center;
+			}
+			.view-s{
+				border: 1rpx solid #F9F9F9;
+				color: #fff;
+			}
+			.view-n{
+				border: 1rpx solid #333;
+				color: #333;
+			}
+		}
+		.nav-box{
+			background-color: #081432;
+			width: 100%;
+			height: 116rpx;
+			display: flex;
+			align-items: center;
+			position: relative;
+			.nav-only{
+				width: 36rpx;
+				height: 4rpx;
+				background-color: #fff;
+				position: absolute;
+				bottom: 20rpx;
+				transition: left 0.5s;
+			}
+			view{
+				flex: 1;
+				text-align: center;
+				line-height: 116rpx;
+			}
+			.text-s{
+				color: #fff;
+				font-weight: 600;
+				font-size: 36rpx;
+				transition: all 0.5; 
+			}
+			.text-n{
+				color: #525A6E;
+				font-size: 32rpx;
+				transition: all 0.5; 
+			}
+		}
+		.list-scroll{
+			background-color: #081432;
+			flex: 1;
+			overflow: auto;
+			.list-home{
+				display: flex;
+				justify-content: space-between;
+				flex-flow: row wrap;
+				box-sizing: border-box;
+				padding: 0 32rpx;
+				.list-box{
+					width: 333rpx;
+					height: 444rpx;
+					background: url('@/static/img/wallet/shop-bg.png') no-repeat;
+					background-size: 100% 100%;
+					margin-bottom: 28rpx;
+					.box-top{
+						width: 313rpx;
+						height: 264rpx;
+						margin:2rpx 8rpx 10rpx 10rpx;
+						position: relative;
+						.type-3{
+							width: 100%;
+							height: 100%;
+						}
+						.box-1{
+							z-index: 100 !important;
+							position: absolute;
+							bottom: -2rpx;
+							right: -2rpx;
+							width: 84rpx;
+							height: 36rpx;
+							line-height: 36rpx;
+							text-align: center;
+							border-radius: 10rpx 0rpx 0rpx 0rpx;
+							border: 2rpx solid #1F3F7B;
+							color: #5D6473;
+							background: #182137;
+						}
+					}
+				}
+			}
+			
+		}
+	}
+</style>

+ 2 - 2
service/ajax.js

@@ -28,9 +28,9 @@ export const request = (url, method, data, show = false) => {
       method: method || 'post',
       header: {
         'content-type': 'application/json',
-        'apikey': '01ABA77B8BA6F26243D85B5A50FFB88624951C7B3A4078B3F9971983E667D5B8',
         'hversion': '1.0',
-        'Authorization': token
+        'Authorization': 'Bearer cd58ee97-5700-45f3-ae1f-9bebef504fc1'
+        // 'Authorization': 'Bearer '+token
       },
       success: (res) => {
         if (res.statusCode === 200) {

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
service/cos-wx-sdk-v5.min.js


+ 38 - 0
service/tools.js

@@ -278,6 +278,24 @@ tools.leftClick = function () {
     }
 }
 
+tools.getDate = function () {
+    let myDate = new Date();
+    // let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
+    // let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
+    // let myToday = myDate.getDate(); //获取当前日(1-31)
+    // let myDay = myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
+    // let myHour = myDate.getHours(); //获取当前小时数(0-23)
+    // let myMinute = myDate.getMinutes(); //获取当前分钟数(0-59)
+    // let mySecond = myDate.getSeconds(); //获取当前秒数(0-59)
+    return myDate.getFullYear() + '-' + (myDate.getMonth() + 1) + '-' + myDate.getDate()
+}
+
+tools.getRandFileName = function (filePath)
+{
+    let extIndex = filePath.lastIndexOf('.');
+    let extName = extIndex === -1 ? '' : filePath.substr(extIndex);
+    return parseInt('' + Date.now() + Math.floor(Math.random() * 900 + 100), 10).toString(36) + extName;
+}
 /**
  * 自定义 获取指定日期到当前日期的 所有年 or 年月
  */
@@ -354,7 +372,27 @@ tools.setLoginData = function (data) {
     //     }
     // }, 1500)
 
+
 }
 
+tools.setCosToken=function (data){
+    uni.setStorageSync('cosToken',data)
+}
+tools.delCosToken=function (data){
+    uni.removeStorageSync('cosToken')
+}
+
+tools.getCosToken=function (){
+  let cosToken= uni.getStorageSync('cosToken')
+    if(!cosToken){
+        return undefined
+    }
+    let time=new Date().getTime()
+    if(cosToken.expiredTime && (cosToken.expiredTime*1000)-time >100000){
+        return  cosToken
+    }else {
+        return undefined
+    }
+}
 
 export default tools

+ 138 - 0
service/txOssSts.js

@@ -0,0 +1,138 @@
+/**
+ * 微信小程序通过STS直传阿里云OSS
+ *(uniapp版上传,小程序原生需要将uni.XXX替换为wx.XXX)
+ *
+ * @param {filePath} 图片临时地址
+ * @param {option|Object} OSS和STS配置
+ * @param {savePath} oss中的文件目录
+ * @param {AccessKeySecret} 服务端返回的STS中的AccessKeySecret
+ * @param {SecurityToken} 服务端返回的STS中的SecurityToken
+ * @param {AccessKeyId} 服务端返回的STS中的AccessKeyId
+ * @param {bucket} 存储桶
+ * @param {area} 地区
+ * @return {string|boolean} 成功返回文件地址,失败返回false
+ */
+import COS from "cos-js-sdk-v5"
+import tools from "./tools";
+import {getTxySts} from "@/api/common";
+
+
+
+// 存储桶名称,由bucketname-appid 组成,appid必须填入,可以在COS控制台查看存储桶名称。 https://console.cloud.tencent.com/cos5/bucket
+let Bucket = 'icoco-1317650740';
+// 存储桶Region可以在COS控制台指定存储桶的概览页查看 https://console.cloud.tencent.com/cos5/bucket/
+// 关于地域的详情见 https://cloud.tencent.com/document/product/436/6224
+let Region = 'ap-guangzhou';
+
+let cos=null;
+function startCos(){
+    console.log('startCos-----------------')
+    cos = new COS({
+        getAuthorization: function (options, callback) {
+            console.log('---------------获取初始化信息')
+            let  cosToken=tools.getCosToken()
+            if(cosToken){
+                callback({
+                    TmpSecretId: cosToken.credentials.tmpSecretId,
+                    TmpSecretKey: cosToken.credentials.tmpSecretKey,
+                    XCosSecurityToken: cosToken.credentials.sessionToken,
+                    StartTime: cosToken.startTime*1, // 时间戳,单位秒,如:1580000000,建议返回服务器时间作为签名的开始时间,避免用户浏览器本地时间偏差过大导致签名错误
+                    ExpiredTime: cosToken.expiredTime*1, // 时间戳,单位秒,如:1580000900
+                })
+            }else {
+                getTxySts().then((res)=>{
+
+                    console.log('---------------获取初始化信息')
+                    if(res.code===0){
+                        tools.setCosToken(res.data)
+                        callback({
+                            TmpSecretId: res.data.credentials.tmpSecretId,
+                            TmpSecretKey: res.data.credentials.tmpSecretKey,
+                            XCosSecurityToken: res.data.credentials.sessionToken,
+                            StartTime: res.data.startTime*1, // 时间戳,单位秒,如:1580000000,建议返回服务器时间作为签名的开始时间,避免用户浏览器本地时间偏差过大导致签名错误
+                            ExpiredTime: res.data.expiredTime*1, // 时间戳,单位秒,如:1580000900
+                        })
+                        setTimeout(()=>{
+                            cos=null
+                            tools.delCosToken()
+                        },(res.data.expiredTime-res.data.startTime))
+                    }
+                })
+            }
+
+
+        }
+    });
+}
+let cosServe={}
+/**
+ * COS文件上传
+ * @param file
+ * @param folder 上传目录
+ * @returns {Promise<unknown>}
+ */
+cosServe.txUploadFile=function (file,folder){
+    if(cos===null){
+        console.log('对象初始化')
+        //初始化对象
+        startCos();
+    }
+    //默认为个人目录gallery
+    folder=folder==='moment'?'moment':'gallery'
+    tools.showLoading()
+    return new Promise((resolve, reject) => {
+        console.log('cos-*-------------------------',cos)
+        console.log(file)
+        console.log(folder+'/'+tools.getDate()+tools.getRandFileName(file.name))
+        // 分片上传文件
+        cos.putObject({
+            Bucket: Bucket,
+            Region: Region,
+            Key: folder+'/'+tools.getDate()+'/'+tools.getRandFileName(file.name),
+            Body: file,
+            onHashProgress: function (progressData) {
+                console.log('校验中', JSON.stringify(progressData));
+            },
+            onProgress: function (progressData) {
+                console.log('上传中', JSON.stringify(progressData));
+            },
+        }, function (err, data) {
+            tools.hideLoading()
+            console.log(err);
+            console.log(data);
+            if(data.Location!==undefined){
+                data.Location='https://'+data.Location;
+                resolve( data)
+            }else {
+                resolve( false)
+            }
+
+        });
+    })
+
+}
+
+
+cosServe.getSignUrl=function (url){
+    if(cos===null){
+        startCos();
+    }
+    console.log(url)
+    url= url.replace('https://','')
+    url= url.replace('http://','')
+    url= url.replace('icoco-1317650740.cos.ap-guangzhou.myqcloud.com','')
+    console.log(url)
+    console.log('开始签名----------------------------'+url)
+    let newUrl= cos.getObjectUrl({
+        Bucket: Bucket,
+        Region: Region,
+        Key: url, /* 存储在桶里的对象键(例如1.jpg,a/b/test.txt),支持中文,必须字段 */
+        Sign: true,
+    })
+    console.log('签名完成----------------------------'+newUrl)
+    console.log(newUrl)
+    return newUrl
+}
+
+
+export default cosServe

+ 3 - 0
static/css/sys.css

@@ -54,6 +54,9 @@
 .sys-size-40{
   font-size: 40rpx;
 }
+.sys-size-48{
+  font-size: 48rpx;
+}
 .sys-size-52{
   font-size: 52rpx;
 }

BIN
static/img/wallet/bd-bg.png


BIN
static/img/wallet/dh.png


BIN
static/img/wallet/fj.png


BIN
static/img/wallet/jiasu.png


BIN
static/img/wallet/like-black.png


BIN
static/img/wallet/like-me.png


BIN
static/img/wallet/n-xin.png


BIN
static/img/wallet/s-xin.png


BIN
static/img/wallet/shop-bg.png


BIN
static/img/wallet/super.png


BIN
static/img/wallet/svip-shop.png


BIN
static/img/wallet/vip-shop.png


BIN
static/img/wallet/x-shop.png


BIN
static/img/wallet/xd-black.png


BIN
static/img/wallet/yqg.png


+ 8 - 0
uniCloud-aliyun/cloudfunctions/getPhone/index.js

@@ -0,0 +1,8 @@
+'use strict';
+exports.main = async (event, context) => {
+	//event为客户端上传的参数
+	console.log('event : ', event)
+	
+	//返回数据给客户端
+	return event
+};

+ 8 - 0
uniCloud-aliyun/cloudfunctions/getPhone/package.json

@@ -0,0 +1,8 @@
+{
+  "name": "getPhone",
+  "dependencies": {},
+  "extensions": {
+    "uni-cloud-jql": {},
+    "uni-cloud-verify": {}
+  }
+}

+ 12 - 0
yarn.lock

@@ -28,11 +28,23 @@
     "postcss" "^8.4.14"
     "source-map" "^0.6.1"
 
+"@xmldom/xmldom@^0.8.6":
+  "integrity" "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
+  "resolved" "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz"
+  "version" "0.8.8"
+
 "animate.css@^4.1.1":
   "integrity" "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ=="
   "resolved" "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz"
   "version" "4.1.1"
 
+"cos-js-sdk-v5@^1.4.18":
+  "integrity" "sha512-vTy8p59qnEoNJH/1chBSU8lSJDEcKV5PeOlAngmPbmHEwoMNJmKmA71nnquGIWHI4KpR4n57yC+RKP6RZkgsBg=="
+  "resolved" "https://registry.npmjs.org/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.18.tgz"
+  "version" "1.4.18"
+  dependencies:
+    "@xmldom/xmldom" "^0.8.6"
+
 "crypto-js@^4.1.1":
   "integrity" "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
   "resolved" "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz"

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff