init project
6
.idea/MarsCodeWorkspaceAppSettings.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||||
|
<option name="progress" value="1.0" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6484
package-lock.json
generated
89
package.json
@ -1,46 +1,107 @@
|
|||||||
{
|
{
|
||||||
"name": "ufutx_dma",
|
"name": "ufutx_fulllink",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "A WePY project",
|
"description": "ufutx 微信小程序项目(基于wepy 2.x)",
|
||||||
"main": "weapp/app.js",
|
"main": "weapp/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "npm run dev",
|
||||||
"dev": "./node_modules/.bin/wepy build --watch",
|
"dev": "./node_modules/.bin/wepy build --watch",
|
||||||
"build": "cross-env NODE_ENV=production ./node_modules/.bin/wepy build --no-cache ",
|
"build": "cross-env NODE_ENV=production ./node_modules/.bin/wepy build --no-cache ",
|
||||||
"clean": "rm -rf weapp",
|
"clean": "rm -rf weapp",
|
||||||
|
"lint": "eslint --ext .js,.wpy src/",
|
||||||
|
"lint:fix": "eslint --ext .js,.wpy src/ --fix",
|
||||||
|
"preview": "npm run build && wx-tools preview",
|
||||||
|
"deploy": "npm run build && wx-tools upload --version $npm_package_version --desc '自动上传'",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"wepy": {
|
"wepy": {
|
||||||
"module-a": false,
|
"module-a": false,
|
||||||
"./src/components/list": "./src/components/wepy-list.wpy"
|
"resolve": {
|
||||||
|
"alias": {
|
||||||
|
"@": "./src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compiler": {
|
||||||
|
"babel": {
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"@babel/preset-env",
|
||||||
|
{
|
||||||
|
"modules": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@wepy/babel-plugin-import-regenerator"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"less": {
|
||||||
|
"paths": [
|
||||||
|
"./src/styles"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"author": "mamba <dengzhifeng_63@163.com>",
|
"author": "mamba <dengzhifeng_63@163.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wepy/core": "^2.0.0-alpha.16",
|
"@wepy/core": "^2.1.0",
|
||||||
"@wepy/use-promisify": "^2.1.0",
|
"@wepy/use-promisify": "^2.1.0",
|
||||||
"@wepy/x": "^2.0.2",
|
"@wepy/x": "^2.1.0",
|
||||||
"@yolanda-qn/four-electrodes-report-lib-pe": "^1.1.5",
|
"@yolanda-qn/four-electrodes-report-lib-pe": "^1.1.5",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.10",
|
||||||
"miniprogram-slide-view": "0.0.3",
|
"miniprogram-slide-view": "0.0.3",
|
||||||
"nim-web-sdk-ng": "^10.3.1"
|
"nim-web-sdk-ng": "^10.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.0",
|
"@babel/core": "^7.23.0",
|
||||||
"@babel/preset-env": "^7.1.0",
|
"@babel/preset-env": "^7.23.0",
|
||||||
"@wepy/babel-plugin-import-regenerator": "0.0.2",
|
"@wepy/babel-plugin-import-regenerator": "0.0.2",
|
||||||
"@wepy/cli": "^2.0.0-alpha.28",
|
"@wepy/cli": "^2.1.0",
|
||||||
"@wepy/compiler-babel": "^2.0.1",
|
"@wepy/compiler-babel": "^2.1.0",
|
||||||
"@wepy/compiler-less": "^2.0.1",
|
"@wepy/compiler-less": "^2.1.0",
|
||||||
"babel-eslint": "^7.2.1",
|
"babel-eslint": "^7.2.3",
|
||||||
"cross-env": "^5.1.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^3.18.0",
|
"eslint": "^3.18.0",
|
||||||
"eslint-config-standard": "^7.1.0",
|
"eslint-config-standard": "^7.1.0",
|
||||||
"eslint-friendly-formatter": "^2.0.7",
|
"eslint-friendly-formatter": "^2.0.7",
|
||||||
"eslint-plugin-html": "^2.0.1",
|
"eslint-plugin-html": "^2.0.1",
|
||||||
"eslint-plugin-promise": "^3.5.0",
|
"eslint-plugin-promise": "^3.5.0",
|
||||||
"eslint-plugin-standard": "^2.0.1",
|
"eslint-plugin-standard": "^2.0.1",
|
||||||
"less": "^3.8.1",
|
"husky": "^7.0.4",
|
||||||
|
"less": "^3.13.1",
|
||||||
|
"lint-staged": "^11.2.6",
|
||||||
|
"prettier": "^2.8.8",
|
||||||
"wepy-cli-extend": "^1.0.3",
|
"wepy-cli-extend": "^1.0.3",
|
||||||
"wepy-eslint": "^1.5.3"
|
"wepy-eslint": "^1.5.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0 <17.0.0",
|
||||||
|
"npm": ">=6.0.0"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"iOS >= 9",
|
||||||
|
"Android >= 5",
|
||||||
|
"last 2 versions",
|
||||||
|
"not dead"
|
||||||
|
],
|
||||||
|
"overrides": {
|
||||||
|
"nim-web-sdk-ng": {
|
||||||
|
"vue": "^2.6.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "lint-staged"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js,wpy}": [
|
||||||
|
"eslint --fix",
|
||||||
|
"prettier --write"
|
||||||
|
],
|
||||||
|
"*.less": [
|
||||||
|
"prettier --write"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
src/app.wpy
@ -35,7 +35,7 @@ wepy.app({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
globalData: {
|
globalData: {
|
||||||
versions: 'v5.5.101', // 版本号
|
versions: 'v5.6.3', // 版本号
|
||||||
navBarHeight: 0, // 导航栏高度
|
navBarHeight: 0, // 导航栏高度
|
||||||
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
||||||
navTop: 0, // 胶囊距顶部间距
|
navTop: 0, // 胶囊距顶部间距
|
||||||
@ -258,29 +258,29 @@ navigationBarTextStyle: 'black'
|
|||||||
},
|
},
|
||||||
tabBar: {
|
tabBar: {
|
||||||
color: '#999999',
|
color: '#999999',
|
||||||
selectedColor: '#333333',
|
selectedColor: '#fa4d76',
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
borderStyle: 'black',
|
borderStyle: 'black',
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
pagePath: 'pages/tabBar/home',
|
pagePath: 'pages/tabBar/home',
|
||||||
selectedIconPath: './images/tabbar/homeActive.png',
|
selectedIconPath: './images/tabBar/tab_recommend_active.png',
|
||||||
iconPath: './images/tabbar/home.png',
|
iconPath: './images/tabBar/tab_recommend_normal.png',
|
||||||
text: '推荐'
|
text: '推荐'
|
||||||
}, {
|
}, {
|
||||||
pagePath: 'pages/tabBar/dynamic',
|
pagePath: 'pages/tabBar/dynamic',
|
||||||
selectedIconPath: './images/tabbar/attentionActive.png',
|
selectedIconPath: './images/tabBar/tab_discover_active.png',
|
||||||
iconPath: './images/tabbar/attention.png',
|
iconPath: './images/tabBar/tab_discover_normal.png',
|
||||||
text: '发现'
|
text: '发现'
|
||||||
}, {
|
}, {
|
||||||
pagePath: 'pages/tabBar/news',
|
pagePath: 'pages/tabBar/news',
|
||||||
selectedIconPath: './images/tabbar/messageActive.png',
|
selectedIconPath: './images/tabBar/tab_message_active.png',
|
||||||
iconPath: './images/tabbar/message.png',
|
iconPath: './images/tabBar/tab_message_normal.png',
|
||||||
text: '消息'
|
text: '消息'
|
||||||
}, {
|
}, {
|
||||||
pagePath: 'pages/tabBar/user',
|
pagePath: 'pages/tabBar/user',
|
||||||
selectedIconPath: './images/tabbar/myActive.png',
|
selectedIconPath: './images/tabBar/tab_mine_active.png',
|
||||||
iconPath: './images/tabbar/my.png',
|
iconPath: './images/tabBar/tab_mine_normal.png',
|
||||||
text: '我的'
|
text: '我的'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<view :class="{'~show':modalName == 'unlockModal'}" class="~cu-modal">
|
<view :class="{'~show':modalName == 'unlockModal'}" class="~cu-modal">
|
||||||
<view class="open_unlock_box" style="padding-top: 126rpx;">
|
<view class="open_unlock_box" style="padding-top: 126rpx;">
|
||||||
<image class="unlockPrompt_bg" src="https://images.ufutx.com/202106/01/3ae4aefd9aed69d6800ed12cac94fbb2.png" mode="widthFix"></image>
|
<image class="unlockPrompt_bg" src="https://images.ufutx.com/202106/01/3ae4aefd9aed69d6800ed12cac94fbb2.png" mode="widthFix"></image>
|
||||||
<image v-if="ios" class="unlock_bg" src="https://images.ufutx.com/202106/02/d398cbcc114dbfce26470db15d47716c.png" mode="widthFix" @tap="goTo('/pages/users/upgradeVIP?chat_user_id={{chat_user_id}}')"></image>
|
<image v-if="ios" class="unlock_bg" src="https://images.ufutx.com/202106/02/d398cbcc114dbfce26470db15d47716c.png" mode="widthFix" @tap="goTo('pages/users/upgradeVIP?chat_user_id={{chat_user_id}}')"></image>
|
||||||
<image v-else class="unlock_bg" src="https://images.ufutx.com/202106/02/d398cbcc114dbfce26470db15d47716c.png" mode="widthFix" @tap="determine('vipModal')"></image>
|
<image v-else class="unlock_bg" src="https://images.ufutx.com/202106/02/d398cbcc114dbfce26470db15d47716c.png" mode="widthFix" @tap="determine('vipModal')"></image>
|
||||||
<view class="font_24 color-666" style="padding: 16rpx 0 24rpx 0">
|
<view class="font_24 color-666" style="padding: 16rpx 0 24rpx 0">
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
src/images/tabBar/tab_discover_active.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/images/tabBar/tab_discover_normal.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/tabBar/tab_message_active.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/tabBar/tab_message_normal.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/tabBar/tab_mine_active.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/tabBar/tab_mine_normal.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/images/tabBar/tab_recommend_active.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/images/tabBar/tab_recommend_normal.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
16
src/mixins/aliyun-upload-sdk-1.0.1.min.js
vendored
@ -117,9 +117,6 @@ export default {
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
vm.errorOne = 1
|
vm.errorOne = 1
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
// wx.navigateBack({
|
|
||||||
// delta: 1
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-user">
|
<view class="page-user">
|
||||||
<view class=" bgs" style="background: #fff">
|
<view class=" bgs" style="background: #fff">
|
||||||
<userTitle :user.sync="user" :token.sync="token" :is_base_info.sync="is_base_info" @modalCity="modalCity" @modalInit="modalInit"></userTitle>
|
<userTitle :user.sync="user" :token.sync="token" :is_base_info.sync="is_base_info" @modalCity="modalCity"
|
||||||
|
@modalInit="modalInit"></userTitle>
|
||||||
<view class="bc_tab color-333">
|
<view class="bc_tab color-333">
|
||||||
<view class="text-center flo_l mainF" @tap="goto('/pages/users/friendlist?type=friend','好友')">
|
<view class="text-center flo_l mainF" @tap="goto('/pages/users/friendlist?type=friend','好友')">
|
||||||
<view class="bold font_32 text-black">{{ listCount.friend_count || '0' }}</view>
|
<view class="bold font_32 text-black">{{ listCount.friend_count || '0' }}</view>
|
||||||
@ -21,16 +22,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="Vipimgs"
|
<view class="Vipimgs"
|
||||||
style="background-image: url('https://image.fulllinkai.com/202201/12/4c83d3da9e0e2018f548755036c86a30.png');">
|
style="background-image: url('https://image.fulllinkai.com/202201/12/4c83d3da9e0e2018f548755036c86a30.png');"
|
||||||
|
@tap="goto('/pages/users/upgradeVIP')">
|
||||||
<block v-if="user.rank_id > 0">
|
<block v-if="user.rank_id > 0">
|
||||||
<view class="member">升级VIP尊贵特权</view>
|
<view class="member">升级VIP尊贵特权</view>
|
||||||
<veiw class="equities">{{ user.deadline }}到期</veiw>
|
<veiw class="equities">{{ user.deadline }}到期</veiw>
|
||||||
<view class="dredge bold" @tap="goto('/pages/users/upgradeVIP')">去续费</view>
|
<view class="dredge bold">去续费</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="member">开通VIP超级会员</view>
|
<view class="member">开通VIP超级会员</view>
|
||||||
<view class="equities">专享超值权益 >></view>
|
<view class="equities">专享超值权益 >></view>
|
||||||
<view class="dredge bold" @tap="goto('/pages/users/upgradeVIP')">去开通</view>
|
<view class="dredge bold">去开通</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="background: #FAF9F9;width: 100%;padding-top: 12rpx;position:relative;">-->
|
<!-- <view style="background: #FAF9F9;width: 100%;padding-top: 12rpx;position:relative;">-->
|
||||||
@ -41,7 +43,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="m_spr">
|
<view class="m_spr">
|
||||||
<view class="u_spr f-fbc">
|
<view class="u_spr f-fbc">
|
||||||
<view class=" ui-sprite-one f-fcc f-fdc" v-for="(item,index) in spriteList" :key="index" @tap="goto(item.path,item.title)">
|
<view class=" ui-sprite-one f-fcc f-fdc" v-for="(item,index) in spriteList" :key="index"
|
||||||
|
@tap="goto(item.path,item.title)">
|
||||||
<view class="ui-sprite-dot white text-center" v-if="item.count">{{ item.count }}</view>
|
<view class="ui-sprite-dot white text-center" v-if="item.count">{{ item.count }}</view>
|
||||||
<image class="u_spr_img" src="{{item.icon}}" mode="aspectFit"></image>
|
<image class="u_spr_img" src="{{item.icon}}" mode="aspectFit"></image>
|
||||||
<view class="u_spr_tt font_24 color333">{{ item.title }}</view>
|
<view class="u_spr_tt font_24 color333">{{ item.title }}</view>
|
||||||
@ -103,7 +106,9 @@
|
|||||||
<view class="m_mod_tips">
|
<view class="m_mod_tips">
|
||||||
<image class="u_mod_tips_img" src="https://images.ufutx.com/202106/25/b7b7d83be51f8edb348effe59f187435.png"
|
<image class="u_mod_tips_img" src="https://images.ufutx.com/202106/25/b7b7d83be51f8edb348effe59f187435.png"
|
||||||
mode="aspectFit" lazy-load="false"></image>
|
mode="aspectFit" lazy-load="false"></image>
|
||||||
<view class="font_32 color-333">“自我描述”、“期望对方”、“兴趣爱好”、“上传图片”不可留下个人联系方式,否则将会禁用你的账号,请及时修改</view>
|
<view class="font_32 color-333">
|
||||||
|
“自我描述”、“期望对方”、“兴趣爱好”、“上传图片”不可留下个人联系方式,否则将会禁用你的账号,请及时修改
|
||||||
|
</view>
|
||||||
<view class="m_mod_tips_bu f-fcc">
|
<view class="m_mod_tips_bu f-fcc">
|
||||||
<view class="u_mod_tips_bu f-fcc font_32 white" @tap="gotoPage(2,'/pages/users/unmarriV2')">修改</view>
|
<view class="u_mod_tips_bu f-fcc font_32 white" @tap="gotoPage(2,'/pages/users/unmarriV2')">修改</view>
|
||||||
</view>
|
</view>
|
||||||
@ -123,7 +128,9 @@
|
|||||||
mode="aspectFill"></image>
|
mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_36 color-333 bold">头像未通过审核</view>
|
<view class="font_36 color-333 bold">头像未通过审核</view>
|
||||||
<view class="reason_prompt font_28 color-666">由于头像不真实或模糊或非正脸或含有违规,将无法得到配对,赶紧换个新头像吧!</view>
|
<view class="reason_prompt font_28 color-666">
|
||||||
|
由于头像不真实或模糊或非正脸或含有违规,将无法得到配对,赶紧换个新头像吧!
|
||||||
|
</view>
|
||||||
<view class="replace_avatar" @tap="replacePhoto">更换头像</view>
|
<view class="replace_avatar" @tap="replacePhoto">更换头像</view>
|
||||||
<view style="padding-bottom: 52rpx;">
|
<view style="padding-bottom: 52rpx;">
|
||||||
<view class="symbol">*</view>
|
<view class="symbol">*</view>
|
||||||
@ -166,9 +173,26 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- iOS支持购买提示弹框 -->
|
||||||
|
<view :class="{'show':showIOSSupportModal}" class="cu-modal">
|
||||||
|
<view class="ios_support_modal_box">
|
||||||
|
<view class="promptTitle font_34 color-333 bold">💖 苹果端小程序购买功能上线啦</view>
|
||||||
|
<view class="font_32 color-333"
|
||||||
|
style="margin: 0 50rpx; text-align: center; letter-spacing:2em;line-height: 1.5; text-align: left;">
|
||||||
|
谢谢家人们一直以来的支持与陪伴🥰 福恋小程序苹果端现已全面开放全部服务购买,快来解锁专属权益,助力脱单吧!
|
||||||
|
</view>
|
||||||
|
<view class="ios_support_btn_box">
|
||||||
|
<view class="ios_support_button_known font_30" @tap="hideIOSSupportModal">知道啦</view>
|
||||||
|
<view class="ios_support_button_buy font_30 white" @tap="goToBuyService">前往购买</view>
|
||||||
|
</view>
|
||||||
|
<image class="loginCancelIcon" src="https://images.ufutx.com/202103/17/1033c7b52cacddcebe999cefc6ad2c9b.png"
|
||||||
|
mode="widthFix" @tap="hideIOSSupportModal"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<block v-if="posterConfig">
|
<block v-if="posterConfig">
|
||||||
<!-- 生成海报-->
|
<!-- 生成海报-->
|
||||||
<poster type="2d" id="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}" bind:success="onPosterSuccess" bind:fail="onPosterFail">
|
<poster type="2d" id="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}"
|
||||||
|
bind:success="onPosterSuccess" bind:fail="onPosterFail">
|
||||||
</poster>
|
</poster>
|
||||||
<!-- 分享微信卡片-->
|
<!-- 分享微信卡片-->
|
||||||
<poster type="2d" id="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"
|
<poster type="2d" id="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"
|
||||||
@ -181,10 +205,12 @@
|
|||||||
<visitorModel :showVisitorModel="showVisitorModel" @closeFn="visitorClose">
|
<visitorModel :showVisitorModel="showVisitorModel" @closeFn="visitorClose">
|
||||||
<!-- 访客弹框-->
|
<!-- 访客弹框-->
|
||||||
</visitorModel>
|
</visitorModel>
|
||||||
<canvas canvas-id="shareCanvas" class="canvas" style="width: {{width}}px; height: {{height}}px; position: fixed; top: -999999px;"></canvas>
|
<canvas canvas-id="shareCanvas" class="canvas"
|
||||||
|
style="width: {{width}}px; height: {{height}}px; position: fixed; top: -999999px;"></canvas>
|
||||||
<!-- <loginTips :tokenShow.sync="tokenShow" @loginCut.user="loginCut"></loginTips>-->
|
<!-- <loginTips :tokenShow.sync="tokenShow" @loginCut.user="loginCut"></loginTips>-->
|
||||||
|
|
||||||
<chooseImageTips :chooseShow.sync="chooseShow" :jumpString.sync="jumpString" :photo.sync="user.photo" @hideCut.user="hideCut"></chooseImageTips>
|
<chooseImageTips :chooseShow.sync="chooseShow" :jumpString.sync="jumpString" :photo.sync="user.photo"
|
||||||
|
@hideCut.user="hideCut"></chooseImageTips>
|
||||||
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -193,9 +219,9 @@
|
|||||||
import https from '../../mixins/https'
|
import https from '../../mixins/https'
|
||||||
import base from '../../mixins/base'
|
import base from '../../mixins/base'
|
||||||
import {service} from '../../config.js'
|
import {service} from '../../config.js'
|
||||||
|
import {getPhoneNumber} from '../../utils/util'
|
||||||
|
|
||||||
const app = getApp().$wepy.$options
|
const app = getApp().$wepy.$options
|
||||||
import {getPhoneNumber} from '../../utils/util'
|
|
||||||
|
|
||||||
wepy.page({
|
wepy.page({
|
||||||
mixins: [base, https],
|
mixins: [base, https],
|
||||||
@ -203,6 +229,7 @@
|
|||||||
posterConfig: null,
|
posterConfig: null,
|
||||||
posterConfig1: null,
|
posterConfig1: null,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
showIOSSupportModal: false,
|
||||||
shareConfig: {
|
shareConfig: {
|
||||||
width: 750,
|
width: 750,
|
||||||
height: 1334,
|
height: 1334,
|
||||||
@ -387,6 +414,7 @@
|
|||||||
vm.token = wx.getStorageSync('token')
|
vm.token = wx.getStorageSync('token')
|
||||||
console.log(vm.token, 'token====')
|
console.log(vm.token, 'token====')
|
||||||
vm.is_base_info = getApp().$wepy.$options.globalData.is_base_info
|
vm.is_base_info = getApp().$wepy.$options.globalData.is_base_info
|
||||||
|
this.checkAndShowIOSSupportModal()
|
||||||
// vm.getorderDetail()
|
// vm.getorderDetail()
|
||||||
console.log('33333JJJJ')
|
console.log('33333JJJJ')
|
||||||
// if (!vm.token) {
|
// if (!vm.token) {
|
||||||
@ -454,7 +482,36 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// 在 methods 中添加
|
||||||
|
goToBuyService() {
|
||||||
|
this.showIOSSupportModal = false
|
||||||
|
// 记录已经展示过
|
||||||
|
wx.setStorageSync('has_shown_ios_support_modal', true)
|
||||||
|
// 跳转到会员中心/服务购买页面
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/users/upgradeVIP' // 或者升级VIP2页面:'/pages/users/upgradeVIP2'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkAndShowIOSSupportModal() {
|
||||||
|
// 获取系统信息
|
||||||
|
const systemInfo = wx.getSystemInfoSync()
|
||||||
|
const isIOS = systemInfo.system.toLowerCase().includes('ios')
|
||||||
|
// 检查是否已经展示过
|
||||||
|
const hasShown = wx.getStorageSync('has_shown_ios_support_modal')
|
||||||
|
|
||||||
|
// 只在iOS设备且未展示过时显示
|
||||||
|
if (isIOS && !hasShown) {
|
||||||
|
// 延迟显示,避免与其他弹框冲突
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showIOSSupportModal = true
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideIOSSupportModal() {
|
||||||
|
this.showIOSSupportModal = false
|
||||||
|
// 记录已经展示过
|
||||||
|
wx.setStorageSync('has_shown_ios_support_modal', true)
|
||||||
|
},
|
||||||
getNewCount() {
|
getNewCount() {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => {
|
||||||
@ -1290,7 +1347,7 @@
|
|||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
|
|
||||||
.promptTitle {
|
.promptTitle {
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login_button {
|
.login_button {
|
||||||
@ -1430,8 +1487,10 @@
|
|||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
padding: 24rpx 30rpx 26rpx;
|
padding: 24rpx 30rpx 26rpx;
|
||||||
|
|
||||||
.ui-sprite-one {
|
.ui-sprite-one {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.ui-sprite-dot {
|
.ui-sprite-dot {
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
line-height: 34rpx;
|
line-height: 34rpx;
|
||||||
@ -1445,6 +1504,7 @@
|
|||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.u_spr_img {
|
.u_spr_img {
|
||||||
width: 74rpx;
|
width: 74rpx;
|
||||||
height: 74rpx;
|
height: 74rpx;
|
||||||
@ -1456,6 +1516,62 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ios_support_modal_box {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
width: 600rpx;
|
||||||
|
max-width: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
|
||||||
|
.promptTitle {
|
||||||
|
padding: 40rpx 0 20rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ios_support_btn_box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 30rpx;
|
||||||
|
margin: 32rpx auto 30rpx auto;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ios_support_button_known {
|
||||||
|
flex: 1;
|
||||||
|
height: 72rpx;
|
||||||
|
line-height: 72rpx;
|
||||||
|
border-radius: 36rpx;
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #666666;
|
||||||
|
text-align: center;
|
||||||
|
border: 1rpx solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ios_support_button_buy {
|
||||||
|
flex: 1;
|
||||||
|
height: 72rpx;
|
||||||
|
line-height: 72rpx;
|
||||||
|
border-radius: 36rpx;
|
||||||
|
background: #ff5380;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loginCancelIcon {
|
||||||
|
width: 48rpx;
|
||||||
|
height: 48rpx;
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 80rpx;
|
||||||
|
margin-left: -24rpx;
|
||||||
|
z-index: 99;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<config>
|
<config>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,57 +4,76 @@
|
|||||||
<view slot="content">会员中心</view>
|
<view slot="content">会员中心</view>
|
||||||
</cuCustom>
|
</cuCustom>
|
||||||
<view class="_bc-user animation-slide-top">
|
<view class="_bc-user animation-slide-top">
|
||||||
<image class="userinfo-avatar flo_l" src="{{user.photo}}" mode="aspectFill"/>
|
<image class="userinfo-avatar flo_l"
|
||||||
<view class="white flo_l font_32 userinfo-name">
|
src="{{user.photo || 'https://images.health.ufutx.com/202512/24/3315457eba4b799ac08e62937da4d44c.png'}}"
|
||||||
<span class="bold">{{user.nickname}} </span>
|
mode="aspectFill"/>
|
||||||
<block v-if="user.rank_id > 0">
|
<view class="white font_32 userinfo-name">
|
||||||
<image class="icon" src="https://images.ufutx.com/202004/09/ce3522d17ae95986b88a1e6d07b12c4e.png" mode="aspectFill"/>
|
<span class="bold">{{ user.nickname || '未登录' }} </span>
|
||||||
|
<view v-if="user.rank_id > 0&&user.nickname !== ''" style="align-items: center">
|
||||||
|
<image class="icon" src="https://images.health.ufutx.com/202512/25/a5090c7c826ced490ef7a46970370441.png"
|
||||||
|
mode="aspectFill"/>
|
||||||
<span class="orange font_22">超级会员</span>
|
<span class="orange font_22">超级会员</span>
|
||||||
</block>
|
</view>
|
||||||
<block v-else>
|
<view v-else style="align-items: center">
|
||||||
<image class="icon" src="https://images.ufutx.com/202004/10/eb8b12c7330f16b732d47baef2012906.png" mode="aspectFill"/>
|
<image class="icon" src="https://images.health.ufutx.com/202512/25/99739ecee928d7dfbe939fa588aa699b.png"
|
||||||
|
mode="aspectFill"/>
|
||||||
<span class="white font_22">普通会员</span>
|
<span class="white font_22">普通会员</span>
|
||||||
</block>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_24 white flo_l" style="color: #f7e4ad;width: 70%; ">
|
<view class="font_24 white flo_l" style="color: #f7e4ad;width: 70%; ">
|
||||||
{{ user.deadline_str ? user.deadline_str + ' 到期' : '未激活' }}
|
{{ user.deadline_str ? user.deadline_str + ' 到期' : '未激活' }}
|
||||||
</view>
|
</view>
|
||||||
<swiper class="card-swiper" circular="true" bindchange="cardSwiper">
|
<swiper class="card-swiper" circular="true" @change="cardSwiper">
|
||||||
<swiper-item v-for="(item,index) in rankList" :key="index" class="{{cardCur==index?'cur':''}}" @tap="showFn(index)">
|
<swiper-item v-for="(item,index) in rankList" :key="index" class="{{cardCur==index?'cur':''}}"
|
||||||
<view class="swiper-item radius shadow margin-top bg-grey {{item.id?'':'bg-grey'}}">
|
@tap="showFn(index)">
|
||||||
<image src="{{item.pic}}" mode="aspectFill"></image>
|
<view class="swiper-item radius shadow " style="border-radius: 0">
|
||||||
<!--<video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" v-if="item.type=='video'}}"></video>-->
|
<image src="{{system === 'iOS' ? (item.ios_pic || item.pic) : item.pic}}" mode="aspectFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="mainWrapper animation-slide-bottom">
|
<view class="mainWrapper animation-slide-bottom bg_f">
|
||||||
<view class="font_30 bold color-333 title">会员套餐权益:</view>
|
<view class="title _vipRights">会员套餐权益:</view>
|
||||||
<view class="scroll-wrapper">
|
<view class="scroll-wrapper">
|
||||||
<scroll-view scroll-x="{{true}}" scroll-with-animation style="height: 264rpx;">
|
<scroll-view scroll-x="{{true}}" scroll-with-animation>
|
||||||
<view class="inline-block text-center scroll-item " v-for="(item,index) in specialVIP.feature_arr" :key="index">
|
<view class="inline-block text-center scroll-item " v-for="(item,index) in specialVIP.feature_arr" :key="index">
|
||||||
<image :src="item.icon" mode="aspectFit" class="featureIcon"></image>
|
<image :src="item.icon" mode="aspectFit" class="featureIcon"></image>
|
||||||
<view class="font_22">{{item.text}}</view>
|
<view class="font_24" style="margin-top: 6px;color: #AC7B5C;font-weight: 500;">{{ item.text }}</view>
|
||||||
<view class="font_22" style="color: #B15E00">{{ item.sub_text }}</view>
|
<view class="font_22" style="color: #B15E00">{{ item.sub_text }}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mainWrapper" >
|
<view class="mainWrapper" >
|
||||||
<view class="font_30 bold color-333 title">会员说明:</view>
|
<view class="font_30 bold color-333 title"
|
||||||
|
style="border-radius: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 10px;
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background: linear-gradient(270deg, #E6C7AB 0%, #F5E6D8 100%);">
|
||||||
|
会员说明:
|
||||||
|
</view>
|
||||||
<view class="ruleBox">
|
<view class="ruleBox">
|
||||||
<block v-if="specialVIP">
|
<block v-if="specialVIP">
|
||||||
<view class="font_24 color-666" v-for="(item,index) in (specialVIP.explain_arr || specialVIP.discount_desc)" :key="index">{{item}}</view>
|
<view class="font_24 color-666" style="line-height: 20px;font-weight: 400;"
|
||||||
|
v-for="(item,index) in (specialVIP.explain_arr || specialVIP.discount_desc)"
|
||||||
|
:key="index">{{ item }}
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<view class="font_24 color-666 placeholderStyle" v-for="item in 5" :key="item" style="width:{{100/index}}%"></view>
|
<view class="font_24 color-666 placeholderStyle" v-for="item in 5" :key="item"
|
||||||
|
style="width:{{100/index}}%"></view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view style="height: 42px"></view>
|
||||||
|
<!-- 支付按钮:全端统一显示 -->
|
||||||
<view class="payBtn" @tap="showFn()">
|
<view class="payBtn" @tap="showFn()">
|
||||||
<view class="l_text">
|
<view class="l_text">
|
||||||
<span class="font_32 bold">
|
<span >
|
||||||
<span>¥</span>{{payData.discount_price}}
|
合计: <span style="color: #FF2946">¥</span><span class="price">{{ payData.discount_price }}</span>
|
||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="r_text">
|
<view class="r_text">
|
||||||
@ -63,6 +82,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="cu-modal {{modalName=='Modal'?'show':''}}">
|
<view class="cu-modal {{modalName=='Modal'?'show':''}}">
|
||||||
<view class="cu-dialog">
|
<view class="cu-dialog">
|
||||||
<view class="cu-bar bg-white justify-end">
|
<view class="cu-bar bg-white justify-end">
|
||||||
@ -72,36 +92,41 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="padding-xl">
|
<view class="padding-xl">
|
||||||
由于相关规范,ios小程序此功能暂不可用
|
支付异常,请重试
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 弹框-->
|
<!-- 支付弹框 -->
|
||||||
<view class="cu-modal bottom-modal {{modalName=='DialogModal'?'show':''}}">
|
<view class="cu-modal bottom-modal {{modalName=='DialogModal'?'show':''}}">
|
||||||
<view class="cu-dialog bg-white" style="border-radius: 24rpx 24rpx 0px 0px;">
|
<view class="cu-dialog bg-white" style="border-radius: 24rpx 24rpx 0px 0px;">
|
||||||
<view class="cu-bar justify-end">
|
<view class="cu-bar justify-end">
|
||||||
<view class="content color333 bold">支付信息</view>
|
<view class="content color333 bold" style="font-size: 36rpx;color: #0E0E0E;">支付信息</view>
|
||||||
<view class="action" bindtap="hideModal">
|
<view class="action" bindtap="hideModal">
|
||||||
<text class="cuIcon-close" style="color:#C2C2C2;font-size: 44rpx !important;"></text>
|
<text class="cuIcon-close" style="color:#C2C2C2;font-size: 44rpx !important;"></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="background-color: white;padding: 20rpx 0 0 0;">
|
<view class="" style="background-color: white;padding: 20rpx 0 0 0;">
|
||||||
|
<view class="text-c">
|
||||||
|
<span class="color-333">¥</span>
|
||||||
|
<span class="value bold color333" style="font-size: 60rpx;font-weight: 700;"
|
||||||
|
v-if="wxPayShow == 'cash'">{{ payData.discount_price }}</span>
|
||||||
|
<span class="value bold color333" style="font-size: 60rpx;font-weight: 700;"
|
||||||
|
v-else>{{ deductionPrice > 0 ? deductionPrice : '0.00' }}</span>
|
||||||
|
</view>
|
||||||
<view class="text-left f-fcc">
|
<view class="text-left f-fcc">
|
||||||
<span class="value color-999 font_24" style="text-decoration: line-through;" >原价:¥{{payData.price}}</span>
|
<span class="font_24" style="color: #3C2913;text-decoration-line: line-through;">原价:¥{{ payData.price }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-xl text-left f-fcc">
|
<view class="item-xl text-left f-fcc">
|
||||||
<span class="value bold color333" style="font-size: 52rpx;line-height: 52rpx;" v-if="wxPayShow == 'cash'">¥{{payData.discount_price}}</span>
|
<span class="font_24" style="color: #66676C;">{{ payData.title }}</span>
|
||||||
<span class="value bold color333" style="font-size: 52rpx;line-height: 52rpx;" v-else>¥{{deductionPrice>0?deductionPrice:'0.00'}}</span>
|
|
||||||
</view>
|
|
||||||
<view class="item-xl text-left f-fcc">
|
|
||||||
<span class="value color-999 font_24">{{payData.title}}</span>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="m_payData f-fbc" @tap="payChoice('cash')">
|
<view class="m_payData f-fbc" @tap="payChoice('cash')">
|
||||||
<view class="f-fc">
|
<view class="f-fc">
|
||||||
<image class="u_payData_img" src="https://images.ufutx.com/202106/23/886f1118c820849fae35b3412930a5a2.png" mode="aspectFit" lazy-load="true"></image>
|
<image class="u_payData_img" src="https://images.health.ufutx.com/202512/25/5bcd5b54fc5325aa50e841e0cf9542d0.png"
|
||||||
<view class="font_28 color333">微信支付</view>
|
mode="aspectFit" lazy-load="true"></image>
|
||||||
|
<view class="font_28" style="color: #0E0E0E;">微信支付</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="https://images.ufutx.com/202106/23/9dd9dc41e3689d92a280740bc99f3c32.png" mode="aspectFit" class="iconV2"></image>
|
<image src="https://images.health.ufutx.com/202512/25/911f75d508bc6c0de593fbb815a2c479.png" mode="aspectFit"
|
||||||
|
class="iconV2"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="m_pay_bu f-fcc">
|
<view class="m_pay_bu f-fcc">
|
||||||
@ -109,19 +134,28 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 帮助弹窗 -->
|
||||||
<view :class="{'show': modalName == 'showTips' }" class="cu-modal">
|
<view :class="{'show': modalName == 'showTips' }" class="cu-modal">
|
||||||
<view class="tips_box">
|
<view class="tips_box">
|
||||||
<view class="font_34 bold color333">iOS暂不支持该功能</view>
|
|
||||||
<view class="qrcode_icon-box f-fcc">
|
<view class="qrcode_icon-box f-fcc">
|
||||||
<image class="qrcode_icon" src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQGe8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyQkc1MzBXWUxiUy0xMDAwMHcwN2IAAgQHm1JnAwQAAAAA" mode="widthFix" show-menu-by-longpress="true"></image>
|
<image class="qrcode_icon"
|
||||||
|
src="https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQGe8TwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyQkc1MzBXWUxiUy0xMDAwMHcwN2IAAgQHm1JnAwQAAAAA"
|
||||||
|
mode="widthFix" show-menu-by-longpress="true"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="font_26 color666">长按识别二维码</view>
|
<view class="font_26 color666">长按识别二维码</view>
|
||||||
<view class="font_26 color666">前往公众号获取帮助</view>
|
<view class="font_26 color666">前往公众号获取帮助</view>
|
||||||
<image class="cancelIcon" src="https://images.ufutx.com/202103/17/1033c7b52cacddcebe999cefc6ad2c9b.png" mode="widthFix" @tap="modalName = ''"></image>
|
<image class="cancelIcon" src="https://images.ufutx.com/202103/17/1033c7b52cacddcebe999cefc6ad2c9b.png"
|
||||||
|
mode="widthFix" @tap="modalName = ''"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 120rpx;"></view>
|
<view style="height: 120rpx;"></view>
|
||||||
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||||
|
<view>
|
||||||
|
<image class="service_icon"
|
||||||
|
@click.stop="modalName = 'showTips'"
|
||||||
|
src="https://images.health.ufutx.com/202512/25/2b7e5a6065f1f1cbe921b4c24117732e.png"
|
||||||
|
mode="widthFix" show-menu-by-longpress="true"></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -151,16 +185,16 @@
|
|||||||
price: '',
|
price: '',
|
||||||
remain_amount: '',
|
remain_amount: '',
|
||||||
title: ''
|
title: ''
|
||||||
}, // 支付信息
|
},
|
||||||
rank: [],
|
rank: [],
|
||||||
rankData: [],
|
rankData: [],
|
||||||
price: 0,
|
price: 0,
|
||||||
score: 0,
|
score: 0,
|
||||||
rankList: [],
|
rankList: [],
|
||||||
modalName: '', // 弹框支付
|
modalName: '',
|
||||||
chat_user_id: '',
|
chat_user_id: '',
|
||||||
trade_no: '', // 订单号
|
trade_no: '',
|
||||||
system: '', // 机型
|
system: '', // 系统类型 iOS/Android
|
||||||
share_type: '',
|
share_type: '',
|
||||||
shareId: '',
|
shareId: '',
|
||||||
timeID: -1,
|
timeID: -1,
|
||||||
@ -168,7 +202,7 @@
|
|||||||
paymentAmount: 0,
|
paymentAmount: 0,
|
||||||
coinMoney: 0,
|
coinMoney: 0,
|
||||||
deductionPrice: 0,
|
deductionPrice: 0,
|
||||||
bgVip: 'background: #333333;\ncolor: white',
|
bgVip: 'background: #171718;\ncolor: white',
|
||||||
loginShow: false
|
loginShow: false
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -178,8 +212,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
// 初始化页面数据
|
|
||||||
// this.$parent.getTracker(this.$root.$name, this.config.navigationBarTitleText)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@ -190,46 +222,35 @@
|
|||||||
this.chat_user_id = e.chat_user_id
|
this.chat_user_id = e.chat_user_id
|
||||||
}
|
}
|
||||||
this.rankList = []
|
this.rankList = []
|
||||||
|
// 获取系统类型
|
||||||
this.system = app.globalData.systemInfo.system.split(' ')[0]
|
this.system = app.globalData.systemInfo.system.split(' ')[0]
|
||||||
this.getPageData()
|
this.getPageData()
|
||||||
},
|
},
|
||||||
|
|
||||||
onPullDownRefresh() {},
|
onPullDownRefresh() {
|
||||||
|
},
|
||||||
|
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
let that = this
|
let that = this
|
||||||
let openid = wx.getStorageSync('openid')
|
let openid = wx.getStorageSync('openid')
|
||||||
let fromUserID = wx.getStorageSync('user_id')
|
let fromUserID = wx.getStorageSync('user_id')
|
||||||
let url = `/pages/users/upgradeVIP?from_openid=${openid}&share_user_id=${that.id}&share_type=share&from_user_id=${fromUserID}`
|
let url = `/pages/users/upgradeVIP?from_openid=${openid}&share_user_id=${that.id}&share_type=share&from_user_id=${fromUserID}`
|
||||||
console.log(url)
|
|
||||||
return {
|
return {
|
||||||
title: '会员中心',
|
title: '会员中心',
|
||||||
path: url,
|
path: url,
|
||||||
imageUrl: 'https://images.ufutx.com/202004/10/9d3829a6ad06cf95b32806fbc4f7dd94.png',
|
imageUrl: 'https://images.ufutx.com/202004/10/9d3829a6ad06cf95b32806fbc4f7dd94.png',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
wx.showToast({
|
wx.showToast({ title: '转发成功', icon: 'success' })
|
||||||
title: '转发成功',
|
|
||||||
icon: 'success',
|
|
||||||
duration: 1500
|
|
||||||
})
|
|
||||||
var shareTickets = res.shareTickets
|
|
||||||
if (shareTickets.length == 0) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
fail: function(res) {
|
fail: function (res) {}
|
||||||
// 转发失败
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
cardCur() {
|
cardCur() {
|
||||||
this.payData.title = `超级会员(${this.rankList[this.cardCur].name})`
|
this.payData.title = `超级会员(${this.rankList[this.cardCur].name})`
|
||||||
this.payData.price = this.rankList[this.cardCur].price
|
this.payData.price = this.rankList[this.cardCur].price
|
||||||
this.payData.discount_price = this.rankList[this.cardCur].discount_price
|
this.payData.discount_price = this.rankList[this.cardCur].discount_price
|
||||||
console.log(this.payData.discount_price, 'this.payData.discount_price')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -244,28 +265,15 @@
|
|||||||
vm.$get({url: `${service.host}/rank/list`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/rank/list`}).then(({code, data}) => {
|
||||||
vm.user = data.rank_info
|
vm.user = data.rank_info
|
||||||
let {type, is_subscribe} = wx.getStorageSync('userInfo')
|
let {type, is_subscribe} = wx.getStorageSync('userInfo')
|
||||||
// let userInfo = {
|
|
||||||
// nickName: vm.user.nickname,
|
|
||||||
// avatarUrl: vm.user.avatar,
|
|
||||||
// type,
|
|
||||||
// id: vm.user.id,
|
|
||||||
// is_subscribe,
|
|
||||||
// rank_id: vm.user.rank_id
|
|
||||||
// }
|
|
||||||
// wx.setStorageSync('userInfo', userInfo)
|
|
||||||
vm.specialVIP = data.ranks
|
vm.specialVIP = data.ranks
|
||||||
console.log(data, 'aaaaaaaa')
|
|
||||||
vm.rankList = []
|
vm.rankList = []
|
||||||
data.ranks.sub_ranks.forEach((item, index) => {
|
data.ranks.sub_ranks.forEach((item) => {
|
||||||
vm.rankList.push(item)
|
vm.rankList.push(item)
|
||||||
})
|
})
|
||||||
console.log(vm.rankList, 'rankList-====')
|
|
||||||
vm.payData.title = `超级会员(${vm.rankList[0].name})`
|
vm.payData.title = `超级会员(${vm.rankList[0].name})`
|
||||||
vm.payData.price = `${vm.rankList[0].price}`
|
vm.payData.price = `${vm.rankList[0].price}`
|
||||||
vm.payData.discount_price = `${vm.rankList[0].discount_price}`
|
vm.payData.discount_price = `${vm.rankList[0].discount_price}`
|
||||||
vm.payData.pay_type = data.pay_type
|
vm.payData.pay_type = data.pay_type
|
||||||
console.log(vm.rankList, vm.specialVIP)
|
|
||||||
console.log(vm.payData, 'payData')
|
|
||||||
vm.shareId = vm.rankList[vm.cardCur].id
|
vm.shareId = vm.rankList[vm.cardCur].id
|
||||||
if (wx.getStorageSync('from_user_id')) {
|
if (wx.getStorageSync('from_user_id')) {
|
||||||
vm.worthShare()
|
vm.worthShare()
|
||||||
@ -283,30 +291,24 @@
|
|||||||
channel: 'rank',
|
channel: 'rank',
|
||||||
product_id: vm.shareId
|
product_id: vm.shareId
|
||||||
}
|
}
|
||||||
vm.$post({url: `${service.host}/worth/shares`, data}).then(({code, data}) => {
|
vm.$post({url: `${service.host}/worth/shares`, data})
|
||||||
console.log('2f')
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
cardSwiper(e) {
|
cardSwiper(e) {
|
||||||
this.cardCur = e.$wx.detail.current
|
this.cardCur = e.$wx.detail.current
|
||||||
clearTimeout(this.timeID)
|
clearTimeout(this.timeID)
|
||||||
this.timeID = setTimeout(() => {
|
this.timeID = setTimeout(() => {
|
||||||
this.shareId = this.rankList[this.cardCur].id
|
this.shareId = this.rankList[this.cardCur].id
|
||||||
console.log(this.shareId)
|
|
||||||
if (wx.getStorageSync('from_user_id')) {
|
if (wx.getStorageSync('from_user_id')) {
|
||||||
this.worthShare()
|
this.worthShare()
|
||||||
}
|
}
|
||||||
}, 800)
|
}, 800)
|
||||||
},
|
},
|
||||||
showFn (index) { // 弹框支付
|
showFn(index) {
|
||||||
if (!this.$signInVerify()) {
|
if (!this.$signInVerify()) {
|
||||||
this.loginShow = true
|
this.loginShow = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.system == 'iOS') {
|
// 移除原来的iOS禁止支付逻辑
|
||||||
this.modalName = 'showTips'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.wxPayShow = 'cash'
|
this.wxPayShow = 'cash'
|
||||||
this.coinMoney = (this.payData.coin / 10).toFixed(2)
|
this.coinMoney = (this.payData.coin / 10).toFixed(2)
|
||||||
this.deductionPrice = this.payData.coin >= this.specialVIP.can_coin_amount ? (this.payData.discount_price - this.specialVIP.can_cash_amount).toFixed(2) : (this.payData.discount_price - this.coinMoney).toFixed(2)
|
this.deductionPrice = this.payData.coin >= this.specialVIP.can_coin_amount ? (this.payData.discount_price - this.specialVIP.can_cash_amount).toFixed(2) : (this.payData.discount_price - this.coinMoney).toFixed(2)
|
||||||
@ -332,7 +334,7 @@
|
|||||||
wx.setClipboardData({
|
wx.setClipboardData({
|
||||||
data: data,
|
data: data,
|
||||||
success(res) {
|
success(res) {
|
||||||
vm.$showToast('复制成功,赶紧去加《小恋》为好友吧!')
|
vm.$showToast('复制成功')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -345,43 +347,70 @@
|
|||||||
showTost() {
|
showTost() {
|
||||||
this.$showToast('请同意《福恋服务协议》')
|
this.$showToast('请同意《福恋服务协议》')
|
||||||
},
|
},
|
||||||
|
// ======================================
|
||||||
|
// 核心支付方法(Android原接口,iOS新虚拟支付接口)
|
||||||
|
// ======================================
|
||||||
conversion(item) {
|
conversion(item) {
|
||||||
console.log(this.payData.payId)
|
let that = this
|
||||||
let that = this,
|
|
||||||
url = `${service.host}/rank/buy`
|
|
||||||
that.modalName = ''
|
that.modalName = ''
|
||||||
that.$showLoading('支付中...')
|
that.$showLoading('支付中...')
|
||||||
let data = {}
|
|
||||||
data = {
|
// 根据系统类型选择不同的接口和参数
|
||||||
sub_rank_id: this.payData.payId,
|
if (that.system === 'iOS') {
|
||||||
// chat_user_id: this.chat_user_id,
|
// 先获取微信登录 code
|
||||||
// share_type: this.share_type,
|
that.$showLoading('获取支付信息...')
|
||||||
pay_type: this.wxPayShow
|
|
||||||
|
wx.login({
|
||||||
|
success: (loginRes) => {
|
||||||
|
const code = loginRes.code
|
||||||
|
console.log('获取到code:', code)
|
||||||
|
|
||||||
|
let url = `${service.host}/rank/buy/virtual`
|
||||||
|
let data = {
|
||||||
|
sub_rank_id: this.payData.payId, // 必须:会员套餐ID
|
||||||
|
pay_type: this.wxPayShow, // 必须:支付类型
|
||||||
|
share_type: this.share_type || '', // 必须:分享类型
|
||||||
|
code: code // 微信登录code,用于后端签名
|
||||||
|
// chat_user_id: this.chat_user_id || '', // 非必须:聊天用户ID
|
||||||
|
// from_user_id: wx.getStorageSync('from_user_id') || '' // 非必须:来源用户ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 调用iOS虚拟支付接口创建订单
|
||||||
that.$post({url: url, data}).then(({code, data}) => {
|
that.$post({url: url, data}).then(({code, data}) => {
|
||||||
that.trade_no = data.order.trade_no
|
if (code !== 0) {
|
||||||
if (data.length == 0) {
|
that.$Toast_error(data?.msg || '订单创建失败')
|
||||||
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
return
|
||||||
that.getUserData()
|
}
|
||||||
that.$Toast_success('支付成功')
|
|
||||||
})
|
that.trade_no = data.order?.trade_no
|
||||||
} else {
|
|
||||||
let wxconfig = data.config
|
// 测试订单直接回调
|
||||||
// wx.config(JSON.parse(response.data.data.order.wx_pay.js));
|
if (data.length == 0 || data.config?.payment_debug) {
|
||||||
if (wxconfig.payment_debug) {
|
|
||||||
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
that.getUserData()
|
that.getUserData()
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
wx.requestPayment({
|
|
||||||
timeStamp: wxconfig.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
// iOS虚拟支付
|
||||||
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
|
const virtualPayData = data || {}
|
||||||
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
|
console.log('virtualPayData', virtualPayData)
|
||||||
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
|
||||||
paySign: wxconfig.paySign, // 支付签名
|
console.log({
|
||||||
success: function (res) {
|
signData: virtualPayData.sign_data,
|
||||||
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
paySig: virtualPayData.paySig || '',
|
||||||
|
signature: virtualPayData.signature || '',
|
||||||
|
mode: virtualPayData.mode || 'short_series_goods',
|
||||||
|
})
|
||||||
|
wx.requestVirtualPayment({
|
||||||
|
signData: virtualPayData.sign_data,
|
||||||
|
paySig: virtualPayData.paySig || '',
|
||||||
|
signature: virtualPayData.signature || '',
|
||||||
|
mode: virtualPayData.mode || 'short_series_goods',
|
||||||
|
success(res) {
|
||||||
|
console.log('requestVirtualPayment success', res)
|
||||||
|
// 虚拟支付成功后回调
|
||||||
|
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(() => {
|
||||||
that.getUserData()
|
that.getUserData()
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
let userInfo = wx.getStorageSync('userInfo')
|
let userInfo = wx.getStorageSync('userInfo')
|
||||||
@ -389,24 +418,71 @@
|
|||||||
wx.setStorageSync('userInfo', userInfo)
|
wx.setStorageSync('userInfo', userInfo)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail({ errMsg, errCode }) {
|
||||||
console.log(res, '===')
|
console.error('虚拟支付失败:', errMsg, errCode)
|
||||||
wx.showToast({
|
that.$Toast_error('支付失败,请重试')
|
||||||
title: '已取消支付',
|
|
||||||
icon: 'none',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}).catch((err) => {
|
||||||
|
console.error('订单创建失败:', err)
|
||||||
|
that.$Toast_error('订单创建失败,请重试')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('wx.login失败:', err)
|
||||||
|
that.$Toast_error('获取登录信息失败,请重试')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// ============== Android:原有普通支付接口 ==============
|
||||||
|
let url = `${service.host}/rank/buy`
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
sub_rank_id: this.payData.payId,
|
||||||
|
pay_type: this.wxPayShow
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用原接口创建订单
|
||||||
|
that.$post({url: url, data}).then(({code, data}) => {
|
||||||
|
that.trade_no = data.order.trade_no
|
||||||
|
|
||||||
|
// 测试订单直接回调
|
||||||
|
if (data.length == 0 || data.config?.payment_debug) {
|
||||||
|
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
|
that.getUserData()
|
||||||
|
that.$Toast_success('支付成功')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Android微信支付
|
||||||
|
let wxconfig = data.config
|
||||||
|
wx.requestPayment({
|
||||||
|
timeStamp: wxconfig.timeStamp,
|
||||||
|
nonceStr: wxconfig.nonceStr,
|
||||||
|
package: wxconfig.package,
|
||||||
|
signType: wxconfig.signType || 'MD5',
|
||||||
|
paySign: wxconfig.paySign,
|
||||||
|
success(res) {
|
||||||
|
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(() => {
|
||||||
|
that.getUserData()
|
||||||
|
that.$Toast_success('支付成功')
|
||||||
|
let userInfo = wx.getStorageSync('userInfo')
|
||||||
|
userInfo.rank_id = 9
|
||||||
|
wx.setStorageSync('userInfo', userInfo)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
wx.showToast({ title: '已取消支付', icon: 'none' })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
payChoice(e) {
|
payChoice(e) {
|
||||||
this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e
|
this.wxPayShow = this.wxPayShow == 'coin' ? 'cash' : e
|
||||||
},
|
},
|
||||||
hiddenLogin() {
|
hiddenLogin() {
|
||||||
let vm = this
|
this.loginShow = false
|
||||||
vm.loginShow = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -414,21 +490,26 @@
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
page {
|
page {
|
||||||
background: #F6F6F6;
|
background: #FFFFFF;
|
||||||
|
|
||||||
.bg-vip {
|
.bg-vip {
|
||||||
background: #333333;
|
background: #333333;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainTab {
|
.mainTab {
|
||||||
padding: 12rpx;
|
padding: 12rpx;
|
||||||
|
|
||||||
.itemText {
|
.itemText {
|
||||||
width: 38%;
|
width: 38%;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
content: " ";
|
content: " ";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -441,16 +522,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
._bc-user {
|
._bc-user {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: url('https://images.ufutx.com/202004/09/5fd9264a4da7c310d1e086a92be7195a.png');
|
background: #171718;
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
/*position: fixed;*/
|
|
||||||
height: 70vw;
|
height: 70vw;
|
||||||
padding-top: 6vw;
|
padding-top: 6vw;
|
||||||
/*z-index: 9999;*/
|
|
||||||
.userinfo-avatar {
|
.userinfo-avatar {
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
@ -459,83 +538,107 @@
|
|||||||
margin-right: 22rpx;
|
margin-right: 22rpx;
|
||||||
border: 4rpx solid #fff;
|
border: 4rpx solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userinfo-name {
|
.userinfo-name {
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
gap: 12rpx;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 28rpx;
|
width: 28rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin:0 2px;
|
margin: 0 4px 6rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-xl {
|
.item-xl {
|
||||||
margin-bottom: 16rpx;
|
margin-bottom: 16rpx;
|
||||||
// .title{
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.service_icon {
|
||||||
|
width: 150rpx;
|
||||||
|
height: 150rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 120px;
|
||||||
|
right: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
.m_payData {
|
.m_payData {
|
||||||
padding: 30rpx 30rpx;
|
padding: 20px 20px;
|
||||||
|
margin: 32rpx;border-radius: 10px;
|
||||||
|
background: #FBFAFC;
|
||||||
|
|
||||||
.u_payData_img {
|
.u_payData_img {
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 42rpx;
|
height: 42rpx;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u_pay_unc {
|
.u_pay_unc {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 2rpx solid #C2C2C2;
|
border: 2rpx solid #C2C2C2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m_payData_coinImg {
|
.m_payData_coinImg {
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconV2 {
|
.iconV2 {
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainWrapper {
|
.mainWrapper {
|
||||||
padding-left: 34rpx;
|
padding-left: 34rpx;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin-top: 32rpx;
|
|
||||||
margin-bottom: 12rpx;
|
margin-bottom: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ruleBox {
|
.ruleBox {
|
||||||
background: white;
|
margin-top: -12px;
|
||||||
padding: 22rpx;
|
|
||||||
margin-right: 34rpx;
|
margin-right: 34rpx;
|
||||||
box-shadow: 1rpx 1rpx 12rpx #f0f0f0;
|
display: flex;
|
||||||
border-radius: 10rpx;
|
flex-direction: column;
|
||||||
line-height: 46rpx;
|
align-items: flex-start;
|
||||||
|
align-self: stretch;
|
||||||
|
border-radius: 0 10px 10px 10px;
|
||||||
|
border: 1px solid #E6C7AB;
|
||||||
|
padding: 42rpx 32rpx 32rpx 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-wrapper {
|
.scroll-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
||||||
.scroll-item {
|
.scroll-item {
|
||||||
width: 200rpx;
|
padding-top: 32rpx;
|
||||||
height: 268rpx;
|
margin-right: 60rpx;
|
||||||
margin-left: -22rpx;
|
|
||||||
background-image: url("https://images.ufutx.com/202004/09/1da12829a23a841d5f490302873152c3.png");
|
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.featureIcon {
|
.featureIcon {
|
||||||
width: 62rpx;
|
width: 104rpx;
|
||||||
height: 62rpx;
|
height: 104rpx;
|
||||||
margin-top: 62rpx;
|
|
||||||
margin-bottom: 12rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-swiper {
|
.card-swiper {
|
||||||
|
width: 100% !important;
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
border-radius: 14rpx;
|
border-radius: 22rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconV2 {
|
.iconV2 {
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
@ -543,38 +646,99 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payBtn {
|
.payBtn {
|
||||||
position: relative;
|
position: relative;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 32rpx;
|
||||||
left: 18vw;
|
left: 0;
|
||||||
width: 64vw;
|
|
||||||
height: 60px;
|
height: 60px;
|
||||||
background-image: url("https://images.ufutx.com/202007/17/fb7b8b1cd0d1b289d1e029257a97e949.png");
|
width: 100%;
|
||||||
background-size: contain;
|
padding: 32rpx;
|
||||||
background-repeat: no-repeat;
|
display: flex;
|
||||||
|
background: #FFFFFF;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
.l_text {
|
.l_text {
|
||||||
position: absolute;
|
color: var(--0-e-0-e-0-e, #0E0E0E);
|
||||||
left: 60rpx;
|
font-size: 12px;
|
||||||
top: 12rpx;
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
.price{
|
||||||
|
color: var(--ff-2946, #FF2946);;
|
||||||
|
font-size: 20px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: normal;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.r_text {
|
.r_text {
|
||||||
color: #f8e8b2;
|
color: #974800;
|
||||||
position: absolute;
|
text-align: center;
|
||||||
right: 56rpx;
|
font-size: 16px;
|
||||||
top: 12rpx;
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: normal;display: flex;
|
||||||
|
padding: 12px 36px;
|
||||||
|
height: 92rpx;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
border-radius: 200px;
|
||||||
|
background: linear-gradient(270deg, #FDBA61 0%, #FDE28E 100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.m_pay_bu {
|
.m_pay_bu {
|
||||||
padding: 20rpx 0 40rpx;
|
padding: 20rpx 0 40rpx;
|
||||||
|
|
||||||
.u_pay_bu {
|
.u_pay_bu {
|
||||||
margin-bottom: constant(safe-area-inset-bottom);
|
margin-bottom: constant(safe-area-inset-bottom);
|
||||||
margin-bottom: env(safe-area-inset-bottom);
|
margin-bottom: env(safe-area-inset-bottom);
|
||||||
width: 480rpx;
|
width: 480rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
background-image: linear-gradient(to left,#FF85A5,#FF5380);
|
color: #974800;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: normal;
|
||||||
|
display: flex;
|
||||||
|
padding: 12px 36px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
border-radius: 200px;
|
||||||
|
background: linear-gradient(270deg, #FDBA61 0%, #FDE28E 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
._vipRights {
|
||||||
|
margin-top: 32rpx;
|
||||||
|
padding: 12rpx;
|
||||||
|
position: relative;
|
||||||
|
color: #0E0E0E;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: normal;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 3px;
|
||||||
|
height: 12px;
|
||||||
|
border-radius: 43px;
|
||||||
|
background: #F7BF8B;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,11 +756,11 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.qrcode_icon-box {
|
.qrcode_icon-box {
|
||||||
width: 320rpx;
|
width: 350rpx;
|
||||||
height: 320rpx;
|
height: 350rpx;
|
||||||
border: 10rpx solid #F4F5FF;
|
border: 10rpx solid #F4F5FF;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
margin: 40rpx auto 26rpx auto;
|
margin: 22rpx auto 26rpx auto;
|
||||||
|
|
||||||
.qrcode_icon {
|
.qrcode_icon {
|
||||||
width: 320rpx;
|
width: 320rpx;
|
||||||
@ -625,7 +789,6 @@
|
|||||||
usingComponents: {
|
usingComponents: {
|
||||||
cuCustom: '~@/components/cu-custom',
|
cuCustom: '~@/components/cu-custom',
|
||||||
loginDialog: '~@/components/loginDialog',
|
loginDialog: '~@/components/loginDialog',
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</config>
|
</config>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import Vuex from '@wepy/x';
|
import Vuex from '@wepy/x'
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
@ -6,23 +6,23 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
increment (state) {
|
increment (state) {
|
||||||
state.counter++;
|
state.counter++
|
||||||
},
|
},
|
||||||
decrement (state) {
|
decrement (state) {
|
||||||
state.counter--;
|
state.counter--
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
increment ({ commit }) {
|
increment ({ commit }) {
|
||||||
commit('increment');
|
commit('increment')
|
||||||
},
|
},
|
||||||
decrement ({ commit }) {
|
decrement ({ commit }) {
|
||||||
commit('decrement');
|
commit('decrement')
|
||||||
},
|
},
|
||||||
incrementAsync ({ commit }) {
|
incrementAsync ({ commit }) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
commit('increment');
|
commit('increment')
|
||||||
}, 1000);
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import NIM from 'nim-web-sdk-ng/dist/v2/NIM_MINIAPP_SDK'
|
|||||||
import { service } from '../config.js'
|
import { service } from '../config.js'
|
||||||
|
|
||||||
const IM = (account, token) => {
|
const IM = (account, token) => {
|
||||||
|
// 沿用旧版稳定配置格式:不使用官网新的分参数配置,避免兼容问题
|
||||||
let nim = NIM.getInstance({
|
let nim = NIM.getInstance({
|
||||||
debugLevel: 'off',
|
debugLevel: 'off',
|
||||||
appkey: '9bc3ed1f7d8197b6b69f8f5b742824b1',
|
appkey: '9bc3ed1f7d8197b6b69f8f5b742824b1',
|
||||||
@ -13,10 +14,38 @@ const IM = (account, token) => {
|
|||||||
linkUrl: 'wlnimsc0.netease.im'
|
linkUrl: 'wlnimsc0.netease.im'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 保留核心优化:筛选有效群会话ID(解决“找不到会话”报错)
|
||||||
|
const getValidTeamSessionIds = (sessions) => {
|
||||||
|
return sessions.filter(item => item.scene === 'team').map(item => item.to)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保留核心优化:清理无效存储数据(避免用无效群ID操作)
|
||||||
|
const cleanInvalidTeamStorage = (validTeamIds) => {
|
||||||
|
// 清理免打扰列表
|
||||||
|
let muteNotList = wx.getStorageSync('muteNotList') || []
|
||||||
|
const validMuteList = muteNotList.filter(item =>
|
||||||
|
validTeamIds.includes(`team-${item.teamId}`)
|
||||||
|
)
|
||||||
|
if (muteNotList.length !== validMuteList.length) {
|
||||||
|
wx.setStorageSync('muteNotList', validMuteList)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理群未读数列表
|
||||||
|
let teamsSessionsCount = wx.getStorageSync('teamsSessionsCount') || []
|
||||||
|
const validTeamsCount = teamsSessionsCount.filter(item =>
|
||||||
|
validTeamIds.includes(item.id)
|
||||||
|
)
|
||||||
|
if (teamsSessionsCount.length !== validTeamsCount.length) {
|
||||||
|
wx.setStorageSync('teamsSessionsCount', validTeamsCount)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 沿用旧版事件列表:不新增可能兼容问题的事件
|
||||||
const eventList = [
|
const eventList = [
|
||||||
'logined', 'willReconnect', 'disconnect', 'msg', 'syncdone', 'syncRoamingMsgs', 'sessions', 'updateMuteList', 'friends', 'updateSession', 'teams', 'myTeamMembers', 'updateMyMemberInfo', 'sendTeamMsg'
|
'logined', 'willReconnect', 'disconnect', 'msg', 'syncdone', 'syncRoamingMsgs', 'sessions', 'updateMuteList', 'friends', 'updateSession', 'teams', 'myTeamMembers', 'updateMyMemberInfo', 'sendTeamMsg'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 沿用旧版事件注册方式
|
||||||
eventList.forEach((key) => {
|
eventList.forEach((key) => {
|
||||||
nim.on(key, (res) => {
|
nim.on(key, (res) => {
|
||||||
// console.log(`Receive ${key} event:`, res ? JSON.parse(JSON.stringify(res)) : res)
|
// console.log(`Receive ${key} event:`, res ? JSON.parse(JSON.stringify(res)) : res)
|
||||||
@ -25,30 +54,43 @@ const IM = (account, token) => {
|
|||||||
|
|
||||||
nim.connect()
|
nim.connect()
|
||||||
|
|
||||||
|
// 沿用旧版连接状态监听
|
||||||
nim.on('logined', function () {
|
nim.on('logined', function () {
|
||||||
console.log('连接成功')
|
console.log('IM连接成功')
|
||||||
})
|
})
|
||||||
|
|
||||||
nim.on('willReconnect', function (e) {
|
nim.on('willReconnect', function (e) {
|
||||||
console.log(e, '即将重连')
|
console.log('IM即将重连:', e)
|
||||||
})
|
})
|
||||||
|
|
||||||
nim.on('disconnect', function (e) {
|
nim.on('disconnect', function (e) {
|
||||||
console.log(e, '丢失连接')
|
console.log('IM连接断开:', e)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 保留核心优化:会话同步时校验有效会话,避免无效ID报错
|
||||||
nim.on('sessions', function(e) {
|
nim.on('sessions', function(e) {
|
||||||
console.log(e, '会话消息')
|
console.log('会话列表同步:', e)
|
||||||
// 如果群是开启了免打扰自动标记未读数已读
|
const validTeamIds = getValidTeamSessionIds(e)
|
||||||
|
cleanInvalidTeamStorage(validTeamIds) // 清理无效数据
|
||||||
|
|
||||||
|
// 免打扰群标已读(双重校验:解决找不到会话报错)
|
||||||
let mute = wx.getStorageSync('muteNotList') || []
|
let mute = wx.getStorageSync('muteNotList') || []
|
||||||
if (mute && mute.length > 0) {
|
if (mute && mute.length > 0) {
|
||||||
mute.forEach((j) => {
|
mute.forEach((j) => {
|
||||||
nim.session.resetSessionUnreadCount({
|
const sessionId = `team-${j.teamId}`
|
||||||
id: `team-${j.teamId}`
|
const session = nim.session.getSession({ id: sessionId })
|
||||||
})
|
// 只对“存在且有效”的会话操作,无效会话直接跳过
|
||||||
|
if (session && validTeamIds.includes(sessionId)) {
|
||||||
|
try {
|
||||||
|
nim.session.resetSessionUnreadCount({ id: sessionId })
|
||||||
|
} catch (err) {
|
||||||
|
console.log(`重置会话${sessionId}未读失败:`, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取群消息未读数并赋值在tabBar显示
|
|
||||||
|
// 沿用旧版未读数统计和TabBar更新逻辑
|
||||||
let teamsSsions = []
|
let teamsSsions = []
|
||||||
e.forEach((i) => {
|
e.forEach((i) => {
|
||||||
if (i.scene === 'team') {
|
if (i.scene === 'team') {
|
||||||
@ -56,6 +98,7 @@ const IM = (account, token) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
wx.setStorageSync('teamsSessionsCount', teamsSsions)
|
wx.setStorageSync('teamsSessionsCount', teamsSsions)
|
||||||
|
|
||||||
let groupCount = 0
|
let groupCount = 0
|
||||||
if (teamsSsions.length > 0) {
|
if (teamsSsions.length > 0) {
|
||||||
for (let i = 0; i < teamsSsions.length; i++) {
|
for (let i = 0; i < teamsSsions.length; i++) {
|
||||||
@ -74,8 +117,9 @@ const IM = (account, token) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 完全沿用旧版消息处理逻辑:不新增@提醒、撤回等功能
|
||||||
nim.on('msg', function (e) {
|
nim.on('msg', function (e) {
|
||||||
console.log(e, '收到最新消息')
|
console.log('收到新消息:', e)
|
||||||
let pages = getCurrentPages()
|
let pages = getCurrentPages()
|
||||||
let currentPage = pages[pages.length - 1]
|
let currentPage = pages[pages.length - 1]
|
||||||
let notiTypeData = { muteTeam: false }
|
let notiTypeData = { muteTeam: false }
|
||||||
@ -155,6 +199,9 @@ const IM = (account, token) => {
|
|||||||
index: 2
|
index: 2
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.log('获取系统通知未读失败:', err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -169,6 +216,7 @@ const IM = (account, token) => {
|
|||||||
}, 800)
|
}, 800)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 完全沿用旧版免打扰列表处理逻辑
|
||||||
nim.on('myTeamMembers', function (e) {
|
nim.on('myTeamMembers', function (e) {
|
||||||
let pages = getCurrentPages()
|
let pages = getCurrentPages()
|
||||||
let currentPage = pages[pages.length - 1]
|
let currentPage = pages[pages.length - 1]
|
||||||
@ -188,12 +236,14 @@ const IM = (account, token) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// 沿用旧版setTimeout(如果之前稳定,保留避免改动)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(muteNotList, '99399')
|
console.log(muteNotList, '99399')
|
||||||
wx.setStorageSync('muteNotList', muteNotList)
|
wx.setStorageSync('muteNotList', muteNotList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return nim
|
return nim
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||