Commit 59fc4c16 by yuzhenWang

合并薪资单,发布测试

parents e073acad eb7b9350
......@@ -120,4 +120,4 @@
<script type="module" src="/main.js"></script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -5,7 +5,7 @@
<view class="wapperBox">
<view class="header">
<text class="title">薪资<text class="highlight">单</text></text>
<text class="title"><text class="highlight">积分</text></text>
<view class="year-badge" @click="showTime1=true">
<CommonTimePicker :timeData="startDate" :visible="showTime1" @confirmDate="changeStartTime"
@closeTime="showTime1=false" :showMonth="false" iconColor="#2A36AE"/>
......@@ -30,7 +30,7 @@
<!-- <text class="label">{{ item.statusName }}</text> -->
<view class="money" @click="showMoney(index)">
<text v-if="item.mask" class="mask-text">*****</text>
<text v-else class="real-text">¥ {{ item.paidAmount.toFixed(2) }}</text>
<text v-else class="real-text">{{ item.paidAmount.toFixed(2) }}(HKD)</text>
</view>
</view>
</view>
......@@ -44,31 +44,31 @@
<!-- <view style="border-top:2px solid #dce3ed; margin:0px 0;"></view> -->
<view class="detail-grid">
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.grossAmount">
<text class="label">应发金额</text>
<text class="value">{{ item.detail.grossAmount.toFixed(2) }} (HKD)</text>
</view>
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.mpfAmount">
<text class="label">MPF事项金额</text>
<text class="value">{{ item.detail.mpfAmount.toFixed(2) }} (HKD)</text>
</view>
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.otherAmount">
<text class="label">其他调整总金额</text>
<text class="value">{{ item.detail.otherAmount.toFixed(2) }} (HKD)</text>
</view>
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.paidAmount">
<text class="label">实发金额</text>
<text class="value">{{ item.detail.paidAmount.toFixed(2) }}(HKD)</text>
</view>
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.remark">
<text class="label">备注</text>
<text class="value txtValue">{{ item.detail.remark || '--'}}</text>
</view>
<view class="grid-row">
<view class="grid-row" v-if=" item.detail.otherRemark">
<text class="label">其他调整备注</text>
<text class="value txtValue">{{ item.detail.otherRemark || '--' }}</text>
</view>
<view class="grid-row" style="margin-bottom: 10rpx;">
<view class="grid-row" style="margin-bottom: 10rpx;" v-if=" item.detail.cancelRemark">
<text class="label">取消理由</text>
<text class="value txtValue">{{ item.detail.cancelRemark || '--' }}</text>
</view>
......@@ -92,33 +92,36 @@
<view class="detail-grid"
v-for="(bank,index) in item.detail.apiSalaryRemittanceFzDTO.salaryRemittanceDTOList"
:key="bank.salaryRemittanceBizId">
<view class="detail-title">
打款信息{{index+1}}
</view>
<view class="grid-row">
<text class="label">收款银行</text>
<text class="value txtValue">{{ bank.bankName}}</text>
</view>
<view class="grid-row">
<text class="label">账户尾号</text>
<text class="value">{{ bank.accountEndNo}}</text>
</view>
<view class="grid-row">
<text class="label">发放金额</text>
<text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text>
</view>
<view class="grid-row">
<text class="label">币种</text>
<text class="value">{{ bank.currency}}</text>
</view>
<view class="grid-row">
<text class="label">汇率</text>
<text class="value">{{ bank.exchangeRate.toFixed(4)}}</text>
</view>
<view class="grid-row">
<text class="label">备注</text>
<text class="value txtValue">{{ bank.remark || '--'}}</text>
<view class="" v-if="bank.amount">
<view class="detail-title">
打款信息{{index+1}}
</view>
<view class="grid-row">
<text class="label">收款银行</text>
<text class="value txtValue">{{ bank.bankName}}</text>
</view>
<view class="grid-row">
<text class="label">账户尾号</text>
<text class="value">{{ bank.accountEndNo}}</text>
</view>
<view class="grid-row">
<text class="label">发放金额</text>
<text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text>
</view>
<view class="grid-row">
<text class="label">币种</text>
<text class="value">{{ bank.currency}}</text>
</view>
<view class="grid-row">
<text class="label">汇率</text>
<text class="value">{{ bank.exchangeRate.toFixed(4)}}</text>
</view>
<view class="grid-row" v-if="bank.remark">
<text class="label">备注</text>
<text class="value txtValue">{{ bank.remark || '--'}}</text>
</view>
</view>
</view>
......
......@@ -9,7 +9,7 @@
<view class="banner" id="banner">
<!--头部技术支持组件-->
<!-- <commonHead></commonHead> -->
<image src="../../static/images/banner.png" mode="widthFix"></image>
<image src="../../static/images/banner.webp" mode="widthFix"></image>
</view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer" >
<form>
......@@ -191,7 +191,7 @@
<view v-if="resultInfos.code == 'B001' || resultInfos.code =='B002'" style="display: flex;align-items: center;">
<!-- <view style="display: flex;align-items: center;"> -->
<view style="margin-right: 16rpx;">
<image src="../../static/images/happy.png" mode="widthFix"></image>
<image src="../../static/images/happy.webp" mode="widthFix"></image>
</view>
<view>
<view>恭喜您!</view>
......@@ -201,7 +201,7 @@
<view v-if="resultInfos.code == 'A001' || resultInfos.code =='A002'" style="display: flex;align-items: center;">
<!-- <view style="display: flex;align-items: center;"> -->
<view style="margin-right: 16rpx;">
<image src="../../static/images/sad.png" mode="widthFix"></image>
<image src="../../static/images/sad.webp" mode="widthFix"></image>
</view>
<view>
<view>很遗憾!</view>
......@@ -226,8 +226,8 @@
</view>
<view class="line" v-for="houseItem in housePurchasePrices">
<view class="line_title">{{getResultTitle(houseItem.priceType)}}
<image src="../../static/images/can.png" v-show="houseItem.fvDifference <= 0" mode="widthFix"></image>
<image src="../../static/images/cannot.png" v-show="houseItem.fvDifference > 0" mode="widthFix"></image>
<image src="../../static/images/can.webp" v-show="houseItem.fvDifference <= 0" mode="widthFix"></image>
<image src="../../static/images/cannot.webp" v-show="houseItem.fvDifference > 0" mode="widthFix"></image>
</view>
<view class="content">
<view class="left">
......@@ -237,7 +237,7 @@
现值:{{numberConverter(houseItem.pvPriceRealization)}}元
</view> -->
</view>
<image src="../../static/images/vs.png" mode="widthFix"></image>
<image src="../../static/images/vs.webp" mode="widthFix"></image>
<view class="right">
<view class="realizable">你想要的</view>
<view>{{housePurchaseInfo.nyear}}年后:{{formatFloat(houseItem.fvPriceDesired/10000)}}万元</view>
......
// var wx = require("weixin-js-sdk/index.js") //引入刚下载的js文件
// import $H from '@/api/request.js' //封装好的接口请求
// import wx from 'weixin-js-sdk'
// fiveshare.ts
import api from "../api/api";
import {companyInfo,baseURL,shareURL} from "@/environments/environment";
let userInfo = {name:''}
if(uni.getStorageSync('cffp_userInfo')){
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
}
// 初始化SDK
export function initJssdkShare(callback, url) {
const WxConfigRequestVO = {
url: url,
systemType: uni.getStorageSync('addSystemType') || '1'
};
// 后端的自定义分享接口,拿到分享的appId、signature等信息
api.Wxshare(WxConfigRequestVO).then(res => {
jWeixin.config({
debug: false, // 生产环境关闭调试
appId: res.data.appId,
timestamp: res.data.timestamp,
nonceStr: res.data.nonceStr,
signature: res.data.signature,
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
import { shareURL } from "@/environments/environment";
jWeixin.ready(() => {
console.log('微信SDK初始化完成');
if (callback) callback();
});
let userInfo = { name: '' };
if (uni.getStorageSync('cffp_userInfo')) {
userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'));
}
jWeixin.error(err => {
console.error('微信SDK初始化失败', err);
});
});
// ===== 环境判断工具 =====
function isWechatBrowser(): boolean {
return /micromessenger/i.test(navigator.userAgent);
}
// 设置微信分享内容(不自动覆盖,需手动调用)
export function setWechatShare(data) {
console.log('分享data',data);
if (!jWeixin) {
console.error('微信SDK未初始化');
return;
}
if(!data){
const currentUrl = `${shareURL}/pages/index/index`;
data = {
title: '成为银盾合伙人,分享商品赚不停',
// desc: `${userInfo.name || ''}邀您加入【家庭财策师联盟】,资源+伙伴,共赢未来!`,
desc: `资源+伙伴,共赢未来!`,
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
};
}
jWeixin.ready(() => {
// 新API(推荐)
jWeixin.updateAppMessageShareData({
title: data.title,
desc: data.desc,
link: data.link,
imgUrl: data.imgUrl,
success: () => console.log('好友分享设置成功')
});
jWeixin.updateTimelineShareData({
title: data.title,
link: data.link,
imgUrl: data.imgUrl,
success: () => console.log('朋友圈分享设置成功')
function isMiniProgramWebView(): boolean {
// 检查微信环境变量
if (typeof window.__wxjs_environment !== 'undefined' && window.__wxjs_environment === 'miniprogram') {
return true;
}
// 检查 URL 参数
if (window.location.search.indexOf('from=miniprogram') > -1 ||
window.location.hash.indexOf('from=miniprogram') > -1) {
return true;
}
return false;
}
// ===== 确保微信 SDK 已加载 =====
function ensureWechatSDK(): Promise<void> {
return new Promise((resolve, reject) => {
// 如果已经有 jWeixin 且不是占位对象
// @ts-ignore
if (window.jWeixin && window.jWeixin.config !== function() { console.warn('[占位] wx.config'); }) {
resolve();
return;
}
// 如果已经有 wx(原生对象)
// @ts-ignore
if (typeof wx !== 'undefined' && wx.config) {
// @ts-ignore
window.jWeixin = wx;
resolve();
return;
}
// 动态加载微信 SDK
const script = document.createElement('script');
script.src = 'https://res2.wx.qq.com/open/js/jweixin-1.6.0.js';
script.onload = function() {
// @ts-ignore
if (typeof wx !== 'undefined') {
// @ts-ignore
window.jWeixin = wx;
console.log('✅ 微信 SDK 动态加载成功');
resolve();
} else {
reject(new Error('微信 SDK 加载失败'));
}
};
script.onerror = function() {
reject(new Error('微信 SDK CDN 加载失败'));
};
document.head.appendChild(script);
});
}
// ===== 初始化微信 SDK =====
export function initJssdkShare(callback: any, url: string) {
// 只在微信浏览器且非小程序环境中初始化
if (!isWechatBrowser() || isMiniProgramWebView()) {
console.log('当前环境不需要初始化微信 SDK:',
isWechatBrowser() ? '微信浏览器' : '非微信浏览器',
isMiniProgramWebView() ? '小程序 WebView' : '普通环境'
);
if (callback) callback();
return;
}
console.log('🔄 开始初始化微信 SDK...');
// 旧API(兼容)
jWeixin.onMenuShareAppMessage({
title: data.title,
desc: data.desc,
link: data.link,
imgUrl: data.imgUrl,
success: () => console.log('旧版分享设置成功')
ensureWechatSDK().then(() => {
// @ts-ignore
const wx = window.jWeixin || window.wx;
if (!wx) {
console.error('❌ 无法获取微信 SDK');
if (callback) callback();
return;
}
const WxConfigRequestVO = {
url: url || window.location.href.split('#')[0],
systemType: uni.getStorageSync('addSystemType') || '1'
};
api.Wxshare(WxConfigRequestVO).then(res => {
wx.config({
debug: false,
appId: res.data.appId,
timestamp: res.data.timestamp,
nonceStr: res.data.nonceStr,
signature: res.data.signature,
jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.ready(() => {
console.log('✅ 微信 SDK 初始化完成');
if (callback) callback();
});
wx.error((err: any) => {
console.error('❌ 微信 SDK 初始化失败', err);
if (callback) callback();
});
}).catch(err => {
console.error('❌ 获取微信签名失败', err);
if (callback) callback();
});
}).catch(err => {
console.error('❌ 微信 SDK 加载失败', err);
if (callback) callback();
});
});
}
// 在页面上直接调用此方法实现h5的自定义分享 data是穿的参数 url是当前页面的链接
export function hshare(data,url){
console.log('data,url',data,url);
// 确保分享的链接不包含时间戳
// initJssdkShare(data, url)
initJssdkShare(function(){
jWeixin.ready(function(){
var sharedata={
title: data.title, //标题
desc: data.desc, //描述
link: data.link ,//分享链接
imgUrl:data.imgUrl, //图片
success:(res=>{
})
};
jWeixin.updateAppMessageShareData(sharedata)//自定义微信分享给朋友
jWeixin.updateTimelineShareData(sharedata);//自定义微信分享给朋友
jWeixin.onMenuShareAppMessage(sharedata);//获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃)
})
},url)
}
// 新的分享方法 直接调起微信好友弹窗
// 设置微信分享内容并直接调起分享
export function setWechatShareDirectly(data) {
if (!jWeixin) {
console.error('微信SDK未初始化');
return;
}
if(!data){
// ===== 获取分享数据 =====
function getShareData(data?: any) {
if (data) return data;
const currentUrl = `${shareURL}/pages/index/index`;
data = {
title: '成为银盾合伙人,分享商品赚不停',
desc: `资源+伙伴,共赢未来!`,
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
return {
title: '成为银盾合伙人,分享商品赚不停',
desc: '资源+伙伴,共赢未来!',
link: currentUrl,
imgUrl: `${shareURL}/static/images/shareBg.png`
};
}
jWeixin.ready(() => {
// 尝试直接调起分享
}
// ===== 设置微信分享(主入口) =====
export function setWechatShare(data: any) {
console.log('📤 setWechatShare 被调用', data);
// 在小程序环境中,不执行微信分享
if (isMiniProgramWebView()) {
console.log('📱 小程序环境,跳过微信分享设置');
return;
}
// 在微信浏览器中执行
if (isWechatBrowser()) {
const shareData = getShareData(data);
// 确保 SDK 已加载
ensureWechatSDK().then(() => {
// @ts-ignore
const wx = window.jWeixin || window.wx;
if (!wx) {
console.error('❌ 微信 SDK 不可用');
return;
}
wx.ready(() => {
wx.updateAppMessageShareData({
title: shareData.title,
desc: shareData.desc,
link: shareData.link,
imgUrl: shareData.imgUrl,
success: () => console.log('✅ 好友分享设置成功'),
fail: (err: any) => console.error('❌ 好友分享设置失败', err)
});
wx.updateTimelineShareData({
title: shareData.title,
link: shareData.link,
imgUrl: shareData.imgUrl,
success: () => console.log('✅ 朋友圈分享设置成功'),
fail: (err: any) => console.error('❌ 朋友圈分享设置失败', err)
});
wx.onMenuShareAppMessage({
title: shareData.title,
desc: shareData.desc,
link: shareData.link,
imgUrl: shareData.imgUrl,
success: () => console.log('✅ 旧版分享设置成功')
});
});
}).catch(err => {
console.error('❌ SDK 加载失败,无法设置分享', err);
});
} else {
console.log('🌐 非微信环境,跳过微信分享设置');
}
}
// ===== hshare 主入口 =====
export function hshare(data: any, url: string) {
console.log('📤 hshare 被调用', data, url);
// 如果在非微信浏览器中,提示用户复制链接
if (!isWechatBrowser() || isMiniProgramWebView()) {
const shareData = getShareData(data);
// 降级方案:复制链接
fallbackShare(shareData);
return;
}
// 微信浏览器中执行分享
initJssdkShare(() => {
setWechatShare(data);
}, url);
}
// ===== 降级方案 =====
function fallbackShare(data: any) {
console.log('📋 降级方案:复制链接', data.link);
try {
// 注意:此接口需要特定权限,普通公众号可能无法使用
jWeixin.invoke('shareWechatMessage', {
title: data.title,
desc: data.desc,
link: data.link,
imgUrl: data.imgUrl
}, function(res) {
if(res.err_msg === 'shareWechatMessage:ok') {
console.log('分享成功');
// @ts-ignore
if (typeof uni !== 'undefined' && uni.setClipboardData) {
// @ts-ignore
uni.setClipboardData({
data: data.link,
success: () => {
// @ts-ignore
uni.showToast({
title: '链接已复制,请分享给好友',
icon: 'none'
});
}
});
} else if (navigator.clipboard) {
navigator.clipboard.writeText(data.link).then(() => {
alert('链接已复制,请分享给好友');
}).catch(() => {
alert('请复制链接: ' + data.link);
});
} else {
// fallback 到常规分享设置
setWechatShare(data);
alert('请复制链接: ' + data.link);
}
});
} catch (e) {
console.error('直接调起分享失败,使用常规分享', e);
// 常规分享设置
jWeixin.updateAppMessageShareData({
title: data.title,
desc: data.desc,
link: data.link,
imgUrl: data.imgUrl,
success: () => console.log('好友分享设置成功')
});
alert('请复制链接: ' + data.link);
}
});
}
// ===== 兼容旧方法 =====
export function setWechatShareDirectly(data: any) {
hshare(data, window.location.href);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment