first commit
This commit is contained in:
218
unpackage/dist/dev/mp-alipay/pages/mine/mine.js
vendored
Normal file
218
unpackage/dist/dev/mp-alipay/pages/mine/mine.js
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_tag2 = common_vendor.resolveComponent("up-tag");
|
||||
const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
|
||||
const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_tabbar2 = common_vendor.resolveComponent("tabbar");
|
||||
(_easycom_statusBar2 + _easycom_up_tag2 + _easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_up_icon2 + _easycom_up_image2 + _easycom_tabbar2)();
|
||||
}
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_tag = () => "../../uni_modules/uview-plus/components/u-tag/u-tag.js";
|
||||
const _easycom_up_grid_item = () => "../../uni_modules/uview-plus/components/u-grid-item/u-grid-item.js";
|
||||
const _easycom_up_grid = () => "../../uni_modules/uview-plus/components/u-grid/u-grid.js";
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_tabbar = () => "../../components/tabbar/tabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_statusBar + _easycom_up_tag + _easycom_up_grid_item + _easycom_up_grid + _easycom_up_icon + _easycom_up_image + _easycom_tabbar)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "mine",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
let getInfo = common_vendor.ref({});
|
||||
let loginTan = common_vendor.ref(true);
|
||||
common_vendor.onLoad(() => {
|
||||
common_vendor.index.hideTabBar();
|
||||
});
|
||||
const baseList = common_vendor.reactive([
|
||||
{
|
||||
img: "/static/icon/dd.png",
|
||||
name: "订单",
|
||||
path: "/pages/order/order",
|
||||
login: true
|
||||
},
|
||||
// {
|
||||
// img: '/static/icon/ye.png',
|
||||
// name: '余额',
|
||||
// path: '/pages/wallet/wallet',
|
||||
// login: true
|
||||
// },
|
||||
// {
|
||||
// img: '/static/icon/zd.png',
|
||||
// name: '账单',
|
||||
// path: '/pages/mine/balanceIncome',
|
||||
// login: true
|
||||
// },
|
||||
{
|
||||
img: "/static/icon/zb.png",
|
||||
name: "邀请记录",
|
||||
path: "/pages/shareList/shareList",
|
||||
login: true
|
||||
},
|
||||
{
|
||||
img: "/static/icon/dz.png",
|
||||
name: "充电桩",
|
||||
path: "/pages/piles/piles",
|
||||
login: true
|
||||
},
|
||||
{
|
||||
img: "/static/icon/kf.png",
|
||||
name: "联系客服",
|
||||
call: true
|
||||
// call: true
|
||||
}
|
||||
// {
|
||||
// img: '/static/icon/bz.png',
|
||||
// name: '帮助中心',
|
||||
// login: false
|
||||
// },
|
||||
// {
|
||||
// img: '/static/icon/share.png',
|
||||
// name: '分享海报',
|
||||
// login: true,
|
||||
// path: '/pages/mine/share'
|
||||
// }
|
||||
]);
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.hideTabBar();
|
||||
let Authorization = common_vendor.index.getStorageSync("token") || "";
|
||||
if (Authorization) {
|
||||
getUserInfo();
|
||||
loginTan.value = true;
|
||||
} else {
|
||||
getInfo.value = {};
|
||||
loginTan.value = false;
|
||||
}
|
||||
});
|
||||
let getUserInfo = async () => {
|
||||
try {
|
||||
let _res = await api_api.userInfo();
|
||||
getInfo.value = _res;
|
||||
common_vendor.index.setStorageSync("user", _res);
|
||||
} catch (err) {
|
||||
console.log(123456);
|
||||
getInfo.value = {};
|
||||
loginTan.value = false;
|
||||
}
|
||||
};
|
||||
let copy = (e) => {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: e,
|
||||
success: function() {
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.unref(getInfo).avatar || "/static/icon/avatar.png",
|
||||
b: common_vendor.unref(loginTan)
|
||||
}, common_vendor.unref(loginTan) ? common_vendor.e({
|
||||
c: common_vendor.unref(getInfo).nickName
|
||||
}, common_vendor.unref(getInfo).nickName ? {
|
||||
d: common_vendor.t(common_vendor.unref(getInfo).nickName || "")
|
||||
} : {}, {
|
||||
e: common_vendor.unref(getInfo).level == 1
|
||||
}, common_vendor.unref(getInfo).level == 1 ? {
|
||||
f: common_vendor.p({
|
||||
text: "运营中心",
|
||||
plain: true,
|
||||
size: "mini",
|
||||
borderColor: "#fa7d02",
|
||||
color: "#fa7d02"
|
||||
})
|
||||
} : {}, {
|
||||
g: common_vendor.unref(getInfo).level == 2
|
||||
}, common_vendor.unref(getInfo).level == 2 ? {
|
||||
h: common_vendor.p({
|
||||
text: "合伙人",
|
||||
plain: true,
|
||||
size: "mini",
|
||||
borderColor: "#fa7d02",
|
||||
color: "#fa7d02"
|
||||
})
|
||||
} : {}, {
|
||||
i: common_vendor.unref(getInfo).level == 3
|
||||
}, common_vendor.unref(getInfo).level == 3 ? {
|
||||
j: common_vendor.p({
|
||||
text: "省分公司",
|
||||
plain: true,
|
||||
size: "mini",
|
||||
borderColor: "#fa7d02",
|
||||
color: "#fa7d02"
|
||||
})
|
||||
} : {}, {
|
||||
k: common_vendor.t(common_vendor.unref(getInfo).userName || "")
|
||||
}) : {}, {
|
||||
l: common_vendor.unref(loginTan)
|
||||
}, common_vendor.unref(loginTan) ? {
|
||||
m: common_assets._imports_0$1
|
||||
} : {}, {
|
||||
n: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/mine/setting", true)),
|
||||
o: common_vendor.t(common_vendor.unref(getInfo).points2 || "0.00"),
|
||||
p: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/balanceIncome`, true)),
|
||||
q: common_vendor.t(common_vendor.unref(getInfo).points1 || "0.00"),
|
||||
r: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/balanceIncome`, true)),
|
||||
s: common_vendor.t(common_vendor.unref(getInfo).deviceNum || 0),
|
||||
t: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/piles/piles`, true)),
|
||||
v: common_vendor.p({
|
||||
border: false,
|
||||
col: "3"
|
||||
}),
|
||||
w: (_b = (_a = common_vendor.unref(getInfo)) == null ? void 0 : _a.formUsersInfo) == null ? void 0 : _b.userName
|
||||
}, ((_d = (_c = common_vendor.unref(getInfo)) == null ? void 0 : _c.formUsersInfo) == null ? void 0 : _d.userName) ? {
|
||||
x: common_vendor.t((_f = (_e = common_vendor.unref(getInfo)) == null ? void 0 : _e.formUsersInfo) == null ? void 0 : _f.userName)
|
||||
} : {}, {
|
||||
y: common_vendor.f(baseList, (item, index, i0) => {
|
||||
return {
|
||||
a: "7c2ebfa5-10-" + i0 + "," + ("7c2ebfa5-9-" + i0),
|
||||
b: common_vendor.p({
|
||||
imgMode: "widthFix",
|
||||
name: item.img,
|
||||
size: 27
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.openType,
|
||||
e: index,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(navTo)(item.path, item.login, item.call)),
|
||||
g: "7c2ebfa5-9-" + i0 + ",7c2ebfa5-8"
|
||||
};
|
||||
}),
|
||||
z: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
border: false,
|
||||
col: "4"
|
||||
}),
|
||||
B: common_vendor.unref(getInfo).qrCode
|
||||
}, common_vendor.unref(getInfo).qrCode ? common_vendor.e({
|
||||
C: common_vendor.unref(getInfo).pemType == 0
|
||||
}, common_vendor.unref(getInfo).pemType == 0 ? {} : {
|
||||
D: common_vendor.t(common_vendor.unref(getInfo).shareCode),
|
||||
E: common_vendor.o(($event) => common_vendor.unref(copy)(common_vendor.unref(getInfo).shareCode)),
|
||||
F: common_vendor.p({
|
||||
src: common_vendor.unref(getInfo).qrCode,
|
||||
radius: "20rpx",
|
||||
width: "440rpx",
|
||||
height: "440rpx",
|
||||
mode: "widthFix"
|
||||
})
|
||||
}) : {}, {
|
||||
G: common_vendor.p({
|
||||
path: "/pages/mine/mine"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7c2ebfa5"]]);
|
||||
my.createPage(MiniProgramPage);
|
||||
Reference in New Issue
Block a user