优化页面

This commit is contained in:
pengxiaolong
2025-06-16 22:09:12 +08:00
parent 0f2a48b450
commit 8ec7365e7c
131 changed files with 1358 additions and 690 deletions

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../../../common/vendor.js"),n=require("../../../../components/NationalDictionary.js"),o=require("../../../../components/request.js"),t={data:()=>({genders:0,Gender:[{label:"男",value:1},{label:"女",value:2}],Country:n.optionsArray,countrys:"",nameAnchor:"",Display:!1,Hint:!1,id:null,filterable:!0,AnchorProfilePicture:"",uid:null}),props:{message:{type:Object}},watch:{message(e,n){console.log(e),this.id=e.id,this.nameAnchor=e.anchorId,this.genders=e.gender,this.AnchorProfilePicture=e.headerIcon.split("/").pop(),this.countrys=e.country}},mounted(){e.index.getStorage({key:"userinfo",success:e=>{this.uid=e.data.id}})},methods:{gender(e){this.genders=e.value,console.log(e)},country(e){this.countrys=e.value,console.log(e)},handleOverlayClick(e){e.target===this.$el&&(this.Display=!1,this.Hint=!1)},open(){this.Display?(this.Display=!1,this.Hint=!1,this.nameAnchor="",this.genders=0,this.countrys=""):this.Display=!0},blur(n){this.nameAnchor!==n.target.value&&(this.nameAnchor=n.target.value,e.index.showLoading({title:"正在验证主播",mask:!0}),e.index.request({url:"https://python.yolojt.com/api/"+this.nameAnchor,success:n=>{200===n.data.code?(e.index.hideLoading(),e.index.showToast({title:"查询成功",icon:"none",duration:3e3}),this.AnchorProfilePicture=n.data.data):(e.index.hideLoading(),e.index.showToast({title:"未查询到该主播",icon:"none",duration:3e3}))},fail:function(n){e.index.hideLoading(),e.index.showToast({title:"网络请求失败",icon:"none",duration:3e3})}}))},async Publish(){""!==this.nameAnchor&&0!==this.genders&&""!==this.countrys&&""!==this.AnchorProfilePicture?(e.index.showLoading({title:"修改中...",mask:!0}),await o.request({url:"anchor/updateAnchorInfo",method:"POST",data:{id:this.id,anchorId:this.nameAnchor,headerIcon:this.AnchorProfilePicture,gender:this.genders,country:this.countrys,createUserId:this.uid},userInfo:!0}).then((n=>{200===n.code?(this.Display=!1,this.Hint=!1,this.nameAnchor="",this.genders=0,this.AnchorProfilePicture="",this.country="",e.index.hideLoading(),e.index.showToast({title:"修改成功",icon:"success",duration:2e3}),this.$emit("Refresh")):(e.index.hideLoading(),e.index.showToast({title:"修改失败"+n.msg,icon:"none",duration:2e3}))}))):this.Hint=!0}}};if(!Array){e.resolveComponent("wht-select")()}Math;const i=e._export_sfc(t,[["render",function(n,o,t,i,r,s){return e.e({a:r.Display},r.Display?e.e({b:e.o$1((e=>s.open())),c:e.o$1(((...e)=>n.NameAnchor&&n.NameAnchor(...e))),d:e.o$1(((...e)=>s.blur&&s.blur(...e))),e:r.nameAnchor,f:""===r.nameAnchor&&!0===r.Hint},(""===r.nameAnchor&&r.Hint,{}),{g:e.o$1(s.country),h:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:r.Country,filterable:r.filterable,placeholder:"请选择国家",value:r.countrys}),i:""===r.countrys&&!0===r.Hint},(""===r.countrys&&r.Hint,{}),{j:e.o$1(s.gender),k:e.p({backgroundColor:"#ffffff",placeholderColor:"#666666",textColor:"#666666",borderColor:"#ffffff",options:r.Gender,placeholder:"性别",value:r.genders}),l:0===r.genders},(r.genders,{}),{m:1===r.genders},(r.genders,{}),{n:2===r.genders},(r.genders,{}),{o:0===r.genders&&!0===r.Hint},(0===r.genders&&r.Hint,{}),{p:e.o$1((e=>s.Publish())),q:e.o$1((()=>{})),r:e.n(r.Display?"create-module":"close-animation "),s:e.o$1((e=>s.open()))}):{})}],["__scopeId","data-v-7183e24f"]]);wx.createComponent(i);

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wht-select": "../../../../uni_modules/wht-select/components/wht-select/wht-select"
}
}

View File

