Compare commits
19 Commits
b6a59ce3d8
...
dev
Author | SHA1 | Date | |
---|---|---|---|
2b48faf50d | |||
fab8d88faf | |||
5fc1378051 | |||
12480f3706 | |||
05af3d221c | |||
f17226cc97 | |||
d5e4f0d7eb | |||
d17f6f09c5 | |||
8a085da7dc | |||
f871831cbc | |||
c1817b6255 | |||
85df7bfc4e | |||
990f1850b1 | |||
c7dd90f669 | |||
d1b4fa8ca3 | |||
3996895c0d | |||
c5f3287e80 | |||
2a1082fc9f | |||
90162ad74f |
@ -90,7 +90,8 @@
|
||||
font-size: 28.13rpx;
|
||||
}
|
||||
.section_3 {
|
||||
height: 791.25rpx;
|
||||
height: auto;
|
||||
padding-bottom: 40rpx;
|
||||
/* 以下是新增 */
|
||||
white-space: normal; /* 允许换行 */
|
||||
word-break: break-all; /* 在任意字符处断行,数字也会换行 */
|
||||
|
@ -5,6 +5,7 @@ Page({
|
||||
data: {
|
||||
orderList: [], // 后端返回的订单列表
|
||||
hasModalShown: false, // 弹框只显示一次
|
||||
isMaskVisible: false
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@ -35,7 +36,7 @@ Page({
|
||||
let list = res.data.data.map(item => {
|
||||
// 计算从 createTime 到 now 剩余秒数
|
||||
const createMs = new Date(item.createTime.replace(/-/g,'/')).getTime();
|
||||
let diff = Math.floor((createMs + 30*60*1000 - now) / 1000);
|
||||
let diff = Math.floor((createMs + 15*60*1000 - now) / 1000);
|
||||
|
||||
// 只有“待支付”才需要倒计时、过期置“交易取消”
|
||||
if (item.orderStatus === '待支付') {
|
||||
@ -80,6 +81,10 @@ Page({
|
||||
|
||||
// 每秒更新所有待支付订单的倒计时
|
||||
startTimer() {
|
||||
// ← 新增:如果已有定时器,先清掉它
|
||||
if (this._timer) {
|
||||
clearInterval(this._timer);
|
||||
}
|
||||
this._timer = setInterval(() => {
|
||||
const updated = this.data.orderList.map(item => {
|
||||
if (item.orderStatus === '待支付' && item.countDown > 0) {
|
||||
@ -108,6 +113,62 @@ Page({
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
showIsPayModal(e) {
|
||||
const orderId = e.currentTarget.dataset.orderId;
|
||||
wx.showModal({
|
||||
title: '下单成功',
|
||||
content: '您确定要支付吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.payOrder(orderId);
|
||||
} else if (res.cancel) {
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '网络错误,下单失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
payOrder(orderId) {
|
||||
// 同样先显示遮罩
|
||||
this.setData({ isMaskVisible: true });
|
||||
wx.showLoading({ title: '支付中...'});
|
||||
wx.request({
|
||||
url: baseUrl + '/courseOrder/payment',
|
||||
method: 'POST',
|
||||
header: { Authorization: wx.getStorageSync('token') },
|
||||
data: { id: orderId},
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code === 1) {
|
||||
// 支付成功,跳转详情页
|
||||
wx.redirectTo({
|
||||
url: `/pages/course/orderDetail/orderDetail?id=${orderId}`,
|
||||
success: res => {
|
||||
// 先把遮罩关掉
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: res.data.message || '支付失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: '网络错误,支付失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转订单详情
|
||||
gotoOrderDetail(e) {
|
||||
const orderId = e.currentTarget.dataset.id;
|
||||
@ -135,11 +196,6 @@ Page({
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
// 支付订单
|
||||
payOrder() {
|
||||
// wx.navigateTo({ url: `/pages/pay/pay?orderId=${this.data.orderId}` });
|
||||
wx.showToast({ title: '支付功能稍后开放', icon: 'none' });
|
||||
},
|
||||
});
|
||||
|
@ -12,7 +12,7 @@
|
||||
>
|
||||
<view class="flex-row self-stretch group">
|
||||
<text class="font text">订单号:{{item.orderNumber}}</text>
|
||||
<text class="font_2 ml-37">{{ item.orderStatus }}</text>
|
||||
<text class="font_2">{{ item.orderStatus }}</text>
|
||||
</view>
|
||||
|
||||
<text class="self-stretch font_3 text_2">{{ item.name }}</text>
|
||||
@ -30,11 +30,13 @@
|
||||
<view wx:if="{{ item.orderStatus === '待支付' }}" class="flex-col justify-start items-center text-wrapper" catch:tap="cancelOrder" data-id="{{ item.id }}">
|
||||
<text class="font_7">取消订单</text>
|
||||
</view>
|
||||
<view wx:if="{{ item.orderStatus === '待支付' }}" class="flex-col justify-start items-center text-wrapper_2 ml-11" catch:tap="payOrder">
|
||||
<view wx:if="{{ item.orderStatus === '待支付' }}" class="flex-col justify-start items-center text-wrapper_2 ml-11" catch:tap="showIsPayModal"
|
||||
data-order-id="{{ item.id }}">
|
||||
<text class="font_8">支付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{isMaskVisible}}" class="page-mask"></view>
|
||||
</view>
|
@ -9,6 +9,13 @@
|
||||
.ml-11 {
|
||||
margin-left: 20.63rpx;
|
||||
}
|
||||
.page-mask {
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
z-index: 9999;
|
||||
}
|
||||
.page {
|
||||
padding: 26.25rpx 0 50.63rpx;
|
||||
background-color: #f8f8f8;
|
||||
@ -32,8 +39,10 @@
|
||||
margin-top: 0;
|
||||
}
|
||||
.group {
|
||||
padding: 32.51rpx 0 25.82rpx;
|
||||
padding: 32.51rpx 15rpx 25.82rpx 0;
|
||||
border-bottom: solid 1.88rpx #e3e3e3;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.font {
|
||||
font-size: 26.25rpx;
|
||||
|
@ -9,11 +9,15 @@ Page({
|
||||
courseId: 0, // 课程id
|
||||
courseObj: '', // 课程对象
|
||||
globalImgUrl, // 全局图片
|
||||
isMaskVisible: false
|
||||
},
|
||||
|
||||
// 创建订单方法
|
||||
createOrder() {
|
||||
const { courseId } = this.data;
|
||||
// 1. 显示遮罩,阻止二次点击
|
||||
this.setData({ isMaskVisible: true });
|
||||
wx.showLoading({ title: '正在创建订单...' });
|
||||
let orderId ;
|
||||
wx.request({
|
||||
url: baseUrl + '/courseOrder/add',
|
||||
@ -25,16 +29,88 @@ Page({
|
||||
Authorization :wx.getStorageSync('token'),
|
||||
},
|
||||
success : res => {
|
||||
console.log(res);
|
||||
this.setData({
|
||||
orderId: res.data.data
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: `/pages/course/orderDetail/orderDetail?id=${this.data.orderId}`,
|
||||
})
|
||||
orderId = res.data.data
|
||||
this.setData({ orderId })
|
||||
wx.hideLoading();
|
||||
if (res.data.code === 1) {
|
||||
this.showIsPayModal(orderId)
|
||||
} else {
|
||||
// 下单失败,关闭遮罩
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showModal({
|
||||
title: '下单失败',
|
||||
content: res.data.message || '下单失败',
|
||||
showCancel: false,
|
||||
confirmText: '知道了'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: '网络错误,下单失败', icon: 'none' });
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
showIsPayModal(orderId) {
|
||||
wx.showModal({
|
||||
title: '下单成功',
|
||||
content: '您确定要支付吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.payOrder(orderId);
|
||||
} else if (res.cancel) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/course/orderDetail/orderDetail?id=${orderId}`,
|
||||
success: res => {
|
||||
// 先把遮罩关掉
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '网络错误,下单失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
payOrder(orderId) {
|
||||
// 同样先显示遮罩
|
||||
this.setData({ isMaskVisible: true });
|
||||
wx.showLoading({ title: '支付中...'});
|
||||
wx.request({
|
||||
url: baseUrl + '/courseOrder/payment',
|
||||
method: 'POST',
|
||||
header: { Authorization: wx.getStorageSync('token') },
|
||||
data: { id: orderId },
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code === 1) {
|
||||
// 支付成功,跳转详情页
|
||||
wx.navigateTo({
|
||||
url: `/pages/course/orderDetail/orderDetail?id=${orderId}`,
|
||||
success: res => {
|
||||
// 先把遮罩关掉
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: res.data.message || '支付失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: '网络错误,支付失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 获取课程详情
|
||||
|
@ -38,9 +38,11 @@
|
||||
<view class="footer">
|
||||
<view class="flex-row justify-between items-center section_4">
|
||||
<text class="font text_5">应付¥{{ courseObj.discountPrice }}</text>
|
||||
<view class="flex-col justify-center items-center text-wrapper" bind:tap="createOrder">
|
||||
<view class="flex-col justify-center items-center text-wrapper" bindtap="createOrder">
|
||||
<text class="font text_6">立即支付</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{isMaskVisible}}" class="page-mask"></view>
|
||||
</view>
|
||||
|
@ -7,6 +7,14 @@
|
||||
.ml-1 {
|
||||
margin-left: 1.88rpx;
|
||||
}
|
||||
/* app.wxss 或 当前页面 .wxss */
|
||||
.page-mask {
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
z-index: 9999;
|
||||
}
|
||||
.page {
|
||||
background-color: #f7f7f7;
|
||||
width: 100%;
|
||||
|
@ -13,9 +13,9 @@
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="flex-row equal-division">
|
||||
<view class="flex-col items-center group_2 group_1" bind:tap="gotoCourseList" data-type="{{ '考研' }}">
|
||||
<view class="flex-col items-center group_2 group_1" bind:tap="gotoCourseList" data-type="{{ '考编' }}">
|
||||
<image class="image_3" src="./image/kgky.png" />
|
||||
<text class="font text_1 mt-12">考研</text>
|
||||
<text class="font text_1 mt-12">考编</text>
|
||||
</view>
|
||||
<view class="flex-col items-center group_2 group_3" bind:tap="gotoCourseList" data-type="{{ '考公' }}">
|
||||
<image class="image_3" src="./image/zmt.png" />
|
||||
|
@ -17,7 +17,7 @@
|
||||
padding-right: 28.13rpx;
|
||||
}
|
||||
.section {
|
||||
padding: 11.25rpx 0;
|
||||
padding: 15.25rpx 0;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 93.75rpx;
|
||||
}
|
||||
@ -27,7 +27,7 @@
|
||||
}
|
||||
.text {
|
||||
color: #a8a8a8;
|
||||
font-size: 22.5rpx;
|
||||
font-size: 26.5rpx;
|
||||
font-family: SourceHanSerifCN;
|
||||
line-height: 20.83rpx;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ Page({
|
||||
_secondsRemaining: 0, // 内部倒计时秒数
|
||||
_hasShownTimeout: false, // 是否已弹过“超时未支付”弹窗
|
||||
globalImgUrl,
|
||||
isMaskVisible: false
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@ -15,7 +16,61 @@ Page({
|
||||
this.setData({ orderId: options.id });
|
||||
this.getOrderDetail();
|
||||
},
|
||||
|
||||
showIsPayModal() {
|
||||
const {orderId} = this.data
|
||||
wx.showModal({
|
||||
title: '下单成功',
|
||||
content: '您确定要支付吗?',
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.payOrder(orderId);
|
||||
} else if (res.cancel) {
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '网络错误,下单失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
payOrder(orderId) {
|
||||
// 同样先显示遮罩
|
||||
this.setData({ isMaskVisible: true });
|
||||
wx.showLoading({ title: '支付中...'});
|
||||
wx.request({
|
||||
url: baseUrl + '/courseOrder/payment',
|
||||
method: 'POST',
|
||||
header: { Authorization: wx.getStorageSync('token') },
|
||||
data: { id: orderId},
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
if (res.data.code === 1) {
|
||||
// 支付成功,跳转详情页
|
||||
wx.redirectTo({
|
||||
url: `/pages/course/orderDetail/orderDetail?id=${orderId}`,
|
||||
success: res => {
|
||||
// 先把遮罩关掉
|
||||
this.setData({ isMaskVisible: false });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: res.data.message || '支付失败', icon: 'none' });
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.hideLoading();
|
||||
this.setData({ isMaskVisible: false });
|
||||
wx.showToast({ title: '网络错误,支付失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
onUnload() {
|
||||
clearInterval(this._timer);
|
||||
},
|
||||
@ -48,7 +103,7 @@ Page({
|
||||
// 将 "2025-07-13 12:38:17" → 时间戳
|
||||
const createMs = new Date(createTime.replace(/-/g, '/')).getTime();
|
||||
const now = Date.now();
|
||||
let diff = Math.floor((createMs + 30 * 60 * 1000 - now) / 1000);
|
||||
let diff = Math.floor((createMs + 15 * 60 * 1000 - now) / 1000);
|
||||
|
||||
if (diff <= 0) {
|
||||
// 已超时
|
||||
|
@ -73,7 +73,7 @@
|
||||
<view class="flex-col justify-start items-center text-wrapper" bindtap="cancelOrder">
|
||||
<text class="font_3 text_17">取消</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_2" bindtap="goPay">
|
||||
<view class="flex-col justify-start items-center text-wrapper_2" bindtap="showIsPayModal">
|
||||
<text class="font_3 text_18">立即支付</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -84,4 +84,5 @@
|
||||
<text class="font_3 text_18">退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{isMaskVisible}}" class="page-mask"></view>
|
||||
</view>
|
||||
|
@ -22,7 +22,14 @@
|
||||
.mt-389 {
|
||||
margin-top: 729.38rpx;
|
||||
}
|
||||
|
||||
/* app.wxss 或 当前页面 .wxss */
|
||||
.page-mask {
|
||||
position: fixed;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
z-index: 9999;
|
||||
}
|
||||
/* 整体布局 */
|
||||
.page {
|
||||
padding-top: 26.25rpx;
|
||||
|
@ -1,13 +1,45 @@
|
||||
// pages/course/searchCourses/searchCourses.js
|
||||
import { baseUrl, globalImgUrl } from "../../../request";
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
courseList: [],
|
||||
searchKeyword: '',
|
||||
globalImgUrl,
|
||||
},
|
||||
// 每次用户输入都会进这里
|
||||
onSearchInput(e) {
|
||||
this.setData({
|
||||
searchKeyword: e.detail.value
|
||||
});
|
||||
},
|
||||
gotoCourseDetail(e) {
|
||||
const courseId = e.currentTarget.dataset.id;
|
||||
wx.navigateTo({
|
||||
url: `/pages/course/courseDetail/courseDetail?id=${courseId}`,
|
||||
});
|
||||
},
|
||||
onSearch() {
|
||||
const token = wx.getStorageSync('token')
|
||||
const { searchKeyword } = this.data
|
||||
wx.request({
|
||||
url: baseUrl + '/course/query/keyword',
|
||||
header: {
|
||||
Authorization: token
|
||||
},
|
||||
method: 'POST',
|
||||
data: {
|
||||
templateString: searchKeyword
|
||||
},
|
||||
success: res => {
|
||||
let result = res.data.data
|
||||
this.setData({courseList: result})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
@ -5,20 +5,20 @@
|
||||
class="image"
|
||||
src="./images/sousuo.png"
|
||||
/>
|
||||
<input class="text ml-3" placeholder="搜索更多好课" />
|
||||
<input class="text ml-3" placeholder="搜索更多好课" bindinput="onSearchInput" confirm-type="search" bindconfirm="onSearch"/>
|
||||
</view>
|
||||
<view class="flex-col list mt-17">
|
||||
<view class="flex-row relative list-item" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view bind:tap="gotoCourseDetail" data-id="{{item.id}}" class="flex-row relative list-item" wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="list-divider pos_3"></view>
|
||||
<image
|
||||
class="image_2 pos"
|
||||
src="https://ide.code.fun/api/image?token=6854f3c94ae84d0012332367&name=9c2a22f14e2bd768cbd40d939693e4a8.png"
|
||||
src="{{globalImgUrl + item.image}}"
|
||||
/>
|
||||
<view class="flex-col group_2 pos_2">
|
||||
<text class="font">区块链和加密数字货币(随报随学认证班)</text>
|
||||
<text class="font">{{item.name}}</text>
|
||||
<view class="flex-row justify-between items-baseline mt-17">
|
||||
<text class="font_2">券后99元起</text>
|
||||
<text class="font_3">18523人学习</text>
|
||||
<text class="font_2">券后{{item.discountPrice}}元起</text>
|
||||
<text class="font_3">{{item.orderCount}}人学习</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -25,9 +25,13 @@
|
||||
width: 35.63rpx;
|
||||
height: 35.63rpx;
|
||||
}
|
||||
input {
|
||||
height: 50rpx;
|
||||
width: 95%;
|
||||
}
|
||||
.text {
|
||||
color: #a8a8a8;
|
||||
font-size: 22.5rpx;
|
||||
color: #333333;
|
||||
font-size: 26.5rpx;
|
||||
font-family: SourceHanSerifCN;
|
||||
line-height: 20.83rpx;
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ Page({
|
||||
monthRefundAmount: 0, // 本月退款总金额
|
||||
monthPromotionCount: 0, // 本月推广数量
|
||||
userRole: '', // 用户角色
|
||||
isShowArr: [],
|
||||
widthRate: '30%'
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
@ -45,6 +47,13 @@ Page({
|
||||
break;
|
||||
}
|
||||
this.setData({ showRole });
|
||||
if (options.role === 'manager') this.setData({isShowArr: [true, true, true]})
|
||||
else if (options.role === 'supervisor') this.setData({isShowArr: [false, true, true]})
|
||||
else if (options.role === 'staff') this.setData({isShowArr: [false, false, true]})
|
||||
const trueCount = this.data.isShowArr.filter(v => v === true).length;
|
||||
if (trueCount === 3) this.setData({widthRate: '30%'})
|
||||
else if (trueCount === 2) this.setData({widthRate: '47.5%'})
|
||||
else if (trueCount === 1) this.setData({widthRate: '100%'})
|
||||
},
|
||||
|
||||
fetchPerformance() {
|
||||
|
@ -61,31 +61,36 @@
|
||||
</view>
|
||||
|
||||
<!-- 底部网格 -->
|
||||
<view class="grid pos">
|
||||
<view class="flex-col items-center grid-item">
|
||||
<view class="pos">
|
||||
<view class="flex-row" style="justify-content: space-between;">
|
||||
<view style="width: {{widthRate}};" class="flex-col items-center grid-item" wx:if="{{isShowArr[0]}}">
|
||||
<text class="font text_2">主管数量</text>
|
||||
<text class="mt-20 font_2">{{superCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center grid-item">
|
||||
<view style="width: {{widthRate}};" class="flex-col items-center grid-item" wx:if="{{isShowArr[1]}}">
|
||||
<text class="font text_3">员工数量</text>
|
||||
<text class="mt-20 font_2">{{empCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center grid-item">
|
||||
<view style="width: {{widthRate}};" class="flex-col items-center grid-item" wx:if="{{isShowArr[2]}}">
|
||||
<text class="font text_4">客户数量</text>
|
||||
<text class="mt-20 font_2">{{promoCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center grid-item_2">
|
||||
</view>
|
||||
|
||||
<view class="flex-row" style="justify-content: space-between;">
|
||||
<view class="flex-col items-center grid-item_2" style="margin-right: 10rpx">
|
||||
<text class="font text_5">订单总金额</text>
|
||||
<text class="mt-20 font_2">¥{{totalAmount}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center grid-item_2">
|
||||
<view class="flex-col items-center grid-item_2" style="margin: 40rpx 10rpx 0">
|
||||
<text class="font text_6">订单净成交</text>
|
||||
<text class="mt-20 font_2">¥{{netAmount}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center grid-item_2">
|
||||
<view class="flex-col items-center grid-item_2" style="margin-left: 10rpx">
|
||||
<text class="font text_7">下单数量</text>
|
||||
<text class="mt-20 font_2">{{orderCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -232,6 +232,8 @@
|
||||
line-height: 24.54rpx;
|
||||
}
|
||||
.grid-item_2 {
|
||||
width: 30%;
|
||||
margin-top: 40rpx;
|
||||
padding: 22.5rpx 0;
|
||||
filter: drop-shadow(0rpx 3.75rpx 3.75rpx #00000040);
|
||||
background-color: #ffffff;
|
||||
|
@ -5,13 +5,14 @@ Page({
|
||||
// 用于存储输入框数据
|
||||
nickName: '',
|
||||
phoneNumber: '',
|
||||
selectedSortField: '待选择', // 默认选择"待选择"
|
||||
selectedSortField: '员工数量', // 默认选择"待选择"
|
||||
selectedSortOrder: '升序', // 默认选择升序
|
||||
sortFieldsByManager: ['员工数量', '推广人数', '下单数量', '总订单金额', '净成交金额'],
|
||||
sortFieldsBySupervisor: ['推广人数', '下单数量', '总订单金额', '净成交金额'],
|
||||
sortOrders: ['升序', '降序'],
|
||||
items: [], // 用于存储查询结果
|
||||
role: '', // 假设初始为主管角色,可以根据实际情况动态设置
|
||||
k: 1
|
||||
},
|
||||
|
||||
// 主管名称输入
|
||||
@ -58,35 +59,35 @@ Page({
|
||||
// 搜索按钮点击
|
||||
onSearch() {
|
||||
const { role } = this.data;
|
||||
// —— 新增:校验主管名称 ——
|
||||
const nameRegex = /^[\u4e00-\u9fa5]+$/;
|
||||
if (!this.data.nickName) {
|
||||
wx.showToast({ title: '主管名称不能为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!nameRegex.test(this.data.nickName)) {
|
||||
wx.showToast({ title: '主管名称只能为汉字', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// // —— 新增:校验主管名称 ——
|
||||
// const nameRegex = /^[\u4e00-\u9fa5]+$/;
|
||||
// if (!this.data.nickName) {
|
||||
// wx.showToast({ title: '主管名称不能为空', icon: 'none' });
|
||||
// return;
|
||||
// }
|
||||
// if (!nameRegex.test(this.data.nickName)) {
|
||||
// wx.showToast({ title: '主管名称只能为汉字', icon: 'none' });
|
||||
// return;
|
||||
// }
|
||||
|
||||
// —— 新增:校验手机号 ——
|
||||
if (!this.data.phoneNumber) {
|
||||
wx.showToast({ title: '手机号不能为空', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (this.data.phoneNumber.length < 11) {
|
||||
wx.showToast({ title: '手机号不够11位', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
// // —— 新增:校验手机号 ——
|
||||
// if (!this.data.phoneNumber) {
|
||||
// wx.showToast({ title: '手机号不能为空', icon: 'none' });
|
||||
// return;
|
||||
// }
|
||||
// if (this.data.phoneNumber.length < 11) {
|
||||
// wx.showToast({ title: '手机号不够11位', icon: 'none' });
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 原排序条件校验,保持不变
|
||||
if (this.data.selectedSortField === '待选择') {
|
||||
wx.showToast({
|
||||
title: '排序条件不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if (this.data.selectedSortField === '待选择') {
|
||||
// wx.showToast({
|
||||
// title: '排序条件不能为空',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 显示加载中
|
||||
wx.showLoading({
|
||||
@ -128,14 +129,14 @@ if (this.data.selectedSortField === '待选择') {
|
||||
fail: () => {
|
||||
// 请求失败后,隐藏loading
|
||||
wx.hideLoading();
|
||||
|
||||
console.log('111');
|
||||
wx.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if( role === 'supervisor' ) {
|
||||
} else if( role === 'supervisor' || role === 'staff') {
|
||||
wx.request({
|
||||
url: baseUrl + '/perform/rank/staff', // 替换为实际API地址
|
||||
method: 'POST',
|
||||
@ -175,6 +176,8 @@ if (this.data.selectedSortField === '待选择') {
|
||||
onLoad(options) {
|
||||
// 根据身份确定角色
|
||||
const role = options.role;
|
||||
this.setData({k: options.k})
|
||||
if (role === 'staff') this.setData({selectedSortField: '推广人数'})
|
||||
console.log('角色---->',options.role);
|
||||
this.setData({ role });
|
||||
let showRole = '';
|
||||
@ -185,7 +188,10 @@ if (this.data.selectedSortField === '待选择') {
|
||||
case 'supervisor':
|
||||
showRole = '员工';
|
||||
break;
|
||||
case 'staff':
|
||||
showRole = '员工'
|
||||
}
|
||||
this.setData({ showRole });
|
||||
this.onSearch()
|
||||
}
|
||||
});
|
@ -15,7 +15,8 @@
|
||||
<!-- 手机号 -->
|
||||
<text class="self-start font text_5">手机号</text>
|
||||
<view class="flex-col justify-start items-start self-start text-wrapper_1">
|
||||
<input class="text_3 font text_6" placeholder="请输入手机号" bindinput="onPhoneInput"/>
|
||||
<input class="text_3 font text_6" placeholder="请输入手机号" bindinput="onPhoneInput"
|
||||
maxLength="11" type="number"/>
|
||||
</view>
|
||||
|
||||
<!-- 排序条件选择 -->
|
||||
@ -28,7 +29,7 @@
|
||||
<image class="image" src="./images/bottom.png"/>
|
||||
</view>
|
||||
</picker>
|
||||
<picker mode="selector" wx:if="{{ role === 'supervisor' }}" range="{{sortFieldsBySupervisor}}" bindchange="onSortFieldChange">
|
||||
<picker mode="selector" wx:if="{{ role === 'supervisor' || role === 'staff'}}" range="{{sortFieldsBySupervisor}}" bindchange="onSortFieldChange">
|
||||
<view class="flex-row justify-between section_2">
|
||||
<text class="font text_1">{{selectedSortField}}</text>
|
||||
<image class="image" src="./images/bottom.png"/>
|
||||
@ -71,10 +72,10 @@
|
||||
|
||||
<!-- 绩效数据 -->
|
||||
<view class="flex-row mt-14">
|
||||
<view class="flex-col justify-start items-center text-wrapper_5">
|
||||
<view class="flex-col justify-start items-center text-wrapper_5" wx:if="{{k === '1'}}">
|
||||
<text class="font_5 text_11">员工:{{item.empCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_6 ml-8">
|
||||
<view class="flex-col justify-start items-center text-wrapper_6">
|
||||
<text class="font_5 text_12">推广:{{item.promoCount}}</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_7 ml-8">
|
||||
|
@ -12,9 +12,10 @@
|
||||
background-color: #fefbf6;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.text {
|
||||
color: #e67e22;
|
||||
@ -165,6 +166,7 @@
|
||||
width: 146.25rpx;
|
||||
height: 56.25rpx;
|
||||
border: solid 1.88rpx #ffa400;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.font_5 {
|
||||
font-size: 26.25rpx;
|
||||
@ -202,19 +204,17 @@
|
||||
border: solid 1.88rpx #ffa400;
|
||||
}
|
||||
.text_13 {
|
||||
margin-left: 16.86rpx;
|
||||
margin-right: 11.27rpx;
|
||||
margin: 0 16.86rpx;
|
||||
line-height: 24.23rpx;
|
||||
}
|
||||
.text-wrapper_9 {
|
||||
padding: 14.61rpx 0 13.33rpx;
|
||||
padding: 14.61rpx 0 14.61rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 28.13rpx;
|
||||
height: 56.25rpx;
|
||||
border: solid 1.88rpx #ffa400;
|
||||
}
|
||||
.text_14 {
|
||||
margin-left: 18.86rpx;
|
||||
margin-right: 9.26rpx;
|
||||
margin: 0 18.86rpx;
|
||||
line-height: 24.56rpx;
|
||||
}
|
@ -22,15 +22,6 @@ Page({
|
||||
const phoneNumber = this.data.phoneNumber.trim();
|
||||
const { supervisorUserId } = this.data;
|
||||
|
||||
if (!nickName) {
|
||||
wx.showToast({ title: '请输入主管名称', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!/^1[3-9]\d{9}$/.test(phoneNumber)) {
|
||||
wx.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url: baseUrl + '/perform/query/staff',
|
||||
method: 'POST',
|
||||
@ -107,9 +98,9 @@ Page({
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
console.log('--->',options);
|
||||
console.log('========>', options)
|
||||
this.setData({
|
||||
supervisorUserId: options.id,
|
||||
supervisorUserId: options.supId,
|
||||
})
|
||||
this.onSearchSupId();
|
||||
},
|
||||
|
@ -28,6 +28,7 @@
|
||||
placeholder="请输入手机号"
|
||||
bindinput="onPhoneInput"
|
||||
value="{{phoneNumber}}"
|
||||
type="number"
|
||||
maxLength="11"
|
||||
/>
|
||||
</view>
|
||||
@ -57,7 +58,7 @@
|
||||
<!-- 基本信息 -->
|
||||
<view class="flex-row justify-between self-stretch group">
|
||||
<view class="flex-col items-start self-center">
|
||||
<text class="font_2">编号:{{item.id}}</text>
|
||||
<text class="font_2">编号:{{index + 1}}</text>
|
||||
<text class="font text_8 mt-13">员工:{{item.nickName}}</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start self-start text-wrapper_4" bind:tap="gotoUser" data-id="{{ item.userId }}">
|
||||
|
@ -18,9 +18,10 @@
|
||||
background-color: #fefbf6;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.text {
|
||||
color: #e67e22;
|
||||
|
@ -21,16 +21,6 @@ Page({
|
||||
onSearch() {
|
||||
const nickName = this.data.nickName.trim();
|
||||
const phoneNumber = this.data.phoneNumber.trim();
|
||||
const { id } = this.data
|
||||
|
||||
if (!nickName) {
|
||||
wx.showToast({ title: '请输入主管名称', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
if (!/^1[3-9]\d{9}$/.test(phoneNumber)) {
|
||||
wx.showToast({ title: '请输入正确的手机号', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
wx.request({
|
||||
url: baseUrl + '/perform/query/supervisor',
|
||||
@ -89,12 +79,13 @@ Page({
|
||||
break;
|
||||
}
|
||||
this.setData({ showRole });
|
||||
this.onSearch()
|
||||
},
|
||||
|
||||
changeStaff(e) {
|
||||
|
||||
const { id } = e.currentTarget.dataset;
|
||||
|
||||
console.log(id)
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/staffPerformance/staffPerformance?supId=${id}`,
|
||||
})
|
||||
|
@ -28,6 +28,7 @@
|
||||
placeholder="请输入手机号"
|
||||
bindinput="onPhoneInput"
|
||||
value="{{phoneNumber}}"
|
||||
type="number"
|
||||
maxLength="11"
|
||||
/>
|
||||
</view>
|
||||
@ -57,7 +58,7 @@
|
||||
<!-- 基本信息 -->
|
||||
<view class="flex-row justify-between self-stretch group">
|
||||
<view class="flex-col items-start self-center">
|
||||
<text class="font_2">编号:{{item.id}}</text>
|
||||
<text class="font_2">编号:{{index + 1}}</text>
|
||||
<text class="font text_8 mt-13">主管:{{item.nickName}}</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start self-start text-wrapper_4" bind:tap="changeStaff" data-id="{{ item.userId }}">
|
||||
|
@ -18,9 +18,10 @@
|
||||
background-color: #fefbf6;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.text {
|
||||
color: #e67e22;
|
||||
|
@ -28,12 +28,12 @@ Page({
|
||||
const { orderNumber, staffUserId } = this.data;
|
||||
|
||||
// 简单校验:非空
|
||||
if (!orderNumber) {
|
||||
return wx.showToast({
|
||||
title: '请输入订单号',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// if (!orderNumber) {
|
||||
// return wx.showToast({
|
||||
// title: '请输入订单号',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// }
|
||||
|
||||
// 发起 POST 请求
|
||||
wx.request({
|
||||
|
@ -11,6 +11,7 @@
|
||||
class="text_3 font text_1"
|
||||
placeholder="请输入订单号"
|
||||
value="{{orderNumber}}"
|
||||
type="number"
|
||||
bindinput="onOrderNumberInput"
|
||||
/>
|
||||
</view>
|
||||
@ -34,9 +35,9 @@
|
||||
wx:for-index="index"
|
||||
wx:key="id"
|
||||
>
|
||||
<view class="flex-row items-baseline">
|
||||
<view class="flex-row items-baseline" style="display: flex; justify-content: space-between;">
|
||||
<text class="font_2 text_8">订单号:</text>
|
||||
<text class="font_3 ml-26">{{item.orderNumber}}</text>
|
||||
<text class="font_3">{{item.orderNumber}}</text>
|
||||
</view>
|
||||
|
||||
<view class="flex-row justify-between mt-19">
|
||||
@ -54,22 +55,20 @@
|
||||
<text class="font_3 text_24">¥{{item.totalAmount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="flex-row justify-between mt-19">
|
||||
<view class="flex-row justify-between items-center mt-19">
|
||||
<text class="font_2 text_15">状态:</text>
|
||||
<text class="font_4 text_16">{{item.orderStatus}}</text>
|
||||
</view>
|
||||
|
||||
<view class="flex-row justify-between mt-19">
|
||||
<view class="flex-row justify-between items-center mt-19">
|
||||
<text class="font_2 text_17">抽成:</text>
|
||||
<text class="font_4 text_18">
|
||||
主管:{{item.firstRate * 100}}%,员工:{{item.secondRate * 100}}%
|
||||
<text class="font_4 text_18">主管:{{item.firstRate * 100}}%,员工:{{item.secondRate * 100}}%
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="flex-row justify-between mt-19">
|
||||
<view class="flex-row justify-between items-center mt-19">
|
||||
<text class="font_2 text_19">奖励:</text>
|
||||
<text class="font_4 text_20">
|
||||
主管:¥{{item.firstReward}},员工:¥{{item.secondReward}}
|
||||
<text class="font_4 text_20">主管:¥{{item.firstReward}},员工:¥{{item.secondReward}}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
|
@ -9,9 +9,10 @@
|
||||
background-color: #fefbf6;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.text {
|
||||
color: #e67e22;
|
||||
@ -118,6 +119,7 @@
|
||||
font-size: 30rpx;
|
||||
font-family: SourceHanSansCN;
|
||||
line-height: 22.76rpx;
|
||||
margin-right: 15rpx;
|
||||
color: #444444;
|
||||
}
|
||||
.text_9 {
|
||||
@ -130,45 +132,45 @@
|
||||
color: #444444;
|
||||
}
|
||||
.text_10 {
|
||||
margin-right: 19.69rpx;
|
||||
margin-right: 15rpx;
|
||||
line-height: 27.84rpx;
|
||||
}
|
||||
.text_11 {
|
||||
line-height: 27.81rpx;
|
||||
}
|
||||
.text_12 {
|
||||
margin-right: 15.06rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.text_13 {
|
||||
line-height: 28.29rpx;
|
||||
}
|
||||
.text_24 {
|
||||
margin-right: 6.41rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.text_15 {
|
||||
line-height: 28.01rpx;
|
||||
}
|
||||
.text_16 {
|
||||
margin-right: 18.77rpx;
|
||||
margin-right: 15rpx;
|
||||
line-height: 28.09rpx;
|
||||
}
|
||||
.text_17 {
|
||||
line-height: 28.16rpx;
|
||||
}
|
||||
.text_18 {
|
||||
margin-right: 11.44rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.text_19 {
|
||||
line-height: 28.2rpx;
|
||||
}
|
||||
.text_20 {
|
||||
margin-right: 7.76rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.text_21 {
|
||||
line-height: 28.31rpx;
|
||||
}
|
||||
.text_23 {
|
||||
margin-right: 19.31rpx;
|
||||
margin-right: 15rpx;
|
||||
margin-bottom: 2.04rpx;
|
||||
line-height: 27.79rpx;
|
||||
}
|
@ -158,6 +158,16 @@ Page({
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验身份证号
|
||||
const idCardReg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
if (!idCardReg.test(idcard)) {
|
||||
wx.showToast({
|
||||
title: '身份证号格式不正确',
|
||||
icon: 'none'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
|
||||
// 提交表单数据到后端
|
||||
wx.request({
|
||||
url: baseUrl + '/advancementApply/add',
|
||||
@ -175,7 +185,7 @@ Page({
|
||||
success: res => {
|
||||
console.log('后端返回的申请---->', res);
|
||||
if (res.data.code === 1) {
|
||||
wx.showToast({ title: '验证通过,提交成功', icon: 'success' });
|
||||
wx.showToast({ title: '提交成功', icon: 'success' });
|
||||
|
||||
// 清空表单内容
|
||||
this.setData({
|
||||
@ -189,7 +199,7 @@ Page({
|
||||
credential: '' // 清空凭证
|
||||
});
|
||||
} else {
|
||||
wx.showToast({ title: '系统错误', icon: 'error' });
|
||||
wx.showToast({ title: res.data.message, icon: 'none' });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -54,6 +54,7 @@
|
||||
bindinput="onInput"
|
||||
data-field="code"
|
||||
value="{{code}}"
|
||||
maxlength="6"
|
||||
/>
|
||||
<view
|
||||
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-16"
|
||||
|
@ -9,9 +9,11 @@
|
||||
padding: 67.5rpx 49.69rpx 84.38rpx 51.56rpx;
|
||||
background-color: #ffffff;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
height: calc(100vh - 1rpx);
|
||||
}
|
||||
.image {
|
||||
width: 232.5rpx;
|
||||
@ -84,7 +86,7 @@
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
.section_3 {
|
||||
padding: 19.69rpx 16.88rpx;
|
||||
padding: 30.69rpx 16.88rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 9.38rpx;
|
||||
box-shadow: 0rpx 3.75rpx 7.5rpx #00000040;
|
||||
@ -169,7 +171,7 @@
|
||||
padding: 13.13rpx 16.26rpx 15rpx 16.26rpx;
|
||||
}
|
||||
.input_2 {
|
||||
padding: 16.88rpx 16.26rpx 11.25rpx 16.26rpx;
|
||||
padding: 0 16.88rpx;
|
||||
}
|
||||
.input_3 {
|
||||
padding: 16.88rpx 16.26rpx 11.25rpx 16.26rpx;
|
||||
|
@ -125,8 +125,7 @@ Page({
|
||||
verificationCode: code,
|
||||
userPassword: newPwd,
|
||||
userConfirmPassword: confirmPwd,
|
||||
sourceToken: null,
|
||||
role: role
|
||||
userRole: role
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
|
@ -21,12 +21,14 @@ Page({
|
||||
passwordType: true,
|
||||
role: '', // 登录角色
|
||||
showRole: '',
|
||||
isShowRegister: true
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const role = options.role || ''
|
||||
const showRole = roleMap.get(role) || ''
|
||||
this.setData({ role, showRole })
|
||||
if (role === 'manager') this.setData({isShowRegister: false})
|
||||
},
|
||||
|
||||
// 切换到“密码登录”,只清空表单字段
|
||||
@ -66,7 +68,7 @@ Page({
|
||||
|
||||
// 获取验证码(仅校验手机号)
|
||||
getSmsCode() {
|
||||
const { phone } = this.data;
|
||||
const { phone, role } = this.data;
|
||||
|
||||
// 1. 非空校验
|
||||
if (!validate(this.data, { phone: '请输入手机号' })) {
|
||||
@ -81,7 +83,10 @@ Page({
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/code/pwd',
|
||||
method: 'POST',
|
||||
data: { templateString: phone },
|
||||
data: {
|
||||
phoneNumber: phone,
|
||||
userRole: role
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('验证码发送--->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
@ -161,7 +166,7 @@ Page({
|
||||
: baseUrl + '/userInfo/mini/vcd/login';
|
||||
const payload = loginType === 'password'
|
||||
? { phoneNumber: phone, userPassword: credential, userRole: role }
|
||||
: { phoneNumber: phone, verificationCode: credential };
|
||||
: { phoneNumber: phone, verificationCode: credential, userRole: role };
|
||||
|
||||
wx.request({
|
||||
url,
|
||||
@ -174,7 +179,7 @@ Page({
|
||||
const token = res.data.data.token || res.data.data;
|
||||
// ← 新增:将 token 存到本地缓存
|
||||
wx.setStorageSync('token', token);
|
||||
|
||||
wx.setStorageSync('role', role)
|
||||
wx.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success',
|
||||
|
@ -92,7 +92,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 去注册 -->
|
||||
<view class="self-center group_5">
|
||||
<view class="self-center group_5" wx:if="{{isShowRegister}}">
|
||||
<text class="font_4 text_11">没有账号?</text>
|
||||
<text class="font_5 text_12" bindtap="gotoRegister">去注册→</text>
|
||||
</view>
|
||||
|
@ -18,7 +18,17 @@ Page({
|
||||
this.setData({
|
||||
role: options.role
|
||||
})
|
||||
if (options.role === 'supervisor') {
|
||||
const scene = decodeURIComponent(options.scene)
|
||||
if (scene !== 'undefined') {
|
||||
let [key, value] = scene.split('=');
|
||||
console.log(key, value)
|
||||
if (value === 'manager') value = 'supervisor'
|
||||
else if (value === 'supervisor') value = 'staff'
|
||||
else if (value === 'staff') value = 'user'
|
||||
this.setData({inviteCode: key, role: value})
|
||||
}
|
||||
|
||||
if (this.data.role === 'supervisor') {
|
||||
this.setData({
|
||||
placeholder: '请输入学校名称'
|
||||
})
|
||||
@ -27,9 +37,6 @@ Page({
|
||||
placeholder : '请输入昵称'
|
||||
})
|
||||
}
|
||||
const scene = decodeURIComponent(options.scene)
|
||||
let [key, value] = scene.split('=');
|
||||
this.setData({inviteCode: value})
|
||||
},
|
||||
|
||||
/**
|
||||
@ -47,7 +54,7 @@ Page({
|
||||
},
|
||||
|
||||
sendSmsCode() {
|
||||
const { phone } = this.data;
|
||||
const { phone, role } = this.data;
|
||||
if (!phone.trim()) {
|
||||
wx.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
return;
|
||||
@ -61,7 +68,8 @@ Page({
|
||||
method: 'POST',
|
||||
header: { 'content-type': 'application/json' },
|
||||
data: {
|
||||
templateString: phone
|
||||
phoneNumber: phone,
|
||||
userRole: role
|
||||
},
|
||||
success: res => {
|
||||
// 假设后端返回 { success: true, ... }
|
||||
@ -156,7 +164,6 @@ Page({
|
||||
})
|
||||
|
||||
const { role } = this.data;
|
||||
|
||||
const res = await requestAsync({
|
||||
url: baseUrl + '/userInfo/register',
|
||||
method: 'POST',
|
||||
@ -177,21 +184,22 @@ Page({
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
});
|
||||
wx.hideLoading()
|
||||
setTimeout(() => {
|
||||
wx.navigateBack()({
|
||||
// url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
wx.navigateTo({
|
||||
url: `/pages/loginModule/pwdLogin/pwdLogin?role=${role}`,
|
||||
success: () => {
|
||||
this.setData({ nickname:'', phone:'', captcha:'', inviteCode:'', password:'', agree:false });
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
console.log(res.data)
|
||||
wx.showToast({
|
||||
title: res.data.message || '注册失败',
|
||||
icon: 'none'
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
wx.hideLoading()
|
||||
// wx.hideLoading()
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// pages/personCenter/accountSetting/accountSetting.js
|
||||
const { baseUrl } = require("../../../request");
|
||||
const { baseUrl, globalImgUrl } = require("../../../request");
|
||||
|
||||
Page({
|
||||
|
||||
@ -9,12 +9,15 @@ Page({
|
||||
data: {
|
||||
nickName: "",
|
||||
userAvatar: "",
|
||||
phoneNumber: ""
|
||||
phoneNumber: "",
|
||||
globalImgUrl,
|
||||
role: '',
|
||||
},
|
||||
|
||||
gotoResetPwd() {
|
||||
const { role } = this.data;
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/resetPwd/resetPwd',
|
||||
url: `/pages/personCenter/resetPwd/resetPwd?role=${ role }`,
|
||||
})
|
||||
},
|
||||
|
||||
@ -31,6 +34,8 @@ Page({
|
||||
title: '退出成功',
|
||||
icon: 'success'
|
||||
})
|
||||
wx.removeStorageSync('token')
|
||||
wx.removeStorageSync('role')
|
||||
setTimeout(() => {
|
||||
wx.reLaunch({
|
||||
url: '/pages/welcome/homePage/homePage',
|
||||
@ -62,13 +67,14 @@ Page({
|
||||
Authorization: token
|
||||
},
|
||||
success: res => {
|
||||
console.log('用户信息---->',res.data.data);
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
nickName: res.data.data.nickName,
|
||||
// TODO 头像未连接
|
||||
userAvatar: res.data.data.userAvatar,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
userAccount: res.data.data.userAccount
|
||||
userAccount: res.data.data.userAccount,
|
||||
role:res.data.data.userRole,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view class="flex-row self-stretch section">
|
||||
<image
|
||||
class="self-center image"
|
||||
src="./images/logo.png"
|
||||
src="{{globalImgUrl + userAvatar}}"
|
||||
/>
|
||||
<view class="flex-col items-start flex-1 self-start group_2 ml-8">
|
||||
<text class="text">{{ nickName }}</text>
|
||||
|
@ -20,6 +20,7 @@
|
||||
.image {
|
||||
width: 121.88rpx;
|
||||
height: 121.88rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.group_2 {
|
||||
margin-top: 21.84rpx;
|
||||
|
@ -15,18 +15,72 @@ Page({
|
||||
userAccount: "",
|
||||
invitationCode: "",
|
||||
showPopup: false, // 控制弹窗显示与否
|
||||
qrcode: "https://img.picui.cn/free/2025/05/29/6837c53582068.gif", // 设置二维码图片的路径
|
||||
isShowOrder: true,
|
||||
qrcode: "", // 设置二维码图片的路径
|
||||
userRole: "",
|
||||
title: '查看绩效',
|
||||
id: 0,
|
||||
globalImgUrl
|
||||
},
|
||||
|
||||
// 跳转课程订单页面
|
||||
courseOrder() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/course/courseOrderList/courseOrderList',
|
||||
})
|
||||
},
|
||||
|
||||
updateAvatar(e) {
|
||||
const { avatarUrl } = e.detail
|
||||
this.uploadAvatar(avatarUrl)
|
||||
},
|
||||
uploadAvatar(filePath) {
|
||||
wx.showLoading({ title: '上传中...' });
|
||||
wx.uploadFile({
|
||||
url: baseUrl + '/file/upload',
|
||||
filePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
biz: 'default'
|
||||
},
|
||||
success: res => {
|
||||
wx.hideLoading();
|
||||
let result = JSON.parse(res.data);
|
||||
console.log(result)
|
||||
if (result.code === 1) {
|
||||
this.setData({userAvatar: result.data})
|
||||
this.updateUserInfo(result.data)
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: result.message || '上传失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
wx.hideLoading();
|
||||
console.error('uploadFile fail', err);
|
||||
wx.showToast({ title: '网络错误,上传失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
},
|
||||
updateUserInfo(view) {
|
||||
const token = wx.getStorageSync('token')
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/modify/avatar',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: token
|
||||
},
|
||||
data: {
|
||||
templateString: view
|
||||
},
|
||||
success: res => {
|
||||
console.log(res.data)
|
||||
},
|
||||
fail: err => {
|
||||
wx.showToast({ title: '用户头像更新失败', icon: 'none' });
|
||||
}
|
||||
})
|
||||
},
|
||||
// 跳转结算记录页面
|
||||
gotoSettlementRecord() {
|
||||
wx.navigateTo({
|
||||
@ -111,8 +165,9 @@ Page({
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
let result = res.data.data
|
||||
console.log('====fdfs>', res)
|
||||
this.setData({
|
||||
// qrcode: globalImgUrl + result.inviteQrCode
|
||||
qrcode: globalImgUrl + result.inviteQrCode
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
@ -136,22 +191,25 @@ Page({
|
||||
success: res => {
|
||||
console.log('用户信息---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
let result = res.data.data
|
||||
this.setData({
|
||||
nickName: res.data.data.nickName,
|
||||
// TODO 头像未连接
|
||||
userAvatar: res.data.data.userAvatar,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
userAccount: res.data.data.userAccount,
|
||||
invitationCode: res.data.data.invitationCode,
|
||||
userRole: res.data.data.userRole,
|
||||
id: res.data.data.id,
|
||||
nickName: result.nickName,
|
||||
userAvatar: result.userAvatar,
|
||||
phoneNumber: result.phoneNumber,
|
||||
userAccount: result.userAccount,
|
||||
invitationCode: result.invitationCode,
|
||||
userRole: result.userRole,
|
||||
id: result.id,
|
||||
})
|
||||
console.log(result.userRole)
|
||||
if (result.userRole !== 'user') this.setData({ isShowOrder: false});
|
||||
if (result.userRole === 'staff') this.setData({title: '客户订单'});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
onLoad() {
|
||||
this.getUserMainInfo()
|
||||
},
|
||||
|
||||
@ -194,19 +252,48 @@ Page({
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/supervisorPerformance/supervisorPerformance?role=${userRole}&id=${id}`,
|
||||
})
|
||||
} else if (userRole === 'staff') {
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/userOrderPerformance/userOrderPerformance?userId=${id}`,
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/staffPerformance/staffPerformance?role=${userRole}&id=${id}`,
|
||||
url: `/pages/dashboardModule/staffPerformance/staffPerformance?role=${userRole}&supId=${id}`,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转排名
|
||||
gotoRank(e) {
|
||||
console.log(e);
|
||||
const userRole = e.currentTarget.dataset.userrole;
|
||||
// 跳转主管排名
|
||||
gotoSupervisorRank(e) {
|
||||
console.log(e)
|
||||
const {userRole} = this.data
|
||||
console.log('===========>', userRole)
|
||||
if (userRole === 'staff') {
|
||||
wx.showToast({
|
||||
title: '无权限',
|
||||
icon: 'error'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=${userRole}`,
|
||||
url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=manager&k=1`,
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转员工排名
|
||||
gotoStaffRank(e) {
|
||||
console.log(e);
|
||||
const {userRole} = this.data
|
||||
console.log('===========>', userRole)
|
||||
if (userRole === 'user') {
|
||||
wx.showToast({
|
||||
title: '无权限',
|
||||
icon: 'error'
|
||||
})
|
||||
return ;
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/dashboardModule/performanceRanking/performanceRanking?role=staff&k=0`,
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -212,13 +212,16 @@
|
||||
<view class="flex-col page">
|
||||
<view class="flex-row justify-between section">
|
||||
<view class="flex-row items-center self-center">
|
||||
<button open-type="chooseAvatar" bind:chooseavatar="updateAvatar">
|
||||
<image
|
||||
class="image"
|
||||
src="./images/logo.png"
|
||||
src="{{globalImgUrl + userAvatar}}"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</button>
|
||||
<view class="flex-col ml-6">
|
||||
<text class="self-start font text">{{ nickName }}</text>
|
||||
<view class="flex-row items-center self-stretch group_2 mt-9" bind:tap="gotoCall">
|
||||
<view class="flex-row items-center self-stretch group_2 mt-9" bindtap="gotoCall">
|
||||
<image
|
||||
class="image_3"
|
||||
src="./images/dianhua.png"
|
||||
@ -227,12 +230,12 @@
|
||||
<text class="font_2 text_2 ml-7">{{ phoneNumber }}</text>
|
||||
</view>
|
||||
<view class="flex-row items-center self-stretch section_2 mt-9" bind:tap="copyInvitationCode">
|
||||
<text class="font_2 text_3">邀请码:{{ invitationCode }}</text>
|
||||
<image
|
||||
class="shrink-0 image_4"
|
||||
src="./images/fuzhi.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<text class="font_2 text_3">邀请码:{{ invitationCode }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -248,21 +251,21 @@
|
||||
</view>
|
||||
<view class="flex-col mt-22" >
|
||||
<view class="flex-row items-start equal-division section_3" wx:if="{{ userRole != 'user' }}">
|
||||
<view class="flex-col items-center equal-division-item_1 group_3" bind:tap="checkPerformance">
|
||||
<view class="flex-col items-center equal-division-item_1 group_3" bindtap="checkPerformance">
|
||||
<image
|
||||
class="image_5"
|
||||
src="./images/zhijinxiangqing.png"
|
||||
/>
|
||||
<text class="font text_5 mt-6">查看绩效</text>
|
||||
<text class="font text_5 mt-6">{{title}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center equal-division-item_2 equal-division-item" bind:tap="gotoRank" data-userRole="{{ 'manager' }}">
|
||||
<view class="flex-col items-center equal-division-item_2 equal-division-item" bindtap="gotoSupervisorRank" data-userRole="{{ 'manager' }}">
|
||||
<image
|
||||
class="image_5"
|
||||
src="./images/tixianzhanghu.png"
|
||||
/>
|
||||
<text class="font text_6 mt-6">主管排名</text>
|
||||
</view>
|
||||
<view class="flex-col items-center equal-division-item_3 group_5" bind:tap="gotoRank" data-userRole="{{ 'supervisor' }}">
|
||||
<view class="flex-col items-center equal-division-item_3 group_5" bindtap="gotoStaffRank" data-userRole="{{ 'supervisor' }}">
|
||||
<image
|
||||
class="image_5"
|
||||
src="./images/tixianjilu.png"
|
||||
@ -271,8 +274,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col list">
|
||||
<view class="flex-row justify-between items-center section_4">
|
||||
<view class="flex-row items-center" bind:tap="courseOrder">
|
||||
<view class="flex-row justify-between items-center section_4" wx:if="{{isShowOrder}}" bindtap="courseOrder">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="shrink-0 image_6"
|
||||
src="./images/zhanghaoshezhi.png"
|
||||
@ -284,7 +287,7 @@
|
||||
src="./images/xiajiantou.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center section_4 mt-11" bind:tap="gotoDashboard">
|
||||
<view class="flex-row justify-between items-center section_4 mt-11" bindtap="gotoDashboard" wx:if="{{ userRole !== 'user' }}">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="shrink-0 image_6"
|
||||
@ -297,7 +300,7 @@
|
||||
src="./images/xiajiantou.png"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center section_4 mt-11" bind:tap="zhshezhi">
|
||||
<view class="flex-row justify-between items-center section_4 mt-11" bindtap="zhshezhi">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="shrink-0 image_6"
|
||||
|
@ -19,13 +19,26 @@
|
||||
height: 100%;
|
||||
}
|
||||
.section {
|
||||
padding: 15rpx 13.13rpx 26.25rpx;
|
||||
padding: 15rpx 13.13rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 8.33rpx;
|
||||
}
|
||||
.image {
|
||||
width: 161.25rpx;
|
||||
height: 161.25rpx;
|
||||
margin: 20rpx;
|
||||
width: 141.25rpx;
|
||||
height: 141.25rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
button {
|
||||
/* 去掉默认最小宽度 */
|
||||
min-width: 0 !important;
|
||||
/* 确保宽度随内容自适应 */
|
||||
width: auto !important;
|
||||
/* 下面是其他重置,保证“隐形” */
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.font {
|
||||
font-size: 26.25rpx;
|
||||
@ -59,17 +72,15 @@
|
||||
border-radius: 31.26rpx;
|
||||
}
|
||||
.image_4 {
|
||||
margin-left: 169.72rpx;
|
||||
width: 24.38rpx;
|
||||
height: 24.38rpx;
|
||||
}
|
||||
.text_3 {
|
||||
margin-left: -194.1rpx;
|
||||
margin-right: 21.6rpx;
|
||||
}
|
||||
.group {
|
||||
margin-top: 33.75rpx;
|
||||
width: 163.72rpx;
|
||||
width: 133.72rpx;
|
||||
}
|
||||
.image_2 {
|
||||
margin-left: 17.48rpx;
|
||||
|
@ -13,11 +13,12 @@ Page({
|
||||
count: 60,
|
||||
password: '', // 第一次输入的密码
|
||||
currentPwd: '', // 再次确认密码
|
||||
verificationCode: '' // 验证码
|
||||
verificationCode: '', // 验证码
|
||||
role: '',
|
||||
},
|
||||
|
||||
resetPwd() {
|
||||
const { phone, verificationCode, password, currentPwd } = this.data;
|
||||
const { phone, verificationCode, password, currentPwd, role } = this.data;
|
||||
if( !formatPassword(password,currentPwd) ) {
|
||||
return;
|
||||
}
|
||||
@ -32,7 +33,8 @@ Page({
|
||||
verificationCode: verificationCode,
|
||||
userPassword: password,
|
||||
userConfirmPassword: currentPwd,
|
||||
sourceToken: wx.getStorageSync('token')
|
||||
sourceToken: wx.getStorageSync('token'),
|
||||
userRole: role,
|
||||
},
|
||||
success: res => {
|
||||
console.log('修改密码--->',res);
|
||||
@ -43,7 +45,7 @@ Page({
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.reLaunch({
|
||||
url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
url: '/pages/welcome/homePage/homePage',
|
||||
})
|
||||
}, 1000); // 1000ms = 1秒
|
||||
|
||||
@ -67,7 +69,8 @@ Page({
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
data: {
|
||||
templateString: phone
|
||||
phoneNumber: phone,
|
||||
userRole: wx.getStorageSync('role')
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
@ -111,6 +114,10 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('---->',options);
|
||||
this.setData({
|
||||
role: options.role
|
||||
})
|
||||
// 获取用户信息 —— 用于渲染手机号
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/get/jwt',
|
||||
|
@ -1,3 +1,4 @@
|
||||
const { baseUrl } = require('../../../request');
|
||||
// pages/welcome/homePage/homePage.js
|
||||
Page({
|
||||
|
||||
@ -19,8 +20,13 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
onLoad() {
|
||||
let token = wx.getStorageSync('token')
|
||||
if (token) {
|
||||
wx.switchTab({
|
||||
url: '/pages/course/homepage/homepage'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -25,5 +25,5 @@
|
||||
"tabIndent": "auto",
|
||||
"tabSize": 2
|
||||
},
|
||||
"appid": "wx3f968a09e31d6bed"
|
||||
"appid": "wx8711c8d4fb04fef9"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
"projectname": "qingcheng-xiaochengxu",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
"urlCheck": true,
|
||||
"bigPackageSizeSupport": false
|
||||
},
|
||||
"condition": {},
|
||||
|
@ -1,7 +1,9 @@
|
||||
export const local='http://localhost:9091';
|
||||
export const caozhe = 'http://160.202.242.36:9093'
|
||||
export const dev = 'http://160.202.242.36:9091';
|
||||
export const test = 'http://160.202.242.36:9092';
|
||||
export const localTest = 'http://localhost:9092';
|
||||
export const baseUrl = test;
|
||||
export const ssl = 'https://www.chenxinzhi.top'
|
||||
export const baseUrl = ssl;
|
||||
|
||||
export const globalImgUrl = baseUrl + '/file/download/'
|
Reference in New Issue
Block a user