Browse Source

添加跑马灯逻辑

master
mike 3 years ago
parent
commit
8a3b05e88a
  1. 13
      packages/article/article.vue
  2. 39
      pages/index/index.vue
  3. 8
      service/agreementArticle.js
  4. 8
      service/index.js

13
packages/article/article.vue

@ -5,7 +5,7 @@
</template>
<script>
import { aboutUs, gradeAgreement, privacyAgreement, cardDesign, ratingStandard } from '@/service/agreementArticle.js';
import { aboutUs, gradeAgreement, privacyAgreement, cardDesign, ratingStandard, getServiceStandard } from '@/service/agreementArticle.js';
export default {
data(){
@ -27,6 +27,8 @@
this.getCardDesign();
}else if(options.type === 'rating_standard'){
this.getRatingStandard();
}else if(options.type === 'service_standard'){
this.getServiceStandard();
}
},
methods: {
@ -69,7 +71,14 @@
uni.setNavigationBarTitle({
title: res.data.datas.title
})
}
},
async getServiceStandard(){
let res = await getServiceStandard();
this.article = res.data.datas.content;
uni.setNavigationBarTitle({
title: res.data.datas.title
})
},
}
}
</script>

39
pages/index/index.vue

@ -75,15 +75,19 @@
</view>
</view>
</view>
<view class="tips_panel" v-if="tips.length > 0">
<u-notice-bar :text="tips" direction="column" speed="250" url="/pages/componentsB/tag/tag"></u-notice-bar>
</view>
<!-- 快速评级 -->
<view class="section_4 flex-col">
<view class="justify-between group_9">
<view class="group_10">
<text class="text_14">快速评级</text>
<text class="text_15">7day</text>
<text class="text_14">开始评级</text>
</view>
<view class="right-group flex-row" @click="$url('/pages/fastRating/fastRating')">
<text>查看详情</text>
<view class="right-group flex-row" @click="$url('/packages/article/article?type=service_standard')">
<text>服务及收费标准</text>
<image src="@/static/icon/rightArrow.png" class="image_8" />
</view>
</view>
@ -140,7 +144,7 @@
</view>
<!-- 评级标准 -->
<view class="justify-between section_9" @click="$url('/pages/ratingCriteria/ratingCriteria')">
<text>评级标准/卡砖设计</text>
<text>评级标准</text>
<image
src="@/static/icon/rightArrow.png"
class="image_8" />
@ -153,7 +157,7 @@
<script>
import lfHeader from '@/components/lf-header.vue';
import { my } from '@/service/index.js';
import { my ,sysInfo } from '@/service/index.js';
import { ratingSearch } from '@/service/grading.js';
@ -168,7 +172,9 @@
user: {},
dots: {},
evaluated_order: [],
showCount: 0
showCount: 0,
tipsDatas:[],
tips:[],
};
},
onShow(){
@ -178,6 +184,8 @@
}
},
async onLoad(query){
this.getSysInfo();
if(query && query.q){
const q = decodeURIComponent(query.q);
console.log("query",q);
@ -204,6 +212,17 @@
},
methods: {
async getSysInfo(){
let res = await sysInfo();
console.log("getSysInfo res",res)
let datas = res.data.datas.tips;
this.tipsDatas = datas;
this.tips = datas.map((item)=>{
return item.title
})
},
async toSubOrder(value){
let res = await ratingSearch(value);
let datas = res.data.datas;
@ -256,6 +275,12 @@
</script>
<style scoped lang="scss">
.tips_panel{
margin-top: 30rpx;
background-color: white;
}
.header-nav{
text-align: center;
position: relative;

8
service/agreementArticle.js

@ -40,6 +40,14 @@ export async function ratingStandard() {
})
}
//服务及收费标准
export async function getServiceStandard() {
return await request({
url: '/api/v1/content/service_standard',
method: 'post'
})
}
//更新优惠券
export async function couponUpdate() {
return await request({

8
service/index.js

@ -22,4 +22,12 @@ export async function couponUpdate() {
url: '/api/v1/coupon_update',
method: 'post',
})
}
// 获取系统信息
export async function sysInfo() {
return await request({
url: '/api/v1/sys_info',
method: 'post',
})
}
Loading…
Cancel
Save