feat(uniapp_v2): 二开功能迁移与小程序主包优化

- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动
- queue、assets 使用独立分包以降低主包体积
- 修复首页单根节点与支付结果页 v-if 链
- 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错
- 配置域名与 manifest 应用名称;cache/store 防御性处理

Made-with: Cursor
This commit is contained in:
apple
2026-03-26 12:16:01 +08:00
parent c84aeda062
commit 8e17762510
742 changed files with 184117 additions and 0 deletions

View File

@@ -0,0 +1,381 @@
<template>
<view>
<view class="w-full fixed-lt z-20" :style="{ 'padding-top': sysHeight + 'px' }">
<view class="h-80 px-20 flex-between-center">
<text class="iconfont icon-ic_leftarrow fs-40 text--w111-fff" @tap="pageBack"></text>
</view>
</view>
<view class="header-top relative" :style="[headerBg]">
<!-- <view class="rule-btn w-124 flex-center fs-24 text--w111-fff" :style="{ top: 100 + sysHeight + 'px' }" @tap="goRecord">申请记录</view> -->
</view>
<view class="bg-v-gradient pl-20 pr-20 pb-24" :style="{ minHeight: mainHeight + 'px' }">
<view class="bg--w111-fff rd-24rpx content-box">
<view class="fs-30 fw-500 lh-42rpx">请填写以下信息</view>
<view class="cell flex-between-center mt-64">
<view class="fs-28 lh-40rpx">代理商名称</view>
<input type="text" v-model="form.division_name" placeholder="请输入代理商名称" placeholder-class="text--w111-ccc" class="fs-28 text-right" />
</view>
<view class="cell flex-between-center mt-64">
<view class="fs-28 lh-40rpx">用户姓名</view>
<input type="text" v-model="form.name" placeholder="请输入姓名" placeholder-class="text--w111-ccc" class="fs-28 text-right" />
</view>
<view class="cell flex-between-center mt-64">
<view class="fs-28 lh-40rpx">邀请码</view>
<input type="number" v-model="form.division_invite" placeholder="请输入邀请码" placeholder-class="text--w111-ccc" class="fs-28 text-right" />
</view>
<view class="cell flex-between-center mt-64">
<view class="fs-28 lh-40rpx">联系电话</view>
<input type="number" v-model="form.phone" placeholder="请输入手机号" placeholder-class="text--w111-ccc" class="fs-28 text-right" />
</view>
<view v-if="divisionApplyPhoneVerify" class="cell flex-between-center mt-64">
<view class="fs-28 lh-40rpx">验证码</view>
<view class="flex-y-center">
<input type="number" v-model="form.code" placeholder="请输入验证码" placeholder-class="text--w111-ccc" class="fs-28 text-right" />
<button class="code-btn w-168 h-56 flex-center fs-24 ml-20" :disabled="disabled" @tap="code">{{ text }}</button>
</view>
</view>
<view class="fs-28 lh-40rpx mt-64">请上传营业执照及相关资质证明图片</view>
<view class="fs-24 lh-34rpx text--w111-ccc mt-12">(图片最多可上传8张图片格式支持JPGPNGJPEG</view>
<view class="grid-column-4 grid-gap-24rpx mt-24">
<view class="relative h-148" v-for="(item, index) in form.images" :key="index">
<image :src="item" mode="aspectFill" class="w-148 h-148 rd-16rpx"></image>
<view class="abs-rt w-32 h-32 del-pic flex-center fs-24" @click="DelPic(index)">
<text class="iconfont icon-ic_close text--w111-fff"></text>
</view>
</view>
<view class="h-148 flex-col flex-center upload bg--w111-f5f5f5 text--w111-999 rd-16rpx" @click="uploadpic" v-if="form.images.length < 8">
<text class="iconfont icon-ic_camera fs-42"></text>
<text class="fs-24 lh-34rpx pt-8">上传图片</text>
</view>
</view>
<view class="cell mt-64">
<view class="fs-28 lh-40rpx">申请说明</view>
<view class="text--w111-ccc mt-12">
{{ division_apply_explain }}
</view>
</view>
<view class="flex-y-center mt-32">
<text class="iconfont fs-30" :class="isSelect ? 'icon-a-ic_CompleteSelect' : 'icon-ic_unselect'" @tap="proviceSelect"></text>
<text class="fs-24 text--w111-999 pl-12">已阅读并同意</text>
<text class="font-red" @tap="getAgreement">代理商协议</text>
</view>
<view class="w-full h-88 rd-44rpx flex-center text--w111-fff fs-28 mt-48" :class="isSelectStar ? 'bg-red' : 'bg-disabled'" @tap="submitSupply">提交申请</view>
</view>
</view>
<Verify @success="success" :captchaType="captchaType" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
<tui-modal :show="showModal" maskClosable custom @cancel="hideModal">
<view class="tui-modal-custom">
<view class="fs-32 fw-500 lh-44rpx text-center">代理商协议</view>
<view class="fs-28 text--w111-666 lh-44rpx mt-24 desc-box">
<!-- #ifdef MP-WEIXIN -->
<rich-text :nodes="supplierAgreement"></rich-text>
<!-- #endif -->
<!-- #ifdef H5 || APP-PLUS -->
<view v-html="supplierAgreement"></view>
<!-- #endif -->
</view>
<view class="w-full h-72 rd-36rpx flex-center bg-red fs-26 text--w111-fff mt-32" @tap="hideModal">知道了</view>
</view>
</tui-modal>
</view>
</template>
<script>
let sysHeight = uni.getWindowInfo().statusBarHeight;
import { toLogin } from '@/libs/login.js';
import { mapGetters } from 'vuex';
import { agentCreateApi, getCodeApi, registerVerify, userAgentInfo, getUserAgreement } from '@/api/user.js';
import colors from '@/mixins/color';
import sendVerifyCode from '@/mixins/SendVerifyCode';
import { HTTP_REQUEST_URL, CAPTCHA_TYPE } from '@/config/app';
import Verify from '../components/verify/verify.vue';
import tuiModal from '@/components/tui-modal/index.vue';
export default {
data() {
return {
captchaType: CAPTCHA_TYPE,
sysHeight: sysHeight,
form: {
division_name: '',
name: '',
phone: '',
code: '',
division_invite: '',
images: []
},
canvasWidth: '',
canvasHeight: '',
canvasStatus: false,
isSelect: false,
keyCode: '',
id: 0,
showModal: false,
supplierAgreement: '',
tagStyle: {
img: 'width:100%;display:block;'
},
division_apply_explain: ''
};
},
components: {
Verify,
tuiModal
},
mixins: [sendVerifyCode, colors],
watch: {
isLogin: {
handler: function (newV, oldV) {
if (newV) {
// #ifndef MP
this.getOrderProduct();
// #endif
}
},
deep: true
}
},
computed: {
...mapGetters(['isLogin', 'divisionApplyPhoneVerify']),
isSelectStar() {
if (this.form.division_name && this.form.name && this.form.phone && this.form.division_invite && this.form.images.length) {
if (this.divisionApplyPhoneVerify && !this.form.code) {
return false;
}
return true;
}
},
headerBg() {
return {
backgroundImage: 'url(' + HTTP_REQUEST_URL + '/statics/images/agent/apply_header.png' + ')'
};
},
mainHeight() {
let { windowHeight } = uni.getWindowInfo();
return windowHeight - 90 - this.sysHeight;
}
},
onLoad(options) {
this.getInfo();
},
methods: {
/*** 删除图片* */
DelPic: function (index) {
let that = this,
pic = this.form.images[index];
that.form.images.splice(index, 1);
that.$set(that.form, 'images', that.form.images);
},
/*** 上传文件 **/
uploadpic: function () {
let that = this;
this.canvasStatus = true;
that.$util.uploadImageChange(
{ count: 8, url: 'upload/image' },
function (res) {
if (that.form.images.length < 8) that.form.images.push(res.data.url);
},
(res) => {
this.canvasStatus = false;
},
(res) => {
this.canvasWidth = res.w;
this.canvasHeight = res.h;
}
);
},
code() {
if (!this.form.phone)
return this.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.form.phone))
return this.$util.Tips({
title: '请输入正确的手机号码'
});
this.$refs.verify.show();
},
success(data) {
this.$refs.verify.hide();
if (this.divisionApplyPhoneVerify) {
getCodeApi()
.then((res) => {
this.keyCode = res.data.key;
this.getCode(data);
})
.catch((res) => {
this.$util.Tips({
title: res
});
});
} else {
this.agentRequest();
}
},
async getCode(data) {
let that = this;
if (!this.form.phone)
return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.form.phone))
return this.$util.Tips({
title: '请输入正确的手机号码'
});
await registerVerify({
phone: that.form.phone,
type: 'agent',
key: that.keyCode,
captchaType: CAPTCHA_TYPE,
captchaVerification: data.captchaVerification
})
.then((res) => {
that.$util.Tips({
title: res.msg
});
that.sendCode();
})
.catch((res) => {
this.$refs.verify.refresh();
that.$util.Tips({
title: res
});
});
},
proviceSelect() {
this.isSelect = !this.isSelect;
},
getInfo() {
userAgentInfo()
.then((res) => {
// if (res.status !== -1) {
// uni.navigateTo({
// url: '/pages/users/agent/state'
// });
// }
let data = res.data;
this.id = data.id || 0;
this.form.division_name = data.division_name || '';
this.form.name = data.name || '';
this.form.phone = data.phone || '';
this.form.division_invite = data.division_invite || '';
this.form.images = data.images || [];
this.division_apply_explain = this.$store.state.app.division_apply_explain;
})
.catch((err) => {
return this.$util.Tips({
title: err
});
});
},
submitSupply() {
if (!this.isSelectStar)
return this.$util.Tips({
title: '请完整填写表单信息'
});
if (!this.isSelect)
return this.$util.Tips({
title: '请阅读并同意协议'
});
if (this.divisionApplyPhoneVerify) {
this.agentRequest();
} else {
this.code();
}
},
agentRequest() {
agentCreateApi(this.id, this.form)
.then((res) => {
uni.navigateTo({
url: '/pages/users/agent/state'
});
})
.catch((err) => {
return this.$util.Tips({
title: err
});
});
},
pageBack() {
uni.reLaunch({
url: '/pages/user/index'
});
},
goRecord() {
uni.navigateTo({
url: '/pages/users/agent/record'
});
},
getAgreement() {
getUserAgreement('agent')
.then((res) => {
this.supplierAgreement = res.data.content;
this.showModal = true;
})
.catch((err) => {
that.$util.Tips({
title: err.msg
});
});
},
hideModal() {
this.showModal = false;
}
}
};
</script>
<style>
.header-top {
width: 100%;
height: 358rpx;
background-size: cover;
}
.rule-btn {
height: 48rpx;
background: rgba(0, 0, 0, 0.15);
border-radius: 24rpx 0 0 24rpx;
position: absolute;
right: 0;
}
.bg-v-gradient {
background: linear-gradient(180deg, #fe7015 0%, #eb3b26 100%);
}
.content-box {
padding: 48rpx 32rpx 40rpx;
}
.code-btn {
border: 1px solid #e93323;
color: #e93323;
border-radius: 28rpx;
}
.upload {
border: 1rpx dashed #ccc;
}
.del-pic {
background-color: #999;
border-radius: 0 16rpx 0 16rpx;
}
.icon-a-ic_CompleteSelect,
.font-red {
color: #e93323;
}
.icon-ic_unselect {
color: #ccc;
}
.bg-red {
background-color: #e93323;
}
.bg-disabled {
background-color: rgba(233, 51, 35, 0.5);
}
.desc-box {
max-height: 700rpx;
overflow-y: auto;
}
.modal-bottom {
height: 136rpx;
border-radius: 0 0 32rpx 32rpx;
background-color: #fff;
}
</style>

View File

@@ -0,0 +1,121 @@
<template>
<view>
<view class="px-20">
<view class="w-full bg--w111-fff rd-24rpx flex-between-center mt-24 p-32"
v-for="(item,index) in list" :key="index">
<view>
<view class="flex-y-center">
<text class="fs-30 lh-42rpx max-300 line1">{{item.system_name}}</text>
<text class="tag tag0 fs-22 ml-16" :class="'tag' + item.status">{{item.status | typeFilter}}</text>
</view>
<view class="fs-24 text--w111-999 mt-20">提交时间{{item.add_time}}</view>
<view class="fs-24 text--w111-999 mt-20" v-if="item.status==2">原因{{item.fail_msg}}</view>
</view>
<text class="btn info-btn fs-24" @tap="lookUp(item)" v-if="item.status==1">查看</text>
<text class="btn danger-btn fs-24" @tap="resubmit(item)" v-else-if="item.status==2">重新提交</text>
<text class="btn info-btn fs-24" @tap="edit(item)" v-else>编辑</text>
</view>
<view class="mt-20" v-if="list.length == 0">
<emptyPage title="暂无申请记录~" src="/statics/images/noOrder.gif"></emptyPage>
</view>
</view>
</view>
</template>
<script>
import { recordList } from '@/api/user.js';
import colors from '@/mixins/color.js';
import emptyPage from '@/components/emptyPage.vue';
export default{
mixins: [colors],
components: {
emptyPage,
},
data(){
return{
list:[]
}
},
filters:{
typeFilter(val){
let obj = {
0: '待审核',
1: '审核通过',
2: '审核未通过'
};
return obj[val]
},
},
onLoad(){
this.getList();
},
methods:{
getList(){
recordList().then(res=>{
this.list = res.data;
}).catch(err=>{
return this.$util.Tips({
title: err
});
})
},
edit(item){
uni.navigateTo({
url: '/pages/users/supplier/index?id='+ item.id
})
},
resubmit(item){
uni.navigateTo({
url: '/pages/users/supplier/state?id='+ item.id+'&type=2'
})
},
lookUp(item){
uni.navigateTo({
url: '/pages/users/supplier/state?id='+ item.id+'&type=1'
})
}
}
}
</script>
<style>
.max-300{
max-width: 300rpx;
}
.tag{
height: 38rpx;
padding: 0 8rpx;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 8rpx;
}
.tag0{
color: rgba(0, 122, 255, 1);
background-color: rgba(0, 122, 255, 0.1);
}
.tag1{
color: rgba(0, 180, 42, 1);
background-color: rgba(0, 180, 42, 0.1);
}
.tag2{
color: rgba(245, 63, 63, 1);
background-color: rgba(245, 63, 63, 0.1);
}
.btn{
height: 56rpx;
padding: 0 24rpx;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 30rpx;
}
.info-btn{
border: 1px solid #ccc;
color: #333;
}
.danger-btn{
border: 1px solid #e93323;
color: #e93323;
}
</style>

View File

@@ -0,0 +1,564 @@
<template>
<view :style="colorStyle">
<view class="promoter-list">
<view class="header">
<view class='search acea-row row-middle'>
<text class="iconfont icon-ic_search"></text>
<input placeholder='搜索用户名称' placeholder-class='placeholder' v-model="keyword" @confirm="submitForm" confirm-type='search' name="search"></input>
</view>
<!-- <view class='nav acea-row row-around' v-if="brokerageLevel == 2">
<view :class="grade == 0 ? 'item on' : 'item'" @click='setType(0)'>一级({{total}})</view>
<view :class="grade == 1 ? 'item on' : 'item'" @click='setType(1)'>二级({{totalLevel}})</view>
</view> -->
<timeSlot @changeTime="changeTime"></timeSlot>
</view>
<view class='list' v-if="recordList.length">
<view class="top_num">
<text class="main_color">{{count}}</text> 位员工获得佣金<text class="main_color">¥{{price}}</text>
</view>
<view class="itemCon">
<view class='item acea-row row-between-wrapper' v-for="(item,index) in recordList" :key="index">
<view class="picTxt acea-row row-between-wrapper">
<view class='pictrue'>
<image :src='item.avatar'></image>
</view>
<view class='text'>
<view class='name line1'>{{item.nickname}}</view>
<view>加入时间{{item.spread_time}}</view>
</view>
</view>
<view class="right">
<view><text class='num font-nums'>{{item.childCount ? item.childCount : 0}}</text></view>
<view><text class="num">{{item.orderCount ? item.orderCount : 0}}</text></view>
<view><text class="num">{{item.numberCount ? item.numberCount : 0}}</text></view>
</view>
<view class="item-btn">
<view class="division-percent">
分佣比例{{ item.division_percent }}%
</view>
<view class="action">
<view class="clear" @click="del(item, index)">删除</view>
<view class="change" @click="changeData(item)">修改分佣比例</view>
</view>
</view>
</view>
</view>
</view>
<view class="empty" v-if="recordList.length == 0">
<emptyPage title="暂无数据~"></emptyPage>
</view>
</view>
<view class="refund-input" :class="refund_close ? 'on' : ''">
<view class="input-msg">
<view class="close">
<text class="iconfont icon-ic_close" @tap="refund_close = false"></text>
</view>
<view class="refund-input-title">修改分佣比例(%)</view>
<view class="refund-input-sty">
<input type="number" v-model="agent_percent" placeholder="请输入百分比" />
</view>
<view class="refund-bth">
<!-- <view class="close-refund" @click="refund_close = false">取消</view> -->
<view class="submit-refund" @click="refundSubmit()">提交</view>
</view>
</view>
</view>
<view class="mask invoice-mask" v-if="refund_close" @click="refund_close = false"></view>
<view class="mark" v-show="isCancellation"></view>
<tui-modal :show="isCancellation" maskClosable custom @cancel="isCancellation = false">
<view class="tui-modal-custom">
<view class="fs-32 fw-500 lh-44rpx text-center">删除员工</view>
<view class="fs-30 text--w111-666 lh-42rpx text-center mt-22">确定删除该员工</view>
<view class="flex-y-center">
<view class="w-full h-72 rd-36rpx flex-center border b-solid b--w111-ccc text-primary-con fs-26 mt-32 mr-16 clear-btn" @tap="isCancellation = false">取消</view>
<view class="w-full h-72 rd-36rpx flex-center bg-red fs-26 text--w111-fff mt-32 ml-16" @tap="clear">确定</view>
</view>
</view>
</tui-modal>
</view>
</template>
<script>
import {
agentStaffList,
agentDelStaff,
agentStaffPercent
} from '@/api/user.js';
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from "vuex";
import emptyPage from '@/components/emptyPage.vue'
import timeSlot from '../components/timeSlot/index.vue'
import colors from '@/mixins/color.js';
import tuiModal from '@/components/tui-modal/index.vue';
export default {
components: {
timeSlot,
emptyPage,
tuiModal
},
mixins: [colors],
data() {
return {
total: 0,
totalLevel: 0,
teamCount: 0,
page: 1,
limit: 20,
keyword: '',
sort: '',
grade: 0,
status: false,
recordList: [],
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
start: 0,
stop: 0,
count: 0,
price: 0,
brokerageLevel: 0,
refund_close:false,
isCancellation:false,
agent_percent: null,
delIndex: 0,
uid: null
};
},
computed: mapGetters(['isLogin']),
onLoad() {
if (this.isLogin) {
this.userSpreadNewList();
} else {
toLogin()
}
},
onShow: function() {
uni.removeStorageSync('form_type_cart');
if (this.is_show) this.userSpreadNewList();
},
onHide: function() {
this.is_show = true;
},
methods: {
changeData(data) {
this.refund_close = true;
this.uid = data.uid;
},
del(data,index){
this.uid = data.uid
this.delIndex = index
this.isCancellation = true
},
clear() {
let that = this;
agentDelStaff(this.uid)
.then((res) => {
that.recordList.splice(this.delIndex, 1);
that.$set(that, 'recordList', that.recordList);
// that.userSpreadNewList();
that.isCancellation = false;
that.teamCount -= 1;
return that.$util.Tips({
title: '删除成功',
icon: 'success'
});
})
.catch((err) => {
return that.$util.Tips({
title: err
});
});
},
refundSubmit() {
if (this.agent_percent < 0) {
return this.$util.Tips({
title: '请输入比例'
});
}
agentStaffPercent({
division_percent: this.agent_percent,
uid: this.uid
})
.then((res) => {
this.$util.Tips(
{
title: res.msg,
icon: 'success'
},
() => {
this.refund_close = false;
this.page = 1;
this.limit = 20;
this.keyword = '';
// this.sort = '';
this.status = false;
this.agent_percent = null;
this.$set(this, 'recordList', []);
this.userSpreadNewList();
}
);
})
.catch((err) => {
this.$util.Tips({
title: err
});
});
},
changeTime(time) {
console.log(time)
this.start = time.start
this.stop = time.stop
this.submitForm()
},
onLoadFun(e) {
this.userSpreadNewList();
this.isShowAuth = false;
},
// 授权关闭
authColse: function(e) {
this.isShowAuth = e
},
setSort(sort) {
let that = this;
that.sort = sort;
that.page = 1;
that.limit = 20;
that.status = false;
that.$set(that, 'recordList', []);
that.userSpreadNewList();
},
// setKeyword: function(e) {
// this.keyword = e.detail.value;
// },
submitForm: function() {
this.page = 1;
this.limit = 20;
this.status = false;
this.$set(this, 'recordList', []);
this.userSpreadNewList();
},
setType: function(grade) {
if (this.grade != grade) {
this.grade = grade;
this.page = 1;
this.limit = 20;
this.keyword = '';
this.sort = '';
this.status = false;
this.$set(this, 'recordList', []);
this.userSpreadNewList();
}
},
userSpreadNewList: function() {
let that = this;
let page = that.page;
let limit = that.limit;
let status = that.status;
let keyword = that.keyword;
let sort = that.sort;
let grade = that.grade;
let recordList = that.recordList;
let recordListNew = [];
if (status == true) return;
agentStaffList({
start: this.start,
stop: this.stop,
page: page,
limit: limit,
keyword: keyword,
}).then(res => {
let len = res.data.list.length;
let recordListData = res.data.list;
recordListNew = recordList.concat(recordListData);
that.total = res.data.count;
that.teamCount = res.data.count;
that.status = limit > len;
that.page = page + 1;
that.$set(that, 'recordList', recordListNew);
that.count = res.data.count;
that.price = res.data.brokerage;
});
}
},
onReachBottom: function() {
this.userSpreadNewList();
}
}
</script>
<style scoped lang="scss">
.empty{
margin: 20rpx;
}
.font-nums{
color: #E93323;
}
.promoter-list .nav {
background-color: #fff;
height: 92rpx;
line-height: 86rpx;
font-size: 28rpx;
color: #666;
font-family: PingFang SC;
}
.promoter-list .nav .item.on {
color: #E93323;
position: relative;
font-size: 32rpx;
&::after {
position: absolute;
content: '';
width: 38rpx;
height: 30rpx;
border: 2px solid #E93323;
border-left: 2px solid transparent !important;
border-top: 2px solid transparent !important;
border-right: 2px solid transparent !important;
border-radius: 50%;
left: 50%;
margin-left: -24rpx;
bottom: 16rpx;
}
}
.promoter-list .header {
background-color: #fff;
padding-top: 24rpx;
}
.promoter-list .search {
width: 710rpx;
height: 72rpx;
padding: 0 32rpx;
box-sizing: border-box;
background-color: #F5F5F5;
border-radius: 50rpx;
margin: 0 auto 10rpx auto;
.placeholder {
color: #ccc;
font-size: 28rpx;
}
}
.promoter-list .search .iconfont {
font-size: 32rpx;
color: #999;
margin-right: 18rpx;
}
.promoter-list .list {
margin-top: 12rpx;
}
.promoter-list .list .sortNav {
background-color: #fff;
height: 76rpx;
border-bottom: 1rpx solid #eee;
color: #333;
font-size: 28rpx;
}
.promoter-list .list .sortNav .sortItem {
text-align: center;
flex: 1;
}
.promoter-list .list .sortNav .sortItem image {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
vertical-align: -3rpx;
}
.promoter-list .list .itemCon {
background-color: #fff;
margin: 0 20rpx;
border-radius: 24rpx;
padding-top: 10rpx;
}
.promoter-list .list .item {
height: 290rpx;
font-size: 24rpx;
color: #666;
margin: 0 24rpx;
}
.promoter-list .list .item .picTxt {
width: 440rpx;
}
.promoter-list .list .item .picTxt .pictrue {
width: 112rpx;
height: 112rpx;
border-radius: 50%;
}
.promoter-list .list .item .picTxt .pictrue image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.promoter-list .list .item .picTxt .text {
width: 304rpx;
font-size: 24rpx;
color: #999;
}
.promoter-list .list .item .picTxt .text .name {
font-size: 28rpx;
color: #333;
margin-bottom: 13rpx;
}
.promoter-list .list .item .right {
width: 190rpx;
text-align: right;
font-size: 24rpx;
color: #333;
}
.promoter-list .list .item .right .num {
margin-right: 7rpx;
}
.top_num {
padding: 14rpx 20rpx 28rpx 20rpx;
font-size: 24rpx;
color: #666;
}
.main_color {
color: #E93323;
margin: 0 6rpx;
}
.item-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
border-top: 1rpx solid #EEEEEE;
padding: 26rpx 0 16rpx 0;
font-size: 24rpx;
.division-percent{
color: #999999;
}
.action{
display: flex;
align-items: center;
}
.clear,
.change {
padding: 10rpx 24rpx;
border-radius: 30rpx;
}
.clear {
border: 1rpx solid #CCCCCC;
color: #333333;
}
.change {
background-color: #E93323;
color: #fff;
margin-left: 16rpx;
}
}
.refund-input {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
border-radius: 40rpx 40rpx 0 0;
background-color: #fff;
z-index: 99;
padding: 40rpx 0 70rpx 0;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0);
.refund-input-title {
font-weight: 500;
font-size: 16px;
color: #333333;
font-size: 32rpx;
margin-bottom: 60rpx;
}
.refund-input-sty {
background-color: #F5F5F5;
padding: 20rpx 20rpx;
border-radius: 50rpx;
color: #BBBBBB;
width: 100%;
margin: 0rpx 20rpx 0rpx 20rpx;
text-align: center;
}
/deep/ .uni-input-placeholder,
/deep/ .uni-input-input{
color: #bbb;
text-align: center;
}
.input-msg {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
margin: 0 65rpx;
.close{
position: absolute;
top: 8rpx;
color: #aaa;
font-size: 32rpx;
right: -30rpx;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
margin-top: -18rpx;
background: #EEEEEE;
text-align: center;
line-height: 36rpx;
}
}
.refund-bth {
display: flex;
margin: 0 65rpx;
margin-top: 20rpx;
justify-content: space-around;
width: 100%;
.close-refund {
padding: 24rpx 80rpx;
border-radius: 80rpx;
color: #fff;
background-color: #ccc;
}
.submit-refund {
width: 100%;
padding: 24rpx 0rpx;
text-align: center;
border-radius: 80rpx;
color: #fff;
background-color: #E93323;
}
}
}
.refund-input.on {
transform: translate3d(0, 0, 0);
}
</style>

View File

@@ -0,0 +1,198 @@
<template>
<view>
<view class="px-20 mt-40">
<view class="bg--w111-fff rd-24rpx card-bg">
<view class="h-244 pt-72">
<view class="px-122 flex-between-center">
<text class="iconfont icon-a-ic_CompleteSelect font-red fs-28"></text>
<view class="line bg-red mx-8"></view>
<text class="iconfont icon-a-ic_CompleteSelect font-red fs-28"></text>
<view class="line mx-8" :class="type > 0 ? 'bg-red' : 'bg-gray'"></view>
<text class="iconfont fs-28" :class="type > 0 ? 'icon-a-ic_CompleteSelect font-red' : 'icon-ic_unselect text--w111-ccc'"></text>
</view>
<view class="flex-between-center px-74 fs-28 lh-40rpx mt-24">
<text>提交成功</text>
<text>正在审核</text>
<text>审核结果</text>
</view>
<view class="flex-between-center px-40 mt-8 fs-22 text--w111-999">
<text>{{ add_time }}</text>
<text>{{ add_time }}</text>
<text v-if="status_time">{{ status_time }}</text>
<text v-else class="w-180"></text>
</view>
</view>
<view class="flex-col flex-center content-box" v-if="!loading">
<image :src="imgHost + '/statics/images/supplier/verify_fail_icon.png'" class="status-pic" v-if="type == 2"></image>
<image :src="imgHost + '/statics/images/supplier/verify_ing_icon.png'" class="status-pic" v-else-if="type == 0"></image>
<image :src="imgHost + '/statics/images/supplier/verify_ok_icon.png'" class="status-pic" v-else-if="type == 1"></image>
<text class="fs-36 lh-50rpx pt-32">{{ type | typeFilter }}</text>
<text class="fs-26 lh-36rpx text--w111-999 pt-12">{{ type | descFilter }}</text>
<text class="fs-26 lh-36rpx text--w111-999 pt-12 pl-24 pr-24" v-if="refusal_reason">{{ refusal_reason }}</text>
<view class="primary-btn flex-center fs-28 mt-40" @tap="edit">{{ type == 2 ? '重新填写' : '返回上一页' }}</view>
<view class="border-btn flex-center fs-28 mt-24" v-if="type == 2" @tap="pageBack">返回上一页</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { HTTP_REQUEST_URL } from '@/config/app';
import colors from '@/mixins/color.js';
import { userAgentInfo, userPromoterInfo } from '@/api/user.js';
export default {
mixins: [colors],
data() {
return {
imgHost: HTTP_REQUEST_URL,
id: 0,
type: 2,
url: '',
account: '',
pwd: '',
status_time: '',
add_time: '',
refusal_reason: '',
ftype: '',
loading: true
};
},
filters: {
typeFilter(val) {
let obj = {
0: '正在审核',
1: '审核通过',
2: '审核失败'
};
return obj[val];
},
descFilter(val) {
let obj = {
0: '正在审核当中,请耐心等待',
1: '恭喜您,审核通过',
2: '请按提示修改您所填写的信息'
};
return obj[val];
}
},
onLoad(options) {
this.id = options.id;
this.ftype = options.type || 0;
this.supplierApply();
},
methods: {
copyWb: function () {
let that = this;
uni.setClipboardData({
data: '网址:' + this.url + '\n账号:' + this.account + '\n密码:' + this.pwd
});
},
supplierApply() {
let api;
this.loading = true;
if (this.ftype === 'promoter') {
// 分销员
api = userPromoterInfo();
} else {
// 代理商
api = userAgentInfo();
}
api
.then((res) => {
let data = this.ftype === 'promoter' ? res.data.user : res.data;
this.type = data.status;
this.add_time = data.add_time;
this.status_time = data.status_time;
this.refusal_reason = data.refusal_reason;
this.loading = false;
})
.catch((err) => {
return this.$util.Tips({
title: err
});
});
},
pageBack() {
uni.switchTab({
url: '/pages/user/index'
})
},
edit() {
if (this.type == 0 || this.type == 1) {
uni.switchTab({
url: '/pages/user/index'
})
} else {
if (this.ftype === 'promoter') {
uni.reLaunch({
url: '/pages/users/distributor/apply?id=' + this.id
});
} else {
uni.reLaunch({
url: '/pages/users/agent/apply?id=' + this.id
});
}
}
}
}
};
</script>
<style scoped>
.card-bg {
-webkit-mask: radial-gradient(circle at 16rpx 240rpx, transparent 16rpx, red 0) -16rpx;
}
.font-red {
color: #e93323;
}
.h-244 {
height: 244rpx;
border-bottom: 1px dashed #ccc;
}
.px-74 {
padding: 0 74rpx;
}
.px-122 {
padding: 0 122rpx;
}
.pt-72 {
padding-top: 72rpx;
}
.line {
width: 186rpx;
height: 1rpx;
}
.bg-red {
background-color: #e93323;
}
.bg-gray {
background-color: #dddddd;
}
.status-pic {
width: 172rpx;
height: 154rpx;
}
.content-box {
padding: 48rpx 0 72rpx;
}
.primary-btn {
width: 502rpx;
height: 88rpx;
background: linear-gradient(90deg, #ff7931 0%, #e93323 100%);
color: #fff;
border-radius: 50rpx;
}
.border-btn {
width: 502rpx;
height: 88rpx;
background: #fff;
border: 1px solid #e93323;
color: #e93323;
border-radius: 50rpx;
}
.copy-btn {
width: 64rpx;
height: 32rpx;
background: #f5f5f5;
border-radius: 20rpx;
}
</style>