Merge branch 'youda' of http://192.168.195.14:3000/shang/yfs into youda

# Conflicts:
#	manifest.json
This commit is contained in:
18631081161 2025-06-10 16:50:47 +08:00
commit 193e30a83a
12 changed files with 444 additions and 39 deletions

1
.gitignore vendored
View File

@ -5,4 +5,5 @@
node_modules/
unpackage/dist/
unpackage/cache/
unpackage/resources/
/.vs

View File

@ -32,6 +32,7 @@ export const whiteList = [
"pages/shouye/slots",
"pages/other/web-pay-order", // 网页支付订单
"pages/other/web-pay-success", // 网页支付成功
"pages/other/about"
];

View File

@ -1,6 +1,6 @@
import BasePlatform from './BasePlatform';
import RequestManager from '@/common/request.js'
import {navigateTo} from '@/common/router'
import { navigateTo } from '@/common/router'
import {
sleep,
parseQueryString
@ -22,7 +22,7 @@ class AppPlatform extends BasePlatform {
}
AppLaunch(options) {
console.log("AppLaunch", options);
this.getConfig().then(res => {
console.log("AppLaunch", res);
if (res.isCheck) {
@ -212,6 +212,14 @@ class AppPlatform extends BasePlatform {
// 获取基础菜单列表
const baseMenuList = super.getUserMenuList();
let menuList = [];
const customServiceMenu = {
id: 13,
show: true,
title: '商品退换货',
icon: 'my/huan.svg',
path: '/pages/shouye/danye?advert=29',
handler: this.navigateToPath.bind(this)
};
for (let i = 0; i < baseMenuList.length; i++) {
let menu = baseMenuList[i];
if (menu.id == 3) {
@ -224,7 +232,9 @@ class AppPlatform extends BasePlatform {
}
} else {
menuList.push(menu);
}
if(menu.title=="用户协议"){
menuList.push(customServiceMenu);
}
}
// 添加App特有的菜单项
@ -236,7 +246,6 @@ class AppPlatform extends BasePlatform {
path: '',
handler: this.handleCheckUpdate.bind(this)
}];
// 返回合并后的菜单列表
return menuList;
}
@ -339,10 +348,10 @@ class AppPlatform extends BasePlatform {
});
}
getUserAgreement() {
navigateTo('/pages/guize/guize', { type: 30 })
}
getPrivacyAgreement() {
navigateTo('/pages/guize/guize', { type: 31 })
}
navigateTo('/pages/guize/guize', { type: 30 })
}
getPrivacyAgreement() {
navigateTo('/pages/guize/guize', { type: 31 })
}
}
export default AppPlatform;

View File

@ -172,6 +172,15 @@ class BasePlatform {
handler: this.handleLogout.bind(this)
})
}
const customServiceMenu = {
id: 10,
show: true,
title: '关于',
icon: 'my/about.png',
path: '/pages/other/about',
handler: this.navigateToPath.bind(this)
};
m.push(customServiceMenu);
return m;
}

View File

@ -276,5 +276,20 @@ class MiniProgramPlatform extends BasePlatform {
// 将客服菜单插入到第二个位置
return [...baseMenuList.slice(0, 1), customServiceMenu, ...baseMenuList.slice(1)];
}
handleLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.removeStorageSync('token');
uni.removeStorageSync('userinfo');
uni.switchTab({
url: '/pages/shouye/index'
});
}
}
});
}
}
export default MiniProgramPlatform;

View File

@ -65,17 +65,10 @@ class WebAppPlatform extends H5Platform {
const baseMenuList = super.getUserMenuList();
// 添加客服菜单项(仅微信小程序)
const customServiceMenu = {
id: 10,
show: true,
title: '关于',
icon: 'my/about.png',
path: '/pages/other/about',
handler: this.navigateToPath.bind(this)
};
// 将客服菜单插入到第二个位置
return [...baseMenuList.slice(0, baseMenuList.length - 1), customServiceMenu, ...baseMenuList.slice(baseMenuList.length - 1)];
return [...baseMenuList.slice(0, baseMenuList.length - 1), ...baseMenuList.slice(baseMenuList.length - 1)];
}
getVersion() {
return uni.getStorageSync('version') == '' ? '1.0.0' : uni.getStorageSync('version');

View File

@ -46,4 +46,15 @@ export const getOrderUrlLink = async (order_num) => {
order_num: order_num
}, true);
return res;
}
}
//get_user_test
/**
* 获取账号token
* @param {*} user_id
* @returns
*/
export const getUserTest = async (user_id) => {
const res = await RequestManager.post('/get_user_test', { user_id: user_id }, true);
return res;
}

View File

@ -1,12 +1,18 @@
{
"name" : "友达赏王者",
"appid" : "__UNI__2E6CB39",
"appid" : "__UNI__0BC0425",
"description" : "",
"versionName" : "1.0.1",
"versionCode" : 101,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"optimization" : {
"js" : {
"obfuscation" : true, //
"compress" : true //
}
},
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
@ -126,8 +132,9 @@
}
},
"uniStatistics" : {
"enable" : true
}
"enable" : false
},
"nvueCompiler" : "uni-app"
},
/* */
"quickapp" : {},

