Browse Source

新增概率设置和修改刮奖文字

master
liaoxinyu 2 years ago
parent
commit
cc8829c331
  1. 6
      common/js/api.js
  2. 9
      manifest.json
  3. 8
      pages.json
  4. 75
      pages/about/ProbabilitySettings/ProbabilitySettings.vue
  5. 6
      pages/about/about.vue
  6. 16
      pages/home/home.vue
  7. BIN
      static/user/icon_probability.png

6
common/js/api.js

@ -1,6 +1,8 @@
// let baseUrl = 'http://192.168.66.221:8000'
let baseUrl = 'http://192.168.66.16:8084'
// baseUrl = 'https://ggl.xingtongworld.com'
// let baseUrl = 'http://192.168.66.16:8084'
// let baseUrl = 'http://192.168.31.119:8000'
let baseUrl = 'https://ggl.xingtongworld.com'
// baseUrl = 'https://ggl.dingguagua.vip'
// baseUrl = 'https://apps.dingguagua.vip'

9
manifest.json

@ -71,5 +71,12 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
"vueVersion" : "2",
"h5" : {
"optimization" : {
"treeShaking" : {
"enable" : false
}
}
}
}

8
pages.json

@ -341,8 +341,16 @@
"enablePullDownRefresh": false
}
},
{
"path" : "pages/about/ProbabilitySettings/ProbabilitySettings",
"style" :
{
"navigationBarTitleText": "概率设置",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/recordsList/WinningRecord/WinningRecord",
"style" :

75
pages/about/ProbabilitySettings/ProbabilitySettings.vue

@ -0,0 +1,75 @@
<template>
<view class="probability_box">
<view>
概率
</view>
<view>
<input type="text" v-model="rate" placeholder="请输入内容" placeholder-style="color: #999;" />
</view>
<view>
<button class="mini-btn" type="primary" size="mini" @click="save()" style="height: 29px;">保存</button>
</view>
</view>
</template>
<script>
import API from '@/common/js/api.js'
export default {
data(){
return{
rate:0+"%"
}
},
methods:{
init(){
API.request('/setting/getProbability', {} , res=>{
this.rate = res.data.rate
})
},
save(){
uni.showModal({
title:'温馨提示',
content:"确定要修改概率吗?",
success:(res)=>{
if(res.confirm){
API.request('/setting/settingProbability',{rate: this.rate}, res=>{
if(200==res.code){
uni.showToast({
title: res.msg
})
this.init()
}else{
uni.showToast({
title: res.msg
})
}
// console.log(res);
})
}
}
})
}
},
created() {
this.init()
}
}
</script>
<style scoped lang="scss">
.probability_box{
display: flex;
justify-content: space-around;
align-items: center;
margin:10px 5px 5px 5px;
input{
width: 500rpx;
height: 80rpx;
border: 1px solid #eee;
border-radius: 5px;
padding: 0px 10px;
box-sizing: border-box;
color: #444;
}
}
</style>

6
pages/about/about.vue

@ -56,6 +56,12 @@
"to": '/pages/about/noticeManage/noticeManage',
"icon": "compose",
"iconN": "flag"
},
{
"title": '概率设置',
"to": '/pages/about/ProbabilitySettings/ProbabilitySettings',
"icon": "compose",
"iconN": "probability"
}
]
]

16
pages/home/home.vue

@ -43,11 +43,11 @@
<img v-lazy="item.cover_image" />
</view>
<view class="goods-info">
<view class="skeleton-rect" style="color: #333;font-size: 16px;">{{item.title}}</view>
<view class="">面值{{item.price}}</view>
<view class="skeleton-rect" style="color: #333;font-size: 16px;margin-bottom: 3px;">{{item.title}}</view>
<view style="margin-bottom: 3px;">面值{{item.price}}</view>
<view class="">最高中奖金额{{item.max_awards_amount}}</view>
</view>
<view class="goods-btn" @click="toDetailUrl(item)">立即刮奖</view>
<view class="goods-btn" @click="toDetailUrl(item)">刮奖</view>
</view>
</view>
<view class="list_area" v-if="0">
@ -792,18 +792,18 @@
.goods-info{
display: flex;
flex-direction: column;
justify-content: space-between;
// justify-content: space-between;
margin: 0px 5px;
flex: 1;
}
.goods-btn{
width: 78px;
height: 40px;
width: 50px;
height: 30px;
background-color: #e33838;
border-radius: 5px;
font-size: 14px;
font-size: 11px;
color: #fff;
line-height: 40px;
line-height: 30px;
text-align: center;
}
}

BIN
static/user/icon_probability.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Loading…
Cancel
Save