Commit dde45fb7162a170c27cdd28f4441b61ba73ca391

Authored by wangfan
1 parent b7cfc3b1

c端预定

... ... @@ -6,7 +6,7 @@ Component({
properties: {
stat: {
type: String,
value:"4.0",
value:"4.5",
},
color:{
type:String,
... ... @@ -22,8 +22,22 @@ Component({
/**
* 组件的初始数据
*/
data: {},
data: {
statnum:90.21
},
observers: {
'stat': function (stat) {
console.log('stat...',stat)
stat=parseFloat(stat)
let statnum=0;
statnum=(stat/5)
let px=(parseInt(stat)-1)*0.00070 //(5/(84*84))
statnum=(statnum+px)*100
this.setData({
statnum:statnum,
})
}
},
/**
* 组件的方法列表
*/
... ...
<!--components/stat/stat.wxml-->
<view class="flex-ll">
<view class="stat">
<view class="bg" style="background-color: {{$color}};width: {{(stat/5)*100}}%"></view>
<view class="bg" style="background-color: {{color}};width: {{statnum}}%"></view>
<image src="http://qn.colorcun.com/custom/lite-online/image/%E9%95%82%E7%A9%BA%E6%98%9F%E6%98%9F.png"></image>
</view>
<view class="stat-text" wx:if="{{hasShowText}}">{{stat}} 分</view>
... ...
... ... @@ -9,7 +9,7 @@
"nodeModules": true
},
"compileType": "miniprogram",
"libVersion": "2.4.2",
"libVersion": "2.6.1",
"appid": "wxd3dc4206c76f14fc",
"projectname": "xcx-book",
"isGameTourist": false,
... ...