123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558 |
- <style lang="scss">
- .app-body{
- .top{
- margin-top: 5px;
- background-color: #fff;
- padding: 32px 0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- .price{
- font-size: 16px;
- font-weight: 700;
- color: #787878;
- }
- .pay_money{
- font-size: 16px;
- font-weight: 700;
- color: #fd3b39;
- font-size: 28px;
- }
- .last_time{
- padding: 20rpx 0;
- }
- .out_time{
- font-size: 14px;
- margin-top: 12px;
- }
- }
- /**产品item**/
- .goods-item{
- margin-top: 11px;
- padding: 20px 20px 22px 20px;
- background-color: #fff;
- justify-content: flex-start;
- align-items: flex-start;
- .product-image{
- width: 120px;
- height: 120px;
- border-radius: 5px;
- }
- .info{
- margin-left: 14px;
- padding-top: 5px;
- line-height: 1;
- .title{
- font-size: 17px;
- font-weight: 700;
- color: #333;
- }
- .info-value{
- margin-top: 12px;
- font-size: 17px;
- color: #333;
- font-weight: 600;
- .label{color: #999;}
- .sb{font-size: 12px;background: #4076f6;color: #fff;padding: 4px 6px;border-radius: 4px;}
- }
- }
-
- }
- .main{
- margin-top: 11px;
- padding: 17px 0 22px;
- background: #fff;
- .main-tip{
- padding: 0 17px;
- font-size: 17px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999;
- }
- .main-items{
- margin-top: 19px;
- justify-content: flex-start;
- height: 40px;
- padding:0 40rpx;
- .item{
- width: calc(33% - 10px);
- margin-right: 10px;
- height: 34px;
- background: #f8f8f8;
- border-radius: 5px;
- display: flex;
- justify-content: center;
- align-items: center;
- .icon{
- width: 21px;
- height: 18px;
- }
- .text{
- margin-left: 5px;
- font-size: 17px;
- font-weight: 700;
- color: #333;
- }
- &.active{
- background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
- color: #fff !important;
- .text{
- color: #fff;
- }
- }
- }
- }
- .swiper-box{
- padding: 8px 17px 0;
- height: 210px;
- swiper{height: 100%;}
- .pay-item{
- padding: 28px 1px 0;
- .label{
- width: 67px;
- font-size: 17px;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999;
- }
- .value{
- width: calc(100% - 100px);
- font-size: 17px;
- font-weight: 500;
- color: #333;
- }
- .copy{
- image{width: 14px;height: 16px}
- }
- }
-
- }
- }
- .upload-item{
- margin-top: 11px;
- padding: 19px 17px 22px 17px;
- background: #fff;
- .upload-title{
- font-size: 17px;
- font-weight: 700;
- color: #333;
- }
- .upload-image{
- padding-top: 18px;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- image{width: 90px;height: 90px;}
- }
-
- .upload-font{
- margin-top: 13px;
- font-size: 17px;
- font-weight: 700;
- color: #333;
- }
- }
-
- .foot86{
- height: 90px;
- }
- .foot-view{
- position: fixed;
- bottom: 0;
- background: #fff;
- width: calc(100% - 20px);
- height: 83px;
- justify-content: flex-start;
- padding: 0 10px;
- .lxitem{
- image{width: 21px;height: 19px;}
- .text{margin-top: 8px;font-size: 12px;font-weight: 700;color: #333;}
- }
- .sm{margin:0 12px;width: 1px;height: 42px; background: #c0bfc0;}
- .btn{
- margin-left: 11px;
- height: 45px;
- background: #fd3b39;
- border-radius: 11px;
- text-align: center;
- font-size: 19px;
- font-weight: 700;
- color: #fff;
- line-height: 45px;
- }
- }
- }
- .line{
- width: 100%;
- overflow:hidden; //超出的文本隐藏
- text-overflow:ellipsis; //溢出用省略号显示
- white-space:nowrap; //溢出不换行,只能显示一行
- }
- </style>
- <template>
- <view class="app-body">
- <view class="top fx-h fx-bc fx-ac">
- <view class="price">挂售价格¥{{ data.price || '-' }}</view>
- <view class="pay_money">实际支付¥{{ data.price || '-' }}</view>
-
- <view class="last_time" v-if="data.status == 1">
- <view class=" fx-h fx-bc fx-ac" v-if="data.end_type == 1">
- <view class="label" style="padding: 10px 0;font-weight: bold;">离超时</view>
- <cz-countdown :fontSize="26" :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',data.end_time)"></cz-countdown>
- </view>
-
- <view class=" fx-h fx-bc fx-ac" v-if="data.end_type == 2">
- <view class="label" style="padding: 10px 0;font-weight: bold;">离过期</view>
- <cz-countdown :fontSize="26" :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',data.end_time)"></cz-countdown>
- </view>
-
- </view>
- <view class="out_time" v-if="data.status == 0">订单已过期</view>
- <view class="out_time" style="color: #f9ae3d;font-size: 18px;" v-if="data.status == 2">订单审核中</view>
- <view class="out_time" style="color: #5ac725;font-size: 18px;" v-if="data.status == 3">订单已完成</view>
- </view>
-
- <view class="goods-item fx-r">
- <image class="product-image" :src="data.image" mode="aspectFill"></image>
- <view class="info">
- <view class="title">{{ data.name || "" }}</view>
- <view class="info-value">
- <text class="label">卖家ID:</text>
- {{ data.collection_uid || ""}}
- </view>
-
- <view class="info-value">
- <text class="label">卖家昵称:</text>
- {{ data.collection_nickname || "" }}
- </view>
-
- <view class="info-value">
- <text class="label">卖家手机号:</text>
- {{ data.collection_mobile || "" }}
- </view>
-
- <view class="info-value fx-r">
- <text class="label">聊天联系:</text>
- <view class="sb" @tap="tapChat">点击聊天</view>
- </view>
-
- </view>
- </view>
-
- <view class="main">
- <view class="main-tip">请向以下账号自行转账(任选一种方式)</view>
- <view class="main-items fx-r">
- <view class="item" @tap="tapCurrent(index)" :class="current == index ? 'active' : ''" v-for="(item,index) in data.bank">
- <image class="icon" v-if="item.type == 3" :src=" current == index ? '/static/img/bank_active.png' : '/static/img/bank.png'"></image>
- <image class="icon" v-if="item.type == 1" :src=" current == index ? '/static/img/bank_active.png' : '/static/img/bank.png'"></image>
- <image class="icon" v-if="item.type == 2" :src=" current == index ? '/static/img/alipay_active.png' : '/static/img/alipay.png'"></image>
- <view class="text" v-if="item.type == 1">微信</view>
- <view class="text" v-if="item.type == 2">支付宝</view>
- <view class="text" v-if="item.type == 3">银行卡</view>
- </view>
- </view>
- <!--数据-->
- <view class="swiper-box">
- <swiper :current="current" :disable-touch="true">
- <swiper-item v-for="(item,index) in data.bank">
- <template v-if="item.type == 3">
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">姓名</view>
- <view class="td value line">{{ item.name }}</view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">银行</view>
- <view class="td value line">{{item.bank }}</view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.bank)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">支行</view>
- <view class="td value line">{{item.bank_name }}</view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.bank_name)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">账号</view>
- <view class="td value line">{{ item.payment }} </view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- </template>
- <template v-if="item.type == 2">
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">账号</view>
- <view class="td value">{{ item.payment }} </view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">姓名</view>
- <view class="td value">{{ item.name }}</view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- </template>
-
- <template v-if="item.type == 1">
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">账号</view>
- <view class="td value">{{ item.payment }} </view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.payment)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">姓名</view>
- <view class="td value">{{ item.name }}</view>
- <view class="fx-g1"></view>
- <view class="td copy" @tap="tapCopy(item.name)"><image src="/static/img/ac_copy.png"></image></view>
- </view>
- </view>
-
- <view class="pay-item">
- <view class="tr fx-r">
- <view class="td label">微信二维码</view>
- <view class="td value">
- <image @tap="tapOpenImg(item.img)" :src="item.img" mode="aspectFill" style="width: 80px;height: 80px"></image>
- </view>
- </view>
- </view>
-
- </template>
-
-
- </swiper-item>
- </swiper>
- </view>
-
-
-
- </view>
-
-
- <view class="upload-item" @tap="upImg">
- <view class="upload-title">上传支付截图</view>
- <view class="fx-h fx-bc fx-ac">
- <view class="upload-image">
- <image :src=" upImgUrl || '/static/img/upimg.png'" mode="aspectFill"></image>
- </view>
-
- <view class="upload-font">点击上传支付截图</view>
- </view>
- </view>
-
- <view class="foot86"></view>
- <view class="foot-view fx-r fx-bc ">
- <view class="lxitem fx-h fx-bc fx-ac">
- <image src="/static/img/ac-up-tel.png"></image>
- <view class="text">联系卖家</view>
- </view>
- <view class="sm"></view>
- <view class="lxitem fx-h fx-bc fx-ac">
- <image src="/static/img/ac-up-kf.png"></image>
- <view class="text">联系客服</view>
- </view>
- <view class="btn fx-g1" v-if="data.status == 2" @tap="tapSubmit">修改凭证</view>
- <view class="btn fx-g1" v-if="data.status == 1" @tap="tapSubmit">完成上传</view>
-
- </view>
- </view>
- </template>
- <script>
- import {mapState,mapMutations } from 'vuex';
- export default {
- computed: mapState(['user']),
- data() {
- return {
- statusBarHeight : 20,
- current : 0,
- orderId : 0,
- data : {},
- upImgUrl : "",
- isSubumit : false
- }
- },
- onLoad(options) {
- this.orderId = options.id || 0;
- this.initView();
- },
- methods: {
- /**
- * 加载基础配置
- */
- initView:function(){
- uni.showLoading({ title: '获取数据中..' });
- var post = {};
- post.id = this.orderId;
- this
- .request
- .post("auctionOrderItem",post)
- .then(res => {
- uni.hideLoading();
- if(res.code == 200) {
- this.data = res.data;
- } else {
- this.utils.Tip(res.msg);
- }
- })
- .catch(res=>{
- uni.hideLoading();
- uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
- });
- },
- /**
- * 切换
- * @param {Object} index
- */
- tapCurrent:function(index) {
- this.current = index;
-
- },
- /**
- * 打开图片
- */
- tapOpenImg:function(img){
- uni.previewImage({
- current:0,
- urls:[img]
- });
- },
-
- /**
- * 复制
- * @param {Object} item
- */
- tapCopy:function(item) {
- uni.setClipboardData({
- data : item,
- showToast : true
- });
- },
-
- upImg(){
- // #ifdef APP-PLUS
- this.$store.dispatch('permission/requestPermissions', 'WRITE_EXTERNAL_STORAGE').then(res => {
- if(res !== 1) return;
- this.upImgS();
- });
- return;
- // #endif
- this.upImgS();
- },
-
- upImgS() {
- uni.chooseImage({
- count: 1,
- sizeType: ['compressed'],
- success: (res) => {
- let img = res.tempFilePaths[0];
- this.utils.loadIng();
- this
- .request
- .post("qiniu")
- .then(res=>{
- uni.uploadFile({
- url: 'https://up-z0.qiniup.com',
- filePath: img,
- name: 'file',
- formData: {
- 'key': res.data.mk_str,
- 'token': res.data.token
- },
- success: (uploadFileRes) => {
- uni.hideLoading();
- if(uploadFileRes.statusCode == 200) {
- this.upImgUrl = res.data.url;
- } else {
- this.utils.Tip("上传失败,请重新尝试");
- }
- },
- fail:()=>{
- uni.hideLoading();
- this.utils.Tip("上传失败,请重新尝试");
- }
- });
- })
- .catch(err=>{
- uni.hideLoading();
- this.utils.Tip("请重新上传图片");
- });
- }
- });
- },
- /**
- * 提交数据
- */
- tapSubmit:function(){
- if(this.upImgUrl == '') {
- this.utils.Tip("请上传打款凭证");
- return;
- }
- if(this.isSubumit) return;
- this.isSubumit = true;
- uni.showLoading({ title: '获取数据中..' });
- var post = {};
- post.id = this.orderId;
- post.img = this.upImgUrl;
- this
- .request
- .post("auctionOrderSubProof",post)
- .then(res => {
- this.isSubumit = false;
- uni.hideLoading();
- if(res.code == 200) {
- uni.redirectTo({
- url:"hallpay_ok"
- })
- } else {
- this.utils.showAlert({title: '系统提示',content: res.msg});
- }
- })
- .catch(res=>{
- this.isSubumit = false;
- uni.hideLoading();
- uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
- });
- },
- /**
- * 聊天chat
- */
- tapChat:function(){
- uni.navigateTo({
- url:"/pages/chat/friend/info?usercode=" + this.data.collection_usercode
- })
- }
-
-
- }
-
- }
- </script>
|