master
lion 2 years ago
parent c8acc547f1
commit 072a7ab721

@ -3,11 +3,11 @@ export const appConfig = {
//appId:"wx3dc65ce9b588727a",//孕育咨询
//baseUrl: 'http://yunyubang.localhost.com',
baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦
// baseUrl: 'https://yybtest.ali251.langye.net',
// baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦
baseUrl: 'https://yybtest.ali251.langye.net',
newBaseUrl: 'https://yunyubang.ali251.langye.net',
// newBaseUrl: 'http://yybtest.ali251.langye.net',
// newBaseUrl: 'https://yunyubang.ali251.langye.net',
newBaseUrl: 'http://yybtest.ali251.langye.net',
//baseUrl:'https://yybtest2021.langye.net',//孕育咨询
openidInfoKey: 'openid_info_yunyubang'

@ -13,24 +13,33 @@
},
{
"path": "pages/active/active",
"style": {
"navigationBarTitleText": "活动列表",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
"style": {
"navigationBarTitleText": "活动列表",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
}
},
{
"path": "pages/active/detail",
"style": {
"navigationBarTitleText": "活动详情"
}
},
{
"path": "pages/active/course",
"style": {
"navigationBarTitleText": "孕育邦",
"navigationBarBackgroundColor": "#ffe7e3",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/active/my",
"style": {
"navigationBarTitleText": "我的活动"
}
},
{
"path": "pages/active/detail",
"style": {
"navigationBarTitleText": "活动详情"
}
},
{
"path": "pages/active/my",
"style": {
"navigationBarTitleText": "我的活动"
}
},
{
"path": "pages/member/member",
@ -314,8 +323,7 @@
},
{
"root": "packages/packageCarecenter",
"pages": [
{
"pages": [{
"path": "pages/commonService/commonCenter",
"style": {
"navigationBarTitleText": "服务列表",
@ -377,17 +385,15 @@
"navigationBarTitleText": "攻略详情",
"navigationBarBackgroundColor": "#FFFFFF"
}
}, {
"path": "pages/home/home",
"style": {
"navigationBarTitleText": "月子",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/home/home",
"style" :
{
"navigationBarTitleText": "月子",
"enablePullDownRefresh": false
}
}
]
]
}
],
"globalStyle": {
@ -428,4 +434,4 @@
}
]
}
}
}

@ -226,7 +226,7 @@
that.orders = [];
}
util.alert(res);
weixin.alert(res);
}
});
}

