添加新文件

This commit is contained in:
hejiangming
2025-05-07 10:09:55 +08:00
parent 007b002b81
commit 7e7a096151
776 changed files with 92603 additions and 0 deletions
@@ -0,0 +1,195 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_index = require("../../utils/index.js");
const api_common = require("../../api/common.js");
const _sfc_main = {
data() {
return {
localAppVersonName: null,
localAppVerson: null,
isNewVersion: false,
// 是否需要跟新
platformType: null,
// 当前版本号
updateApkObj: {},
// 后台数据
bannerShow: false,
bannerPercentageShow: false,
// 是否显示进度条
bannerPercentage: 0
// 进度条
};
},
mounted() {
const localAppVersonName = common_vendor.index.getStorageSync("version");
if (localAppVersonName) {
this.localAppVersonName = localAppVersonName;
}
const localAppVerson = common_vendor.index.getStorageSync("versionCode");
if (localAppVerson) {
this.localAppVerson = localAppVerson;
}
common_vendor.index.getStorageSync("platform");
},
methods: {
/**
* 检查最新的版本
*/
async checkVersion() {
const params = {
terminal: this.platformType,
versionCode: this.localAppVerson
};
const res = await api_common.checkAppVersion(params);
if (res && res.bizcode === 100) {
const data = res.data || {};
if (data && Object.keys(data).length !== 0 && utils_index.comparisonVersionHandler(this.localAppVerson, data.versionCode)) {
this.isNewVersion = true;
}
this.updateApkObj = data;
}
},
async getNewVersion() {
const params = {
terminal: this.platformType,
versionCode: this.localAppVerson
};
const res = await api_common.checkAppVersion(params);
if (res && res.bizcode === 100) {
const data = res.data || {};
if (data && Object.keys(data).length !== 0 && utils_index.comparisonVersionHandler(this.localAppVerson, data.versionCode)) {
this.updateApkObj = data;
this.isNewVersion = true;
this.bannerShow = true;
} else {
this.$refs.uToastRef.show({
type: "sesses",
message: "当前已为最新版本~"
});
}
}
},
// 安装
goUpdate(updateApkObj, platformType) {
const self = this;
if (platformType === "ANDROID") {
var dtask = plus.downloader.createDownload(updateApkObj.downloadUrl, {}, function(d, status) {
if (status == 200) {
plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), { force: true }, function(resp) {
common_vendor.index.setStorageSync("versionUpdateTime", common_vendor.dayjs().valueOf());
plus.runtime.restart();
}, function(error) {
common_vendor.index.__f__("log", "at pages/mine_about_us/mine_about_us.vue:140", "error", error);
common_vendor.index.showToast({
title: error.message,
mask: false,
duration: 1500
});
});
} else {
common_vendor.index.showToast({
title: "更新失败",
mask: false,
duration: 1500
});
}
});
try {
dtask.start();
let prg = 0;
self.bannerPercentageShow = true;
dtask.addEventListener("statechanged", function(task, status) {
switch (task.state) {
case 1:
break;
case 2:
break;
case 3:
prg = parseInt(parseFloat(task.downloadedSize) / parseFloat(task.totalSize) * 100);
common_vendor.index.__f__("log", "at pages/mine_about_us/mine_about_us.vue:168", "prg", +prg);
self.bannerPercentage = prg;
break;
case 4:
plus.nativeUI.closeWaiting();
self.bannerShow = false;
break;
}
});
} catch (err) {
common_vendor.index.__f__("log", "at pages/mine_about_us/mine_about_us.vue:179", "更新失败-03err", err);
plus.nativeUI.closeWaiting();
common_vendor.index.showToast({
title: "更新失败-03",
mask: false,
duration: 1500
});
}
} else if (platformType === "IOS") {
plus.runtime.openURL(updateApkObj.downloadUrl);
}
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_line_progress2 = common_vendor.resolveComponent("up-line-progress");
const _easycom_up_overlay2 = common_vendor.resolveComponent("up-overlay");
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
(_easycom_up_image2 + _easycom_up_line_progress2 + _easycom_up_overlay2 + _easycom_up_toast2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_line_progress = () => "../../uni_modules/uview-plus/components/u-line-progress/u-line-progress.js";
const _easycom_up_overlay = () => "../../uni_modules/uview-plus/components/u-overlay/u-overlay.js";
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
if (!Math) {
(_easycom_up_image + _easycom_up_line_progress + _easycom_up_overlay + _easycom_up_toast)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
src: "/static/logo.png",
width: "100",
height: "100",
bgColor: "#f1f6ff00",
shape: "square",
radius: "10"
}),
b: $data.isNewVersion
}, $data.isNewVersion ? {} : {}, {
c: common_vendor.p({
src: "/static/common/right.png",
width: "16",
height: "16",
bgColor: "#f1f6ff00"
}),
d: common_vendor.o((...args) => $options.getNewVersion && $options.getNewVersion(...args)),
e: common_vendor.t($data.localAppVersonName),
f: common_vendor.t($data.localAppVerson),
g: common_vendor.t($data.updateApkObj.versionCode),
h: common_vendor.t($data.updateApkObj.content),
i: !$data.bannerPercentageShow
}, !$data.bannerPercentageShow ? common_vendor.e({
j: common_vendor.o(($event) => $options.goUpdate($data.updateApkObj, $data.platformType)),
k: !$data.updateApkObj.isForce
}, !$data.updateApkObj.isForce ? {
l: common_vendor.o(($event) => {
$data.bannerShow = false;
})
} : {}) : {
m: common_vendor.p({
percentage: $data.bannerPercentage,
activeColor: "#009A4F"
}),
n: common_vendor.t($data.bannerPercentage)
}, {
o: common_vendor.o(() => {
}),
p: common_vendor.p({
show: $data.bannerShow
}),
q: common_vendor.sr("uToastRef", "52ca5205-4")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_about_us/mine_about_us.js.map
@@ -0,0 +1,13 @@
{
"navigationBarTitleText": "关于我们",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationStyle": "default",
"usingComponents": {
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-line-progress": "../../uni_modules/uview-plus/components/u-line-progress/u-line-progress",
"up-overlay": "../../uni_modules/uview-plus/components/u-overlay/u-overlay",
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
}
}
@@ -0,0 +1 @@
<view class="mine_about_us"><view class="about_us_image"><up-image wx:if="{{a}}" u-i="52ca5205-0" bind:__l="__l" u-p="{{a}}"></up-image><view class="msg_">德商汇优品</view></view><view class="content_"> 德商汇优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。 </view><view class="version_"><view class="version_fg"></view><view class="version_item_" bindtap="{{d}}"><view class="title_">检查版本</view><view class="value_ check_version"><view wx:if="{{b}}" class="check_version_msg">发现新版本</view><view style="margin-top:14rpx"><up-image wx:if="{{c}}" u-i="52ca5205-1" bind:__l="__l" u-p="{{c}}"/></view></view></view><view class="version_fg"></view><view class="version_item_"><view class="title_">当前版本</view><view class="value_">v{{e}}.{{f}}</view></view></view><up-overlay wx:if="{{p}}" u-s="{{['d']}}" u-i="52ca5205-2" bind:__l="__l" u-p="{{p}}"><view class="up_content" catchtap="{{o}}"><view class="uni-banner"><view class="banner_box"><view class="title_">发现新版本</view><view class="version_"><view class="version_item">V{{g}}</view></view><view class="conter">{{h}}</view><view wx:if="{{i}}" class="banner_foot"><button bindtap="{{j}}" class="banner_foot_button">立即更新</button><view wx:if="{{k}}" bindtap="{{l}}" class="banner_foot_button_no">暂不更新</view></view><view wx:else><up-line-progress wx:if="{{m}}" u-i="52ca5205-3,52ca5205-2" bind:__l="__l" u-p="{{m}}"></up-line-progress><view class="banner_loading_msg"> 更新中{{n}}% </view></view></view></view></view></up-overlay><up-toast class="r" u-r="uToastRef" u-i="52ca5205-4" bind:__l="__l"></up-toast></view>
@@ -0,0 +1,71 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.mine_about_us {
background-color: #F5F5F5;
padding: 30rpx;
height: calc(100% - 60rpx);
overflow: auto;
}
.mine_about_us .about_us_image {
display: grid;
justify-content: center;
margin-top: 100rpx;
}
.mine_about_us .about_us_image .msg_ {
text-align: center;
margin-top: 20rpx;
font-size: 31rpx;
color: rgba(0, 0, 0, 0.85);
}
.mine_about_us .content_ {
padding: 60rpx 0;
}
.mine_about_us .version_ {
margin-top: 20rpx;
}
.mine_about_us .version_ .version_fg {
width: 100%;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.16);
}
.mine_about_us .version_ .version_item_ {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
line-height: 80rpx;
}
.mine_about_us .version_ .title_ {
color: rgba(0, 0, 0, 0.85);
}
.mine_about_us .version_ .value_ {
color: rgba(0, 0, 0, 0.26);
}
.mine_about_us .version_ .check_version {
display: flex;
align-items: center;
}
.mine_about_us .version_ .check_version_msg {
color: #FF7C41;
}