尝试写了第一个小页面
// pages/dangfei/dangfei.js
function a(a, t, e) {
return t in a ? Object.defineProperty(a, t, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : a[t] = e, a;
}
var t, e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (a) {
return typeof a;
} : function (a) {
return a && "function" == typeof Symbol && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
};
Page({
data: (t = {
casArray: [""],
casIndex: 0,
DF: 0,
DFR: 0,
Performance: 0
}, a(t, "show1", "flex"), a(t, "Post", 0), a(t, "Scale", 0), a(t, "Sunsidy", 0),
a(t, "Pension", 0), a(t, "Accumulate", 0), t),
stroe: function () {
},
calculate: function () {
this.data.Base = this.data.Post + this.data.Scale +this.data.Sunsidy + this.data.Pension + this.data.Accumulate,
this.data.Base <= 3e3 ? this.data.DFR = .005 : this.data.Base <= 5e3 ? this.data.DFR = .01 : this.data.Base <= 1e4 ? this.data.DFR = .015 : this.data.DFR = .02,
this.data.DF = this.data.Base * this.data.DFR,
console.log("DFR:" + this.data.DFR),
console.log("DF:" + this.data.DF);
var d = {
DF: this.data.DF.toFixed(2)