| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <view>
- <view class="chance u-f">
- 当前剩余<view class="num">'{{num}}'</view>次修改信息的机会
- </view>
- <picker :range="address" @change="provinceChange">
- <view class="u-s">
- <input type="text" v-model="addre"/><view class="icon iconfont icon-down-fill"></view>
- </view>
- </picker>
- <picker :range="subject" @change="subjectChange">
- <view class="u-s">
- <input type="text" v-model="sub"/><view class="icon iconfont icon-down-fill"></view>
- </view>
- </picker>
- <view class="u-s">
- <input type="text" v-model="sco" /><view class="icon1">分数</view>
- </view>
- <view class="u-s">
- <input type="text" v-model="number"/><view class="icon1">位次</view>
- </view>
- <input type="text" value="确定" class="btn" @tap="goIndex"/>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- "num":getApp().globalData.global_num,
- "address":["山东","北京"],
- "addre":getApp().globalData.global_addre,
- "sco":getApp().globalData.global_sco,
- "subject":["文科","理科"],
- "sub":getApp().globalData.global_sub,
- "number":"1000"
- }
- },
- methods: {
- subjectChange(e){
- let m=e.detail.value;
- getApp().globalData.global_sub=this.subject[m];
- this.sub=getApp().globalData.global_sub
- },
- provinceChange(e){
- let m=e.detail.value;
- getApp().globalData.global_addre=this.address[m];
- this.addre=getApp().globalData.global_addre;
- },
- goIndex(){
- if(this.num>0){
- uni.navigateBack({
- delta:1,
- });
- getApp().globalData.global_num--;
- this.num=getApp().globalData.global_num;
- getApp().globalData.global_sco=this.sco;
- }else{
- uni.showToast({
- "title":"超过最大修改次数了",
- "icon":"none"
- })
- }
- }
- }
- }
- </script>
- <style scoped>
- .u-f{
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .u-s{
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .chance{
- margin-top: 70upx;
- margin-bottom: 30upx;
- font-size: 35upx;
- color: #999999;
- }
- .chance .num{
- color: #DD524D;
- }
- input{
- width: 80%;
- height: 100upx;
- margin: 15upx auto;
- background:#E7E7E7;
- border-radius: 35upx;
- position: relative;
- padding-left: 40upx;
- }
- .icon , .icon1{
- position: absolute;
- right: 100upx;
- color: #999999;
- font-size: 20upx;
- }
- .btn{
- background: #FF0000;
- color: white;
- text-align: center;
- }
- .icon1{
- font-size: 30upx;
- }
- </style>
|