Commit e9b94162 by yuzhenWang

我的名片发生产

parent ef94dcd3
......@@ -98,6 +98,7 @@
console.log('currentRoute',currentRoute);
const whiteList = [
'/myPackageA/login/login',
'/myPackageA/businessCard/businessCard',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
......
......@@ -456,6 +456,10 @@ export default {
getShareBusinessCard(cardId) {
return request(`${apiURL}/business-card/view/${cardId}`, 'GET')
},
//查询名片状态
checkBusinessCradStatus(businessCardId) {
return request(`${apiURL}/business-card/isEnabled?businessCardId=${businessCardId}`, 'GET')
},
//获取分享名片统计
getCardStats(data) {
return request(`${apiURL}/business-card/stats/${data.cardId}?userId=${data.userId}`, 'GET')
......
......@@ -22,7 +22,8 @@
"qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2",
"uqrcodejs": "^4.0.7",
"vite-plugin-top-level-await": "^1.6.0"
"vite-plugin-top-level-await": "^1.6.0",
"weixin-js-sdk": "^1.6.5"
},
"devDependencies": {
"less": "^4.3.0"
......@@ -2921,6 +2922,11 @@
"node": ">=10.13.0"
}
},
"node_modules/weixin-js-sdk": {
"version": "1.6.5",
"resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.5.tgz",
"integrity": "sha512-Gph1WAWB2YN/lMOFB/ymb+hbU/wYazzJgu6PMMktCy9cSCeW5wA6Zwt0dpahJbJ+RJEwtTv2x9iIu0U4enuVSQ=="
},
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz",
......
......@@ -29,7 +29,8 @@
"qrcode": "^1.5.4",
"qrcodejs2": "^0.0.2",
"uqrcodejs": "^4.0.7",
"vite-plugin-top-level-await": "^1.6.0"
"vite-plugin-top-level-await": "^1.6.0",
"weixin-js-sdk": "^1.6.5"
},
"devDependencies": {
"less": "^4.3.0"
......
......@@ -42,6 +42,8 @@
}else if(landingPage == 'sfpIndex'){
uni.reLaunch({ url: `/sfp/index/index` })
}else if(landingPage == 'orderStatus'){
uni.reLaunch({ url: `/pages/orderStatus/orderStatus?orderStatus=2` })
}
} else {
uni.showToast({
......
......@@ -174,10 +174,12 @@
<script>
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
import {apiURL,companyInfo} from "@/environments/environment";
import {apiURL,companyInfo,shareURL} from "@/environments/environment";
import {nextTick} from "vue";
import common from '../../common/common';
import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
import dataHandling from "@/util/dataHandling";
import wx from 'weixin-js-sdk'
export default {
components: {
courseItem
......@@ -229,6 +231,7 @@
},
methods: {
goBack() {
uni.navigateBack({
delta: 1
......@@ -249,7 +252,8 @@
paymentType: '',
isPayOrAuth: '',
fileId: this.fileId,
companyType: companyInfo.companyType
companyType: companyInfo.companyType,
hiddenPage:'cffpH5Pay'
}
if (this.paymentMethod == 1) {
// APP:微信app支付
......@@ -307,6 +311,28 @@
param.paymentType = 2;
//deviceType:PC为1,移动端为2,微信为3
if (this.deviceType == 3) {
// 向小程序通信
// if(dataHandling.h5RuntimeEnv()=='wechat-miniprogram'){
// wx.miniProgram.navigateBack({
// delta:1
// })
// // 向小程序发送消息,只有触发后退,分享,复制的时候小程序才能接收消息
// wx.miniProgram.postMessage({
// data:{
// type:'pay',
// payInfo:param
// }
// })
// console.log('向小程序通信');
// // 跳转到小程序消息接收中转页面,拉起小程序的支付
// // wx.miniProgram.navigateTo({
// // url: `/myPackageA/h5Pay/appYdhomeofficePay?param=${encodeURIComponent(JSON.stringify(param))}`
// // })
// return
// }
let _this = this
param.isPayOrAuth = 1;
api.wxAuthorize(param).then((res) => {
......
......@@ -57,8 +57,8 @@
<view class="iconfont icon-youjiantou iconColor"></view>
</view>
</view>
<!-- 不是合伙人的角色可以看名片 v-if="customerBasicInfo.userIdentity&&customerBasicInfo.userIdentity!=='PARTNER'" -->
<!-- <view class="infoBody" v-if="customerBasicInfo.userIdentity&&customerBasicInfo.userIdentity!=='PARTNER'"
<!-- 有名片数据并且是启用状态可以看名片 -->
<view class="infoBody" v-if="showbusinessCard"
style="margin-top: 10rpx;" @click="businessCard()">
<view class="">
我的名片
......@@ -66,7 +66,7 @@
<view class="">
<view class="iconfont icon-youjiantou iconColor"></view>
</view>
</view> -->
</view>
<view class="kuaiBox" v-for="item in mainMenuLists" :key="item.id">
<view class="kuaiTit">
{{item.categoryName}}
......@@ -184,6 +184,7 @@
export default {
data() {
return {
showbusinessCard:false,//是否显示名片
mpCffp:'',
showMyName: '',
msgTotal: 0,
......@@ -401,6 +402,7 @@
restrictedTip
},
onShow() {
this.showbusinessCard = false
this.loginType = uni.getStorageSync('loginType')
if(uni.getStorageSync('mpCffp')){
this.mpCffp = uni.getStorageSync('mpCffp')
......@@ -584,7 +586,6 @@
this.bootpage = false
},
isLogin() {
console.log('11111');
uni.navigateTo({
url: '/myPackageA/login/login?from=personalCenter'
})
......@@ -839,6 +840,10 @@
api.queryInfo({ userId: uni.getStorageSync('cffp_userId') }).then(res => {
if (res['success']) {
this.customerBasicInfo = res['data'];
if(res['data']['businessCardId']){
// 检查名片状态
this.getBusissedCardStatus(res['data']['businessCardId'])
}
// id=03的权限设置
// 执行处理
......@@ -891,12 +896,14 @@
).then(res => {
if (res['success']) {
let cardStatus = res.data.data.cardStatus
if (cardStatus == '1') {
//未申请名片
uni.navigateTo({
url: '/myPackageA/noBusinessCard/noBusinessCard'
});
} else if (cardStatus == '2') {
// 为申请名片的情况,询问过后端,后端说业务已经不考虑这种情况
// if (cardStatus == '1') {
// //未申请名片
// uni.navigateTo({
// url: '/myPackageA/noBusinessCard/noBusinessCard'
// });
// }
if (cardStatus == '2') {
// 名片审核中
uni.showModal({
title: '提示',
......@@ -925,6 +932,22 @@
// url:'/myPackageA/noBusinessCard/noBusinessCard'
// });
},
// 查询名片状态
getBusissedCardStatus(businessCardId) {
api.checkBusinessCradStatus(businessCardId).then(res => {
if (res['success']) {
if(businessCardId&&res.data.data.status=='1'){
this.showbusinessCard = true
}
} else {
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
},
......
......@@ -55,6 +55,12 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe875;</span>
<div class="name">盾牌,安全,保护</div>
<div class="code-name">&amp;#xe875;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe501;</span>
<div class="name">重点人群统计</div>
<div class="code-name">&amp;#xe501;</div>
......@@ -516,9 +522,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1763109218794') format('woff2'),
url('iconfont.woff?t=1763109218794') format('woff'),
url('iconfont.ttf?t=1763109218794') format('truetype');
src: url('iconfont.woff2?t=1773642495782') format('woff2'),
url('iconfont.woff?t=1773642495782') format('woff'),
url('iconfont.ttf?t=1773642495782') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
......@@ -545,6 +551,15 @@
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-shield"></span>
<div class="name">
盾牌,安全,保护
</div>
<div class="code-name">.icon-shield
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zhongdianrenquntongji"></span>
<div class="name">
重点人群统计
......@@ -1239,6 +1254,14 @@
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shield"></use>
</svg>
<div class="name">盾牌,安全,保护</div>
<div class="code-name">#icon-shield</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zhongdianrenquntongji"></use>
</svg>
<div class="name">重点人群统计</div>
......
@font-face {
font-family: "iconfont"; /* Project id 4933433 */
src: url('iconfont.woff2?t=1763109218794') format('woff2'),
url('iconfont.woff?t=1763109218794') format('woff'),
url('iconfont.ttf?t=1763109218794') format('truetype');
src: url('iconfont.woff2?t=1773642495782') format('woff2'),
url('iconfont.woff?t=1773642495782') format('woff'),
url('iconfont.ttf?t=1773642495782') format('truetype');
}
.iconfont {
......@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-shield:before {
content: "\e875";
}
.icon-zhongdianrenquntongji:before {
content: "\e501";
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,13 @@
"description": "",
"glyphs": [
{
"icon_id": "18165054",
"name": "盾牌,安全,保护",
"font_class": "shield",
"unicode": "e875",
"unicode_decimal": 59509
},
{
"icon_id": "6008410",
"name": "重点人群统计",
"font_class": "zhongdianrenquntongji",
......
......@@ -405,4 +405,42 @@ export default{
}
return new Blob([u8arr], { type: mime });
},
/**
* 判断 H5 当前运行环境
* @returns {'h5-browser' | 'app' | 'wechat-miniprogram'}
*/
h5RuntimeEnv() {
const ua = navigator.userAgent.toLowerCase();
// 1. 微信小程序 WebView:关键特征是 userAgent 包含 "miniprogram"
// 注意:普通微信浏览器也有 wx 对象,但没有 miniprogram 标识
if (ua.includes('miniprogram')) {
return 'wechat-miniprogram';
}
// 2. uni-app 原生 App:注入了全局 `plus` 对象(DCloud 特有)
// 注意:必须用 typeof 检测,避免在非 App 环境下报错
if (typeof plus !== 'undefined') {
return 'app';
}
// 3. 其他情况:普通浏览器或标准 H5 环境
return 'h5-browser';
},
// 给手机号分隔
formatPhone(phone) {
// 先移除非数字字符(可选,增强健壮性)
const cleaned = ('' + phone).replace(/\D/g, '');
// 匹配 11 位手机号,并分组
const match = cleaned.match(/^(\d{3})(\d{4})(\d{4})$/);
console.log('match',match);
if (match) {
return `${match[1]} ${match[2]} ${match[3]}`;
}
// 如果不是合法 11 位手机号,原样返回或提示错误
return phone;
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import { initJssdkShare, setWechatShare } from '@/util/fiveshare';
// 页面白名单,不受拦截
const whiteList = [
'/myPackageA/login/login',
'/myPackageA/businessCard/businessCard',
'/pages/invitationRegister/invitationlogin',
'/myPackageA/applyFranchise/applyFranchise',
'/pages/applyFranchise/applyFranchise',
......
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