优化页面
This commit is contained in:
@@ -1 +1 @@
|
||||
"use strict";const t=require("../../common/vendor.js"),a=require("../../components/request.js"),e=require("../../components/formatDate.js"),o=require("../../common/assets.js"),s={data:()=>({customData:{},SenderData:{},ReceiverData:{},PkIDInfodata:{}}),onLoad(t){this.customData=JSON.parse(t.customData),this.getPkyourInfo(),this.getPkmineInfo(),this.getPkIDInfo()},methods:{async getPkIDInfo(){await a.request({url:"pk/singleRecord",method:"POST",data:{id:this.customData.id},userInfo:!0}).then((t=>{this.PkIDInfodata=t.data,console.log(this.PkIDInfodata)}))},async getPkyourInfo(){await a.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.customData.pkIdA},userInfo:!0}).then((t=>{this.SenderData=t.data,console.log(this.SenderData)}))},async getPkmineInfo(){await a.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.customData.pkIdB},userInfo:!0}).then((t=>{this.ReceiverData=t.data,console.log(this.ReceiverData)}))},goBack(){t.wx$1.navigateBack({delta:1})},formatDate:e.formatDate,async operation(e){console.log("``````",this.customData),console.log(e),await a.request({url:"pk/updatePkStatus",method:"POST",data:{id:this.customData.id,pkStatus:e},userInfo:!0}).then((a=>{console.log(a.data);const o=1===e?"接受邀请成功":"拒绝邀请成功";200===a.code?(this.getPkIDInfo(),t.wx$1.showToast({title:o,icon:"success",duration:2e3}),t.wx$1.navigateBack({delta:1})):t.wx$1.showToast({title:"操作失败",icon:"none",duration:2e3})}))}}};const n=t._export_sfc(s,[["render",function(a,e,s,n,r,i){return t.e({a:o._imports_0$1,b:o._imports_1,c:t.o$1(((...t)=>i.goBack&&i.goBack(...t))),d:r.SenderData.anchorIcon,e:t.t(r.SenderData.anchorId),f:"1"===r.SenderData.sex},"1"===r.SenderData.sex?{g:o._imports_2,h:t.t(1==r.SenderData.sex?"男":"女")}:{i:o._imports_3,j:t.t(1==r.SenderData.sex?"男":"女")},{k:t.t(r.SenderData.country),l:t.t(i.formatDate(r.SenderData.pkTime)),m:o._imports_4$2,n:t.t(r.SenderData.coin),o:o._imports_5$2,p:t.t(r.SenderData.pkNumber),q:r.ReceiverData.anchorIcon,r:t.t(r.ReceiverData.anchorId),s:"1"===r.ReceiverData.sex},"1"===r.ReceiverData.sex?{t:o._imports_2,v:t.t(1==r.ReceiverData.sex?"男":"女")}:{w:o._imports_3,x:t.t(1==r.ReceiverData.sex?"男":"女")},{y:t.t(r.ReceiverData.country),z:t.t(i.formatDate(r.ReceiverData.pkTime)),A:o._imports_4$2,B:t.t(r.ReceiverData.coin),C:o._imports_5$2,D:t.t(r.ReceiverData.pkNumber),E:0===r.PkIDInfodata.pkStatus},0===r.PkIDInfodata.pkStatus?{F:t.o$1((t=>i.operation(1))),G:t.o$1((t=>i.operation(2)))}:{},{H:1===r.PkIDInfodata.pkStatus},(r.PkIDInfodata.pkStatus,{}),{I:2===r.PkIDInfodata.pkStatus},(r.PkIDInfodata.pkStatus,{}))}],["__scopeId","data-v-2e83f3a8"]]);wx.createPage(n);
|
||||
"use strict";const t=require("../../common/vendor.js"),a=require("../../components/request.js"),e=require("../../components/formatDate.js"),o={data:()=>({customData:{},SenderData:{},ReceiverData:{},PkIDInfodata:{}}),onLoad(t){this.customData=JSON.parse(t.customData),this.getPkyourInfo(),this.getPkmineInfo(),this.getPkIDInfo()},methods:{async getPkIDInfo(){await a.request({url:"pk/singleRecord",method:"POST",data:{id:this.customData.id},userInfo:!0}).then((t=>{this.PkIDInfodata=t.data,console.log(this.PkIDInfodata)}))},async getPkyourInfo(){await a.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.customData.pkIdA},userInfo:!0}).then((t=>{this.SenderData=t.data,console.log(this.SenderData)}))},async getPkmineInfo(){await a.request({url:"pk/pkInfoDetail",method:"POST",data:{id:this.customData.pkIdB},userInfo:!0}).then((t=>{this.ReceiverData=t.data,console.log(this.ReceiverData)}))},goBack(){t.wx$1.navigateBack({delta:1})},formatDate:e.formatDate,async operation(e){console.log("``````",this.customData),console.log(e),await a.request({url:"pk/updatePkStatus",method:"POST",data:{id:this.customData.id,pkStatus:e},userInfo:!0}).then((a=>{console.log(a.data);const o=1===e?"接受邀请成功":"拒绝邀请成功";200===a.code?(this.getPkIDInfo(),t.wx$1.showToast({title:o,icon:"success",duration:2e3}),t.wx$1.navigateBack({delta:1})):t.wx$1.showToast({title:"操作失败",icon:"none",duration:2e3})}))}}};const n=t._export_sfc(o,[["render",function(a,e,o,n,s,r){return t.e({a:t.o$1(((...t)=>r.goBack&&r.goBack(...t))),b:s.SenderData.anchorIcon,c:t.t(s.SenderData.anchorId),d:"1"===s.SenderData.sex},"1"===s.SenderData.sex?{e:t.t(1==s.SenderData.sex?"男":"女")}:{f:t.t(1==s.SenderData.sex?"男":"女")},{g:t.t(s.SenderData.country),h:t.t(r.formatDate(s.SenderData.pkTime)),i:t.t(s.SenderData.coin),j:t.t(s.SenderData.pkNumber),k:s.ReceiverData.anchorIcon,l:t.t(s.ReceiverData.anchorId),m:"1"===s.ReceiverData.sex},"1"===s.ReceiverData.sex?{n:t.t(1==s.ReceiverData.sex?"男":"女")}:{o:t.t(1==s.ReceiverData.sex?"男":"女")},{p:t.t(s.ReceiverData.country),q:t.t(r.formatDate(s.ReceiverData.pkTime)),r:t.t(s.ReceiverData.coin),s:t.t(s.ReceiverData.pkNumber),t:0===s.PkIDInfodata.pkStatus},0===s.PkIDInfodata.pkStatus?{v:t.o$1((t=>r.operation(1))),w:t.o$1((t=>r.operation(2)))}:{},{x:1===s.PkIDInfodata.pkStatus},(s.PkIDInfodata.pkStatus,{}),{y:2===s.PkIDInfodata.pkStatus},(s.PkIDInfodata.pkStatus,{}))}],["__scopeId","data-v-88fae9bd"]]);wx.createPage(n);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="container data-v-2e83f3a8"><view class="background data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:100%;height:100%" src="{{a}}" mode="scaleToFill"/></view><view class="Navigation data-v-2e83f3a8"><view class="Return data-v-2e83f3a8" bindtap="{{c}}"><image class="Return data-v-2e83f3a8" src="{{b}}" mode="scaleToFill"/></view></view><view class="Content data-v-2e83f3a8"><view class="sender data-v-2e83f3a8"><view class="sengderIcon data-v-2e83f3a8"><image class="Icon data-v-2e83f3a8" src="{{d}}" mode="scaleToFill"/></view><view class="Individual data-v-2e83f3a8"><view class="name data-v-2e83f3a8">{{e}}</view><view class="GenderAndAge data-v-2e83f3a8"><view wx:if="{{f}}" class="male data-v-2e83f3a8"><view class="data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:20rpx;height:20rpx" src="{{g}}" mode="scaleToFill"/></view><view class="age data-v-2e83f3a8">{{h}}</view></view><view wx:else class="female data-v-2e83f3a8"><view class="data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:20rpx;height:20rpx" src="{{i}}" mode="scaleToFill"/></view><view class="age data-v-2e83f3a8">{{j}}</view></view></view><view class="nation data-v-2e83f3a8">{{k}}</view></view><view class="Time data-v-2e83f3a8">PK时间:{{l}}</view><view class="SessionAndGoldCoin data-v-2e83f3a8"><view class="goldCoin data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="{{m}}" mode="scaleToFill"/><view class="goldcard data-v-2e83f3a8"><view class="goldnumber data-v-2e83f3a8">{{n}}</view><view class="goldtext data-v-2e83f3a8">金币</view></view></view><view class="Session data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="{{o}}" mode="scaleToFill"/><view class="goldcard data-v-2e83f3a8"><view class="goldnumber data-v-2e83f3a8">{{p}}</view><view class="goldtext data-v-2e83f3a8">PK场数</view></view></view></view></view><view class="sender data-v-2e83f3a8"><view class="sengderIcon data-v-2e83f3a8"><image class="Icon data-v-2e83f3a8" src="{{q}}" mode="scaleToFill"/></view><view class="Individual data-v-2e83f3a8"><view class="name data-v-2e83f3a8">{{r}}</view><view class="GenderAndAge data-v-2e83f3a8"><view wx:if="{{s}}" class="male data-v-2e83f3a8"><view class="data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:20rpx;height:20rpx" src="{{t}}" mode="scaleToFill"/></view><view class="age data-v-2e83f3a8">{{v}}</view></view><view wx:else class="female data-v-2e83f3a8"><view class="data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:20rpx;height:20rpx" src="{{w}}" mode="scaleToFill"/></view><view class="age data-v-2e83f3a8">{{x}}</view></view></view><view class="nation data-v-2e83f3a8">{{y}}</view></view><view class="Time data-v-2e83f3a8">PK时间:{{z}}</view><view class="SessionAndGoldCoin data-v-2e83f3a8"><view class="goldCoin data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="{{A}}" mode="scaleToFill"/><view class="data-v-2e83f3a8"><view class="goldnumber data-v-2e83f3a8">{{B}}</view><view class="goldtext data-v-2e83f3a8">金币</view></view></view><view class="Session data-v-2e83f3a8"><image class="data-v-2e83f3a8" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="{{C}}" mode="scaleToFill"/><view class="data-v-2e83f3a8"><view class="goldnumber data-v-2e83f3a8">{{D}}</view><view class="goldtext data-v-2e83f3a8">PK场数</view></view></view></view></view><view wx:if="{{E}}" class="button data-v-2e83f3a8"><button class="accept data-v-2e83f3a8" bindtap="{{F}}">接受邀请</button><button class="reject data-v-2e83f3a8" bindtap="{{G}}">拒绝邀请</button></view><view wx:if="{{H}}" class="button buttontext data-v-2e83f3a8">已接受邀请</view><view wx:if="{{I}}" class="button buttontext data-v-2e83f3a8">已拒绝邀请</view></view></view>
|
||||
<view class="container data-v-88fae9bd"><view class="background data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:100%;height:100%" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/HomeBackground.png" mode="scaleToFill"/></view><view class="Navigation data-v-88fae9bd"><view class="Return data-v-88fae9bd" bindtap="{{a}}"><image class="Return data-v-88fae9bd" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png" mode="scaleToFill"/></view></view><view class="Content data-v-88fae9bd"><view class="sender data-v-88fae9bd"><view class="sengderIcon data-v-88fae9bd"><image class="Icon data-v-88fae9bd" src="{{b}}" mode="scaleToFill"/></view><view class="Individual data-v-88fae9bd"><view class="name data-v-88fae9bd">{{c}}</view><view class="GenderAndAge data-v-88fae9bd"><view wx:if="{{d}}" class="male data-v-88fae9bd"><view class="data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/male.png" mode="scaleToFill"/></view><view class="age data-v-88fae9bd">{{e}}</view></view><view wx:else class="female data-v-88fae9bd"><view class="data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/female.png" mode="scaleToFill"/></view><view class="age data-v-88fae9bd">{{f}}</view></view></view><view class="nation data-v-88fae9bd">{{g}}</view></view><view class="Time data-v-88fae9bd">PK时间:{{h}}</view><view class="SessionAndGoldCoin data-v-88fae9bd"><view class="goldCoin data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/gold.png" mode="scaleToFill"/><view class="goldcard data-v-88fae9bd"><view class="goldnumber data-v-88fae9bd">{{i}}</view><view class="goldtext data-v-88fae9bd">金币</view></view></view><view class="Session data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/session.png" mode="scaleToFill"/><view class="goldcard data-v-88fae9bd"><view class="goldnumber data-v-88fae9bd">{{j}}</view><view class="goldtext data-v-88fae9bd">PK场数</view></view></view></view></view><view class="sender data-v-88fae9bd"><view class="sengderIcon data-v-88fae9bd"><image class="Icon data-v-88fae9bd" src="{{k}}" mode="scaleToFill"/></view><view class="Individual data-v-88fae9bd"><view class="name data-v-88fae9bd">{{l}}</view><view class="GenderAndAge data-v-88fae9bd"><view wx:if="{{m}}" class="male data-v-88fae9bd"><view class="data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/male.png" mode="scaleToFill"/></view><view class="age data-v-88fae9bd">{{n}}</view></view><view wx:else class="female data-v-88fae9bd"><view class="data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:20rpx;height:20rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/female.png" mode="scaleToFill"/></view><view class="age data-v-88fae9bd">{{o}}</view></view></view><view class="nation data-v-88fae9bd">{{p}}</view></view><view class="Time data-v-88fae9bd">PK时间:{{q}}</view><view class="SessionAndGoldCoin data-v-88fae9bd"><view class="goldCoin data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/gold.png" mode="scaleToFill"/><view class="data-v-88fae9bd"><view class="goldnumber data-v-88fae9bd">{{r}}</view><view class="goldtext data-v-88fae9bd">金币</view></view></view><view class="Session data-v-88fae9bd"><image class="data-v-88fae9bd" style="width:72rpx;height:72rpx;margin-left:36rpx;margin-right:32rpx" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/session.png" mode="scaleToFill"/><view class="data-v-88fae9bd"><view class="goldnumber data-v-88fae9bd">{{s}}</view><view class="goldtext data-v-88fae9bd">PK场数</view></view></view></view></view><view wx:if="{{t}}" class="button data-v-88fae9bd"><button class="accept data-v-88fae9bd" bindtap="{{v}}">接受邀请</button><button class="reject data-v-88fae9bd" bindtap="{{w}}">拒绝邀请</button></view><view wx:if="{{x}}" class="button buttontext data-v-88fae9bd">已接受邀请</view><view wx:if="{{y}}" class="button buttontext data-v-88fae9bd">已拒绝邀请</view></view></view>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user