Commit 155f7310 authored by 刘文虎's avatar 刘文虎
parents 3765eaa7 697ece6b
Pipeline #4330 canceled with stages
......@@ -581,6 +581,7 @@
id: id
})
.then(res => {
console.log('--------repairDetail------', res)
if (res.data) {
this.setForm(res.data);
}
......@@ -611,7 +612,7 @@
expenseDetails: data.expenseDetails,
faultRecord: data.faultRecord
};
if (data.faultRecord.id) {
if (data.faultRecord && data.faultRecord.id) {
this.faultRecord = {
...data.faultRecord
};
......@@ -705,9 +706,9 @@
if (res.code == 0) {
if (this.billId) {
uni.$emit('maintain-bill-detail');
} else {
uni.$emit('maintain-bill-list');
}
uni.$emit('maintain-bill-list');
// 防止返回
this.billId = res.data;
this.form.id = this.billId;
......
......@@ -3,13 +3,13 @@
<!-- pages/my-bonus/index.wxml -->
<view class="cd-key-view">
<view class="content">
<view :class="['top', { 'no-list': noList }]">
<view :class="['top', { noList: noList }]">
<image class="top-image" mode="widthFix" :src="duihuanbiaotiImg" />
<view class="input-view">
<input class="weui-input" :focus="isFocus" placeholder="请输入有效兑换码" placeholder-class="placeholder-class" :cursor="cdKey.length" v-model="cdKey" />
</view>
<view class="b-button"><button :class="'submit-button ' + (cdKey ? '' : 'disabled-button')" @tap="submitKey">确定兑换</button></view>
<view :class="['service-view', { 'no-list': noList }]">
<view :class="['service-view', { noList: noList }]">
<image class="warning-image" :src="duihuanwentiImg" />
<text>如遇兑换问题,请联系官方客服</text>
<view class="service-button" @tap="handleService"><text>立即联系</text></view>
......@@ -63,12 +63,15 @@ export default {
duihuanbiaotiImg: mineBaseUrl + 'duihuanbiaoti@3x.png',
duihuanwentiImg: mineBaseUrl + 'duihuanwenti@3x.png',
messageFlag: false,
// -4 未启用
// -3 兑换码还未到兑换时间
// -2 兑换码不存在
// -1 兑换码过期
// 0 兑换码已使用
// 1 正常
// -1 兑换码不存在
// -2 兑换码未发放
// -3
// -4 兑换码还未到兑换时间
// -5 兑换码已过期
// -6 您使用次数已超过批次限制
// -7 兑换码使用次数已超过批次限制
// 0 正常
// 1 兑换码已使用
keyStatus: '-1',
isFocus: false,
loading: false,
......@@ -133,14 +136,6 @@ export default {
cancel: '取消',
sure: '确认兑换'
},
begin: '',
tail: '',
reMiddle: '',
middle: '',
end: '',
cancel: '',
sure: ''
},
day: 7,
endDate: '',
......@@ -377,7 +372,7 @@ export default {
background-color: #fff;
border-radius: 16rpx 16rpx 0 0;
&.no-list {
&.noList {
border-radius: 16rpx;
}
}
......@@ -507,7 +502,7 @@ export default {
position: relative;
margin-top: 40rpx;
padding-bottom: 64rpx;
&.no-list {
&.noList {
margin-top: 200rpx;
}
}
......
......@@ -2,16 +2,35 @@
<uni-popup v-model="show" ref="uniPopup" :animation="false" border-radius="24" type="center" mode="center">
<view class="custom-popup">
<view class="apply-refuse">
<view class="user">
<view class="user-avatar">
<image class="user-avatar-image" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
<image class="user-avatar-image" :src="avatar" v-else></image>
<view class="back-view">
<swiper class="swiper-box" :current="tabIndex" @transition="transition" @animationfinish="animationfinish"
duration="300" :style="{
height: '996rpx',
}">
<swiper-item class="swiper-item" v-for="(item, index) in backImages" :key="index">
<view class="swiper-content">
<image class="swiper-back-image" :src="item"></image>
</view>
<view class="user">
<view class="user-avatar">
<image class="user-avatar-image" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
<image class="user-avatar-image" :src="avatar" v-else></image>
</view>
<text>{{ userInfo.nickname || '微信用户' }}</text>
</view>
<view class="content-view">
<view class="qrcode-view"><image :src="qrcode"></image></view>
</view>
</swiper-item>
</swiper>
</view>
<view class="dot-view">
<view
:class="[ index == tabIndex ? 'u-indicator-item-round-active' : 'u-indicator-item-round', ]"
v-for="(item, index) in backImages"
:key="index"
></view>
</view>
<text>{{ userInfo.nickname || '微信用户' }}</text>
</view>
<view class="content-view">
<view class="qrcode-view"><image :src="qrcode"></image></view>
</view>
<view class="close-view" @click="close"><u-icon name="close"></u-icon></view>
</view>
<view class="btn">
......@@ -26,10 +45,19 @@
<script>
import UniPopup from '@/uni_modules/uni-popup/uni-popup.vue';
import { mineBaseUrl } from '@/utils/config.js';
import { mineBaseUrl,baseUrl } from '@/utils/config.js';
import { mapGetters } from 'vuex';
export default {
props: ['qrcode'],
props: {
qrcode: {
type: String,
default: ''
},
imageIndex: {
type: [String, Number],
default: 0
}
},
components: {
UniPopup
},
......@@ -38,12 +66,21 @@ export default {
show: false,
saveImage: mineBaseUrl + 'haibaobaocunxiangce@3x.png',
avatar: mineBaseUrl + 'toxuiang@3x.png',
backgroundImage: mineBaseUrl + 'min-share-haibao.jpg'
backgroundImage: mineBaseUrl + 'min-share-haibao.jpg',
tabIndex: 0
};
},
computed: {
...mapGetters(['userInfo'])
...mapGetters(['userInfo']),
backImages () {
return [baseUrl + 'jizhanghaibao1.png', baseUrl + 'jizhanghaibao2.png', baseUrl + 'jizhanghaibao3.png', baseUrl + 'jizhanghaibao4.png', baseUrl + 'jizhanghaibao5.png']
},
},
watch: {
imageIndex (val) {
this.tabIndex = Number(val || 0)
},
},
methods: {
open() {
this.show = true;
......@@ -55,7 +92,13 @@ export default {
},
handleClickSure() {
this.$emit('save');
}
},
transition ({ detail: { dx } }) {
},
animationfinish ({ detail: { current } }) {
this.tabIndex = current
this.$emit('update:imageIndex', current)
},
}
};
</script>
......@@ -64,64 +107,112 @@ export default {
.custom-popup {
position: relative;
.apply-refuse {
background-color: $default-color;
background: url('https://static-book.kaying.cc/icon/mine/jizhangbaocunhaibao.jpg') no-repeat;
background-position: center top;
// background-color: $default-color;
// background: url('https://static-book.kaying.cc/icon/mine/jizhangbaocunhaibao.jpg') no-repeat;
// background-position: center top;
background-size: 100%;
width: 620rpx;
height: 1010rpx;
border-radius: 12rpx;
padding: 52rpx 36rpx;
width: 560rpx;
height: 1000rpx;
border-radius: 24rpx;
// padding: 52rpx 36rpx;
position: relative;
overflow: hidden;
.back-view {
position: relative;
border-radius: 24rpx;
overflow: hidden;
width: 100%;
height: 100%;
.swiper-box {
.swiper-item {
position: relative;
border-radius: 24rpx;
overflow: hidden;
.user {
display: flex;
align-items: center;
position: absolute;
top: 32rpx;
left: 36rpx;
.user-avatar {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ffffff;
display: flex;
margin-right: 12rpx;
}
.user-avatar-image {
border-radius: 50%;
}
}
.close-view {
.content-view {
position: absolute;
right: 36rpx;
top: 20rpx;
font-size: 32rpx;
width: 88rpx;
height: 88rpx;
padding-right: 8rpx;
line-height: 88rpx;
text-align: right;
}
.user {
display: flex;
align-items: center;
bottom: 22rpx;
right: 40rpx;
width: 120rpx;
height: 120rpx;
background: #ffffff;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
.user-avatar {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: #ffffff;
padding: 4rpx;
display: flex;
margin-right: 12rpx;
}
.user-avatar-image {
border-radius: 50%;
.qrcode-view {
width: 100rpx;
height: 100rpx;
display: flex;
}
}
.swiper-content{
position: relative;
width: 100%;
height: 100%;
.swiper-back-image {
width: 100%;
height: 100%;
}
}
}
}
}
.content-view {
.dot-view {
position: absolute;
top: 550rpx;
left: 50%;
transform: translateX(-50%);
width: 192rpx;
height: 192rpx;
background: #ffffff;
border: 2rpx solid $default-color;
border-radius: 16rpx;
bottom: 0rpx;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
.qrcode-view {
width: 160rpx;
height: 160rpx;
display: flex;
align-items: center;
height: 56rpx;
.u-indicator-item-round {
width: 14rpx;
height: 14rpx;
margin: 0 6rpx;
border-radius: 20rpx;
transition: all 0.5s;
background-color: rgba(255, 255, 255, 0.45);
}
.u-indicator-item-round-active {
height: 14rpx;
margin: 0 6rpx;
border-radius: 20rpx;
transition: all 0.5s;
width: 34rpx;
background-color: rgba(255, 255, 255, 1);
}
}
.close-view {
position: absolute;
right: 0rpx;
top: 0rpx;
font-size: 32rpx;
width: 88rpx;
height: 88rpx;
padding-right: 8rpx;
line-height: 88rpx;
text-align: center;
}
}
.btn {
......
......@@ -30,7 +30,7 @@
</view>
<u-toast ref="uToast" />
<QRCodeView :url="shareUrl" @canvas="handleCanvas" />
<SavePosterPopup ref="save-poster-popup" :qrcode="qrcode" @save="handleClickSave"></SavePosterPopup>
<SavePosterPopup ref="save-poster-popup" :imageIndex.sync="imageIndex" :qrcode="qrcode" @save="handleClickSave"></SavePosterPopup>
<l-painter :board="poster" isCanvasToTempFilePath @success="handleCanvasSuccess" @fail="handleCanvasFail" custom-style="position: fixed; left: 400%" />
</view>
</template>
......@@ -40,7 +40,7 @@ import NavbarRight from '@/components/navbar-right';
import QRCodeView from '@/components/qr-code-view';
import SavePosterPopup from './components/save-poster-popup.vue';
import { mapGetters } from 'vuex';
import { index_share_url, wxMiniId, webUrl, mineBaseUrl } from '@/utils/config.js';
import { index_share_url, wxMiniId, webUrl, mineBaseUrl,baseUrl } from '@/utils/config.js';
import { shareInvited } from '@/api/mine/share.js';
import { getSetting } from '@/utils/common.js';
......@@ -58,7 +58,8 @@ export default {
poster: {},
currentBlock: () => {},
billImageUrl: '',
customerId: ''
customerId: '',
imageIndex: 0
};
},
computed: {
......@@ -106,7 +107,10 @@ export default {
},
receive() {
return this.customerId != this.userInfo.id;
}
},
backImages () {
return [baseUrl + 'jizhanghaibao1.png', baseUrl + 'jizhanghaibao2.png', baseUrl + 'jizhanghaibao3.png', baseUrl + 'jizhanghaibao4.png', baseUrl + 'jizhanghaibao5.png']
},
},
onLoad(options) {},
onUnload() {},
......@@ -209,21 +213,21 @@ export default {
this.poster = {
css: {
width: '750rpx',
height: '1220rpx',
backgroundImage: 'url(https://static-book.kaying.cc/icon/mine/jizhangbaocunhaibao.jpg)',
height: '1340rpx',
backgroundImage: `url(${this.backImages[this.imageIndex]})`,
'object-fit': 'fill'
},
views: [
{
type: 'view',
css: {
marginTop: '60rpx',
marginLeft: '38rpx',
marginTop: '56rpx',
marginLeft: '52rpx',
display: 'flex',
'align-items': 'center',
fontSize: '24rpx',
color: '#333333',
'line-height': '44rpx'
'line-height': '36rpx'
},
views: [
{
......@@ -249,11 +253,10 @@ export default {
{
type: 'view',
css: {
margin: '600rpx auto 0 auto',
width: '192rpx',
height: '192rpx',
margin: '1050rpx auto 0 540rpx',
width: '156rpx',
height: '156rpx',
background: '#FFFFFF',
border: '2rpx solid #02A074',
'border-radius': '16rpx',
display: 'flex',
'align-items': 'center',
......@@ -264,8 +267,8 @@ export default {
type: 'image',
src: this.qrcode,
css: {
width: '160rpx',
height: '160rpx',
width: '130rpx',
height: '130rpx',
textAlign: 'center'
}
}
......
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