Selaa lähdekoodia

研学与邀请的更新

vaecebyZ 9 kuukautta sitten
vanhempi
commit
13acd78fe2

+ 36 - 0
api/invite.js

@@ -0,0 +1,36 @@
+import {request} from '@/utils/request.js'
+
+// 我的邀请
+// /invite/myInvite
+export function myInvite(data) {
+	return request({
+		url: '/rewardserver/invite/myInvite',
+		data
+	})
+}
+// 获取二维码
+// /promotion/qrcode
+export function qrcode(data) {
+	return request({
+		url: '/zswl-cloud-bdb/promotion/qrcode',
+		method:"post",
+		data
+	})
+}
+
+// 邀请记录
+// /promotionShareLog/details
+export function details(data) {
+	return request({
+		url: '/zswl-cloud-bdb/promotionShareLog/details',
+		data
+	})
+}
+
+// 邀请奖励明细
+// /invite/rewardDetailList
+export function rewardDetailList({year,month}) {
+	return request({
+		url: `/rewardserver/invite/rewardDetailList?year=${year}&month=${month}`
+	})
+}

+ 10 - 0
api/study.js

@@ -227,4 +227,14 @@ export function goodsSharePage(data) {
 		method:'post',
 		data
 	})
+}
+
+// 科普视频播放量
+// coursePlayLog/add
+export function coursePlayLog(data) {
+	return request({
+		url: '/zswl-cloud-shop/coursePlayLog/add',
+		method:'post',
+		data
+	})
 }

+ 55 - 0
api/wallet.js

@@ -0,0 +1,55 @@
+import {request} from '@/utils/request.js'
+
+// 获取用户钱包信息
+// wallet/getWallet 
+export function getWallet(data) {
+	return request({
+		url: '/rewardserver/wallet/getWallet ',
+		data
+	})
+}
+
+// 即将到账详情
+// /wallet/receiptsDetail
+export function receiptsDetail(data) {
+	return request({
+		url: '/rewardserver/wallet/receiptsDetail?receiptsId='+data.receiptsId,
+	})
+}
+
+// 即将到账
+// /wallet/listByWallet
+export function listByWallet(data) {
+	return request({
+		url: '/rewardserver/wallet/listByWallet',
+		data
+	})
+}
+
+// 提现列表
+// /wallet/queryTransfer
+export function queryTransfer(data) {
+	return request({
+		url: '/rewardserver/wallet/queryTransfer',
+		method:"post",
+		data
+	})
+}
+
+// 提现
+// /wallet/transfer
+export function transfer(data) {
+	return request({
+		url: '/rewardserver/wallet/transfer',
+		method:"post",
+		data
+	})
+}
+
+// 获取openId
+// ​/wallet​/getOpenId
+export function getOpenId({jscode,platformType}) {
+	return request({
+		url: '/rewardserver/wallet/getOpenId?jscode='+jscode+'&platformType='+platformType,
+	})
+}

+ 136 - 0
invite/detail.vue

@@ -0,0 +1,136 @@
+<template>
+  <view class="page">
+    <view class="timePicker" @click="show = true">{{ `${year}年${month}月` }}
+      <u-icon class="icon" size="10" color="#CCCCCC" style="margin-left: 8rpx;" name="arrow-down-fill"></u-icon>
+    </view>
+    <view class="card">
+      <view class="item" v-for="(item, index) in list" :key="index">
+        <view class="phone_amount">
+          <view class="phone">
+            {{ item.phone || '匿名' }}
+          </view>
+          <view class="amount">
+            ¥{{ currency(item.total, { fromCents: true }) }}
+          </view>
+        </view>
+        <view class="date_type">
+          <view class="date">{{ $u.timeFormat(new Date(item.receiptsTime), 'yyyy-mm-dd') }}</view>
+          <view class="type">{{ item.planningName }}</view>
+        </view>
+      </view>
+    </view>
+    <u-empty v-if="list.length == 0"></u-empty>
+
+    <u-datetime-picker :show="show" v-model="time" mode="year-month" @cancel="show = false" @close="show = false"
+      @confirm="confirm"></u-datetime-picker>
+
+  </view>
+</template>
+
+<script>
+import { rewardDetailList } from "@/api/invite"
+import currency from '@/utils/currency'
+export default {
+  data() {
+    return {
+      show: false,
+      currency: currency,
+      month: '',
+      year: '',
+      list: [],
+      time: new Date()
+    };
+  },
+  methods: {
+    getRewardDetailList(query) {
+      rewardDetailList(query).then(({ content }) => {
+        if (content) {
+          this.list = content
+        }
+      })
+    },
+    confirm({ value }) {
+      this.year = new Date(value).getFullYear()
+      this.month = new Date(value).getMonth() + 1
+      this.getRewardDetailList({
+        year: this.year,
+        month: this.month
+      })
+      this.show = false
+    }
+  },
+  onShow() {
+    console.log(currency)
+    const date = new Date()
+    this.year = date.getFullYear()
+    this.month = date.getMonth() + 1
+    this.getRewardDetailList({
+      year: this.year,
+      month: this.month
+    })
+  }
+};
+</script>
+<style lang="scss" scoped>
+.page {
+  min-height: 100vh;
+  background-color: #F9F9F9;
+  padding: 20rpx 24rpx;
+
+  .timePicker {
+    color: #181818;
+    font-size: 28rpx;
+    display: flex;
+    align-items: center;
+  }
+
+  .card {
+    background-color: #ffffff;
+    border-radius: 16rpx;
+
+    .item {
+      border-top: 1px solid #F0F0F0;
+      padding: 28rpx 24rpx;
+      margin-top: 20rpx;
+
+      &:first-child {
+        border-top: none;
+      }
+
+      .phone_amount {
+        display: flex;
+        justify-content: space-between;
+
+        .phone {
+          font-size: 28rpx;
+          color: #181818;
+        }
+
+        .amount {
+          font-size: 28rpx;
+          color: #FF3E3E;
+          font-weight: bold;
+        }
+
+        margin-bottom: 8rpx;
+      }
+
+      .date_type {
+        display: flex;
+        justify-content: space-between;
+
+        .date {
+          font-size: 22rpx;
+          color: #CCCCCC;
+        }
+
+        .type {
+          font-size: 22rpx;
+          color: #CCCCCC;
+        }
+      }
+    }
+
+  }
+}
+</style>

+ 219 - 0
invite/history.vue

