[200~1.兼容中国台湾、中国香港手机号码

This commit is contained in:
liuyuan
2025-07-10 14:29:44 +08:00
parent c7bab5afb4
commit f71ab1b442
27 changed files with 5393 additions and 4190 deletions

View File

@@ -7,8 +7,6 @@
<public-module></public-module>
<z-nav-bar
title="我的订单"
bgColor="#258feb"
fontColor="#fff"
:backState="2000"
>
</z-nav-bar>

View File

@@ -59,7 +59,8 @@
<slot name="goodsInfoPriceSlot" :row="v" :rowIndex="i"></slot>
<u-number-box
v-model="orderNumber"
v-model="v.productAmount"
@change="valChange($event, v)"
style="float: right"
v-if="showNumber"
>
@@ -70,13 +71,13 @@
slot="input"
style="width: auto; text-align: center; border: none"
class="input"
>{{ orderNumber }}</text
>{{ v.productAmount }}</text
>
<view slot="plus" class="plus">
<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
</view>
</u-number-box>
<text v-else style="float: right"> X {{ orderNumber }}</text>
<text v-else style="float: right"> X {{ v.productAmount }}</text>
</view>
</view>
</view>
@@ -576,9 +577,6 @@
if (this.orderNumber >= 1) {
this.$nextTick(async () => {
await this.getGoodsList();
// await this.getVipFei();
// await this.getDistrictAmount();
// await this.getActiveCouponList();
});
}
this.$forceUpdate();
@@ -810,33 +808,31 @@
this.xieyiShow = true;
},
async getGoodsList() {
//获取商品信息
// await this.getGoodsDataInfo();
await this.initPrepareOrder();
this.$nextTick(async () => {
if (this.pageType == "vip") {
await this.getTotalPrice();
} else {
await this.getVipFei();
await this.getDistrictAmount();
await this.getActiveCouponList();
}
var list = [...this.goodsDataList];
list = list.map((e) => e.goodsType);
this.haveCourse = list.some((ele) => ele === "05");
if (this.options.sourceType == "curriculum") {
this.goToInfo = {
url: "/pages/course/myCourse",
type: 2,
};
} else {
this.goToInfo = {
url: "/pages/bookShop/orderList",
type: 1,
};
}
});
//获取商品信息
await this.initPrepareOrder();
if (this.pageType == "vip") {
await this.getTotalPrice();
} else {
await this.getVipFei();
await this.getDistrictAmount();
await this.getActiveCouponList();
}
var list = [...this.goodsDataList];
list = list.map((e) => e.goodsType);
this.haveCourse = list.some((ele) => ele === "05");
if (this.options.sourceType == "curriculum") {
this.goToInfo = {
url: "/pages/course/myCourse",
type: 2,
};
} else {
this.goToInfo = {
url: "/pages/bookShop/orderList",
type: 1,
};
}
},
async getVipFei() {
let key = [];
@@ -844,14 +840,14 @@
this.goodsDataList.forEach((item, index) => {
key.push({
productId: item.productId,
quantity: this.orderNumber,
quantity: item.productAmount
});
});
await $http
.request({
url: "/book/buyOrder/getVipDiscountAmount",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data: {
productList: key,
},
@@ -861,7 +857,7 @@
})
.then(async (res) => {
if (res.code == 0) {
console.log("res.code at line 538:", res);
console.log("getVipDiscountAmount---------:", res);
this.vipPrice = res.discountAmount;
await this.getTotalPrice();
}
@@ -874,31 +870,24 @@
this.goodsDataList.forEach((item, index) => {
key.push({
productId: item.productId,
quantity: this.orderNumber,
quantity: item.productAmount
});
// dataToString = dataToString.concat(item.productId+"="+item.productAmount+"&")
});
console.log(key, "this.adressMoRen.areaidpath");
await $http
.request({
// url: "book/buyOrder/calculateTransportPrice/",
url: "/book/buyOrder/getDistrictAmount",
// url: "book/buyorder/getTransPrice/" + this.adressMoRen.areaidpath + "?" + dataToString,
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data: {
productList: key,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
if (res.code == 0) {
console.log("res.code at line 538111111111111111:", res);
this.districtAmount = res.districtAmount;
// console.log('需要的运费', res.result)
await this.getTotalPrice();
}
});
@@ -923,7 +912,7 @@
this.goodsDataList.forEach((e) => {
var str = `${e.productId}:${
e.activityPrice > 0 ? e.activityPrice : e[this.priceKey]
}:${this.orderNumber}`;
}:${e.productAmount}`;
list.push(str);
});
@@ -1061,6 +1050,32 @@
this.$forceUpdate();
});
},
//修改数量
valChange(e, item) {
let productItem = {};
productItem = item;
productItem.productAmount = e.value;
this.updateCart(productItem);
this.$nextTick(async () => {
await this.getGoodsList();
});
},
//更新购物车
updateCart(data) {
$http.request({
url: "book/ordercart/update",
method: "POST",
data: data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
console.log('更新购物车---')
}
});
},
onHandleClickBuy() {
this.orderModalShow = false;
this.remark = this.content;
@@ -1112,21 +1127,14 @@
},
];
}
if (
this.goodsDataList[0].activityPrice &&
this.goodsDataList[0].activityPrice > 0
) {
if (this.goodsDataList.some(item => item.activityPrice && item.activityPrice > 0)) {
this.priceBreakdownList.push({
text: "活动立减",
imgUrl: "",
type: 5,
});
}
if (
this.goodsDataList[0].isVipPrice &&
this.goodsDataList[0].vipPrice &&
this.goodsDataList[0].vipPrice > 0
) {
if (this.goodsDataList.some(item => item.isVipPrice==1 && item.vipPrice && item.vipPrice > 0)) {
this.priceBreakdownList.push({
text: "VIP专享立减",
imgUrl: "",
@@ -1210,7 +1218,7 @@
products: this.goodsDataList.map((e) => {
return {
productId: e.productId,
quantity: this.orderNumber,
quantity: e.productAmount
};
}),
regionCode: this.addressData.regionCode,
@@ -1244,11 +1252,14 @@
async getTotalPrice() {
var s = 0;
var that = this;
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
s += this.goodsDataList[i][this.priceKey];
}
that.totalPrice = s * this.orderNumber;
console.log("that.totalPrice at line 1226:", that.totalPrice);
that.goodsDataList.forEach((item, index) => {
let price = 0;
price = (item.productAmount * item.price).toFixed(2);
s += Number(price);
});
that.totalPrice = s;
var couponAmount = 0;
var couponData = this.selectcouponList.filter(
(e) => e.couponId == that.curCouponId
@@ -1427,12 +1438,11 @@
productList: this.goodsDataList.map((e) => {
return {
productId: e.productId,
quantity: this.orderNumber,
quantity: e.productAmount
};
}), //订单列表商品
orderType: "order", //订单类型
addressId:
this.options.goods[0].goodsType != "05" ? this.addressData.id : 0, // 地址ID
addressId: this.options.goods[0].goodsType != "05" ? this.addressData.id : 0, // 地址ID
appName: this.appName,
come: this.come,
};
@@ -1855,14 +1865,10 @@
width: calc(100% - 160rpx);
height: auto;
float: right;
// overflow: hidden;
.normal_box_top {
width: 100%;
display: flex;
height: 100rpx;
// margin-bottom: 40rpx;
}
}
}

View File

@@ -333,6 +333,7 @@ export default {
changeCountry(){
this.initPickerData();
},
//左上角返回操作
handleBack(){
uni.setStorageSync('fixed',true)
},
@@ -500,6 +501,9 @@ export default {
})
}
},
onBackPress(){
uni.setStorageSync('fixed',true)
},
};
</script>
<style lang="scss" scoped>

View File

@@ -2,7 +2,7 @@
<view class="container commonPageBox commonDetailPage">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="商品详情" bgColor="#258feb" fontColor="#fff"></z-nav-bar>
<z-nav-bar title="商品详情"></z-nav-bar>
<view
class="contentBox commonPageContentBox"
@@ -424,7 +424,7 @@
:fill="true"
:options="buyOptions"
:button-group="customButtonGroup1"
@click="onHandleClickBuy"
@click="onHandleClick"
@buttonClick="onHandleClickBuy1"
/>
</view>
@@ -540,7 +540,10 @@ export default {
parameterList: [],
booksList: [],
coursesList: [],
buyOptions: [],
buyOptions: [{
icon: "cart",
text: "购物车",
}],
swiperList: [],
goodsList: [],
@@ -611,14 +614,21 @@ export default {
visitorDetailInfo: "visitor/getProductDetail", // 游客状态下的商品详情
},
customButtonGroup1: [
{
text: "加入购物车",
backgroundColor: "linear-gradient(90deg, #FFCD1E, #FF8A18)",
color: "#fff",
},
{
with: 200,
text: "立即购买",
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
color: "#fff",
text: "立即购买",
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
color: "#fff",
},
],
requestType: "", // 数据请求类型是否为游客登陆状态
buttonType: '', //点击的是加入购物车还是购买
cartList: [], // 购物车列表
productAmount: 1, // 商品数量
};
},
filters: {
@@ -749,11 +759,19 @@ export default {
}
this.selectGoodsData = data;
this.$refs.commonSelectGoods.open();
// this.show = true;
this.$forceUpdate();
},
onHandleClickBuy1() {
//点击购物车
onHandleClick(){
console.log('点击购物车')
uni.navigateTo({
url: "/pages/goods/shopping/index",
});
},
//点击筛选商品
onHandleClickBuy1(e) {
this.buttonType = e.index;
if (this.requestType == "visitor") {
uni.showModal({
content: "登陆后可购买本商品",
@@ -770,34 +788,126 @@ export default {
return;
}
this.$refs.commonSelectGoods.open();
// this.show = true;
},
//点击下单按钮
onHandleClickBuy() {
console.log(
this.selectGoodsData,
"this.selectGoodsDatathis.selectGoodsDatathis.selectGoodsData"
);
var mynavData = JSON.stringify({
goods: [
{
productImages: this.selectGoodsData.productImages,
productId: this.selectGoodsData.productId,
productName: this.selectGoodsData.productName,
activityPrice: this.selectGoodsData.activityPrice,
price: this.selectGoodsData.price,
goodsType: this.selectGoodsData.goodsType,
},
],
navTitle: this.options.navTitle,
title: this.options.title,
typeId: 0,
}); // 这里转换成 字符串
uni.navigateTo({
url: `/pages/goods/order/index?data=${mynavData}`,
});
if(this.buttonType==0){ //如果是加入购物车
console.log('剩余', this.selectGoodsData.productStock)
if(this.selectGoodsData.productStock==0){
uni.showToast({
title: "商品库存不足",
icon: "none",
duration: 1000,
});
}else{
this.$http.post(`book/ordercart/getCartList?userId=${this.userInfo.id}`)
.then((res) => {
this.cartList = res.cartList;
this.isAddLink(this.selectGoodsData);
});
}
}else{
var mynavData = JSON.stringify({
goods: [
{
productImages: this.selectGoodsData.productImages,
productId: this.selectGoodsData.productId,
productName: this.selectGoodsData.productName,
activityPrice: this.selectGoodsData.activityPrice,
price: this.selectGoodsData.price,
goodsType: this.selectGoodsData.goodsType,
productAmount: 1,
},
],
navTitle: this.options.navTitle,
title: this.options.title,
typeId: 0,
});
uni.navigateTo({
url: `/pages/goods/order/index?data=${mynavData}`,
});
}
},
//统计商品信息
isAddLink(item) {
let data = {
userId: this.userInfo.id,
productId: item.productId,
productAmount: this.productAmount,
price: item.price,
};
// 判断列表是否为空
if (this.cartList.length > 0) {
let flag = "";
let shagnpin = {};
// 循环购物车列表
flag = this.cartList.some((item, index) => {
if (item.productId == data.productId) {
shagnpin = item;
shagnpin.productAmount = item.productAmount + 1;
return true;
}
});
if (flag) {
// 已在购物车中添加
$http.request({
url: "book/ordercart/update",
method: "POST",
data: shagnpin,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
uni.showToast({
title: "加入购物车成功",
duration: 1000,
});
}
});
} else {
// 加入购物车
$http.request({
url: "book/ordercart/save",
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
uni.showToast({
title: "加入购物车成功",
duration: 1000,
});
}
});
}
} else {
// 购物车列表为空时直接加入购物车
$http.request({
url: "book/ordercart/save",
method: "POST",
data,
header: {
"Content-Type": "application/json",
},
})
.then((res) => {
if (res.code == 0) {
uni.showToast({
title: "加入购物车成功",
duration: 1000,
});
}
});
}
this.$refs.commonSelectGoods.close();
},
buttonClick(e) {
this.options[2].info++;
},

View File

@@ -2,7 +2,7 @@
<view class="container commonPageBox commonDetailPage">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="确认订单" bgColor="#258feb" fontColor="#fff"></z-nav-bar>
<z-nav-bar title="确认订单"></z-nav-bar>
<common-order-submit
v-if="showOrder"
@@ -33,32 +33,19 @@
>
</template>
<template slot="goodsInfoImgSlot" slot-scope="slotProps">
<image
v-if="pageType == 'vip'"
src="/static/icon/vip.png"
class="goods_item_img"
mode="widthFix"
></image>
<image
v-if="pageType == 'vip'"
src="/static/icon/vip.png"
class="goods_item_img"
mode="widthFix"
@click="goDetail(slotProps.row.productId)"
></image>
<image
v-else-if="
(pageType == 'goods' || pageType == 'fudu') &&
slotProps.row.productImages &&
slotProps.row.productImages != ''
"
v-if="pageType!= 'vip'&&slotProps.row.productImages && slotProps.row.productImages != ''"
class="goods_item_img"
:src="slotProps.row.productImages"
mode="aspectFit"
>
</image>
<image
v-else
src="/static/nobg1.jpg"
class="goods_item_img"
mode="widthFix"
@click="goDetail(slotProps.row.productId)"
></image>
</template>
<template slot="goodsInfoNameSlot" slot-scope="slotProps">
<span v-if="pageType == 'vip'"
@@ -173,7 +160,6 @@ export default {
//vip订单
this.pageType = "vip";
this.showNumber = false;
// this.isHideAddress = true;
this.priceKey = "rebateFee";
await this.getVipDataInfo();
} else {
@@ -221,7 +207,7 @@ export default {
productList: this.options.goods.map((e) => {
return {
productId: e.productId || e.id,
quantity: 1,
quantity: e.productAmount,
};
}),
};
@@ -295,7 +281,6 @@ export default {
this.goodsDataList = res.productList.filter(
(e) => this.options.goods[0].productName == e.productName
);
});
},
@@ -320,7 +305,6 @@ export default {
{
...data,
productId: data.id,
price: data.rebateFee,
},
];
@@ -340,7 +324,11 @@ export default {
},
})
.then(async (res) => {
this.goodsDataList = res.shopProductList;
res.shopProductList.forEach(product => {
const cartItem = this.options.goods.find(item => item.productId === product.productId);
product.productAmount = cartItem ? cartItem.productAmount : 1;
});
this.goodsDataList = res.shopProductList;
});
},
},
@@ -353,6 +341,9 @@ export default {
</script>
<style lang="scss" scoped>
.commonPage, .commonPageBox {
height: calc(100vh - 50px);
}
.goodsvipLabel {
position: absolute;
z-index: 10;

View File

@@ -0,0 +1,384 @@
<template>
<view>
<z-nav-bar title="我的购物车"></z-nav-bar>
<view class="shopCarContent">
<scroll-view scroll-y="true" v-if="cartList.length>0">
<view class="cartItem" v-for="(item,index) in cartList" :key="index">
<view class="select">
<checkbox style="transform:scale(0.8)" :checked="item.checked" @click="checkboxGroupChange(index,item)" class="round checkedItem" />
</view>
<view class="cartContent" style="position: relative;">
<span v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
style="position: absolute;z-index: 1;top: 4px;left: 0px; text-align: center;font-size: 18rpx;background-color: #f94f04;color: #fff; border-radius:4px; padding:2px 4px;line-height: 14px;">VIP优惠</span>
<image :src="item.image" mode="" @click="goDetail(item.productId)"></image>
<view class="itemCenter">
<view class="cartTitle" @click="goDetail(item.productId)" style="display: flex;align-items: center;">
<text>{{item.productName}}</text>
</view>
<view class="itemPrice">
<text v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null">
<text style="color: #e97512;font-size: 16px;font-weight: bold;">{{(item.vipPrice).toFixed(2)}}</text>
<text style="color: #8a8a8a;font-size: 14px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">{{(item.price).toFixed(2)}}</text>
</text>
<text
v-else-if="item.activityPrice && item.activityPrice > 0">
<text style="color: #e97512;font-size: 16px;font-weight: bold;">{{(item.activityPrice).toFixed(2)}}</text>
<text style="color: #8a8a8a;font-size: 14px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">{{(item.price).toFixed(2)}}</text>
</text>
<text v-else style="color: #e97512;font-size: 16px;font-weight: bold;">{{item.price}}</text>
<u-number-box button-size="20" v-model="item.productAmount" @change="valChange($event,item)"
:input-width="25" :input-height="10" :min="1" :max="item.productStock" integer
@overlimit='overlimit'></u-number-box>
</view>
</view>
</view>
</view>
</scroll-view>
<view v-else style=" font-size: 28rpx; text-align: center; padding-top: 100rpx; color: #999;">暂无数据</view>
</view>
<!-- 底部操作区 -->
<view class="shopCarFooter">
<view class="selectAll">
<checkbox :checked="all" style="transform:scale(0.8)" @click="isSelectAll()" class="round checkedItem" />
<text class="cartCho">全选</text>
<button class="mini-btn"
style="border-radius: 10rpx; font-size: 26rpx; line-height: 30rpx; padding: 10rpx 25rpx; margin-left: 20rpx;"
v-if="isCartDelShow" @click="delCart()" type="warn" size="mini">删除</button>
</view>
<view class="exhibition">
<view class="total">合计: <b>{{totalPrice}}</b>
</view>
<view class="settlement" @click="setTment()">
结算
</view>
</view>
</view>
</view>
</template>
<script>
import $http from '@/config/requestConfig.js';
import {
mapState
} from 'vuex';
export default {
data() {
return {
playData: {},
totalPrice: 0, // 总价
all: false, // 是否全选
isCartDelShow: false, // 是否展示删除按钮
cartList: [] // 购物车列表
};
},
//第一次加载
onLoad(e) {
this.getCartList()
},
//页面显示
onShow() {
this.getCartList();
this.all = false;
this.isCartDelShow = false
this.totalPrice = 0
},
computed: {
...mapState(['userInfo']),
},
//方法
methods: {
// 获取购物车列表
getCartList() {
this.$http.post(`book/ordercart/getCartList?userId=${this.userInfo.id}`).then(res => {
this.cartList = res.cartList
if (res.cartList.length > 0) {
res.cartList.forEach((item, index) => {
item.checked = false
})
this.cartList = res.cartList
}
})
},
// 是否全选
isSelectAll(e) {
if (this.cartList.length > 0) {
this.all = !this.all
this.cartList.forEach((item, index) => {
item.checked = this.all
})
this.isCartDelShow = this.all
this.total()
} else {
this.all = false
}
},
// 选中单独商品
checkboxGroupChange(index, item) {
// 修改当前item的checked
this.cartList[index].checked = !item.checked
// 判断是否全选
this.all = this.cartList.every((item, index) => {
return item.checked == true
})
// 判断是否展示删除按钮
this.isCartDelShow = this.cartList.some((item, index) => {
return item.checked == true
})
// 计算总价
this.total()
},
// 计算总价
total() {
let allprice = 0;
this.cartList.forEach((item, index) => {
let price = 0;
if (item.checked) {
if (item.isVipPrice == 1 && item.vipPrice != 0) {
price = (item.productAmount * item.vipPrice).toFixed(2);
} else {
if (item.activityPrice && item.activityPrice > 0) {
price = (item.productAmount * item.activityPrice).toFixed(2);
} else {
price = (item.productAmount * item.price).toFixed(2);
}
}
}
allprice += Number(price)
})
this.totalPrice = allprice.toFixed(2)
},
// 超出阈值时
overlimit() {
uni.showToast({
title: '超出商品数量',
icon: 'error',
duration: 1000
})
},
valChange(e, item) {
console.log(e)
let productItem = {}
productItem = item
productItem.productAmount = e.value
this.updateCart(productItem)
setTimeout(() => {
this.total()
}, 300)
},
// 更新购物车
updateCart(shagnpin) {
// 已在购物车中添加
$http.request({
url: "book/ordercart/update",
method: "POST",
data: shagnpin,
header: {
'Content-Type': 'application/json'
}
}).then(res => {
if (res.code == 0) {
}
})
},
// 删除购物车
delCart() {
let cartIdArr = [];
this.cartList.forEach((item, index) => {
if (item.checked) {
cartIdArr.push(item.cartId)
}
})
uni.showModal({
title: '提示',
content: '是否删除这个商品',
confirmText: '确定',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '加载中',
mask: true
})
console.log(cartIdArr)
$http.request({
url: "book/ordercart/delete",
method: "POST",
data: cartIdArr,
header: {
'Content-Type': 'application/json'
},
}).then(res => {
this.isCartDelShow = false
this.totalPrice = 0
this.getCartList()
uni.hideLoading();
this.all = false;
})
} else {
console.log('cancel') //点击取消之后执行的代码
}
}
})
},
// 跳转结算页面
setTment() {
let goods = []
this.cartList.forEach((item, index) => {
if (item.checked) {
goods.push({
productImages: item.productImages,
productId: item.productId,
productName: item.productName,
goodsType: item.goodsType,
productAmount: item.productAmount,
price: item.price,
activityPrice: item.activityPrice,
})
}
})
let mynavData = JSON.stringify({
goods: goods,
typeId: 1
})
// 如果没有勾选
if (goods.length == 0) {
uni.showToast({
title: "请先勾选商品",
icon: 'error',
duration: 1000,
})
} else {
uni.navigateTo({
url: '/pages/goods/order/index?data='+ mynavData
});
}
},
//商品内容跳转
goDetail(id) {
uni.navigateTo({
url: '/pages/goods/index?isMiaosha=1&id='+id
});
},
},
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.shopCarContent {
width: 100%;
height: 100%;
padding-bottom: 104rpx;
padding-top: 20rpx;
.cartItem {
padding: 10rpx 10rpx 10rpx 10rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
background-color: #fff;
.cartContent {
flex: 1;
display: flex;
image {
width: 130rpx;
height: 150rpx;
border-radius: 10rpx;
padding: 10rpx;
margin-right: 15rpx;
}
.itemCenter {
flex: 1;
flex-direction: column;
justify-content: space-around;
}
.cartTitle {
font-size: 30rpx;
margin: 35rpx 0 20rpx 0;
}
.itemPrice {
font-size: 28rpx;
display: flex;
justify-content: space-between;
}
}
}
}
.shopCarFooter {
width: 100%;
height: 100rpx;
padding: 20rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 0;
z-index: 9;
.selectAll {
display: flex;
.cartCho {
font-size: 26rpx;
color: #888;
}
.cartDel {
font-weight: bold;
color: #bf0c0c;
font-size: 14px;
margin: 12rpx 0 0 20rpx;
}
}
.exhibition {
display: flex;
align-items: center;
.total {
font-size: 15px;
padding: 0 40rpx 0 0;
color: #888;
b {
margin-left: 10rpx;
color: #ef1224;
font-size: 35rpx;
}
}
.settlement {
font-size: 28rpx;
font-weight: 700;
padding: 10rpx 50rpx;
background-image: linear-gradient(90deg, rgb(254, 96, 53), rgb(239, 18, 36));
color: #fff;
border-radius: 40rpx;
}
}
}
/deep/.uni-checkbox-input{
border-radius: 50rpx;
}
.shopCarFooter .selectAll{
display: flex;
align-items: center;
}
</style>

View File

@@ -203,8 +203,8 @@
type: "switchTab"
},
{
name: "我的证书",
url: "/pages/certificate/certificate",
name: "我的购物车",
url: "/pages/goods/shopping/index",
type: "pageJump",
},
{
@@ -212,6 +212,11 @@
url: "/pages/trainingCourse/index",
type: "pageJump",
},
{
name: "我的证书",
url: "/pages/certificate/certificate",
type: "pageJump",
},
{
name: "我的湖分",
url: "/pages/hufen/hufen",
@@ -427,7 +432,7 @@
url: "/pages/miniClass/DirectorModalList?type=mine",
type: "pageJump"
}
this.pageList.splice(3, 0, item);
this.pageList.splice(4, 0, item);
}
}
// 是班长
@@ -441,7 +446,7 @@
url: "/pages/miniClass/MonitorClassList?type=mine",
type: "pageJump"
}
this.pageList.splice(3, 0, item);
this.pageList.splice(4, 0, item);
}
}
// 是学员
@@ -455,7 +460,7 @@
url: "/pages/miniClass/myClassList?type=mine",
type: "pageJump"
}
this.pageList.splice(3, 0, item);
this.pageList.splice(4, 0, item);
}
}

View File

@@ -141,12 +141,6 @@
</common-select-vip>
<u-popup :show="orderModalShow" mode="bottom" :round="20">
<view class="orderModalShow popup_box">
<!-- <u-icon name="close" color="#333" size="18" @click="closeOrderModalShow" style="
display: inline-block;
position: absolute;
right: 20rpx;
top: 20rpx;
"></u-icon> -->
<orderPay ref="orderPay" :dataInfo="selectVipData"></orderPay>
</view>
</u-popup>

View File

@@ -3,8 +3,6 @@
class="container commonDetailPage"
style="background-color: #fff !important"
>
<!-- 公共组件-每个页面必须引入 -->
<view class="contentBox commonPageContentBox order_box">
<view class="order_top goods_box pay_box">
<view class="pay_title">支付方式</view>

View File

@@ -2,14 +2,7 @@
<view>
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="我的班级管理">
</z-nav-bar>
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
</view> -->
<z-nav-bar title="班级管理"></z-nav-bar>
<view class="containerBg">
<view class="subCate flex" v-if="subList1.length> 0">
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList1"
@@ -77,13 +70,14 @@
</text>
</view>
<view class="jianjie">
目标学员人数{{item.number}}
目标学员人数{{item.number}} <br/>
<text v-if="item.startTime&&item.studyEndTime">学习日期{{(item.startTime).split('T')[0]}}{{(item.studyEndTime).substring(0, 10)}}<br/></text>
<text v-if="item.examStartTime&&item.examEndTime">考试周日期{{item.examStartTime.substring(0, 10)}}{{(item.examEndTime).substring(0, 10)}}</text>
</view>
<view class="jianjie">
班内职务{{item.roleName}}
</view>
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -115,13 +109,14 @@
</text>
</view>
<view class="jianjie">
目标学员人数{{item.number}}
目标学员人数{{item.number}} <br/>
<text v-if="item.startTime&&item.studyEndTime">学习日期{{(item.startTime).split('T')[0]}}{{(item.studyEndTime).substring(0, 10)}}<br/></text>
<text v-if="item.examStartTime&&item.examEndTime">考试周日期{{item.examStartTime.substring(0, 10)}}{{(item.examEndTime).substring(0, 10)}}</text>
</view>
<view class="jianjie">
班内职务{{item.roleName}}
</view>
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -625,7 +620,7 @@
@include mshadow(10px, 1) .imgcontainer {
display: block;
width: 110rpx;
width: 90rpx;
margin-right: 20rpx;
// background-size: cover;
// background-position: center;
@@ -643,6 +638,7 @@
.btn_box {
text-align: right;
margin-top:20rpx;
text {
border-radius: 20rpx;
@@ -660,19 +656,10 @@
margin-left: 20rpx;
}
}
.buyItems {
width: 60%;
}
.jianjie {
line-height: 30rpx;
margin-bottom: 10rpx;
overflow: hidden;
overflow: hidden !important;
line-height: 36rpx;
margin-top: 10rpx;
font-size: 24rpx;
// @include bov();
color: #9c9c9c;
}

View File

@@ -18,7 +18,15 @@
<view class="mainContent" v-if="thisClass.id">
<view class="className">
<h3>{{thisClass.title}}</h3>
<view>
<h3>{{thisClass.title}}</h3>
<span v-if="examStartTime&&examEndTime" style=" font-size: 26rpx; color: #999; font-weight: normal; display: block; padding-top: 10rpx; line-height: 34rpx;">
学习日期{{thisClass.startTime.substring(0,10)}} {{thisClass.studyEndTime.substring(0,10)}}<br/>
考试周日期{{examStartTime.substring(0,10)}} {{examEndTime.substring(0,10)}}
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">距离考试周开始还有{{examEndDays}}</b>
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">(考试周开始后无法提交答案)</b>
</span>
</view>
<text class="tuichu" v-if="thisClass.state == '0' && isHave" @click="outClass()">退出班级</text>
</view>
<view class="otherItems flex_box">
@@ -168,11 +176,6 @@
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view>
<!-- <view v-if="classModel.isExam == 1 && thisClass.state == '2'">
<text class="ciyao">考试分</text>
<text class="ciyao"><i
class="mainTxt PM_font">{{performanceScore.questionScore}}</i></text>
</view> -->
</view>
</view>
</template>
@@ -207,9 +210,6 @@
<view class="" v-show="courses.length == 0">
<u-divider text="暂无课程"></u-divider>
</view>
<!-- <view class="" v-if="thisClass.content != ''">
<text class="adminName">教学目标/班级简介</text>
</view> -->
<uni-section class="mb-10 nobg" title="教学目标/班内简介" type="line"></uni-section>
<rich-text class="banjiJianjie" :nodes="formatRichText(thisClass.content)"></rich-text>
<view class="qrcode" v-if="thisClass.qrcode != ''">
@@ -223,7 +223,6 @@
<template v-if="students.length> 0">
<view class="" style=" overflow: hidden; margin:20rpx 0">
<text style="font-size: 26rpx; color: #666;"> {{students.length}} 名学员</text>
<!-- <uni-section class="mb-10 nobg xueyuanTitle" title="班内学员" type="line" sub-title=""></uni-section> -->
</view>
<view class="classMateBox" v-if="(thisClass.state == '0' || thisClass.state == '1')">
<view class="newBox flexbox">
@@ -254,8 +253,6 @@
<u-divider text="暂无学员加入"></u-divider>
</view>
</template>
<!-- {{getTijiaoTitleList}} -->
<!-- 班内提交 -->
<view class="" v-if="tabId == '3' && thisClass.state != '0' && isHave">
<view class="flex_box tijiaoTitle">
@@ -296,8 +293,7 @@
</view>
</radio-group>
</view>
<!-- <uni-section class="mb-10 nobg" title="任务列表" type="line"></uni-section> -->
<view v-if="taskList.length > 0 ">
<view class="submitRecode">
<view class="newBox">
@@ -321,9 +317,6 @@
<view class="score" v-if="item.scoreSuccess == 0">
等待评分
</view>
<!-- <view class="score" v-if="item.scoreSuccess > 0 && item.scoreSuccess ">
正在评分
</view> -->
<view class="score" v-if="item.scoreSuccess >= 3">
分数{{item.score}}
</view>
@@ -338,7 +331,6 @@
<text class="pIng" v-if="item.otherInfo[0].scoreSuccess < 3 && item.otherInfo[0].scoreSuccess > 0">正在评分</text>
<view class="" v-if="item.otherInfo[0].scoreSuccess >2">
<text class="score" >{{item.otherInfo[0].score}} </text>
<!-- <text style="color: #999; padding-left: 10rpx; font-size: 26rpx;"></text> -->
</view>
</template>
<template
@@ -360,9 +352,6 @@
<u-divider v-show="status == 2" text="已加载全部"></u-divider>
<u-divider v-show="status == 3" text="暂无数据"></u-divider>
<u-divider v-show="status == 1" text="加载中..."></u-divider>
<!-- <view class="" v-else>
<u-divider text="暂无数据"></u-divider>
</view> -->
</view>
<template
v-if="tijiaoTitleId == '3' && questionsList.length > 0 && questionsList[curCourseIndex].chapterList.length > 0">
@@ -380,8 +369,6 @@
<text v-if="thisClass.state == '2' || thisClass.state == '3'" style="color: #999; font-size: 26rpx;">已不可作答</text>
</template>
<template v-else>
<!-- <text class=""
style="padding-left: 10rpx; color: #55aaff; font-size: 26rpx;">已作答</text> -->
<text style="padding-left: 10rpx; color: #55aa7f; font-size: 26rpx;" v-if="item.reply.scoreSuccess <= 2 && thisClass.state != '2'">
等待评分
</text>
@@ -417,7 +404,6 @@
<text class="adminName">班长</text>
<view class="personbox" v-if="admins.monitor.user != null">
<text>{{admins.monitor.user.nickname != null && admins.monitor.user.nickname != '' ? admins.monitor.user.nickname : '匿名用户'}}</text>
<!-- <text v-if="admins.monitor.id">({{admins.monitor.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
@@ -425,8 +411,6 @@
<text class="adminName">副班长</text>
<view class="personbox" v-if="admins.dmonitor.user != null">
<text>{{admins.dmonitor.user.nickname != null && admins.dmonitor.user.nickname != '' ? admins.dmonitor.user.nickname : '匿名用户'}}</text>
<!-- <text>({{admins.dmonitor.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
@@ -434,21 +418,9 @@
<view class="personbox" v-if="admins.learner.user != null">
<text>{{admins.learner.user.nickname != null && admins.learner.user.nickname != '' ? admins.learner.user.nickname : '匿名用户'}}</text>
<!-- <text>({{admins.learner.user.tel}})</text> -->
</view>
<text v-else>暂未设置</text>
</view>
<!-- <view class="item arryItem"><text class="adminName">记分员</text>
<template v-if="admins.counter.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.counter" :key="index">
<template v-if="item.user != null">
<text>{{item.user.nickname != null && item.user.nickname != '' ? item.user.nickname : '匿名用户'}}</text>
<text>({{item.user.tel}}) </text>
</template>
</view>
</template>
<text v-else>暂未设置</text>
</view> -->
<view class="item arryItem"><text class="adminName">评分员</text>
<template v-if="admins.scorer.length > 0">
<view class="arryItemSub" v-for="(item,index) in admins.scorer" :key="index">
@@ -500,9 +472,6 @@
</view>
</template>
</template>
<!-- && thisClass.state == '2' -->
<!-- <view v-if="classModel.isExam == 1" :class="['PM_font','zhengshu',thisStudent.student.score.certificateType == 'A' ? 'Azheng' : 'Bzheng']"
></view> -->
</view>
</view>
</u-popup>
@@ -515,7 +484,6 @@
<text style="color: #666;">请确认以下证书信息证书一经生成后不可更改</text>
</view>
<view class="tips border_radius_10">
<!-- {{submitInfo.name}}-{{submitInfo.photo}} -->
<view class="flex_box align-items_box item">
<text class="mr20rpx">证书姓名</text>
<text class="mr20rpx">
@@ -544,7 +512,6 @@
<view class="btn_box_certificate"><button @click="createCertificate">立即生成证书</button></view>
</view>
</u-popup>
<!-- <z-navigation></z-navigation> -->
<view>
<u-back-top :scroll-top="scrollTop" bottom="60" :customStyle='bgiStyle' :iconStyle="iconStyle"></u-back-top>
</view>
@@ -556,7 +523,6 @@
import addCerInfo from "@/components/addCerInfo.vue";
import debounce from "@/common/debounce.js";
import sutdentScoreList from "./components/sutdent_score_list.vue";
// import permission from "@/js_sdk/wa-permission/permission.js"
import $http from '@/config/requestConfig.js';
import {
mapState
@@ -614,10 +580,6 @@
name: '班内课程',
id: '0'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -628,10 +590,6 @@
name: '班内课程',
id: '0'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -642,10 +600,6 @@
name: '历史提交',
id: '3'
},
// {
// name: '班内讨论',
// id: '1'
// },
{
name: '班内学员',
id: '2'
@@ -666,9 +620,7 @@
},
activeStyle: {
color: '#333',
fontWeight: 'bold',
// transform: 'scale(1.2)',
// backgroundColor: '#258feb'
fontWeight: 'bold'
},
classModel: {},
@@ -728,7 +680,9 @@
ingPaper: undefined, // 正在进行中的试卷信息
newCLass: undefined, // 同模型的待开班班级
certificate: undefined, // 证书
// stickyBgColor:'#ff9277',
examStartTime: '',
examEndTime: '',
examEndDays: ''
}
},
onPageScroll(e) {
@@ -743,20 +697,6 @@
console.log('this.classId', this.classId);
this.getUserRole()
this.getUserInfo()
// uni.$on('refreshData', () => {
// console.log('开始刷新列表数据');
// this.pPage = 0
// this.taskList = []
// this.getList()
// })
// uni.$on('refreshUserAnswerList',() => {
// console.log('开始刷新用户提交列表');
// this.pPage = 0
// this.taskList = []
// this.getList()
// })
},
onReachBottom() {
if(this.tijiaoTitleId != 3){
@@ -766,15 +706,10 @@
}
},
async onPullDownRefresh() {
// this.curTagIndex = 0
console.log('this.tabId------', this.tabId);
this.getClassInfo()
this.getScore()
var ll = await this.getPaperList()
// this.pPage = 0
// this.taskList = []
// this.getList()
uni.stopPullDownRefresh()
},
async onShow() {
@@ -783,7 +718,6 @@
if (this.thisClass.state == '0' && this.isHave) {
this.buyCourseMsg = await this.checkUserCourse()
}
// this.curTagIndex = 0
if (this.thisClass.state != '0') {
this.getScore()
}
@@ -807,10 +741,7 @@
var historyPaper = await this.getingPaper()
console.log('正在进行中的试卷信息', historyPaper);
this.ingPaper = historyPaper
// console.log('对比----------------', historyPaper.classId, this.classId);
if (historyPaper && historyPaper != null && historyPaper.relationId == this.classId) {
// var planEndTimeDate = new Date(historyPaper.planEndTime)
// paperEndTime = planEndTimeDate.getTime(); // 结束的时间戳
paperEndTime = historyPaper.planEndTime
console.log('+++++++++', paperEndTime);
this.examId = historyPaper.id
@@ -838,7 +769,6 @@
if (userObj) {
this.submitInfo.name = userObj.name
this.submitInfo.photo = userObj.photo
// this.showSubmitInfoBlank = true
}
}
},
@@ -906,14 +836,12 @@
if (this.classModel.isQuestion == 1) {
_list.push(this.defaultTijiaoTitleList[3])
}
// return _list
if (_list.length > 0) {
console.log('是否进入了这里666666666666',this.tijiaoTitleIndex);
this.tijiaoTitleList = _list
this.titleClick(this.tijiaoTitleList[this.tijiaoTitleIndex], this.tijiaoTitleIndex )
// this.tijiaoTitleId = this.tijiaoTitleList[0].id
}
// this.tabId =
},
getBlankNumber() {
this.blankNumber = 0
@@ -929,16 +857,11 @@
if (this.classModel.isQuestion == 1) {
this.blankNumber++
}
// if(this.classModel.isExam == 1){
// this.blankNumber++
// }
}
},
methods: {
// 获得思考题列表及答案
async getQuestionsList() {
console.log('是否进入了思考题请求????????????');
var list = []
await $http.request({
url: "common/class/getThinkQuestionListStudent",
@@ -946,7 +869,7 @@
data: {
"classId": this.classId
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
@@ -971,16 +894,10 @@
return list
},
async showSubmit() {
// if (this.certificate && this.certificate.id && this.certificate.certificateUrl.length > 3) {
// 已生成
uni.navigateTo({
url: '/pages/certificate/certificate'
})
// } else { // 未生成
// this.showSubmitInfoBlank = true
// }
// 已生成
uni.navigateTo({
url: '/pages/certificate/certificate'
})
},
async getUserData() {
let that = this;
@@ -1059,9 +976,6 @@
},
selectImage() {
this.chooseImage()
// .then(res => {
// this.submitInfo.img = res.tempFilePaths[0];
// });
},
// 选中了学生
chooseStudent(data) {
@@ -1159,14 +1073,11 @@
data: {
"classId": parseInt(this.classId)
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
.then(res => {
// console.log('考试周班状态下,学员的信息', this.classId, res, );
// this.userMsg = res.user
// list = studentList
if (res.code == 0) {
res.result.forEach(item => {
item.task0Score ? '' : item.task0Score = 0 // 固定任务
@@ -1284,7 +1195,6 @@
var data = {
"id": this.certificate.id //证书id
}
// console.log('证书提交数据',data,this.performanceScore.userScore);
$http.request({
url: "common/class/generateCertificateClass",
method: "POST",
@@ -1934,11 +1844,11 @@ uni.navigateTo({
})
await $http.request({
url: "common/class/getClassInfo",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
method: "POST",
data: {
"classId": this.classId // 班类型 0小班 1联合班 2精英班
},
header: { //默认 无 说明:请求头
header: {
'Content-Type': 'application/json'
},
})
@@ -1948,25 +1858,8 @@ uni.navigateTo({
if (res.code == 0) {
this.isHave = res.result.isJoin
this.thisClass = res.result.class
const nowTime = new Date().getTime();
console.log("nowTime at line 107:", nowTime, this.thisClass.startTime);
// var studyTime =
// Number(nowTime - new Date(this.thisClass.startTime).getTime()) / (1000 * 60 * 60 * 24) / 7;
// console.log("studyTime at line 108:", Math.ceil(studyTime));
// this.currentStudyNumber = Math.ceil(studyTime);
// if (this.thisClass.state == '0') {
// this.tabId = '0'
// } else {
// this.tijiaoTitleId = '0'
// this.tabId = '3'
// console.log('-------------------+');
// }
const nowTime = new Date().getTime();
this.admins.list = res.result.admins
this.admins.monitor = {}
this.admins.dmonitor = {}
@@ -1985,16 +1878,15 @@ uni.navigateTo({
this.admins.learner = item
}
if (item.role == '4') {
// console.log('this.admins.counter',this.admins.counter);
this.admins.scorer.push(item)
}
// if (item.role == '5') {
// // console.log('this.admins.counter',this.admins.counter);
// this.admins.counter.push(item)
// }
})
}
//考试周日期和剩余
this.examStartTime = res.result.examStartTime;
this.examEndTime = res.result.examEndTime;
this.examEndDays = res.result.examEndDays;
this.classModel = res.result.classModel
this.courses = res.result.courses

View File

@@ -28,6 +28,12 @@
<view class="welComeText">
<text> 班内职务{{ getRoleName }} </text>
</view>
<span v-if="examStartTime&&examEndTime" style=" font-size: 26rpx; color: #999; font-weight: normal; display: block; padding:20rpx 0; line-height: 34rpx;">
学习日期{{thisClass.startTime.substring(0,10)}} {{thisClass.studyEndTime.substring(0,10)}}<br/>
考试周日期{{examStartTime.substring(0,10)}} {{examEndTime.substring(0,10)}}
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">距离考试周开始还有{{examEndDays}}</b>
<b style="font-size: 26rpx;line-height: 34rpx;color: red; font-weight: normal; display: block;">(考试周开始后无法提交答案)</b>
</span>
</view>
<view class="optionsBtn daikaibtn" v-show="thisClass.state == '0'">
<view class="flex_box">
@@ -705,6 +711,9 @@ export default {
color: "#258feb",
},
classStatus: false, //点击结班改变按钮状态
examStartTime: '',
examEndTime: '',
examEndDays: ''
};
},
onLoad(e) {
@@ -1376,6 +1385,11 @@ export default {
);
}
//考试周日期和剩余
this.examStartTime = res.result.examStartTime;
this.examEndTime = res.result.examEndTime;
this.examEndDays = res.result.examEndDays;
this.admins.list = res.result.admins;
this.admins.monitor = {};
this.admins.dmonitor = {};
@@ -1456,7 +1470,7 @@ export default {
.welComeText {
font-size: 28rpx;
padding: 20rpx 0;
padding: 10rpx 0 0;
color: #e58d44;
}

View File

@@ -2,14 +2,7 @@
<view style="min-height: 100vh; background-color: #f6f6f8;">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="我的班级">
</z-nav-bar>
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
</view> -->
<z-nav-bar title="我的班级"></z-nav-bar>
<view class="containerBg" style="background-color: #f6f6f8;">
<view class="subCate flex" v-if="subList1.length> 0">
<text :class="['item',subTabId == item.id ? 'active' : '']" v-for="(item, index) in subList1"
@@ -42,10 +35,7 @@
<view class="jianjie">
目标学员人数{{item.number}}
</view>
<!-- <view class="jianjie" v-html="item.content">
</view> -->
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -59,7 +49,6 @@
<view class="newBox" v-if="learningClassList.length > 0">
<view class="item flexbox" v-for="(item, index) in learningClassList" :key="index"
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" v-if="item.icon != ''">
<image :src="item.icon" mode="aspectFit"></image>
</view>
@@ -76,12 +65,12 @@
</text>
</view>
<view class="jianjie">
目标学员人数{{item.number}}
目标学员人数{{item.number}} <br/>
<text v-if="item.startTime&&item.studyEndTime">学习日期{{(item.startTime).split('T')[0]}}{{(item.studyEndTime).substring(0, 10)}}<br/></text>
<text v-if="item.examStartTime&&item.examEndTime">考试周日期{{item.examStartTime.substring(0, 10)}}{{(item.examEndTime).substring(0, 10)}}</text>
</view>
<!-- <view class="jianjie" v-html="item.content">
</view> -->
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -95,7 +84,6 @@
<view class="newBox" v-if="examingClassList.length > 0">
<view class="item flexbox" v-for="(item, index) in examingClassList" :key="index"
@click="onPageJump('/pages/miniClass/classInfo',item.id)">
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" v-if="item.icon != ''">
<image :src="item.icon" mode="aspectFit"></image>
</view>
@@ -112,12 +100,11 @@
</text>
</view>
<view class="jianjie">
目标学员人数{{item.number}}
目标学员人数{{item.number}} <br/>
<text v-if="item.startTime&&item.studyEndTime">学习日期{{(item.startTime).split('T')[0]}}{{(item.studyEndTime).substring(0, 10)}}<br/></text>
<text v-if="item.examStartTime&&item.examEndTime">考试周日期{{item.examStartTime.substring(0, 10)}}{{(item.examEndTime).substring(0, 10)}}</text>
</view>
<!-- <view class="jianjie" v-html="item.content">
</view> -->
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -153,10 +140,7 @@
<view class="jianjie">
目标学员人数{{item.number}}
</view>
<!-- <view class="jianjie" v-html="item.content">
</view> -->
<view class="btn_box">
<!-- <text @click="enterClass" v-show="item.state == '0'">一键加入</text> -->
<text class="seeInfo">进入班级</text>
</view>
</view>
@@ -508,7 +492,8 @@
@include mshadow(10px, 1) .imgcontainer {
display: block;
width: 110rpx;
width: 90rpx;
flex-shrink: 0;
margin-right: 20rpx;
// background-size: cover;
// background-position: center;
@@ -526,6 +511,7 @@
.btn_box {
text-align: right;
margin-top:20rpx;
text {
border-radius: 20rpx;
@@ -544,18 +530,10 @@
}
}
.buyItems {
width: 60%;
}
.jianjie {
line-height: 30rpx;
height: 60rpx;
overflow: hidden;
overflow: hidden !important;
line-height: 36rpx;
margin-top: 10rpx;
font-size: 24rpx;
@include bov();
color: #9c9c9c;
}

View File

@@ -129,6 +129,105 @@
</view>
</view>
</view>
<!-- 限时秒杀 -->
<view class="seckillBox" v-if="seckillList.length > 0">
<view class="hightLightTitleBox">
<text>限时秒杀</text>
</view>
<view class="seckill">
<view class="borderbb">
<view class="main">
<view class="ftitle">
<text>天天秒杀 时时返积分</text>
</view>
<scroll-view
class="scroll-view_H"
scroll-x="true"
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<!-- <view class=""> -->
<view
class="item"
v-for="(item, index) in seckillList"
:key="index"
@click="goGoodsDetail(item, 1)"
>
<view class="imgcontainer" style="position: relative">
<view v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
style="z-index: 10;position: absolute;top: 10rpx;left: 10px;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4rpx;box-sizing: border-box;">
VIP优惠</view>
<image :src="item.productImages" mode="aspectFit"></image>
</view>
<view class="name">
{{ item.productName }}
</view>
<view>
<text
class="price"
v-if="
item.isVipPrice == 1 &&
item.vipPrice != 0 &&
item.vipPrice != null
"
>
<text
style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ item.vipPrice }}</text
>
<text
style="
color: #8a8a8a;
font-size: 10px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(item.price) }}</text
>
</text>
<text
v-else-if="item.activityPrice && item.activityPrice > 0"
class="price"
>
<text
style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ item.activityPrice }}</text
>
<text
style="
color: #8a8a8a;
font-size: 10px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(item.price) }}</text
>
</text>
<text v-else class="price" style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ Number(item.price) }}</text
>
<view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
<!-- 正在学习 -->
<view class="" style="padding: 0 5px" v-if="learnList.length > 0">
<view class="learnBox">
@@ -211,17 +310,6 @@
</view>
</view>
</swiper-item>
<!-- <swiper-item v-for="(item, index) in classList" :key="index">
<view class="classItem flex_box" @click="onPageJump('/pages/miniClass/classInfo',item.id)">
<view class="img" style="overflow: hidden;">
<image v-if="item.icon && item.icon != ''" :src="item.icon" mode="aspectFit"></image>
<image v-else src="@/static/my_04.png" mode="widthFix"></image>
</view>
<view class="txt555">
{{item.title}}
</view>
</view>
</swiper-item> -->
</swiper>
</view>
</view>
@@ -293,122 +381,7 @@
</view>
</view>
</view>
<!-- 限时秒杀 -->
<view class="seckillBox" v-if="seckillList.length > 0">
<view class="hightLightTitleBox">
<text>限时秒杀</text>
</view>
<view class="seckill">
<view class="borderbb">
<view class="main">
<view class="ftitle">
<text>天天秒杀 时时返积分</text>
</view>
<scroll-view
class="scroll-view_H"
scroll-x="true"
style="
display: flex;
align-items: center;
justify-content: space-between;
"
>
<!-- <view class=""> -->
<view
class="item"
v-for="(item, index) in seckillList"
:key="index"
@click="goGoodsDetail(item, 1)"
>
<view class="imgcontainer" style="position: relative">
<view v-if="item.isVipPrice==1&&item.vipPrice!=0&&item.vipPrice!=null"
style="z-index: 10;position: absolute;top: 10rpx;left: 10px;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4rpx;box-sizing: border-box;">
VIP优惠</view>
<image :src="item.productImages" mode="aspectFit"></image>
</view>
<view class="name">
{{ item.productName }}
</view>
<view>
<!-- v-if="
item.isVipPrice == 1 &&
item.vipPrice != 0 &&
item.vipPrice != null
" -->
<text
class="price"
v-if="
item.isVipPrice == 1 &&
item.vipPrice != 0 &&
item.vipPrice != null
"
>
<text
style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ item.vipPrice }}</text
>
<text
style="
color: #8a8a8a;
font-size: 10px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(item.price) }}</text
>
</text>
<text
v-else-if="item.activityPrice && item.activityPrice > 0"
class="price"
>
<text
style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ item.activityPrice }}</text
>
<text
style="
color: #8a8a8a;
font-size: 10px;
margin-left: 4px;
font-weight: bold;
text-decoration: line-through;
"
>¥{{ Number(item.price) }}</text
>
</text>
<text v-else class="price" style="color: #e97512; font-size: 12px; font-weight: bold"
>¥{{ Number(item.price) }}</text
>
<view>
</view>
</view>
<!-- <view class="fall">
<text class="mprice"
>¥{{
item.activityPrice && item.activityPrice > 0
? item.activityPrice
: item.price
}}</text
>
</view> -->
</view>
<!-- </view> -->
</scroll-view>
</view>
</view>
</view>
</view>
<!-- 新闻播报 -->
<view class="fourBox" v-if="newsList.length > 0">
<view class="newsBox flexbox">

View File

@@ -107,7 +107,7 @@
// 返回true表示校验通过返回false表示不通过
// 过滤第一层先判断输入为不为空因为required: false不是必填项所以为空应该返回true
if (value) {
return this.$u.test.mobile(value);
return /^\d{5,15}$/.test(value);
} else {
return true
}