@@ -0,0 +1 @@
<view wx:if="{{a}}" class="{{['data-v-7183e24f', r, 'Mask']}}" bindtap="{{s}}"><view catchtap="{{q}}" class="containers data-v-7183e24f"><view class="container data-v-7183e24f"><image class="Fork data-v-7183e24f" bindtap="{{b}}" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Fork.png" mode="scaleToFill"/><view class="Titlecss data-v-7183e24f"><view class="Star data-v-7183e24f"></view><view class="Title data-v-7183e24f">修改我的主播</view><view class="Star data-v-7183e24f"></view></view><view class="NameAnchor data-v-7183e24f"><input class="NameAnchorcss data-v-7183e24f" cursor-color="#666666" placeholder-style="color:#666666" bindinput="{{c}}" placeholder="主播名称" bindblur="{{d}}" value="{{e}}"/><view wx:if="{{f}}" class="Hint data-v-7183e24f">请检查主播名称是否正确</view></view><view class="Accountnumber data-v-7183e24f"><view class="Coins country data-v-7183e24f"><wht-select wx:if="{{h}}" class="data-v-7183e24f" style="width:350rpx" bindchange="{{g}}" u-i="7183e24f-0" bind:__l="__l" u-p="{{h}}"/><view wx:if="{{i}}" class="Hint data-v-7183e24f">请选择国家</view></view><view class="Gender data-v-7183e24f"><view class="Gendercs data-v-7183e24f"><view class="Gendercss data-v-7183e24f"><wht-select wx:if="{{k}}" class="data-v-7183e24f" style="width:300rpx" bindchange="{{j}}" u-i="7183e24f-1" bind:__l="__l" u-p="{{k}}"/></view><view class="Gendericoncss data-v-7183e24f"><image wx:if="{{l}}" class="Gendericon data-v-7183e24f" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/ask.png" mode="scaleToFill"/><image wx:if="{{m}}" class="Gendericon data-v-7183e24f" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/man.png" mode="scaleToFill"/><image wx:if="{{n}}" class="Gendericon data-v-7183e24f" src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/girl.png" mode="scaleToFill"/></view></view><view wx:if="{{o}}" class="Hintcss data-v-7183e24f">请选择性别</view></view></view><view class="Publish data-v-7183e24f"><button bindtap="{{p}}" class="Publishcss data-v-7183e24f">修改主播信息</button></view></view></view></view>

View File

@@ -0,0 +1 @@
@keyframes slide-in-7183e24f{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.create-module.data-v-7183e24f{animation:slide-in-7183e24f .3s ease-in-out}.Mask.data-v-7183e24f{width:100vw;height:100vh;background:rgba(0,0,0,.463);display:flex;flex-direction:column-reverse}.Hint.data-v-7183e24f{color:red;font-size:20rpx;margin-left:30rpx;margin-top:10rpx}.Hintcss.data-v-7183e24f{color:red;font-size:20rpx;margin-left:30rpx;margin-top:20rpx}.containers.data-v-7183e24f{background-color:#fff;border-radius:50rpx}.container.data-v-7183e24f{display:flex;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/bgv.png);background-size:100% 100%;flex-direction:column;width:100%;height:1000rpx;border-radius:50rpx;box-shadow:0 0 10rpx #ccc}.Fork.data-v-7183e24f{width:46rpx;height:46rpx;margin-top:20rpx;margin-left:90%}.Titlecss.data-v-7183e24f{width:100%;height:70rpx;display:flex;justify-content:center;align-items:center}.Star.data-v-7183e24f{width:50rpx;height:50rpx;background-image:url(https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/star.png);background-size:100% 100%}.Title.data-v-7183e24f{width:430rpx;height:70rpx;background-size:100% 200%;background-position:0 100%;margin-left:26rpx;margin-right:26rpx;font-size:50rpx;line-height:70rpx;background:linear-gradient(135deg,#019fa1,#9ddbdc);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;font-weight:700;text-align:center;font-style:italic}.Individual.data-v-7183e24f{display:flex}.NameAnchor.data-v-7183e24f{width:90%;margin:40rpx}.time.data-v-7183e24f{width:90%;margin-left:5%;margin-top:50rpx}.NameAnchorcss.data-v-7183e24f{width:99%;height:85rpx;background-color:#fff;border:1rpx solid #bfbfbf;border-radius:10rpx;text-align:center}.Gender.data-v-7183e24f{width:310rpx;display:flex;flex-direction:column;justify-content:center}.Gendercs.data-v-7183e24f{display:flex;justify-content:center}.Gendercss.data-v-7183e24f{width:200rpx;height:60rpx}.Gendericoncss.data-v-7183e24f{display:flex;justify-content:center;align-items:center;width:60rpx;height:60rpx;border-radius:50%;border:1rpx solid #ff9d0067;margin-left:20rpx;margin-top:10rpx}.Gendericon.data-v-7183e24f{width:40rpx;height:40rpx}.Accountnumber.data-v-7183e24f{display:flex;justify-content:center;margin-bottom:60rpx;margin-top:50rpx}.Coins.data-v-7183e24f{width:400rpx;height:65rpx;margin-right:10rpx}.country.data-v-7183e24f{margin-left:10rpx}.goldCoin.data-v-7183e24f{width:100%;height:100rpx;display:flex;justify-content:center;align-items:center}.number-box.data-v-7183e24f{display:flex;justify-content:center;text-align:center}.number-box-title.data-v-7183e24f{color:#191919;font-size:30rpx;margin-right:22rpx;margin-left:17rpx}.number-box-unit.data-v-7183e24f{color:#03aba8;width:48rpx;height:48rpx;border:1rpx solid #03aba8;border-radius:50%;line-height:48rpx;text-align:center}.Publish.data-v-7183e24f{margin-top:300rpx;margin-bottom:40rpx;width:90%;margin-left:5%}.Publishcss.data-v-7183e24f{background-image:linear-gradient(135deg,#4fcacd,#5fdbde);color:#fff;font-weight:700;border-radius:50rpx}