feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动 - queue、assets 使用独立分包以降低主包体积 - 修复首页单根节点与支付结果页 v-if 链 - 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错 - 配置域名与 manifest 应用名称;cache/store 防御性处理 Made-with: Cursor
This commit is contained in:
433
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/live_list/index.vue
Normal file
433
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/live_list/index.vue
Normal file
@@ -0,0 +1,433 @@
|
||||
<template>
|
||||
<!-- #ifdef MP -->
|
||||
<view v-if="liveList.length > 0">
|
||||
<!-- -->
|
||||
<view class="live-wrapper-b">
|
||||
<navigator class="live-item-b" v-for="(item,index) in liveList" :key="index" :url="'plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=' + item.room_id + '&custom_params=' + customParams" hover-class="none" :style="[{'background':bg},{'box-shadow':`0px 1px 20px ${boxShadow}`}]">
|
||||
<view class="img-box">
|
||||
<view class="label bgblue" v-if="item.live_status == 102">
|
||||
<view class="txt">预告</view>
|
||||
<view class="msg">{{item.show_time}}</view>
|
||||
</view>
|
||||
<view class="label bggary" v-if="item.live_status==103">
|
||||
<image src="/static/images/live-02.png" mode="" class="label-img"></image>
|
||||
<text>回放</text>
|
||||
</view>
|
||||
<view class="label bgred" v-if="item.live_status==101">
|
||||
<image src="/static/images/live-01.png" mode="" class="bgred-img"></image>
|
||||
<text>进行中</text>
|
||||
</view>
|
||||
<image :src="item.share_img"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title line2">{{item.name}}</view>
|
||||
<view class="people">
|
||||
<image :src="item.anchor_img" alt="">
|
||||
<text>{{item.anchor_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="empty-txt" v-if="!isScroll">没有更多内容啦~</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from "vuex";
|
||||
import {
|
||||
getLiveList
|
||||
} from '@/api/api.js';
|
||||
export default {
|
||||
computed: mapGetters(['uid']),
|
||||
name: 'liveBroadcast',
|
||||
props: {
|
||||
dataConfig: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page:1,
|
||||
limit:10,
|
||||
listStyle:1,
|
||||
isScroll:true,
|
||||
liveList:[],
|
||||
customParams:0
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
uid: {
|
||||
handler(newV, oldValue){
|
||||
this.getCustomParams();
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.getLiveList();
|
||||
},
|
||||
onShow(){
|
||||
uni.removeStorageSync('form_type_cart');
|
||||
},
|
||||
methods: {
|
||||
getCustomParams(){
|
||||
this.customParams = encodeURIComponent(JSON.stringify({ pid: this.uid }));
|
||||
},
|
||||
getLiveList: function() {
|
||||
let limit = this.$config.LIMIT;
|
||||
if(!this.isScroll) return
|
||||
getLiveList(this.page, this.limit)
|
||||
.then(res => {
|
||||
this.isScroll = res.data.length>=this.limit
|
||||
this.page++
|
||||
this.liveList =this.liveList.concat(res.data);
|
||||
})
|
||||
.catch(res => {
|
||||
});
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
this.getLiveList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.label-img {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.bgred-img {
|
||||
width: 21rpx;
|
||||
height: 22rpx;
|
||||
}
|
||||
.live-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.live-top {
|
||||
z-index: 20;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
width: 180rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 0rpx 0px 18rpx 0px;
|
||||
|
||||
image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
/* #ifdef H5 */
|
||||
display: block;
|
||||
/* #endif */
|
||||
}
|
||||
}
|
||||
|
||||
.live-title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 6rpx;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
&.mores {
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
width: 320rpx;
|
||||
display: inline-block;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 320rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.live-title {
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.live-top {
|
||||
width: 120rpx;
|
||||
height: 36rpx;
|
||||
font-size: 22rpx;
|
||||
|
||||
image {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.live-wrapper-a{
|
||||
padding: 0rpx 20rpx 0;
|
||||
.live-item-a{
|
||||
display: flex;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.img-box{
|
||||
position: relative;
|
||||
width: 340rpx;
|
||||
height: 270rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 15rpx 20rpx;
|
||||
.title{
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
.people{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.goods-wrapper{
|
||||
display: flex;
|
||||
.goods-item{
|
||||
position: relative;
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
margin-right: 20rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 16rpx;
|
||||
&:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.bg{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
text{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
line-height: 70rpx;
|
||||
color: #fff;
|
||||
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
|
||||
}
|
||||
.num{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.empty-goods{
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 6rpx;
|
||||
background-color: #B2B2B2;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
line-height: 96rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.live-wrapper-c{
|
||||
.live-item-a{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.img-box{
|
||||
width: 100%;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
.info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: initial;
|
||||
.left{
|
||||
width: 69%;
|
||||
}
|
||||
.goods-wrapper{
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.live-wrapper-b{
|
||||
padding: 20rpx 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
.live-item-b{
|
||||
width: 345rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: hidden;
|
||||
.img-box{
|
||||
position: relative;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 274rpx;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
.title{
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
.people{
|
||||
display: flex;
|
||||
margin-top: 10rpx;
|
||||
color: #999;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.label{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: 20rpx;
|
||||
border-radius: 22rpx 0px 22rpx 22rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
image{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
text{
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
.bgred{
|
||||
width: 132rpx;
|
||||
height: 38rpx;
|
||||
background: linear-gradient(270deg, #F5742F 0%, #FF1717 100%)
|
||||
}
|
||||
.bggary{
|
||||
width: 108rpx;
|
||||
height: 38rpx;
|
||||
background: linear-gradient(270deg, #999999 0%, #666666 100%)
|
||||
}
|
||||
.bgblue{
|
||||
width: 220rpx;
|
||||
height: 38rpx;
|
||||
background: rgba(0,0,0,0.36);
|
||||
overflow: hidden;
|
||||
.txt{
|
||||
position: relative;
|
||||
left: -5rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 38px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
background: linear-gradient(270deg, #2FA1F5 0%, #0076FF 100%);
|
||||
}
|
||||
}
|
||||
.title-box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
font-size: 32rpx;
|
||||
.more{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
.iconfont{
|
||||
font-size: 26rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.empty-txt{
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
208
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/rank/index.vue
Normal file
208
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/rank/index.vue
Normal file
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="w-full bg-top h-470 relative" :style="{backgroundImage:headerBg}">
|
||||
<view class="fixed-lt w-full z-20" :style="{'padding-top': sysHeight + 'px','background': pageScrollStatus ? '#e93323' : 'transparent'}">
|
||||
<view class="w-full px-20 pl-20 h-80 flex-between-center">
|
||||
<text class="iconfont icon-ic_leftarrow fs-40 text--w111-fff" @click="goBack()"></text>
|
||||
<text class="fs-34 fw-500 text--w111-fff">{{pageScrollStatus ? '排行榜' : ''}}</text>
|
||||
<text></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc flex-between-center">
|
||||
<view class="h-40 fs-28 lh-40rpx text--w111-fff tab-item flex-x-center"
|
||||
v-for="(item, index) in tabList" :key="index"
|
||||
:class="item.type == type ? 'active-tab' : ''"
|
||||
@tap="tabChange(item.type)">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative rd-t-40rpx bg--w111-f5f5f5 w-full content">
|
||||
<view class="">
|
||||
<view class="pt-32 pl-20 pr-20">
|
||||
<view class="card w-full bg--w111-fff rd-24rpx p-20 flex" v-for="(item,index) in productList" :key="index"
|
||||
@click="goDetail(item)">
|
||||
<view class="picture w-240 h-240 relative">
|
||||
<easy-loadimage
|
||||
:image-src="item.image"
|
||||
width="240rpx"
|
||||
height="240rpx"
|
||||
borderRadius="20rpx"></easy-loadimage>
|
||||
<image class="abs-lt w-72 h-72"
|
||||
:src="`${imgHost}/statics/images/product/rank_icon${index + 1}.png`" v-if="index < 3"></image>
|
||||
</view>
|
||||
<view class="flex-1 pl-20 flex-col justify-between">
|
||||
<view class="w-full">
|
||||
<view class="w-full fs-28 lh-40rpx line2">
|
||||
<text v-if="item.brand_name" class="brand-tag">{{ item.brand_name }}</text>
|
||||
{{item.store_name}}</view>
|
||||
<view class="flex items-end flex-wrap mt-12 w-full" v-if="item.store_label.length">
|
||||
<BaseTag
|
||||
:text="label.label_name"
|
||||
:color="label.color"
|
||||
:background="label.bg_color"
|
||||
:borderColor="label.border_color"
|
||||
:circle="label.border_color ? true : false"
|
||||
:imgSrc="label.icon"
|
||||
v-for="(label, idx) in item.store_label" :key="idx"></BaseTag>
|
||||
</view>
|
||||
<view class="font-red lh-30rpx fs-22 fw-500 mt-4">{{item.sales}}人买过 | 评分{{item.star}}</view>
|
||||
</view>
|
||||
<view class="w-full flex-between-center">
|
||||
<baseMoney :money="item.price" symbolSize="24" integerSize="40" decimalSize="24" color="#e93323" weight></baseMoney>
|
||||
<view class="w-144 h-56 rd-30rpx flex-center fs-24 jianbian text--w111-fff">立即抢购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<home></home>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let sysHeight = uni.getWindowInfo().statusBarHeight;
|
||||
import { rankCategoryApi, rankListApi } from "@/api/store";
|
||||
import { goShopDetail } from '@/libs/order.js';
|
||||
import { HTTP_REQUEST_URL } from '@/config/app';
|
||||
import {mapGetters} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sysHeight:sysHeight,
|
||||
imgHost: HTTP_REQUEST_URL,
|
||||
pageScrollStatus:false,
|
||||
cateList:[],
|
||||
form:{
|
||||
page:1,
|
||||
limit:10,
|
||||
selectId:0
|
||||
},
|
||||
type:1,
|
||||
loading:false,
|
||||
productList:[],
|
||||
tabList:[
|
||||
{title:'销量榜',type:1},
|
||||
{title:'好评榜',type:2},
|
||||
{title:'收藏榜',type:3},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
headerBg(){
|
||||
return 'url('+this.imgHost+'/statics/images/product/rank_header.png'+')'
|
||||
},
|
||||
...mapGetters(['isLogin', 'uid']),
|
||||
},
|
||||
onLoad(e) {
|
||||
this.type = e.type ? e.type : 1;
|
||||
this.getList();
|
||||
},
|
||||
onPageScroll(object) {
|
||||
if (object.scrollTop > 130) {
|
||||
this.pageScrollStatus = true;
|
||||
} else if (object.scrollTop < 130) {
|
||||
this.pageScrollStatus = false;
|
||||
}
|
||||
uni.$emit('scroll');
|
||||
},
|
||||
methods:{
|
||||
init(){
|
||||
rankCategoryApi().then(res=>{
|
||||
this.cateList = res.data;
|
||||
if(res.data.length){
|
||||
this.form.selectId = res.data[0].id;
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
if (this.loading) return;
|
||||
rankListApi(this.type,this.form).then(res=>{
|
||||
this.productList = this.productList.concat(res.data);
|
||||
this.loading = res.data.length < this.form.limit;
|
||||
this.form.page++;
|
||||
})
|
||||
},
|
||||
goBack(){
|
||||
uni.navigateBack();
|
||||
},
|
||||
goDetail(item){
|
||||
goShopDetail(item, this.uid).catch(res => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods_details/index?id=${item.id}`
|
||||
});
|
||||
});
|
||||
},
|
||||
tabChange(type){
|
||||
this.type = type;
|
||||
this.loading = false;
|
||||
this.form.page = 1;
|
||||
this.productList =[];
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.h-470{
|
||||
height: 470rpx;;
|
||||
}
|
||||
.w-624{
|
||||
width: 624rpx;
|
||||
}
|
||||
.desc{
|
||||
width: 402rpx;
|
||||
height: 52rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 118rpx;
|
||||
}
|
||||
.tab-item{
|
||||
width: 132rpx;
|
||||
}
|
||||
.active-tab{
|
||||
height: 52rpx;
|
||||
background: #FFF8E4;
|
||||
color: #F85517;
|
||||
border-radius: 30rpx;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.bg-top{
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.content{
|
||||
min-height: 400rpx;
|
||||
top: -80rpx;
|
||||
}
|
||||
._box{
|
||||
padding: 40rpx 20rpx 32rpx;
|
||||
background: #f5f5f5;
|
||||
position: sticky;
|
||||
z-index: 99;
|
||||
}
|
||||
.font-red{
|
||||
color: #e93323;
|
||||
}
|
||||
.bg-red{
|
||||
background-color: #e93323;
|
||||
}
|
||||
.jianbian{
|
||||
background: linear-gradient(90deg, #FF7931 0%, #E93323 100%);
|
||||
}
|
||||
.card ~ .card{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.brand-tag{
|
||||
background-color: #e93323 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
37
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/static/yhxy.html
Normal file
37
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/static/yhxy.html
Normal file
File diff suppressed because one or more lines are too long
37
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/static/yszc.html
Normal file
37
pro_v3.5.1/view/uniapp_v2/pages/columnGoods/static/yszc.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user