暂存代码

This commit is contained in:
何江明
2025-05-23 18:03:45 +08:00
parent 8217069b9a
commit a2c87e47bf
313 changed files with 6157 additions and 1102 deletions
+26 -9
View File
@@ -79,11 +79,11 @@
<!-- 积分兑换,红包抽奖 -->
<view class="min_card_warp">
<!-- 积分兑换 -->
<view class="min_card_item min_card_item_jf" @click="jumpPrdference">
<view class="min_card_item min_card_item_jf" @click="jumpIntegral">
<up-image src="/static/home/min_card_jfdh.png" width="60" height="14" bgColor="#f1f6ff00" ></up-image>
<view class="min_card_item_content">
<view class="content_msg">
<view>好礼随心兑</view>
<view>好物随心兑</view>
<view style="display: flex;align-items: center;">
兑换
<view style="margin-top: 6rpx;margin-left: 4rpx;"><up-image src="/static/common/right_y.png" width="10" height="10" bgColor="#f1f6ff00"></up-image></view>
@@ -111,7 +111,7 @@
<view class="product_comm yx_warp" v-if="yxProduct && yxProduct.length!==0" @click="jumpPrdference">
<view class="product_title">
<view class="product_title_left">
<text class="product_title_z">德商汇优选</text>
<text class="product_title_z">平价专区</text>
<text class="product_title_zk">4折起 ></text>
</view>
<view class="product_title_f" style="font-weight: bold; color: #999999FF;">
@@ -182,8 +182,8 @@
<script>
import choiceness from '@/components/choiceness/choiceness.vue';
import { searchList } from '@/api/product.js';
import { getCascadeCategory,checkAppVersion } from '@/api/common.js';
import { SEARCH_TYPE } from '@/utils/enumUtils.js'
import { getCascadeCategory,checkAppVersion,getCarouselImage } from '@/api/common.js';
import { SEARCH_TYPE,APP_PAGE_TYPE } from '@/utils/enumUtils.js'
import CustomTabBar from '@/components/custom-tab-bar.vue'; // 引入自定义组件路径可能需要根据项目结构调整
import dayjs from 'dayjs';
import { comparisonVersionHandler } from '@/utils/index.js';
@@ -193,8 +193,8 @@
data() {
return {
swiperList:[
'/static/home/banner01.png',
'/static/home/banner04.png',
// '/static/home/banner01.png',
// '/static/home/banner04.png',
],
currentNum:0,
sortList:[],
@@ -260,16 +260,16 @@
const time2 = dayjs();
const diff = time2.diff(time1);
if(!versionUpdateTime || diff > 5 * 60 * 1000){
console.log("进来了...");
this.platformType = appUpdate == 'android' ? 'ANDROID' : 'IOS';
this.checkUpdate(); // 判断是否需要更新
}else{
console.log("没有大于");
console.log("不需要更新...");
}
// #endif
this.getSortList();
this.querySearchList(SEARCH_TYPE.SOMETHING);// 好物专区
this.querySearchList(SEARCH_TYPE.EXPLOSIVE);// 爆单专区
this.getCarouselImage();
},
mounted() {
},
@@ -366,6 +366,23 @@
plus.runtime.openURL(updateApkObj.downloadUrl);
}
},
// 查询轮播图
async getCarouselImage(){
const params={
pageUi:APP_PAGE_TYPE.HOME,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
jumpIntegral(){
uni.navigateTo({
url:'/pages/pointsRedemption/pointsRedemption',
})
},
jumpTurntable(){
uni.navigateTo({
url:'/pages/turntable/turntable?backPath=home',
+25 -29
View File
@@ -1,18 +1,7 @@
<template>
<view class="invite_friends_warp">
<!-- <view class="invite_img">
<view class="invite_content_img">
<view>
<view class="invite_content_img_title">邀请你</view>
<view class="invite_content_img_msg">扫一扫,好物轻松购</view>
</view>
<view>
<up-image src="/static/invite/bg.png" width="60" height="60" bgColor="#f1f6ff00"></up-image>
</view>
</view>
</view> -->
<view class="invite_img">
<up-image src="/static/invite/bg.png" width="100%" height="460" bgColor="#f1f6ff00" shape="square" radius=10></up-image>
<up-image :loading="imageLoading" :src="inviteImage" width="100%" height="460" bgColor="#f1f6ff00" shape="square" radius=10></up-image>
</view>
<view class="invite_but">
<view class="save_but">
@@ -24,37 +13,46 @@
</template>
<script>
import { base64 } from '@/utils/inviteBase64.js';
import { getSharePoster,generateSharePoster } from '@/api/common.js';
export default {
data() {
return {
inviteImage:null,
imageLoading:false,
}
},
mounted() {
this.getSharePoster();
},
methods: {
// 保存图片
// async saveImage(){
// const shareImagesObj = this.shareImagesArr[this.shareImagesIndex];
// const params = {
// id:this.shareId,
// imgId:shareImagesObj.id,
// }
// const response = await uni.$httpHeader.post(mergeImage,params);
// this.saveHeadImgFile(response.data);
// },
// 查询分享模版
async getSharePoster(){
this.imageLoading = true;
const resp = await getSharePoster();
if(resp && resp.bizcode === 100){
const data = resp.data[0];
// 生成分享图
const generateResp = await generateSharePoster({id:data.id});
if(generateResp && generateResp.bizcode === 100){
this.inviteImage = generateResp.data;
}
}
this.imageLoading = false;
},
saveBaseImgFile() {
uni.showLoading({
title: '保存中...',
})
const currentBase64 = base64;
const currentBase64 = this.inviteImage;
const bitmap = new plus.nativeObj.Bitmap('base64')
bitmap.loadBase64Data(currentBase64, () => {
const url = '_doc/' + new Date().getTime() + '.png'
bitmap.save(
url,
{
overwrite: false, // 是否覆盖
// quality: 'quality' // 图片清晰度
overwrite: false, // 是否覆盖
},
(i) => {
uni.saveImageToPhotosAlbum({
@@ -91,8 +89,6 @@
}
)
}
}
}
</script>
@@ -13,7 +13,7 @@
placeholder="请输入店铺名称"
clearable
border="none"
v-model="form.name"
v-model="form.storeName"
></up-input>
</view>
<view class="card_comm card_hang_comm">
@@ -80,6 +80,7 @@
<view class="add_but" @click="addFun">
提交
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
@@ -91,7 +92,7 @@
data() {
return {
form:{
name:'',// 店铺名称
storeName:'',// 店铺名称
address:"",// 店铺地址
name:null,
mobile:null,
@@ -159,7 +160,53 @@
methods: {
// 确认提交
addFun(){
console.log("确认提交....");
const params = {
...this.form,
}
if(!params.storeName){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入店铺名称",
});
return;
}
if(!params.address){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入店铺地址",
});
return;
}
if(!params.name){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入真实姓名",
});
return;
}
if(!params.mobile){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入手机号码",
});
return;
}
if(!params.number){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入证件号码",
});
return;
}
this.$refs.uToastRef.show({
type: 'success',
message: "提交成功",
});
setTimeout(()=>{
uni.switchTab({
url: '/pages/mine/mine',
});
},1000)
}
}
}
+9 -9
View File
@@ -108,10 +108,10 @@
<view class="content_">
<view class="content_1">企业入驻</view>
<view class="content_2">请联系负责人</view>
<view class="content_3">15888880123</view>
<view class="content_3">139 2278 6999</view>
</view>
<view class="but_">
<view class="but_copy" @click="copyMobile('15888880123')">复制号码</view>
<view class="but_copy" @click="copyMobile('13922786999')">复制号码</view>
<view class="but_close" @click="brandShow=false;">取消</view>
</view>
</view>
@@ -124,7 +124,7 @@
</view>
<view class="content_">
<view class="content_1">联系客服</view>
<view class="content_3">13888888888</view>
<view class="content_3">138 8888 8888</view>
</view>
<view class="but_">
<view class="but_copy" @click="copyMobile('13888888888')">复制号码</view>
@@ -279,7 +279,8 @@
{
id:8,
title:"商学院资讯",
url:'/static/mine/tool_sxy.png'
url:'/static/mine/tool_sxy.png',
path:"/pages/news/news"
},
{
id:11,
@@ -369,10 +370,10 @@
jumpEnter(type){
// 商家入驻
if(type === "merchant"){
// uni.navigateTo({
// url:'/pages/merchant_settlement/merchant_settlement',
// })
this.openShow = true;
uni.navigateTo({
url:'/pages/merchant_settlement/merchant_settlement',
})
// this.openShow = true;
}else if(type === "brand"){
// 企业/品牌入驻
// uni.navigateTo({
@@ -410,7 +411,6 @@
}
},
beforeDestroy(){
console.log('beforeDestry');
this.statisticsObj={
unPayNum:0,//待支付数量
unSentNum:0,//待发货数量
@@ -3,33 +3,14 @@
<Header :leftTitle="$t('authentication.title')" left-path-type="switchTab" left-path="/pages/mine/mine"/>
<view class="authentication_ok_content" v-if="currentUserData && Object.keys(currentUserData).length !==0">
<view class="authentication_result">
<!-- <view class="result_title">您的实名认证</view>
<view class="result_value">{{getValue(CERT_STATUS_OPTION,currentUserData.certStatus)}}</view> -->
<up-image src="/static/mine/auth_ok.png" mode="widthFix" shape="circle" width="140" height="140" bgColor="#f1f6ff00" :fade="true" duration="450"></up-image>
<view class="result_value">{{getValue(CERT_STATUS_OPTION,currentUserData.certStatus)}}</view>
</view>
<!-- <view class="authentication_info">
<view class="info_item">
<text class="info_item_title">证件姓名:</text>
<text class="info_item_value">{{currentUserData.name}}</text>
<view v-if="currentUserData.certStatus === 3" class="reauthentication_warp">
<view class="reauthentication_but_warp" @click="reauthenticationFun">
重新认证
</view>
<view class="info_item">
<text class="info_item_title">证件类型:</text>
<text class="info_item_value">{{getValue(CERT_OPTION,currentUserData.certType)}}!</text>
</view>
<view class="info_item">
<text class="info_item_title">证件正面:</text>
<view class="info_item_value">
<up-image :src="currentUserData.certFimg" mode="widthFix" width="100%" height="140" bgColor="#f1f6ff00" :fade="true" duration="450"></up-image>
</view>
</view>
<view class="info_item">
<text class="info_item_title">证件背面:</text>
<view class="info_item_value">
<up-image :src="currentUserData.certBimg" mode="widthFix" width="100%" height="140" bgColor="#f1f6ff00" :fade="true" duration="450"></up-image>
</view>
</view>
</view> -->
</view>
</view>
<view v-else class="not_order_warp">
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
@@ -68,10 +49,17 @@
const result = await getUserInfo();
if(result && result.bizcode === 100){
const data = result.data;
console.log("data",data);
this.currentUserData = result.data || {};
}
},
/**
* 重新认证
*/
reauthenticationFun(){
uni.navigateTo({
url:'/pages/mine_authentication/mine_authentication',
})
}
}
}
</script>
@@ -101,6 +89,19 @@
line-height: 80rpx;
}
}
.reauthentication_warp{
display: grid;
justify-content: center;
.reauthentication_but_warp{
margin-top: 100rpx;
border: 1rpx solid $app-zt-color;
color: $app-zt-color;
padding: 8rpx 10rpx;
width: 200rpx;
border-radius: 10rpx;
text-align: center;
}
}
.authentication_info{
background: #F8F8F8;
border-radius: 10rpx;
+23 -3
View File
@@ -29,6 +29,7 @@
添加银行卡
</view>
</view>
<up-toast ref="uToastRef"></up-toast>
</view>
</template>
@@ -36,23 +37,42 @@
import { getBankList,bindBank,unbind } from '@/api/bank.js';
import { encipherBankNumber } from '@/utils/index.js';
import Header from '@/components/header.vue';
import { getUserInfo } from '@/api/auth.js'
export default {
components:{Header},
data() {
return {
bankList:[],
currentUserData:{},
}
},
onLoad() {
this.getBankList();
this.getUserInfo();
},
methods: {
encipherBankNumber,
jumpAddBank(){
uni.navigateTo({
url:'/pages/mine_bank_add/mine_bank_add',
})
const currentUserData = this.currentUserData;
if(currentUserData && Object.keys(currentUserData).length !==0 && currentUserData.certStatus && currentUserData.certStatus !== 0){
uni.navigateTo({
url:'/pages/mine_bank_add/mine_bank_add',
})
}else{
this.$refs.uToastRef.show({
type: 'error',
message: "还未进行实名认证,认证完才能绑定银行卡信息",
});
}
},
// 查询用户等级
async getUserInfo(){
const result = await getUserInfo();
if(result && result.bizcode === 100){
const data = result.data;
this.currentUserData = result.data || {};
}
},
async getBankList(){
const resp = await getBankList();
+76 -8
View File
@@ -33,7 +33,7 @@
</view>
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{'height': 'calc(100vh - 500rpx)'}">
<view class="team_item" v-for="(item,index) in listData" :key="item.id" v-if="listData && listData.length">
<view class="team_header" @click="jumpNextLevel(item)">
<view class="team_header" @click="queryLowerFun(item,index)">
<view class="header_left_">
<view style="margin-top: 10rpx;">
<up-image :src="item.userUrl || '/static/logo.png'" width="50" height="50" bgColor="#f1f6ff00" shape="circle" radius='16'></up-image>
@@ -49,7 +49,31 @@
</view>
</view>
<view>
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16'></up-image>
<up-image src="/static/common/right_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16' v-if="!item.isOpen"></up-image>
<up-image src="/static/common/buttom_x.png" width="20" height="20" bgColor="#f1f6ff00" radius='16' v-else></up-image>
</view>
</view>
<view style="padding: 10rpx;" v-if="item.isOpen && item.lowerData">
<view class="team_lower">
<view class="team_lower_item">
<view class="title_">总订单金额</view>
<view class="val_">{{item.lowerData.teamAmount}}</view>
</view>
<view class="team_lower_fg"></view>
<view class="team_lower_item">
<view class="title_">直推人数</view>
<view class="val_">{{item.lowerData.ztCount}}</view>
</view>
<view class="team_lower_fg"></view>
<view class="team_lower_item">
<view class="title_">间推人数</view>
<view class="val_">{{item.lowerData.jtCount}}</view>
</view>
<view class="team_lower_fg"></view>
<view class="team_lower_item">
<view class="title_">总人数</view>
<view class="val_">{{item.lowerData.teamCount}}</view>
</view>
</view>
</view>
</view>
@@ -141,7 +165,8 @@
// 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用
const newData = await this.fetchData();
if(newData.entitys && newData.entitys.length !==0){
this.listData = [...this.listData, ...newData.entitys]; // 将新数据添加到列表中
const data = newData.entitys.map(item=>({...item,isOpen:false}));
this.listData = [...this.listData, ...data]; // 将新数据添加到列表中
this.form.page++; // 页码加1
}
} catch (error) {
@@ -165,6 +190,26 @@
// 当滚动到底部时触发的方法
loadMore() {
this.loadData(); // 加载更多数据
},
/**
* 查询团队下级数据
* @param {Object} item
* @param {Object} index
*/
async queryLowerFun(item,index){
const data = this.listData[index];
const type = !data.isOpen
if(type){
const params={
userId : item.userId,
}
const resp = await getJuniorSummary(params);
if(resp && resp.bizcode === 100){
data.lowerData = resp.data;
}
}
data.isOpen = type;
this.listData[index] = data;
}
}
}
@@ -244,9 +289,6 @@
margin-bottom: 10rpx;
}
.team_item{
padding: 20rpx;
background: #FFFFFF;
border-radius: 30rpx;
margin-bottom: 20rpx;
}
.team_header{
@@ -254,7 +296,9 @@
align-content: center;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
border-radius: 8rpx;
background: #FFFFFF;
padding: 20rpx;
.header_left_{
display: flex;
align-items: inherit;
@@ -276,7 +320,31 @@
margin-top: 10rpx;
}
}
.team_lower{
display: flex;
justify-content: space-between;
align-items: center;
background: #E9E9E9;
border-radius: 4px;
padding: 30rpx 20rpx;
.team_lower_fg{
border-right: 1px solid rgba(0,0,0,0.26);
height: 36rpx;
}
.team_lower_item{
text-align: center;
}
.title_{
font-size: 10px;
color: rgba(0,0,0,0.6);
}
.val_{
font-weight: 500;
font-size: 14px;
color: rgba(0,0,0,0.9);
margin-top: 20rpx;
}
}
.team_content{
border-top: 1rpx solid #EEEEEE;
padding: 20rpx 0 0;
+93 -1
View File
@@ -79,7 +79,7 @@
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请退款</view> -->
<view class="operate_comm operate_but_2" v-if="item.status === ORDER_TYPE.NOT_RECEIVE" @click="confirmReceiptOk(item)">确认收货</view>
<!-- <view class="operate_comm operate_but_3" v-if="item.status === ORDER_TYPE.UNSHIPPED">提醒发货</view> -->
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.COMPLETED">申请售后</view> -->
<view class="operate_comm operate_but_1" v-if="[ORDER_TYPE.NOT_RECEIVE,ORDER_TYPE.UNSHIPPED].includes(item.status)" @click="afterShow=true;">申请售后</view>
<!-- <view class="operate_comm operate_but_1" v-if="item.status === ORDER_TYPE.AFTER_SALE">查看售后</view> -->
<!-- <view class="operate_comm operate_but_1" v-if="[ORDER_TYPE.COMPLETED].includes(item.status)">删除记录</view> -->
<!-- <view class="operate_comm operate_but_3" v-if="[ORDER_TYPE.COMPLETED,ORDER_TYPE.CANCELED].includes(item.status)">再次购买</view> -->
@@ -143,6 +143,51 @@
</view>
</view>
</up-modal>
<!-- 申请售后 -->
<up-modal :show="afterShow" :showConfirmButton = "false">
<view class="slot-content">
<view class="close_warp" @click="afterShow=false;">
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view class="content_">
<view class="content_1">售后联系方式</view>
<view class="content_2">如遇退/换货等问题,请联系客服处理</view>
<view class="content_3">
<view style="margin-left: 20rpx;">
<up-image src="/static/common/kf_dh.png" width="40" height="40" bgColor="#f1f6ff00"></up-image>
</view>
<view class="content_info">
<view class="content_info_title">客服电话</view>
<view class="content_info_mobile">
139 2278 6999
<view style="margin-left: 20rpx;">
<up-image src="/static/common/copy_c.png" width="14" height="14" bgColor="#f1f6ff00" @click="copyMobile(13922786999)"></up-image>
</view>
</view>
</view>
</view>
<view class="content_3">
<view style="margin-left: 20rpx;">
<up-image src="/static/common/kf_wx.png" width="40" height="40" bgColor="#f1f6ff00"></up-image>
</view>
<view class="content_info">
<view class="content_info_title">客服微信</view>
<view class="content_info_mobile">
139 2278 6999
<view style="margin-left: 20rpx;">
<up-image src="/static/common/copy_c.png" width="14" height="14" bgColor="#f1f6ff00" @click="copyMobile(13922786999)"></up-image>
</view>
</view>
</view>
</view>
</view>
<view class="but_">
<!-- <view class="but_copy" @click="copyMobile('13922786999')">复制号码</view> -->
<view class="but_close" @click="afterShow=false;">确定</view>
</view>
</view>
</up-modal>
</view>
</template>
@@ -225,6 +270,7 @@
},
loading: false, // 加载状态标志
openShow:false,
afterShow:false,// 售后申请
}
},
onLoad(options) {
@@ -237,6 +283,10 @@
getValue,
formatDate1,
copyData,
copyMobile(mobile){
copyData(mobile);
this.afterShow = false;
},
jumpLeft(){
uni.switchTab({
url: '/pages/mine/mine',
@@ -286,6 +336,7 @@
if(newData.entitys && newData.entitys.length !==0){
this.orderList = [...this.orderList, ...newData.entitys]; // 将新数据添加到列表中
this.form.page++; // 页码加1
console.log("this.orderList",this.orderList);
}
} catch (error) {
console.error('加载数据失败:', error);
@@ -517,4 +568,45 @@
font-weight: bold;
font-size: 18rpx;
}
.content_2{
font-size: 26rpx;
color: rgba(0,0,0,0.4);
margin-bottom: 40rpx;
}
.content_3{
display: flex;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0,0,0,0.06);
border-radius: 12rpx;
.content_info{
display: grid;
margin-left: 20rpx;
text-align: left;
}
.content_info_title{
font-weight: 600;
font-size: 26rpx;
color: rgba(0,0,0,0.9);
line-height: 38rpx;
}
.content_info_mobile{
font-size: 30rpx;
color: rgba(0,0,0,0.4);
display: flex;
}
}
.but_{
display: flex;
justify-content: center;
margin-top: 40rpx;
}
.but_close{
background: #F24A00;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(242,74,0,0.5);
border-radius: 41rpx;
width: 60%;
padding: 20rpx 0;
font-size: 30rpx;
color: #FFFFFF;
}
</style>
+46 -13
View File
@@ -137,7 +137,7 @@
</view>
<!-- 支付方式 -->
<view class="order_way_warp" @click="wayShow = true;" v-if="orderInfo.status === ORDER_TYPE.UNPAID">
<view class="order_way_warp" @click="wayShowFun(true)" v-if="orderInfo.status === ORDER_TYPE.UNPAID">
<view>支付方式</view>
<view class="order_way_right">
{{getValue(wayOption,wayForm.payway)}}
@@ -167,17 +167,20 @@
v-model="wayForm.payway"
placement="column"
>
<view class="way_item" v-for="item in wayOption" :key="item.type">
<view class="way_item_">
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
<view class="way_item_val">{{item.name}}<text v-if="item.balance">&nbsp;&nbsp;({{item.balance}})</text></view>
<view v-for="item in wayOption" :key="item.id" style="margin-bottom: 10rpx;">
<view class="way_item">
<view class="way_item_">
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
<view class="way_item_val">{{item.name}}<text v-if="item.balance">&nbsp;&nbsp;(¥{{item.balance}})</text></view>
</view>
<up-radio
:name="item.type"
activeColor="#FF7C41"
>
</up-radio>
</view>
<up-radio
:name="item.type"
activeColor="#FF7C41"
>
</up-radio>
</view>
<view class="balance_comm_msg" v-if="item.type === 'balance' && isShowBalance">当前现金余额不足,如需支付请前往充值</view>
</view>
</up-radio-group>
<view class="popup_but" @click="wayShow = false;">
确认
@@ -218,13 +221,19 @@
wayShow:false,
wayOption:[],// 支付选项
height:'180rpx',
isShowBalance:false,
}
},
onLoad(options) {
const id = options.id;
this.id = id ? parseInt(id,10) : 0;
this.getOrderInfo();
this.getWayOption();
const payOpen = options.payOpen;
// 支付弹框
if(payOpen && payOpen !=="null"){
this.getWayOption();
this.wayShow = payOpen;
}
},
methods: {
getValue,
@@ -237,10 +246,26 @@
url:"/pages/mine_order/mine_order?type="+this.orderInfo.status,
})
},
wayShowFun(type){
if(type){
this.getWayOption();
}
this.wayShow=type;
},
async getWayOption(){
const result = await getSupportPay();
if(result && result.bizcode === 100){
this.wayOption = result.data;
const data = result.data || [];
const amount = this.orderInfo.sumAmount;
let flag = data.some(item => ['wechat','alipay'].includes(item.type));
// 没有支付宝和微信支付
if(flag){
this.isShowBalance = false;
}else{
const balanceFlag = data.some(item => item.type === "balance" && item.balance < amount);
this.isShowBalance = balanceFlag;
}
this.wayOption = data;
}
},
// 查询订单详情
@@ -347,6 +372,14 @@
this.form.page = 1;
this.loadData();
}
},
/**
* 去充值
*/
goRechargeFun (item){
uni.navigateTo({
url:"/pages/mine_purse_recharge/mine_purse_recharge?category=balance&amount="+item.balance+"&back=orderInfo&id="+this.id,
})
}
}
}
@@ -3,7 +3,7 @@
<Header
:leftTitle="$t('purse.recharge.title')"
left-path-type="navigateTo"
left-path="/pages/mine_purse/mine_purse"
:left-path="leftPath"
style="background-color: #FFFFFF;"
/>
<view class="purse_recharge_cntent">
@@ -40,7 +40,6 @@
>
<view :class="index+1 < wayOption.length ? 'way_item way_item_but':'way_item'" v-for="(item,index) in wayOption" :key="item.id">
<view class="way_item_">
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
<view class="way_item_val">{{item.name}}<text v-if="item.balance">&nbsp;&nbsp;({{item.balance}})</text></view>
</view>
<up-radio
@@ -77,6 +76,7 @@
},
wayOption:[],
proAmount:0,
leftPath:'/pages/mine_purse/mine_purse',
}
},
onLoad(option) {
@@ -88,6 +88,17 @@
if(amount && amount !== 'null'){
this.proAmount = amount;
}
const back = option.back;
if(back && back !== 'null'){
if(back === "submit"){
const id = option.id;
this.leftPath = "/pages/order_submit/order_submit?payOpen=true&ids="+id;
}
if(back === "orderInfo"){
const id = option.id;
this.leftPath = "/pages/mine_order_info/mine_order_info?payOpen=true&id="+id;
}
}
},
mounted() {
this.getWayOption();
+256
View File
@@ -0,0 +1,256 @@
<template>
<view class="news_warp">
<Header
leftTitle="商学院"
left-path-type="switchTab"
left-path="/pages/mine/mine"
style="background-color: #FFFFFF;"
/>
<view class="news_content_warp">
<view class="heder_">
<view
v-for="item in titleList"
:key="item.key"
:class="form.type === item.key ? 'heder_item_sel heder_item':'heder_item'"
@click="headerClick(item)"
>
{{item.value}}
</view>
</view>
<view style="padding: 20rpx 0;">
<up-swiper
:list="swiperList"
height="120"
radius="10"
@change="e => currentNum = e.current"
bgColor="#ffffff00"
>
<template #indicator>
<view
class="indicator-num"
>
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
</view>
</template>
</up-swiper>
</view>
</view>
<view class="content_">
<scroll-view scroll-y="true" @scrolltolower="loadMore" style="height:calc(100vh - 560rpx)">
<up-input
placeholder="搜索关键字"
v-model="form.keywork"
prefixIcon="search"
prefixIconStyle="font-size: 22px;color: #909399"
:customStyle="inputCss"
>
<template #suffix>
<view @click="searchTap" class="search_but">
搜索
</view>
</template>
</up-input>
<view class="news_content_item" v-for="item in newsList" :key="item.id" v-if="newsList && newsList.length !==0" @click="jumpInfo(item)">
<view class="news_content_item_title">{{item.title}}</view>
<view v-html="item.content" class="news_content_item_content"></view>
<view class="news_content_item_info">
<view>{{formatDate(item.ctdate)}}</view>
<view class="browses_">
<view>
<up-image src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view style="margin-left: 8rpx;">{{item.browses}}</view>
</view>
</view>
</view>
<view v-else class="not_order_warp">
<up-image src="/static/common/not_order.png" width="80" height="80" bgColor="#f1f6ff00"></up-image>
<view class="not_order_msg_warp">还未发布新闻哦~</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import Header from '@/components/header.vue';
import { NEWS_TYPE,APP_PAGE_TYPE } from '@/utils/enumUtils.js';
import { getCarouselImage } from '@/api/common.js';
import { getNewsList } from '@/api/news.js';
import { formatDate } from '@/utils/index.js'
export default {
components:{Header},
data() {
return {
titleList:NEWS_TYPE,
swiperList:[],
currentNum:0,
form:{
keywork:null,
type:1,
page:1,
pageSize:15,
},
inputCss:{
"height":'68rpx',
"background": "#FFFFFF",
"border-radius": "16rpx",
"border": "0rpx",
"padding": "0 0 0 16px",
},
newsList:[],
newsListTotal:0,
loading:false,
}
},
onLoad(option) {
this.getCarouselImage();
this.loadData();
},
methods: {
formatDate,
// 查询轮播图
async getCarouselImage(){
const params={
pageUi:APP_PAGE_TYPE.NEWS,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
headerClick(item){
this.form.type = item.key;
this.searchTap();
},
// 搜索
searchTap(){
this.newsList = [];
this.form.page = 1;
this.loadData();
},
// 加载数据的方法
async loadData() {
if (this.loading) return; // 如果正在加载,则不重复加载
this.loading = true; // 设置加载状态为true
try {
const newData = await this.fetchData(this.form.page, this.form.pageSize);
if(newData.entitys && newData.entitys.length !==0){
this.newsList = [...this.newsList, ...newData.entitys]; // 将新数据添加到列表中
this.form.page++;
}
} catch (error) {
console.error('加载数据失败:', error);
} finally {
this.loading = false; // 设置加载状态为false
}
},
// 模拟获取数据的方法,实际应用中应该替换为你的数据获取逻辑,例如从服务器获取数据
async fetchData(page, pageSize) {
const form = this.form;
const params = {
page,
pageSize,
type:form.type,
}
if(form.keywork){
params.keywork = form.keywork;
}
const data = await getNewsList(params);
if(data && data.bizcode === 100 && data.data){
return data.data
}else{
return [];
}
},
// 当滚动到底部时触发的方法
loadMore() {
this.loadData(); // 加载更多数据
},
/**
* 跳转到详情
* @param {Object} item
*/
jumpInfo(item){
uni.navigateTo({
url:'/pages/news_info/news_info?id='+item.id,
})
}
}
}
</script>
<style lang="scss" scoped>
.news_warp{
overflow: hidden;
.news_content_warp{
padding: 0 30rpx 30rpx;
}
.heder_{
display: flex;
align-items: center;
.heder_item{
font-weight: 500;
font-size: 32rpx;
color: #666666;
margin-right: 30rpx;
}
.heder_item_sel{
font-weight: bold;
font-size: 36rpx;
color: #000000;
}
}
.content_{
padding: 30rpx;
background: $app-bj;
border-radius: 30rpx 30rpx 0rpx 0rpx;
// height: calc(100vh - 560rpx);
// overflow: auto;
.search_but{
line-height: 68rpx;
background: $app-bt-bj;
border-radius: 16rpx;
font-size: 24rpx;
color: #FFFFFF;
padding: 0 40rpx;
}
.news_content_item{
background: #FFFFFF;
padding: 30rpx;
margin-top: 20rpx;
}
.news_content_item_title{
font-weight: 800;
font-size: 36rpx;
color: #000000;
}
.news_content_item_content{
font-weight: 500;
font-size: 24rpx;
color: #666666;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
margin-top: 10rpx;
}
.news_content_item_info{
margin-top: 30rpx;
display: flex;
justify-content: space-between;
font-weight: 500;
font-size: 28rpx;
color: #666666;
.browses_{
display: flex;
}
}
}
}
</style>
+108
View File
@@ -0,0 +1,108 @@
<template>
<view class="news_info_warp">
<Header
leftTitle=""
left-path-type="navigateTo"
left-path="/pages/news/news"
style="background-color: #FFFFFF;"
/>
<view class="news_info_header_warp">
<view class="title_">{{newsDetail.title}}</view>
<view class="avatar_">
<view>
<up-image :src="newsDetail.avatar_url" width="40" height="40" bgColor="#f1f6ff00" shape="circle"></up-image>
</view>
<view style="margin-left: 12rpx;">{{newsDetail.name}}</view>
</view>
<view class="time_">
<view>{{formatDate(newsDetail.ctdate)}}</view>
<view class="browses_">
<view>
<up-image src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view style="margin-left: 8rpx;">{{newsDetail.browses}}</view>
</view>
</view>
</view>
<view class="news_info_fg_warp"></view>
<view class="news_info_content_warp" v-html="newsDetail.content"></view>
</view>
</template>
<script>
import Header from '@/components/header.vue';
import { getNewsDetail } from '@/api/news.js';
import { formatDate } from '@/utils/index.js';
export default {
components:{Header},
data() {
return {
id:0,
newsDetail:{}
}
},
onLoad(option) {
const id = option.id;
if(id && id !=="null"){
this.id = id;
this.fetchData();
}
},
methods: {
formatDate,
async fetchData() {
const id = this.id;
const params = {
id,
}
const resp = await getNewsDetail(params);
if(resp && resp.bizcode === 100){
this.newsDetail = resp.data || {};
}
},
}
}
</script>
<style lang="scss" scoped>
.news_info_warp{
overflow: hidden;
}
.news_info_header_warp{
padding: 30rpx;
.title_{
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.avatar_{
display: flex;
align-items: center;
margin-top: 20rpx;
}
.time_{
display: flex;
justify-content: space-between;
font-weight: 500;
font-size: 28rpx;
color: #666666;
margin-top: 10rpx;
.browses_{
display: flex;
}
}
}
.news_info_fg_warp{
height: 10rpx;
background-color: $app-bj;
width: 100%;
}
.news_info_content_warp{
padding: 30rpx;
height: calc(100vh - 524rpx);
overflow: auto;
font-size: 28rpx;
color: #333333;
}
</style>
+48 -26
View File
@@ -98,7 +98,7 @@
<!-- 支付方式 -->
<view class="order_way_warp" @click="wayShow = true;">
<view class="order_way_warp" @click="wayShowFun(true)">
<view>支付方式</view>
<view class="order_way_right">
{{getValue(wayOption,orderInfo.paymentMethod)}}
@@ -119,17 +119,21 @@
v-model="orderInfo.paymentMethod"
placement="column"
>
<view class="way_item" v-for="item in wayOption" :key="item.id">
<view class="way_item_">
<!-- <view style="margin-top: 2rpx;"><up-image :src="item.path" width="20" height="20" bgColor="#f1f6ff00"></up-image></view> -->
<view class="way_item_val">{{item.name}}<text v-if="item.balance">&nbsp;&nbsp;({{item.balance}})</text></view>
<view v-for="item in wayOption" :key="item.id" style="margin-bottom: 10rpx;">
<view class="way_item" >
<view class="way_item_">
<view class="way_item_val">{{item.name}}<text v-if="item.balance">&nbsp;&nbsp;({{item.balance}})</text></view>
</view>
<view v-if="item.type === 'balance' && isShowBalance" class="go_balance_comm_warp" @click="goRechargeFun(item)">去充值</view>
<up-radio
v-else
:name="item.type"
activeColor="#03AD27"
>
</up-radio>
</view>
<up-radio
:name="item.type"
activeColor="#FF7C41"
>
</up-radio>
</view>
<view class="balance_comm_msg" v-if="item.type === 'balance' && isShowBalance">当前现金余额不足,如需支付请前往充值</view>
</view>
</up-radio-group>
<view class="popup_but" @click="wayShow=false;">
确认
@@ -193,33 +197,28 @@
shopsIndex:0,// 收件地址数据类型
selectAddress:{},// 收件地址选择
wayOption:[],
// leftPath:'',
// leftPathType:'',
isShowBalance:false,
};
},
onLoad(option) {
const ids = option.ids;
console.log("ids",ids);
if(ids && ids!=="null"){
this.ids = ids;
this.getOrder();
// const idsArr = ids.split(",");
// console.log("idsArr.length",idsArr.length);
// if(idsArr.length >1){
// this.leftPath = "/pages/sort/sort";
// this.leftPathType = "switchTab"
// }else{
// this.leftPath = "/pages/productInfo/productInfo?id="+ids;
// this.leftPathType = "navigateTo"
// }
}
const addressShow = option.addressShow;
if(addressShow && addressShow !=="null"){
this.addressShow = addressShow;
}
// 支付弹框
const payOpen = option.payOpen;
if(payOpen && payOpen !=="null"){
this.getWayOption();
this.wayShow = payOpen;
}
},
mounted() {
this.getWayOption();
},
methods: {
getValue,
@@ -232,10 +231,26 @@
url:"/pages/mine_address_add/mine_address_add?ids="+ids,
})
},
wayShowFun(type){
if(type){
this.getWayOption();
}
this.wayShow=type;
},
async getWayOption(){
const result = await getSupportPay();
if(result && result.bizcode === 100){
this.wayOption = result.data;
const data = result.data || [];
const amount = this.orderInfo.amount;
let flag = data.some(item => ['wechat','alipay'].includes(item.type));
// 没有支付宝和微信支付
if(flag){
this.isShowBalance = false;
}else{
const balanceFlag = data.some(item => item.type === "balance" && item.balance < amount);
this.isShowBalance = balanceFlag;
}
this.wayOption = data;
}
},
async getOrder(){
@@ -437,10 +452,17 @@
this.shopsIndex = index;
},
jumpProductInfo(item){
console.log("item",item);
uni.navigateTo({
url:"/pages/productInfo/productInfo?id="+item.goodsId,
})
},
/**
* 去充值
*/
goRechargeFun (item){
uni.navigateTo({
url:"/pages/mine_purse_recharge/mine_purse_recharge?category=balance&amount="+item.balance+"&back=submit&id="+this.ids,
})
}
}
}
File diff suppressed because one or more lines are too long
+17 -5
View File
@@ -49,22 +49,34 @@
<script>
import { searchList } from '@/api/product.js';
import { SEARCH_TYPE } from '@/utils/enumUtils.js';
import { SEARCH_TYPE,APP_PAGE_TYPE } from '@/utils/enumUtils.js';
import { getCarouselImage } from '@/api/common.js';
export default {
data() {
return {
swiperList:[
'/static/home/banner03.png',
],
swiperList:[],
productList:[],
productListLoading:false,
}
},
onLoad() {
this.getSearchList();
this.getCarouselImage();
},
methods: {
// 查询轮播图
async getCarouselImage(){
const params={
pageUi:APP_PAGE_TYPE.GOOD,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
jumpHome(){
uni.switchTab({
url: '/pages/home/home',
+1 -1
View File
@@ -42,7 +42,7 @@
<view>
</view>
<!-- 销量还需要改 -->
<view>销量1.5万件</view>
<view>销量{{orderInfo.sales}}件</view>
</view>
</view>
+2 -2
View File
@@ -63,7 +63,7 @@
<text>¥</text>
<text style="font-size: 36rpx;">{{item.adPrice}}</text>
</view>
<view>已售9999件</view>
<view>已售{{item.sales}}件</view>
</view>
</view>
</view>
@@ -79,7 +79,7 @@
<text>¥</text>
<text style="font-size: 36rpx;">{{item.adPrice}}</text>
</view>
<view>已售9999件</view>
<view>已售{{item.sales}}件</view>
</view>
</view>
</view>
+15 -8
View File
@@ -71,8 +71,9 @@
</template>
<script>
import { getCascadeCategory } from '@/api/common.js';
import { getCascadeCategory,getCarouselImage } from '@/api/common.js';
import CustomTabBar from '@/components/custom-tab-bar.vue';
import { APP_PAGE_TYPE } from '@/utils/enumUtils.js'
export default {
components:{CustomTabBar},
@@ -83,11 +84,7 @@
current: null, // 预设当前项的值
menuHeight: 0, // 左边菜单的高度
menuItemHeight: 0, // 左边菜单item的高度
bannerList:[
'/static/common/product_def_banner.png',
'/static/common/product_def_banner.png',
'/static/common/product_def_banner.png'
],
bannerList:[],
tabbarList:[],// 左侧的主分类
tabbarContentList:[],// 右侧内容的分类
tabbarContentLoading:false,
@@ -99,8 +96,6 @@
animation: false
})
/*#endif*/
},
onShow() {
const then = this;
this.getSort(0).then(resp=>{
if(resp && resp.length !==0){
@@ -125,11 +120,23 @@
}
}
});
this.getCarouselImage();
},
methods: {
checkCategory(val){
this.selCategory = val;
},
// 查询轮播图
async getCarouselImage(){
const params={
pageUi:APP_PAGE_TYPE.SORT,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.bannerList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
jumpSearch(item){
let path = "/pages/search/search";
if(item && Object.keys(item).length !==0){
+16 -4
View File
@@ -49,22 +49,34 @@
<script>
import { searchList } from '@/api/product.js';
import { SEARCH_TYPE } from '@/utils/enumUtils.js';
import { SEARCH_TYPE,APP_PAGE_TYPE } from '@/utils/enumUtils.js';
import { getCarouselImage } from '@/api/common.js';
export default {
data() {
return {
swiperList:[
'/static/home/banner05.png',
],
swiperList:[],
productList:[],
productListLoading:false,
}
},
onLoad() {
this.getSearchList();
this.getCarouselImage();
},
methods: {
// 查询轮播图
async getCarouselImage(){
const params={
pageUi:APP_PAGE_TYPE.HOT,
}
const resp = await getCarouselImage(params);
if(resp && resp.bizcode === 100){
const data = resp.data || [];
this.swiperList = data.length !== 0 ? data.map(obj=>obj.carouselImage) : [];
}
},
jumpHome(){
uni.switchTab({
url: '/pages/home/home',