This commit is contained in:
zoomtk@126.com 2023-04-01 13:14:58 +08:00
parent 8b5fc7b5b9
commit 5723718895
17 changed files with 871 additions and 502 deletions

View File

@ -36,7 +36,7 @@
<!-- <view class="level-name">{{ memberInfo.member_level_name }}</view>-->
<!-- </view>-->
<view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view>
<!-- <view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> -->
<!-- #endif -->
<!-- #ifdef H5 -->
@ -67,7 +67,7 @@
<image :src="$util.img('public/uniapp/member/supervip_icon.png')" mode="heightFix" class="level-icon"></image>
<view class="level-name">{{ memberInfo.member_level_name }}</view>
</view>
<view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view>
<!-- <view class="copy" >推荐码:{{memberInfo.rcode}} <view class="allmoney-top-btn" @click="CopyText">复制</view></view> -->
<!-- #endif -->
</view>
<!-- <text class="iconfont icon-qrcode member-code" @click="showMemberQrcode"></text>-->

View File

@ -1,8 +1,8 @@
{
"name" : "山野乡涧",
"appid" : "__UNI__E00B9A8",
"appid" : "__UNI__FF65C97",
"description" : "",
"versionName" : "5.1.2",
"versionName" : "1.0.1",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */

View File

@ -19,8 +19,8 @@ https://unpkg.com/jweixin-module/out/index.js
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
var wx = require('jweixin-module')
wx.ready(function(){
// TODO
});
```

View File

@ -1,40 +1,41 @@
{
"_args": [
[
"jweixin-module@1.6.0",
"D:\\Web-Object\\rush-goods"
]
],
"_from": "jweixin-module@1.6.0",
"_id": "jweixin-module@1.6.0",
"_from": "jweixin-module",
"_id": "jweixin-module@1.4.1",
"_inBundle": false,
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==",
"_integrity": "sha512-2R2oa1lYhAsclfjKSf3DP4ZiP1dcrQUbM7aklbeJA+UAg/LS7MqoA6UbTy1cs4sbB34z62K4bKW0Z9iazD8ejg==",
"_location": "/jweixin-module",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "tag",
"registry": true,
"raw": "jweixin-module@1.6.0",
"raw": "jweixin-module",
"name": "jweixin-module",
"escapedName": "jweixin-module",
"rawSpec": "1.6.0",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "1.6.0"
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"_spec": "1.6.0",
"_where": "D:\\Web-Object\\rush-goods",
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.4.1.tgz",
"_shasum": "1fc8fa42622243f6c35651d272cd587debf56cd1",
"_spec": "jweixin-module",
"_where": "E:\\demo\\niushop_uniapp",
"author": {
"name": "Shengqiang Guo"
},
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "微信JS-SDK",
"devDependencies": {},
"devDependencies": {
"textfile": "^1.2.0",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"keywords": [
"wxjssdk",
@ -45,12 +46,15 @@
"wx"
],
"license": "ISC",
"main": "lib/index.js",
"main": "out/index.js",
"name": "jweixin-module",
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"scripts": {},
"version": "1.6.0"
"scripts": {
"build": "node build",
"prepublish": "npm run build"
},
"version": "1.4.1"
}

77
package-lock.json generated
View File

@ -1,6 +1,71 @@
{
"name": "miaogou.cdlfjy.com",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"dependencies": {
"jweixin-module": "^1.4.1",
"vant": "^2.12.51"
}
},
"node_modules/@babel/runtime": {
"version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz",
"integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
"dependencies": {
"regenerator-runtime": "^0.13.4"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@vant/icons": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
},
"node_modules/@vant/popperjs": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"node_modules/@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
"integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA=="
},
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
},
"node_modules/regenerator-runtime": {
"version": "0.13.10",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz",
"integrity": "sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw=="
},
"node_modules/vant": {
"version": "2.12.51",
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.51.tgz",
"integrity": "sha512-0dZHcBWwKdQvgvAMr5hqObuwkHRn51c7ReLVDV/Ijp1twZ/9/JGMPKVCp1ebpzFAONudyDvu42adrkFUhheaUA==",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
},
"peerDependencies": {
"vue": ">= 2.6.0"
}
},
"node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
}
},
"dependencies": {
"@babel/runtime": {
"version": "7.19.4",
@ -20,11 +85,6 @@
"resolved": "https://registry.npmjs.org/@vant/popperjs/-/popperjs-1.3.0.tgz",
"integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw=="
},
"@vant/weapp": {
"version": "1.10.14",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.10.14.tgz",
"integrity": "sha512-5usuhoN1kiOV6pzrdVzHrAux6DupKlGd9w+yYc992Zy1n1wHLZMb1dGM3+xtbNE3tpWE2qv95vIFSMpJRFyE7Q=="
},
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
@ -52,11 +112,6 @@
"vue-lazyload": "1.2.3"
}
},
"vant-weapp": {
"version": "0.5.29",
"resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz",
"integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q=="
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",

View File

@ -1011,6 +1011,12 @@
"navigationStyle": "custom"
}
},
{
"path": "member/balance_transfer",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "member/balance_detail",
"style": {

View File

@ -404,7 +404,7 @@
<ns-goods-action :safeArea="isIphoneX">
<template v-if="goodsSkuDetail.goods_state == 1">
<ns-goods-action-icon text="首页" icon="icon-shouye1" @click="goHome" />
<ns-goods-action-icon text="客服" icon="icon-kefu" :send-data="contactData" :chatParam="chatRoomParams" />
<!-- <ns-goods-action-icon text="客服" icon="icon-kefu" :send-data="contactData" :chatParam="chatRoomParams" /> -->
<ns-goods-action-icon
text="购物车"
:cornerMarkBg="themeStyle.goods_detail.goods_cart_num_corner"
@ -423,8 +423,7 @@
goodsSkuDetail.limit_type == 2 &&
goodsSkuDetail.max_buy != 0 &&
goodsSkuDetail.purchased_num >= goodsSkuDetail.max_buy
"
>
">
<!-- (goodsSkuDetail.is_limit == 1 && goodsSkuDetail.limit_type == 1 && goodsSkuDetail.max_buy != 0) -->
<ns-goods-action-button class="goods-action-button active3" disabled-text="已达最大限购数量" :disabled="true" />
</block>

View File

@ -3,90 +3,39 @@
<view class="fenxiao-index">
<block v-if="info.fenxiao_id > 0">
<!-- 头部 -->
<view class="fenxiao-index-header" :class="{'not-level': !levelList.length}" :style="{background: 'url('+ $util.img('public/uniapp/fenxiao/index/header_bg.png') +') no-repeat top left / 100% 100%'}">
<view
class="fenxiao-index-header"
:class="{ 'not-level': !levelList.length }"
:style="{ background: 'url(' + $util.img('public/uniapp/fenxiao/index/header_bg.png') + ') no-repeat top left / 100% 100%' }">
<view class="member">
<view class="member-pic">
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head"
@error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"></image>
<image
:src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head"
@error="info.headimg = $util.getDefaultImage().head"
mode="aspectFill"
></image>
<!-- <text class="level-name ">{{ info.level_name }}</text> -->
</view>
<view class="member-info">
<view @click="toLevel()" class="member-info-box">
<text class="name">{{ info.fenxiao_name }}</text>
</view>
<view class="recommend" v-if="info.level_num > 0">
{{ info.level_name }}
</view>
<view class="recommend" v-if="info.level_num > 0">{{ info.level_name }}</view>
</view>
</view>
<!--<view class="fenxiao-level-wrap" v-if="levelList.length">
<view class="fenxiao-level-wrap" v-if="levelList.length">
<image :src="$util.img('public/uniapp/fenxiao/index/level_icon.png')" mode="heightFix" class="level-icon"></image>
<view class="level-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/level')">
<view class="title">{{ info.level_num > 0 ? info.level_name : '等级未解锁' }}</view>
<view class="desc">下单邀请好友均可提升等级</view>
<view class="level-wrap">
<view class="title">{{ info.level_name }}</view>
<view class="desc" v-if="parseInt(info.is_apply_upgrade) === 1">提交申请可以提升等级</view>
</view>
<view class="btn" @click="$refs.taskPopup.open()" v-if="info.condition.last_level">做任务</view>
</view>-->
<view class="fenxiao-level-wrap" v-if="levelList.length">
<image :src="$util.img('public/uniapp/fenxiao/index/level_icon.png')" mode="heightFix" class="level-icon"></image>
<view class="level-wrap">
<view class="title">{{ info.level_name }}</view>
<view class="desc" v-if="parseInt(info.is_apply_upgrade) === 1">提交申请可以提升等级</view>
</view>
<view class="btn" @click="$util.redirectTo('/pages_promotion/fenxiao/apply_upgrade')" v-if="parseInt(info.is_apply_upgrade) === 1">申请升级</view>
</view>
<view class="btn" @click="$util.redirectTo('/pages_promotion/fenxiao/apply_upgrade')" v-if="parseInt(info.is_apply_upgrade) === 1">申请升级</view>
</view>
</view>
<!-- <view class="fenxiao-index-allmoney">
<view class="allmoney-top-money">
<view class="allmoney-top">
<view class="font-size-sub">{{ fenxiaoWords.withdraw }}</view>
<view class="withdrawal-record" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">提现记录<text class="iconfont icon-right"></text></view>
</view>
<view class="total-commission price-font">{{ info.account }}</view>
</view>
<view class="allmoney-bottom">
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="title">{{ fenxiaoWords.account }}</view>
<view class="money price-font">{{ info.total_commission | moneyFormat }}</view>
</view>
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
<view class="title">已提现{{ fenxiaoWords.account }}</view>
<view class="money price-font">{{ info.account_withdraw | moneyFormat }}</view>
</view>
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
<view class="title">提现中{{ fenxiaoWords.account }}</view>
<view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>
</view>
</view>
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">申请提现</view>
</view>-->
<!-- <view class="account-info">
<view class="solid"></view>
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.points != undefined ? info.points : '&#45;&#45;' }}</view>
<view class="title">积分</view>
</view>
<view class="solid"></view>
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.contribution != undefined ? info.contribution : '&#45;&#45;' }}</view>
<view class="title">贡献值</view>
</view>
<view class="solid"></view>
<view class="account-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="value price-font">{{ info && info.house_purchase != undefined ? info.house_purchase : '&#45;&#45;' }}</view>
<view class="title">购房券</view>
</view>
</view>-->
<view class="fenxiao-team">
<view class="fenxiao-index-other">
<view @click="$util.redirectTo('/pages_promotion/fenxiao/team')" class="all-money-item">
<view class="img-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/team1.png')" mode="aspectFill"></image>
</view>
<view class="img-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team1.png')" mode="aspectFill"></image></view>
<view class="all-money-tit-wrap">
<text class="all-money-tit">我的团队</text>
<text class="all-money-num">{{ teamNum.num }}</text>
@ -95,9 +44,7 @@
</view>
<view class="fenxiao-index-other">
<view @click="$util.redirectTo('/pages_promotion/fenxiao/child_fenxiao')" class="all-money-item">
<view class="img-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/team2.png')" mode="aspectFill"></image>
</view>
<view class="img-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team2.png')" mode="aspectFill"></image></view>
<view class="all-money-tit-wrap">
<text class="all-money-tit">{{ fenxiaoWords.fenxiao_name }}</text>
<text class="all-money-num">{{ info.one_child_fenxiao_num }}</text>
@ -109,73 +56,56 @@
<!-- 功能列表 -->
<view class="fenxiao-menu-list">
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/tixian.png')" mode="widthFix"></image>
</view>
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/tixian.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">{{ fenxiaoWords.withdraw }}明细</view>
<view class="desc">累计{{ fenxiaoWords.account }}{{ info.total_commission | moneyFormat }}</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/order')">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/order.png')" mode="widthFix"></image>
</view>
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/order.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">{{ fenxiaoWords.concept + '订单' }}</view>
<view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view>
</view>
</view>
<view class="menu-item"
@click="$util.redirectTo('/pages_promotion/fenxiao/promote_code', { templateId: templateId })">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/code.png')" mode="widthFix"></image>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote_code', { templateId: templateId })">
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/code.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">推广海报</view>
<view class="desc">邀请好友</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/bill.png')" mode="widthFix"></image>
</view>
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/bill.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">账单报表</view>
<view class="desc">{{ fenxiaoWords.account }}变更明细</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/goods_list', { templateId: templateId })">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/market.png')" mode="widthFix"></image>
</view>
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/market.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">{{ fenxiaoWords.concept }}商品</view>
<view class="desc">{{ fenxiaoWords.concept }}商品</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'profit'})">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'profit' })">
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">{{ fenxiaoWords.account }}排行</view>
<view class="desc">您的排名为第{{profitRanking}}</view>
<view class="desc">您的排名为第{{ profitRanking }}</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', {type: 'invited_num'})">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'invited_num' })">
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">推广人排行</view>
<view class="desc">您的排名为{{ invitedNumRanking }}</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length">
<view class="icon-wrap">
<image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image>
</view>
<view class="icon-wrap"><image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image></view>
<view class="info">
<view class="title">等级说明</view>
<view class="desc">{{ fenxiaoWords.concept }}等级说明</view>
@ -204,9 +134,7 @@
<text class="iconfont icon-wenhao" @click="openTips(item)"></text>
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text>
</text>
<view class="circle">
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
</view>
<view class="circle"><progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /></view>
<text class="zero">{{ item.value }}</text>
<text>/{{ item.condition }}</text>
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
@ -232,345 +160,364 @@
</template>
<script>
import fenxiaoWords from '@/common/js/fenxiao-words.js';
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
data() {
return {
info: {
fenxiao_name: '',
fenxiao_id: 0
},
showEmpty: false,
teamNum: {
fenxiao_num: 0,
member_num: 0
},
//id
templateId: '',
tips: '',
profitRanking: 0,
invitedNumRanking: 0,
levelList: []
};
},
components: {},
mixins: [fenxiaoWords],
onShow() {
setTimeout(() => {
if (this.addonIsExist && !this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
}, 2000);
return;
}
}, 1000);
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
if (uni.getStorageSync('token')) {
this.checkFenxiaoIsStart();
} else {
import fenxiaoWords from '@/common/js/fenxiao-words.js';
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
data() {
return {
info: {
fenxiao_name: '',
fenxiao_id: 0
},
showEmpty: false,
teamNum: {
fenxiao_num: 0,
member_num: 0
},
//id
templateId: '',
tips: '',
profitRanking: 0,
invitedNumRanking: 0,
levelList: []
};
},
components: {},
mixins: [fenxiaoWords],
onShow() {
setTimeout(() => {
if (this.addonIsExist && !this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$refs.login.open('/pages_promotion/fenxiao/index');
});
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
}, 2000);
return;
}
}, 1000);
this.getTemplateId();
},
onLoad() {
this.getRanking('invited_num');
this.getRanking('profit');
this.getFenxiaoLevel();
},
methods: {
/**
* 检测分销是否开启
*/
checkFenxiaoIsStart() {
this.$api.sendRequest({
url: '/fenxiao/api/config/basics',
success: res => {
if (res.code == 0 && res.data) {
if (res.data.level > 0) {
this.getFenxiaoDetail();
} else {
this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
}, 2000);
}
}
}
});
},
//
getFenxiaoDetail() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.data) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.info = res.data;
this.getTeamNum();
this.showEmpty = true;
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
if (uni.getStorageSync('token')) {
this.checkFenxiaoIsStart();
} else {
setTimeout(() => {
this.$refs.login.open('/pages_promotion/fenxiao/index');
});
}
this.getTemplateId();
},
onLoad() {
this.getRanking('invited_num');
this.getRanking('profit');
this.getFenxiaoLevel();
},
methods: {
/**
* 检测分销是否开启
*/
checkFenxiaoIsStart() {
this.$api.sendRequest({
url: '/fenxiao/api/config/basics',
success: res => {
if (res.code == 0 && res.data) {
if (res.data.level > 0) {
this.getFenxiaoDetail();
} else {
this.$util.redirectTo('/pages_promotion/fenxiao/apply', {}, 'redirectTo');
this.$util.showToast({
title: '商家未开启分销',
mask: true,
duration: 2000
});
setTimeout(() => {
this.$util.redirectTo('/pages/member/index');
}, 2000);
}
},
fail: res => {
this.showEmpty = true;
}
}
});
},
//
getFenxiaoDetail() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/detail',
success: res => {
if (res.data) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.info = res.data;
this.getTeamNum();
this.showEmpty = true;
} else {
this.$util.redirectTo('/pages_promotion/fenxiao/apply', {}, 'redirectTo');
}
});
},
//
goTixian() {
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply');
},
toLevel() {
this.$util.redirectTo('/pages_promotion/fenxiao/level');
},
close() {
this.$refs.taskPopup.close()
},
getTeamNum() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/teamnum',
success: res => {
if (res.code >= 0) {
this.teamNum = res.data;
}
}
});
},
/**
* 获取分享海报模板id
*/
getTemplateId() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/posterTemplateIds',
success: res => {
if (res.code >= 0) {
this.templateId = [...res.data].join();
}
}
});
},
moneyFormat(money) {
if (isNaN(parseFloat(money))) return money;
return parseFloat(money).toFixed(2);
},
openTips(data){
this.tips = data.tips;
this.$refs.tips.open();
},
getRanking(type){
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/ranking',
data: {
type: type
},
success: res => {
if (res.code >= 0) {
if (type == 'profit') this.profitRanking = res.data;
if (type == 'invited_num') this.invitedNumRanking = res.data;
}
}
})
},
getFenxiaoLevel() {
this.$api.sendRequest({
url: '/fenxiao/api/Level/lists',
success: res => {
if (res.code == 0 && res.data) {
this.levelList = res.data;
}
}
});
}
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
return true;
},
watch: {
storeToken: function(nVal, oVal) {
if (nVal) {
this.checkFenxiaoIsStart();
},
fail: res => {
this.showEmpty = true;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
}
});
},
computed: {
storeToken() {
return this.$store.state.token;
},
levelInfo() {
if (this.info && this.info.condition && this.info.condition.last_level) {
let level = this.info.condition.last_level;
level.task = [];
level.complete = 0;
if (level.one_fenxiao_order_num > 0) {
let task = {
title: '下级消费',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
condition: level.one_fenxiao_order_num,
value: this.info.one_fenxiao_order_num,
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.info.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
//
goTixian() {
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply');
},
toLevel() {
this.$util.redirectTo('/pages_promotion/fenxiao/level');
},
close() {
this.$refs.taskPopup.close();
},
getTeamNum() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/teamnum',
success: res => {
if (res.code >= 0) {
this.teamNum = res.data;
}
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order,
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.info.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生'+ this.fenxiaoWords.account +'总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单'+ this.fenxiaoWords.account +'总额',
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money,
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.info.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数',
condition: level.order_num,
value: this.info.order_num,
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.info.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额',
condition: this.moneyFormat(level.order_money),
value: this.info.order_money,
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.info.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
condition: level.one_child_num,
value: this.info.one_child_num,
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.info.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数',
condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num,
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.info.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
}
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
return level;
}
});
},
/**
* 获取分享海报模板id
*/
getTemplateId() {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/posterTemplateIds',
success: res => {
if (res.code >= 0) {
this.templateId = [...res.data].join();
}
}
});
},
moneyFormat(money) {
if (isNaN(parseFloat(money))) return money;
return parseFloat(money).toFixed(2);
},
openTips(data) {
this.tips = data.tips;
this.$refs.tips.open();
},
getRanking(type) {
this.$api.sendRequest({
url: '/fenxiao/api/fenxiao/ranking',
data: {
type: type
},
success: res => {
if (res.code >= 0) {
if (type == 'profit') this.profitRanking = res.data;
if (type == 'invited_num') this.invitedNumRanking = res.data;
}
}
});
},
getFenxiaoLevel() {
this.$api.sendRequest({
url: '/fenxiao/api/Level/lists',
success: res => {
if (res.code == 0 && res.data) {
this.levelList = res.data;
}
}
});
}
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
return true;
},
watch: {
storeToken: function(nVal, oVal) {
if (nVal) {
this.checkFenxiaoIsStart();
}
}
};
},
computed: {
storeToken() {
return this.$store.state.token;
},
levelInfo() {
if (this.info && this.info.condition && this.info.condition.last_level) {
let level = this.info.condition.last_level;
level.task = [];
level.complete = 0;
if (level.one_fenxiao_order_num > 0) {
let task = {
title: '下级消费',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
condition: level.one_fenxiao_order_num,
value: this.info.one_fenxiao_order_num,
progress:
parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num)
? 100
: ((parseFloat(this.info.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order,
progress:
parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order)
? 100
: ((parseFloat(this.info.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额',
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money,
progress:
parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money)
? 100
: ((parseFloat(this.info.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数',
condition: level.order_num,
value: this.info.order_num,
progress:
parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额',
condition: this.moneyFormat(level.order_money),
value: this.info.order_money,
progress:
parseFloat(this.info.order_money) > parseFloat(level.order_money)
? 100
: ((parseFloat(this.info.order_money) / parseFloat(level.order_money)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
condition: level.one_child_num,
value: this.info.one_child_num,
progress:
parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num)
? 100
: ((parseFloat(this.info.one_child_num) / parseFloat(level.one_child_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数',
condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num,
progress:
parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num)
? 100
: ((parseFloat(this.info.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num)) * 100).toFixed(2)
};
if (task.progress == 100) level.complete += 1;
level.task.push(task);
}
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
return level;
}
}
}
};
</script>
<style lang="scss">
@import './public/css/index.scss';
/deep/ .ns-copyright-info {
margin-bottom: 0;
}
@import './public/css/index.scss';
/deep/ .ns-copyright-info {
margin-bottom: 0;
}
</style>
<style scoped lang="scss">
.account-info {
display: flex;
padding: 40rpx 0;
align-items: center;
justify-content: center;
view {
color: #fff;
}
.solid {
height: 70rpx;
width: 2rpx;
background: #fff;
border-radius: 2rpx;
}
display: flex;
padding: 40rpx 0;
align-items: center;
justify-content: center;
view {
color: #fff;
}
.solid {
height: 70rpx;
width: 2rpx;
background: #fff;
border-radius: 2rpx;
}
.account-item {
flex: 1;
text-align: center;
.value {
font-size: 34rpx;
font-weight: bold !important;
margin-bottom: 4rpx;
line-height: 1.3;
}
.title {
font-size: 26rpx;
}
}
.account-item {
flex: 1;
text-align: center;
.value {
font-size: 34rpx;
font-weight: bold !important;
margin-bottom: 4rpx;
line-height: 1.3;
}
.title {
font-size: 26rpx;
}
}
}
.account-info {
width: 100%;
background: #fff;
margin: 20rpx 0 0 0;
color: #333;
border-radius: 18rpx;
.solid {
background: #f2f2f2;
}
.account-item {
.value {
color: #000000;
}
.title {
color: #666666;
}
}
width: 100%;
background: #fff;
margin: 20rpx 0 0 0;
color: #333;
border-radius: 18rpx;
.solid {
background: #f2f2f2;
}
.account-item {
.value {
color: #000000;
}
.title {
color: #666666;
}
}
}
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none;
@ -584,4 +531,3 @@
z-index: 8;
}
</style>

View File

@ -32,8 +32,8 @@
<text class="iconfont icon-fenxiao"></text>
</view>
<view class="all-money-tit-wrap">
<text class="all-money-tit">分销佣金</text>
<text class="all-money-num">{{ info.today_commission}}</text>
<text class="all-money-tit">业绩佣金</text>
<text class="all-money-num">{{ info.today_commission}}</text>
</view>
</view>
</view>
@ -43,7 +43,7 @@
<text class="iconfont icon-baixingbeng"></text>
</view>
<view class="all-money-tit-wrap">
<text class="all-money-tit">佣金排行</text>
<text class="all-money-tit">业绩排行</text>
<text class="all-money-num">您排行第{{ ranking }}</text>
</view>
</view>
@ -74,7 +74,7 @@
</view>
</view>
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view>
<view class="title-rakn-text" v-if="type == 'profit'">业绩排行</view>
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
<view class="ranking-list">
@ -88,7 +88,7 @@
<view class="nickname">{{ item.nickname }}</view>
</view>
<view class="price-font price-style" v-if="type == 'profit'">
{{ item.total_commission|moneyFormat }}</view>
{{ item.total_commission|moneyFormat }}</view>
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}
</view>
</view>

View File

@ -297,11 +297,11 @@ export default {
name: this.$lang('waitDelivery'),
id: 'status_3'
},
{
status: 'wait_use',
name: this.$lang('waitEvaluate'),
id: 'status_4'
}
// {
// status: 'wait_use',
// name: this.$lang('waitEvaluate'),
// id: 'status_4'
// }
];
},
operation(action, orderData) {

View File

@ -23,18 +23,18 @@
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">提现金额</view>
<view class="money-wrap">
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<!-- <text class="unit">{{ $lang('common.currencySymbol') }}</text> -->
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
<view class="delete" @click="remove" v-if="withdrawMoney"><image :src="$util.img('public/uniapp/member/apply_withdrawal/close.png')" mode="widthFix"></image></view>
</view>
<view class="bootom">
<view>
<text class="color-tip">可提现余额{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
<text class="color-tip">可提现余额{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">全部提现</text>
</view>
</view>
<view class="desc">
<text>最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}</text>
<text>最小提现金额为{{ withdrawInfo.config.min | moneyFormat }}</text>
<text>手续费为{{ withdrawInfo.config.rate + '%' }}</text>
</view>
</view>
@ -42,11 +42,9 @@
<view
class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }"
@click="withdraw"
>
@click="withdraw">
提现
</view>
<view class="recoend" @click="toWithdrawal"><view class="recoend-con">提现记录</view></view>
<loading-cover ref="loadingCover"></loading-cover>
</view>

View File

@ -5,8 +5,7 @@
<view class="custom-navbar" :style="{
'padding-top': menuButtonBounding.top + 'px',
'height': menuButtonBounding.height + 'px'
}"
>
}">
<view class="navbar-wrap">
<text class="iconfont icon-back_light back" @click="$util.redirectTo('/pages/member/index')"></text>
<view class="navbar-title">
@ -18,19 +17,18 @@
<view class="head-wrap" :style="{ background: 'url(' + $util.img('public/uniapp/balance/balance_bg.png') + ') no-repeat right bottom/ auto 340rpx, linear-gradient(314deg, #FE7849 0%, #FF1959 100%)' }">
<view class="balance price-font">{{ (parseFloat(balanceInfo.balance) + parseFloat(balanceInfo.balance_money)).toFixed(2) }}</view>
<view class="title">账户余额</view>
<view class="title">账户余额</view>
<view class="flex-box">
<view class="flex-item">
<view class="num price-font">{{ balanceInfo.balance_money|moneyFormat }}</view>
<view class="font-size-tag">现金余额</view>
<view class="num price-font">{{(parseFloat(balanceInfo.balance) + parseFloat(balanceInfo.balance_money)).toFixed(2) }}</view>
<view class="font-size-tag">余额</view>
</view>
<view class="flex-item">
<view class="num price-font">{{ balanceInfo.balance|moneyFormat }}</view>
<view class="font-size-tag">储值余额</view>
<!-- <view class="num price-font">{{ balanceInfo.balance|moneyFormat }}</view> -->
<!-- <view class="font-size-tag">储值余额</view> -->
</view>
</view>
</view>
<view class="menu-wrap">
<view class="menu-item" @click="toBalanceDetail">
<view class="icon">
@ -49,6 +47,9 @@
</view>
<view class="action">
<view class="transfer" v-if="withdrawConfig && withdrawConfig.value.is_user_transfer" @click="toBalanceTransfer">
转账
</view>
<view @click="toList" class="recharge-withdraw " v-if="addonIsExist.memberrecharge && memberrechargeConfig && memberrechargeConfig.is_use">
{{ $lang('recharge') }}
</view>
@ -99,6 +100,9 @@ export default {
toBalanceDetail() {
this.$util.redirectTo('/pages_tool/member/balance_detail');
},
toBalanceTransfer() {
this.$util.redirectTo('/pages_tool/member/balance_transfer');
},
toList() {
this.$util.redirectTo('/pages_tool/recharge/list');
},
@ -111,6 +115,7 @@ export default {
},
success: res => {
if (res.data) {
console.log(res.data);
this.balanceInfo = res.data;
} else {
this.$util.showToast({

View File

@ -0,0 +1,353 @@
<template>
<page-meta :page-style="themeColor"></page-meta>
<view class="container">
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">会员账号</view>
<view class="money-wrap">
<input type="text" class="withdraw-money" style="font-size: 16px;" placeholder="请输入会员账号" v-model="username" />
<view class="delete" @click="removeUsername" v-if="username">
<image :src="$util.img('upload/picture/member/apply_withdrawal/close.png')" mode="widthFix"></image>
</view>
</view>
</view>
<view class="empty-box"></view>
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">转账</view>
<view class="money-wrap">
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
<view class="delete" @click="remove" v-if="withdrawMoney">
<image :src="$util.img('upload/picture/member/apply_withdrawal/close.png')" mode="widthFix"></image>
</view>
</view>
<view class="bootom">
<view>
<text class="color-tip">可用余额{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance | moneyFormat }}</text>
</view>
</view>
</view>
<view class="empty-box"></view>
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">支付密码</view>
<view class="money-wrap">
<input type="digit" class="withdraw-money" v-model="buy_password" />
</view>
</view>
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal"
:class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 || username==''}" @click="withdraw">
确认转账
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
data() {
return {
username:'',
withdrawInfo: {
config: {
is_use: 0,
min: 1,
rate: 0
},
member_info: {
balance_money: 0,
balance_withdraw: 0,
balance_withdraw_apply: 0
}
},
bankAccountInfo: {},
withdrawMoney: '',
buy_password: '',
isSub: false
};
},
onShow() {
//
this.$langConfig.refresh();
if (uni.getStorageSync('token')) {
this.getWithdrawInfo();
} else {
this.$util.redirectTo('/pages_tool/login/login');
}
},
methods: {
//
remove() {
this.withdrawMoney = '';
},
removeUsername(){
this.username = '';
},
/**
* 获取提现信息
*/
getWithdrawInfo() {
let _this = this;
this.$api.sendRequest({
url: '/api/memberwithdraw/info',
success: res => {
if (res.code >= 0 && res.data) {
this.withdrawInfo = res.data;
if (this.withdrawInfo.config.is_user_transfer == 0) {
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
}
if (this.withdrawInfo.member_info.is_pay_password == 0) {
uni.showModal({
title: '温馨提示',
content: '您未设置支付密码,需设置支付密码后进行转账,点击确定前往支付密码设置',
success: function (res) {
if (res.confirm) {
_this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
} else if (res.cancel) {
_this.isSub = false;
console.log('用户点击取消');
}
}
});
}
}
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
},
fail: res => {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
}
});
},
verify() {
if (this.username == '') {
this.$util.showToast({
title: '请输入转入账号'
});
return false;
}
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({
title: '请输入提现金额'
});
return false;
}
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.member_info.balance)) {
this.$util.showToast({
title: '转出金额超出可用现金额'
});
return false;
}
// if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawInfo.config.min)) {
// this.$util.showToast({
// title: ''
// });
// return false;
// }
return true;
},
withdraw() {
if (this.verify()) {
if (this.isSub) return;
this.isSub = true;
let _this = this;
uni.showModal({
title: '温馨提示',
content: '您的账号余额将转让他人账号!',
success: function (res) {
if (res.confirm) {
_this.$api.sendRequest({
url: '/api/memberwithdraw/balanceTransfer',
data: {
username: _this.username,
apply_money: _this.withdrawMoney,
password: _this.buy_password,
},
success: res => {
if (res.code >= 0) {
_this.$util.showToast({
title: '转账成功'
});
setTimeout(() => {
_this.$util.redirectTo('/pages_tool/member/balance', {}, 'redirectTo');
}, 1500);
} else {
_this.isSub = false;
if (res.code == -801) {
uni.showModal({
title: '温馨提示',
content: '您未设置支付密码,需设置支付密码后进行转账,点击确定前往支付密码设置',
success: function (res) {
if (res.confirm) {
_this.$util.redirectTo('/pages_tool/member/info_edit', {action: 'pay_password'}, '');
} else if (res.cancel) {
_this.isSub = false;
console.log('用户点击取消');
}
}
});
} else {
_this.$util.showToast({
title: res.data || res.message
});
}
}
},
fail: res => {
_this.isSub = false;
}
});
}
else if (res.cancel) {
_this.isSub = false;
console.log('用户点击取消');
}
}
});
}
}
},
filters: {
/**
* 金额格式化输出
* @param {Object} money
*/
moneyFormat(money) {
return parseFloat(money).toFixed(2);
}
}
};
</script>
<style lang="scss">
.container {
width: 100vw;
height: 100vh;
background: #fff;
}
.empty-box {
height: 20rpx;
}
.bank-account-wrap {
margin: 0 20rpx;
padding: 20rpx 30rpx;
border-bottom: 1px solid #f7f7f7;
position: relative;
.tx-wrap {
display: flex;
justify-content: space-between;
margin-right: 60rpx;
.tx-bank {
margin-right: 60rpx;
flex: 1;
margin-left: 10rpx;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tx-img {
position: absolute;
right: 100rpx;
top: 50%;
transform: translateY(-50%);
width: 40rpx;
height: 40rpx;
image {
width: 100%;
height: 100%;
}
}
}
.iconfont {
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
}
}
.withdraw-wrap {
margin: 0 20rpx;
padding: 30rpx;
border-radius: 16rpx;
box-shadow: rgba(110, 110, 110, 0.09) 0 0 20rpx 0;
.money-wrap {
padding: 20rpx 0;
border-bottom: 1px solid #eee;
display: flex;
.unit {
font-size: 60rpx;
line-height: 1;
}
.withdraw-money {
height: 60rpx;
line-height: 1;
min-height: 60rpx;
padding-left: 20rpx;
font-size: 60rpx;
flex: 1;
font-weight: bolder;
}
.delete {
width: 40rpx;
height: 40rpx;
image {
width: 100%;
height: 100%;
}
}
}
.bootom {
display: flex;
padding-top: 20rpx;
text {
line-height: 1;
flex: 2;
}
.all-tx {
padding-left: 10rpx;
}
}
}
.btn {
margin: 0 30rpx;
margin-top: 60rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: $border-radius;
color: #fff;
text-align: center;
background-color: var(--main-color);
&.disabled {
background: #ccc;
border-color: #ccc;
color: #fff;
}
}
.recoend {
margin-top: 40rpx;
.recoend-con {
text-align: center;
}
}
.desc {
font-size: $font-size-tag;
color: #999;
}
</style>

View File

@ -66,11 +66,10 @@
<text class="cell-more"></text>
</view>
<!-- 支付密码 -->
<!-- <view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('paypassword')">
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('pay_password')">
<text class="cell-tit">{{ $lang('paypassword') }}</text>
<text class="cell-more"></text>
</view> -->
</view>
<view class="info-list-cell info-list-con" hover-class="cell-hover" @click="modifyInfo('address')">
<text class="cell-tit">所在地址</text>
<text class="cell-tip" v-if="memberInfo.full_address">{{ memberInfo.full_address }} {{ memberInfo.address }}</text>

View File

@ -62,8 +62,8 @@
</view>
</view>
<!-- 修改密码 -->
<view v-if="indent == 'password'" class="edit-info">
<block v-if="memberInfo.password == 0 && memberInfo.mobile == ''">
<view v-if="indent == 'password' || indent == 'pay_password'" class="edit-info">
<block v-if="memberInfo.password =='' || memberInfo.pay_password == '' && memberInfo.mobile == ''">
<view class="empty">
<view class="empty_img"><image :src="$util.img('public/uniapp/common/common-empty.png')" mode="aspectFit"></image></view>
<view class="color-tip margin-top margin-bottom">请先绑定手机再执行该操作</view>
@ -97,11 +97,12 @@
<input class="uni-input info-content input-len" type="password" maxlength="30" :placeholder="$lang('confirmPassword')" v-model="formData.confirmPassword" />
</view>
<view class="save-item" @click="save('password')">
<view class="save-item" @click="save(indent)">
<button type="primary">{{ $lang('save') }}</button>
</view>
</block>
</view>
<!-- 修改手机号 -->
<view v-if="indent == 'mobile'" class="edit-info">
<view class="edit-info-box">

View File

@ -157,4 +157,8 @@
line-height: 72rpx;
color: #FF4646;
}
.transfer {
background: #4dc36c;
}
}

View File

@ -77,18 +77,16 @@ export default {
};
},
onLoad(option) {
this.formData.mobileCodeText = this.$lang('findanimateCode');
if (option.back) {
this.back = option.back;
}
this.getCaptcha();
if (option.action) {
this.indent = option.action;
console.log(this.indent);
this.setNavbarTitle()
}
this.getRegisterConfig();
this.isIphoneX = this.$util.uniappIsIPhoneX()
this.initLang();
@ -172,6 +170,9 @@ export default {
case 'mobile':
title = this.$lang('mobile');
break;
case 'pay_password':
title = this.$lang('paypassword');
break;
}
uni.setNavigationBarTitle({
title: title
@ -199,9 +200,7 @@ export default {
this.formData.nickName = this.memberInfo.nickname; //昵称
this.formData.realName = this.memberInfo.realname; //真实姓名
this.formData.sex = this.memberInfo.sex; //性别
this.formData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(
this.memberInfo.birthday,
'YYYY-MM-DD') : ''; //生日
this.formData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday,'YYYY-MM-DD') : ''; //生日
this.formData.provinceId = this.memberInfo.province_id;
this.formData.cityId = this.memberInfo.city_id;
this.formData.districtId = this.memberInfo.district_id;
@ -352,7 +351,7 @@ export default {
case 'birthday':
this.modifyBirthday();
break;
case 'password':
case 'password' || 'pay_password':
this.modifyPassword();
break;
case 'mobile':
@ -582,7 +581,7 @@ export default {
});
},
modifyPassword() {
if (this.memberInfo.password) {
if ((this.indent=='password'&&this.memberInfo.password) || (this.indent=='pay_password'&&this.memberInfo.pay_password)) {
var rule = [{
name: 'currentPassword',
checkType: 'required',
@ -612,7 +611,6 @@ export default {
}
];
}
let regConfig = this.registerConfig;
if (regConfig.pwd_len > 0) {
rule.push({
@ -665,6 +663,7 @@ export default {
this.$api.sendRequest({
url: '/api/member/modifypassword',
data: {
pass_type: this.indent,
new_password: this.formData.newPassword,
old_password: this.formData.currentPassword,
code: this.formData.mobileDynacode,