@@ -0,0 +1,219 @@
+<template>
+  <view class="order">
+    <view class="tab-box">
+      <view class="tab" :class="[query.orderType == null ? 'active' : '']"
+        v-if="appAuth.includes(0) || appAuth.includes(2)" @click="handleTab(null)">
+        已邀请
+      </view>
+      <view class="tab" :class="[query.orderType == 'USED' ? 'active' : '']"
+        v-if="appAuth.includes(0) || appAuth.includes(3)" @click="handleTab('USED')">
+        成功邀请
+      </view>
+      <view class="tab" v-if="appAuth.includes(0) || appAuth.includes(4)"
+        :class="[query.orderType == 'APPLY_REFUND' ? 'active' : '']" @click="handleTab('APPLY_REFUND')">
+        已失效
+      </view>
+    </view>
+    <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
+      <view style="border-radius: 16rpx;overflow: hidden;">
+        <view class="item" v-for="(item, index) in list" :key="index" @click="goDetail(item)">
+          <view class="user-card">
+            <view class="avatar">
+              <u-avatar :src="item.headImgUrl" size="80rpx"></u-avatar>
+            </view>
+            <view class="info">
+              <view class="phone">1233232378</view>
+              <view class="time">{{ item.createTime }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+
+    </zs-list>
+
+    <u-empty v-if="list.length == 0">
+    </u-empty>
+  </view>
+</template>
+
+<script>
+
+import { details } from "@/api/invite"
+export default {
+  data() {
+    return {
+      query: {
+        page: 0,
+        size: 10,
+        orderType: null,
+        "endTime": "",
+        "noOrGName": "",
+        "sort": "",
+        "startTime": ""
+      },
+      status: 'more',
+      list: [],
+      appAuth: []
+    }
+  },
+  filters: {
+    filterType: function (val) {
+      if (val.refundLog && val.refundLog.refund == 'REFUSAL_REFUND') {
+        return '拒绝退款'
+      }
+      else if (val.jobFlowMap == 'Hotel' && JSON.parse(val.extend).orderInfo) {
+        return JSON.parse(val.extend).orderInfo.orderStatus
+      }
+      else if (val.goodsState == 'APPLY_REFUND') {
+        return '申请退款'
+      } else if (val.goodsState == 'CLOSE') {
+        return '关闭订单'
+      } else if (val.goodsState == 'REFUNDED') {
+        return '已退款'
+      } else if (val.goodsState == 'REFUSAL_REFUND') {
+        return '拒绝退款'
+      } else if (val.goodsState == 'APPLY_REFUNDING') {
+        return '退款中'
+      } else if (val.goodsState == 'USED') {
+        return '已核销'
+      } else if (val.goodsState == 'WAIT_PAYMENT') {
+        return '待付款'
+      } else if (val.goodsState == 'WAIT_USE') {
+        return '待使用'
+      } else {
+        return ''
+      }
+    }
+  },
+  methods: {
+    handleTab(val) {
+      this.query.orderType = val
+      this.query.page = 0
+      this.list = []
+      this.details()
+    },
+    goDetail(item) {
+      uni.setStorageSync('order', JSON.stringify(item))
+      uni.navigateTo({
+        url: './detail?id=' + item.orderNo
+      })
+    },
+    details() {
+      this.status = 'loading'
+      details(this.query).then(res => {
+        if (res.state == 'Success') {
+          this.total = res.content.totalElements
+          this.list = this.list.concat(res.content.content)
+          this.list.length >= this.total ? this.status = 'noMore' : this.status = 'more'
+          this.query.page++
+          uni.stopPullDownRefresh()
+        }
+      })
+    },
+    onPullDownRefresh() {
+      this.query.page = 0
+      this.list = []
+      this.status = 'more'
+      this.details()
+    },
+    loadMore() {
+      this.details()
+    },
+  },
+  onLoad() {
+    let epid = uni.getStorageSync('epid')
+    let shopList = JSON.parse(uni.getStorageSync('shopList'))
+    shopList.map(item => {
+      if (item.shopId == epid) {
+        this.appAuth = item.appAuth.split(',').map(Number)
+      }
+    })
+    if (this.appAuth.includes(2)) {
+      this.query.orderType = null
+    } else if (this.appAuth.includes(3)) {
+      this.query.orderType = 'USED'
+    } else if (this.appAuth.includes(4)) {
+      this.query.orderType = 'APPLY_REFUND'
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.order {
+  padding: 90rpx 32rpx 24rpx;
+  background: #F9F9F9;
+  min-height: 100vh;
+
+  .tab-box {
+    display: flex;
+    position: fixed;
+    width: 750rpx;
+    height: 70rpx;
+    left: 0%;
+    top: 0%;
+    z-index: 9;
+    background: #fff;
+
+    .tab {
+      flex: 1;
+      text-align: center;
+      padding: 15rpx 0;
+      font-size: 28rpx;
+      color: #999999;
+    }
+
+    .tab.active {
+      font-size: 32rpx;
+      color: #222222;
+      position: relative;
+
+      &::after {
+        content: '';
+        width: 40rpx;
+        height: 8rpx;
+        box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
+        border-radius: 46rpx 46rpx 46rpx 46rpx;
+        background: $uni-color-primary;
+        position: absolute;
+        bottom: 0%;
+        left: 50%;
+        transform: translateX(-50%);
+      }
+    }
+  }
+
+  .item {
+    background: #FFFFFF;
+    position: relative;
+    padding: 24rpx;
+    border-top: 1px solid #F0F0F0;
+
+    &:first-child {
+      border-top: none;
+    }
+
+    .user-card {
+      display: flex;
+      align-items: center;
+
+      .avatar {
+        margin-right: 20rpx;
+      }
+
+      .info {
+        .phone {
+          color: #181818;
+          font-size: 28rpx;
+          margin-bottom: 8rpx;
+        }
+
+        .time {
+          color: #999999;
+          font-size: 22rpx;
+        }
+      }
+    }
+  }
+}
+</style>

+ 156 - 159
invite/index.vue

@@ -1,167 +1,164 @@
 <template>
-	<view class="popularize">
-		
-		<view class="content ">
-			<view class="top-box">
-				<view class="left">
-					<view class="title">
-						可提现金额
-					</view>
-					<view class="num">
-						0
-					</view>
-					<view class="notice">
-						每月25日后可申请提现
-					</view>
-				</view>
-				<view class="withdraw" @click="jump('./withdraw')">
-					提现
-				</view>
-			</view>
-			
-			<view class="bottom-box">
-				<view class="money-box">
-					<view class="title">
-						0
-					</view>
-					<view class="label">
-						总收入(元)
-					</view>
-				</view>
-				
-				<view class="money-box">
-					<view class="title">
-						0
-					</view>
-					<view class="label">
-						已提现(元)
-					</view>
-				</view>
-			</view>
-		</view>
-		
-		<view class="content ">
-			<u-cell-group :border="false">
-				<u-cell
-				    title="我的邀请码"
-					isLink
-					rightIcon="arrow-right"
-					:border="false"
-					@click="jump('./invite')"
-				>
-				<text
-					slot="value"
-					class="u-slot-value"
-				>邀请二维码</text>
-				</u-cell>
-				<u-cell
-				    title="邀请记录"
-					rightIcon="arrow-right"
-					:border="false"
-				></u-cell>
-				<u-cell
-				    title="提现记录"
-					rightIcon="arrow-right"
-					:border="false"
-				></u-cell>
-			</u-cell-group>
-		</view>
-		
-	</view>
+  <view class="page">
+    <image class="cover"
+      src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/657c35e3cae1326607ea9ed2/ext/SHOP_INFO/20240816134523.png/1.png"
+      mode="aspectFit"></image>
+    <view class="info-card">
+      <view class="header">
+        <view class="titile">我的邀请</view>
+        <view class="btn" @click="jump('/invite/wallet/withdraw')">
+          <view>去提现</view>
+          <image class="icon" src="/static/right-arrow.png"></image>
+        </view>
+      </view>
+      <view class="content">
+        <view class="item">
+          <view class="title">已邀请</view>
+          <view class="value">{{ invite.inviteCount }}</view>
+        </view>
+        <view class="item">
+          <view class="title">成功邀请</view>
+          <view class="value">{{ invite.success }}</view>
+        </view>
+        <view class="item">
+          <view class="title">累积获得</view>
+          <view class="value">{{ currency(invite.totalAmount, { fromCents: true, symbol: '' }) }}元</view>
+        </view>
+      </view>
+    </view>
+
+    <view class="card-content">
+      <u-cell-group :border="false">
+        <u-cell title="我的邀请码" isLink rightIcon="arrow-right" :border="false" @click="jump('./invite')">
+
+        </u-cell>
+        <!-- <u-cell title="邀请记录" isLink rightIcon="arrow-right" :border="false" @click="jump('./history')"></u-cell> -->
+        <u-cell title="我的钱包" isLink rightIcon="arrow-right" :border="false" @click="jump('./wallet/index')"></u-cell>
+        <u-cell title="邀请奖励明细" rightIcon="arrow-right" :border="false" @click="jump('./detail')"></u-cell>
+      </u-cell-group>
+    </view>
+
+  </view>
 </template>
 
 <script>
-	export default {
-		methods: {
-			jump(url) {
-				uni.navigateTo({
-					url
-				})
-			},
-		},
-		
-	}
+
+import { myInvite } from "@/api/invite"
+import { getWallet } from "@/api/wallet"
+import currency from '@/utils/currency'
+export default {
+  data() {
+    return {
+      invite: {
+        inviteCount: 0,
+        success: 0,
+        totalAmount: 0,
+      },
+      currency: currency
+
+    };
+  },
+  methods: {
+    jump(url) {
+      uni.navigateTo({
+        url
+      })
+    },
+  },
+  onShow() {
+    myInvite().then(({ content }) => {
+      if (content) {
+        this.invite = content
+      }
+    })
+    getWallet().then(({ content }) => {
+      if (content) {
+        if (content.id) {
+          uni.setStorageSync('walletId', content.id)
+        }
+      }
+    })
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-.popularize{
-	padding: 20rpx 30rpx ;
-	min-height: 100vh;
-	background: #f5f5f5;
-	.content{
-		padding: 28rpx 24rpx ;
-		border-radius: 16rpx;
-		background: #fff;
-		margin-bottom: 20rpx;
-	}
-	
-	.top-box{
-		display: flex;
-		align-items: center;
-		border-bottom: 2rpx solid rgba(243, 243, 243, 1);
-		padding-bottom: 24rpx;
-		.left{
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			justify-content: space-between;
-			.title{
-				color: #181818;
-				font-size: 28rpx;
-			}
-			.num{
-				font-weight: bold;
-				color: #222222;
-				font-size: 36rpx;
-				margin: 16rpx 0;
-			}
-			.notice{
-				
-				color: #999999;
-				font-size: 24rpx;
-			}
-		}
-		.withdraw{
-			width: 180rpx;
-			height: 60rpx;
-			line-height: 60rpx;
-			text-align: center;
-			background: #2836FE;
-			box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255,255,255,0.16);
-			border-radius: 46rpx 46rpx 46rpx 46rpx;
-			color: #FFFFFF;
-			font-size: 28rpx;
-		}
-	}
-	
-	.bottom-box{
-		display: flex;
-		padding-top: 34rpx;
-		.money-box{
-			flex: 1;
-			padding-left: 20rpx;
-			box-sizing: border-box;
-			.title{
-				font-weight: bold;
-				color: #222222;
-				font-size: 36rpx;
-			}
-			.label{
-				font-size: 24rpx;
-				color: #999999;
-				margin-top: 10rpx;
-			}
-		}
-		.money-box+.money-box{
-			border-left: 2rpx solid rgba(243, 243, 243, 1);
-		}
-	}
-	
-	.u-slot-value{
-		
-		font-size: 28rpx;
-		color: #999999;
-	}
-	
+.page {
+  background: #F9F9F9;
+  min-height: 100vh;
+
+  .cover {
+    width: 100%;
+    height: 440rpx;
+    vertical-align: bottom;
+  }
+
+  .info-card {
+    background: #FFFFFF;
+    border-radius: 16rpx;
+    padding: 28rpx 24rpx;
+
+    margin: -100rpx 24rpx 24rpx 24rpx;
+    // overflow: overlay;
+    position: relative;
+    z-index: 2;
+
+    .header {
+      display: flex;
+      justify-content: space-between;
+      margin-bottom: 30rpx;
+
+      .title {
+        color: #181818;
+        font-size: 28rpx;
+      }
+
+      .btn {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        color: #0C6FFE;
+        font-size: 28rpx;
+
+        .icon {
+          width: 48rpx;
+          height: 48rpx;
+        }
+      }
+    }
+
+    .content {
+      display: flex;
+      justify-content: space-between;
+
+      .item {
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+
+        .title {
+          color: #CCCCCC;
+          font-size: 24rpx;
+          margin: 0 8rpx 8rpx 8rpx;
+
+        }
+
+        .value {
+          color: #222222;
+          font-weight: bold;
+          font-size: 36rpx;
+
+        }
+      }
+    }
+  }
+
+  .card-content {
+    padding: 28rpx 24rpx;
+    border-radius: 16rpx;
+    background: #fff;
+    margin: 20rpx 24rpx 0 24rpx;
+  }
 }
-</style>
+</style>

+ 204 - 58
invite/invite.vue

@@ -6,130 +6,276 @@
 		<view class="desc">
 			您将获得现金红包奖励
 		</view>
-		
+
 		<view class="code-box">
 			<image class="head" :src="userInfo.imgPath" mode=""></image>
 			<view class="user-name">
-				{{userInfo.nickname}}
+				{{ userInfo.nickname }}
 			</view>
-			
+
 			<view class="qrcode-box">
 				<u--image width="380rpx" height="380rpx" :src="src">
-				 <template v-slot:loading>
-				    <u-loading-icon size="56rpx" color="#FF4C3A"></u-loading-icon>
-				  </template>
+					<template v-slot:loading>
+						<u-loading-icon size="56rpx" color="#FF4C3A"></u-loading-icon>
+					</template>
 				</u--image>
 			</view>
-			
+
 		</view>
-		
+
 		<view class="save-btn">
-			
-		<u-button color="linear-gradient(265deg, #FF4A39 0%, #FC8B45 100%)" shape="circle" type="primary" @click="save">保存二维码</u-button>
+
+			<u-button color="linear-gradient(265deg, #FF4A39 0%, #FC8B45 100%)" shape="circle" type="primary"
+				@click="save">保存二维码</u-button>
 		</view>
-		
+
 	</view>
 </template>
 
 <script>
-	import {BASE_URL} from '@/utils/config.js'
-	export default {
-		data() {
-			return {
-				src: '',
-				userInfo:{}
-			}
-		},
-		methods: {
-			save() {
-				uni.getImageInfo({
-					src:this.src,
-					success: function (image) {
-						uni.saveImageToPhotosAlbum({
-							filePath:image.path
+import { BASE_URL } from '@/utils/config.js'
+export default {
+	data() {
+		return {
+			src: '',
+			userInfo: {}
+		}
+	},
+	methods: {
+		save() {
+			// uni.getImageInfo({
+			// 	src:this.src,
+			// 	success: function (image) {
+			// 		uni.saveImageToPhotosAlbum({
+			// 			filePath:image.path
+			// 		})
+			// 	}
+			// })
+
+			uni.showLoading({
+				title: '正在保存图片...'
+			});
+			//获取用户的当前设置。获取相册权限
+			uni.getSetting({
+				success: (res) => {
+					//如果没有相册权限
+					if (!res.authSetting["scope.writePhotosAlbum"]) {
+						//向用户发起授权请求
+						uni.authorize({
+							scope: "scope.writePhotosAlbum",
+							success: () => {
+
+
+
+
+								//授权成功保存图片到系统相册
+								// uni.saveImageToPhotosAlbum({
+								// 	//图片路径,不支持网络图片路径
+								// 	filePath: url,
+								// 	success: (res) => {
+								// 		uni.hideLoading();
+								// 		return uni.showToast({
+								// 			title: "保存成功!",
+								// 		});
+								// 	},
+								// 	fail: (res) => {
+								// 		console.log(res.errMsg);
+								// 		return uni.showToast({
+								// 			title: res.errMsg,
+								// 		});
+								// 	},
+								// 	complete: (res) => { uni.hideLoading(); },
+								// });
+
+								console.log(this.src.slice(22))
+								console.log(this.src)
+								console.log( wx.env.USER_DATA_PATH + '/pic' + number + '.png')
+
+								const number = Math.random()
+								wx.getFileSystemManager().writeFile({
+									filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.png',
+									data: this.src.slice(22),
+									encoding: 'base64',
+									success: res => {
+										wx.saveImageToPhotosAlbum({
+											filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.png',
+											success: function (res) {
+												wx.showToast({ title: '保存成功', })
+											},
+											fail: function (err) {
+												console.log(err)
+											}
+										})
+										console.log(res)
+									}, fail: err => {
+										console.log(err)
+									}
+								})
+
+
+
+							},
+							//授权失败
+							fail: () => {
+								uni.hideLoading();
+								uni.showModal({
+									title: "您已拒绝获取相册权限",
+									content: "是否进入权限管理,调整授权?",
+									success: (res) => {
+										if (res.confirm) {
+											//调起客户端小程序设置界面,返回用户设置的操作结果。(重新让用户授权)
+											uni.openSetting({
+												success: (res) => {
+													console.log(res.authSetting);
+												},
+											});
+										} else if (res.cancel) {
+											return uni.showToast({
+												title: "已取消!",
+											});
+										}
+									},
+								});
+							},
+						});
+					} else {
+
+
+
+
+						//如果已有相册权限,直接保存图片到系统相册
+						// uni.saveImageToPhotosAlbum({
+						// 	filePath: url,
+						// 	success: (res) => {
+						// 		uni.hideLoading();
+						// 		return uni.showToast({
+						// 			title: "保存成功!",
+						// 		});
+						// 	},
+						// 	fail: (res) => {
+						// 		uni.hideLoading();
+						// 		console.log(res.errMsg);
+						// 		return uni.showToast({
+						// 			title: res.errMsg,
+						// 		});
+						// 	},
+						// 	//无论成功失败都走的回调
+						// 	complete: (res) => { uni.hideLoading(); },
+						// });
+
+
+						const number = Math.random()
+						wx.getFileSystemManager().writeFile({
+							filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.png',
+							data: this.src.slice(22),
+							encoding: 'base64',
+							success: res => {
+								wx.saveImageToPhotosAlbum({
+									filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.png',
+									success: function (res) {
+										wx.showToast({ title: '保存成功', })
+									},
+									fail: function (err) {
+										console.log(err)
+									}
+								})
+								console.log(res)
+							}, fail: err => {
+								console.log(err)
+							}
 						})
+
+
 					}
-				})
-			},
-		},
-		created() {
-			this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
-			 uni.request( {
-				 url:BASE_URL+'/zswl-cloud-bdb/promotion/qrcode',
-				 method:"post",
-				data: {
-					"scene": JSON.parse(uni.getStorageSync('userInfo')).userId ,
 				},
-				responseType:'arraybuffer'
-			}).then(res=>{
-				this.src =  'data:image/png;base64,' + uni.arrayBufferToBase64(res.data)
-			})
-		}
+				fail: (res) => { },
+			});
+		},
+	},
+	created() {
+		this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
+		uni.request({
+			url: BASE_URL + '/zswl-cloud-bdb/promotion/qrcode',
+			method: "post",
+			data: {
+				"scene": JSON.parse(uni.getStorageSync('userInfo')).userId,
+			},
+			responseType: 'arraybuffer'
+		}).then(res => {
+			this.src = 'data:image/png;base64,' + uni.arrayBufferToBase64(res.data)
+		})
 	}
+}
 </script>
 
 <style lang="scss">
-	.invite .u-image__loading,.u-image__error{
-		background-color: #fff!important;
-	}
-.invite{
+.invite .u-image__loading,
+.u-image__error {
+	background-color: #fff !important;
+}
+
+.invite {
 	padding: 0 30rpx;
 	min-height: 100vh;
 	background: url('http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/SpRgpIr81Trt13ba08b3b78f59f72c0a555b82b73492.png/1.png') no-repeat;
 	background-size: 100% 100%;
-	
-	.title{
+
+	.title {
 		text-align: center;
 		font-size: 48rpx;
 		font-weight: 800;
 		margin-top: 178rpx;
 	}
-	.desc{
+
+	.desc {
 		margin-top: 20rpx;
 		font-size: 28rpx;
 		color: #999999;
 		text-align: center;
 	}
-	
-	.code-box{
+
+	.code-box {
 		width: 690rpx;
 		height: 650rpx;
 		background: #fff;
-		box-shadow: 0rpx 6rpx 20rpx 2rpx rgba(0,0,0,0.06);
+		box-shadow: 0rpx 6rpx 20rpx 2rpx rgba(0, 0, 0, 0.06);
 		border-radius: 16rpx;
 		position: relative;
 		margin-top: 110rpx;
-		.head{
+
+		.head {
 			width: 162rpx;
 			height: 162rpx;
 			border-radius: 50%;
 			position: absolute;
 			top: 0;
 			left: 50%;
-			transform: translate(-50%,-50%);
+			transform: translate(-50%, -50%);
 		}
-		.user-name{
+
+		.user-name {
 			padding-top: 100rpx;
 			text-align: center;
 			font-size: 32rpx;
 			color: #222222;
 			font-weight: bold;
 		}
-		.qrcode-box{
+
+		.qrcode-box {
 			width: 380rpx;
 			height: 380rpx;
 			margin: 80rpx auto;
 			display: flex;
 			justify-content: center;
 			align-items: center;
-			
+
 		}
 	}
-	
+
 	.save-btn {
 		position: fixed;
 		bottom: 100rpx;
-		width: calc(100% - 60rpx) ;
+		width: calc(100% - 60rpx);
 	}
 }
 </style>

+ 145 - 0
invite/wallet/hangingAmount.vue

@@ -0,0 +1,145 @@
+<template>
+  <view class="page">
+    <view class="card">
+      <view class="text">即将到账</view>
+      <view class="amount">{{ currency(total, {
+        symbol: '',
+        fromCents: true
+      }).format() }}</view>
+      <view class="msg">推广奖励与返利需要等平台结算期后才会到账</view>
+    </view>
+
+    <view class="item" v-for="item in list">
+      <view class="avatar">
+        <u-avatar size="40" text="佣金"></u-avatar>
+      </view>
+      <view class="info">
+        <view class="type_amount">
+          <view class="type">推广用户奖励</view>
+          <view class="amount">{{ currency(item.total, {
+            symbol: '¥',
+            fromCents: true
+          }).format() }}</view>
+        </view>
+        <view class="date_time">
+          <view class="date">{{ $u.timeFormat(item.createTime, "yyyy-mm-dd hh:MM") }}</view>
+          <view class="time">预计{{ $u.timeFormat(item.estimatedTime, "yyyy-mm-dd") }}到账</view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import { listByWallet } from '@/api/wallet'
+import currency from "@/utils/currency"
+export default {
+  data() {
+    return {
+      list: [],
+      currency,
+      total: 0
+    };
+  },
+  methods: {
+
+  },
+  onShow() {
+    listByWallet().then(({ content }) => {
+      if (content) {
+        this.list = content;
+        for (const element of this.list) {
+          this.total += element.total
+        }
+      }
+    })
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.page {
+  min-height: 100vh;
+  background-color: #F9F9F9;
+
+  .card {
+    background-color: #FFFFFF;
+    padding: 30rpx;
+    margin-bottom: 20rpx;
+
+    .text {
+      color: #333333;
+      font-size: 40rpx;
+      margin-bottom: 15rpx;
+    }
+
+    .amount {
+      color: #222222;
+      font-size: 80rpx;
+      font-weight: bold;
+    }
+
+    .msg {
+      color: #999999;
+      font-size: 30rpx;
+      margin: 35rpx 0 15rpx 0;
+    }
+
+  }
+
+  .item {
+    display: flex;
+    border-top: 1px solid #F0F0F0;
+    background-color: #ffffff;
+    padding: 40rpx 20rpx;
+
+    &:first-child {
+      border-top: none;
+    }
+
+    .avatar {
+      margin-right: 10rpx;
+      width: 15%;
+    }
+
+    .info {
+      display: flex;
+      flex-direction: column;
+      width: 85%;
+
+      .type_amount {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 10rpx;
+
+        .type {
+          color: #333333;
+          font-size: 35rpx;
+          font-weight: bold;
+        }
+
+        .amount {
+          color: #333333;
+          font-size: 30rpx;
+          font-weight: bold;
+        }
+      }
+
+      .date_time {
+        display: flex;
+        justify-content: space-between;
+
+        .date {
+          color: #999999;
+          font-size: 24rpx;
+        }
+
+        .time {
+          color: #999999;
+          font-size: 24rpx;
+        }
+      }
+    }
+  }
+}
+</style>

+ 174 - 0
invite/wallet/history.vue

@@ -0,0 +1,174 @@
+<template>
+  <view class="page">
+    <view class="date-selecter">
+      <view class="date" @click="show = true">{{ year }}年{{ month }}月</view>
+      <u-icon class="icon" size="10" color="#333333" style="margin-left: 8rpx" name="arrow-down"></u-icon>
+    </view>
+
+    <view class="card">
+      <view class="item" v-for="item in list">
+        <view class="avatar">
+          <u-avatar text="提现" size="80rpx"></u-avatar>
+        </view>
+        <view class="content">
+          <view class="info">
+            <view class="info-title">提现</view>
+            <view class="amount">{{ currency(item.total, {
+              symbol: '¥',
+              fromCents: true
+            }).format() }}</view>
+          </view>
+          <view class="type">
+            <view class="desc">提现至微信</view>
+            <view class="bill-type">{{ status[item.transferStatus] }}</view>
+          </view>
+          <view class="date">
+            {{ $u.timeFormat(new Date(item.createTime), 'yyyy-mm-dd hh:MM') }}
+          </view>
+          <view style="color:red;font-size:20rpx;margin-top: 10rpx;" v-if="item.transferStatus == 'FAIL'">提现失败请一个小时后再次尝试</view>
+        </view>
+      </view>
+    </view>
+
+    <u-empty v-if="list.length == 0"></u-empty>
+
+    <u-datetime-picker :show="show" v-model="time" mode="year-month" @cancel="show = false" @close="show = false"
+      @confirm="confirm"></u-datetime-picker>
+  </view>
+</template>
+
+<script>
+import { queryTransfer } from '@/api/wallet'
+import currency from "@/utils/currency"
+export default {
+  data() {
+    return {
+      list: [],
+      show: false,
+      year: new Date().getFullYear(),
+      month: new Date().getMonth() + 1,
+      walletId: '',
+      time: new Date(),
+      currency,
+      status: {
+        'PROCESSING': '提现处理中',
+        'SUCCESS': "提现成功",
+        'FAIL': "提现失败",
+        'CLOSE': "提现关闭"
+      }
+    };
+  },
+  methods: {
+    queryTransfer() {
+      queryTransfer({
+        year: this.year,
+        month: this.month,
+        walletId: this.walletId
+      }).then(({ content }) => {
+        if (content) {
+          this.list = content
+        }
+      })
+    },
+    confirm({ value }) {
+      this.year = new Date(value).getFullYear()
+      this.month = new Date(value).getMonth() + 1
+      this.queryTransfer()
+      this.show = false
+    }
+  },
+  onShow() {
+    const walletId = uni.getStorageSync('walletId')
+    this.walletId = walletId
+    queryTransfer(
+      {
+        year: this.year,
+        month: this.month,
+        walletId
+      }
+    ).then(({ content }) => {
+      if (content) {
+        this.list = content
+      }
+    })
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.page {
+  background: #f9f9f9;
+  min-height: 100vh;
+
+  .date-selecter {
+    color: #333333;
+    display: flex;
+    align-items: center;
+    padding: 20rpx;
+
+    .date {
+      font-size: 28rpx;
+    }
+  }
+
+  .card {
+    background: #ffffff;
+
+    .item {
+      display: flex;
+      padding: 30rpx;
+      border-bottom: 1px solid #f0f0f0;
+
+      .avatar {
+        width: 15%;
+      }
+
+      .content {
+        width: 85%;
+        display: flex;
+        flex-direction: column;
+
+        .info {
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 15rpx;
+
+          .info-title {
+            font-size: 30rpx;
+            color: #181818;
+            font-weight: bold;
+          }
+
+          .amount {
+            font-size: 32rpx;
+            color: #181818;
+            font-weight: bold;
+          }
+        }
+
+        .type {
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 15rpx;
+
+          .desc {
+            font-size: 24rpx;
+            color: #999999;
+          }
+
+          .bill-type {
+            font-size: 24rpx;
+            color: #999999;
+          }
+        }
+
+        .date {
+          font-size: 24rpx;
+          color: #999999;
+        }
+      }
+
+    }
+  }
+}
+</style>

+ 132 - 0
invite/wallet/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <view class="page">
+    <view class="amount_card">
+      <view class="content">
+        <view class="amount">
+          <view class="text">账户余额</view>
+          <view class="price">{{ currency(wallet.amount, {
+            symbol: '¥',
+            fromCents: true
+          }).format() }}</view>
+        </view>
+        <view class="btn" @click="jump('./withdraw?amount='+wallet.amount)">提现</view>
+      </view>
+      <view class="footer" @click="jump('./hangingAmount')">
+        <view class="item">
+          即将到账:{{ currency(wallet.waitAmount, {
+            symbol: '¥',
+            fromCents: true
+          }).format() }}
+        </view>
+        <u-icon name="arrow-right"></u-icon>
+      </view>
+    </view>
+
+    <view class="history" @click="jump('./history')">
+      提现记录
+      <u-icon name="arrow-right"></u-icon>
+    </view>
+
+  </view>
+</template>
+
+<script>
+import { getWallet } from "@/api/wallet"
+import currency from "@/utils/currency"
+export default {
+  data() {
+    return {
+      wallet: {
+        amount: 0,
+        waitAmount: 0
+      },
+      currency
+
+    };
+  },
+  methods: {
+    jump(url) {
+      uni.navigateTo({
+        url
+      });
+    }
+  },
+  onShow() {
+    getWallet().then(({ content }) => {
+      if (content) {
+        this.wallet = content
+        if (this.wallet.id) {
+          uni.setStorageSync('walletId', this.wallet.id)
+        }
+      }
+    })
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.page {
+  background: #F9F9F9F9;
+  min-height: 100vh;
+  padding: 24rpx 20rpx;
+
+  .amount_card {
+    border-radius: 16rpx;
+    background-color: #ffffff;
+
+    .content {
+      padding: 30rpx;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+
+      .amount {
+        display: flex;
+        flex-direction: column;
+
+        .text {
+          font-size: 30rpx;
+          color: #AAAAAA;
+          margin-bottom: 18rpx;
+        }
+
+        .price {
+          font-size: 50rpx;
+          color: #222;
+          font-weight: bold;
+        }
+      }
+
+      .btn {
+        background-color: #FFC000;
+        text-align: center;
+        padding: 12rpx;
+        width: 100rpx;
+        border-radius: 32rpx;
+        color: #ffffff;
+      }
+    }
+
+    .footer {
+      border-top: 1px solid #F0F0F0;
+      padding: 30rpx;
+      display: flex;
+      color: #AAAAAA;
+      justify-content: space-between;
+      align-items: center;
+    }
+
+  }
+
+  .history {
+    margin-top: 20rpx;
+    background-color: #ffffff;
+    border-radius: 16rpx;
+    padding: 30rpx;
+    font-size: 30rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+}
+</style>

+ 174 - 0
invite/wallet/withdraw.vue

@@ -0,0 +1,174 @@
+<template>
+  <view class="page">
+    <view class="card">
+
+      <view class="input">
+        <view class="prefix">¥</view>
+        <view class="inner">
+          <u-input border="none" v-model="price" :fontSize="30" type="digit" placeholder="请输入提现金额"></u-input>
+        </view>
+        <view class="text" @click="getAll">
+          全部提现
+        </view>
+      </view>
+      <view class="amount">可提现金额:{{ currency(amount, {
+        symbol: '¥',
+        fromCents: true
+      }).format() }}</view>
+
+      <view class="title">
+        提现至微信
+      </view>
+
+      <view class="info">
+        <text>
+          余额提现至微信钱包,提现限额200元/日
+          次日00:00恢复提现额度
+        </text>
+      </view>
+
+    </view>
+    <view class="btn">
+      <u-button color="#1F1F1F" @click="submit" size="large" shape="circle">确定</u-button>
+    </view>
+  </view>
+</template>
+
+<script>
+import { transfer } from '@/api/wallet'
+import currency from "@/utils/currency"
+export default {
+  data() {
+    return {
+      currency,
+      amount: 0,
+      walletId: '',
+      price: null,
+      openid: '',
+      loading: false,
+    };
+  },
+  methods: {
+    submit() {
+      uni.showLoading({
+        title: '加载中'
+      });
+      this.loading = true
+      if (!isNaN(this.price) && this.price > 0) {
+        console.log(this.walletId)
+        transfer({
+          appid: 'wx3be1d6d84d46cdf7',
+          openid: this.openid,
+          total: this.price * 100,
+          walletId: this.walletId
+        }).then(
+          res => {
+            this.loading = false
+            if (res.state == 'Success') {
+              uni.showToast({
+                title: '提现成功',
+                icon: 'success',
+                duration: 2000
+              });
+            }
+            uni.hideLoading();
+          }
+        )
+      } else {
+        uni.showToast({
+          title: '请输入正确的金额',
+          icon: 'none',
+          duration: 2000
+        });
+        this.loading = false
+        uni.hideLoading();
+      }
+    },
+    getAll() {
+      if (this.amount > 0) {
+        this.price = this.amount / 100;
+      }
+    }
+  },
+  onShow() {
+    const userInfo = JSON.parse(uni.getStorageSync('userInfo'));
+    this.openid = userInfo.openId
+  },
+  onLoad({ amount }) {
+    const walletId = uni.getStorageSync('walletId');
+    this.walletId = walletId;
+    this.amount = amount;
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.page {
+  min-height: 100vh;
+  background-color: #F9F9F9;
+  padding: 20rpx;
+
+  .card {
+    border-radius: 16rpx;
+    background-color: #ffffff;
+    padding: 40rpx;
+
+    .input {
+      display: flex;
+      align-items: center;
+      padding-bottom: 20rpx;
+
+      .prefix {
+        font-size: 80rpx;
+        font-weight: bold;
+        color: #333333;
+      }
+
+      .inner {
+        flex: 1;
+        padding: 0 20rpx;
+      }
+
+      .text {
+        color: #333333;
+        font-weight: bold;
+        font-size: 28rpx;
+      }
+    }
+
+    .amount {
+      border-bottom: 1px solid #f2f2f2;
+      padding-bottom: 30rpx;
+      color: #AAAAAA;
+    }
+
+    .title {
+      font-size: 32rpx;
+      color: #333333;
+      margin: 30rpx 0;
+      font-weight: bold;
+    }
+
+    .info {
+      font-size: 28rpx;
+      color: #666666;
+      line-height: 40rpx;
+      margin-top: 20rpx 0 40rpx 0;
+    }
+
+
+
+
+  }
+
+  .btn {
+    margin: 60rpx 0;
+  }
+
+
+}
+
+/deep/.u-input__content__field-wrapper__field {
+  height: 80rpx !important;
+}
+</style>

+ 42 - 7
pages.json

@@ -290,29 +290,52 @@
 		{
 			"root": "invite",
 			"pages": [
+				{
+					"path": "invite",
+					"style": {
+						"navigationBarTitleText": "推广邀请"
+					}
+				},
 				{
 					"path": "index",
 					"style": {
-						"navigationBarTitleText": "邀请收益"
+						"navigationBarTitleText": "推广邀请"
 					}
 				},
 				{
-					"path": "invite",
+					"path": "history",
 					"style": {
-						"navigationBarTitleText": "我的邀请码",
-						"disableScroll": true
+						"navigationBarTitleText": "邀请记录"
+					}
+				},
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "邀请明细"
+					}
+				},
+				{
+					"path": "wallet/index",
+					"style": {
+						"navigationBarTitleText": "我的钱包"
 					}
 				},
 				{
-					"path": "withdraw",
+					"path": "wallet/history",
+					"style": {
+						"navigationBarTitleText": "提现记录"
+					}
+				},
+				{
+					"path":"wallet/withdraw",
 					"style": {
 						"navigationBarTitleText": "提现"
 					}
 				},
 				{
-					"path": "bankCard",
+					"path":"wallet/hangingAmount",
 					"style": {
-						"navigationBarTitleText": "银行卡"
+						"navigationBarTitleText": "即将到账"
 					}
 				}
 			]
@@ -545,6 +568,18 @@
 						"navigationStyle": "custom"
 					}
 				},
+				{
+					"path": "community/video",
+					"style": {
+						"navigationBarTitleText": "科普视频"
+					}
+				},
+				{
+					"path": "community/goods",
+					"style": {
+						"navigationBarTitleText": "推荐线路"
+					}
+				},
 				{
 					"path": "test",
 					"style": {

+ 3 - 3
pages/activity/courseDetail.vue

@@ -24,7 +24,7 @@
 					课程:{{ info.goodsName }}
 				</view>
 				<view class="times">
-					10465次播放
+					{{info.courseGoodsDto.viewedCount}} 次播放
 				</view>
 			</view>
 
@@ -46,7 +46,7 @@
 								<view class="title" :class="[current == index ? 'active' : '']">
 									{{ item.courseName }}
 								</view>
-								<view class="info">
+								<!-- <view class="info">
 									<view class="icon-box">
 										<image class="icon" src="../static/study/time.png" mode=""></image>
 										<view class="text">
@@ -59,7 +59,7 @@
 											09:05
 										</view>
 									</view>
-								</view>
+								</view> -->
 							</view>
 							<image class="btn" :src="current == index ? playIng : playBtn" mode=""></image>
 

+ 13 - 6
pages/activity/detail.vue

@@ -2,7 +2,7 @@
   <view class="page">
     <zs-header color="#000"></zs-header>
     <view class="cover">
-      <image :src="goods.goodsPath" mode="aspectFit"></image>
+      <image :src="goods.goodsPath + '?x-oss-process=image/resize,h_750,w_750,m_fixed'" mode="aspectFit"></image>
     </view>
     <view class="title-box">
       <view class="title">
@@ -21,7 +21,7 @@
 
       <view v-for="item in courses" class="class-item" @click="goCourse(item.id)">
         <view class="image">
-          <image :src="item.courseImg" mode="aspectFit"></image>
+          <image :src="item.courseImg + '?x-oss-process=image/resize,h_164,w_218,m_fixed'" mode="aspectFit"></image>
         </view>
         <view class="item-info">
           <view class="item-title">{{ item.courseName }}</view>
@@ -96,12 +96,17 @@ export default {
           this.orderNo = orderNo
           this.goods = res.content.goodsInfoVo
           this.courses = res.content.courses
-          this.communityItemDetailVo = res.content.communityItemDetailVo
           this.goods.goodsDetail = res.content.goodsInfoVo.goodsDetail.replace(/<img/gi, '<img class="img_class" ')
+          this.communityItemDetailVo = res.content.communityItemDetailVo
+          // 统一处理心得图片大小
+          if (this.communityItemDetailVo) {
+            this.communityItemDetailVo.urls = this.communityItemDetailVo.urls.map(url => url + '?x-oss-process=image/resize,h_164,w_164,m_fixed')
+          }
+
         }
       })
     },
-    edit(row){
+    edit(row) {
       uni.navigateTo({
         url: `/share/sharePosts?orderNo=${this.orderNo}&id=${row.id}`
       });
@@ -155,13 +160,15 @@ export default {
     border-radius: 20rpx 20rpx 0 0;
     margin-top: 20rpx;
     padding: 28rpx 20rpx 0 20rpx;
-    overflow: overlay;
+    // overflow: overlay;
+    position: relative;
+    z-index:2;
 
 
     .class-title {
       display: flex;
       justify-content: space-between;
-      
+
       .title {
         font-size: 32rpx;
         color: #222222;

+ 2 - 2
pages/activity/index.vue

@@ -40,11 +40,11 @@
 										{{ item.goodsInfoVo.goodsDescribe || '景观中国天眼探索宇宙深度的秘密宇宙深度的秘宇宙深度的秘宇宙深度的秘宇宙深度的秘' }}
 									</view>
 									<view class="itinerary">
-										出发时间 {{ $u.timeFormat(item.reserveTime, 'yyyy-mm-dd hh:MM:ss') }}·{{ item.stateStr }}
+										出发时间 {{ $u.timeFormat(item.reserveTime, 'yyyy-mm-dd') }}·{{ item.stateStr }}
 									</view>
 								</view>
 								<view class="image">
-									<img :src="item.goodsInfoVo.goodsPath || 'https://via.placeholder.com/82'" alt="活动图片">
+									<img :src="item.goodsInfoVo.goodsPath + '?x-oss-process=image/resize,h_164,w_164,m_fixed' " alt="活动图片">
 								</view>
 							</view>
 							<view class="footer">

+ 2 - 3
pages/index/index.vue

@@ -302,7 +302,6 @@
 			},
 			goGoodsDetail(item) {
 				// uni.setStorageSync('shopInfo', JSON.stringify(item))
-				console.log(item.productType);
 				let url = ''
 				if (item.productType === 'Web') {
 				    console.log('链接');
@@ -552,9 +551,9 @@
 		},
 		onHide() {
 		},
-		onLoad(query){
+		onLoad(query){			
 			if(query.scene){
-				if(!uni.getStorageSync('token')){
+				if(uni.getStorageSync('token')){
 					uni.showToast({
 						title: '已经是平台用户',
 						icon: 'none'

BIN
static/right-arrow.png


+ 244 - 0
study/community/goods.vue

@@ -0,0 +1,244 @@
+<template>
+  <view class="community">
+
+    <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
+      <view class="left">
+        <view class="store-item" v-for="(item, index) in list" :key="index" @click="goGoodsDetail(item.goodsId)">
+          <zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
+          <view class="info">
+            <view class="title">
+              {{ item.goodsName }}
+            </view>
+            <view class="user-info">
+              <!-- <image class="head" :src="item.goodsPath"></image> -->
+              <view class="user-name">
+                {{ item.shopName }}
+              </view>
+            </view>
+            <view class="price-box">
+              <view class="left">
+                <view class="unit">
+                  ¥
+                </view>
+                <view class="price">
+                  {{ item.realPrice }}
+                </view>
+                <view class="old-price">
+                  ¥{{ item.marketPrice }}
+                </view>
+              </view>
+
+              <view class="right">
+                {{ item.saleNum }}人已购
+              </view>
+            </view>
+          </view>
+
+        </view>
+      </view>
+      <view class="right">
+
+        <view class="store-item" v-for="(item, index) in list1" :key="index" @click="goGoodsDetail(item.goodsId)">
+          <zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
+          <view class="info">
+            <view class="title">
+              {{ item.goodsName }}
+            </view>
+            <view class="user-info">
+              <!-- <image class="head" :src="item.goodsPath" mode=""></image> -->
+              <view class="user-name">
+                {{ item.shopName }}
+              </view>
+            </view>
+            <view class="price-box">
+              <view class="left">
+                <view class="unit">
+                  ¥
+                </view>
+                <view class="price">
+                  {{ item.realPrice }}
+                </view>
+                <view class="old-price">
+                  ¥{{ item.marketPrice }}
+                </view>
+              </view>
+              <view class="right">
+                {{ item.saleNum }}人已购
+              </view>
+            </view>
+          </view>
+
+        </view>
+      </view>
+
+    </zs-list>
+
+  </view>
+</template>
+
+<script>
+import { studyGoodsByUser } from '@/api/study.js';
+export default {
+  data() {
+    return {
+      status: 'more',
+      id: 0,
+      list: [
+
+      ],
+      list1: [
+
+      ],
+      query: {
+        columnId: 0,
+      }
+    }
+  },
+  methods: {
+    loadMore() {
+      this.studyGoodsByUser()
+    },
+    // 去商品详情
+    goGoodsDetail(id) {
+      uni.navigateTo({
+        url: '/study/studyGoodsDetail?id=' + id
+      })
+    },
+    studyGoodsByUser() {
+      this.status = 'loading'
+      studyGoodsByUser(this.query).then(res => {
+        if (res.state == 'Success') {
+          let list = []
+          let list1 = []
+          res.content.records.map((item, index) => {
+            if (index % 2) {
+              list1.push(item)
+            } else {
+              list.push(item)
+            }
+          })
+          this.list = this.list.concat(list)
+          this.list1 = this.list1.concat(list1)
+          let total = this.list.length + this.list1.length
+          if (total >= res.content.total) {
+            this.status = 'noMore'
+          } else {
+            this.status = 'more'
+            this.query.currentPage++
+          }
+        }
+      })
+    },
+  },
+  onLoad(options) {
+    this.query.columnId = options.columnId
+    // console.log(options.id);
+    // this.id = options.id
+    // this.getItem()
+  }
+}
+</script>
+
+<style lang="scss">
+.community {
+  background: #FFFFFF;
+  padding: 20rpx;
+
+  .zs-list {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+
+    .left {}
+
+    .right {}
+
+    .store-item {
+      box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(0, 0, 0, 0.08);
+      border-radius: 16rpx;
+      width: 344rpx;
+      height: 566rpx;
+      margin-top: 20rpx;
+      display: flex;
+      flex-direction: column;
+
+      .info {
+        padding: 20rpx;
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+
+        .title {
+          color: #222222;
+          font-size: 28rpx;
+          height: 76rpx;
+          width: 100%;
+          font-weight: bold;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          /* 显示的最大行数 */
+          overflow: hidden;
+        }
+
+        .user-info {
+          display: flex;
+          align-items: center;
+          margin-top: 20rpx;
+
+          .head {
+            width: 40rpx;
+            height: 40rpx;
+            border-radius: 50%;
+          }
+
+          .user-name {
+            color: #AAAAAA;
+            font-size: 24rpx;
+            overflow: hidden;
+            // margin-left: 12rpx;
+          }
+        }
+
+        .price-box {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          margin-top: 12rpx;
+
+          .left {
+            display: flex;
+            align-items: flex-end;
+
+            .unit {
+              font-size: 24rpx;
+              color: $uni-color-primary;
+              font-weight: bold;
+            }
+
+            .price {
+              font-size: 32rpx;
+              color: $uni-color-primary;
+              font-weight: bold;
+            }
+
+            .old-price {
+              font-size: 20rpx;
+              color: #AAAAAA;
+              text-decoration: line-through;
+              margin-left: 10rpx;
+            }
+          }
+
+          .right {
+            font-size: 20rpx;
+            color: #AAAAAA;
+          }
+        }
+      }
+
+    }
+  }
+}
+</style>

+ 18 - 13
study/community/index.vue

@@ -11,10 +11,12 @@
 							{{item.communityTitle}}
 						</view>
 						<view class="user-info">
-							<image class="head" :src="item.publishLogo" mode=""></image>
-							<view class="user-name">
-								研学官方账号
-							</view>
+								<view class="head">
+									{{ item.communityName }}
+								</view>
+								<view class="user-name">
+									观看 {{ item.viewedCount }}
+								</view>
 						</view>
 					</view>
 				</view>
@@ -28,9 +30,11 @@
 							{{item.communityTitle}}
 						</view>
 						<view class="user-info">
-							<image class="head" :src="item.publishLogo" mode=""></image>
+							<view class="head">
+								{{ item.communityName }}
+							</view>
 							<view class="user-name">
-								研学官方账号
+								观看 {{ item.viewedCount }}
 							</view>
 						</view>
 					</view>
@@ -142,16 +146,17 @@
 				.user-info{
 					display: flex;
 					align-items: center;
+					justify-content: space-between;
 					margin-top: 20rpx;
-					.head{
-						width: 40rpx;
-						height: 40rpx;
-						border-radius: 50%;
+					font-size: 20rpx;
+					color: #AAAAAA;
+					
+					.head {
+						font-size: 20rpx;
 					}
-					.user-name{
-						color: #AAAAAA;
+
+					.user-name {
 						font-size: 20rpx;
-						margin-left: 12rpx;
 					}
 				}
 			}

+ 172 - 0
study/community/video.vue

@@ -0,0 +1,172 @@
+<template>
+	<view class="community">
+
+		<!-- 列表 -->
+		<zs-list class="store-box" mt="0" @load="loadMore" :status="status">
+			<view class="left">
+				<view class="store-item" v-for="(item, index) in list" :key="index" @click="goCourse(item.id)">
+					<image class="play-icon" src="../../static/play.png" mode="widthFix"></image>
+					<zs-img :src="item.courseImg" width="344rpx" height="256rpx"></zs-img>
+					<view class="info">
+						<view class="title">
+							{{ item.courseName }}
+						</view>
+						<view class="user-info">
+							<view class="head" mode=""> 科普视频</view>
+							<view class="user-name">
+								观看{{ item.viewedCount }}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="right">
+				<view class="store-item" v-for="(item, index) in list1" :key="index" @click="goCourse(item.id)">
+					<image class="play-icon" src="../../static/play.png" mode=""></image>
+					<zs-img :src="item.courseImg" width="344rpx" height="256rpx"></zs-img>
+					<view class="info">
+						<view class="title">
+							{{ item.courseName }}
+						</view>
+						<view class="user-info">
+							<view class="head">科普视频</view>
+							<!-- <image class="head" src="../static/logo.png" mode=""></image> -->
+							<view class="user-name">
+								观看{{ item.viewedCount }}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</zs-list>
+
+	</view>
+</template>
+
+<script>
+import { videoList } from '@/api/study.js';
+
+export default {
+	data() {
+		return {
+			status: 'more',
+			columnId: 0,
+			list: [
+
+			],
+			list1: [
+
+			],
+		}
+	},
+	methods: {
+		loadMore() {
+			this.videoList()
+		},
+		// 课程视频
+		videoList() {
+			this.status = 'loading'
+			videoList({
+				columnId:
+					this.columnId
+			}).then(res => {
+				if (res.state == 'Success') {
+					let list = []
+					let list1 = []
+					res.content.records.map((item, index) => {
+						if (index % 2) {
+							list1.push(item)
+						} else {
+							list.push(item)
+						}
+					})
+					this.list = this.list.concat(list)
+					this.list1 = this.list1.concat(list1)
+					let total = this.list.length + this.list1.length
+					if (total >= res.content.total) {
+						this.status = 'noMore'
+					} else {
+						this.status = 'more'
+						this.query.currentPage++
+					}
+				}
+			})
+		},
+		goCourse(id) {
+			uni.navigateTo({
+				url: '../courseDetail?id=' + id
+			})
+		},
+	},
+	onLoad(options) {
+		this.columnId = options.columnId
+	}
+}
+</script>
+
+<style lang="scss">
+.community {
+	background: #FFFFFF;
+	padding: 20rpx;
+
+	.zs-list {
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+
+		.left {}
+
+		.right {}
+
+		.store-item {
+			box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(0, 0, 0, 0.08);
+			border-radius: 16rpx;
+			width: 344rpx;
+			margin-top: 20rpx;
+			position: relative;
+
+			.play-icon {
+				position: absolute;
+				top: 20rpx;
+				right: 30rpx;
+				width: 30rpx;
+				height: 30rpx;
+				z-index: 2;
+			}
+
+			.info {
+				padding: 20rpx;
+
+				.title {
+					color: #222222;
+					font-size: 24rpx;
+					width: 100%;
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					/* 显示的最大行数 */
+					overflow: hidden;
+				}
+
+				.user-info {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-top: 20rpx;
+					font-size: 20rpx;
+					color: #AAAAAA;
+
+					.head {
+						font-size: 20rpx;
+					}
+
+					.user-name {
+						font-size: 20rpx;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 19 - 4
study/courseDetail.vue

@@ -20,7 +20,7 @@
 					天文课程-天眼
 				</view>
 				<view class="times">
-					10465次播放
+					{{info.chapters[current].viewedCount}}次播放
 				</view>
 			</view>
 			
@@ -43,7 +43,7 @@
 						<view class="title" :class="[current == index?'active':'']">
 							{{item.chapterName}}
 						</view>
-						<view class="info">
+						<!-- <view class="info">
 							<view class="icon-box">
 								<image class="icon" src="../static/study/time.png" mode=""></image>
 								<view class="text">
@@ -56,7 +56,7 @@
 									09:05
 								</view>
 							</view>
-						</view>
+						</view> -->
 					</view>
 					<image class="btn" :src="current == index?playIng:playBtn" mode=""></image>
 					
@@ -68,13 +68,14 @@
 </template>
 
 <script>
-	import {videoDetail} from '@/api/study.js'
+	import {videoDetail,coursePlayLog} from '@/api/study.js'
 	export default {
 		data() {
 			return {
 				tab:0,
 				current:0,
 				autoplay:true,
+				id:null,
 				info:{
 					chapters:[],
 					columnId:0,
@@ -110,6 +111,7 @@
 			onEnd(){
 				if(this.current != this.info.chapters.length-1){
 					this.current ++
+					this.addViewCount()
 				}
 			},
 			handleTab(tab){
@@ -117,6 +119,7 @@
 			},
 			handleItem(item,index){
 				this.current = index
+				this.addViewCount()
 			},
 			videoDetail(id){
 				videoDetail({id}).then(res=>{
@@ -124,10 +127,22 @@
 						this.info = res.content
 					}
 				})
+			},
+			addViewCount(){
+				setTimeout(() => {
+				const userInfo = JSON.parse(uni.getStorageSync('userInfo')) 
+				coursePlayLog({
+						userId:userInfo.userId,
+						courseId:this.id,
+						chapterId:this.info.chapters[this.current].id
+					})
+				}, 1000);
 			}
 		},
 		onLoad(options) {
+			this.id = options.id
 			this.videoDetail(options.id)
+			this.addViewCount()
 		}
 	}
 </script>

+ 22 - 6
study/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="study">
-		<zs-header  title="慧研学" color="#000"></zs-header>
+		<zs-header  title="慧研学" color="#000" :background="background"></zs-header>
 		<view class="top-box">
 			<image class="bg" src="https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/06qgjHTlTxWEb95dd5bef869e62f2a78c625ea6bef78.jpg/1.jpg" mode=""></image>
 			<view class="type-box">
@@ -17,6 +17,14 @@
 		</view>
 
 
+		<swiper class="swiper" @change="swiperChange" :indicator-dots="true" circular :autoplay="true"
+			:interval="3000" :duration="1000">
+			<swiper-item v-for="(item,index) in bannerList" :key="index">
+				<image class="swiper-item" mode="" :src="item.bannerImg">
+				</image>
+			</swiper-item>
+		</swiper>
+		
 		<scroll-view  class="tab-box" enable-flex scroll-x >
 			<!-- <view class="tab" :class="[tab == item.value?'active':'']" v-for="(item,index) in tabList" :key="index" @click="handleTab(item.value)">
 				{{item.label}}
@@ -33,7 +41,7 @@
 		<zs-list class="store-box" mt="0" @load="loadMore" :status="status">
 			<view class="left">	
 				<view class="store-item" v-for="(item,index) in list" :key="index" @click="goGoodsDetail(item.goodsId)">
-					<zs-img :src="item.logoPath" width="344rpx" height="344rpx" mode=""></zs-img>
+					<zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
 					<view class="info">
 						<view class="title">
 							{{item.goodsName}}
@@ -68,7 +76,7 @@
 			<view class="right">
 		
 				<view class="store-item" v-for="(item,index) in list1" :key="index" @click="goGoodsDetail(item.goodsId)">
-					<zs-img :src="item.logoPath" width="344rpx" height="344rpx" mode=""></zs-img>
+					<zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
 					<view class="info">
 						<view class="title">
 							{{item.goodsName}}
@@ -126,7 +134,8 @@
 				tab:0,
 				tabList:[],
 				userId:'',
-				query:{userId:this.userId,currentPage:1,pageSize:10,belongType:2}
+				query:{userId:this.userId,currentPage:1,pageSize:10,belongType:2},
+				background:false
 			}
 		},
 		methods: {
@@ -263,7 +272,14 @@
 				this.getResult()
 				this.userId = JSON.parse(uni.getStorageSync('userInfo')).userId
 			}
-		}
+		},
+		onPageScroll(e) {
+				if(e.scrollTop >= 50){
+					this.background = true
+				}else{
+					this.background = false
+				}
+		},
 	}
 </script>
 
@@ -298,7 +314,7 @@
 						border-radius: 50%;
 					}
 					.label{
-						font-weight: 300;
+						font-weight: bold;
 						font-size: 24rpx;
 						color: #222222;
 						margin-top: 15rpx;

+ 206 - 35
study/pay/orderPay.vue

@@ -7,11 +7,23 @@
       {{ info.goodsList[0] | filterType }}
     </view>
 
+    <view class="content progress"
+      v-if="info.goodsList[0].goodsState == 'APPLY_REFUND' || info.goodsList[0].goodsState == 'REFUNDED'"
+      @click="refundDetail">
+      <view class="progress-title">
+        退款进度
+      </view>
+
+      <view class="progress-desc">
+        查看退款详情
+      </view>
+    </view>
+
     <view class="pay-info">
       <view class="goods-info">
         <image class="goods-img"
-          src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/School.png/5.png"
-          mode=""></image>
+          :src="info.goodsList[0].goodsInfo.goodsPath + '?x-oss-process=image/resize,h_164,w_164,m_fixed'" mode="">
+        </image>
         <view class="info">
           <view class="goods-name">
             {{ info.goodsList[0].goodsInfo.goodsName }}
@@ -35,13 +47,21 @@
           出发时间
         </view>
         <view class="date" @click="openCalendar">
-          {{ reserve.reserveTime }}
+          {{ $u.timeFormat(new Date(reserve.reserveTime).getTime(), 'yyyy年mm月dd日') }}
+        </view>
+      </view>
+
+      <view class="footer" v-if="info.goodsList[0].goodsState == 'WAIT_USE'" @click="toDetailStudy(info.orderNo)">
+        <view class="slogan">
+          研学在即,课程相信
+        </view>
+        <view class="action">
+          立即学习
         </view>
       </view>
     </view>
 
-    <view class="card-box"
-      v-if="info.goodsList[0].jobFlowMap != 'P802' && info.goodsList[0].goodsState == 'WAIT_USE' && info.goodsList[0].goodsName != '二维码支付'">
+    <view class="card-box" v-if="info.goodsList[0].goodsState == 'WAIT_USE'">
       <view class="title-top">
         <view class="title-text">
           券码信息
@@ -158,7 +178,7 @@
 
     </view>
 
-    <view class="card-box" style="margin-bottom: 160rpx;">
+    <view class="card-box">
       <view class="title-top">
         <view class="title-text">
           交易信息
@@ -192,6 +212,52 @@
       </view>
     </view>
 
+    <view class="content apply-box" v-if="(info.goodsList[0].goodsState == 'WAIT_USE' ||
+      info.goodsList[0].goodsState == 'USED') &&
+      info.goodsList[0].refundLog.refund != 'REFUSAL_REFUND' &&
+      isRefund() &&
+      info.goodsList[0].jobFlowMap !== 'XiaoJu'" @click="apply">
+      <view class="label">
+        退款申请
+      </view>
+      <view class="value">
+        如引发商品争议,可申请平台介入处理
+      </view>
+      <image class="jiantou" src="../../static/jiantou-icon.png" mode=""></image>
+    </view>
+
+    <view class="content apply-box"
+      v-if="info.goodsList[0].refundLog && info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND'">
+      <view class="title">
+        已拒绝
+      </view>
+      <view class="value">
+        拒绝理由:{{ info.goodsList[0].refundLog.conclusion }}
+      </view>
+    </view>
+
+
+    <template>
+      <view class="content refund-box"
+        v-if="info.goodsList[0].goodsState == 'APPLY_REFUND' || (info.goodsList[0].refundLog && info.goodsList[0].refundLog.remark)">
+        <view class="title">
+          退款原因
+        </view>
+
+        <view class="refund-msg">
+          {{ info.goodsList[0].refundLog.remark }}
+        </view>
+      </view>
+      <button type="default" :loading="btnLoading" v-if="info.goodsList[0].goodsState == 'APPLY_REFUND'" class="pay-btn"
+        @click="cancelReply">取消退款</button>
+    </template>
+
+
+    <button type="default" :loading="btnLoading1"
+      v-if="info.goodsList[0].refundLog && info.goodsList[0].refundLog.refund == 'REFUSAL_REFUND' && !info.goodsList[0].refundLog.platInter"
+      class="pay-btn" @click="refundIntervene">申请介入处理</button>
+
+
     <view class="btn-box" v-if="info.goodsList[0].goodsState == 'WAIT_PAYMENT'">
       <button class="cancel-btn" @click="cancel" :loading="btnLoading">
         取消订单
@@ -212,12 +278,19 @@ export default {
   data() {
     return {
       info: {
-        goodsList: []
+        goodsList: [
+          {
+            goodsState: '',
+            refundLog: {
+              refund: ''
+            }
+          }
+        ]
       },
       reserve: {
         persons: [],
       },
-      codeData: '123',
+      codeData: 'qrcode',
       show: false,
       loading: false,
       pageLoading: true,
@@ -310,19 +383,14 @@ export default {
     },
     apply() {
       let that = this
-      if (this.info.goodsList[0].jobFlowMap == 'XiaoJu') {
-        uni.navigateTo({
-          url: './webView'
-        })
-      } else {
-        uni.navigateTo({
-          url: './refund',
-          success: function (res) {
-            // 通过eventChannel向被打开页面传送数据
-            res.eventChannel.emit('orderInfo', that.info)
-          }
-        })
-      }
+      uni.navigateTo({
+        url: '/my/order/refund',
+        success: function (res) {
+          // 通过eventChannel向被打开页面传送数据
+          res.eventChannel.emit('orderInfo', that.info)
+        }
+      })
+
     },
     // 获取订单详情
     payDetails(orderNo) {
@@ -335,7 +403,7 @@ export default {
         if (!this.info.goodsList[0].refundLog) {
           this.info.goodsList[0].refundLog = {}
         }
-        if (this.info.goodsList[0].jobFlowMap != 'P802' && this.info.goodsList[0].goodsState == 'WAIT_USE' && this.info.goodsList[0].goodsName != '二维码支付') {
+        if (this.info.goodsList[0].goodsState == 'WAIT_USE') {
 
           qrCode(this.info.goodsList[0].id).then(res => {
             this.loading = false
@@ -350,6 +418,9 @@ export default {
       getReserve(orderNo).then(res => {
         if (res.state == 'Success') {
           this.reserve = res.content
+          if (!this.reserve.persons) {
+            this.reserve.persons = []
+          }
         }
       })
     },
@@ -366,7 +437,7 @@ export default {
       } catch (error) {
         obj = {}
       }
-  
+
       cancelOrder(obj).then(res => {
         if (res.state == 'Success') {
           uni.showToast({
@@ -452,6 +523,11 @@ export default {
           })
         }
       })
+    },
+    toDetailStudy(orderNo) {
+      uni.navigateTo({
+        url: '/pages/activity/detail?orderNo=' + orderNo
+      })
     }
   },
   filters: {
@@ -499,19 +575,29 @@ export default {
       return (this.info.createTime + 1000 * 60 * 30) - new Date().getTime()
     },
     payTime() {
-      if (this.info.goodsList[0].extend && !JSON.parse(this.info.goodsList[0].extend).hasOwnProperty('account')) {
-        if (JSON.parse(this.info.goodsList[0].extend).hasOwnProperty('notifyOrderInfo')) {
-          return JSON.parse(this.info.goodsList[0].extend).notifyOrderInfo.payTime
-        } else {
-          return '-'
+      const goodsList = this.info.goodsList;
+      if (goodsList && goodsList[0] && goodsList[0].extend) {
+        let extend;
+        try {
+          extend = JSON.parse(goodsList[0].extend);
+        } catch (e) {
+          // 如果解析JSON失败,返回默认值 '-'
+          return '-';
         }
-      } else {
-        if (this.info.payment && this.info.payment.paymentTime) {
-          return uni.$u.timeFormat(this.info.payment.paymentTime, 'yyyy-mm-dd hh:MM:ss')
-        } else {
-          return '-'
+        if (!extend.hasOwnProperty('account')) {
+          if (extend.hasOwnProperty('notifyOrderInfo')) {
+            return extend.notifyOrderInfo.payTime;
+          } else {
+            return '-';
+          }
         }
       }
+      const payment = this.info.payment;
+      if (payment && payment.paymentTime) {
+        return uni.$u.timeFormat(payment.paymentTime, 'yyyy-mm-dd hh:MM:ss');
+      } else {
+        return '-';
+      }
     }
   },
   onLoad(options) {
@@ -604,12 +690,12 @@ export default {
     }
 
     .setoff {
-      border-top: 1px solid #F0F0F0;
+      border-bottom: 1px solid #F0F0F0;
       display: flex;
       justify-content: space-between;
       align-items: center;
       font-size: 24rpx;
-      padding-top: 24rpx;
+      padding-bottom: 24rpx;
 
       .text {
         color: #222222;
@@ -619,6 +705,21 @@ export default {
         color: #AAAAAA;
       }
     }
+
+    .footer {
+      display: flex;
+      justify-content: space-between;
+      margin-top: 20rpx;
+      background: #F9F9F9;
+      border-radius: 16rpx;
+      padding: 24rpx;
+
+      .slogan,
+      .action {
+        font-size: 24rpx;
+        color: #AAAAAA;
+      }
+    }
   }
 
   .card-box {
@@ -723,5 +824,75 @@ export default {
       margin-left: 20rpx;
     }
   }
+
+  .pay-btn {
+    background: #3B83FF;
+    width: 688rpx;
+    height: 80rpx;
+    line-height: 80rpx;
+    border-radius: 46rpx;
+    color: #fff;
+    margin-top: 50rpx;
+  }
+
+  .refund-box {
+    .refund-msg {
+      font-weight: 300;
+      font-size: 24rpx;
+      color: #222222;
+      margin-top: 15rpx;
+      line-height: 40rpx;
+    }
+  }
+
+  .apply-box {
+    position: relative;
+
+    .label {
+      font-weight: 600;
+      font-size: 28rpx;
+      color: #222222;
+    }
+
+    .value {
+      color: #999999;
+      font-size: 24rpx;
+      margin-top: 15rpx;
+    }
+
+    .jiantou {
+      position: absolute;
+      top: 50%;
+      right: 24rpx;
+      transform: translateY(-50%);
+      width: 24rpx;
+      height: 24rpx;
+    }
+  }
+
+  .content {
+    padding: 28rpx 24rpx;
+    border-radius: 16rpx;
+    background: #fff;
+  }
+
+  .progress {
+    .progress-title {
+      font-weight: 600;
+      font-size: 32rpx;
+      color: #181818;
+    }
+
+    .progress-desc {
+      font-weight: 300;
+      font-size: 24rpx;
+      color: #AAAAAA;
+      margin-top: 15rpx;
+    }
+
+    margin-bottom: 20rpx;
+  }
+
+
 }
 </style>

+ 49 - 12
study/studyGoodsDetail.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="goodsDetail">
 		<zs-skeleton type="goodsDetail" :loading="pageLoading"></zs-skeleton>
-		<image class="good-img" :src="info.goodsPath" mode="aspectFit"></image>
+		<image class="good-img" :src="info.goodsPath + '?x-oss-process=image/resize,h_750,w_750,m_fixed'" mode="aspectFit">
+		</image>
 
 		<view class="content">
 			<view class="price-box">
@@ -31,14 +32,15 @@
 
 			<view class="reservation" @click="openCalendar">
 				<view class="text">
-					<text style="color:#AAAAAA;margin-right:28rpx;"> 已预定 </text> {{ reserveTime ? '预定' + reserveTime + '出发' :
+					<text style="color:#AAAAAA;margin-right:28rpx;"> 已预定 </text> {{ reserveTime ? '预定' + $u.timeFormat(new
+						Date(reserveTime), 'yyyy年mm月dd日') + '出发' :
 						info.reservationDate || '' }}
 				</view>
 				<view>
 					<image class="more" src="../static/jiantou-icon.png" mode=""></image>
 				</view>
 			</view>
-			<view class="share" v-if="total > 0">
+			<!-- <view class="share" v-if="total > 0">
 				<view class="top">
 					<view class="title">研学分享</view>
 					<view class="more" @click="toShare">{{ total }}分享<image class="img" src="../static/jiantou-icon.png" mode="">
@@ -62,7 +64,7 @@
 						<view class="overlay">+{{ info.share.urls.length }}</view>
 					</view>
 				</view>
-			</view>
+			</view> -->
 		</view>
 
 		<view class="tab-group">
@@ -98,7 +100,7 @@
 		<view class="buy-box">
 			<!-- <image class="head" :src="shopInfo.logoPath" @click="goShopDetail(shopInfo)" mode=""></image> -->
 			<view class="btn-box">
-				<view class="buy-btn" :class="[info.realStockNum ? '' : 'none']" @click="handleBuy">
+				<view class="buy-btn" :class="[info.realStockNum ? '' : 'none']" @click="handleQuery">
 					<view class="label">
 						预约咨询
 					</view>
@@ -111,8 +113,8 @@
 			</view>
 		</view>
 
-		<uni-calendar @monthSwitch="chnageMonth" :selected="selected" ref="calendar" :showMonth="false"
-			style="z-index: 999;" :insert="false" @confirm="confirm">
+		<uni-calendar nextDay @monthSwitch="chnageMonth" :selected="selected" ref="calendar"
+			:showMonth="false" style="z-index: 999;" :insert="false" @confirm="confirm" @close="closeCalendar">
 		</uni-calendar>
 	</view>
 
@@ -121,7 +123,7 @@
 
 <script>
 import { detail, getStudyAbout, goodsBuyStatistic } from '@/api/goods.js'
-
+import { subscribe } from "@/api/study"
 export default {
 	data() {
 		return {
@@ -129,6 +131,7 @@ export default {
 			active: 0,
 			tab: 1,
 			shopList: [],
+			isSubscribe: false,
 			info: {
 				share: {
 					urls: []
@@ -170,6 +173,14 @@ export default {
 		handleTab(val) {
 			this.tab = val
 		},
+		handleQuery() {
+			uni.showToast({
+				title: '请选择需要咨询的日期',
+				icon: 'none'
+			});
+			this.isSubscribe = true
+			this.openCalendar()
+		},
 		handleBuy() {
 			if (!this.reserveTime) {
 				uni.showToast({
@@ -214,6 +225,7 @@ export default {
 				if (res.state == 'Success') {
 					this.info = res.content
 					this.info.goodsDetail = res.content.goodsDetail.replace(/<img/gi, '<img class="img_class" ')
+					this.shopId = res.content.shopId
 					uni.setNavigationBarTitle({
 						title: this.info.goodsName
 					})
@@ -255,8 +267,33 @@ export default {
 		openCalendar() {
 			this.$refs.calendar.open();
 		},
+		closeCalendar() {
+			this.isSubscribe = false
+		},
 		confirm({ fulldate }) {
-			this.reserveTime = fulldate + " 00:00:00"
+			this.reserveTime = fulldate
+			try {
+				const user = JSON.parse(uni.getStorageSync('userInfo'))
+				if (this.isSubscribe) {
+					this.isSubscribe = false
+					subscribe({
+						userId: user.userId,
+						goodsId: this.goodsId,
+						shopId: this.shopId,
+						reservationTime: fulldate,
+					}).then(res => {
+						if (res.state == 'Success') {
+							uni.showToast({
+								title: '预约成功,请留言工作人员联系',
+								icon: 'none'
+							});
+						}
+					})
+				}
+			} catch (error) {
+
+			}
+
 		},
 		// 更改月份后获取新月份的可售卖日期
 		chnageMonth({ year, month }) {
@@ -313,7 +350,7 @@ export default {
 			console.log("未读取到对应缓存")
 		}
 		this.detail(option.id)
-	}
+	},
 
 }
 </script>
@@ -410,7 +447,7 @@ export default {
 			font-size: 28rpx;
 			padding: 28rpx;
 			background-color: #F9F9F9;
-			margin-bottom: 28rpx;
+			// margin-bottom: 28rpx;
 			border-radius: 8rpx;
 
 			.text {
@@ -536,7 +573,7 @@ export default {
 
 		.tab {
 			flex: 1;
-			padding: 24rpx 0;
+			padding: 0 0 24rpx 0;
 			text-align: center;
 			font-size: 28rpx;
 			color: #222222;

+ 57 - 3
study/tourList/add.vue

@@ -15,7 +15,7 @@
       </view>
       <view class="form-item">
         <view class="label">证件号码</view>
-        <u--input customStyle="input" :maxlength="18" placeholder="请输入姓名" v-model="form.idCard"
+        <u--input customStyle="input" :maxlength="18" placeholder="请输入证件号码" v-model="form.idCard"
           border="none"></u--input>
       </view>
       <view class="form-item">
@@ -70,7 +70,7 @@ export default {
       sexLabel: '',
       show: false,
       showSex: false,
-      loading:false
+      loading: false
     };
   },
   methods: {
@@ -80,8 +80,13 @@ export default {
     },
     handleAdd() {
       this.loading = true
-      saveTraveler(this.form).then(res => {
+      // 表单校验
+      if (!this.validate()) {
         this.loading = false
+        return
+      }
+
+      saveTraveler(this.form).then(res => {
         if (res.state == 'Success') {
           uni.showToast({
             title: '完成',
@@ -92,6 +97,55 @@ export default {
           });
         }
       })
+    },
+    validate() {
+      if (!this.form.userName) {
+        uni.showToast({
+          title: '请输入姓名',
+          icon: 'none'
+        });
+
+        return
+      }
+      if (!this.form.idCard) {
+        uni.showToast({
+          title: '请输入证件号码',
+          icon: 'none'
+        });
+
+        return
+      }
+      // 校验身份证合法性
+      if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idCard)) {
+        uni.showToast({
+          title: '身份证格式不正确',
+          icon: 'none'
+        });
+        return
+      }
+      if (!this.form.phone) {
+        uni.showToast({
+          title: '请输入手机号码',
+          icon: 'none'
+        });
+        return
+      }
+      // 校验手机合法性
+      if (!/^1[3456789]\d{9}$/.test(this.form.phone)) {
+        uni.showToast({
+          title: '手机号码格式不正确',
+          icon: 'none'
+        });
+        return
+      }
+      if (!this.form.sex) {
+        uni.showToast({
+          title: '请选择性别',
+          icon: 'none'
+        });
+        return
+      }
+      return true
     }
   },
 };

+ 3 - 0
study/tourList/list.vue

@@ -58,6 +58,9 @@ export default {
       } else {
         user.check = true
       }
+      this.userList.filter(e => e.id !== user.id).forEach(e => {
+        e.check = false
+      })
     },
     submit() {
       const selected = this.userList.filter(e => e.check)

+ 16 - 12
study/type.vue

@@ -6,7 +6,7 @@
 
 		<view style="margin-bottom: 0;" class="type-title more-title">
 			推荐线路
-			<view class="more-box" @click="jump">
+			<view class="more-box" @click="jump('./community/goods?columnId='+ query.columnId)">
 				<view>
 					更多
 				</view>
@@ -18,13 +18,13 @@
 			<view class="left">
 				<view class="store-item" v-for="(item, index) in recommendList" :key="index"
 					@click="goGoodsDetail(item.goodsId)">
-					<zs-img :src="item.logoPath" width="344rpx" height="344rpx" mode=""></zs-img>
+					<zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
 					<view class="info">
 						<view class="title">
 							{{ item.goodsName }}
 						</view>
 						<view class="user-info">
-							<!-- <image class="head" :src="item.logoPath"></image> -->
+							<!-- <image class="head" :src="item.goodsPath"></image> -->
 							<view class="user-name">
 								{{ item.shopName }}
 							</view>
@@ -54,13 +54,13 @@
 
 				<view class="store-item" v-for="(item, index) in recommendList1" :key="index"
 					@click="goGoodsDetail(item.goodsId)">
-					<zs-img :src="item.logoPath" width="344rpx" height="344rpx" mode=""></zs-img>
+					<zs-img :src="item.goodsPath" width="344rpx" height="344rpx" mode=""></zs-img>
 					<view class="info">
 						<view class="title">
 							{{ item.goodsName }}
 						</view>
 						<view class="user-info">
-							<!-- <image class="head" :src="item.logoPath" mode=""></image> -->
+							<!-- <image class="head" :src="item.goodsPath" mode=""></image> -->
 							<view class="user-name">
 								{{ item.shopName }}
 							</view>
@@ -90,7 +90,7 @@
 
 		<view class="type-title more-title">
 			互动社区
-			<view class="more-box" @click="jump">
+			<view class="more-box" @click="jump('./community/index?id=' + tab)">
 				<view>
 					更多
 				</view>
@@ -105,9 +105,7 @@
 				@click="handleTab(item.id)">
 				{{ item.communityName }}
 			</view>
-			<view class="tab">
-				研学分享
-			</view>
+
 		</scroll-view>
 
 		<template>
@@ -133,7 +131,8 @@
 					</view>
 				</view>
 				<view class="right">
-					<view class="store-item" v-for="(item, index) in communityList1" :key="index" @click="goCommunity(item.tabId)">
+					<view class="store-item" v-for="(item, index) in communityList1" :key="index"
+						@click="goCommunity(item.tabId)">
 						<image class="play-icon" src="../static/play.png" mode=""></image>
 						<zs-img :src="item.coverImg" width="344rpx" height="256rpx"></zs-img>
 						<view class="info">
@@ -159,7 +158,7 @@
 
 		<view class="type-title more-title">
 			科普视频
-			<view class="more-box" @click="jump">
+			<view class="more-box" @click="jump('./community/video?columnId=' + query.columnId)">
 				<view>
 					更多
 				</view>
@@ -239,6 +238,11 @@ export default {
 		}
 	},
 	methods: {
+		jump(url) {
+			uni.navigateTo({
+				url
+			});
+		},
 		// 去商品详情
 		goGoodsDetail(id) {
 			uni.navigateTo({
@@ -257,7 +261,7 @@ export default {
 				url: './courseDetail?id=' + id
 			})
 		},
-		goCommunity(id){
+		goCommunity(id) {
 			console.log(id)
 			uni.navigateTo({
 				url: './community/detail?id=' + id

+ 10 - 2
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue

@@ -153,6 +153,10 @@ export default {
 		title: {
 			type: String,
 			default: ''
+		},
+		nextDay: {
+			type: Boolean,
+			default: false
 		}
 	},
 	data() {
@@ -302,6 +306,7 @@ export default {
 			this.$nextTick(() => {
 				setTimeout(() => {
 					this.aniMaskShow = true
+					this.backToday()
 				}, 50)
 			})
 		},
@@ -401,9 +406,12 @@ export default {
 		 */
 		backToday() {
 			const nowYearMonth = `${this.nowDate.year}-${this.nowDate.month}`
-			const date = this.cale.getDate(new Date())
+			const dateObj = new Date()
+			if (this.nextDay) {
+				dateObj.setDate(dateObj.getDate() + 1)
+			}
+			const date = this.cale.getDate(dateObj)
 			const todayYearMonth = `${date.year}-${date.month}`
-
 			this.init(date.fullDate)
 
 			if (nowYearMonth !== todayYearMonth) {

+ 134 - 0
utils/currency.js

@@ -0,0 +1,134 @@
+/*
+ currency.js - v2.0.4
+ http://scurker.github.io/currency.js
+
+ Copyright (c) 2021 Jason Wilson
+ Released under MIT license
+*/
+(function (e, g) {
+  "object" === typeof exports && "undefined" !== typeof module
+    ? (module.exports = g())
+    : "function" === typeof define && define.amd
+    ? define(g)
+    : ((e = e || self), (e.currency = g()));
+})(this, function () {
+  function e(b, a) {
+    if (!(this instanceof e)) return new e(b, a);
+    a = Object.assign({}, m, a);
+    var d = Math.pow(10, a.precision);
+    this.intValue = b = g(b, a);
+    this.value = b / d;
+    a.increment = a.increment || 1 / d;
+    a.groups = a.useVedic ? n : p;
+    this.s = a;
+    this.p = d;
+  }
+  function g(b, a) {
+    var d = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !0;
+    var c = a.decimal;
+    var h = a.errorOnInvalid,
+      k = a.fromCents,
+      l = Math.pow(10, a.precision),
+      f = b instanceof e;
+    if (f && k) return b.intValue;
+    if ("number" === typeof b || f) c = f ? b.value : b;
+    else if ("string" === typeof b)
+      (h = new RegExp("[^-\\d" + c + "]", "g")),
+        (c = new RegExp("\\" + c, "g")),
+        (c =
+          (c = b
+            .replace(/\((.*)\)/, "-$1")
+            .replace(h, "")
+            .replace(c, ".")) || 0);
+    else {
+      if (h) throw Error("Invalid Input");
+      c = 0;
+    }
+    k || (c = (c * l).toFixed(4));
+    return d ? Math.round(c) : c;
+  }
+  var m = {
+      symbol: "$",
+      separator: ",",
+      decimal: ".",
+      errorOnInvalid: !1,
+      precision: 2,
+      pattern: "!#",
+      negativePattern: "-!#",
+      format: function (b, a) {
+        var d = a.pattern,
+          c = a.negativePattern,
+          h = a.symbol,
+          k = a.separator,
+          l = a.decimal;
+        a = a.groups;
+        var f = ("" + b).replace(/^-/, "").split("."),
+          q = f[0];
+        f = f[1];
+        return (0 <= b.value ? d : c)
+          .replace("!", h)
+          .replace("#", q.replace(a, "$1" + k) + (f ? l + f : ""));
+      },
+      fromCents: !1,
+    },
+    p = /(\d)(?=(\d{3})+\b)/g,
+    n = /(\d)(?=(\d\d)+\d\b)/g;
+  e.prototype = {
+    add: function (b) {
+      var a = this.s,
+        d = this.p;
+      return e((this.intValue + g(b, a)) / (a.fromCents ? 1 : d), a);
+    },
+    subtract: function (b) {
+      var a = this.s,
+        d = this.p;
+      return e((this.intValue - g(b, a)) / (a.fromCents ? 1 : d), a);
+    },
+    multiply: function (b) {
+      var a = this.s;
+      return e(
+        (this.intValue * b) / (a.fromCents ? 1 : Math.pow(10, a.precision)),
+        a
+      );
+    },
+    divide: function (b) {
+      var a = this.s;
+      return e(this.intValue / g(b, a, !1), a);
+    },
+    distribute: function (b) {
+      var a = this.intValue,
+        d = this.p,
+        c = this.s,
+        h = [],
+        k = Math[0 <= a ? "floor" : "ceil"](a / b),
+        l = Math.abs(a - k * b);
+      for (d = c.fromCents ? 1 : d; 0 !== b; b--) {
+        var f = e(k / d, c);
+        0 < l-- && (f = f[0 <= a ? "add" : "subtract"](1 / d));
+        h.push(f);
+      }
+      return h;
+    },
+    dollars: function () {
+      return ~~this.value;
+    },
+    cents: function () {
+      return ~~(this.intValue % this.p);
+    },
+    format: function (b) {
+      var a = this.s;
+      return "function" === typeof b
+        ? b(this, a)
+        : a.format(this, Object.assign({}, a, b));
+    },
+    toString: function () {
+      var b = this.s,
+        a = b.increment;
+      return (Math.round(this.intValue / this.p / a) * a).toFixed(b.precision);
+    },
+    toJSON: function () {
+      return this.value;
+    },
+  };
+  return e;
+});