lanan-old/lanan-master-uniapp/subRescuePages/index/index.vue
愉快的大福 7dc28dc701 init
2024-07-17 14:16:22 +08:00

161 lines
3.7 KiB
Vue

<template>
<view class="page flex-col justify-center">
<view class="group_2 flex-row justify-between">
<view class="notice" style="margin-top: 20rpx;">
<u--image :src="imagesUrl+'notice.png'" width="127rpx" height="123rpx" @click="click"></u--image>
</view>
<view class="text-wrapper_2 flex-col justify-between">
<!-- <text class="text_3 u-line-1" style="color: white;">{{ notice.noticeTitle }}</text> -->
<rich-text style="color: white; font-size: 16px; font-weight: bold;" :nodes="notice.noticeContent"></rich-text>
</view>
</view>
<view class="">
<image mode="widthFix" :src="imagesUrl+'rescue_01_01.png'"
style="width: 750rpx; height: auto;display: block;">
</image>
<view style="position: absolute; top: 370rpx; left:230rpx;">
<u-button type="success" shape="circle" text="拨打救援电话" icon="phone-fill"
@click="call(nightRescueTel)"></u-button>
</view>
<view class="lanan">
<u-button type="success" shape="circle" text="买单" icon="phone-fill"
@click="getmaidan()"></u-button>
</view>
<view style="position: absolute; top: 635rpx; right:220rpx;">
<u-button type="success" shape="circle" text="拨打救援电话" icon="phone-fill"
@click="call(dayRescueTel)"></u-button>
</view>
</view>
<image mode="widthFix" :src="imagesUrl+'rescue_01_02.png'" style="width: 750rpx; height: auto;display: block;">
</image>
<image mode="widthFix" :src="imagesUrl+'rescue_01_03.png'" style="width: 750rpx; height: auto;display: block;">
</image>
<image class="image_7" @click="govip()" :src="imagesUrl+'user_level.png'" />
</view>
</template>
<script>
export default {
data() {
return {
imagesUrl: getApp().globalData.config.imagesUrl,
notice: {},
constants: {},
nightRescueTel: '',
dayRescueTel: ''
};
},
onLoad() {
this.getNotice()
this.getConfig()
},
methods: {
getmaidan() {
console.log("12")
uni.navigateTo({
url: '/subRescuePages/maidan/maidan'
})
},
govip(){
uni.navigateTo({
url:'/pages/tabBar/mine/rules'
})
},
// 获取公告
async getNotice() {
const res = await this.$request({
url: '/system/notice/listWx',
data: {
noticeType: 4
}
})
this.notice = res.rows[0];
console.log(res);
},
// 获取配置:电话
async getConfig() {
const res = await this.$request({
url: '/system/shopconfig/listWx'
})
console.log(res.rows[0]);
// this.inspectionTel = res.rows[0].inspectionTel
this.dayRescueTel = res.rows[0].dayRescueTel
this.nightRescueTel = res.rows[0].nightRescueTel
},
call(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber.toString(), //电话号码
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
},
};
</script>
<style lang="scss" scoped>
.lanan {
position: absolute;
top: 370rpx;
left:570rpx;
}
.page {
width: 750rpx;
}
.group_2 {
border-radius: 11px;
width: 700rpx;
height: 161rpx;
margin: 24rpx 0 0 24rpx;
padding-left: 30rpx;
position: absolute;
top: 10rpx;
left: 0;
z-index: 9999;
}
.text-wrapper_2 {
width: 450rpx;
height: 100rpx;
margin: 32rpx 66rpx 0 31rpx;
}
.text_3 {
width: 240rpx;
overflow-wrap: break-word;
color: #fff;
font-size: 24rpx;
font-family: MicrosoftYaHei-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 24rpx;
}
.paragraph_1 {
width: 449rpx;
overflow-wrap: break-word;
color: #fff;
font-size: 22rpx;
font-family: MicrosoftYaHei;
font-weight: NaN;
text-align: left;
line-height: 30rpx;
margin-top: 18rpx;
}
.image_7 {
width: 700rpx;
height: 122rpx;
margin: 20rpx auto;
}
</style>