first commit
This commit is contained in:
147
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
147
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
require("../../uni_modules/uview-plus/index.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
|
||||
const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
|
||||
(_easycom_up_grid_item2 + _easycom_up_grid2)();
|
||||
}
|
||||
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";
|
||||
if (!Math) {
|
||||
(_easycom_up_grid_item + _easycom_up_grid)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
let getInfo = common_vendor.ref({});
|
||||
common_vendor.ref({});
|
||||
let devices = common_vendor.ref(0);
|
||||
let teamDevices = common_vendor.ref(0);
|
||||
let wallet = common_vendor.ref(0);
|
||||
let income = common_vendor.ref(0);
|
||||
let money_list = common_vendor.ref([
|
||||
{
|
||||
name: "收益统计",
|
||||
type: "收益",
|
||||
data: {}
|
||||
},
|
||||
{
|
||||
name: "推广统计",
|
||||
type: "推广",
|
||||
data: {}
|
||||
}
|
||||
// {
|
||||
// name: '邀请统计',
|
||||
// type: '邀请',
|
||||
// data: {}
|
||||
// }
|
||||
]);
|
||||
common_vendor.ref(1);
|
||||
common_vendor.onShow(async () => {
|
||||
let _res = await api_api.userInfo();
|
||||
getInfo.value = _res;
|
||||
userStatCou();
|
||||
let _data = await api_api.freezeTotal();
|
||||
income.value = _data.income;
|
||||
wallet.value = _data.wallet;
|
||||
});
|
||||
let userStatCou = async () => {
|
||||
let _res = await api_api.userStat();
|
||||
devices.value = _res.devices;
|
||||
teamDevices.value = _res.teamDevices;
|
||||
money_list.value.map((item, index) => {
|
||||
if (item.type == "推广") {
|
||||
item.data = {
|
||||
day_money: _res.ordersToday,
|
||||
week_money1: _res.ordersLastWeek,
|
||||
week_money0: _res.ordersThisWeek,
|
||||
total_money: _res.orders30Days
|
||||
};
|
||||
}
|
||||
if (item.type == "收益") {
|
||||
item.data = {
|
||||
day_money: _res.pointDeviceToday,
|
||||
week_money1: _res.pointDeviceLastWeek,
|
||||
week_money0: _res.pointDeviceThisWeek,
|
||||
total_money: _res.pointDevice30Days
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(common_vendor.unref(getInfo).points2 || "0.00"),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/incomeList`, true)),
|
||||
d: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
e: common_assets._imports_1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/transferBalance`, true)),
|
||||
g: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
h: common_assets._imports_2,
|
||||
i: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/toUser`, true)),
|
||||
j: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
k: common_assets._imports_3,
|
||||
l: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/withdrawList`, true)),
|
||||
m: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
n: common_assets._imports_4,
|
||||
o: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/withdrawList`, true)),
|
||||
p: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
q: common_assets._imports_5,
|
||||
r: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/wallet/withdrawList`, true)),
|
||||
s: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
border: false,
|
||||
col: "4"
|
||||
}),
|
||||
v: common_vendor.unref(getInfo).point2Give && common_vendor.unref(getInfo).point2Give == 1
|
||||
}, common_vendor.unref(getInfo).point2Give && common_vendor.unref(getInfo).point2Give == 1 ? {
|
||||
w: common_assets._imports_6,
|
||||
x: common_vendor.o(($event) => common_vendor.unref(navTo)(`/pages/mine/toUser2`, true)),
|
||||
y: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
z: common_vendor.p({
|
||||
border: false,
|
||||
col: "4"
|
||||
})
|
||||
} : {}, {
|
||||
A: common_vendor.t(common_vendor.unref(devices) || 0),
|
||||
B: common_vendor.t(common_vendor.unref(teamDevices) || 0),
|
||||
C: common_vendor.f(common_vendor.unref(money_list), (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.t(item.data.day_money || 0),
|
||||
c: common_vendor.t(item.type),
|
||||
d: common_vendor.t(item.data.week_money1 || 0),
|
||||
e: common_vendor.t(item.type),
|
||||
f: common_vendor.t(item.data.week_money0 || 0),
|
||||
g: common_vendor.t(item.type),
|
||||
h: common_vendor.t(item.data.total_money || 0),
|
||||
i: common_vendor.t(item.type),
|
||||
j: index
|
||||
};
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
wx.createPage(MiniProgramPage);
|
||||
7
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "统计",
|
||||
"usingComponents": {
|
||||
"up-grid-item": "../../uni_modules/uview-plus/components/u-grid-item/u-grid-item",
|
||||
"up-grid": "../../uni_modules/uview-plus/components/u-grid/u-grid"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
146
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
146
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
.wallet_pall.data-v-1cf27b2a {
|
||||
height: 200rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 40rpx;
|
||||
background: linear-gradient(179deg, #5082ff 0%, #4278ff 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid rgba(153, 153, 153, 0.6);
|
||||
}
|
||||
.wallet_pall_button.data-v-1cf27b2a {
|
||||
padding: 10rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.wallet_pall_header.data-v-1cf27b2a {
|
||||
font-weight: bold;
|
||||
font-size: 26rpx;
|
||||
color: #002ea4;
|
||||
}
|
||||
.wallet_pall_ye.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 70%;
|
||||
}
|
||||
.wallet_pall_ye view.data-v-1cf27b2a:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 68rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.wallet_pall_ye view.data-v-1cf27b2a:nth-child(2) {
|
||||
width: 128rpx;
|
||||
height: 58rpx;
|
||||
background: rgba(0, 46, 164, 0.07);
|
||||
border-radius: 32rpx 32rpx 32rpx 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.wallet_pall_view.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.wallet_pall_view view.data-v-1cf27b2a:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 45rpx;
|
||||
color: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.wallet_pall_view view.data-v-1cf27b2a:nth-child(2) {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.wallet_list.data-v-1cf27b2a {
|
||||
width: 690rpx;
|
||||
height: 120rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
padding: 15rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.wallet_list_left view.data-v-1cf27b2a:nth-child(1) {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.wallet_list_left view.data-v-1cf27b2a:nth-child(2) {
|
||||
font-size: 24rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.wallet_list_right.data-v-1cf27b2a {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #ff2727;
|
||||
}
|
||||
.mine_block.data-v-1cf27b2a {
|
||||
padding: 24rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.mine_block_tit.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.mine_block_tit_left.data-v-1cf27b2a {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.mine_block_tit_right.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #cbd73b;
|
||||
}
|
||||
.mine_block_tit_right image.data-v-1cf27b2a {
|
||||
width: 13rpx;
|
||||
height: 22rpx;
|
||||
margin-left: 15rpx;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
.mine_block_view.data-v-1cf27b2a {
|
||||
width: 100%;
|
||||
min-height: 120rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid rgba(55, 112, 174, 0.1);
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.mine_block_view image.data-v-1cf27b2a {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
.u-flex-y-center.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
}
|
||||
.u-flex-between.data-v-1cf27b2a {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.u-flex-fill.data-v-1cf27b2a {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
147
unpackage/dist/dev/mp-weixin/pages/login/getBack.js
vendored
Normal file
147
unpackage/dist/dev/mp-weixin/pages/login/getBack.js
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
|
||||
(_easycom_up_icon2 + _easycom_statusBar2 + _easycom_up_input2 + _easycom_up_code2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_code = () => "../../uni_modules/uview-plus/components/u-code/u-code.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_statusBar + _easycom_up_input + _easycom_up_code)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "getBack",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
let tips = common_vendor.ref("");
|
||||
let uCode = common_vendor.ref(null);
|
||||
let dataFrom = common_vendor.reactive({
|
||||
userName: "",
|
||||
passwd: "",
|
||||
phone: "",
|
||||
smsCode: "",
|
||||
confirmPasswd: ""
|
||||
});
|
||||
let codeChange2 = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
let getCode2 = () => {
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (uCode.value.canGetCode) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在获取验证码"
|
||||
});
|
||||
api_api.smsCode({
|
||||
phone: dataFrom.phone
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.$u.toast("验证码已发送");
|
||||
uCode.value.start();
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.$u.toast("倒计时结束后再发送");
|
||||
}
|
||||
};
|
||||
let submit = async () => {
|
||||
if (!dataFrom.userName)
|
||||
return common_vendor.index.showToast({ title: "请输入用户名", icon: "none" });
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (dataFrom.phone.length != 11)
|
||||
return common_vendor.index.showToast({ title: "请输入正确的手机号", icon: "none" });
|
||||
if (!dataFrom.smsCode)
|
||||
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
|
||||
if (!dataFrom.passwd)
|
||||
return common_vendor.index.showToast({ title: "请输入密码", icon: "none" });
|
||||
if (!dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "请再次输入密码", icon: "none" });
|
||||
if (dataFrom.passwd != dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "两次密码输入不一致", icon: "none" });
|
||||
await api_api.forgotPassword(dataFrom);
|
||||
common_vendor.index.showToast({ title: "修改成功", icon: "none" });
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 200);
|
||||
};
|
||||
let back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(common_vendor.unref(back)),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_assets._imports_0$1,
|
||||
e: common_assets._imports_1$1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).userName = $event),
|
||||
g: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的用户名",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).userName
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).passwd = $event),
|
||||
i: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).passwd
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(dataFrom).confirmPasswd = $event),
|
||||
k: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请再次输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).confirmPasswd
|
||||
}),
|
||||
l: common_vendor.o(($event) => common_vendor.unref(dataFrom).phone = $event),
|
||||
m: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的手机号",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).phone
|
||||
}),
|
||||
n: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
o: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入验证码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).smsCode
|
||||
}),
|
||||
p: common_vendor.sr(uCode, "d23ab30f-7", {
|
||||
"k": "uCode"
|
||||
}),
|
||||
q: common_vendor.o(common_vendor.unref(codeChange2)),
|
||||
r: common_vendor.p({
|
||||
["keep-running"]: true,
|
||||
["start-text"]: "点我获取验证码"
|
||||
}),
|
||||
s: common_vendor.t(common_vendor.unref(tips)),
|
||||
t: common_vendor.o((...args) => common_vendor.unref(getCode2) && common_vendor.unref(getCode2)(...args)),
|
||||
v: common_vendor.unref(tips),
|
||||
w: common_vendor.o((...args) => common_vendor.unref(submit) && common_vendor.unref(submit)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d23ab30f"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
10
unpackage/dist/dev/mp-weixin/pages/login/getBack.json
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/pages/login/getBack.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"status-bar": "../../components/statusBar/statusBar",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-code": "../../uni_modules/uview-plus/components/u-code/u-code"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/getBack.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/getBack.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="login data-v-d23ab30f"><view class="orderdetail_header p30 data-v-d23ab30f"><view class="data-v-d23ab30f" style="{{'height:' + a}}"></view><view class="data-v-d23ab30f" style="height:44px;display:flex;align-items:center"><up-icon wx:if="{{c}}" class="data-v-d23ab30f" bindclick="{{b}}" u-i="d23ab30f-0" bind:__l="__l" u-p="{{c}}"></up-icon></view></view><image class="login_bei data-v-d23ab30f" src="{{d}}"></image><status-bar class="data-v-d23ab30f" u-i="d23ab30f-1" bind:__l="__l"/><view class="login_logo data-v-d23ab30f"><image class="login_logo_img data-v-d23ab30f" src="{{e}}"></image><view class="login_logo_tit data-v-d23ab30f">欢迎来到星动能源</view></view><view class="data-v-d23ab30f" style="margin-top:150rpx"><view class="data-v-d23ab30f" style="margin-bottom:30rpx"><up-input wx:if="{{g}}" class="data-v-d23ab30f" u-i="d23ab30f-2" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-input></view><view class="data-v-d23ab30f" style="margin-bottom:30rpx"><up-input wx:if="{{i}}" class="data-v-d23ab30f" u-i="d23ab30f-3" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input></view><view class="data-v-d23ab30f" style="margin-bottom:30rpx"><up-input wx:if="{{k}}" class="data-v-d23ab30f" u-i="d23ab30f-4" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></up-input></view><view class="data-v-d23ab30f" style="margin-bottom:30rpx"><up-input wx:if="{{m}}" class="data-v-d23ab30f" u-i="d23ab30f-5" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></up-input></view><view class="data-v-d23ab30f" style="margin-bottom:30rpx;display:flex;align-items:center"><up-input wx:if="{{o}}" class="data-v-d23ab30f" u-i="d23ab30f-6" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"></up-input><up-code wx:if="{{r}}" class="r data-v-d23ab30f" u-r="uCode" bindchange="{{q}}" u-i="d23ab30f-7" bind:__l="__l" u-p="{{r}}"></up-code><text class="data-v-d23ab30f" bindtap="{{t}}" text="{{v}}" style="font-size:28rpx;color:#4874e5">{{s}}</text></view></view><view class="data-v-d23ab30f" style="display:flex;justify-content:center;margin-top:80rpx"><view class="login_btn data-v-d23ab30f" bindtap="{{w}}">确认</view></view></view>
|
||||
43
unpackage/dist/dev/mp-weixin/pages/login/getBack.wxss
vendored
Normal file
43
unpackage/dist/dev/mp-weixin/pages/login/getBack.wxss
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
.login.data-v-d23ab30f {
|
||||
padding: 0 60rpx;
|
||||
}
|
||||
.login_bei.data-v-d23ab30f {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 608rpx;
|
||||
height: 424rpx;
|
||||
}
|
||||
.login_logo.data-v-d23ab30f {
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.login_logo_img.data-v-d23ab30f {
|
||||
width: 152rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.login_logo_tit.data-v-d23ab30f {
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.login_btn.data-v-d23ab30f {
|
||||
width: 474rpx;
|
||||
height: 78rpx;
|
||||
background: #4874e5;
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.orderdetail_header.data-v-d23ab30f {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
136
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.js
vendored
Normal file
136
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.js
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
|
||||
(_easycom_up_icon2 + _easycom_statusBar2 + _easycom_up_input2 + _easycom_up_code2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_code = () => "../../uni_modules/uview-plus/components/u-code/u-code.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_statusBar + _easycom_up_input + _easycom_up_code)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "getBackAccout",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
let tips = common_vendor.ref("");
|
||||
let uCode = common_vendor.ref(null);
|
||||
let dataFrom = common_vendor.reactive({
|
||||
phone: "",
|
||||
smsCode: ""
|
||||
});
|
||||
let codeChange2 = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
let getCode2 = () => {
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (uCode.value.canGetCode) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在获取验证码"
|
||||
});
|
||||
api_api.smsCode({
|
||||
phone: dataFrom.phone
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.$u.toast("验证码已发送");
|
||||
uCode.value.start();
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.$u.toast("倒计时结束后再发送");
|
||||
}
|
||||
};
|
||||
let submit = async () => {
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (dataFrom.phone.length != 11)
|
||||
return common_vendor.index.showToast({ title: "请输入正确的手机号", icon: "none" });
|
||||
if (!dataFrom.smsCode)
|
||||
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
|
||||
let _res = await api_api.forgotUserName(dataFrom);
|
||||
if (_res.userNames.length == 0) {
|
||||
common_vendor.index.showModal({
|
||||
title: "提示",
|
||||
content: "该手机号还未注册",
|
||||
showCancel: false,
|
||||
confirmText: "我知道了"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.showModal({
|
||||
title: "已找回的用户名",
|
||||
content: _res.userNames.join(","),
|
||||
showCancel: false,
|
||||
confirmText: "确认",
|
||||
success: () => {
|
||||
common_vendor.index.setClipboardData({
|
||||
data: _res.userNames.join(","),
|
||||
//要被复制的内容
|
||||
success: () => {
|
||||
common_vendor.index.showToast({
|
||||
//提示
|
||||
title: "已复制用户名"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
let back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(common_vendor.unref(back)),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_assets._imports_0$1,
|
||||
e: common_assets._imports_1$1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).phone = $event),
|
||||
g: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的手机号",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).phone
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
i: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入验证码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).smsCode
|
||||
}),
|
||||
j: common_vendor.sr(uCode, "07a163b6-4", {
|
||||
"k": "uCode"
|
||||
}),
|
||||
k: common_vendor.o(common_vendor.unref(codeChange2)),
|
||||
l: common_vendor.p({
|
||||
["keep-running"]: true,
|
||||
["start-text"]: "点我获取验证码"
|
||||
}),
|
||||
m: common_vendor.t(common_vendor.unref(tips)),
|
||||
n: common_vendor.o((...args) => common_vendor.unref(getCode2) && common_vendor.unref(getCode2)(...args)),
|
||||
o: common_vendor.unref(tips),
|
||||
p: common_vendor.o((...args) => common_vendor.unref(submit) && common_vendor.unref(submit)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-07a163b6"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
10
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.json
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"status-bar": "../../components/statusBar/statusBar",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-code": "../../uni_modules/uview-plus/components/u-code/u-code"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="login data-v-07a163b6"><view class="orderdetail_header p30 data-v-07a163b6"><view class="data-v-07a163b6" style="{{'height:' + a}}"></view><view class="data-v-07a163b6" style="height:44px;display:flex;align-items:center"><up-icon wx:if="{{c}}" class="data-v-07a163b6" bindclick="{{b}}" u-i="07a163b6-0" bind:__l="__l" u-p="{{c}}"></up-icon></view></view><image class="login_bei data-v-07a163b6" src="{{d}}"></image><status-bar class="data-v-07a163b6" u-i="07a163b6-1" bind:__l="__l"/><view class="login_logo data-v-07a163b6"><image class="login_logo_img data-v-07a163b6" src="{{e}}"></image><view class="login_logo_tit data-v-07a163b6">欢迎来到星动能源</view></view><view class="data-v-07a163b6" style="margin-top:150rpx"><view class="data-v-07a163b6" style="margin-bottom:30rpx"><up-input wx:if="{{g}}" class="data-v-07a163b6" u-i="07a163b6-2" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-input></view><view class="data-v-07a163b6" style="margin-bottom:30rpx;display:flex;align-items:center"><up-input wx:if="{{i}}" class="data-v-07a163b6" u-i="07a163b6-3" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input><up-code wx:if="{{l}}" class="r data-v-07a163b6" u-r="uCode" bindchange="{{k}}" u-i="07a163b6-4" bind:__l="__l" u-p="{{l}}"></up-code><text class="data-v-07a163b6" bindtap="{{n}}" text="{{o}}" style="font-size:28rpx;color:#4874e5">{{m}}</text></view></view><view class="data-v-07a163b6" style="display:flex;justify-content:center;margin-top:80rpx"><view class="login_btn data-v-07a163b6" bindtap="{{p}}">确认</view></view></view>
|
||||
43
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.wxss
vendored
Normal file
43
unpackage/dist/dev/mp-weixin/pages/login/getBackAccout.wxss
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
.login.data-v-07a163b6 {
|
||||
padding: 0 60rpx;
|
||||
}
|
||||
.login_bei.data-v-07a163b6 {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 608rpx;
|
||||
height: 424rpx;
|
||||
}
|
||||
.login_logo.data-v-07a163b6 {
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.login_logo_img.data-v-07a163b6 {
|
||||
width: 152rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.login_logo_tit.data-v-07a163b6 {
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.login_btn.data-v-07a163b6 {
|
||||
width: 474rpx;
|
||||
height: 78rpx;
|
||||
background: #4874e5;
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.orderdetail_header.data-v-07a163b6 {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
92
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
92
unpackage/dist/dev/mp-weixin/pages/login/login.js
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
const store_index = require("../../store/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
(_easycom_up_icon2 + _easycom_statusBar2 + _easycom_up_input2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_statusBar + _easycom_up_input)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "login",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
common_vendor.ref("");
|
||||
let dataFrom = common_vendor.reactive({
|
||||
userName: "",
|
||||
passwd: "",
|
||||
uuid: "",
|
||||
captcha: ""
|
||||
});
|
||||
let back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
let getBackAccout = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "./getBackAccout"
|
||||
});
|
||||
};
|
||||
let toGetBack = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/getBack"
|
||||
});
|
||||
};
|
||||
let login = async () => {
|
||||
try {
|
||||
const { code } = await common_vendor.index.login();
|
||||
let _res = await api_api.loginApi(dataFrom);
|
||||
common_vendor.index.setStorageSync("token", _res.token);
|
||||
common_vendor.index.setStorageSync("user", _res);
|
||||
store_index.store.commit("setToken", _res.token);
|
||||
let saveOpenId = await api_api.saveOpenIdByWxCode({ loginCode: code });
|
||||
common_vendor.index.showToast({ title: "登录成功", icon: "none" });
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 200);
|
||||
} catch (err) {
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(common_vendor.unref(back)),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_assets._imports_0$1,
|
||||
e: common_vendor.o(($event) => common_vendor.unref(dataFrom).userName = $event),
|
||||
f: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的用户名",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).userName
|
||||
}),
|
||||
g: common_vendor.o(($event) => common_vendor.unref(dataFrom).passwd = $event),
|
||||
h: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).passwd
|
||||
}),
|
||||
i: common_vendor.o((...args) => common_vendor.unref(getBackAccout) && common_vendor.unref(getBackAccout)(...args)),
|
||||
j: common_vendor.o((...args) => common_vendor.unref(toGetBack) && common_vendor.unref(toGetBack)(...args)),
|
||||
k: common_vendor.o((...args) => common_vendor.unref(login) && common_vendor.unref(login)(...args))
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
9
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/login/login.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"status-bar": "../../components/statusBar/statusBar",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/login.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="login data-v-e4e4508d"><view class="orderdetail_header p30 data-v-e4e4508d"><view class="data-v-e4e4508d" style="{{'height:' + a}}"></view><view class="data-v-e4e4508d" style="height:44px;display:flex;align-items:center"><up-icon wx:if="{{c}}" class="data-v-e4e4508d" bindclick="{{b}}" u-i="e4e4508d-0" bind:__l="__l" u-p="{{c}}"></up-icon></view></view><image class="login_bei data-v-e4e4508d" src="{{d}}"></image><status-bar class="data-v-e4e4508d" u-i="e4e4508d-1" bind:__l="__l"/><view class="login_logo data-v-e4e4508d"><view class="login_logo_tit data-v-e4e4508d">欢迎来到充电桩运营系统</view></view><view class="data-v-e4e4508d" style="margin-top:150rpx"><view class="data-v-e4e4508d" style="margin-bottom:50rpx"><up-input wx:if="{{f}}" class="data-v-e4e4508d" u-i="e4e4508d-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"></up-input></view><view class="data-v-e4e4508d"><up-input wx:if="{{h}}" class="data-v-e4e4508d" u-i="e4e4508d-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></up-input></view></view><view class="data-v-e4e4508d" style="font-size:28rpx;color:#666;margin-top:20rpx;display:flex;align-items:center;justify-content:space-between"><view class="data-v-e4e4508d"> 忘记账号? <text class="data-v-e4e4508d" style="color:#4874e5" bindtap="{{i}}">找回用户名</text></view><view class="data-v-e4e4508d"><text class="data-v-e4e4508d" style="color:#4874e5" bindtap="{{j}}">忘记密码</text></view></view><view class="data-v-e4e4508d" style="display:flex;justify-content:center;margin-top:80rpx"><view class="login_btn data-v-e4e4508d" bindtap="{{k}}">登录</view></view></view>
|
||||
43
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
43
unpackage/dist/dev/mp-weixin/pages/login/login.wxss
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
.login.data-v-e4e4508d {
|
||||
padding: 0 60rpx;
|
||||
}
|
||||
.login_bei.data-v-e4e4508d {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 608rpx;
|
||||
height: 424rpx;
|
||||
}
|
||||
.login_logo.data-v-e4e4508d {
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.login_logo_img.data-v-e4e4508d {
|
||||
width: 152rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.login_logo_tit.data-v-e4e4508d {
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.login_btn.data-v-e4e4508d {
|
||||
width: 474rpx;
|
||||
height: 78rpx;
|
||||
background: #4874e5;
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.orderdetail_header.data-v-e4e4508d {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
185
unpackage/dist/dev/mp-weixin/pages/login/register.js
vendored
Normal file
185
unpackage/dist/dev/mp-weixin/pages/login/register.js
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
|
||||
const _easycom_up_code2 = common_vendor.resolveComponent("up-code");
|
||||
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
|
||||
(_easycom_up_icon2 + _easycom_statusBar2 + _easycom_up_input2 + _easycom_up_code2 + _easycom_up_checkbox2)();
|
||||
}
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
|
||||
const _easycom_up_code = () => "../../uni_modules/uview-plus/components/u-code/u-code.js";
|
||||
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_icon + _easycom_statusBar + _easycom_up_input + _easycom_up_code + _easycom_up_checkbox)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "register",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight + "px";
|
||||
let tips = common_vendor.ref("");
|
||||
let uCode = common_vendor.ref(null);
|
||||
common_vendor.ref("");
|
||||
let dataFrom = common_vendor.reactive({
|
||||
userName: "",
|
||||
passwd: "",
|
||||
shareCode: "",
|
||||
phone: "",
|
||||
platform: 1,
|
||||
smsCode: "",
|
||||
confirmPasswd: ""
|
||||
});
|
||||
let xieyi = common_vendor.ref(false);
|
||||
common_vendor.onLoad(() => {
|
||||
const invite_code = common_vendor.index.getStorageSync("invite_code");
|
||||
if (invite_code) {
|
||||
dataFrom.shareCode = invite_code;
|
||||
}
|
||||
});
|
||||
let changeChex = (e) => {
|
||||
xieyi.value = e;
|
||||
};
|
||||
let toLogin = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
let codeChange2 = (text) => {
|
||||
tips.value = text;
|
||||
};
|
||||
let getCode2 = () => {
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (uCode.value.canGetCode) {
|
||||
common_vendor.index.showLoading({
|
||||
title: "正在获取验证码"
|
||||
});
|
||||
api_api.smsCode({
|
||||
phone: dataFrom.phone
|
||||
}).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.$u.toast("验证码已发送");
|
||||
uCode.value.start();
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.$u.toast("倒计时结束后再发送");
|
||||
}
|
||||
};
|
||||
let submit = async () => {
|
||||
if (!xieyi.value)
|
||||
return common_vendor.index.showToast({ title: "请先阅读并勾选隐私政策和用户注册服务协议", icon: "none" });
|
||||
if (!dataFrom.userName)
|
||||
return common_vendor.index.showToast({ title: "请输入用户名", icon: "none" });
|
||||
if (!dataFrom.phone)
|
||||
return common_vendor.index.showToast({ title: "请输入手机号", icon: "none" });
|
||||
if (dataFrom.phone.length != 11)
|
||||
return common_vendor.index.showToast({ title: "请输入正确的手机号", icon: "none" });
|
||||
if (!dataFrom.smsCode)
|
||||
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
|
||||
if (!dataFrom.shareCode)
|
||||
return common_vendor.index.showToast({ title: "请输入邀请码", icon: "none" });
|
||||
if (!dataFrom.passwd)
|
||||
return common_vendor.index.showToast({ title: "请输入密码", icon: "none" });
|
||||
if (!dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "请再次输入密码", icon: "none" });
|
||||
if (dataFrom.passwd != dataFrom.confirmPasswd)
|
||||
return common_vendor.index.showToast({ title: "两次密码输入不一致", icon: "none" });
|
||||
await api_api.registerApi(dataFrom);
|
||||
common_vendor.index.showToast({ title: "注册成功", icon: "none" });
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack();
|
||||
}, 200);
|
||||
};
|
||||
let back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: statusBarHeight,
|
||||
b: common_vendor.o(common_vendor.unref(back)),
|
||||
c: common_vendor.p({
|
||||
name: "arrow-left",
|
||||
bold: true,
|
||||
color: "#000"
|
||||
}),
|
||||
d: common_assets._imports_0$1,
|
||||
e: common_assets._imports_1$1,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(dataFrom).userName = $event),
|
||||
g: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的用户名",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).userName
|
||||
}),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(dataFrom).phone = $event),
|
||||
i: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的手机号",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).phone
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(dataFrom).smsCode = $event),
|
||||
k: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入验证码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).smsCode
|
||||
}),
|
||||
l: common_vendor.sr(uCode, "838b72c9-5", {
|
||||
"k": "uCode"
|
||||
}),
|
||||
m: common_vendor.o(common_vendor.unref(codeChange2)),
|
||||
n: common_vendor.p({
|
||||
["keep-running"]: true,
|
||||
["start-text"]: "点我获取验证码"
|
||||
}),
|
||||
o: common_vendor.t(common_vendor.unref(tips)),
|
||||
p: common_vendor.o((...args) => common_vendor.unref(getCode2) && common_vendor.unref(getCode2)(...args)),
|
||||
q: common_vendor.unref(tips),
|
||||
r: common_vendor.o(($event) => common_vendor.unref(dataFrom).shareCode = $event),
|
||||
s: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
placeholder: "请输入您的邀请码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).shareCode
|
||||
}),
|
||||
t: common_vendor.o(($event) => common_vendor.unref(dataFrom).passwd = $event),
|
||||
v: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).passwd
|
||||
}),
|
||||
w: common_vendor.o(($event) => common_vendor.unref(dataFrom).confirmPasswd = $event),
|
||||
x: common_vendor.p({
|
||||
fontSize: "30rpx",
|
||||
type: "password",
|
||||
placeholder: "请再次输入您的密码",
|
||||
border: "bottom",
|
||||
clearable: true,
|
||||
modelValue: common_vendor.unref(dataFrom).confirmPasswd
|
||||
}),
|
||||
y: common_vendor.o((...args) => common_vendor.unref(toLogin) && common_vendor.unref(toLogin)(...args)),
|
||||
z: common_vendor.o((...args) => common_vendor.unref(submit) && common_vendor.unref(submit)(...args)),
|
||||
A: common_vendor.o(common_vendor.unref(changeChex)),
|
||||
B: common_vendor.p({
|
||||
customStyle: {
|
||||
marginRight: "15rpx",
|
||||
marginBotton: 0
|
||||
}
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-838b72c9"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
11
unpackage/dist/dev/mp-weixin/pages/login/register.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/login/register.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"status-bar": "../../components/statusBar/statusBar",
|
||||
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
|
||||
"up-code": "../../uni_modules/uview-plus/components/u-code/u-code",
|
||||
"up-checkbox": "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/register.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/register.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="login data-v-838b72c9"><view class="orderdetail_header p30 data-v-838b72c9"><view class="data-v-838b72c9" style="{{'height:' + a}}"></view><view class="data-v-838b72c9" style="height:44px;display:flex;align-items:center"><up-icon wx:if="{{c}}" class="data-v-838b72c9" bindclick="{{b}}" u-i="838b72c9-0" bind:__l="__l" u-p="{{c}}"></up-icon></view></view><image class="login_bei data-v-838b72c9" src="{{d}}"></image><view class="data-v-838b72c9" style="padding:0 60rpx"><status-bar class="data-v-838b72c9" u-i="838b72c9-1" bind:__l="__l"/><view class="login_logo data-v-838b72c9"><image class="login_logo_img data-v-838b72c9" src="{{e}}"></image><view class="login_logo_tit data-v-838b72c9">欢迎来到星动能源</view></view><view class="data-v-838b72c9" style="margin-top:100rpx"><view class="data-v-838b72c9"><up-input wx:if="{{g}}" class="data-v-838b72c9" u-i="838b72c9-2" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-input></view><view class="data-v-838b72c9" style="font-size:26rpx;color:#ff9900;margin:10rpx 0 10rpx;padding-left:9px">用户名由字母或数字组成,长度6-32</view><view class="data-v-838b72c9" style="margin-bottom:30rpx"><up-input wx:if="{{i}}" class="data-v-838b72c9" u-i="838b72c9-3" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input></view><view class="data-v-838b72c9" style="margin-bottom:30rpx;display:flex;align-items:center"><up-input wx:if="{{k}}" class="data-v-838b72c9" u-i="838b72c9-4" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></up-input><up-code wx:if="{{n}}" class="r data-v-838b72c9" u-r="uCode" bindchange="{{m}}" u-i="838b72c9-5" bind:__l="__l" u-p="{{n}}"></up-code><text class="data-v-838b72c9" bindtap="{{p}}" text="{{q}}" style="font-size:28rpx;color:#4874e5">{{o}}</text></view><view class="data-v-838b72c9" style="margin-bottom:30rpx"><up-input wx:if="{{s}}" class="data-v-838b72c9" u-i="838b72c9-6" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"></up-input></view><view class="data-v-838b72c9"><up-input wx:if="{{v}}" class="data-v-838b72c9" u-i="838b72c9-7" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"></up-input></view><view class="data-v-838b72c9" style="font-size:26rpx;color:#ff9900;margin:10rpx 0 10rpx;padding-left:9px">密码必须包含字母、数字长度8-32</view><view class="data-v-838b72c9" style="margin-bottom:30rpx"><up-input wx:if="{{x}}" class="data-v-838b72c9" u-i="838b72c9-8" bind:__l="__l" bindupdateModelValue="{{w}}" u-p="{{x}}"></up-input></view></view><view class="data-v-838b72c9" style="font-size:28rpx;color:#666;margin-top:20rpx"> 已有账号? <text class="data-v-838b72c9" style="color:#4874e5" bindtap="{{y}}">立即登录</text></view><view class="data-v-838b72c9" style="display:flex;justify-content:center;margin-top:80rpx"><view class="login_btn data-v-838b72c9" bindtap="{{z}}">注册</view></view></view><view class="data-v-838b72c9" style="display:flex;flex-wrap:wrap;justify-content:center;margin-top:20rpx;font-size:26rpx;align-items:center"><up-checkbox wx:if="{{B}}" class="data-v-838b72c9" bindchange="{{A}}" u-i="838b72c9-9" bind:__l="__l" u-p="{{B}}"></up-checkbox> 已阅读并同意 <navigator class="data-v-838b72c9" url="/pages/agreement/agreement?id=9" style="color:#4874e5">《用户注册服务协议》</navigator> 和 <navigator class="data-v-838b72c9" url="/pages/agreement/agreement?id=10" style="color:#4874e5">《隐私政策》</navigator></view><view class="data-v-838b72c9" style="height:150rpx"></view></view>
|
||||
40
unpackage/dist/dev/mp-weixin/pages/login/register.wxss
vendored
Normal file
40
unpackage/dist/dev/mp-weixin/pages/login/register.wxss
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
.login_bei.data-v-838b72c9 {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 608rpx;
|
||||
height: 424rpx;
|
||||
}
|
||||
.login_logo.data-v-838b72c9 {
|
||||
margin-top: 150rpx;
|
||||
}
|
||||
.login_logo_img.data-v-838b72c9 {
|
||||
width: 152rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 28rpx 28rpx 28rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.login_logo_tit.data-v-838b72c9 {
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.login_btn.data-v-838b72c9 {
|
||||
width: 474rpx;
|
||||
height: 78rpx;
|
||||
background: #4874e5;
|
||||
border-radius: 54rpx 54rpx 54rpx 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.orderdetail_header.data-v-838b72c9 {
|
||||
width: 750rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
Reference in New Issue
Block a user