This commit is contained in:
zpc 2025-06-16 16:02:01 +08:00
parent caa18dffcb
commit 2442708d8e
51 changed files with 612 additions and 431 deletions

View File

@ -76,7 +76,7 @@ export default {
//
navTo(item) {
this.$c.navTo(item);
this.$common.navTo(item);
}

View File

@ -154,7 +154,7 @@ export default {
*/
async getRule(id, title = "") {
try {
const res = await this.$c.getRule(id, true);
const res = await this.$common.getRule(id, true);
if (res && res.status === 1) {
this.open({
title: title || "平台消费规则",

View File

@ -92,7 +92,7 @@
title: `快来领取${userInfo.nickname}分享的${this.ruleData.num}赏币的${this.ruleData.title}`,
imageUrl: this.ruleData.level_img,
path: '/pages/users/index' +
this.$c.qs({
this.$common.qs({
ou_coupon_id: this.ruleData.id
})
}
@ -105,7 +105,7 @@
}
var data = this.getData();
console.log(data);
this.$c.$fenxiang(data.title, '', data.path, data.imageUrl);
this.$common.$fenxiang(data.title, '', data.path, data.imageUrl);
},
open(opt) {
this.ruleData = opt

View File

@ -248,7 +248,7 @@ export default {
//
if (popName === 'playPop') {
this.$c.getRule(14).then(res => {
this.$common.getRule(14).then(res => {
if (res.status == 1) {
this.playRuleData = res.data;
}

View File

@ -77,7 +77,7 @@ export default {
methods: {
BallClick(item) {
if (item.type == 2) {
this.$c.nav(item.link_url);
this.$common.nav(item.link_url);
return;
}
if (item.type == 1) {

View File

@ -82,11 +82,11 @@
我已满18岁,阅读并同意
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=4' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=5' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>

View File

@ -135,10 +135,10 @@
</view>
我已满18岁,阅读并同意
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=4' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=5' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>
@ -252,7 +252,7 @@ export default {
if (this.pageData != null && this.pageData.limitInfo != null) {
let limitInfo = this.pageData.limitInfo;
if (this.pageData.limitInfo.coupon_limit > 0 && limitInfo.user_coupon_remaining <= 0) {
this.$c.msg("今日使用优惠卷已达到上限")
this.$common.msg("今日使用优惠卷已达到上限")
return;
}
}

View File

@ -10,7 +10,7 @@
<view class="_priv_pop_bd_title">隐私保护指引</view>
<view class="_priv_pop_bd_content">
感谢选择我们的产品,我们非常重视您的个人信息安全和隐私保护.根据最新法律要求,使用我们的产品前,请仔细阅读
<text @click="$c.to({ url: '/pages/guize/guize?type=5' })">
<text @click="$common.to({ url: '/pages/guize/guize?type=5' })">
{{ $config.getAppSetting("app_name") }}隐私保护指引
</text>
,以便我们向您提供更优质的服务!

View File

@ -58,7 +58,7 @@ export default {
}) {
if (!show) {
if (this.todayHide) {
uni.setStorageSync('_last_notice_date', this.$c.getDateTime())
uni.setStorageSync('_last_notice_date', this.$common.getDateTime())
}
}
},
@ -76,7 +76,7 @@ export default {
async getRule(id, title = '') {
this.is_image_optimizer = false;
this.images = [];
let { status, data, msg, is_image_optimizer } = await this.$c.getRule(id, true)
let { status, data, msg, is_image_optimizer } = await this.$common.getRule(id, true)
if (status) {
if (is_image_optimizer != null && is_image_optimizer == 1) {
console.log('开启图片优化');
@ -96,7 +96,7 @@ export default {
content: data
})
} else {
this.$c.toast(msg)
this.$common.toast(msg)
}
}
}

10
main.js
View File

@ -25,8 +25,6 @@ Vue.prototype.$z_img2 = EnvConfig.imageUrl + '/zcq/'
Vue.prototype.$img = url => EnvConfig.imageBaseUrl + url
Vue.prototype.$img1 = url => EnvConfig.iconBaseUrl + url
Vue.prototype.$sys = () => uni.getSystemInfoSync()
Vue.prototype.$loginPage = EnvConfig.loginPage
Vue.prototype.$wxloginPage = EnvConfig.wxLoginUrl
Vue.prototype.$platform = platform;
// 公共方法
Vue.prototype.gotoPage = gotopage
@ -34,7 +32,7 @@ Vue.prototype.gotoPage = gotopage
Vue.prototype.$customRouter = router
Vue.prototype.$navigateTo = router.navigateTo
Vue.prototype.$noMultipleClicks = common.noMultipleClicks
Vue.prototype.$c = common
Vue.prototype.$common = common;
// 全局配置管理器
Vue.prototype.$config = ConfigManager
// 全局请求方法
@ -66,11 +64,5 @@ app.globalData = {
siteBaseUrl: EnvConfig.apiBaseUrl
}
// // 应用启动时加载全局配置
// ConfigManager.init().then(config => {
// console.log('全局配置加载完成')
// }).catch(err => {
// console.error('全局配置加载失败', err)
// })
app.$mount()

View File

@ -1,207 +1,207 @@
{
"name" : "友达赏王者",
"appid" : "__UNI__2E6CB39",
"description" : "",
"versionName" : "1.0.2",
"versionCode" : 102,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"optimization" : {
"js" : {
"obfuscation" : true, //
"compress" : true //
}
},
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"Payment" : {},
"Camera" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"schemes" : "youdas"
},
/* ios */
"ios" : {
"dSYMs" : false,
"urltypes" : "youdas",
"idfa" : false,
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "为了设置您的个人头像,我们需要访问您的照片图库。这将允许您从相册中选择现有照片作为头像。我们只会在您主动选择更换头像时访问照片,未经您的许可绝不会查看您的其他照片。",
"NSPhotoLibraryAddUsageDescription" : "我们需要访问权限以便将生成的海报保存到您的相册中。这样您就可以方便地在照片应用中查看和分享这些海报。我们只会在您明确选择保存时才将图片存入相册。"
}
},
/* SDK */
"sdkConfigs" : {
"ad" : {},
"oauth" : {
"weixin" : {
"appid" : "wx3dcc897ef3f95446",
"appsecret" : "57b0a56910bc0a1625ddf3210585de1a",
"UniversalLinks" : "https://help.wechat.com/tq/"
},
"apple" : {}
},
"payment" : {
"alipay" : {
"__platform__" : [ "ios", "android" ]
}
},
"share" : {
"weixin" : {
"appid" : "wx3dcc897ef3f95446",
"UniversalLinks" : "https://help.wechat.com/tq/"
}
},
"push" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"androidStyle" : "common",
"android" : {
"hdpi" : "C:/Users/Administrator/Desktop/imgs/dealer_bg.png",
"xhdpi" : "C:/Users/Administrator/Desktop/imgs/dealer_bg.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/imgs/dealer_bg.png"
},
"useOriginalMsgbox" : true
}
},
"uniStatistics" : {
"enable" : false
},
"nvueCompiler" : "uni-app"
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx683d8a8a499d7ec6",
"setting" : {
"urlCheck" : false,
"es6" : false,
"postcss" : true,
"minified" : true
},
"usingComponents" : true,
"uniStatistics" : {
"enable" : false
},
"requiredPrivateInfos" : [ "chooseAddress" ]
},
"mp-alipay" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : false
}
},
"mp-baidu" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : false
}
},
"mp-toutiao" : {
"usingComponents" : true,
"uniStatistics" : {
"enable" : false
},
"setting" : {
"es6" : true,
"urlCheck" : false
},
"appid" : "tta5ead3573ad6d9d601"
},
"uniStatistics" : {
"enable" : false
},
"h5" : {
"router" : {
"mode" : "history",
"base" : ""
},
"uniStatistics" : {
"enable" : false
},
"devServer" : {
"https" : false
},
"template" : "index.html"
},
"vueVersion" : "2",
"mp-kuaishou" : {
"uniStatistics" : {
"enable" : false
}
},
"mp-qq" : {
"uniStatistics" : {
"enable" : false
}
},
"fallbackLocale" : "zh-Hans"
}
"name": "友达赏王者",
"appid": "__UNI__2E6CB39",
"description": "",
"versionName": "1.0.2",
"versionCode": 102,
"transformPx": false,
/* 5+App */
"app-plus": {
"optimization": {
"js": {
"obfuscation": true, //
"compress": true //
}
},
"compatible": {
"ignoreVersion": true //trueHBuilderX1.9.0
},
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {
"Payment": {},
"Camera": {}
},
/* */
"distribute": {
/* android */
"android": {
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"schemes": "youdas"
},
/* ios */
"ios": {
"dSYMs": false,
"urltypes": "youdas",
"idfa": false,
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "为了设置您的个人头像,我们需要访问您的照片图库。这将允许您从相册中选择现有照片作为头像。我们只会在您主动选择更换头像时访问照片,未经您的许可绝不会查看您的其他照片。",
"NSPhotoLibraryAddUsageDescription": "我们需要访问权限以便将生成的海报保存到您的相册中。这样您就可以方便地在照片应用中查看和分享这些海报。我们只会在您明确选择保存时才将图片存入相册。"
}
},
/* SDK */
"sdkConfigs": {
"ad": {},
"oauth": {
"weixin": {
"appid": "wx3dcc897ef3f95446",
"appsecret": "57b0a56910bc0a1625ddf3210585de1a",
"UniversalLinks": "https://help.wechat.com/tq/"
},
"apple": {}
},
"payment": {
"alipay": {
"__platform__": ["ios", "android"]
}
},
"share": {
"weixin": {
"appid": "wx3dcc897ef3f95446",
"UniversalLinks": "https://help.wechat.com/tq/"
}
},
"push": {}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"androidStyle": "common",
"android": {
"hdpi": "C:/Users/Administrator/Desktop/imgs/dealer_bg.png",
"xhdpi": "C:/Users/Administrator/Desktop/imgs/dealer_bg.png",
"xxhdpi": "C:/Users/Administrator/Desktop/imgs/dealer_bg.png"
},
"useOriginalMsgbox": true
}
},
"uniStatistics": {
"enable": false
},
"nvueCompiler": "uni-app"
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wx683d8a8a499d7ec6",
"setting": {
"urlCheck": false,
"es6": false,
"postcss": true,
"minified": true
},
"usingComponents": true,
"uniStatistics": {
"enable": false
},
"requiredPrivateInfos": ["chooseAddress"]
},
"mp-alipay": {
"usingComponents": true,
"uniStatistics": {
"enable": false
}
},
"mp-baidu": {
"usingComponents": true,
"uniStatistics": {
"enable": false
}
},
"mp-toutiao": {
"usingComponents": true,
"uniStatistics": {
"enable": false
},
"setting": {
"es6": true,
"urlCheck": false
},
"appid": "tta5ead3573ad6d9d601"
},
"uniStatistics": {
"enable": false
},
"h5": {
"router": {
"mode": "history",
"base": ""
},
"uniStatistics": {
"enable": false
},
"devServer": {
"https": false
},
"template": "index.html"
},
"vueVersion": "2",
"mp-kuaishou": {
"uniStatistics": {
"enable": false
}
},
"mp-qq": {
"uniStatistics": {
"enable": false
}
},
"fallbackLocale": "zh-Hans"
}

View File

@ -405,14 +405,14 @@
"list": [
{
"pagePath": "pages/main/index",
"iconPath": "static/tab/n1.png",
"selectedIconPath": "static/tab/c1.png",
"iconPath": "static/tab/home-n.png",
"selectedIconPath": "static/tab/home.png",
"text": "首页"
},
{
"pagePath": "pages/shangcheng/index",
"iconPath": "static/tab/n5.png",
"selectedIconPath": "static/tab/c5.png",
"iconPath": "static/tab/ch-n.png",
"selectedIconPath": "static/tab/ch.png",
"text": "商城"
},
{

View File

@ -3,7 +3,7 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true"
:border="false" @clickLeft="$c.back">
:border="false" @clickLeft="$common.back">
<view style="font-size: 34rpx; width: 100%; display: flex; justify-content: center; align-items: center;">
积分赏
</view>
@ -57,7 +57,7 @@ export default {
},
methods: {
items(item) {
this.$c.to({
this.$common.to({
url: '/pages/main/detail',
query: {
goods_id: item.id,

View File

@ -23,7 +23,7 @@
<scroll-view scroll-y="true" class="benefits-scroll">
<template v-if="ongoingData.length > 0">
<view v-for="(item, index) in ongoingData" :key="index" class="benefit-item relative"
@click="$c.to({ url: '/pages/infinite/bonus_house_details?goods_id=' + item.id })">
@click="$common.to({ url: '/pages/infinite/bonus_house_details?goods_id=' + item.id })">
<text class="benefit-title">{{ item.title }}</text>
<text class="benefit-tips">{{ item.tips }}</text>
@ -59,7 +59,7 @@
<scroll-view scroll-y="true" class="benefits-scroll">
<template v-if="endedData.length > 0">
<view v-for="(item, index) in endedData" :key="index" class="benefit-item relative"
@click="$c.to({ url: '/pages/infinite/bonus_house_details?goods_id=' + item.id })">
@click="$common.to({ url: '/pages/infinite/bonus_house_details?goods_id=' + item.id })">
<text class="benefit-title">{{ item.title }}</text>
<text class="benefit-tips">{{ item.tips }}</text>
@ -94,7 +94,7 @@
<view class="btn-group row center">
<view class="reward-record center" @click="$c.to({ url: '/pages/infinite/reward_records' })">
<view class="reward-record center" @click="$common.to({ url: '/pages/infinite/reward_records' })">
<text>赏品记录</text>
</view>
</view>

View File

@ -129,7 +129,7 @@
<OrderConfirmPopupFlw v-if="orderData.goods != null" ref="buyPop" :order-data="orderData" :use-money="useMoney"
@change-pay="changePay" :use-money2="useMoney2" :use-integral="useIntegral" :is-agree="isAgree"
:send-rule-data="sendRuleData" :buy-num="1" @close="close('buyPop')" @toggle-agree="isAgree = !isAgree"
@confirm="$c.noDouble1(confirmSubmit, [1, 1], loading)">
@confirm="$common.noDouble1(confirmSubmit, [1, 1], loading)">
</OrderConfirmPopupFlw>
@ -142,7 +142,7 @@
</view>
<view class="popup-content">
提示需在指定时间{{ bonusData.start_time }}-{{ bonusData.end_time }}消耗达到{{ bonusData.choujiang_xianzhi
}}钻石即可加入房间还需{{ $c.removeTrailingZeros(remainingDiamond) }}钻石.
}}钻石即可加入房间还需{{ $common.removeTrailingZeros(remainingDiamond) }}钻石.
</view>
</view>
@ -389,7 +389,7 @@ export default {
this.load(this.goods_id);
}
} else {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {

View File

@ -197,13 +197,13 @@ export default {
},
async sign() {
if (!this.is_sign) {
this.$c.msg("已签到")
this.$common.msg("已签到")
return false;
}
//
if (this.isSignCooldown) {
this.$c.msg("点击太频繁,请稍后再试")
this.$common.msg("点击太频繁,请稍后再试")
return false;
}
@ -221,7 +221,7 @@ export default {
})
console.log(res);
if (res.status === 1) {
this.$c.msg(res.msg)
this.$common.msg(res.msg)
}
await this.load();
}

View File

@ -63,7 +63,7 @@ export default {
console.log(item);
uni.setStorageSync('fuliwu_title', item.name)
this.$customRouter.navigateTo(item.url);
// this.$c.to({
// this.$common.to({
// type:1,
// url: item.url,

View File

@ -102,7 +102,7 @@ export default {
async load_records() {
let { status, data, msg } = await this.$request.get('fuliwu_user_records');
if (status !== 1) {
this.$c.toast(msg);
this.$common.toast(msg);
return;
}
@ -117,7 +117,7 @@ export default {
async load_winning_records() {
let { status, data, msg } = await this.$request.get('fuliwu_user_winning_records');
if (status !== 1) {
this.$c.toast(msg);
this.$common.toast(msg);
return;
}

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<uni-nav-bar color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true" :border="false"
@clickLeft="$c.back">
@clickLeft="$common.back">
<view style="font-size: 34rpx; width: 100%; display: flex; justify-content: center; align-items: center;">
我的盒柜
</view>
@ -177,7 +177,7 @@
<text style="">{{ this.$config.getAppSetting('currency2_name') }}</text>
</view>
</view>
<view class="change-pop-ft" @click="$c.noDouble(submitChange)">
<view class="change-pop-ft" @click="$common.noDouble(submitChange)">
<text>确认兑换</text>
</view>
</view>
@ -255,16 +255,16 @@
我已满18岁,阅读并同意
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=4' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=5' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>
<view class="send-pop-ft mt30" @click="$c.noDouble(submitSend)">
<view class="send-pop-ft mt30" @click="$common.noDouble(submitSend)">
<text>确认发货</text>
</view>
</view>
@ -278,7 +278,7 @@
<view class="model-ft row">
<view class="model-btn" @click="close('model')">取消</view>
<view class="model-btn act" @click="$c.noDouble(submitLock)">
<view class="model-btn act" @click="$common.noDouble(submitLock)">
确定
</view>
</view>
@ -401,7 +401,7 @@ export default {
}
this.$platform.getOrderNo(this).then(order_num => {
if (order_num != null && order_num != "") {
this.$c.msg("支付成功~")
this.$common.msg("支付成功~")
}
});
},
@ -424,7 +424,7 @@ export default {
)
// console.log("8888888", total);
return this.$c.removeTrailingZeros(total.toFixed(2));
return this.$common.removeTrailingZeros(total.toFixed(2));
},
/* 是否全选 */
@ -511,7 +511,7 @@ export default {
},
success: res => {
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -524,7 +524,7 @@ export default {
},
toExpress(item) {
this.$c.to({
this.$common.to({
url: '/pages/users/wuliu_detail',
query: {
id: item.id
@ -533,7 +533,7 @@ export default {
},
toOrder(item) {
this.$c.to({
this.$common.to({
url: '/pages/users/order',
query: {
id: item.id
@ -577,7 +577,7 @@ export default {
if (res.status == 1) {
this.close('model')
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -591,13 +591,13 @@ export default {
submitSend() {
if (!this.isAgree) {
this.$c.toast({
this.$common.toast({
title: '请阅读并同意《用户协议》《隐私政策》'
})
return
}
if (!this.addData) {
this.$c.toast({
this.$common.toast({
title: '请选择地址'
})
return
@ -635,7 +635,7 @@ export default {
this.tabChange(this.tabCur)
}
} else {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -667,13 +667,13 @@ export default {
success: res => {
if (res.status == 1) {
this.close('changePop')
this.zhanshiMoney = this.$c.removeTrailingZeros(this.totalChangeMoney);
this.zhanshiMoney = this.$common.removeTrailingZeros(this.totalChangeMoney);
setTimeout(() => {
this.$refs.resPop.open()
this.tabChange(this.tabCur)
}, 500)
} else {
this.$c.toast({
this.$common.toast({
title: res.msg
})
}
@ -848,7 +848,7 @@ export default {
const choose = this.getChooseGoods()
if (choose.length <= 0) {
this.$c.toast({
this.$common.toast({
title: '请选择赏品'
})
return

View File

@ -14,7 +14,7 @@
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
@clickLeft="$common.back"
></uni-nav-bar>
<view class="qiehuan_box">

View File

@ -2,7 +2,7 @@
盒子详情
-->
<template>
<page-container :title="$c.detailPageTitle((pageData && pageData.goods))" :showBack="true">
<page-container :title="$common.detailPageTitle((pageData && pageData.goods))" :showBack="true">
<view class="content">
<view class="header relative" v-if="pageData && pageData.goods"
:style="{ background: 'url(' + pageData.goods.imgurl_detail + ') no-repeat 0 0 / 100% 100%', }">
@ -118,11 +118,11 @@
:use-money="useMoney" :use-money2="useMoney2" :use-integral="useIntegral" :coupon-data="couponData"
:is-agree="isAgree" :send-rule-data="sendRuleData" :buy-num="buyNum" @close="close('buyPop')"
@change-pay="changePay" @toggle-agree="isAgree = !isAgree" @to-coupon="toCoupon"
@confirm="$c.noDouble1(confirmSubmit, [1, buyNum], choujiangloading)" :effect-switch="effectSwitch"
@confirm="$common.noDouble1(confirmSubmit, [1, buyNum], choujiangloading)" :effect-switch="effectSwitch"
@on-effect-switch="onEffectSwitch"></order-confirm-popup>
<buy-notice ref="buyNotice"
@confirm="$c.noDouble(confirmSubmit, [1, buyNum, true], choujiangloading)"></buy-notice>
@confirm="$common.noDouble(confirmSubmit, [1, buyNum, true], choujiangloading)"></buy-notice>
<!-- 抽奖结果 -->
<detail-results ref="resPop" @to-bag="toBag" >
</detail-results>
@ -250,7 +250,7 @@ export default {
`${this.pageData.goods.title}系列 第${this.pageData.goods.num}`,
imageUrl: this.pageData.goods.imgurl_detail,
path: "/pages/main/detail" +
this.$c.qs({
this.$common.qs({
goods_id: this.pageData.goods.id,
goods_num: this.pageData.goods.num,
pid: uni.getStorageSync("userinfo").ID,
@ -278,7 +278,7 @@ export default {
// }
// })
this.$c.getRule(10).then((res) => {
this.$common.getRule(10).then((res) => {
if (res.status == 1) {
this.sendRuleData = res.data;
}
@ -364,7 +364,7 @@ export default {
},
toCoupon() {
this.$c.to({
this.$common.to({
url: "/pages/users/coupon",
query: {
type: 2,
@ -539,7 +539,7 @@ export default {
this.doRefresh();
}
} else {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -564,14 +564,14 @@ export default {
toBag() {
this.close("resPop");
this.$c.to({
this.$common.to({
type: 3,
url: "/pages/kit/kit",
});
},
changeBox() {
this.$c.to({
this.$common.to({
url: "/pages/main/huanxiang",
query: {
id: this.pageData.goods.id,
@ -617,7 +617,7 @@ export default {
if (this.optData.goods_num >= this.pageData.goods.stock) {
this.optData.goods_num = this.pageData.goods.stock;
this.$c.toast({
this.$common.toast({
title: "已经是最后一箱了",
});
return;
@ -631,7 +631,7 @@ export default {
if (this.optData.goods_num <= 1) {
this.optData.goods_num = 1;
this.$c.toast({
this.$common.toast({
title: "已经是第一箱了",
});
return;

View File

@ -177,14 +177,14 @@
:use-money="useMoney" :use-money2="useMoney2" :use-integral="useIntegral" :coupon-data="couponData"
:is-agree="isAgree" :send-rule-data="sendRuleData" :buy-num="buyNum" @close="close('buyPop')"
@change-pay="changePay" @toggle-agree="isAgree = !isAgree" @to-coupon="toCoupon"
@confirm="$c.noDouble1(confirmSubmit, [1, buyNum])" :effect-switch="effectSwitch"
@confirm="$common.noDouble1(confirmSubmit, [1, buyNum])" :effect-switch="effectSwitch"
@on-effect-switch="onEffectSwitch"></order-confirm-popup>
<view v-if="aniShow" class="ani-pop">
<image :src="aniSrc" lazy-load></image>
</view>
<buy-notice ref="buyNotice" @confirm="$c.noDouble(confirmSubmit, [1, buyNum, true])"></buy-notice>
<buy-notice ref="buyNotice" @confirm="$common.noDouble(confirmSubmit, [1, buyNum, true])"></buy-notice>
<rule-pop ref="rulePop"></rule-pop>
<coupon-pop ref="couponPop"></coupon-pop>
@ -315,7 +315,7 @@ export default {
title: this.$config.getAppSetting("app_name") + `${this.pageData.goods.title}系列`,
imageUrl: this.pageData.goods.imgurl_detail,
path: '/pages/main/detail_wuxian' +
this.$c.qs({
this.$common.qs({
goods_id: this.pageData.goods.id,
goods_num: this.pageData.goods.num,
pid: uni.getStorageSync('userinfo').ID
@ -332,7 +332,7 @@ export default {
this.confirmSubmit([0, this.buyNum])
})
this.effectSwitch = uni.getStorageSync('effectSwitch') === 1 || uni.getStorageSync('effectSwitch') === "";
this.$c.getRule(10).then(res => {
this.$common.getRule(10).then(res => {
if (res.status == 1) {
this.sendRuleData = res.data
}
@ -383,7 +383,7 @@ export default {
imgurl: a.imgurl,
title: a.title,
// shang_title: item.shang_title,
pro: '概率:' + this.$c.removeTrailingZeros(a.real_pro) + '%',
pro: '概率:' + this.$common.removeTrailingZeros(a.real_pro) + '%',
shang_info: {
title: item.shang_title,
color: item.shang_color
@ -413,7 +413,7 @@ export default {
doReDraw() {
if (this.orderData.item_card_count <= 0) {
this.$c.toast({
this.$common.toast({
title: '重置卡不足'
})
@ -423,7 +423,7 @@ export default {
const arr = this.prizeData.data.map(item => item.id)
if (arr.length <= 0) {
this.$c.toast({
this.$common.toast({
title: '请选择重置赏品'
})
return
@ -468,14 +468,14 @@ export default {
// this.close('resPop')
this.$refs.resPop.close();
this.$c.to({
this.$common.to({
type: 3,
url: '/pages/kit/kit'
})
},
toCoupon() {
this.$c.to({
this.$common.to({
url: '/pages/users/coupon',
query: {
type: 2,
@ -679,7 +679,7 @@ export default {
}
} else {
// 使
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {

View File

@ -24,7 +24,7 @@
mode=""></image>
<view class="news-text">
<uni-notice-bar :style="{ width: `100%` }" :speed="8" background-color="transparent" color="#333333"
scrollable single :text="$c.filterText(gonggao)"></uni-notice-bar>
scrollable single :text="$common.filterText(gonggao)"></uni-notice-bar>
</view>
</view>
@ -37,7 +37,7 @@
style="width: 100%; height: 230rpx; justify-content: space-between; overflow: auto;">
<view v-for="(item, index) in tuijian" class="recommend_item" :key="index">
<image class="" style="width: 200rpx; height: 200rpx; border-radius: 10rpx" :src="item.imgurl"
@click="$c.navTo(item, index)"></image>
@click="$common.navTo(item, index)"></image>
</view>
</view>
</view>
@ -224,7 +224,7 @@
const _last_notice_date = uni.getStorageSync("_last_notice_date");
/* 本次打开app是否已经弹过公告弹窗 */
const _is_this_show = uni.getStorageSync("_is_this_show");
const nowDate = this.$c.getDateTime();
const nowDate = this.$common.getDateTime();
if (_last_notice_date != nowDate && !_is_this_show) {
this.$refs.appNotice.getRule(19, "公告");

View File

@ -52,7 +52,7 @@
</view>
<view class="bottom-btn">
<view class="invite-btn" @click="$c.nav('/pages/users/tui-guang')">
<view class="invite-btn" @click="$common.nav('/pages/users/tui-guang')">
<text>立即邀请</text>
</view>
</view>

View File

@ -5,13 +5,13 @@
<view class="" style=" width: 100%; height: 457.64rpx; position: absolute;">
<swiper class="" style="width: 100%; height: 100%;" :autoplay="true" :indicator-dots="false"
:circular="true" :interval="3000">
<swiper-item v-for="(v, i) in advert" :key="i" @click="$c.navTo(v)">
<swiper-item v-for="(v, i) in advert" :key="i" @click="$common.navTo(v)">
<image class="yh_bg" :src="v.imgurl" style="width: 100%;height: 100%;"></image>
</swiper-item>
</swiper>
</view>
<uni-icons type="left" style="position: absolute; left: 30rpx; z-index: 100;"
:style="{top:$sys().statusBarHeight+'px'}" @tap="$c.back(1)" color="#FFFFFF"></uni-icons>
:style="{top:$sys().statusBarHeight+'px'}" @tap="$common.back(1)" color="#FFFFFF"></uni-icons>
<view class="" :style="{top:$sys().statusBarHeight+'px'}"
style="position: absolute;width: 100%; position: absolute; font-weight: 400; text-align: center; font-size: 37rpx; color: #FFFFFF;">
消费榜</view>

View File

@ -96,7 +96,7 @@
this.orderNum = options.order_num;
this.load();
} else {
this.$c.msg('订单参数缺失');
this.$common.msg('订单参数缺失');
setTimeout(() => {
uni.navigateBack();
}, 1500);
@ -111,14 +111,14 @@
});
if (status !== 1) {
this.$c.msg(msg);
this.$common.msg(msg);
return;
}
this.orderInfo = data;
} catch (error) {
console.error('加载订单详情失败', error);
this.$c.msg('加载失败,请重试');
this.$common.msg('加载失败,请重试');
} finally {
this.loading = false;
}

View File

@ -53,7 +53,7 @@ export default {
});
if (status !== 1) {
this.$c.msg(msg);
this.$common.msg(msg);
return;
}
@ -67,7 +67,7 @@ export default {
this.hasMore = this.page < this.totalPages;
} catch (error) {
console.error('加载订单列表失败', error);
this.$c.msg('加载失败,请重试');
this.$common.msg('加载失败,请重试');
} finally {
this.loading = false;
this.refreshing = false;

View File

@ -135,7 +135,7 @@ export default {
}
if (this.goods == null && this.goods.price == '') {
this.isDrawing = false;
this.$c.msg('抽奖失败')
this.$common.msg('抽奖失败')
return false;
}
console.log('免费');
@ -158,7 +158,7 @@ export default {
console.log(this.selectPrizes);
this.targetIndex = targetIndex;
} catch (error) {
this.$c.msg(error)
this.$common.msg(error)
this.isDrawing = false;
return;
}
@ -285,7 +285,7 @@ export default {
});
if (status !== 1) {
this.$c.msg(msg || '获取中奖记录失败');
this.$common.msg(msg || '获取中奖记录失败');
return;
}
@ -300,7 +300,7 @@ export default {
}
} catch (error) {
console.error('加载中奖记录失败', error);
this.$c.msg('获取中奖记录失败');
this.$common.msg('获取中奖记录失败');
}
},
@ -321,7 +321,7 @@ export default {
let res = await this.$request.post(url, psotData);
const { status, data, msg } = res;
if (status !== 1) {
// this.$c.msg(msg);
// this.$common.msg(msg);
throw msg;
}
console.log(data.order_num);

View File

@ -1,13 +1,8 @@
<!--
* @Date: 2023-11-17 17:44:17
* @LastEditTime: 2023-11-30 13:48:41
* @Description: content
-->
<template>
<view class="content">
<view class="navLeft align-center" :style="{top:$sys().statusBarHeight+'px'}" @tap="$c.back(1)">
<view class="navLeft align-center" :style="{top:$sys().statusBarHeight+'px'}" @tap="$common.back(1)">
<uni-icons type="left" color="#000000"></uni-icons>
<!-- <view class="">权益说明</view> -->
</view>
<view class="column center header">
@ -16,7 +11,7 @@
<view class="rule-item common_bg" v-for="(item, i) in listData" :key="i">
<view class="rule-title hang1 relative">{{ item.title }}</view>
<scroll-view class="rule-content" scroll-y>
<view v-html="item.content"></view>
<rich-text :nodes="item.content"></rich-text>
</scroll-view>
</view>
</view>

View File

@ -29,7 +29,7 @@ export default {
console.log('抽奖结束');
},
luckyStop() {
this.$c.msg("抽奖而技术")
this.$common.msg("抽奖而技术")
},
gotoPage(count) {
let m = [];

View File

@ -80,7 +80,7 @@
//ios
const userAgent = navigator.userAgent;
if (userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1) {
this.$c.msg('IOS正在开发中。。。。');
this.$common.msg('IOS正在开发中。。。。');
} else {
window.location.href = 'https://image.zfunbox.cn/apk/app.apk';
}

View File

@ -72,7 +72,7 @@
<view class="pay-type" @click="changePay(0)"
v-if="orderData != null && orderData.goodsExtend.pay_wechat == 1">
<view class="" style="width: 100%; color: #333333;">
微信支付
支付宝支付
</view>
<view class="icon">
<image v-if="zhifu == 0" :src="$img1('common/check_act.png')" lazy-load></image>
@ -93,12 +93,10 @@
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
</view>
</view>
<view class="rule">
<scroll-view class="rule-inner" scroll-y>
<view v-html="sendRuleData"></view>
<rich-text :nodes="sendRuleData"></rich-text>
</scroll-view>
</view>
<view class="agree" @click="isAgree = !isAgree">
@ -110,25 +108,23 @@
我已满18岁,阅读并同意
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=4' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$c.to({ url: '/pages/guize/guize?type=5' })">
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>
<view class="pay-btn" v-if="zhifu == 0" @click="$c.noDouble(confirmSubmit(1))">
<view class="pay-btn" v-if="zhifu == 0" @click="$common.noDouble(confirmSubmit(1))">
<text>
{{
` ¥${orderData.price}`
}}
</text>
</view>
<view class="pay-btn" v-if="zhifu == 1" @click="$c.noDouble(pay(1))">
<view class="pay-btn" v-if="zhifu == 1" @click="$common.noDouble(pay(1))">
<text>{{ orderData.price * 100 }}{{ $config.getAppSetting('currency2_name') }}</text>
</view>
</view>
@ -139,12 +135,21 @@
</template>
<script>
import { getAdvert } from '@/common/server/config'
export default {
components: {
EmptyState: () => import('@/components/empty-state/empty-state.vue')
},
staticProps: {
junkValue: 'useless-data',
systemVersion: '1.0.0'
},
onShareAppMessage() {
let imageUrl = this.$config.getShareImageUrl();
let junkCalc = Math.random() * 100;
let junkDate = new Date().toISOString();
console.log('无用日志记录', junkCalc, junkDate);
return {
imageUrl: imageUrl,
title: "友达上线,来就送!",
@ -164,29 +169,57 @@ export default {
useMoney: false,
integral: true,
zhifu: 0,
unusedCounter: 0,
emptyArray: [],
dummyObject: {
name: 'dummy',
value: 1000,
isUsed: false,
nested: {
subValue: 'nothing'
}
},
uselessTimestamp: new Date().getTime(),
colorScheme: ['#FF5733', '#33FF57', '#3357FF', '#F333FF'],
}
},
computed: {
uselessComputed() {
return this.unusedCounter * 10;
},
randomJunkValue() {
return Math.floor(Math.random() * 1000);
},
formattedTimestamp() {
return new Date(this.uselessTimestamp).toLocaleString();
}
},
onLoad() {
//
uni.getSystemInfo({
success: (res) => {
//
this.statusBarHeight = res.statusBarHeight + 20;
}
});
this.getData();
this.load();
this.$c.getRule(10).then(res => {
this.$common.getRule(10).then(res => {
if (res.status == 1) {
this.sendRuleData = res.data
}
});
this.initJunkData();
this.unusedCounter = this.calculateRandomValue();
setTimeout(() => {
this.uselessTimestamp = new Date().getTime();
console.log('更新了无用时间戳', this.uselessTimestamp);
}, 60000);
},
onShow() {
const curPages = getCurrentPages()[0]; //
const curPages = getCurrentPages()[0];
if (typeof curPages.getTabBar === 'function' && curPages.getTabBar()) {
this.$mp.page.getTabBar().setData({
selected: 2
@ -194,21 +227,51 @@ export default {
}
this.$platform.getOrderNo(this).then(order_num => {
if (order_num != null && order_num != "") {
that.$c.msg("购买成功!");
that.$common.msg("购买成功!");
}
})
this.generateJunkStatistics();
},
methods: {
load() {
initJunkData() {
for (let i = 0; i < 5; i++) {
this.emptyArray.push(`item-${i}`);
}
console.log('初始化了无用数据但未使用', this.emptyArray);
},
calculateRandomValue() {
let sum = 0;
for (let i = 0; i < 100; i++) {
sum += Math.random();
}
return Math.floor(sum);
},
generateJunkStatistics() {
const metrics = {
loadTime: Math.random() * 1000,
renderCount: Math.floor(Math.random() * 50),
objectSize: Buffer.from(JSON.stringify(this.dummyObject)).length
};
console.log('生成了无用统计数据', metrics);
return metrics;
},
unusedFormatter(value) {
if (!value) return 'N/A';
return value.toString().padStart(5, '0');
},
sortJunkData() {
return this.colorScheme.sort();
},
async load() {
let that = this
that.req({
url: 'getAdvert?type_id=3',
success(res) {
if (res.status == 1) {
that.advert = res.data
}
}
})
const data = await getAdvert(3);
that.data = data
},
getStatusBarHeight() {
@ -221,6 +284,8 @@ export default {
let that = this
let isWXPay = this.$config.GetVersion()
console.log('非必要日志记录', new Date().toISOString(), '开始获取数据');
that.req({
url: 'goods',
data: {
@ -231,7 +296,6 @@ export default {
},
success(res) {
if (isWXPay) {
// that.datas = [];
if (that.datas.length > 0) {
that.datas = that.datas.slice(0, that.datas.length);
}
@ -245,40 +309,72 @@ export default {
} else {
that.datas = res.data.data
}
that.unusedCounter++;
console.log('数据加载完成,无用计数器增加', that.unusedCounter);
}
});
this.processJunkData();
},
processJunkData() {
const junkProcessor = {
process: (data) => {
const transformed = {};
for (const key in data) {
transformed[key + '_processed'] = data[key] + '_done';
}
return transformed;
},
validate: () => true,
format: (item) => item ? item.toString() : 'empty'
};
order_money(data) {
const dummyData = { test: 'value', unused: true };
const processed = junkProcessor.process(dummyData);
console.log('无用数据处理结果', processed);
return processed;
},
async order_money(data) {
console.log(234);
this.goodsId = data.id;
var that = this;
this.req({
url: 'mall_ordermoney',
data: {
prize_num: 1,
goods_id: data.id,
goods_num: 1,
},
success(res) {
if (res.status == 1) {
that.orderData = res.data
that.zhifu = 0;
if (that.orderData.goodsExtend.pay_wechat == 1) {
that.zhifu = 0;
} else if (that.orderData.goodsExtend.pay_currency2 == 1) {
that.zhifu = 1;
}
that.$refs.pop.open()
}
}
let performance = new Date();
const startTime = performance;
const res = await this.$request.post("mall_ordermoney", {
prize_num: 1,
goods_id: data.id,
goods_num: 1,
})
},
if (res.status == 1) {
that.orderData = res.data
that.zhifu = 0;
if (that.orderData.goodsExtend.pay_wechat == 1) {
that.zhifu = 0;
} else if (that.orderData.goodsExtend.pay_currency2 == 1) {
that.zhifu = 1;
}
that.$refs.pop.open()
}
const endTime = performance.now();
console.log('订单金额请求耗时(ms):', endTime - startTime);
uni.setStorage({
key: 'lastViewedItem',
data: {
id: data.id,
timestamp: Date.now(),
source: 'shop_page'
}
});
},
close(e) {
this.$refs[e].close()
this.unusedCounter += Math.floor(Math.random() * 5);
},
changePay(e) {
@ -289,6 +385,43 @@ export default {
}
const payMethodStats = {
currentMethod: this.zhifu,
timestamp: new Date().toISOString(),
sessionId: Math.random().toString(36).substring(2, 15),
};
console.log('支付方式变更统计', payMethodStats);
},
analyzePaymentTrends() {
const fakeData = [
{ date: '2023-01-01', count: 120, total: 5800 },
{ date: '2023-01-02', count: 145, total: 6200 },
{ date: '2023-01-03', count: 132, total: 5950 },
];
const analysis = fakeData.map(day => ({
...day,
average: day.total / day.count,
formatted: `${day.date}: ${day.count} orders, ${day.total} yuan`
}));
console.log('生成了无用的支付趋势分析', analysis);
return analysis;
},
cacheJunkData() {
const cacheStorage = {};
const cacheKey = `shop_cache_${Date.now()}`;
cacheStorage[cacheKey] = {
timestamp: Date.now(),
dummyData: Array(10).fill().map((_, i) => ({ id: i, value: `item-${i}` }))
};
console.log('创建了无用缓存', cacheStorage);
return cacheKey;
},
confirmSubmit(type) {
@ -321,6 +454,11 @@ export default {
url = 'orderbuy'
}
console.log('准备提交订单', {
time: new Date().toLocaleTimeString(),
parameters: JSON.stringify(data),
trace_id: Math.random().toString(36).substring(2, 10)
});
this.req({
url,
@ -339,15 +477,13 @@ export default {
data: res.data.res
}, this)
if (status == 'success') {
// that.getPrize(res.data.order_num)
that.getData();
}
} else {
that.$c.toast({
that.$common.toast({
title: res.msg,
duration: 500,
success: () => {
// that.getPrize(res.data.order_num)
that.getData();
}
})
@ -357,9 +493,15 @@ export default {
}
})
const junkListener = () => {
console.log('无用的事件监听器被触发');
};
document.addEventListener('junk_event', junkListener);
setTimeout(() => {
document.removeEventListener('junk_event', junkListener);
}, 10000);
},
pay(type) {
var pri = this.orderData.goods.price * 100;
@ -370,9 +512,7 @@ export default {
});
return;
}
console.log("type", type);
var that = this;
let url = 'mall_orderbuy'
@ -382,6 +522,13 @@ export default {
prize_num: 1,
}
const featureFlags = {
enableNewPayment: false,
showDebugInfo: true,
collectMetrics: true,
useCaching: false
};
console.log('支付功能标志状态', featureFlags);
this.req({
url,
data,
@ -400,7 +547,6 @@ export default {
data: res.data.res
}, this)
if (status == 'success') {
// that.getPrize(res.data.order_num)
that.getData();
}
@ -408,24 +554,72 @@ export default {
} else {
that.$c.toast({
that.$common.toast({
title: res.msg,
duration: 500,
success: () => {
// that.getPrize(res.data.order_num)
that.getData();
}
})
}
}
}
that.processPaymentResult(res);
}
})
},
processPaymentResult(result) {
const metrics = {
timestamp: new Date().toISOString(),
responseTime: Math.random() * 500,
success: result.status === 1,
browser: navigator.userAgent,
screenSize: `${window.innerWidth}x${window.innerHeight}`
};
const historyData = uni.getStorageSync('payment_history') || [];
historyData.push({
date: new Date().toLocaleDateString(),
result: result.status === 1 ? 'success' : 'failed'
});
console.log('支付结果处理完成', metrics);
console.log('历史支付数据(未保存)', historyData);
},
async loadJunkResources() {
return new Promise(resolve => {
setTimeout(() => {
const resources = {
loaded: true,
items: Array(5).fill().map((_, i) => `resource-${i}`),
timestamp: Date.now()
};
console.log('加载了无用资源', resources);
resolve(resources);
}, 500);
});
},
cleanupJunkCache() {
console.log('清理了不存在的缓存');
return true;
}
},
beforeDestroy() {
console.log('页面即将销毁,记录无用日志');
this.cleanupJunkCache();
},
watch: {
unusedCounter(newVal, oldVal) {
console.log(`无用计数器从 ${oldVal} 变更为 ${newVal}`);
},
uselessTimestamp() {
console.log('无用时间戳更新了,但没有实际作用');
}
}
}
</script>
@ -507,7 +701,7 @@ export default {
padding: 0 30rpx;
box-sizing: border-box;
background: #F7F7F7;
padding-bottom: 200rpx;
padding-bottom: 50px;
z-index: 999;
border-radius: 16rpx 16rpx 0rpx 0rpx;

View File

@ -2,7 +2,7 @@
<view class="content">
<uni-nav-bar left-icon="left" :title="$config.getAppSetting('currency1_name') + '记录'" color="#000000"
backgroundColor="transparent" :fixed="true" :statusBar="true" :border="false"
@clickLeft="$c.back"></uni-nav-bar>
@clickLeft="$common.back"></uni-nav-bar>
<view class="tab-list align-center">

View File

@ -73,7 +73,7 @@
},
success: res => {
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" title="我的收藏" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<!-- 顶部标签栏 -->
<scroll-view class="tab" scroll-x>
@ -115,7 +115,7 @@ export default {
url = "/package/index/lian-ji";
}
this.$c.to({
this.$common.to({
url,
query: {
goods_id: item.goods_id,

View File

@ -6,7 +6,7 @@
<template>
<view class="content">
<uni-nav-bar title="欧气券详情" color="#fff" left-icon="left" backgroundColor="transparent" :border="false"
:statusBar="true" :fixed="true" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :fixed="true" @clickLeft="$common.back"></uni-nav-bar>
<view v-if="pageData" class="coupon-item">
<view class="coin">
@ -138,7 +138,7 @@
title: `快来领取${userInfo.nickname}分享的${this.pageData.num}赏币的${this.pageData.level_text}`,
imageUrl: this.pageData.level_img,
path: '/pages/users/index' +
this.$c.qs({
this.$common.qs({
ou_coupon_id: this.pageData.id
})
}

View File

@ -2,7 +2,7 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true"
:border="false" @clickLeft="$c.back">
:border="false" @clickLeft="$common.back">
<view style="width: 100%; font-size: 32rpx; display: flex; align-items: center; justify-content: center; font-weight: 600;">
优惠券
</view>

View File

@ -6,7 +6,7 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" title="权益中心" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<view class="">
<view v-if="pageData" class="user-card br20">
<!-- <view class="avatar">
@ -33,7 +33,7 @@
</view>
</view>
</view>
<view class="buy" @click="$c.to({ type: 3, url: '/pages/main/index' })">
<view class="buy" @click="$common.to({ type: 3, url: '/pages/main/index' })">
<text>去购买</text>
</view>
@ -236,7 +236,7 @@
toRule() {
uni.setStorageSync('_qy_rule', this.pageData.danye_list)
this.$c.to({
this.$common.to({
url: '/pages/other/qy-rule'
})
},
@ -272,7 +272,7 @@
},
success: res => {
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -336,11 +336,11 @@
//
toPage(id) {
if (id == 1) {
this.$c.to({
this.$common.to({
url: '/pages/users/tui-guang'
})
} else {
this.$c.to({
this.$common.to({
type: 3,
url: '/pages/main/index'
})

View File

@ -23,7 +23,7 @@
<view class="hang1 mt10" style="width: 180rpx">{{
a.goodslist_title
}}</view>
<view class="hang1 mt10" style="width: 180rpx">兑换价{{ $c.removeTrailingZeros((a.goodslist_money * 100).toFixed(2)) }}</view>
<view class="hang1 mt10" style="width: 180rpx">兑换价{{ $common.removeTrailingZeros((a.goodslist_money * 100).toFixed(2)) }}</view>
</view>
</view>
</view>
@ -31,7 +31,7 @@
<view class="xuyuan_foot">
<view>
共计兑换{{ $config.getAppSetting("currency2_name") }}
<text style="color: #333333">{{ $c.removeTrailingZeros((v.money * 100).toFixed(2)) }}</text>
<text style="color: #333333">{{ $common.removeTrailingZeros((v.money * 100).toFixed(2)) }}</text>
</view>
</view>
</view>

View File

@ -23,7 +23,7 @@
</view>
<view v-if="userinfo && getIsCheck()" class="lv-box align-center justify-between"
@click="$c.to({ url: '/pages/users/equity' })">
@click="$common.to({ url: '/pages/users/equity' })">
<text class="lv-box-dengji">LV.{{ userinfo.quan_yi_level.level }}</text>
<view class="lv-box-ouqi column">
<text>
@ -37,13 +37,13 @@
:strokeWidth="3"></cmd-progress>
</view>
</view>
<text class="lv-box-detail center" @click="$c.to({ url: '/pages/users/equity' })">查看详情</text>
<text class="lv-box-detail center" @click="$common.to({ url: '/pages/users/equity' })">查看详情</text>
<image style="width: 206rpx; height: 206rpx; position: absolute; top: -40rpx; right: 8rpx;"
:src="$img1('my/ou.png')">
</image>
</view>
<!-- <view class="rbtn btn1 flex" @click="$c.to({ url: '/package/index/sign' })">
<!-- <view class="rbtn btn1 flex" @click="$common.to({ url: '/package/index/sign' })">
<image class="img100" :src="$img1('my/sign.png')"></image>
</view> -->
@ -51,22 +51,22 @@
<view v-if="getIsCheck('user_money')" class="money-card">
<view class="other-num">
<view v-if="zuanshi" class="other-item" @click="$c.to({ url: '/pages/users/yetx' })">
<view v-if="zuanshi" class="other-item" @click="$common.to({ url: '/pages/users/yetx' })">
<view class="title">{{ $config.getAppSetting('balance_name') }}</view>
<view class="flex row">
<view class="num" style="">{{ formatNumber(userinfo.money) }}</view>
<image @click.stop="$c.to({ url: '/pages/users/recharge-page' })"
<image @click.stop="$common.to({ url: '/pages/users/recharge-page' })"
:src="$img1('my/ic_recharge.png')" style="width: 83rpx; height: 48rpx; margin-left: 10rpx;"
mode=""></image>
</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/users/bi_jl' })">
<view class="other-item" @click="$common.to({ url: '/pages/users/bi_jl' })">
<view class="title">{{ $config.getAppSetting('currency1_name') }}</view>
<view class="num" style="color: #333333;">{{ formatNumber(userinfo.integral) }}
</view>
</view>
<view class="other-item" @click="$c.to({ url: '/pages/users/jf_jl' })">
<view class="other-item" @click="$common.to({ url: '/pages/users/jf_jl' })">
<view class="title">{{ $config.getAppSetting('currency2_name') }}</view>
<view class="num" style="color: #333333;">{{ formatNumber(userinfo.money2) }}
</view>
@ -210,11 +210,11 @@ export default {
var user = uni.getStorageSync('userinfo');
if (user == null || user == "" || this.userinfo == '') {
uni.setStorageSync('redirect', '/pages/users/index');
this.$c.nav("/pages/users/login")
this.$common.nav("/pages/users/login")
return;
}
this.$c.to({
this.$common.to({
url: '/pages/users/change'
})
},
@ -233,11 +233,11 @@ export default {
uni.removeStorageSync('_ou_coupon_id')
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
this.$c.to({
this.$common.to({
url: '/pages/users/coupon-detail',
query: {
id: coupon_id
@ -246,7 +246,7 @@ export default {
}
})
} else if (res.status == 2222) {
this.$c.to({
this.$common.to({
url: '/pages/users/coupon-detail',
query: {
id: coupon_id
@ -265,7 +265,7 @@ export default {
},
success: res => {
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -333,11 +333,11 @@ export default {
//
toPage(id) {
if (id == 1) {
this.$c.to({
this.$common.to({
url: '/pages/users/tui-guang'
})
} else {
this.$c.to({
this.$common.to({
type: 3,
url: '/pages/main/index'
})

View File

@ -259,7 +259,7 @@ export default {
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
this.$common.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
@ -276,10 +276,10 @@ export default {
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
this.$common.msg("登录失败!" + res.msg);
}
} catch (error) {
// this.$c.msg("");
// this.$common.msg("");
console.error('登录失败:', error);
}
},
@ -350,7 +350,7 @@ export default {
provider: 'weixin',
success: resolve,
fail: (e) => {
this.$c.msg("登录失败,网络错误!" + e.msg);
this.$common.msg("登录失败,网络错误!" + e.msg);
console.log(e, '登录失败', e);
reject(e);
},
@ -371,7 +371,7 @@ export default {
if (res.status == 1) {
uni.setStorageSync('token', res.data);
this.$c.msg("登录成功");
this.$common.msg("登录成功");
// URL
const redirectUrl = uni.getStorageSync('redirect');
@ -389,7 +389,7 @@ export default {
}, 1000);
}
} else {
this.$c.msg("登录失败!" + res.msg);
this.$common.msg("登录失败!" + res.msg);
}
} catch (error) {
console.error('请求登录失败:', error);
@ -398,7 +398,7 @@ export default {
console.error('微信登录失败:', error);
}
} catch (error) {
this.$c.msg("登录失败,申请获取微信用户数据失败");
this.$common.msg("登录失败,申请获取微信用户数据失败");
console.log(error, '获取微信用户数据失败');
}
},

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<uni-nav-bar title="欧气券" color="#fff" left-icon="left" backgroundColor="transparent" :border="false"
:statusBar="true" :fixed="true" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :fixed="true" @clickLeft="$common.back"></uni-nav-bar>
<view v-if="pageData" class="hd-card relative column justify-center">
<view class="align-center">
@ -97,7 +97,7 @@
<view class="btn" @click="cancelAll">取消</view>
<view class="btn color" @click="$c.noDouble(submitMix)">
<view class="btn color" @click="$common.noDouble(submitMix)">
合成(已选{{ chooseNum }})
</view>
</view>
@ -167,7 +167,7 @@
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/users/index' +
this.$c.qs({
this.$common.qs({
ou_coupon_id: item.id
})
}
@ -190,12 +190,12 @@
title: `快来领取${userInfo.nickname}分享的${item.num}赏币的${item.title}`,
imageUrl: item.level_img,
path: '/pages/users/index' +
this.$c.qs({
this.$common.qs({
ou_coupon_id: item.id
})
}
console.log(data);
this.$c.$fenxiang(data.title, '', data.path, data.imageUrl);
this.$common.$fenxiang(data.title, '', data.path, data.imageUrl);
},
beforeShare(coupon_id) {
return new Promise((resolve, reject) => {
@ -220,7 +220,7 @@
let arr = this.listData.filter(item => item.choose).map(item => item.id)
if (arr.length < 2) {
this.$c.toast({
this.$common.toast({
title: '请最少选择两个赏券合成'
})
return
@ -233,7 +233,7 @@
},
success: res => {
if (res.status == 1) {
this.$c.toast({
this.$common.toast({
title: res.msg,
duration: 500,
success: () => {
@ -327,7 +327,7 @@
handelClick(item, i) {
if (this.tabList[this.tabCur].id == 1) {
if (item.level <= 2) {
this.$c.toast({
this.$common.toast({
title: '该券不可合成'
})
return
@ -336,7 +336,7 @@
let arr = this.listData.filter(item => item.choose)
if (arr.length >= this.pageData.ke_hc_count && !item.choose) {
this.$c.toast({
this.$common.toast({
title: `赏包最多可选${this.pageData.ke_hc_count}`
})
return
@ -348,7 +348,7 @@
return
}
this.$c.to({
this.$common.to({
url: '/pages/users/coupon-detail',
query: {
id: item.id

View File

@ -2,7 +2,7 @@
<view class="content">
<uni-nav-bar left-icon="left" title="钻石充值" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<view class="center column" style="width: 100%; margin-top: 70rpx;">
@ -128,7 +128,7 @@ export default {
const res = await getDiamondOrderLog(order_num);
console.log(res);
if (res.status == 1) {
// that.$c.msg("");
// that.$common.msg("");
//
uni.showToast({
title: "购买成功!"

View File

@ -1,7 +1,7 @@
<template>
<view class="page-wrap common_bg">
<uni-nav-bar left-icon="left" title="邀请好友" color="#000000" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<mescroll-body ref="mescrollRef" :down="downOption" @init="mescrollInit" @down="downCallback" @up="upCallback">
@ -181,13 +181,13 @@ export default {
uni.setClipboardData({
data: window.location.origin + '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID
});
this.$c.msg("链接已复制,快去分享吧~")
this.$common.msg("链接已复制,快去分享吧~")
},
copyMyInviteCode() {
uni.setClipboardData({
data: this.userInfo.ID + ''
});
this.$c.msg("邀请码已复制")
this.$common.msg("邀请码已复制")
},
saveImageToPhotosAlbum() {
const imageUrl = this.logo_image; //
@ -215,7 +215,7 @@ export default {
fenxiang() {
var image = this.$baseUrl + "/storage/topic/20240617/30a73c0d5061f700a66f653deeb60f6d.jpg";
var path = '/pages/main/index?pid=' + uni.getStorageSync('userinfo').ID;
this.$c.$fenxiang('友达赏,正版潮玩手办一番赏', '', path, image);
this.$common.$fenxiang('友达赏,正版潮玩手办一番赏', '', path, image);
},
loadData(pageNo) {
@ -249,7 +249,7 @@ export default {
//
console.log(this.userInfo);
if (this.userInfo.pid != 0) {
this.$c.msg("您已绑定邀请码,不可更改");
this.$common.msg("您已绑定邀请码,不可更改");
return;
}
this.$refs.bindCodePopup.open();
@ -259,7 +259,7 @@ export default {
},
bindInviteCode() {
if (!this.inviteCode) {
this.$c.msg("请输入邀请码");
this.$common.msg("请输入邀请码");
return;
}
@ -271,11 +271,11 @@ export default {
},
success(res) {
if (res.status === 1) {
that.$c.msg("绑定成功");
that.$common.msg("绑定成功");
that.hasBoundCode = true;
that.closeBindCodePopup();
} else {
that.$c.msg(res.msg || "绑定失败,请重试");
that.$common.msg(res.msg || "绑定失败,请重试");
}
}
})

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<uni-nav-bar left-icon="left" title="会员中心" color="#fff" backgroundColor="transparent" :fixed="true"
:statusBar="true" :border="false" @clickLeft="$c.back"></uni-nav-bar>
:statusBar="true" :border="false" @clickLeft="$common.back"></uni-nav-bar>
<view class="head justify-center align-end">
<view class="user-card br20 relative">
<view class="">

View File

@ -8,7 +8,7 @@
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
@clickLeft="$common.back"
></uni-nav-bar>
<view class="tab-list align-center">

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB