123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479 |
- <template>
- <view>
- <view style="color: #000000;">
- <tn-nav-bar backgroundColor="#ffffff" :bottomShadow="false">{{commission_alias}}</tn-nav-bar>
- <view :style="{height: tobheight+'px'}"></view>
- </view>
- <view style="width:100%;height: 100%;">
- <view class="commission-wrap" :class="{ blur: !hasAuth }">
- <!-- 用户资料 -->
- <view class="user-card">
- <view class="card-top u-flex u-row-between">
- <view class="u-flex">
- <view class="head-img-box">
- <image class="head-img" :src="userInfo.avatar?userInfo.avatar:'/static/images/head.jpg'"
- mode=""></image>
- </view>
- <view class="u-flex-col">
- <view class="user-name">{{ userInfo.nickname }}</view>
- <view class="user-info-box u-flex">
- <view class="tag-box u-flex">
- <!-- <image v-if="commissionLv.image" class="tag-img" :src="commissionLv.image" mode=""></image> -->
- <text class="tag-title">{{ commissionLv.name }}</text>
- <!-- <view v-show="showLv" class="u-iconfont uicon-arrow-right" style="color: #fff;font-size: 28rpx;"></view> -->
- </view>
- </view>
- </view>
- </view>
- <view class="u-flex-col">
- <view class="u-flex-col u-col-center">
- <button class="u-reset-button log-btn u-m-b-20" @tap="toTeam">明细</button>
- <button class="u-reset-button look-btn" @tap="showMoney = !showMoney">
- <!-- <view class="u-iconfont" :class="showMoney ? 'uicon-eye-fill' : 'uicon-eye-off'" style="color: #fff;font-size: 50rpx;"></view> -->
- <u-icon :name="showMoney ? 'eye-fill':'eye-off'" color="#fff" size="22"></u-icon>
- </button>
- </view>
- </view>
- </view>
- <!-- 收益 -->
- <view class="card-bottom u-flex">
- <view class="u-flex-1 ">
- <view class="item-title">累计收入</view>
- <view class="item-detail">{{showMoney? money_total || 0.00:'****'}}</view>
- </view>
- <view class="u-flex-1 u-col-center">
- <view class="item-title">待入账佣金</view>
- <view class="item-detail">{{showMoney? on_cashout_money || 0.00:'****'}}</view>
- </view>
- </view>
- </view>
- <!-- 滚动明细 -->
- <view class="commission-log">
- <scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box log-scroll">
- <view class="log-item-box u-flex u-row-between" v-for="item in commissionLog" :key="item.id"
- @tap="$u.toast(item.remark)">
- <view class="log-item-wrap">
- <view class="log-item u-flex u-ellipsis-1 u-col-center">
- <view class="u-flex u-col-center ">
- <!-- <image
- class="log-img"
- :src="item.oper_type !== 'user' ? logMap[item.oper_type] : item.oper ? item.oper.avatar : logMap['admin']"
- mode=""
- ></image> -->
- <image class="log-img" :src="appInfo.site_logo_path" mode=""></image>
- </view>
- <view class="log-text u-ellipsis-1">{{ item.remark }}</view>
- </view>
- </view>
- <text class="log-time">{{ item.createtime }}</text>
- </view>
- <!-- 更多 -->
- <!-- <view class="loadmore-wrap" v-if="commissionLog.length"><u-loadmore :status="loadStatus" icon-type="flower" color="#f6f6f6" /></view> -->
- </scroll-view>
- </view>
- <!-- 功能菜单 -->
- <view class="menu-box u-flex">
- <view class="menu-item u-flex-col u-col-center" v-for="(menu, index) in menuList"
- v-if="!menu.isAgentFrom" :key="index" @tap="jump(menu.path)">
- <image class="item-img" :src="menu.img" mode=""></image>
- <view class="item-title">{{ menu.title }}</view>
- </view>
- <!-- #ifdef H5 -->
- <view @click="createPoster" class="menu-item u-flex-col u-col-center">
- <image class="item-img" src="https://file.shopro.top/imgs/commission/commission_icon5.png"
- mode=""></image>
- <view class="item-title">分享海报</view>
- </view>
- <view @click="sharelink" class="menu-item u-flex-col u-col-center">
- <image class="item-img" src="https://file.shopro.top/imgs/commission/commission_icon7.png"
- mode=""></image>
- <view class="item-title">分享链接</view>
- </view>
- <!-- #endif -->
- </view>
- <!-- #ifdef H5 -->
- <!-- <view class="bill">
- <u-button @click="createPoster" color="#ffc107" type="primary" shape="circle" text="推广海报"></u-button>
- </view> -->
- <!-- #endif -->
- </view>
- <!-- 佣金中心权限验证 -->
- <u-popup class="auth-box" :mask="false" v-model="showAuthModal" mode="center" :mask-close-able="false"
- close-icon-pos="top-left" border-radius="20">
- <view class="notice-box">
- <view class="img-wrap">
- <image class="notice-img" :src="authNotice.img" mode=""></image>
- </view>
- <view class="notice-title">{{ authNotice.title }}</view>
- <view class="notice-detail">{{ authNotice.detail }}</view>
- <button class="u-reset-button notice-btn"
- @tap="onAuthBtn(authNotice.btnPath)">{{ authNotice.btnText }}</button>
- <button class="u-reset-button back-btn" @tap="$Router.back()" v-if="!authNotice.hideBtn">返回</button>
- <button class="u-reset-button back-btn" @tap="hasAuth = true" v-else>取消</button>
- </view>
- </u-popup>
- <!-- 成为分销商条件 -->
- <u-popup v-if="showTerm" class="into-agent-modal" :bgStyle="{
- background: 'none'
- }" v-model="showTerm" mode="center" :mask="false" :mask-close-able="false">
- <view class="condition-box u-flex u-row-center u-col-center">
- <!-- 金额人数 -->
- <view class="goods-condition u-flex u-row-between" v-if="showMoneyTerm">
- <view class="btn-box u-flex-col u-p-20 u-col-center">
- <button class="u-reset-button buy-btn u-m-b-10" @tap="$Router.back()">知道了</button>
- <view class="tips">* 满足指定消费金额即可成为分销商</view>
- </view>
- </view>
- </view>
- </u-popup>
- </view>
- <!-- <wike-loading-page :isLoading="isLoading"></wike-loading-page> -->
- <!-- <u-popup :show="showPoster" mode="bottom" :round="10" @close="close">
- <view class="poster">
- <wike-painter :board="posterObj" @success="posterSuccess" ref="painter"></wike-painter>
- <view class="footer-btn">
- <view class="" @click="showPoster = false">退出</view>
- <view class="save" @click="toSave">保存/分享</view>
- </view>
- </view>
- </u-popup> -->
- <u-popup :show="showPoster" mode="bottom" @close="showPoster = false">
- <!-- <view :style="{height: tobheight+'px'}"></view> -->
- <scroll-view scroll-y="true" :style="{maxHeight: posterheight +'px'}">
- <wike-painter :board="posterObj" @done="posterSuccess" ref="painter"></wike-painter>
- <view style="height: 78px;"></view>
- <view class="dygbhg">
- <view class="whole" @click="showPoster = false">取消</view>
- <view class="distinguish" @click="toSave">保存/分享</view>
- </view>
- </scroll-view>
- </u-popup>
- <wike-loading-page :isLoading="isLoading"></wike-loading-page>
- </view>
- </template>
- <script>
- import {
- mapMutations,
- mapActions,
- mapState,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- isLoading: true,
- tobheight: 45,
- platform: this.$platform.get(),
- showAuthModal: true,
- empty: false,
- team: [{
- headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
- nickname: '多级火箭好',
- times: '2020/12/24'
- }, {
- headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
- nickname: '多级火箭好',
- times: '2020/12/24'
- }, {
- headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
- nickname: '多级火箭好',
- times: '2020/12/24'
- }],
- pages: 1,
- currentTab: 0,
- navbar: [{
- name: "下一级",
- type: 'shareuid'
- }, {
- name: "下下级",
- type: 'shareuid_grandpa'
- },
- // {
- // name: "下三级",
- // type:'shareuid_great_grandpa'
- // },
- ],
- showShare: false, //是否显示分享海报
- showMoney: true, //是否显示金额
- hasAuth: true, //是否有权限
- commissionLv: {
- name: '合伙人'
- },
- //合伙人等级
- commissionWallet: null, //合伙人钱包
- agentFrom: null, //是否显示我的资料
- showLv: true,
- commissionLog: [{
- id: 1,
- oper_type: 'gf',
- oper: 'https://file.shopro.top/imgs/commission/commission_icon1.png',
- remark: '恭喜您成为了合伙人',
- createtime: 1676428876
- }], //动态
- loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
- currentPage: 1,
- lastPage: 1,
- logMap: {
- system: this.$IMG_URL + '/imgs/commission/commission_base_notice.png',
- admin: this.$IMG_URL + '/imgs/commission/commission_base_avatar.png'
- },
- showTerm: true, //条件弹窗
- showGoodsTerm: false, //商品条件
- showMoneyTerm: false, //金额条件
- goodsTermList: [],
- moneyTermNum: 0,
- authNotice: {},
- menuList: [
- //menu
- {
- img: 'https://file.shopro.top/imgs/commission/commission_icon1.png',
- title: '我的团队',
- path: '/pages/user/commission/team'
- },
- {
- img: 'https://file.shopro.top/imgs/commission/commission_icon2.png',
- title: '佣金明细',
- path: '/pages/user/commission/commission-log'
- },
- {
- img: 'https://file.shopro.top/imgs/commission/commission_icon4.png',
- title: '推广套餐',
- path: '/pages/user/commission/goods',
- },
- {
- img: 'https://file.shopro.top/imgs/commission/commission_icon3.png',
- title: '提现佣金',
- path: '/pages/user/commission/withdraw',
- },
- // {
- // img: 'https://file.shopro.top/imgs/commission/commission_icon6.png',
- // title: '排行榜',
- // path: '/pages/user/commission/rankings'
- // },
- {
- img: 'https://file.shopro.top/imgs/commission/commission_icon8.png',
- title: '提现记录',
- path: '/pages/user/commission/withdraw-log',
- },
- // {
- // img: 'https://file.shopro.top/imgs/commission/commission_icon5.png',
- // title: '分享海报',
- // path: '/pages/user/commission/withdraw',
- // },
- // {
- // img: 'https://file.shopro.top/imgs/commission/commission_icon7.png',
- // title: '分享记录',
- // path: '/pages/app/commission/share-log',
- // }
- ],
- money_total: '0.00',
- on_cashout_money: '0.00',
- showPoster: false,
- posterObj: {},
- posterfff: '您好,我是AI语言模型,可以帮助你做很多事情。例如:\n- 回答你的问题\n- 给你提供某些信息\n- 帮你搜索网页\n- 聊天和闲聊\n- 玩一些小游戏\n- 计算数学题\n- 翻译语言\n- 生成文本\n等等.....\n如果你有任何问题或需要帮助,请随时告诉我。',
- spmplatform: 0,
- is_examine: 1,
- commission_price: 0,
- info: {},
- posterheight: 0,
- poster_bg_img_path:'',
- commission_alias:''
- }
- },
- computed: {
- ...mapGetters(['appInfo', 'isLogin', 'userInfo'])
- },
- onLoad() {
- // this.getInviteList()
- const that = this;
- if (this.platform == 'wxMiniProgram') {
- var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
- var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
- this.tobheight = (menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height)
- }
- this.posterheight = uni.$u.sys().windowHeight - this.tobheight
- this.spmplatform = ['H5', 'wxOfficialAccount', 'wxMiniProgram', 'App'].indexOf(this.platform) + 1;
- this.commonqrcodePath()
- // console.log('http://vmoushivideomerge.oss-cn-shanghai.aliyuncs.com/20230422/96f1f662dcfc68cb3eff1dcbf660ed92.jpg');
- // that.$base64.imageUrlToBase64('http://vmoushivideomerge.oss-cn-shanghai.aliyuncs.com/20230422/96f1f662dcfc68cb3eff1dcbf660ed92.jpg')
- },
- onShow() {
- this.islogin();
- },
- methods: {
- islogin() {
- var that = this;
- if (!this.isLogin) {
- uni.navigateTo({
- url: '../user/signin'
- });
- } else {
- this.commission()
- // this.getCheck()
- }
- },
- commission() {
- let that = this;
- that.$http('conf.getGroupConf', {
- group: 'system.commission'
- }).then(res => {
- if (res.code === 0) {
- that.info = res.data
- that.commission_alias = res.data.commission_alias?res.data.commission_alias:'分销中心'
- if (res.data.is_examine) {
- that.is_examine = res.data.is_examine
- // console.log(that.is_examine);
- }
- if (res.data.commission_price) {
- that.commission_price = res.data.commission_price
- }
- if (res.data.is_ranking == 1) {
- if (that.menuList.length == 5) {
- let obj = {
- img: 'https://file.shopro.top/imgs/commission/commission_icon6.png',
- title: '排行榜',
- path: '/pages/user/commission/rankings'
- };
- that.menuList.splice(2, 0, obj);
- }
- }
- that.getCheck()
- }
- });
- },
- commonqrcodePath() {
- let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
- // console.log(spm);
- this.$http('common.qrcodePath', {
- spm: spm
- }).then(res => {
- if (res.code == 0) {
- this.qrcode = res.data;
- }
- });
- },
- sharelink() {
- let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
- // #ifdef MP-WEIXIN
- let url = '/pages/index/index?' + 'spm=' + spm
- uni.setClipboardData({
- data: url,
- success: function() {
- uni.showToast({
- title: '复制链接成功'
- });
- }
- });
- // #endif
- // #ifdef H5
- let uniacid = uni.getStorageSync('uniacid');
- if (uniacid) {
- let url = window.location.href.split('/h5')[0] + '/h5/?uniacid=' + uniacid + '&spm=' + spm;
- uni.setClipboardData({
- data: url,
- success: function() {
- uni.showToast({
- title: '复制链接成功'
- });
- }
- });
- } else {
- uni.showToast({
- title: '复制链接失败',
- icon: 'none'
- })
- }
- // #endif
- },
- getdownload(e){
- return new Promise((resolve, reject) => {
- uni.request({
- url: e,
- method:'GET',
- responseType:'arraybuffer',
- success: ress => {
- let base64 = wx.arrayBufferToBase64(ress.data);
- base64 = 'data:image/jpeg;base64,' + base64
- resolve(base64);
- },
- fail: (e) => {
- resolve('fail');
- }
- })
- });
- },
- posterSuccess(){
- uni.hideLoading();
- },
- async createPoster(e) {
- let that = this;
- let httpsurl = '';
- uni.showLoading({
- title: '海报渲染中'
- });
-
- if(that.info.poster_bg_img_path.indexOf("https") < 0){
- httpsurl = await that.getdownload(that.info.poster_bg_img_path.replace("http:", "https:"));
- }else{
- httpsurl = await that.getdownload(that.info.poster_bg_img_path);
- }
- if(httpsurl == 'fail'){
- uni.hideLoading();
- uni.showToast({
- title:'生成失败',
- icon:'none'
- })
- return;
- }
- let proportionally = this.info.poster_bg_width / uni.$u.sys().windowWidth;
- // console.log(this.info.poster_bg_width,(this.info.poster_bg_width / proportionally));
- // console.log(this.info.poster_bg_height,(this.info.poster_bg_height / proportionally));
- // console.log(this.info.poster_qrcode_x,(this.info.poster_qrcode_x / proportionally));
- // console.log(this.info.poster_qrcode_y,(this.info.poster_qrcode_y / proportionally));
- // console.log(this.info.poster_qrcode_width,(this.info.poster_qrcode_width / proportionally));
- (this.posterObj = {
- width: (this.info.poster_bg_width / proportionally) + 'px',
- height: (this.info.poster_bg_height / proportionally) + 'px',
- background: '#fff',
- borderRadius: '16rpx',
- views: [{
- src: httpsurl,
- type: "image",
- css: {
- width: (this.info.poster_bg_width / proportionally) + 'px',
- height: (this.info.poster_bg_height / proportionally) + 'px',
- }
- },
- // {
- // src: this.userInfo.avatar ? this.userInfo.avatar : '/static/images/head.jpg',
- // type: "image",
- // css: {
- // width: '100rpx',
- // height: '100rpx',
- // borderRadius: '50%',
- // position:'fixed',
- // left: '286rpx',
- // top: '258rpx',
- // objectFit:'cover'
- // }
- // },
- {
- type: 'view',
- css: {
- left: (this.info.poster_qrcode_x / proportionally) + 'px',
- top: (this.info.poster_qrcode_y / proportionally) + 'px',
- position: 'fixed',
- },
- // #ifdef H5
- views: [{
- type: 'qrcode',
- text: this.qrcode,
- css: {
- width: (this.info.poster_qrcode_width / proportionally) + 'px',
- height: (this.info.poster_qrcode_width / proportionally) + 'px',
- background: '#fff'
- }
- }],
- // #endif
- // #ifdef MP-WEIXIN
- views: [{
- type: 'image',
- src: this.qrcode,
- css: {
- width: (this.info.poster_qrcode_width / proportionally) + 'px',
- height: (this.info.poster_qrcode_width / proportionally) + 'px',
- background: '#fff'
- }
- }]
- // #endif
- }
- ]
- // views: [
- // {
- // type: 'view',
- // css: {
- // marginTop: '20rpx',
- // paddingLeft: '10rpx',
- // display: 'flex'
- // },
- // views: [
- // {
- // type: 'image',
- // src: this.userInfo.avatar ? this.userInfo.avatar : '/static/images/head.jpg',
- // css: {
- // marginTop: '10rpx',
- // marginLeft: '10rpx',
- // borderRadius: '16rpx',
- // width: '80rpx',
- // height: '80rpx',
- // border: '2rpx solid #fff',
- // objectFit: 'cover'
- // }
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '10rpx',
- // marginLeft: '20rpx'
- // },
- // views: [
- // {
- // type: 'view',
- // views: [
- // {
- // type: 'text',
- // text: this.userInfo.nickname?this.userInfo.nickname:'提问者',
- // css: {
- // marginTop: '10rpx',
- // fontSize: '28rpx',
- // fontWeight: 'bold',
- // color: '#1A2033',
- // lineHeight: '28rpx'
- // }
- // }
- // ]
- // },
- // {
- // type: 'view',
- // views: [
- // {
- // type: 'text',
- // text: '我的提问',
- // css: {
- // marginTop: '15rpx',
- // fontSize: '22rpx',
- // color: '#999',
- // lineHeight: '25rpx'
- // }
- // }
- // ]
- // }
- // ]
- // }
- // ]
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '20rpx',
- // width: '610rpx',
- // padding: '10rpx',
- // background: '#d2f8d3',
- // borderRadius: '16rpx',
- // marginLeft: '20rpx',
- // marginRight: '10rpx'
- // },
- // views: [
- // {
- // type: 'text',
- // text: 'hello!你可以帮我做些什么呢?',
- // css: {
- // fontSize: '28rpx',
- // color: '#1A2033',
- // lineHeight: '45rpx',
- // lineClamp: 2,
- // paddingLeft: '10rpx',
- // paddingRight: '10rpx',
- // width: '590rpx'
- // }
- // }
- // ]
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '20rpx',
- // paddingLeft: '10rpx',
- // display: 'flex'
- // },
- // views: [
- // {
- // type: 'image',
- // src: this.appInfo.page_template == 3?'/static/images/open1.png':'/static/images/open.png',
- // css: {
- // marginTop: '10rpx',
- // marginLeft: '10rpx',
- // borderRadius: '16rpx',
- // width: '80rpx',
- // height: '80rpx',
- // border: '2rpx solid #fff',
- // objectFit: 'cover'
- // }
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '10rpx',
- // marginLeft: '20rpx'
- // },
- // views: [
- // {
- // type: 'view',
- // views: [
- // {
- // type: 'text',
- // text: this.appInfo.site_name,
- // css: {
- // marginTop: '10rpx',
- // fontSize: '28rpx',
- // fontWeight: 'bold',
- // color: '#1A2033',
- // lineHeight: '28rpx'
- // }
- // }
- // ]
- // },
- // {
- // type: 'view',
- // views: [
- // {
- // type: 'text',
- // text: '回答结果',
- // css: {
- // marginTop: '15rpx',
- // fontSize: '22rpx',
- // color: '#999',
- // lineHeight: '25rpx'
- // }
- // }
- // ]
- // }
- // ]
- // }
- // ]
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '20rpx',
- // width: '610rpx',
- // padding: '10rpx',
- // background: '#f5f6f8',
- // borderRadius: '16rpx',
- // marginLeft: '20rpx',
- // marginRight: '10rpx'
- // },
- // views: [
- // {
- // type: 'text',
- // text: uni.$u.trim(that.posterfff),
- // css: {
- // fontSize: '28rpx',
- // color: '#1A2033',
- // lineHeight: '45rpx',
- // lineClamp: 11,
- // width: '590rpx',
- // padding: '10rpx'
- // }
- // }
- // ]
- // },
- // {
- // type: 'view',
- // css: {
- // marginTop: '20rpx',
- // width: '100%',
- // textAlign: 'center'
- // },
- // #ifdef H5
- // views: [
- // {
- // type: 'qrcode',
- // text: this.qrcode,
- // css: {
- // width: '200rpx',
- // height: '200rpx'
- // }
- // }
- // ],
- // #endif
- // #ifdef MP-WEIXIN
- // views: [
- // {
- // type: 'image',
- // src: this.qrcode,
- // css: {
- // width: '200rpx',
- // height: '200rpx'
- // }
- // }
- // ]
- // #endif
- // },
- // {
- // type: 'text',
- // text: '———— ' + '长按识别 | 欢迎使用' + ' ————',
- // css: {
- // marginTop: '20rpx',
- // width: '100%',
- // textAlign: 'center',
- // fontSize: '24rpx',
- // color: '#989FB3',
- // lineHeight: '33rpx'
- // }
- // }
- // ]
- }),
- (this.showPoster = true);
- },
- toSave() {
- uni.showLoading({
- title: '海报生成中'
- });
- this.$refs.painter.canvasToTempFilePathSync({
- // 在nvue里是jpeg
- fileType: 'jpg',
- quality: 1,
- success: res => {
- // this.path = res.tempFilePath;
- // this.$refs.posterImg.open();
- // this.show_poster = true;
- // console.log(res.tempFilePath);
- // 非H5 保存到相册
- // H5 提示用户长按图另存
- // #ifdef MP-WEIXIN
- // uni.saveImageToPhotosAlbum({
- // filePath: res.tempFilePath,
- // success: function() {
- // uni.showToast({
- // title: '保存成功'
- // });
- // that.showPoster = false;
- // }
- // });
- wx.showShareImageMenu({
- path: res.tempFilePath
- })
- this.showPoster = false;
- uni.hideLoading();
- // #endif
- // #ifdef H5
- this.showPoster = false;
- uni.hideLoading();
- uni.showModal({
- confirmColor: '#26B3A0',
- confirmText: '查看图片',
- title: '提示',
- content: '查看图片后长按图片即可保存或分享',
- success(src) {
- if (src.confirm) {
- uni.previewImage({
- urls: [res.tempFilePath]
- });
- } else if (src.cancel) {
- this.showPoster = true;
- }
- }
- });
- // #endif
- }
- });
- },
- getCheck() {
- var that = this;
- that.$http('commission.auth').then(res => {
- if (res.code == 0) {
- this.isLoading = false
- uni.setNavigationBarTitle({
- title: this.appInfo.site_name
- });
- that.money_total = res.data.money_total > 0 ? res.data.money_total : '0.00'
- that.on_cashout_money = res.data.on_cashout_money > 0 ? res.data.on_cashout_money : '0.00'
- that.commissionLog[0].createtime = res.data.create_time
- // console.log(res.data.paid,this.commission_price);
- // console.log(Number(this.commission_price));
- // if(Number(this.commission_price)>0&&res.data.paid == 0){
- // uni.redirectTo({
- // url:'/pages/user/commission/apply'
- // })
- // }
- // console.log(res.data.status,that.is_examine);
- if (res.data.status == 0 && that.is_examine == 1) {
- uni.showModal({
- confirmText: '确定',
- showCancel: false,
- confirmColor: '#5e49c3',
- content: '分销商申请已提交,等待后台审核通过',
- title: '提示',
- success(res) {
- if (res.confirm) {
- uni.navigateBack()
- }
- }
- })
- }
- if (res.data.status == 2) {
- uni.showModal({
- confirmText: '联系客服',
- confirmColor: '#5e49c3',
- content: '已被禁用,有疑问请咨询客服',
- title: '提示',
- success(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/user/public/kefu'
- })
- } else if (res.cancel) {
- uni.navigateBack()
- }
- }
- })
- }
- } else {
- // uni.showModal({
- // confirmText:'申请',
- // confirmColor:'#5e49c3',
- // content:'立即申请成为合伙人',
- // title:'提示',
- // success(res) {
- // if(res.confirm){
- // that.commissionapply()
- // }else if(res.cancel){
- // uni.navigateBack()
- // }
- // }
- // })
- uni.redirectTo({
- url: '/pages/user/commission/apply'
- })
- }
- });
- },
- commissionapply() {
- var that = this;
- that.$http('commission.apply').then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '申请成功'
- })
- that.getCheck()
- } else {
- uni.showModal({
- confirmText: '重新申请',
- confirmColor: '#5e49c3',
- content: '合伙人申请失败',
- title: '提示',
- success(res) {
- if (res.confirm) {
- that.commissionapply()
- } else if (res.cancel) {
- uni.navigateBack()
- }
- }
- })
- }
- });
- },
- // 我的团队
- getInviteList() {
- var that = this;
- that.$api('distribution.ulist', {
- uid: this.userInfo.id,
- type: this.navbar[this.currentTab].type
- }).then(res => {
- // console.log(res)
- if (res.data.length > 0) {
- if (that.team.length > 0) {
- var dd = this.team;
- this.team = dd.concat(res.data);
- this.pages++;
- } else {
- this.team = res.data;
- this.pages++;
- }
- } else {
- // this.empty = true
- }
- });
- },
- jump(e) {
- uni.navigateTo({
- url: e
- })
- },
- change(index) {
- this.currentTab = index;
- this.team = [];
- this.pages = 1;
- this.getInviteList()
- },
- toTeam() {
- // uni.navigateTo({
- // url:'/pages/user/commission/team'
- // })
- uni.navigateTo({
- url: '/pages/user/commission/commission-log'
- })
- }
- },
- onPullDownRefresh() {
- var that = this;
- // setTimeout(function() {
- // this.pages = 1;
- // this.team = [];
- // that.getInviteList();
- // uni.stopPullDownRefresh();
- // }, 1000);
- },
- onReachBottom() {
- // this.getInviteList();
- },
- }
- </script>
- <style lang="scss" scoped>
- .commission-wrap {
- background: url('http://file.shopro.top/imgs/commission/commission_bg1.jpg') no-repeat;
- background-size: cover;
- height: 100%;
- width: 100%;
- position: absolute;
- background-position: 50%;
- transition: all 0.3s ease-in-out 0s;
- overflow: hidden;
- }
- // 进度条
- .progress-box {
- .progress-tip {
- font-size: 24rpx;
- font-weight: 500;
- color: #c7b2ff;
- }
- .progress-num {
- font-size: 24rpx;
- position: absolute;
- color: #c7b2ff;
- bottom: -30rpx;
- white-space: nowrap;
- }
- .round-wrap {
- width: 30rpx;
- height: 30rpx;
- border: 2rpx solid #5c3cff;
- background: linear-gradient(0deg, #a36fff 0%, #846fff 100%);
- border-radius: 50%;
- position: absolute;
- bottom: -6rpx;
- transform: translateY(-50%);
- left: 0;
- margin-left: -15rpx;
- .round-inner {
- width: 20rpx;
- height: 20rpx;
- border: 2rpx solid #5c3cff;
- background: linear-gradient(0deg, #a36fff 0%, #846fff 100%);
- border-radius: 50%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- }
- // 佣金中心权限验证蒙层
- .blur {
- filter: blur(20rpx);
- transition: all 0.3s ease-in-out 0s;
- }
- .auth-box {
- width: 100%;
- height: 100%;
- background: none;
- .notice-box {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- background-color: #fff;
- width: 612rpx;
- min-height: 658rpx;
- background: #ffffff;
- padding: 30rpx;
- border-radius: 20rpx;
- .img-wrap {
- margin-bottom: 50rpx;
- .notice-img {
- width: 180rpx;
- height: 170rpx;
- }
- }
- .notice-title {
- font-size: 35rpx;
- font-weight: bold;
- color: #46351b;
- margin-bottom: 28rpx;
- }
- .notice-detail {
- font-size: 28rpx;
- font-weight: 400;
- color: #999999;
- line-height: 36rpx;
- margin-bottom: 50rpx;
- }
- .notice-btn {
- width: 492rpx;
- line-height: 70rpx;
- background: linear-gradient(-90deg, #a36fff, #5336ff);
- box-shadow: 0px 7rpx 11rpx 2rpx rgba(124, 103, 214, 0.34);
- border-radius: 35rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #ffffff;
- margin-bottom: 10rpx;
- }
- .back-btn {
- width: 492rpx;
- line-height: 70rpx;
- font-size: 28rpx;
- font-weight: 500;
- color: #c5b8fb;
- background: none;
- }
- }
- }
- // 成为分销商
- .into-agent-modal {
- .condition-box {
- width: 640rpx;
- height: 786rpx;
- background: url('http://file.shopro.top/imgs/commission/into_commission.png') no-repeat;
- background-size: 100% 100%;
- }
- .goods-condition {
- width: 484rpx;
- height: 580rpx;
- padding: 80rpx 0 30rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- .card-wrap {
- width: 484rpx;
- height: 460rpx;
- padding: 10rpx;
- padding-bottom: 30rpx;
- }
- .modal-progress {
- .progress-tip {
- font-size: 24rpx;
- }
- .progress-box {
- margin-right: 10rpx;
- .cu-progress {
- width: 200rpx;
- position: relative;
- .round-wrap {
- width: 20rpx;
- height: 20rpx;
- }
- .round-inner {
- width: 10rpx;
- height: 10rpx;
- }
- }
- }
- }
- .card-box {
- background: rgba(#c3b6ff, 0.3);
- padding: 10rpx;
- border-radius: 10rpx;
- .img-wrap {
- background: #fff;
- width: 110rpx;
- height: 110rpx;
- border-radius: 10rpx;
- margin-right: 20rpx;
- .goods-img {
- width: 110rpx;
- height: 110rpx;
- border-radius: 10rpx;
- }
- }
- .detail {
- height: 110rpx;
- width: 280rpx;
- align-items: flex-start;
- .title {
- font-size: 20rpx;
- font-weight: 500;
- color: #333333;
- line-height: 35rpx;
- text-align: left;
- }
- .sub {
- font-size: 16rpx;
- font-weight: 500;
- color: #9281e2;
- text-align: left;
- width: 280rpx;
- }
- }
- }
- .filter-card {
- filter: grayscale(100%);
- filter: gray;
- }
- .btn-box {
- background-color: #fff;
- width: 100%;
- position: absolute;
- bottom: 0;
- .buy-btn {
- width: 390rpx;
- line-height: 60rpx;
- background: linear-gradient(-90deg, #a36fff, #5336ff);
- box-shadow: 0px 7rpx 11rpx 2rpx rgba(124, 103, 214, 0.34);
- border-radius: 35rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #ffffff;
- }
- .tips {
- font-size: 20rpx;
- font-weight: 500;
- color: #9281e2;
- }
- }
- }
- }
- // 用户资料卡片
- .user-card {
- width: 690rpx;
- min-height: 350rpx;
- border-radius: 14rpx;
- margin: 30rpx;
- background: url('http://file.shopro.top/imgs/commission/commission_card_bg.png') no-repeat;
- background-size: 100% 100%;
- padding-top: 10rpx;
- .card-top {
- padding: 40rpx 40rpx 30rpx;
- margin-bottom: 30rpx;
- border-bottom: 1px solid rgba(#fff, 0.12);
- .user-name {
- font-size: 26rpx;
- font-weight: 500;
- color: #ffffff;
- line-height: 30rpx;
- margin-bottom: 20rpx;
- }
- .log-btn {
- width: 86rpx;
- line-height: 41rpx;
- border: 1rpx solid rgba(#ffffff, 0.33);
- border-radius: 32rpx;
- font-size: 22rpx;
- font-weight: 400;
- color: #ffffff;
- }
- .look-btn {
- color: #fff;
- font-size: 40rpx;
- }
- }
- .head-img-box {
- margin-right: 26rpx;
- width: 76rpx;
- height: 76rpx;
- border-radius: 50px;
- position: relative;
- background: #fff;
- padding: 10rpx;
- background-clip: padding-box;
- .head-img {
- width: 66rpx;
- height: 66rpx;
- border-radius: 50%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- .user-info-box {
- .tag-box {
- background: rgba(0, 0, 0, 0.2);
- border-radius: 21rpx;
- line-height: 38rpx;
- .tag-img {
- width: 36rpx;
- height: 36rpx;
- border-radius: 50%;
- }
- .tag-title {
- font-size: 20rpx;
- padding: 0 10rpx;
- font-weight: 500;
- color: rgba(255, 255, 255, 1);
- line-height: 36rpx;
- }
- }
- }
- .card-bottom {
- margin: 0 40rpx 40rpx;
- .item-title {
- font-size: 24rpx;
- font-weight: 400;
- color: #ffffff;
- line-height: 30rpx;
- }
- .item-detail {
- font-size: 40rpx;
- font-family: DIN;
- font-weight: 500;
- color: #fefefe;
- line-height: 30rpx;
- margin-top: 30rpx;
- }
- }
- }
- // 滚动明细
- .commission-log {
- min-height: 400rpx;
- padding: 0 30rpx;
- margin-top: 60rpx;
- .log-scroll {
- height: 380rpx;
- .log-item-box {
- height: 78rpx;
- .log-time {
- margin-left: 30rpx;
- font-size: 22rpx;
- font-weight: 500;
- color: #fefefe;
- text-align: right;
- }
- }
- .loadmore-wrap {
- line-height: 80rpx;
- }
- .log-item {
- height: 48rpx;
- background: rgba(#5e49c3, 0.4);
- border-radius: 24rpx;
- padding-left: 6rpx;
- padding-right: 20rpx;
- .log-img {
- width: 40rpx;
- height: 40rpx;
- border-radius: 50%;
- margin-right: 10rpx;
- }
- .log-text {
- font-size: 22rpx;
- font-weight: 500;
- color: #fefefe;
- max-width: 480rpx;
- }
- }
- }
- }
- // 功能菜单
- .commission-bottom-bg {
- position: fixed;
- width: 100%;
- bottom: 0;
- z-index: 6;
- }
- .menu-box {
- flex-wrap: wrap;
- margin: 30rpx;
- // position: fixed;
- // width: 750rpx;
- bottom: 0;
- z-index: 10;
- .menu-item {
- width: (690rpx/4);
- margin-bottom: 50rpx;
- .item-img {
- width: 68rpx;
- height: 68rpx;
- }
- .item-title {
- font-size: 24rpx;
- font-weight: 600;
- color: #fff;
- line-height: 30rpx;
- margin-top: 16rpx;
- }
- }
- }
- .bill {
- margin: 30rpx;
- font-weight: bold;
- }
- .u-flex-col {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- }
- .poster {
- padding: 24rpx 40rpx;
- .footer-btn {
- margin-top: 24rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- view {
- width: 319rpx;
- height: 66rpx;
- border-radius: 40rpx;
- border: 1px solid #4070ff;
- font-size: 26rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #4070ff;
- line-height: 66rpx;
- text-align: center;
- }
- .save {
- background: #4070ff;
- color: #ffffff;
- }
- }
- }
- .dygbhg {
- background: #ffffff;
- border-radius: 15rpx 15rpx 0 0;
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- box-shadow: 0px 0px 10px #00000024;
- display: flex;
- align-items: center;
- justify-content: space-evenly;
- }
- .whole {
- width: 45%;
- height: 88rpx;
- display: flex;
- color: #ffffff;
- align-items: center;
- justify-content: center;
- background: #f3f3f3;
- font-weight: bold;
- border-radius: 60rpx;
- color: #3d7eff;
- }
- .distinguish {
- width: 45%;
- height: 88rpx;
- display: flex;
- color: #ffffff;
- align-items: center;
- justify-content: center;
- background: #3d7eff;
- font-weight: bold;
- border-radius: 60rpx;
- margin: 38rpx 0;
- margin-left: 4%;
- }
- </style>
|