@ -0,0 +1,241 @@
<template>
<view class='course'>
<view class='courseImg'>
<img src="../../static/coursebg1.png" alt="">
</view>
<view class='course_title'>{{info.title}}</view>
<view class='course_table'>
<u-table border-color='#fff'>
<u-tr>
<u-th>时间</u-th>
<u-th>
<p style="width:180rpx!important">地址</p>
</u-th>
<u-th>
<p style="width:180rpx!important">名称</p>
</u-th>
<u-th>主讲</u-th>
<u-th>报名</u-th>
</u-tr>
<u-tr v-for='(item,index) in infolist' :class="index%2==0?'even':'odd'">
<u-td>
<p class="day">{{item.day}}</p>
<p class="time">{{item.time}}</p>
</u-td>
<u-td>
<p class='address'>{{item.address}}</p>
</u-td>
<u-td>
<p class='name'>{{item.name}}</p>
</u-td>
<u-td>
<p class='speaker'>{{item.speaker?item.speaker:''}}</p>
</u-td>
<u-td>
<p v-if='item.isBut' class='isbut' @click='toActiveDetail(item.link)'>
报名
</p>
</u-td>
</u-tr>
</u-table>
</view>
</view>
</template>
<script>
let sysInfo = uni.getSystemInfoSync();
let SCREEN_WIDTH = sysInfo.screenWidth
let SCREEN_HEIGHT = sysInfo.screenHeight;
let WindowHeight = sysInfo.windowHeight;
let windowWidth = sysInfo.windowWidth;
import {
weixin
} from '@/utils/weixin.js';
export default {
data() {
return {
id: '',
info: {},
infolist: []
}
},
// onShareAppMessage() {
// return {
// title: this.info.name,
// path: "pages/active/detail?id=" + this.info.id + "&promotion_id=" + this
// .user_info.id,
// imageUrl: this.img
// }
// },
onShow() {
},
onLoad(options) {
var that = this;
this.id = options.id;
this.getCourseDetail()
console.log("this.id", this.id)
const scene = decodeURIComponent(options.scene);
console.log(scene)
// if (!weixin.isNull(scene)) {
// this.form.active_id = weixin.getParam(scene, "id");
// this.id = weixin.getParam(scene, "id");
// this.form.promotion = this.promotion_id = weixin.getParam(scene, "promotion_id");
// uni.setStorageSync("base_promotion_id", this.promotion_id);
// }
// if (!weixin.isNull(options.id))
// this.form.active_id = options.id;
// if (!weixin.isNull(options.promotion_id)) {
// this.form.promotion = options.promotion_id;
// uni.setStorageSync("base_promotion_id", options.promotion_id)
// }
},
methods: {
returnDate(date) {
let dates = date.split(' ')[0].split("-")
let md = parseInt(dates[1]) + '月' + parseInt(dates[2]) + '日'
let mdtime = date.split(' ')[1].substring(0, 5)
return {
md: md,
mdtime: mdtime
}
},
toActiveDetail(link) {
uni.navigateTo({
url: link
})
},
compareDate(date1, date2) {
var oDate1 = new Date(date1);
var oDate2 = new Date(date2);
if (oDate1.getTime() > oDate2.getTime()) {
return true; //
} else {
return false; //
}
},
paixu(ary, key) {
return ary.sort(function(a, b) {
let x = parseInt(a[key])
let y = parseInt(b[key])
return ((x < y) ? -1 : (x > y) ? 1 : 0)
})
},
getCourseDetail(id) {
let that = this
weixin.request({
api: '/api/member/course/show',
method: 'GET',
data: {
id: this.id
},
utilSuccess: r => {
that.info = r
let _list = that.paixu(r.item,'sortnumber')
for (var k of _list) {
let day = that.returnDate(k.time).md
let time = that.returnDate(k.time).mdtime
//
let isBut = that.compareDate(k.time, new Date())
that.infolist.push({
day: day,
time: time,
address: k.address,
name: k.name,
speaker: k.speaker,
isBut: isBut,
link: k.link
})
}
},
utilFail: r => {
console.log(r);
}
})
}
}
}
</script>
<style scoped>
.course {
background-color: #ffd3cb;
min-height: 100vh;
}
.course_title {
color: #ff9197;
text-align: center;
font-size: 60rpx;
padding-bottom: 60rpx
}
.course_table {
padding: 0 20rpx;
padding-bottom: 120rpx
}
/deep/ .u-th {
color: #fff !important;
background-color: #ff9197 !important;
}
.day {
color: #ff9197;
font-size: 24rpx !important;
}
.time {
font-size: 20rpx !important;
}
.address {
font-size: 24rpx !important;
width: 180rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 设置行数 */
-webkit-box-orient: vertical;
}
.name {
font-size: 24rpx !important;
width: 180rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 设置行数 */
-webkit-box-orient: vertical;
}
.speaker {
font-size: 24rpx !important;
}
.isbut {
font-size: 24rpx !important;
color: #fff;
background-color: #ff9197;
padding: 5rpx 10rpx;
border-radius: 10rpx;
}
/deep/ .even .u-tr {
background-color: #faf8ef !important;
}
/deep/ .odd .u-tr {
background-color: #fff3f3 !important;
}
</style>

@ -1143,6 +1143,7 @@
if(this.form.promotion){
this.form.spread_member_id = this.form.promotion
}
// this.form.member_id = 14521
console.log(this.form)
// return
weixin.request({

@ -81,7 +81,6 @@
</canvas>
</view>
</view>
</u-popup>

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

@ -157,7 +157,9 @@ export const weixin = {
console.log(result)
const user_info1 = result.data.data.user_info
result.data.data.user_info.openid = user_info1.wechat_openid
uni.setStorageSync(user_info_key, result.data.data)
uni.setStorageSync(user_info_key, result.data.data)
// let _json = {"access_token":"134207|a3d07M2xJFhCQK3YJ5JzZ8L15sYOwo0vWMy5meMR","token_type":"bearer","expires_in":86400,"user_info":{"id":14521,"name":"微信用户123","phone":"18914071203","due_date":"2023-07-10","hospital":null,"wechat":null,"wechat_nickname":"微信用户","address":null,"source":null,"user_source":null,"wechat_openid":"oEgEM0QhlSnJfVUI0qWIK3JM8O7g","wechat_unionid":null,"visit_count":null,"last_login_time":null,"lon":null,"lat":null,"province":null,"city":null,"area":"吴江区","operating":null,"ip":null,"machine":null,"pid":null,"site_id":null,"created_at":"2023-02-07T01:57:06.000000Z","updated_at":"2023-07-10T10:35:53.000000Z","deleted_at":null,"password":null,"promotion":1,"promotion_type":null,"promotion_id":null,"avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132","session_key":"E34k9RRqji6kETr3v7B1/g==","openid":"oEgEM0QhlSnJfVUI0qWIK3JM8O7g"}}
// uni.setStorageSync(user_info_key, _json)
cb(result.data.data)
}
});

Loading…
Cancel
Save