Commit 89c200e2 authored by 刘鑫鹏's avatar 刘鑫鹏

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	tjty-app/pages_my/my/my.vue
#	tjty-app/pages_my/myActicity/myActivity.vue
parents cfdff04b 0bdc33af
...@@ -7,6 +7,9 @@ export function listExercise(query) { ...@@ -7,6 +7,9 @@ export function listExercise(query) {
return request({ return request({
url: '/system/course/selectCourseList', url: '/system/course/selectCourseList',
method: 'get', method: 'get',
headers:{
isToken:false
}
}) })
} }
...@@ -15,22 +18,25 @@ export function listActivityStart(query) { ...@@ -15,22 +18,25 @@ export function listActivityStart(query) {
return request({ return request({
url: '/tjt-activity/activity/selectActivityListStart', url: '/tjt-activity/activity/selectActivityListStart',
method: 'get', method: 'get',
headers:{
isToken:false
}
}) })
} }
//有token时调用 //有token时调用
// 查询训练体验列表 // 查询训练体验列表
export function listExerciseHaveToken(query) { // export function listExerciseHaveToken(query) {
return request({ // return request({
url: '/system/course/selectCourseListToken', // url: '/system/course/selectCourseListToken',
method: 'get', // method: 'get',
}) // })
} // }
// 查询热门活动列表 // 查询热门活动列表
export function listActivityStartHaveToken(query) { // export function listActivityStartHaveToken(query) {
return request({ // return request({
url: '/tjt-activity/activity/selectActivityListStartToken', // url: '/tjt-activity/activity/selectActivityListStartToken',
method: 'get', // method: 'get',
}) // })
} // }
\ No newline at end of file \ No newline at end of file
{ {
"pages": [ "pages": [{
{ "path": "pages_home/tjty_home_page/tjty_home_page",
"path" : "pages_home/tjty_home_page/tjty_home_page", "style": {
"style": { "navigationBarTitleText": "天体运动",
"navigationBarTitleText": "天体运动" "enablePullDownRefresh": true,
} "navigationStyle": "custom"
}
}, },
{ {
"path": "pages/index/index", "path": "pages/index/index",
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
"navigationBarTitleText": "天体运动" "navigationBarTitleText": "天体运动"
} }
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "天体运动", "navigationBarTitleText": "天体运动",
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
</view> </view>
<view style="margin-top: -70rpx;"> <view style="margin-top: -70rpx;">
<view class="activity_font"> <text <view class="activity_font"> <text
style="padding-top: -50rpx;">报名截止:&nbsp;&nbsp;{{!item.signupTime ? '—' : item.signupTime}}</text> style="padding-top: -1rpx;">报名截止:&nbsp;&nbsp;{{!item.signupTime ? '—' : item.signupTime}}</text>
</view> </view>
<view class="activity_font"> <view class="activity_font">
<text>组织机构:&nbsp;&nbsp;{{item.mechanismName |ellipsisInstitutions}}</text></view> <text>组织机构:&nbsp;&nbsp;{{item.mechanismName |ellipsisInstitutions}}</text></view>
<view class="activity_font" style="margin-bottom:10rpx;"> <text>已报名:&nbsp;&nbsp;<text <view class="activity_font" style="padding-bottom:10rpx;"> <text>已报名:&nbsp;&nbsp;<text
style="color: #FCA624; margin-left: 12rpx;"> style="color: #FCA624; margin-left: 12rpx;">
<text v-if="item.type ==='1'">{{item.signupNum}}</text> <text v-if="item.type ==='1'">{{item.signupNum}}</text>
<text v-if="item.type ==='2'">{{item.signupExamNum}}</text> <text v-if="item.type ==='2'">{{item.signupExamNum}}</text>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
created() { created() {
// uni.setStorageSync("title", '赛事活动') // uni.setStorageSync("title", '赛事活动')
// this.getList() // this.getList()
this.getList() // this.getList()
}, },
onShow() { onShow() {
console.log('onShow') console.log('onShow')
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
.image-status { .image-status {
// justify-content: end; // justify-content: end;
position: absolute; position: absolute;
padding-left: 86%; padding-left: 86.1%;
// right: 0.01rpx; // right: 0.01rpx;
top: 0rpx; top: 0rpx;
width: 98rpx; width: 98rpx;
...@@ -244,10 +244,10 @@ ...@@ -244,10 +244,10 @@
padding-top: 58%; padding-top: 58%;
.activity_font { .activity_font {
font-size: 25rpx; font-size: 30rpx;
padding-left: 3%; padding-left: 3%;
text-align: left; text-align: left;
line-height: 60rpx; line-height: 50rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Regular; font-family: Source Han Sans CN, Source Han Sans CN-Regular;
} }
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
height: 77rpx; height: 77rpx;
opacity: 0.6; opacity: 0.6;
background: #000000; background: #000000;
top: -80rpx; top: -77rpx;
z-index: 9; z-index: 9;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
......
...@@ -313,19 +313,20 @@ ...@@ -313,19 +313,20 @@
.image { .image {
position: absolute; position: absolute;
border-top-left-radius: 15rpx; border-top-left-radius: 30rpx;
border-top-right-radius: 15rpx; border-top-right-radius: 30rpx;
height: 380rpx; height: 380rpx;
width: 100%; width: 100%;
} }
.image-status { .image-status {
position: absolute; position: absolute;
padding-left: 87%; padding-left: 86.5%;
top: -5rpx; // right: 0.01rpx;
width: 105rpx; top: 0rpx;
height: 105rpx; width: 98rpx;
z-index: 99; height: 98rpx;
z-index: 99;
} }
} }
...@@ -341,7 +342,7 @@ ...@@ -341,7 +342,7 @@
height: 77rpx; height: 77rpx;
opacity: 0.6; opacity: 0.6;
background: #000000; background: #000000;
top: -82rpx; top: -87rpx;
z-index: 9; z-index: 9;
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
......
...@@ -147,7 +147,8 @@ ...@@ -147,7 +147,8 @@
timer: null, timer: null,
hour: 0, hour: 0,
minutes: 0, minutes: 0,
seconds: 0 seconds: 0,
questionScore:''
}; };
}, },
methods: { methods: {
...@@ -214,9 +215,9 @@ ...@@ -214,9 +215,9 @@
this.selectItem = item.substr(0, 1) this.selectItem = item.substr(0, 1)
if (this.question[this.questionNumber].answer === this.selectItem) { if (this.question[this.questionNumber].answer === this.selectItem) {
this.selectColor = 'color: #36b25b;' this.selectColor = 'color: #36b25b;'
this.score += 10 this.score += this.questionScore
this.rightNumber++ this.rightNumber++
this.cumulativeScore += 10 this.cumulativeScore += this.questionScore
} else { } else {
this.selectColor = 'color: #e02424;' this.selectColor = 'color: #e02424;'
} }
...@@ -249,6 +250,13 @@ ...@@ -249,6 +250,13 @@
clearInterval(this.timer) clearInterval(this.timer)
// this.timer = null // this.timer = null
} }
// let addScoreData = {
// signupId:this.signupId,
// examId:this.examId,
// score:this.score,
// activityId:this.activityId,
// flagTime:this.flagTime
// }
addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => { addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
console.log('成绩录入', res); console.log('成绩录入', res);
this.scoreFlag = false this.scoreFlag = false
...@@ -325,6 +333,7 @@ ...@@ -325,6 +333,7 @@
} }
}) })
this.total = res.data[0].questionsNum this.total = res.data[0].questionsNum
this.questionScore = res.data[0].score/res.data[0].questionsNum
//将取到的题目id集合反转 //将取到的题目id集合反转
questionId = questionId.reverse() questionId = questionId.reverse()
for (let i = 0; i < res.data.length / 4; i++) { for (let i = 0; i < res.data.length / 4; i++) {
...@@ -407,6 +416,7 @@ ...@@ -407,6 +416,7 @@
this.flagTime = res.data[0].examTime this.flagTime = res.data[0].examTime
// this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') // this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd')
this.examTime = res.data[0].examTime //今天的日期 this.examTime = res.data[0].examTime //今天的日期
this.questionScore = res.data[0].score/res.data[0].questionsNum
// this.examTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //今天的日期 // this.examTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //今天的日期
// this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0] // this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0]
// .examTime) //今天是答题活动的第几天 // .examTime) //今天是答题活动的第几天
......
...@@ -2,18 +2,20 @@ ...@@ -2,18 +2,20 @@
<view class="home_container"> <view class="home_container">
<view class="home_content_head"> <view class="home_content_head">
<image src="../../static/home-imgs/home_bg@2x.png"></image> <image src="../../static/home-imgs/home_bg@2x.png"></image>
<view class="home_title" :style="{top:marginHight}">海河体育</view>
<view class="headMenu"> <view class="headMenu">
<ul> <ul>
<li> <li>
<navigator url="" hover-class="none" open-type="navigate"> <view @click="goto" hover-class="none" open-type="navigate">
<view style="text-align: center;"> <view style="text-align: center;">
<view> <view>
<image src="../../static/home-imgs/home_icon_fengcai@2x.png"></image> <image src="../../static/home-imgs/home_icon_fengcai@2x.png"></image>
</view> </view>
<view style="color: #1F86EE; line-height: 21px;height: 100%;width: 100%;">天体风采</view> <view style="color: #1F86EE; line-height: 21px;height: 100%;width: 100%;">天体风采
</view>
</view> </view>
</navigator> </view>
</li> </li>
<li> <li>
<navigator url="../../pages_activity/activity/activity" hover-class="none" open-type="navigate"> <navigator url="../../pages_activity/activity/activity" hover-class="none" open-type="navigate">
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
<view class="home_activity_item" v-for="(item1,index1) in activityList" :key="index1" <view class="home_activity_item" v-for="(item1,index1) in activityList" :key="index1"
@click="goActDetil(item1)"> @click="goActDetil(item1)">
<view class="activity_image"> <view class="activity_image">
<image class="image" :src="item1.bannerImage"></image> <image class="image" :src="'https://www.aiwanyundong.com/api/' + item1.bannerImage"></image>
</view> </view>
<view class="activity-body"> <view class="activity-body">
<view class="activity_image_title"> <view class="activity_image_title">
...@@ -81,10 +83,10 @@ ...@@ -81,10 +83,10 @@
<view class="home_exercise_item" v-for="(item,index) in exerciseList" :key="index"> <view class="home_exercise_item" v-for="(item,index) in exerciseList" :key="index">
<view class="ima"> <view class="ima">
<image style="width: 116px;height:116px;border-radius:16px " <image style="width: 116px;height:116px;border-radius:16px "
:src="item.image"></image> :src="'https://www.aiwanyundong.com/api/' + item.image"></image>
</view> </view>
<view> <view style="width: 66%;">
<view style="height: 80px;width: 265px"> <view style="height: 80px;">
<view class="a-card"> <view class="a-card">
{{item.mechanismName}} {{item.mechanismName}}
</view> </view>
...@@ -92,7 +94,7 @@ ...@@ -92,7 +94,7 @@
适用人群:&nbsp;&nbsp;{{item.propertyPeople}} 适用人群:&nbsp;&nbsp;{{item.propertyPeople}}
</view> </view>
</view> </view>
<view style="width: 265px;"> <view>
<button class="b-card" @click="toAppoint(item)"> <button class="b-card" @click="toAppoint(item)">
详情 详情
</button> </button>
...@@ -140,6 +142,7 @@ ...@@ -140,6 +142,7 @@
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
...@@ -159,43 +162,56 @@ ...@@ -159,43 +162,56 @@
export default { export default {
data() { data() {
return { return {
marginHight: '',
activityList: [], activityList: [],
exerciseList: [] exerciseList: [],
url: '/pages_home/tjty_home_page/tjty_home_page'
}; };
}, },
computed: { computed: {
...mapState('m_user', ['userInfo']), ...mapState('m_user', ['userInfo']),
...mapState('m_user', ['token']) ...mapState('m_user', ['token'])
}, },
onPullDownRefresh() {
this.activityList = [],
this.exerciseList = [],
this.login()
uni.stopPullDownRefresh()
},
methods: { methods: {
...mapMutations('m_user', ['updateToken']), ...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']), ...mapMutations('m_user', ['updateUserInfo']),
//登录判断 goto() {
login() { uni.showToast({
if (!this.token) { title: '正在建设中',
this.getActivityList() icon: 'none'
this.getExerciseList()
} else {
this.getExerciseListHaveToken()
this.getActivityListHaveToken()
}
},
getExerciseListHaveToken() {
listExerciseHaveToken().then(res => {
this.exerciseList = [...this.exerciseList, ...res.data] || []
}).catch(err => {
}) })
}, },
getActivityListHaveToken() { //登录判断
listActivityStartHaveToken().then(res => { login() {
this.activityList = [...this.activityList, ...res.data] || [] // if (!this.token) {
}).catch(err => { this.getActivityList()
this.getExerciseList()
}) // } else {
// this.getExerciseListHaveToken()
// this.getActivityListHaveToken()
// }
}, },
// getExerciseListHaveToken() {
// listExerciseHaveToken().then(res => {
// this.exerciseList = [...this.exerciseList, ...res.data] || []
// }).catch(err => {
// })
// },
// getActivityListHaveToken() {
// listActivityStartHaveToken().then(res => {
// this.activityList = [...this.activityList, ...res.data] || []
// }).catch(err => {
// })
// },
getActivityList() { getActivityList() {
listActivityStart().then(res => { listActivityStart().then(res => {
this.activityList = [...this.activityList, ...res.data] || [] this.activityList = [...this.activityList, ...res.data] || []
...@@ -251,8 +267,9 @@ ...@@ -251,8 +267,9 @@
} }
} }
}, },
created() { onLoad() {
this.login() this.login()
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + 9 + 'px'
} }
} }
</script> </script>
...@@ -267,12 +284,24 @@ ...@@ -267,12 +284,24 @@
height: 212px; height: 212px;
position: relative; position: relative;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden;
.home_title {
z-index: 2;
position: absolute;
font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Bold;
font-weight: 700;
left: 2%;
bottom: 75%;
}
.headMenu { .headMenu {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 100%; width: 100%;
top: 35%; top: 25%;
} }
} }
...@@ -283,7 +312,7 @@ ...@@ -283,7 +312,7 @@
.headMenu ul { .headMenu ul {
width: 100%; width: 100%;
padding-top: 10rpx; padding-top: 100rpx;
} }
.headMenu ul li { .headMenu ul li {
...@@ -305,13 +334,15 @@ ...@@ -305,13 +334,15 @@
.home_content_body { .home_content_body {
width: 100%; width: 100%;
height: calc(100% - 272px); height: calc(100% - 272px);
overflow: auto; overflow-x: hidden;
overflow-y: hidden;
padding-bottom: 65px;
.home_activity { .home_activity {
margin-top: 30px; margin-top: 30px;
.home_activity_item { .home_activity_item {
margin: 30rpx 30rpx 30rpx 30rpx; margin: 3% 2% 4% 2%;
background: #ffffff; background: #ffffff;
border-radius: 16px; border-radius: 16px;
box-shadow: 0rpx 6rpx 20rpx 0rpx #dddddd; box-shadow: 0rpx 6rpx 20rpx 0rpx #dddddd;
...@@ -324,6 +355,7 @@ ...@@ -324,6 +355,7 @@
border-top-left-radius: 15rpx; border-top-left-radius: 15rpx;
border-top-right-radius: 15rpx; border-top-right-radius: 15rpx;
width: 100%; width: 100%;
height: 165px;
} }
} }
...@@ -344,10 +376,6 @@ ...@@ -344,10 +376,6 @@
box-shadow: 0px 3px 10px 0px #dddddd; box-shadow: 0px 3px 10px 0px #dddddd;
text-align: right; text-align: right;
button {
margin-right: 5%;
}
.ima { .ima {
margin: 8px; margin: 8px;
...@@ -373,8 +401,11 @@ ...@@ -373,8 +401,11 @@
.a-card { .a-card {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 32rpx; font-size: 32rpx;
width: 500rpx; width: 94%;
font-family: Source Han Sans CN, Source Han Sans CN-Bold; font-family: Source Han Sans CN, Source Han Sans CN-Bold;
font-weight: 700; font-weight: 700;
text-align: left; text-align: left;
...@@ -383,21 +414,19 @@ ...@@ -383,21 +414,19 @@
} }
.b-card { .b-card {
// left: 132px; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
top: 25rpx; top: 25rpx;
width: 152rpx; width: 152rpx;
height: 64rpx; height: 64rpx;
right: 0%; margin-right: 7%;
// height: auto;
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;
font-size: 14px; font-size: 14px;
line-height: 32px; line-height: 32px;
background: #3b7cde; background: #3b7cde;
border-radius: 16px; border-radius: 16px;
// margin-top: -100rpx;
// margin-right: 100rpx;
} }
} }
...@@ -408,14 +437,15 @@ ...@@ -408,14 +437,15 @@
.line { .line {
width: 100%; width: 100%;
height: 1px; height: 1px;
background: #333333 background: #b6b6b6
} }
width: 100%; width: 100%;
// position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 60px; height: 60px;
background-color: white;
navigator { navigator {
margin-top: 7px; margin-top: 7px;
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</view> </view>
<view style="line-height: 26px;height: 100%;width: 50%;">我的证书</view> <view style="line-height: 26px;height: 100%;width: 50%;">我的证书</view>
</view> </view>
</navigator> </navigator>
</li> </li>
</ul> </ul>
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
return { return {
// token: uni.getStorageSync("token"), // token: uni.getStorageSync("token"),
type: 1, type: 1,
url: '/pages_my/my/my' url: '/pages_home/tjty_home_page/tjty_home_page'
} }
}, },
computed: { computed: {
...@@ -146,11 +147,6 @@ ...@@ -146,11 +147,6 @@
onLoad() { onLoad() {
this.login() this.login()
}, },
methods: { methods: {
...mapMutations('m_user', ['updateToken']), ...mapMutations('m_user', ['updateToken']),
...mapMutations('m_user', ['updateUserInfo']), ...mapMutations('m_user', ['updateUserInfo']),
...@@ -219,8 +215,8 @@ ...@@ -219,8 +215,8 @@
height: 299px; height: 299px;
position: relative; position: relative;
overflow-x: hidden; overflow-x: hidden;
.home{ .home{
position: absolute; position: absolute;
z-index: 2; z-index: 2;
......
...@@ -29,18 +29,18 @@ ...@@ -29,18 +29,18 @@
</view> </view>
<view style="width: 20%;height: 100%;"> <view style="width: 20%;height: 100%;">
<!-- <view class="item1"> --> <!-- <view class="item1"> -->
<image class="image-status" src="../../static/oper-icon/content_tag_weikaishi@2x.png" <image class="image-status" src="../../static/oper-icon/content_tag_weikaishi@2x.png"
v-if="item.activityStatus==='0'"></image> v-if="item.activityStatus==='0'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_jinxingzhong@2x.png" <image class="image-status" src="../../static/oper-icon/content_tag_jinxingzhong@2x.png"
v-else-if="item.activityStatus==='1'"></image> v-else-if="item.activityStatus==='1'"></image>
<image class="image-status" src="../../static/oper-icon/content_tag_yijieshu@2x.png" v-else> <image class="image-status" src="../../static/oper-icon/content_tag_yijieshu@2x.png" v-else>
</image> </image>
<!-- </view> --> <!-- </view> -->
</view> </view>
</view> </view>
<dividerface></dividerface> <dividerface></dividerface>
...@@ -73,11 +73,12 @@ ...@@ -73,11 +73,12 @@
<view style="margin-bottom: 20px;">孩子证件号&nbsp;:------</view> <view style="margin-bottom: 20px;">孩子证件号&nbsp;:------</view>
<view > <view >
<view style="margin: 30% 30px 5% 20px;"><button style="width: 80px;height: 28px;line-height: 24px;" type="default" @tap="cancel"><text style="font-size: 15px;">关闭</text></button></view> <view style="margin: 30% 30px 5% 20px;"><button style="width: 80px;height: 28px;line-height: 24px;" type="default" @tap="cancel"><text style="font-size: 15px;">关闭</text></button></view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
...@@ -90,14 +91,14 @@ ...@@ -90,14 +91,14 @@
import { import {
getSinInInfo getSinInInfo
} from "@/api/activity.js"; } from "@/api/activity.js";
import { import {
userInfo userInfo
} from 'os'; } from 'os';
export default { export default {
data() { data() {
return { return {
show:false, show:false,
wechatId: null, wechatId: null,
status: 1, status: 1,
...@@ -111,12 +112,12 @@ ...@@ -111,12 +112,12 @@
}, },
onLoad() { onLoad() {
this.wechatId = this.userInfo.wechatId this.wechatId = this.userInfo.wechatId
this.getList(this.wechatId) this.getList(this.wechatId)
// this.getlista(this.wechatId,this.activityId) // this.getlista(this.wechatId,this.activityId)
}, },
methods: { methods: {
tapPopup() { tapPopup() {
this.show = true; this.show = true;
}, },
...@@ -124,8 +125,8 @@ ...@@ -124,8 +125,8 @@
cancel() { cancel() {
this.show = false; this.show = false;
}, },
getList(wechatId) { getList(wechatId) {
getMyActivitySignupByWechatId(wechatId).then(response => { getMyActivitySignupByWechatId(wechatId).then(response => {
console.log(response) console.log(response)
...@@ -141,8 +142,8 @@ ...@@ -141,8 +142,8 @@
// this.signInList =[...this.signInList, ...response.rows] || [] // this.signInList =[...this.signInList, ...response.rows] || []
// }) // })
// }, // },
goActivity(type, wechatId, activityId) { goActivity(type, wechatId, activityId) {
if (type === '1') { if (type === '1') {
...@@ -169,7 +170,7 @@ ...@@ -169,7 +170,7 @@
this.signInList =response.data this.signInList =response.data
}) })
} }
else{ else{
uni.navigateTo({ uni.navigateTo({
...@@ -201,7 +202,7 @@ ...@@ -201,7 +202,7 @@
border-radius: 16px; border-radius: 16px;
box-shadow: 0px 3px 10px 0px #dddddd; box-shadow: 0px 3px 10px 0px #dddddd;
.image-status { .image-status {
// position: relative; // position: relative;
// // top: -120rpx; // // top: -120rpx;
...@@ -211,8 +212,8 @@ ...@@ -211,8 +212,8 @@
z-index: 4; z-index: 4;
} }
// :nth-child(1) { // :nth-child(1) {
...@@ -235,8 +236,8 @@ ...@@ -235,8 +236,8 @@
line-height: 30px; line-height: 30px;
font-size: 18px; font-size: 18px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular; font-family: Source Han Sans CN, Source Han Sans CN-Regular;
} }
......
// import 'vuex' from vuex
import store from '@/store/store.js' import store from '@/store/store.js'
// 获取当前帐号信息
const accountInfo = wx.getAccountInfoSync();
// env类型
const env = accountInfo.miniProgram.envVersion;
if (!env) {
console.error("获取运行环境失败!");
}else{
console.log(env);
}
const url_all = { const url_all = {
// 'DEV': 'http://192.168.1.161:8080', // 开发
// 'DEV': 'http://192.168.0.97:8080',
// DEV: "http://116.205.136.218:8088/api", //线上服务 // DEV: "http://116.205.136.218:8088/api", //线上服务
// 'DEV': 'http://127.0.0.1:8080', // 开发 // 'DEV': 'http://127.0.0.1:8080', // 开发
// 'DEV': 'http://192.168.1.11:8080' // 'DEV': 'http://192.168.1.11:8080'
'DEV': 'https://www.aiwanyundong.com/api/' // 开发版
develop: 'https://www.aiwanyundong.com/api',
// develop: 'http://192.168.0.63:8080',
// 体验版
trial: 'https://www.aiwanyundong.com/api',
// 正式版
release: 'https://www.aiwanyundong.com/api'
// 'DEV': 'https://www.aiwanyundong.com/api/'
}; };
let BASEURL = url_all["DEV"]; let BASEURL = url_all[env];
export const request = (options = {}) => { export const request = (options = {}) => {
return new Promise((resolve, rejects) => { return new Promise((resolve, rejects) => {
...@@ -45,7 +64,7 @@ function handleRequest(options, resolve, reject) { ...@@ -45,7 +64,7 @@ function handleRequest(options, resolve, reject) {
//获取token //获取token
function getToken() { function getToken() {
// return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA" // return "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjljZDRiMmJmLTNjZDAtNDNjNy1hZWJhLTJkMWNiNjYwNGU3NiJ9.pEQ5o6rVhGmryKt23avS9BV_2F5Z-3ujS30uAWIZkZQL3GCnnsFgsBYnKHErEFLvKZRQV7efnq_MCJZCjOTcJA"
return 'wx_' + store.state.m_user.token; return 'wx_' + store.state.m_user.token;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment