wx399182c36706169c-sheng.xi.../pages/astrocx/index.js

55 lines
1.7 KiB
JavaScript

var e, c;
e = getApp(), c = require("../../utils/util.js"), Page({
data: {
objectArray: e.globalData.city,
province: [],
city: [],
check0: !1,
check1: !1,
check2: !1,
check3: !1,
checkvalue0: "出生日期",
checkvalue1: "出生日期",
checkvalue2: "出生时间",
checkvalue3: 0,
checkvalue4: 0,
showModalStatus: !1,
current: 0
},
onLoad: function(c) {
e.init_city(this);
},
provinceChose: function(c) {
e.provinceChose(this, c);
},
bindPickerChange: function(c) {
e.bindPickerChange(this, c);
},
jumptoDetail: function(t) {
var a, n, o, i, h, r, u = this.data;
t.currentTarget.dataset.type > 0 ? (a = u.check1 && u.check2 && u.check3, o = u.checkvalue1,
i = u.checkvalue2, h = u.province[u.checkvalue4], r = u.city[u.checkvalue3], n = o.replace(/-/g, "_") + "_" + i.replace(/:/g, "_") + "_0_" + h + "_" + r) : (a = u.check0,
n = (o = u.checkvalue0.split("-"))[1] + "_" + o[2]), console.log(n);
var l = c.authcode("0_" + n, "encode");
console.log("编码", l);
var s = "astrocx_info?q=" + l;
a ? wx.navigateTo({
url: s
}) : e.showModal(this);
},
onShareAppMessage: function(e) {
return "button" === e.from && console.log(e.target), {
title: "星座查询",
path: "/pages/astrocx/index",
success: function(e) {},
fail: function(e) {}
};
},
changeCXtype: function() {
var e = !this.data.current;
this.setData({
current: e
});
}
});