View File

@ -150,6 +150,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/user/bi_jl",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/user/wuliu_detail",
"style": {
@ -353,6 +359,12 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/user/yetx",
"style": {
"navigationStyle": "custom"
}
}
],
"subPackages": [{

View File

@ -5,8 +5,8 @@
@click="handleIconClick"></image>
<view class="app-info">
<view class="app-name">友达赏</view>
<view class="app-version">Version{{version}}</view>
<view class="app-version">Version{{ version }}</view>
</view>
<view v-if="isTestMode" class="test-mode-container">
@ -30,12 +30,16 @@
<view class="test-mode-item">
<text>日志状态: {{ logEnabled ? '已开启' : '已关闭' }}</text>
</view>
<view class="test-mode-item">
<view class="button-group">
<button class="test-button log-button" @click="enableLog">开启日志</button>
<button class="test-button log-button" @click="disableLog">关闭日志</button>
</view>
</view>
<view class="test-mode-item">
<button class="test-button" @click="loginOther">登录账号</button>
</view>
<view class="test-mode-item">
<button class="test-button" @click="resetTestMode">退出测试模式</button>
</view>
@ -47,7 +51,7 @@
<script>
import PageContainer from '@/components/page-container/page-container.vue'
import { getUserTest } from '@/common/server/order'
export default {
components: {
@ -73,11 +77,13 @@ export default {
this.version = this.$platform.getVersion();
//
try {
// #ifdef H5
this.domain = window.location.hostname;
// #endif
} catch (e) {
console.error('获取域名失败:', e);
}
const userinfo = uni.getStorageSync('userinfo');
if (userinfo) {
this.userinfo = userinfo;
@ -85,14 +91,14 @@ export default {
//
if (this.userinfo != null && this.userinfo.ut == 2) {
//
const testMode = uni.getStorageSync('test_mode_status');
if (testMode) {
this.isTestMode = true;
console.log("从缓存恢复测试模式");
}
//
const logStatus = uni.getStorageSync('log_status');
if (logStatus) {
@ -132,7 +138,7 @@ export default {
},
resetTestMode() {
this.isTestMode = false;
//
if (this.logEnabled) {
this.logEnabled = false;
@ -140,10 +146,10 @@ export default {
uni.removeStorageSync('log_status');
console.log("退出测试模式时关闭日志");
}
//
uni.removeStorageSync('test_mode_status');
uni.showToast({
title: '已退出测试模式',
icon: 'none'
@ -168,6 +174,45 @@ export default {
title: '日志已关闭',
icon: 'none'
});
},
loginOther() {
uni.showModal({
title: '请输入账号id或者uid',
content: '',
placeholderText: '请输入账号uid',
editable: true,
success: async function (res) {
if (res.confirm) {
console.log('用户点击确定', res.content);
if (res.content == "") {
uni.showToast({
title: '请输入账号id或者uid',
icon: 'none'
});
return;
}
const data = await getUserTest(res.content);
if (data == null || data.data == "") {
uni.showToast({
title: '账号不存在',
icon: 'none'
});
return;
}
console.log('获取账号token', data);
let token = data.data;
uni.setStorageSync('token', token);
uni.removeStorageSync('userinfo');
// uni.removeStorageSync('test_mode_status');
uni.switchTab({
url: '/pages/shouye/index'
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
@ -227,12 +272,12 @@ export default {
margin: 10px 0;
font-size: 14px;
}
.button-group {
display: flex;
justify-content: space-between;
}
.log-button {
width: 48%;
margin: 0;
@ -246,4 +291,4 @@ export default {
}
}
}
</style>
</style>

View File

@ -1,8 +1,7 @@
<template>
<page-container :title="title" :showBack="true">
<view v-html="content">
</view>
<rich-text :nodes="content"></rich-text>
</page-container>
</template>
@ -21,8 +20,8 @@ export default {
},
data() {
let title = '';
// uni.getStorageSync('title')
title = uni.getStorageSync('fuliwu_title')
// // uni.getStorageSync('title')
// title = uni.getStorageSync('fuliwu_title')
return {
title,
content: []

303
pages/user/yetx.vue Normal file
View File

@ -0,0 +1,303 @@
<template>
<view class="content">
<uni-nav-bar
left-icon="left"
:title="$config.getAppSetting('balance_name') + '记录'"
color="#000000"
backgroundColor="transparent"
:fixed="true"
:statusBar="true"
:border="false"
@clickLeft="$c.back"
></uni-nav-bar>
<view class="tab-list align-center">
<view
@click="getlist(i)"
v-for="(item, i) in arr"
:key="i"
class="tab-list-item"
:class="{ active: show == i }"
>
{{ item }}
<view v-if="show == i" class="arrow"></view>
</view>
</view>
<!-- <view class="head">
<view class="qiehuan">
<view @click="getlist(i)" v-for="(v, i) in arr" :key="i">
<view :class="show == i ? 'xzs' : 'wzs'">{{ v }}</view>
<view class="qiehuan_line" v-if="show == i">
</view>
</view>
</view>
</view> -->
<!-- 内容 -->
<mescroll-body
ref="mescrollRef"
@init="mescrollInit"
:down="downOption"
@down="downCallback"
@up="upCallback"
>
<view class="coupon">
<view
v-for="(item, index) in listData"
:key="index"
class="coupon_item"
>
<view class="coupon_item_1">
<view>{{ item.content }}</view>
<view>{{ item.addtime }}</view>
</view>
<view class="coupon_r">{{ item.change_money }}</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
export default {
data() {
return {
z_imgPath: this.$z_img2 + "mine/",
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
arr: ["全部", "收入", "支出"],//, ""
show: 0,
listData: [],
//
downOption: {
auto: false,
},
};
},
onLoad(e) {
// setTimeout(() => {
// this.listData=[
// {
// content:'',
// addtime:'2333-23-23 23:23:23',
// change_money:233
// }
// ]
// }, 1000);
},
methods: {
back() {
uni.navigateBack();
},
getlist(v) {
this.show = v;
this.aixuanArr = [];
this.mescroll.resetUpScroll();
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.resetUpScroll();
},
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) {
//
this.loadData(page.num);
},
loadData(pageNo) {
//
let that = this;
that.req({
url: "profitMoney",
Loading: true,
data: {
page: pageNo,
type: that.show,
},
success(res) {
that.mescroll.endByPage(res.data.data.length, res.data.last_page);
if (pageNo == 1) {
that.listData = res.data.data;
} else {
that.listData = that.listData.concat(res.data.data);
}
},
});
},
},
};
</script>
<style lang="scss">
.coupon_r > image {
width: 32rpx;
height: 32rpx;
margin-left: 10rpx;
}
.coupon_r {
font-size: 24rpx;
/* font-family: 'zcq'; */
color: #333333;
}
.coupon_item_1 > view:nth-of-type(2) {
font-size: 16rpx;
color: #676767;
margin-top: 10rpx;
}
.coupon_item_1 > view:nth-of-type(1) {
font-size: 20rpx;
// font-weight: bold;
color: #333333;
}
.coupon_item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 0;
box-sizing: border-box;
// background-color: rgba(255, 255, 255, 0.08);
// margin-top: 20rpx;
// border-radius: 10rpx;
position: relative;
border-bottom: 1px solid #f3f3f3;
}
.coupon {
width: 690rpx;
margin: 20rpx auto;
/* background: #11141D;
box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7);
padding: 0 30rpx; */
box-sizing: border-box;
background-color: #ffffff;
padding: 0 32rpx;
border-radius: 16rpx;
/* border-radius: 20rpx; */
}
.qiehuan {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 16rpx;
width: 400rpx;
}
.qiehuan_line {
margin: -10rpx auto;
width: 30rpx;
height: 20rpx;
border-bottom: 4rpx solid #70ede8;
border-radius: 2rpx;
}
.qiehuan_line > image {
width: 30rpx;
height: 20rpx;
}
.qiehuan > view {
flex: 1;
text-align: center;
}
.wzs {
font-size: 34rpx;
color: rgba(255, 255, 255, 0.6);
}
.xzs {
font-size: 34rpx;
color: #ffffff;
}
.header {
width: 750rpx;
/* height: 176rpx; */
padding-bottom: 30rpx;
background: #222222;
font-size: 28rpx;
color: #333333;
box-sizing: border-box;
position: fixed;
/* #ifdef MP */
top: 0;
/* #endif */
/* #ifndef MP */
top: 88rpx;
/* #endif */
z-index: 15;
}
.content {
width: 100vw;
min-height: 100vh;
box-sizing: border-box;
background-color: #f7f7f7;
.head {
position: fixed;
top: 0;
z-index: 20;
.header_title {
height: 70rpx;
line-height: 70rpx;
width: 100%;
box-sizing: border-box;
font-weight: bold;
display: flex;
align-items: center;
padding-left: 30rpx;
box-sizing: border-box;
> view:nth-of-type(1) {
display: flex;
align-items: center;
}
> view:nth-of-type(2) {
width: 520rpx;
text-align: center;
/* margin: auto; */
}
image {
width: 48rpx;
height: 48rpx;
}
}
}
}
.tab-list {
display: flex;
padding: 30rpx;
.tab-list-item {
width: 88rpx;
height: 40rpx;
margin-right: 40rpx;
position: relative;
font-size: 20rpx;
font-weight: 400;
color: #333333;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
&.active {
font-weight: 400;
color: #333333;
background-color: #e6f791;
}
}
}
</style>