123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <template>
- <view>
- <view class="boxWarp mb20px">
- <view class="box linear2" style="height:100vh;">
- <view class="boxContent2" style="margin-top:50%;">
- <view class="clearfix" style="margin-bottom: 10px;">
- <text class="fz26px" style="font-weight: bold;">{{dingName}}</text>
- <u-line dashed></u-line>
- </view>
- <view class="flex-container">
- <text class="flex-item">营业状态</text>
- <u-tag class="flex-item tag-item" plain :text="tags ? '营业中' : '离线'" :type="tags ? 'success' : 'error'" size="mini"></u-tag>
- </view>
- <text>客服电话:18011111111</text>
- </view>
- <view class="footer">
- <u-button type="primary" shape="circle" text="拨打客服电话"
- color="linear-gradient(to right, #F54319, #FF6D20)" @click="call()"></u-button>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- img: 'https://cdn.uviewui.com/uview/album/1.jpg',
- orderinfo: {},
- dinList: {},
- tags: 1,
- dingName: '23333'
- }
- },
- created() {
- this.fatchDate()
- },
- methods: {
- call() {
- if (this.orderinfo.shopCall) {
- uni.makePhoneCall({
- phoneNumber: this.orderinfo.shopCall
- });
- } else {
- uni.showToast({
- icon: 'none',
- title: '暂无商家电话'
- })
- }
- },
- fatchDate() {
- const params = {
- id: '1111'
- }
- //const result = await this.$request('get', '/diningCar/{id}')
- const result = this.$request('get', '/diningCar', params)
- if (result) {
- this.dinList = result.data
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .font {
- font-family: "CustomFont";
- color: #fff;
- }
- .flex-container {
- display: flex;
- align-items: center;
- /* 垂直居中 */
- justify-content: flex-start;
- /* 水平左对齐 */
- }
- .flex-item {
- /* 根据需要设置text的宽度 */
- width: 100%;
- /* 或者其他适当的宽度 */
- }
- .tag-item {
- margin-left: auto;
- /* 将标签推到右边 */
- }
- .box {
- padding: 20rpx 0;
- // background-image: linear-gradient(#00a551 10%, #fff 30%);
- border-bottom-left-radius: 30rpx;
- border-bottom-right-radius: 30rpx;
- background-position: top;
- box-shadow: 0 0 5px 2px #ebebeb;
- background-repeat: no-repeat;
- }
- .linear2 {
- // background-image: linear-gradient(#00a551 20%, #fff 50%);
- background-image: url('https://cdn.uviewui.com/uview/album/1.jpg');
- }
- .boxText {
- font-size: 28rpx;
- line-height: 40rpx;
- color: #c8c9cc;
- }
- .tabFlexBox {
- display: flex;
- text-align: center;
- // background-color: #fff;
- padding-bottom: 10rpx;
- }
- .tabFlexBox .tabFlexBoxItem {
- flex: 1;
- position: relative;
- }
- .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemTitle {
- font-size: 36rpx;
- font-weight: bold;
- line-height: 80rpx;
- }
- .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemDes {
- color: #c8c9cc;
- font-size: 28rpx;
- line-height: 40rpx;
- display: inline-block;
- padding: 0 20rpx;
- }
- .tabFlexBox .tabFlexBoxItem .tabFlexBoxItemLine {
- width: 1px;
- height: 50rpx;
- background-color: #c8c9cc;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- right: 0;
- }
- .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemTitle {
- color: #00a551;
- font-size: 40rpx;
- }
- .tabFlexBox .tabFlexBoxItem.active .tabFlexBoxItemDes {
- background-color: #00a551;
- border-radius: 20rpx;
- color: #fff;
- }
- .boxContent2 {
- border-radius: 60rpx;
- background-color: #fff;
- padding: 40rpx;
- }
- .carList {
- display: flex;
- // flex-wrap: wrap;
- }
- .footer {
- flex-direction: column;
- position: fixed;
- left: 5px;
- right: 5px;
- bottom: 10px;
- }
- </style>
|