添加新文件
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_auth = require("../../utils/auth.js");
|
||||
const Header = () => "../../components/header.js";
|
||||
const _sfc_main = {
|
||||
components: { Header },
|
||||
data() {
|
||||
return {
|
||||
userData: {}
|
||||
// 当前登录对象
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.userData = utils_auth.getStorageFun(utils_auth.USER_DATA);
|
||||
},
|
||||
methods: {
|
||||
// 退出登录
|
||||
loginOutFun() {
|
||||
utils_auth.clear();
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
},
|
||||
cancelAccount() {
|
||||
utils_auth.clear();
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
});
|
||||
},
|
||||
jumpInfo(type) {
|
||||
if (type === "address") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_address/mine_address"
|
||||
});
|
||||
} else if (type === "aboutUs") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_about_us/mine_about_us"
|
||||
});
|
||||
} else if (type === "userAgreement") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_user_agreement/mine_user_agreement"
|
||||
});
|
||||
} else if (type === "privacyAgreement") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_privacy_agreement/mine_privacy_agreement"
|
||||
});
|
||||
} else if (type === "productAgreement") {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_product_agreement/mine_product_agreement"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _component_Header = common_vendor.resolveComponent("Header");
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
(_component_Header + _easycom_up_image2)();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
if (!Math) {
|
||||
_easycom_up_image();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftTitle: _ctx.$t("mine.settings.title"),
|
||||
["left-path-type"]: "switchTab",
|
||||
leftPath: "/pages/mine/mine"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
src: "/static/logo_y.png",
|
||||
shape: "circle",
|
||||
width: "60",
|
||||
height: "60",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t($data.userData.name || "德商汇用户"),
|
||||
d: common_vendor.t($data.userData.inviteCode),
|
||||
e: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
f: common_vendor.o(($event) => $options.jumpInfo("address")),
|
||||
g: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
h: common_vendor.o(($event) => $options.jumpInfo("userAgreement")),
|
||||
i: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
j: common_vendor.o(($event) => $options.jumpInfo("privacyAgreement")),
|
||||
k: common_vendor.p({
|
||||
src: "/static/common/right_x.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
l: common_vendor.o(($event) => $options.jumpInfo("productAgreement")),
|
||||
m: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
n: common_vendor.o(($event) => $options.jumpInfo("aboutUs")),
|
||||
o: common_vendor.o((...args) => $options.loginOutFun && $options.loginOutFun(...args)),
|
||||
p: common_vendor.o((...args) => $options.cancelAccount && $options.cancelAccount(...args))
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_settings/mine_settings.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"header": "../../components/header",
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="mine_setting"><header wx:if="{{a}}" u-i="1bcbce2a-0" bind:__l="__l" u-p="{{a}}"/><view class="mine_setting_content"><view class="setting_comm"><view class="header_user"><view class="mine_data"><up-image wx:if="{{b}}" u-i="1bcbce2a-1" bind:__l="__l" u-p="{{b}}"></up-image><view class="mine_info"><view class="mine_info_name">{{c}}</view><view class="mine_info_id">邀请码:{{d}}</view></view></view></view><view class="header_fg"></view><view class="item_comm" bindtap="{{f}}"><view>地址管理</view><up-image wx:if="{{e}}" u-i="1bcbce2a-2" bind:__l="__l" u-p="{{e}}"></up-image></view></view><view class="setting_comm"><view class="item_comm" bindtap="{{h}}"><view>用户协议</view><up-image wx:if="{{g}}" u-i="1bcbce2a-3" bind:__l="__l" u-p="{{g}}"></up-image></view><view class="header_fg"></view><view class="item_comm" bindtap="{{j}}"><view>隐私协议</view><up-image wx:if="{{i}}" u-i="1bcbce2a-4" bind:__l="__l" u-p="{{i}}"></up-image></view><view class="header_fg"></view><view class="item_comm" bindtap="{{l}}"><view>售后保障协议</view><up-image wx:if="{{k}}" u-i="1bcbce2a-5" bind:__l="__l" u-p="{{k}}"></up-image></view><view class="header_fg"></view><view class="item_comm" bindtap="{{n}}"><view>关于我们</view><up-image wx:if="{{m}}" u-i="1bcbce2a-6" bind:__l="__l" u-p="{{m}}"></up-image></view></view><view class="login_out_warp" bindtap="{{o}}"> 退出登录 </view><view class="cancel_but" bindtap="{{p}}"> 注销账号 </view></view></view>
|
||||
@@ -0,0 +1,98 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.mine_setting {
|
||||
background-color: #F5F5F5;
|
||||
height: calc(100% - 60rpx);
|
||||
}
|
||||
.mine_setting .mine_setting_content {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.mine_setting .setting_comm {
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.mine_setting .mine_data {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.mine_setting .mine_info_not_login {
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #111111;
|
||||
}
|
||||
.mine_setting .mine_info {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.mine_setting .mine_info_name {
|
||||
font-weight: bold;
|
||||
font-size: 40rpx;
|
||||
color: #111111;
|
||||
display: flex;
|
||||
}
|
||||
.mine_setting .mine_info_id {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.mine_setting .header_user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.mine_setting .header_fg {
|
||||
width: 100%;
|
||||
height: 2rpx;
|
||||
background: #E7E7E7;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.mine_setting .item_comm {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.login_out_warp {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
background-color: #FF7C41;
|
||||
padding: 20rpx;
|
||||
width: calc(100% - 40rpx);
|
||||
border-radius: 10rpx;
|
||||
margin: 140rpx 0 0rpx;
|
||||
}
|
||||
.cancel_but {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
width: calc(100% - 40rpx);
|
||||
margin-top: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #999999;
|
||||
padding: 20rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user