新增政策答疑,教学视频
This commit is contained in:
parent
b9623dbf7a
commit
ce9433b4e3
@ -12,8 +12,8 @@ let httpApiSix
|
|||||||
let wsApi
|
let wsApi
|
||||||
|
|
||||||
// 在打包之前请检查当前环境是否正确
|
// 在打包之前请检查当前环境是否正确
|
||||||
// const env = 'dev'; // 开发
|
const env = 'dev'; // 开发
|
||||||
const env = 'prod'; // 生产
|
// const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch (env) {
|
switch (env) {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "惠农生活",
|
"name" : "惠农生活",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.9.3",
|
"versionName" : "1.9.4",
|
||||||
"versionCode" : 193,
|
"versionCode" : 194,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
16
pages.json
16
pages.json
@ -312,6 +312,22 @@
|
|||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"onReachBottomDistance": 300
|
"onReachBottomDistance": 300
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/rich/rich",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "政策答疑",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/rich/mp4",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "教学视频",
|
||||||
|
"enablePullDownRefresh" : false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
|
@ -585,7 +585,6 @@ import activityCard from "@/components/activityCard.vue"
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
||||||
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
|
url: `/pages/plantGrass/plant_detail/index?id=${item.community_id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -613,7 +612,7 @@ import activityCard from "@/components/activityCard.vue"
|
|||||||
// url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}`
|
// url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}`
|
||||||
// })
|
// })
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `pages/cloud_warehouse/big_classification/index`
|
url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${this.street_id}&townName=${this.town}&source=103&location=${this.latitude},${this.longitude}`
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
124
pages/rich/mp4.vue
Normal file
124
pages/rich/mp4.vue
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<view class="box" style="position: relative;">
|
||||||
|
<view style="height: 30rpx;"></view>
|
||||||
|
<view class="">
|
||||||
|
<block v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="card">
|
||||||
|
<view class="card-tit">
|
||||||
|
<view class="" style="font-size: 32rpx;display: flex;align-items: center;">
|
||||||
|
<view class="">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="display: flex;align-items: center;" @click='open(index)'>
|
||||||
|
展开
|
||||||
|
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/bceaf202401271439428345.png" width="24rpx"
|
||||||
|
height="24rpx" class='icon' :style=" {transform:isOpen[index]? 'rotate(180deg)' :'rotate(0)'} " />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-content" :style="{height:isOpen[index]?'0':'auto',padding: isOpen[index]?'0':'20rpx' } "
|
||||||
|
style="height: 0;padding: 0;">
|
||||||
|
<view id="formheight1">
|
||||||
|
<view class="content" v-if="!isOpen[index]" v-html="item.content.content"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<u-empty :show="list.length == 0" mode="list" text="没有找到数据呢" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getArticleList } from "@/api/api.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpen: [],
|
||||||
|
list: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
onReady() {},
|
||||||
|
onLoad() {
|
||||||
|
this.getArticleList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getArticleList() {
|
||||||
|
getArticleList(27).then(res => {
|
||||||
|
res.data.list.forEach(e => {
|
||||||
|
e.content.content = e.content.content.replace(/\<video /g, '<video style="width: 100%; background-color: #888888;" ');
|
||||||
|
this.isOpen.push(true);
|
||||||
|
})
|
||||||
|
this.list = res.data.list;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
open(index) {
|
||||||
|
this.isOpen.forEach((item, i) => {
|
||||||
|
if (i == index) {
|
||||||
|
this.isOpen.splice(index, 1, this.isOpen[index] ? false : true);
|
||||||
|
} else {
|
||||||
|
this.isOpen.splice(i, 1, true);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
background: linear-gradient(to bottom, #FFF4DB, #FFEAC3);
|
||||||
|
min-height: 100vh;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-bottom: 5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
display: flex;
|
||||||
|
width: 638rpx;
|
||||||
|
margin: 230rpx auto 30rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 686rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: white;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.card-tit {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
background-color: #FFE7B9;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: 300ms;
|
||||||
|
width: 690rpx;
|
||||||
|
margin: 18rpx auto;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
transform: translateY(2rpx);
|
||||||
|
transition: 300ms !important;
|
||||||
|
}
|
||||||
|
</style>
|
129
pages/rich/rich.vue
Normal file
129
pages/rich/rich.vue
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<view class="box" style="position: relative;">
|
||||||
|
<view style="height: 30rpx;"></view>
|
||||||
|
<view class="">
|
||||||
|
<block v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="card">
|
||||||
|
<view class="card-tit">
|
||||||
|
<view class="" style="font-size: 32rpx;display: flex;align-items: center;">
|
||||||
|
<view class="">
|
||||||
|
{{item.title}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="" style="display: flex;align-items: center;" @click='open(index)'>
|
||||||
|
展开
|
||||||
|
<u--image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/bceaf202401271439428345.png" width="24rpx"
|
||||||
|
height="24rpx" class='icon' :style=" {transform:isOpen[index]? 'rotate(180deg)' :'rotate(0)'} " />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-content" :style="{height:isOpen[index]?'0':'auto',padding: isOpen[index]?'0':'20rpx' } "
|
||||||
|
style="height: 0;padding: 0;">
|
||||||
|
<view id="formheight1">
|
||||||
|
<view class="content" v-if="!isOpen[index]" v-html="item.content.content"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<u-empty :show="list.length == 0" mode="list" text="没有找到数据呢" icon="http://cdn.uviewui.com/uview/empty/list.png"></u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getArticleList } from "@/api/api.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isOpen: [],
|
||||||
|
list: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
onReady() {},
|
||||||
|
onLoad() {
|
||||||
|
let user = this.$store.state.app.userInfo;
|
||||||
|
if (typeof user == 'string') user = JSON.parse(user);
|
||||||
|
this.getArticleList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getArticleList() {
|
||||||
|
getArticleList(26).then(res => {
|
||||||
|
res.data.list.forEach(e => {
|
||||||
|
e.content.content = e.content.content.replace(/\<video /g, '<video style="width: 100%; background-color: #888888;" ');
|
||||||
|
this.isOpen.push(true);
|
||||||
|
})
|
||||||
|
this.list = res.data.list;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
back() {
|
||||||
|
uni.navigateBack();
|
||||||
|
},
|
||||||
|
open(index) {
|
||||||
|
this.isOpen.forEach((item, i) => {
|
||||||
|
if (i == index) {
|
||||||
|
this.isOpen.splice(index, 1, this.isOpen[index] ? false : true);
|
||||||
|
} else {
|
||||||
|
this.isOpen.splice(i, 1, true);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box {
|
||||||
|
background: linear-gradient(to bottom, #FFF4DB, #FFEAC3);
|
||||||
|
min-height: 100vh;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-bottom: 5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tit {
|
||||||
|
display: flex;
|
||||||
|
width: 638rpx;
|
||||||
|
margin: 230rpx auto 30rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 686rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
background-color: white;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.card-tit {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
background-color: #FFE7B9;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: 300ms;
|
||||||
|
width: 690rpx;
|
||||||
|
margin: 18rpx auto;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
transform: translateY(2rpx);
|
||||||
|
transition: 300ms !important;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user