ruanzb 4 ani în urmă
părinte
comite
79c68567f5
6 a modificat fișierele cu 39 adăugiri și 9 ștergeri
  1. 1 1
      assets/http/api.js
  2. 5 1
      main.js
  3. 19 1
      pages.json
  4. 10 2
      pages/consume/comps/card2.vue
  5. 2 0
      pages/mine/mine.vue
  6. 2 4
      pages/mine/my-points/my-points.vue

+ 1 - 1
assets/http/api.js

@@ -16,7 +16,7 @@ const uploadFile =(p)=> http.upload('blade-resource/oss/endpoint/put-file', {nam
 const activity = {
 	//音乐之声活动
 	yyzs_list:p => http.get('yyzs/cyzh-activity/activity/selectPageWithTag', {params:p,custom: {yyzs: true}}),
-	//商活动
+	//商活动
 	list:p => http.get('cyzh-ldt/activity/list', {params:p}),
 }
 

+ 5 - 1
main.js

@@ -73,7 +73,11 @@ Vue.prototype.$jump=function(url,events){
 		events
 	})
 }
-
+Vue.prototype.$back=function(){
+	uni.navigateBack({
+		delta:1
+	})
+}
 //判空函数
 Vue.prototype.$isEmpty=function(value){
 	switch (typeof value) {

+ 19 - 1
pages.json

@@ -208,7 +208,25 @@
                 "enablePullDownRefresh": false
             }
             
-        }
+        },
+		{
+		    "path" : "pages/activity/activity",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "活动列表",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},{
+		    "path" : "pages/activity/detail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "活动详情",
+		        "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+		    }
+		    
+		}
     ],
 	"tabBar": {
 		"color": "#555555",

+ 10 - 2
pages/consume/comps/card2.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="">
-		<view class="cu-card case card" v-for="(item,index) in list" :key="index">
+		<view class="cu-card case card" v-for="(item,index) in list" :key="index" @click="$jump('/pages/activity/activity')">
 			<view class="cu-item shadow">
 				<view class="image">
 					<image style="width: 100%;height: 450rpx;" :src="item.pic"></image>
@@ -17,7 +17,7 @@
 							<image src="../../../static/del/map1.png" mode=""></image>
 							<text>距此3.5km</text>
 						</view>
-						<view class="">
+						<view class="" @click.stop="checkLine(item)">
 							<image style="width: 40rpx;height: 40rpx;" src="../../../static/del/lx.png" mode=""></image>
 							<text>查看路线</text>
 						</view>
@@ -41,6 +41,14 @@
 			return {
 				
 			}
+		},
+		methods:{
+			checkLine(item){
+				uni.openLocation({
+					latitude:parseFloat(item.latitude),
+					longitude:parseFloat(item.longitude)
+				})
+			}
 		}
 	}
 </script>

+ 2 - 0
pages/mine/mine.vue

@@ -165,6 +165,8 @@
 		},
 		onLoad() {
 			this.fetchStatic()
+		},
+		onShow() {
 			this.login()
 		},
 		methods: {

+ 2 - 4
pages/mine/my-points/my-points.vue

@@ -90,12 +90,10 @@
 			}
 		},
 		onReady(){
-			let m = new Date().getMonth() + 1
-			let y = new Date().getFullYear()
-			let m1 = m<10? ("0" + m) : m
-			this.defaultTime = y + '-' + m1
+			this.defaultTime=this.$dateTime.format(new Date(),'YYYY-mm')
 		},
 		onLoad(options) {
+			this.defaultTime=this.$dateTime.format(new Date(),'YYYY-mm')
 			if(options.point){
 				this.point = options.point
 			}