优化页面
This commit is contained in:
@@ -22,8 +22,9 @@
|
||||
placeholder-style="color:#666666"
|
||||
@input="NameAnchor"
|
||||
placeholder="主播名称"
|
||||
:value="nameAnchor"
|
||||
/>
|
||||
<view v-if="nameAnchor === '' && Hint === true" class="Hint"
|
||||
<view v-if="nameAnchor === ''|| nameAnchor === null && Hint === true" class="Hint"
|
||||
>请填写主播名称</view
|
||||
>
|
||||
</view>
|
||||
@@ -43,8 +44,9 @@
|
||||
:options="Country"
|
||||
:filterable = "filterable"
|
||||
placeholder="请选择国家"
|
||||
:value="countrys"
|
||||
/>
|
||||
<view v-if="countrys === '' && Hint === true" class="Hint">请选择国家</view>
|
||||
<view v-if="countrys === ''|| countrys===null && Hint === true" class="Hint">请选择国家</view>
|
||||
</view>
|
||||
<view class="Gender">
|
||||
<view class="Gendercs">
|
||||
@@ -58,30 +60,31 @@
|
||||
@change="gender"
|
||||
:options="Gender"
|
||||
placeholder="性别"
|
||||
:value="message.sex === '1'?1:2"
|
||||
/>
|
||||
</view>
|
||||
<view class="Gendericoncss">
|
||||
<image
|
||||
v-if="genders === 0"
|
||||
v-if="genders === 0 || message.sex === '0'"
|
||||
class="Gendericon"
|
||||
src="../../../../static/ask.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-if="genders === 1"
|
||||
v-if="genders === 1||message.sex === '1'"
|
||||
class="Gendericon"
|
||||
src="../../../../static/man.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<image
|
||||
v-if="genders === 2"
|
||||
v-if="genders === 2||message.sex === '2'"
|
||||
class="Gendericon"
|
||||
src="../../../../static/girl.png"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="genders === 0 && Hint === true" class="Hintcss">请选择性别</view>
|
||||
<view v-if="genders === 0 || genders===null && Hint === true" class="Hintcss">请选择性别</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -89,11 +92,11 @@
|
||||
<view class="goldCoin">
|
||||
<view class="number-box">
|
||||
<view class="number-box-title">金币数量:</view>
|
||||
<uni-number-box background="#03ABA8" v-model="numberCoins"></uni-number-box>
|
||||
<uni-number-box background="#03ABA8" v-model="numberCoins" ></uni-number-box>
|
||||
<view class="number-box-title">单位:</view>
|
||||
<view class="number-box-unit">K</view>
|
||||
</view>
|
||||
<view v-if="numberCoins === '' && Hint === true" class="Hint"
|
||||
<view v-if="numberCoins === ''|| numberCoins === null && Hint === true" class="Hint"
|
||||
>请填写金币数量</view
|
||||
>
|
||||
</view>
|
||||
@@ -104,7 +107,7 @@
|
||||
hide-second="true"
|
||||
v-model="datetimesingle"
|
||||
/>
|
||||
<view v-if="datetimesingle === '' && Hint === true" class="Hint"
|
||||
<view v-if="datetimesingle === ''|| datetimesingle === null && Hint === true" class="Hint"
|
||||
>请选择日期</view
|
||||
>
|
||||
</view>
|
||||
@@ -115,7 +118,7 @@
|
||||
<uni-number-box background="#03ABA8" v-model="session"></uni-number-box>
|
||||
<view class="number-box-title">次</view>
|
||||
</view>
|
||||
<view v-if="session === '' && Hint === true" class="Hint"
|
||||
<view v-if="session === ''|| session === null && Hint === true" class="Hint"
|
||||
>请填写场数</view
|
||||
>
|
||||
</view>
|
||||
@@ -136,14 +139,16 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import message from "@tencentcloud/chat-uikit-uniapp/locales/en/message.js";
|
||||
|
||||
import optionsArray from "../../../../components/NationalDictionary.js";
|
||||
import request from "../../../../components/request.js";
|
||||
import formatDate from "../../../../components/formatDate.js";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
genders: 0, //性别
|
||||
genders: "", //性别
|
||||
Gender: [
|
||||
{ label: "男", value: 1 },
|
||||
{ label: "女", value: 2 },
|
||||
@@ -152,18 +157,32 @@ export default {
|
||||
countrys: "", //国家
|
||||
nameAnchor: "", //主播名称
|
||||
numberCoins: "", //金币数量
|
||||
session: "", //场数
|
||||
remarks: "", //备注
|
||||
session: '', //场数
|
||||
remarks: '', //备注
|
||||
Display: false,
|
||||
Hint: false,
|
||||
datetimesingle: "", //日期
|
||||
id: null, //用户id
|
||||
datetimesingle: '', //日期
|
||||
id: "", //用户id
|
||||
sendingTime: "", //发送时间
|
||||
filterable: true, //是否可搜索
|
||||
};
|
||||
},
|
||||
props: {
|
||||
message
|
||||
message:{
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
message(newQuestion, oldQuestion) {
|
||||
this.numberCoins = newQuestion.coin;
|
||||
this.session = newQuestion.pkNumber;
|
||||
this.remarks = newQuestion.remark;
|
||||
this.datetimesingle = formatDate(newQuestion.pkTime);
|
||||
this.id = newQuestion.senderId;
|
||||
this.nameAnchor = newQuestion.anchorId;
|
||||
this.countrys = newQuestion.country;
|
||||
this.genders = newQuestion.sex === "1" ? 1 : 2;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
uni.getStorage({
|
||||
@@ -174,22 +193,23 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//性别
|
||||
gender(item) {
|
||||
this.genders = item.value;
|
||||
console.log(item);
|
||||
},
|
||||
|
||||
//日期
|
||||
country(item) {
|
||||
this.countrys = item.value;
|
||||
console.log(item);
|
||||
},
|
||||
|
||||
handleOverlayClick(event) {
|
||||
if (event.target === this.$el) {
|
||||
this.Display = false;
|
||||
this.Hint = false;
|
||||
}
|
||||
},
|
||||
// //主播名称
|
||||
// handleOverlayClick(event) {
|
||||
// if (event.target === this.$el) {
|
||||
// this.Display = false;
|
||||
// this.Hint = false;
|
||||
// }
|
||||
// },
|
||||
open() {
|
||||
if (this.Display) {
|
||||
this.Display = false;
|
||||
@@ -211,16 +231,15 @@ export default {
|
||||
},
|
||||
|
||||
async Publish() {
|
||||
console.log("````````````````````````````````````````````",message);
|
||||
|
||||
//判断是否为空
|
||||
if (
|
||||
this.nameAnchor === "" ||
|
||||
this.genders === "" ||
|
||||
this.numberCoins === "" ||
|
||||
this.countrys === "" ||
|
||||
this.datetimesingle === ""||
|
||||
this.session === ""
|
||||
this.nameAnchor == "" && this.nameAnchor == null ||
|
||||
this.genders == "" && this.genders == null ||
|
||||
this.numberCoins =="" && this.numberCoins == null ||
|
||||
this.datetimesingle == "" && this.datetimesingle == null ||
|
||||
this.countrys == "" && his.countrys == null ||
|
||||
this.datetimesingle == "" && this.datetimesingle == null ||
|
||||
this.session == "" && this.session == null
|
||||
) {
|
||||
this.Hint = true;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user