wanghuan vor 4 Jahren
Ursprung
Commit
d43fad5c2b

+ 1 - 0
pages/packages/packages.json

@@ -1,4 +1,5 @@
 {
+  "navigationBarTitleText": "课程",
 	"usingComponents": {
     "navbar": "/components/navBar/navBar",
     "tabbar": "/components/tabBar/tabBar"

+ 1 - 1
pages/packages/packages.wxml

@@ -1,7 +1,7 @@
 <view class="packages">
 	<view class="view-page">
 		<navbar page-name="课程"></navbar>
-		<view class="page-content" >
+		<view class="page-content" style='height:calc(100vh - {{navH}}px)'>
 			<view class = "banner"></view>
 			<view class = "con-title1">用编程赋予孩子国际竞争力</view>
 			<view class = "con-min1">国际化的课程体系</view>

+ 1 - 0
pages/packages/packages.wxss

@@ -3,6 +3,7 @@ page {
     background-color:  #F2F2F6;
 }
 
+
 .page-content{
 	width: 100%;
 }

+ 7 - 2
pages/promotion/promotion.js

@@ -16,8 +16,12 @@ Page({
 	},
 
 	hrefPm: function(e) {
-		// console.log(index, e.currentTarget,"111111111")
 		var index = e.currentTarget.dataset.index;
+		wx.navigateTo({
+			url: '/pages/promotion/promotionhref?para=' + index
+		})
+		console.log(index)
+		console.log(e.currentTarget)
 		if (index != null) {
 			if (e.currentTarget.dataset.type == 1) {
 				wx.navigateTo({
@@ -54,6 +58,7 @@ Page({
 			url: app.globalData.url + '/getPromotions',
 			method: 'get',
 			success: function(res) {
+				console.log(res.data)
 				that.setData({
 					arr: res.data
 				})
@@ -105,7 +110,7 @@ Page({
 	},
 	onShareAppMessage: function() {
 		return {
-			title: '悦所-近期活动',
+			title: '米粒-近期活动',
 			path: '/pages/index/index?skip=1&path=/pages/promotion/promotion'
 		}
 	}

+ 21 - 6
pages/promotion/promotion.wxml

@@ -1,27 +1,42 @@
 <view>
-	<view class="load" style='display:{{loaddisplay}}'>
-		<image class="loadimg" style='display:{{loaddisplay}}' src='https://api.zhumi.tech/MiniProgram/image/timg.gif'></image>
-	</view>
 	<view class="view-page">
 		<navbar page-name="活动"></navbar>
 		<view class="page-content" style='height:calc(100vh - {{navH}}px)'>
 			<view class="margintopp"></view>
 			<block wx:for="{{arr}}" wx:key="index">
+				<block wx:if="{{arr[index].wp_isexpire == 'Y'}}">
 				<view class="pmBox" bindtap="hrefPm" data-index="{{arr[index].wp_href}}">
 					<view class="pmimgdiv">
 						<image class="imagepic" src="{{arr[index].wp_url}}" bindload="finish"></image>
 					</view>
 					<view class="pmtextdiv">
-						<view class = "pmtext_left">
+						<view class="pmtext_left">
 							<view class="pmdescription">二级标题</view>
 							<view class="pmddate">注释文字</view>
 						</view>
-						<view class = "pmtext_right">
-							<view class = "button_right">按钮文字</view>
+						<view class="pmtext_right">
+							<view class="button_right">按钮文字</view>
 						</view>
 					</view>
 				</view>
 			</block>
+			<block wx:if="{{arr[index].wp_isexpire == 'N'}}">
+			<view class="pmBox" data-index="{{arr[index].wp_href}}">
+				<view class="pmimgdiv">
+					<image class="imagepic" src="{{arr[index].wp_url}}" bindload="finish"></image>
+				</view>
+				<view class="pmtextdiv">
+					<view class="pmtext_left">
+						<view class="pmdescription">二级标题</view>
+						<view class="pmddate">注释文字</view>
+					</view>
+					<view class="pmtext_right">
+						<view class="button_overdue">活动结束</view>
+					</view>
+				</view>
+			</view>
+			</block>
+			</block>
 			<div class="endbottom"> </div>
 		</view>
 

+ 17 - 1
pages/promotion/promotion.wxss

@@ -1,4 +1,3 @@
-/**index.wxss**/
 page {
 	/* background-color: #f1f0f0f0; */
 	background-color: #f4f4f4;
@@ -173,3 +172,20 @@ page {
 	text-align: center;
 	color: #FFFFFF;
 }
+
+
+.button_overdue {
+	width: 160rpx;
+	height: 60rpx;
+	margin-left: 151rpx;
+	margin-top: 36rpx;
+	background: #CCCCD8;
+	box-shadow: 0px 16rpx 32rpx rgba(8, 128, 255, 0.36);
+	border-radius: 24rpx;
+	font-style: normal;
+	font-weight: bold;
+	font-size: 28rpx;
+	line-height: 60rpx;
+	text-align: center;
+	color: #9999A5;
+}

+ 5 - 1
pages/promotion/promotionhref.js

@@ -5,6 +5,10 @@ Page({
   },
   onLoad: function (options) {
     this.setData({ path: options.para});
+    let _this = this;
+		_this.setData({
+			navH: app.globalData.navHeight
+		})
   },
   onReady: function () {
   
@@ -14,7 +18,7 @@ Page({
    */
   onShareAppMessage: function () {
     return {
-      title: '悦所-精彩活动',
+      title: '米粒-精彩活动',
       path: '/pages/index/index?skip=1&path=' + '/pages/promotion/promotionhref&para=' + this.data.path
     }
   }

+ 1 - 1
pages/promotion/promotionhref.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "悦所活动",
+  "navigationBarTitleText": "活动详情",
 	"usingComponents": {
     "navbar": "/components/navBar/navBar"
   }

+ 8 - 1
pages/promotion/promotionhref.wxml

@@ -1 +1,8 @@
-<web-view src="{{path}}" class="webv"/>
+<view>
+	<view class="view-page">
+		<navbar page-name="活动详情" back-home="true"></navbar>
+		<view class="page-content" style='height:calc(100vh - {{navH}}px)'>
+			<image src="{{path}}" mode="widthFix" />
+		</view>
+	</view>
+</view>

+ 4 - 1
pages/promotion/promotionhref.wxss

@@ -1,5 +1,8 @@
 /* pages/promotion/promotionhref.wxss */
 .webv {
   width: 100%;
-  height: 100%;
+  height: calc((100vw - 40px) * 250 / 690);
+  background: #fff;
+  position: relative;
+  overflow: hidden;
 }