Compare commits

..

6 Commits

  1. 13
      App.vue
  2. 23
      api/home.js
  3. 9
      api/store.js
  4. 12
      api/user.js
  5. 2
      components/CitySelect.vue
  6. 3
      components/CouponWindow.vue
  7. 2
      components/Footer.vue
  8. 169
      components/quick-skeleton/quick-skeleton.vue
  9. 66
      components/sSwiper.vue
  10. 54
      components/vSwiper.vue
  11. 5
      config/index.js
  12. 1
      main.js
  13. 20
      pages.json
  14. 3
      pages/Loading/index.vue
  15. 3
      pages/activity/detail/index.vue
  16. 1
      pages/demandHall/companyDetail/index.vue
  17. 85
      pages/demandHall/resourcesDetail/index.vue
  18. 1230
      pages/home/index.vue
  19. 759
      pages/home/index2.vue
  20. 87
      pages/life/addGoods/index.vue
  21. 151
      pages/life/articleDetail/index.vue
  22. 192
      pages/life/articleList/index.vue
  23. 605
      pages/life/index.vue
  24. 31
      pages/life/learnMore/index.vue
  25. 105
      pages/life/temp/index.vue
  26. 44
      pages/life/tempList/index.vue
  27. 378
      pages/life/yunInfo/index.vue
  28. 11
      pages/order/OrderSubmission/index.vue
  29. 18
      pages/shop/GoodsCon/index.vue
  30. 8
      pages/user/agreement/index.vue
  31. 9
      pages/user/goodsManage/index.vue
  32. 7
      pages/user/index.vue
  33. 2
      pages/user/mine/index.vue
  34. 2
      pages/user/openStore/index.vue
  35. 54
      project.private.config.json
  36. BIN
      static/images/ear.png
  37. BIN
      static/images/edit-icon.png
  38. BIN
      static/images/eye.png
  39. BIN
      static/images/eye2.png
  40. BIN
      static/images/follow-title.png
  41. BIN
      static/images/gd1.png
  42. BIN
      static/images/gd2.png
  43. BIN
      static/images/gd3.png
  44. BIN
      static/images/hot.png
  45. BIN
      static/images/learnMore1.png
  46. BIN
      static/images/learnMore2.png
  47. BIN
      static/images/learnMore3.png
  48. BIN
      static/images/learnMore4.png
  49. BIN
      static/images/life-bg.png
  50. BIN
      static/images/new-bg.png
  51. BIN
      static/images/newInfo.png
  52. BIN
      static/images/search-icon.png
  53. BIN
      static/images/shareImg.png
  54. BIN
      static/images/user/hotspot.png
  55. BIN
      static/images/user/tyg-img.png
  56. BIN
      static/images/vote1.png
  57. BIN
      static/images/vote2.png
  58. 22
      uni_modules/uni-badge/changelog.md
  59. 253
      uni_modules/uni-badge/components/uni-badge/uni-badge.vue
  60. 88
      uni_modules/uni-badge/package.json
  61. 58
      uni_modules/uni-badge/readme.md

13
App.vue

@ -10,9 +10,7 @@ export default {
uni.hideTabBar() uni.hideTabBar()
}, },
globalData: { globalData: {
// baseURL : 'http://192.168.0.110:8092/api/',
baseURL: VUE_APP_API_URL+ '/', baseURL: VUE_APP_API_URL+ '/',
// baseURL : 'https://cloud.api.cyjyyjy.com/api/',
userInfo: null, userInfo: null,
navHeight: 0, navHeight: 0,
navTopHeight: 0, navTopHeight: 0,
@ -28,7 +26,6 @@ export default {
onShow(e) { onShow(e) {
this.globalData.scene = e.scene this.globalData.scene = e.scene
// console.log(this.globalData.scene,'this.globalData.scene')
//tabbar //tabbar
uni.hideTabBar(); uni.hideTabBar();
var query = {}; var query = {};
@ -251,7 +248,7 @@ export default {
setMenuHeight() { setMenuHeight() {
uni.getSystemInfo({ uni.getSystemInfo({
success: res => { success: res => {
console.log(res); console.log(res,'resaaaaa')
this.globalData.navTopHeight = res.statusBarHeight; this.globalData.navTopHeight = res.statusBarHeight;
this.globalData.CustomBar = res.statusBarHeight + 45; this.globalData.CustomBar = res.statusBarHeight + 45;
this.globalData.systemInfo = res; this.globalData.systemInfo = res;
@ -262,10 +259,12 @@ export default {
} }
}); });
let menuButtonObj = uni.getMenuButtonBoundingClientRect(); let menuButtonObj = uni.getMenuButtonBoundingClientRect();
this.globalData.menuTop = menuButtonObj.top; // console.log(menuButtonObj) console.log(menuButtonObj,'menuButtonObj')
this.globalData.menuTop = menuButtonObj.top;
this.globalData.menuHeight = menuButtonObj.height; this.globalData.menuHeight = menuButtonObj.height;
this.globalData.navHeight = menuButtonObj.height + (menuButtonObj.top - this.globalData.navTopHeight); this.globalData.topHeight = menuButtonObj.top + menuButtonObj.height;
this.globalData.topLeft = menuButtonObj.left;
this.globalData.navHeight = menuButtonObj.top;
}, },
getInfo() { getInfo() {

23
api/home.js

@ -0,0 +1,23 @@
import request from '@/utils/request'
export function getIndexData(q){
return request.get('index', q, {login: false})
}
/*
* 文章列表
* */
export function getArticle(q) {
return request.get("/article/list", q, {
login: false
});
}
/*
* 文章详情
* */
export function getArticleDetail(q) {
return request.get("/article/details/" + q.id);
}

9
api/store.js

@ -92,14 +92,6 @@ export function getProducts(q) {
}); });
} }
/*
* 文章列表
* */
export function getArticle(q) {
return request.get("/article/list", q, {
login: true
});
}
/* /*
* 商品详情 * 商品详情
@ -288,3 +280,4 @@ export function storeListApi(data) {
login: false login: false
}); });
} }

12
api/user.js

@ -31,6 +31,12 @@ export function addTemp(data) {
login: true, login: true,
}) })
} }
//删除运费模板
export function delTemp(data) {
return request.delete('/user/shippingtemplate?ids=' + data, {
login: true,
})
}
//获取运费模板列表 //获取运费模板列表
export function getTempList(data) { export function getTempList(data) {
@ -38,6 +44,12 @@ export function getTempList(data) {
login: true, login: true,
}) })
} }
//获取运费模板详情
export function getTempDetail(data) {
return request.get('/user/shippingtemplate/getTemplatesDetail?id='+data, {
login: true,
})
}
/** /**
* 用户登录 * 用户登录

2
components/CitySelect.vue

@ -145,7 +145,7 @@ export default {
}, },
selectProvince(index) { selectProvince(index) {
this.provinceActive = this.province[index]; this.provinceActive = this.province[index];
this.city = this.province[index].c; this.city = this.province[index ].c;
this.current = 1; this.current = 1;
}, },
selectCity(index) { selectCity(index) {

3
components/CouponWindow.vue

@ -32,8 +32,7 @@
import {handleLoginFailure} from "@/utils"; import {handleLoginFailure} from "@/utils";
import { import {
couponReceiveBatch couponReceiveBatch
} from "@/api/user"; } from "@/api/user",
export default { export default {
name: "CouponWindow", name: "CouponWindow",
props: { props: {

2
components/Footer.vue

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<view class="footer-bg"></view> <view class="footer-bg"></view>
<view id="footer" :class="[isIpx ? 'iphonex-footer' : '', 'acea-row row-middle'] "> <view id="footer" :class="[isIpx ? ' ' : '', 'acea-row row-middle'] ">
<view <view
class="item" class="item"
:class="{ on: footerIndex == tabtarIndex }" :class="{ on: footerIndex == tabtarIndex }"

169
components/quick-skeleton/quick-skeleton.vue

@ -0,0 +1,169 @@
<template>
<view :style="{width: systemInfo.width + 'px', height: systemInfo.height + 'px', backgroundColor: bgcolor, position: 'absolute', left: 0, top: 0, zIndex: 9998, overflow: 'hidden'}">
<view v-for="(item,rect_idx) in skeletonRectLists" :key="rect_idx + 'rect'" :class="[loading == 'chiaroscuro' ? 'chiaroscuro' : '']" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>
<view v-for="(item,circle_idx) in skeletonCircleLists" :key="circle_idx + 'circle'" :class="loading == 'chiaroscuro' ? 'chiaroscuro' : ''" :style="{width: item.width + 'px', height: item.height + 'px', backgroundColor: 'rgb(194, 207, 214)', borderRadius: item.width + 'px', position: 'absolute', left: item.left + 'px', top: item.top + 'px'}"></view>
<view class="spinbox" v-if="loading == 'spin'">
<view class="spin"></view>
</view>
</view>
</template>
<script>
export default {
name: "skeleton",
props: {
bgcolor: {
type: String,
value: '#FFF'
},
selector: {
type: String,
value: 'skeleton'
},
loading: {
type: String,
value: 'spin'
},
show: {
type: Boolean,
value: false
}
},
data() {
return {
loadingAni: ['spin', 'chiaroscuro'],
systemInfo: {},
skeletonRectLists: [],
skeletonCircleLists: []
}
},
watch: {
show() {
this.attachedAction();
this.readyAction();
}
},
methods: {
attachedAction: function(){
//
const systemInfo = uni.getSystemInfoSync();
this.systemInfo = {
width: systemInfo.windowWidth,
height: systemInfo.windowHeight
};
this.loading = this.loadingAni.includes(this.loading) ? this.loading : 'spin';
},
readyAction: function(){
const that = this;
//
uni.createSelectorQuery().selectAll(`.${this.selector}`).boundingClientRect().exec(function(res){
that.systemInfo.height = res[0][0].height + res[0][0].top;
});
//
this.rectHandle();
//
this.radiusHandle();
},
rectHandle: function(){
const that = this;
//
uni.createSelectorQuery().selectAll(`.${this.selector}-rect`).boundingClientRect().exec(function(res){
that.skeletonRectLists = res[0];
});
},
radiusHandle(){
const that = this;
uni.createSelectorQuery().selectAll(`.${this.selector}-radius`).boundingClientRect().exec(function(res){
that.skeletonCircleLists = res[0];
});
}
}
}
</script>
<style>
.spinbox{
position: fixed;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
z-index: 9999
}
.spin {
display: inline-block;
width: 64rpx;
height: 64rpx;
}
.spin:after {
content: " ";
display: block;
width: 46rpx;
height: 46rpx;
margin: 1rpx;
border-radius: 50%;
border: 5rpx solid #409eff;
border-color: #409eff transparent #409eff transparent;
animation: spin 1.2s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.chiaroscuro{
width: 100%;
height: 100%;
background: rgb(194, 207, 214);
animation-duration: 2s;
animation-name: blink;
animation-iteration-count: infinite;
}
@keyframes blink {
0% {
opacity: .4;
}
50% {
opacity: 1;
}
100% {
opacity: .4;
}
}
@keyframes flush {
0% {
left: -100%;
}
50% {
left: 0;
}
100% {
left: 100%;
}
}
.shine {
animation: flush 2s linear infinite;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
background: linear-gradient(to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, .85) 50%,
rgba(255, 255, 255, 0) 100%
)
}
</style>

66
components/sSwiper.vue

@ -0,0 +1,66 @@
<template>
<swiper class="swiper-block" autoplay="true" circular="true" previous-margin="90rpx" next-margin="90rpx" current="0" @change="swiperChange">
<block v-for="(item, index) in imgs" :key="index">
<swiper-item class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @tap="previewImg">
<image mode="aspectFill" :src="item" :class="'slide-image ' + (swiperIndex == index ? 'active' : '')"></image>
</swiper-item>
</block>
</swiper>
</template>
<script>
export default{
props: {
imgs: {
type: Array,
default: []
}
},
data(){
return {
swiperIndex: 0
}
},
methods: {
swiperChange(e) {
const that = this;
that.setData({
swiperIndex: e.detail.current
});
},
previewImg() {
uni.previewImage({
urls: this.imgs
});
}
}
}
</script>
<style lang="less">
.swiper-block {
height: 300rpx;
width: 100%;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: 250rpx;
width: 520rpx;
border-radius: 9rpx;
margin: 0rpx 30rpx;
z-index: 1;
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}
</style>

54
components/vSwiper.vue

@ -1,15 +1,19 @@
<template> <template>
<swiper class="swiper-block" vertical="true" circular="true" previous-margin="90rpx" next-margin="90rpx" current="0" @change="swiperChange"> <swiper class="swiper-block" vertical="true" circular="true" previous-margin="80rpx" next-margin="80rpx" current="0" @change="swiperChange">
<block v-for="(item, index) in imgs" :key="index"> <block v-for="(item, index) in articleList" :key="index">
<swiper-item class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @tap="previewImg"> <swiper-item class="swiper-item" :class="(swiperIndex == index ? 'active' : '')" @tap="previewImg">
<view class="item-box" :class="(swiperIndex == index ? 'active' : '')" @click="toDetial(item.id)"> <view class="item-box" :class="(swiperIndex == index ? 'active' : '')" @click="toDetial(item.id)">
<image mode="aspectFill" :src="item.imageInput" class="slide-image"></image> <image mode="aspectFill" :src="item.imageInput" class="slide-image"></image>
<view class="content-box"> <view class="content-box">
<view class="title-box">{{item.title}}</view> <view class="mask"></view>
<view class="title-box line1">{{item.title}}</view>
<view class="content acea-row"> <view class="content acea-row">
<view>云快讯</view> <view>{{item.author}}</view>
<view>3小时前</view> <view>{{item.createTime}}</view>
<view>{{item.visit}}阅读</view> <!-- <view class="acea-row row-middle">
<image src="../static/images/eye2.png" class="eye"></image>
<text>{{item.visit}}</text>
</view> -->
</view> </view>
</view> </view>
</view> </view>
@ -21,7 +25,7 @@
<script> <script>
export default{ export default{
props: { props: {
imgs: { articleList: {
type: Array, type: Array,
default: [] default: []
} }
@ -57,6 +61,8 @@
width: 670rpx; width: 670rpx;
height: 300rpx; height: 300rpx;
margin: 0 auto; margin: 0 auto;
border-radius: 20rpx;
} }
.swiper-item { .swiper-item {
@ -67,8 +73,8 @@
overflow: unset; overflow: unset;
} }
.item-box{ .item-box{
width: 622rpx; width: 600rpx;
height: 200rpx; height: 230rpx;
position: relative; position: relative;
border-radius: 20rpx; border-radius: 20rpx;
} }
@ -79,29 +85,55 @@
border-radius: 20rpx; border-radius: 20rpx;
} }
.content-box{ .content-box{
width: 556rpx;
height: 100rpx;
position: absolute; position: absolute;
bottom: 20rpx; bottom: 20rpx;
left: 20rpx; left: 20rpx;
color: #0081FF; color: #0081FF;
z-index: 5; z-index: 5;
} }
.mask{
width: 100%;
height: 100%;
background:rgba(255,255,255,.5);
filter: blur(1px);
position: absolute;
top: 0;
left: 0;
border-radius: 12rpx;
}
.title-box{ .title-box{
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #fff; color: #000;
margin-bottom: 10rpx; margin-bottom: 10rpx;
position: absolute;
top: 10rpx;
left: 10rpx;
z-index: 99;
} }
.content{ .content{
color: #000; color: #000;
font-size: 26rpx; font-size: 26rpx;
position: absolute;
top: 56rpx;
z-index: 99;
left: 10rpx;
} }
.content view{ .content view{
margin-right: 50rpx; margin-right: 50rpx;
} }
.active { .active {
transform: scale(1.02); // transform: scale(1.02);
width: 670rpx;
height: 256rpx;
transition: all 0.2s ease-in 0s; transition: all 0.2s ease-in 0s;
border-radius: 20rpx; border-radius: 20rpx;
z-index: 20; z-index: 20;
} }
.eye{
width: 24rpx;
height: 24rpx;
}
</style> </style>

5
config/index.js

@ -1,11 +1,10 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api' // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'
// export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api' // export const VUE_APP_API_URL = 'http://192.168.0.112:8092/api'
export const VUE_APP_API_URL = 'http://192.168.0.111:8092/api' // export const VUE_APP_API_URL = 'http://192.168.0.111:8092/api'
// export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api' export const VUE_APP_API_URL = 'https://cloud.api.cyjyyjy.com/api'
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api' // export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api'
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static'

1
main.js

@ -45,6 +45,7 @@ Object.defineProperty(Vue.prototype, '$yroute', {
}, },
}) })
let deviceType = '' let deviceType = ''
// #ifdef APP-PLUS // #ifdef APP-PLUS
// App平台编译的代码 // App平台编译的代码

20
pages.json

@ -255,7 +255,6 @@
{ {
"path": "pages/life/index", "path": "pages/life/index",
"style": { "style": {
"navigationStyle": "custom",
"navigationBarTitleText": "生活", "navigationBarTitleText": "生活",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
@ -291,12 +290,31 @@
"navigationBarTitleText": "详情预览" "navigationBarTitleText": "详情预览"
} }
}, },
{
"path": "pages/life/articleList/index",
"style": {
"navigationBarTitleText": "资讯列表"
}
},
{ {
"path": "pages/life/articleDetail/index", "path": "pages/life/articleDetail/index",
"style": { "style": {
"navigationBarTitleText": "资讯详情" "navigationBarTitleText": "资讯详情"
} }
}, },
{
"path": "pages/life/yunInfo/index",
"style": {
"navigationBarTitleText": "云资讯"
}
},
{
"path": "pages/life/learnMore/index",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "详情"
}
},
{ {
"path": "pages/activity/index", "path": "pages/activity/index",
"style": { "style": {

3
pages/Loading/index.vue

@ -24,6 +24,9 @@ export default {
name: 'Loading', name: 'Loading',
data() { data() {
return {} return {}
},
onLoad() {
}, },
onShow() { onShow() {
// console.log('getUser',this.userInfo) // console.log('getUser',this.userInfo)

3
pages/activity/detail/index.vue

@ -81,7 +81,6 @@
</view> </view>
</view> </view>
</template> </template>
<script> <script>
// pages/activity/detail/index.js // pages/activity/detail/index.js
const app = getApp(); const app = getApp();
@ -198,7 +197,7 @@ export default {
}); });
}, },
shareClick() { shareClic() {
uni.showShareMenu({ uni.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline'] menus: ['shareAppMessage', 'shareTimeline']

1
pages/demandHall/companyDetail/index.vue

@ -169,6 +169,7 @@
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>

85
pages/demandHall/resourcesDetail/index.vue

@ -49,13 +49,8 @@
</view> </view>
</view> </view>
<view> <view>
<swiper class="swiper-block" autoplay="true" circular="true" previous-margin="90rpx" next-margin="90rpx" current="0" @change="swiperChange"> <sSwiper :imgs="detail.resourceImgs"></sSwiper>
<block v-for="(item, index) in detail.resourceImgs" :key="index"> <vSwiper :imgs="detail.resourceImgs"></vSwiper>
<swiper-item class="swiper-item" @tap="previewImg">
<image mode="aspectFill" :src="item" :class="'slide-image ' + (swiperIndex == index ? 'active' : '')"></image>
</swiper-item>
</block>
</swiper>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<view class="contact-btn" @tap="toResourcesContact">立即沟通</view> <view class="contact-btn" @tap="toResourcesContact">立即沟通</view>
@ -66,7 +61,8 @@
<script> <script>
// pages/demandHall/resourcesDetail/index.js // pages/demandHall/resourcesDetail/index.js
const app = getApp(); const app = getApp();
import sSwiper from '@/components/sSwiper.vue'
import vSwiper from '@/components/vSwiper.vue'
export default { export default {
data() { data() {
return { return {
@ -75,8 +71,7 @@ export default {
swiperIndex: 0 swiperIndex: 0
}; };
}, },
components: { sSwiper, vSwiper },
components: {},
props: {}, props: {},
/** /**
@ -88,37 +83,6 @@ export default {
}); });
this.getDetail(); this.getDetail();
}, },
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
@ -175,20 +139,6 @@ export default {
} }
}); });
}, },
swiperChange(e) {
const that = this;
that.setData({
swiperIndex: e.detail.current
});
},
previewImg() {
uni.previewImage({
urls: this.detail.resourceImgs
});
}
} }
}; };
</script> </script>
@ -324,29 +274,4 @@ export default {
color: #707070; color: #707070;
line-height: 40rpx; line-height: 40rpx;
} }
.swiper-block {
height: 300rpx;
width: 100%;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: 250rpx;
width: 520rpx;
border-radius: 9rpx;
margin: 0rpx 30rpx;
z-index: 1;
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}
</style> </style>

1230
pages/home/index.vue

File diff suppressed because it is too large Load Diff

759
pages/home/index2.vue

@ -0,0 +1,759 @@
<template>
<view class="home-page">
<view class="top-bg-box" @tap="toGuidePage">
<image src="https://download.cyjyyjy.com/index-top-bg2.png"></image>
</view>
<!-- <view class="page-top-box">
<image src="../../images/home/top-bg.png" class="top-bg"></image>
<view class="page-title" style="top:{{menuTop}}px;height:{{menuHeight}}px;line-height: {{menuHeight}}px;">禅意云生态</view>
<view class="top-box-content" style="top: {{CustomBar + menuHeight}}rpx;">
<view class="search-box acea-row row-between-wrapper">
<view class="localtion-box acea-row row-middle">
<image src="../../images/home/localtion.png"></image>
<text>{{city}}</text>
</view>
<view class="search acea-row row-middle">
<image src="../../images/home/search.png"></image>
<text>大家都在搜 APP开发</text>
</view>
<image class="message-icon" src="../../images/home/message.png"></image>
</view>
<view class="home-menu-box">
<view class="menu-list acea-row row-between">
<view class="menu-item acea-row row-column row-middle" wx:for="{{menuList}}" wx:key="index">
<image src="{{item.icon}}"></image>
<text>{{item.text}}</text>
</view>
</view>
</view>
</view>
</view> -->
<!-- 招商会 -->
<view class="investment-box">
<view class="investment-title-box acea-row row-between-wrapper">
<view class="acea-row">
<text class="fz32">热门活动</text>
<view class="hot"></view>
</view>
<!-- <view class="more acea-row row-middle">
<text>全部</text>
<image src="/static/images/home/arrow-r.png"></image>
</view> -->
</view>
<view class="investement-list">
<scroll-view class="scroll-view_H" scroll-x="true">
<view v-for="(item, index) in recommendActivity" :key="index" class="investment-item" @tap="toActiveDetail" :data-id="item.id">
<image class="item-bg" :src="item.images" mode="aspectFill"></image>
<view class="tips-box acea-row row-right">
<view v-for="(flag, index2) in spl.spl(item.flag)" :key="index2" :class="'tips-item ' + (index2%2 == 0 ? 'bg2' : '' )" v-if="index2 < 3">{{flag}}</view>
</view>
<view class="item-info-box acea-row row-column row-center">
<view class="address-box line1">
<image src="/static/images/home/localtion.png"></image>
<text>{{item.address}}</text>
</view>
<view class="time-box">
<image src="/static/images/home/time.png"></image>
<text>{{item.activityStartTime}}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<!-- 尊享福利 -->
<!-- <view class="welfare-box">
<view class="welfare-title">尊享福利</view>
<view class="welfare-list-box">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="welfare-item" wx:for="{{3}}" wx:key="index">
<view class="item-box acea-row">
<image src="../../images/home/welfare1.png"></image>
<view class="welfare-info-box acea-row row-column row-between">
<view>
<view class="w-name">保时捷Porsche-Panamera 4S E-Hybrid 行政加长版</view>
<view class="w-address">武汉光谷保时捷中心</view>
</view>
<view>
<view class="w-price">140</view>
<view class="w-oldPrice">市场价约为157</view>
</view>
</view>
<view class="buy-btn">立即抢购</view>
</view>
<view class="item-box acea-row">
<image src="../../images/home/welfare1.png"></image>
<view class="welfare-info-box acea-row row-column row-between">
<view>
<view class="w-name">保时捷Porsche-Panamera 4S E-Hybrid 行政加长版</view>
<view class="w-address">武汉光谷保时捷中心</view>
</view>
<view>
<view class="w-price">140</view>
<view class="w-oldPrice">市场价约为157</view>
</view>
</view>
<view class="buy-btn">立即抢购</view>
</view>
data-i </view>
</scroll-view>
</view>
</view> -->
<!-- 供需模块 -->
<view class="demandhall-box">
<view class="tabs-box acea-row row-around">
<view :class="'tab-item ' + (active == 1 ? 'tab-item-a' : '')" data-i="1" @tap="tabClick">最新供应</view>
<view :class="'tab-item ' + (active == 2 ? 'tab-item-a' : '')" data-i="2" @tap="tabClick">需求广场</view>
<!-- <view class="tab-item {{active == 3 ? 'tab-item-a' : ''}}" data-i="3" bindtap="tabClick">金牌投资人</view> -->
</view>
<view class="list-box" v-if="active == 1">
<view v-for="(item, index) in resourcesList" :key="index" class="item">
<view class="item-top">
<view class="project-name line1">{{item.title}}</view>
<view class="tag">{{item.cname}}</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="buy-btn" @tap="toResourcesDetail" :data-id="item.id">了解详情</view>
</view>
<view class="company-box acea-row">
<image :src="item.enterpriseDto.enterpriseLogo" class="logo"></image>
<view class="company-info acea-row row-column row-between">
<view class="company-name line1 fz28">{{item.enterpriseDto.enterpriseName}}</view>
<view class="company-name line2 fz24">{{item.enterpriseDto.enterpriseTitle}}</view>
<view class="tags-box acea-row">
<!-- <view class="tag-item fz20">网站建设</view> -->
<view class="tag-item fz20 bgG">{{item.cname}}</view>
<!-- <view class="tag-item fz20 bgO">网站建设</view> -->
</view>
</view>
<view class="into-btn acea-row row-center-wrapper" @tap="toCompanyDetail" :data-id="item.enterpriseId">
<image src="/static/images/home/company-icon.png"></image>
<text>进入企业</text>
</view>
</view>
</view>
</view>
<view class="list-box" v-if="active == 2">
<view v-for="(item, index) in demandList" :key="index" class="item" @tap="toNeedDetail" :data-id="item.id">
<view class="item-top">
<view class="project-name">{{item.title}}</view>
<view class="desc line2">{{item.detailedDescription}}</view>
<view class="tags-box tags-box2 acea-row">
<view class="tag-item fz20">{{item.enterpriseDto.cname}}</view>
<!-- <view class="tag-item fz20 bgG">网站建设</view>
<view class="tag-item fz20 bgO">网站建设</view> -->
</view>
<view class="price">{{item.capital}}</view>
</view>
</view>
</view>
</view>
<view class="to-demandhall acea-row row-center row-middle" @tap="toTab2">
<text>更多内容去供需大厅</text>
<image src="/static/images/home/arrow-r.png"></image>
</view>
<tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar>
</view>
</template>
<script module="spl" lang="wxs" src="../../utils/subutil.wxs"></script>
<script>
// index.js
//
const app = getApp();
import util from '../../utils/util';
var QQMapWX = require("../../utils/qqmap-wx-jssdk.min.js");
var qqmapsdk;
import tabbar from "../../tabbarComponent/tabbar";
export default {
data() {
return {
menuList: [
{
icon: "/static/images/home/menu1.png",
text: 'IT制作'
}, {
icon: "/static/images/home/menu2.png",
text: 'logo设计'
}, {
icon: "/static/images/home/menu3.png",
text: '文案策划'
}, {
icon: "/static/images/home/menu4.png",
text: 'app开发'
}, {
icon: "/static/images/home/menu5.png",
text: '装修服务'
}, {
icon: "/static/images/home/menu6.png",
text: '软件定制'
}, {
icon: "/static/images/home/menu7.png",
text: '法律服务'
}, {
icon: "/static/images/home/menu8.png",
text: '小程序'
}, {
icon: "/static/images/home/menu9.png",
text: '网络营销'
}, {
icon: "/static/images/home/menu10.png",
text: '全部分类'
},
],
CustomBar: app.globalData.CustomBar,
menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
menuTop: app.globalData.menuTop,
active: 1,
recommendActivity: [],
demandList: [],
resourcesList: [],
province: '',
city: '',
cagetoryList: "",
latitude: "",
longitude: "",
currentTabIndex: 0
};
},
components: {
tabbar
},
props: {},
onShareAppMessage: function(res) {
return {
title: '禅易云生态',
path: '/pages/home/index',
}
},
onLoad() {
uni.hideTabBar();
// app.globalData.editTabbar();
this.pagePath = '/pages/home/index'
this.getCagetoryList();
qqmapsdk = new QQMapWX({
key: 'UVEBZ-M3VRS-CO4OH-6F5QZ-X7FB7-SVFOX' //key
});
this.getLocation();
},
onPullDownRefresh: function () {
//
this.getCagetoryList();
},
methods: {
tabBarClick(index){
// console.log('tabBar' + index)
this.currentTabIndex = index
},
toGuidePage() {
uni.navigateTo({
url: '/pages/guide/index'
});
},
toActiveDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/activity/detail/index?id=' + id
});
},
tabClick(e) {
this.setData({
active: e.currentTarget.dataset.i
});
},
toTab2() {
uni.switchTab({
url: '/pages/demandHall/index'
});
},
getCagetoryList() {
uni.showNavigationBarLoading();
app.http('get', 'index').then(res => {
if (res.data.success) {
res.data.data.recommendActivity.content.forEach(item => {
item.activityStartTime = util.getWeek(item.activityStartTime);
});
this.setData({
demandList: res.data.data.demandList,
resourcesList: res.data.data.resourcesDtos,
cagetoryList: res.data.data.cagetoryDtos,
recommendActivity: res.data.data.recommendActivity.content
}); //
uni.hideNavigationBarLoading(); //
uni.stopPullDownRefresh();
}
});
},
toResourcesDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/resourcesDetail/index?id=' + id
});
},
toCompanyDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/companyDetail/index?id=' + id
});
},
toNeedDetail(e) {
let id = e.currentTarget.dataset.id;
uni.navigateTo({
url: '/pages/demandHall/needsDetail/index?id=' + id
});
},
getLocation() {
let vm = this;
uni.getLocation({
type: 'wgs84',
success: function (res) {
// console.log(JSON.stringify(res))
var latitude = res.latitude;
var longitude = res.longitude;
var speed = res.speed;
var accuracy = res.accuracy;
vm.getLocal(latitude, longitude);
},
fail: function (res) {
console.log('fail' + JSON.stringify(res));
}
});
},
//
getLocal: function (latitude, longitude) {
let vm = this;
qqmapsdk.reverseGeocoder({
location: {
latitude: latitude,
longitude: longitude
},
success: function (res) {
// console.log(JSON.stringify(res));
let province = res.result.ad_info.province;
let city = res.result.ad_info.city;
vm.setData({
province: province,
city: city,
latitude: latitude,
longitude: longitude
}); // console.log(city)
},
fail: function (res) {
console.log(res);
},
complete: function (res) {// console.log(res);
}
});
}
}
};
</script>
<style>
.home-page{
padding-bottom: 190rpx;
}
.top-bg-box{
width: 750rpx;
height: 420rpx;
}
.top-bg-box image{
width: 100%;
height: 100%;
}
.page-top-box{
width: 100%;
height: 598rpx;
position: relative;
}
.page-title{
width: 100%;
color: #fff;
text-align: center;
position: relative;
}
.top-bg{
width: 100%;
height: 598rpx;
position: absolute;
}
.top-box-content{
position: relative;
}
.search-box{
color: #fff;
font-size: 32rpx;
padding: 0 60rpx 0 40rpx;
}
.localtion-box image{
width: 26rpx;
height: 31rpx;
margin-right: 10rpx;
}
.search{
width: 448rpx;
height: 68rpx;
font-size: 28rpx;
padding: 16rpx 20rpx;
background: rgba(255, 255, 255, 0.38);
border-radius: 8rpx;
}
.search image{
width: 35rpx;
height: 35rpx;
margin-right: 16rpx;
}
.message-icon{
width: 36rpx;
height: 36rpx;
}
.home-menu-box{
width: 670rpx;
height: 286rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 20rpx rgba(151, 69, 34, 0.28);
border-radius: 12rpx;
margin: 28rpx auto 0;
padding: 42rpx;
}
.menu-list{
color: #1D1D1D;
font-size: 24rpx;
}
.menu-item{
width: 20%;
/* margin-right:16rpx; */
margin-bottom: 34rpx;
}
.menu-item:nth-child(5n){
margin-right: 0;
}
.menu-item image{
width: 52rpx;
height: 52rpx;
}
.investment-box{
width: 100%;
padding: 40rpx 0 0 40rpx;
}
.investment-title-box{
width: 100%;
padding-right: 40rpx;
}
.fz32{
font-size: 32rpx;
color: #1D1D1D;
}
.hot{
width: 26rpx;
height: 26rpx;
text-align: center;
line-height: 26rpx;
background: linear-gradient(147deg, #FB7E4A 0%, #FF5100 100%);
border-radius: 8rpx 0px 8rpx 0px;
font-size: 18rpx;
color: #fff;
margin-left: 16rpx;
}
.more{
font-size: 24rpx;
color: #999999;
}
.more image{
width: 9rpx;
height: 16rpx;
margin-left: 12rpx;
margin-top: 2rpx;
}
.investement-list{
width: 100%;
margin-top: 34rpx;
}
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.investment-item{
display: inline-block;
width: 324rpx;
height: 408rpx;
margin-right:20rpx;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
position: relative;
}
.investment-item .item-bg{
width: 324rpx;
height: 408rpx;
position: absolute;
border-radius: 8rpx;
}
.tips-box{
position: relative;
top: 20rpx;
}
.tips-item{
padding: 6rpx 10rpx;
line-height: 28rpx;
font-size: 20rpx;
color: #fff;
background: rgba(255, 81, 0, 0.63);
border-radius: 8rpx;
margin-right: 14rpx;
}
.bg2{
background: rgba(255, 170, 0, 0.63);
}
.item-info-box{
width: 300rpx;
height: 102rpx;
background: rgba(255, 255, 255, 0.8);
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.2);
border-radius: 8rpx;
position: absolute;
bottom: 18rpx;
left: 50%;
margin-left: -150rpx;
font-size: 22rpx;
color: #404040;
}
.item-info-box image{
width: 14rpx;
height: 17rpx;
margin: 0 12rpx 0 12rpx;
}
.welfare-box{
width: 100%;
padding-left: 40rpx;
margin-top: 52rpx;
}
.welfare-title{
font-size: 32rpx;
color: #1D1D1D;
margin-bottom: 38rpx;
}
.welfare-list-box{
width: 100%;
}
.welfare-item{
display: inline-block;
margin-right: 6rpx;
padding: 12rpx;
}
.item-box{
width: 650rpx;
height: 248rpx;
background: #FFFFFF;
box-shadow: 0px 0rpx 12rpx rgba(0, 0, 0, 0.16);
padding: 22rpx 16rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
position: relative;
}
.buy-btn{
width: 144rpx;
height: 52rpx;
text-align: center;
line-height: 52rpx;
background: linear-gradient(315deg, #FB966C 0%, #FFC2AA 100%);
border-radius: 12rpx;
color: #fff;
font-size: 24rpx;
position: absolute;
bottom: 30rpx;
right: 30rpx;
}
.item-box image{
width: 198rpx;
height: 204rpx;
margin-right: 12rpx;
}
.welfare-info-box{
width: 394rpx;
}
.w-name{
width: 390rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #1D1D1D;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.w-address{
font-size: 24rpx;
line-height: 34rpx;
color: #707070;
margin: 8rpx 0 14rpx;
}
.w-price{
font-size: 28rpx;
font-weight: bold;
line-height: 40rpx;
color: #FF7942;
}
.w-oldPrice{
font-size: 20rpx;
color: #BCBCBC;
text-decoration: line-through;
}
.demandhall-box{
width: 100%;
padding: 40rpx;
}
.tabs-box{
padding-left: 30rpx;
padding-right: 12rpx;
}
.tab-item{
font-size: 28rpx;
color: #9C9C9C;
padding-bottom: 8rpx;
}
.tab-item-a{
color: #1D1D1D;
border-bottom: 4rpx solid #FF7942;
}
.list-box{
width: 100%;
margin-top: 36rpx;
}
.item{
width: 670rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(190, 190, 190, 0.3);
border-radius: 12rpx;
padding: 28rpx 20rpx 18rpx;
margin-bottom: 32rpx;
}
.item-top{
padding-bottom: 24rpx;
position: relative;
}
.item-top .buy-btn{
right: 0;
}
.project-name{
width: 400rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 58rpx;
color: #1D1D1D;
}
.tags-box2{
margin-top: 12rpx;
}
.price{
color: #FF5100;
font-size: 28rpx;
position: absolute;
top: 0;
right: 0rpx;
}
.tag{
color: #74BDF7;
font-size: 20rpx;
line-height: 28rpx;
margin: 12rpx 0 20rpx;
}
.desc{
font-size: 24rpx;
line-height: 34rpx;
color: #666666;
margin-top: 8rpx;
}
.company-box{
padding-top: 12rpx;
position: relative;
border-top: 2rpx solid #ECECEC;
}
.company-box image{
width: 128rpx;
height: 128rpx;
border-radius: 8rpx;
}
.company-info{
width: calc(100% - 298rpx);
margin-left: 12rpx;
}
.fz28{
font-size: 28rpx;
line-height: 40rpx;
color: #1D1D1D;
}
.fz24{
font-size: 24rpx;
line-height: 34rpx;
}
.fz20{
font-size: 20rpx;
line-height: 28rpx;
}
.item-top .buy-btn{
top: 0;
}
.into-btn{
font-size: 20rpx;
color: #FF5100;
width: 144rpx;
height: 40rpx;
border: 1rpx solid #FF5100;
opacity: 1;
border-radius: 20rpx;
position: absolute;
top: 18rpx;
right: 0rpx;
}
.into-btn image{
width: 21rpx;
height: 19rpx;
margin-right: 6rpx;
}
.tag-item{
width: 112rpx;
height: 36rpx;
line-height: 34rpx;
text-align: center;
border: 1rpx solid #FFAA00;
color: #FFAA00;
border-radius: 4rpx;
margin-right: 8rpx;
}
.bgG{
border: 1rpx solid #3A9EFA;
color: #3A9EFA;
}
.bgO{
border: 1rpx solid #FC9367;
color: #FC9367;
}
.to-demandhall{
font-size: 28rpx;
color: #A7A7A7;
margin-bottom: 28rpx;
}
.to-demandhall image{
width: 13rpx;
height: 23rpx;
margin-left: 15rpx;
}
</style>

87
pages/life/addGoods/index.vue

@ -89,7 +89,7 @@
<image src="../../../static/images/arror-r-s.png"></image> <image src="../../../static/images/arror-r-s.png"></image>
</view> </view>
</view> </view>
<view class="temp-box goods-state acea-row row-between-wrapper"> <!-- <view class="temp-box goods-state acea-row row-between-wrapper">
<text>商品状态</text> <text>商品状态</text>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<radio-group @change="radioChange"> <radio-group @change="radioChange">
@ -101,7 +101,7 @@
</label> </label>
</radio-group> </radio-group>
</view> </view>
</view> </view> -->
<view class="btn-box"> <view class="btn-box">
<view class="btn" @tap="submit">提交</view> <view class="btn" @tap="submit">提交</view>
</view> </view>
@ -237,6 +237,8 @@
this.attrArr = info.items this.attrArr = info.items
this.spec_type = 1 this.spec_type = 1
this.isShow = info.is_show this.isShow = info.is_show
this.tempId = info.shippingTemplatesDto.id
this.temp = info.name
let strArr = info.items.map(item=>{ let strArr = info.items.map(item=>{
return item.value return item.value
}) })
@ -291,6 +293,9 @@
this.addOptionsDialog = true this.addOptionsDialog = true
}, },
delAttr(i){ delAttr(i){
if(this.attrArr.length == 1){
return this.alertMessage('至少有一个规格')
}
this.attrArr.splice(i,1) this.attrArr.splice(i,1)
this.getFormatAttr() this.getFormatAttr()
}, },
@ -303,16 +308,16 @@
/// ///
submitAddAttr(){ submitAddAttr(){
if(this.attr.value == ''){ if(this.attr.value == ''){
return uni.showToast({ return this.alertMessage('请填写属性名称','none')
title: '请填写属性名称!',
icon: 'none'
})
} }
try{ try{
var o = this.attr.detail; var o = this.attr.detail;
if(o.length == 0){
throw "请至少填写一个属性值!";
}
o.forEach(function(item,index) { o.forEach(function(item,index) {
if(item == ""){ if(item == ""){
throw "属性规格不能为空!"; throw "属性不能为空!";
} }
}); });
} catch(e){ } catch(e){
@ -337,19 +342,13 @@
if(res.success){ if(res.success){
this.$set(this.batchData,'priceArr',res.data.value) this.$set(this.batchData,'priceArr',res.data.value)
if(res.data.attr){ if(res.data.attr){
let strArr = res.data.attr.map(item=>{ let strArr = res.data.attr.map(item=> item.value)
return item.value
})
this.$set(this.batchData,'titleStr',strArr.join('/')) this.$set(this.batchData,'titleStr',strArr.join('/'))
} else{ } else{
this.$set(this.batchData,'titleStr','') this.$set(this.batchData,'titleStr','')
} }
} else{ } else{
uni.showToast({ this.alertMessage(res.msg)
title: res.msg,
icon: 'none'
})
} }
}) })
}, },
@ -391,7 +390,6 @@
} else{ } else{
this.attrValTitle = '批量修改规格' this.attrValTitle = '批量修改规格'
} }
this.showAttrVal= true this.showAttrVal= true
}, },
cancelClick(){ cancelClick(){
@ -400,7 +398,7 @@
}, },
submitClick(){ submitClick(){
const idx = this.idx const idx = this.idx
console.log(this.price,this.ot_price,this.stock) // console.log(this.price,this.ot_price,this.stock)
if(this.stock == 0){ if(this.stock == 0){
return this.alertMessage('商品库存不能为0') return this.alertMessage('商品库存不能为0')
} }
@ -414,9 +412,6 @@
this.$set(this.batchData.priceArr[idx],'price',this.price) this.$set(this.batchData.priceArr[idx],'price',this.price)
this.$set(this.batchData.priceArr[idx],'ot_price',this.ot_price) this.$set(this.batchData.priceArr[idx],'ot_price',this.ot_price)
this.$set(this.batchData.priceArr[idx],'stock',this.stock) this.$set(this.batchData.priceArr[idx],'stock',this.stock)
// this.batchData.priceArr[idx].price= this.price
// this.batchData.priceArr[idx].ot_price= this.ot_price
// this.batchData.priceArr[idx].stock= this.stock
} }
this.showAttrVal= false this.showAttrVal= false
}, },
@ -436,77 +431,59 @@
isShow: this.isShow, isShow: this.isShow,
items: this.items items: this.items
} }
console.log(form.slider_image[0])
if(form.store_name == ''){ if(form.store_name == ''){
this.alertMessage('请填写商品名称') return this.alertMessage('请填写商品名称','none')
return } else if(form.slider_image[0]){
} else if(form.slider_image[0] == ''){ return this.alertMessage('请至少上传一张商品图片','none')
this.alertMessage('请至少上传一张商品图片')
return
} else if(form.description == ''){ } else if(form.description == ''){
this.alertMessage('请填写商品详情') return this.alertMessage('请填写商品详情','none')
return
} else if(form.description == ''){ } else if(form.description == ''){
this.alertMessage('请填写商品详情') return this.alertMessage('请填写商品详情','none')
return
} }
form.attrs.forEach((item,index)=>{ form.attrs.forEach((item,index)=>{
if(item.price == '' || item.price == 0){ if(item.price == '' || item.price == 0){
this.alertMessage('请商品规格价格') return this.alertMessage('请商品规格价格','none')
return
} else if(item.stock == '' || item.stock == 0){ } else if(item.stock == '' || item.stock == 0){
this.alertMessage('库存不能为0') return this.alertMessage('商品规格库存不能为0','none')
return
} }
}) })
if(this.id != ''){ if(this.id != ''){
form.id = this.id form.id = this.id
form.spec_type = this.spec_type form.spec_type = this.spec_type
console.log(form)
editProduct(form).then((res)=>{ editProduct(form).then((res)=>{
if(res.success){ if(res.success){
uni.showToast({ this.alertMessage(res.msg,'success')
title: res.msg,
duration: 1500
})
setTimeout((res)=>{ setTimeout((res)=>{
uni.redirectTo({ uni.redirectTo({
url: '/pages/user/goodsManage/index' url: '/pages/user/goodsManage/index?type=' + 0
}); });
},1500) },1500)
} else{ } else{
uni.showToast({ this.alertMessage(res.msg,'none')
title: res.msg,
icon: 'none'
})
} }
}) })
} else{ } else{
form.spec_type = this.batchData.priceArr.length > 1 ? 1 : 0 form.spec_type = this.batchData.priceArr.length > 1 ? 1 : 0
console.log(form)
addProduct(form).then((res)=>{ addProduct(form).then((res)=>{
if(res.success){ if(res.success){
uni.showToast({ this.alertMessage(res.msg,'success')
title: res.msg,
duration: 1500
})
setTimeout((res)=>{ setTimeout((res)=>{
uni.redirectTo({ uni.redirectTo({
url: '/pages/user/goodsManage/index' url: '/pages/user/goodsManage/index?type=' + 0
}); });
},1500) },1500)
} else{ } else{
uni.showToast({ this.alertMessage(res.msg,'none')
title: res.msg,
icon: 'none'
})
} }
}) })
} }
}, },
alertMessage(msg){ alertMessage(msg,type){
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: type,
duration: 1500
}) })
} }
} }

151
pages/life/articleDetail/index.vue

@ -1,62 +1,159 @@
<template> <template>
<view class="article-box"> <view class="article-box">
<view class="headline">楚牛电商一季度卖了300亿原因竟是这</view> <view class="article-header">
<view class="information-box acea-row"> <view class="headline">{{ detail.title }}</view>
<image src="../../../static/images/cart.png" mode=""></image> <view class="acea-row">
<view class="name">云快讯</view> <view class="header-img"><image :src="detail.authorLogo"></image></view>
<view class="">203 </view> <view class="">
<view>3小时前</view> <view class="release-auth">{{ detail.author }}</view>
<view class="acea-row">
<view class="fz24 acea-row row-middle">
<image
src="../../../static/images/eye.png"
class="eye-icon"
></image>
<text>{{ detail.visit }}</text>
</view>
<view class="fz24">{{ detail.formatTime }}</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="explain-box"
>转载声明本文由云快讯收录观点仅代表作者本人不代表云快讯立场云快讯不对所包含的准确性可靠性或完整性提供任何明示请自行承担任何责任</view
>
<rich-text :nodes="detail.content"></rich-text>
</view> </view>
<!-- <view class="statement">转载声明本文由云快讯收录观点仅代表作者本人不代表云快讯立场云快讯不对所包含的准确性可靠性或完整性提供任何明示请自行承担任何责任</view>
<image src="../../../static/images/gd1.png" mode="" class="article-bg1"></image> -->
</view> </view>
</template> </template>
<script> <script>
import { getCategory , getProducts, getArticle} from "@/api/store"; import { getArticleDetail } from "@/api/home";
export default { export default {
data() { data() {
return { return {
id: this.id, id: this.id,
} detail: {},
};
},
onShareAppMessage() {
return {
title: this.detail.title,
imageUrl: this.detail.imageInput,
path: "/pages/life/articleDetail/index?id=" + this.detail.id,
success(res) {
uni.showToast({
title: "分享成功",
});
},
fail(res) {
uni.showToast({
title: "分享失败",
icon: "none",
});
},
};
}, },
methods: { methods: {
getArticleDetail() {
getArticleDetail({ id: this.id }).then((res) => {
res.data.content = this.formatRichText(res.data.content);
this.detail = res.data;
});
},
formatRichText(html) {
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
match = match
.replace(/style="[^"]+"/gi, "")
.replace(/style='[^']+'/gi, "");
match = match
.replace(/width="[^"]+"/gi, "")
.replace(/width='[^']+'/gi, "");
match = match
.replace(/height="[^"]+"/gi, "")
.replace(/height='[^']+'/gi, "");
return match;
});
newContent = newContent.replace(
/style="[^"]+"/gi,
function (match, capture) {
match = match
.replace(/width:[^;]+;/gi, "max-width:100%;")
.replace(/width:[^;]+;/gi, "max-width:100%;");
return match;
}
);
newContent = newContent.replace(
/\<img/gi,
'<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"'
);
return newContent;
},
}, },
onLoad: function (option) { onLoad: function (option) {
this.id = this.$yroute.query.id; this.id = this.$yroute.query.id;
console.log(this.id) this.getArticleDetail();
},
} };
}
</script> </script>
<style lang="less"> <style lang="less">
.article-box { .article-box {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: #F5F6F7; .article-header {
padding: 0 40rpx; padding: 0 40rpx;
} }
.headline { .headline {
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
padding-top: 30rpx; padding-top: 20rpx;
margin-bottom: 60rpx; margin-bottom: 30rpx;
font-weight: 500;
} }
.information-box{ .header-img {
width: 278rpx;
height: 92rpx;
}
.information-box image{
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
margin-right: 20rpx; margin-right: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 25px;
}
}
.release-auth {
font-size: 32rpx;
color: #333;
line-height: 44rpx;
margin-bottom: 6rpx;
}
.fz24 {
font-size: 24rpx;
color: #707070;
margin-right: 20rpx;
}
.eye-icon {
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.content {
width: 100%;
padding: 24rpx;
overflow: hidden;
}
.explain-box {
width: 100%;
padding: 12rpx 34rpx;
background: #e3e3e3;
color: #999;
font-size: 24rpx;
line-height: 38rpx;
border-radius: 12rpx;
margin-bottom: 12rpx;
} }
.name{
width: 180rpx;
height: 40rpx;
} }
</style> </style>

192
pages/life/articleList/index.vue

@ -0,0 +1,192 @@
<template>
<view class="list-page">
<view class="search-box">
<view class="search-content acea-row row-middle">
<view class="search-icon"><image src="../../../static/images/search.png"> </image></view>
<input type="text" placeholder="请输入相关关键词" />
<view class="search-btn">搜一下</view>
</view>
</view>
<view class="list-box">
<view class="list-item acea-row row-between row-middle" v-for="(item,index) in articleList" :key="index" @click="toDetail(item.id)">
<view class="item-l">
<view class="title-box acea-row">
<image src="../../../static/images/hot.png" v-if="item.isHot"></image>
<view class="title line2">{{item.title}}</view>
</view>
<view class="auth-info acea-row row-between">
<view class="auth">{{item.author}}</view>
</view>
<view class="acea-row row-middle">
<view class="auth time">{{item.createTime}}</view>
<view class="see acea-row row-middle">
<text>200</text>
<image src="../../../static/images/eye.png"></image>
</view>
</view>
</view>
<view class="item-r">
<image :src="item.imageInput" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="loadStatus-box">{{loadStatus}}</view>
</view>
</template>
<script>
import { getArticle } from "@/api/home";
export default{
data(){
return{
articleList: [],
page: 0,
size: 10,
isLoading: true,
loadStatus: '没有更多了...'
}
},
mounted() {
this.getArticleList()
},
onReachBottom() {
this.page= this.page+1
this.getArticleList()
},
methods:{
getArticleList(){
if(!this.isLoading) return
uni.showLoading({
title: '加载中...'
})
this.loadStatus = '加载中...'
getArticle({page: this.page,size: this.size, isHot: 0}).then((res)=>{
if(res.data.content.length < this.size){
this.loadStatus = '没有更多了...'
this.isLoading = false
} else{
this.isLoading = true
this.loadStatus = '上拉加载更多...'
}
this.articleList = this.articleList.concat(res.data.content)
uni.hideLoading()
})
},
toDetail(id){
this.$yrouter.push({
path: '/pages/life/articleDetail/index',
query: {
id: id
}
})
}
}
}
</script>
<style lang="less">
.list-page{
width: 100%;
min-height: 100vh;
background: #EEEEEE;
.search-box{
width: 100%;
padding: 32rpx 40rpx;
background: #fff;
position: fixed;
top: 0;
.search-icon{
width: 35rpx;
height: 35rpx;
margin-right: 12rpx;
image{
width: 100%;
height: 100%;
}
}
.search-content{
width: 100%;
padding: 0 0 0 50rpx;
border: 2rpx solid #FF5100;
border-radius: 8rpx;
font-size: 28rpx;
border-right: 0;
input{
color: #BFBFBF;
}
.search-btn{
width: 132rpx;
height: 68rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
line-height: 68rpx;
text-align: center;
color: #fff;
border-radius: 8rpx;
margin-left: auto;
}
}
}
.list-box{
width: 100%;
padding: 180rpx 40rpx 0rpx;
.list-item{
width: 100%;
background: #fff;
border-radius: 12rpx;
padding: 30rpx 28rpx;
font-size: 24rpx;
color: #707070;
margin-bottom: 24rpx;
.item-l{
width: calc(100% - 280rpx);
display: flex;
flex-direction: column;
justify-content: space-between;
.title-box{
font-size: 32rpx;
color: #4A4A4A;
margin-bottom: 12rpx;
image{
width: 19rpx;
height: 22rpx;
margin-right: 20rpx;
}
.title{
width: calc(100% - 38rpx);
margin-top: -10rpx;
}
}
.auth-info{
margin-bottom: 12rpx;
}
.see{
margin-left: 20rpx;
image{
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
}
.item-r{
width: 240rpx;
image{
width: 100%;
height: 130rpx;
border-radius: 16rpx;
}
}
}
}
.loadStatus-box{
text-align: center;
font-size: 28rpx;
color: #000;
padding: 30rpx 0;
}
}
</style>

605
pages/life/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="productSort"> <view class="productSort">
<!-- <view class="page-top-box" :class="isFixed == true ? 'on' : ''"> <view class="page-top-box" :class="isFixed == true ? 'on' : ''">
<view class="top-box acea-row row-between-wrapper"> <view class="top-box acea-row row-between-wrapper">
<view class="top-box-l acea-row row-middle"> <view class="top-box-l acea-row row-middle">
<image src="../../static/images/localtion.png"></image> <image src="../../static/images/localtion.png"></image>
@ -17,7 +17,7 @@
</view> </view>
</view> </view>
</div> </div>
</view> --> </view>
<!-- <view class="banner-img-box acea-row row-between-wrapper"> <!-- <view class="banner-img-box acea-row row-between-wrapper">
<view class="img-box-l"> <view class="img-box-l">
<image src="https://download.cyjyyjy.com/life1.png" @click="alertMessage('功能开发中...')"></image> <image src="https://download.cyjyyjy.com/life1.png" @click="alertMessage('功能开发中...')"></image>
@ -27,146 +27,34 @@
<image src="https://download.cyjyyjy.com/life3.png" @click="alertMessage('功能开发中...')"></image> <image src="https://download.cyjyyjy.com/life3.png" @click="alertMessage('功能开发中...')"></image>
</view> </view>
</view> --> </view> -->
<!-- 顶部主页 -->
<view class="main-box">
<view class="back-bg"><image src="../../static/images/life-bg.png" mode=""></image></view>
<view class="top-logo acea-row row-center" :style="'top:' + menuTop + 'px;height:' + menuHeight + 'px;line-height: ' + menuHeight + 'px;'">禪易生态云</view>
<view class="details-btn">了解详情</view>
</view>
<!-- 云快讯 -->
<view class="yun-box">
<view class="acea-row row-between-wrapper">
<image src="../../static/images/yun.png" class="headline-yun"></image>
<view class="more-r">
<text>查看更多</text>
<image src="../../static/images/home/arrow-r.png"></image>
</view>
</view>
<view class="rotaion">
<vSwiper :imgs="yunList"></vSwiper>
</view>
</view>
<!-- 最新活动 -->
<view class="act-box" >
<view class="headline"><image src="../../static/images/new-act.png" mode=""></image></view>
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="slide-left" v-for="(item,index) in activity" :key="index" @tap="toActiveDetail" :data-id="item.id">
<view class="act-title">{{item.name}}</view>
<view class="resource-list acea-row-nowrap">
<image :src="item.images" class="act-img"></image>
<view>
<view class="act-time acea-row row-left">
<image src="../../static/images/act-time.png" mode=""></image>
<view>{{item.activityStartTime.split(' ')[0]}}{{item.activityEndTime.split(' ')[0]}}</view>
</view>
<view class="act-adress acea-row row-left">
<image src="../../static/images/act-address.png" mode=""></image>
<view class="line1">{{item.address}}</view>
</view>
<view class="acea-row row-between-wrapper act-price">
<text class="act-i">进行中</text>
<text class="act-p">{{item.price}}</text>
</view>
</view>
</view>
<view class="act-bottom acea-row row-middle">
<view class="acea-row row-middle act-num">
<image src="../../static/images/cart.png"></image>
<image src="../../static/images/cart.png"></image>
<image src="../../static/images/cart.png"></image>
<text>15人报名</text>
</view>
<view class="enter-btn">去报名</view>
</view>
</view>
</scroll-view>
</view>
<!-- 为您推荐 -->
<view class="rec-box">
<view class="headline"><image src="../../static/images/rec-headline.png" mode=""></image></view>
<view class="rec-switch">
<view class="rec-title acea-row">
<view class="rec-l " @click="tabClick(1)">
<image src="../../static/images/rec-bg.png" class="rec-bg" v-show="active == 1"></image>
<view class="rec-t acea-row row-center-wrapper">
<image src="../../static/images/rec-icon1.png" mode=""></image>
<view>需求</view>
</view>
</view>
<view class="rec-r " @click="tabClick(2)">
<image src="../../static/images/rec-bg.png" class="rec-bg" v-show="active == 2"></image>
<view class="rec-t acea-row row-center-wrapper">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view>资源</view>
</view>
</view>
</view>
<view class="rec-switch-a">
<view class="list-box" v-if="active == 1">
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李子龙111</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李大龙</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
</view>
<view class="list-box" v-if="active == 2">
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李木龙</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
<view class="rec-list" >
<view class="acea-row row-middle">
<image src="../../static/images/rec-icon2.png" mode=""></image>
<view class="rec-name">李子龙111qqq</view>
<view class="rec-address">武汉</view>
<view class="rec-end acea-row row-right">2021.8.30截止报名</view>
</view>
<view class="rec-message">我有景区方面资源洽谈商务合作...</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="category-tab-box"> <view class="category-tab-box">
<scroll-view class="scroll-view_H" scroll-x="true"> <scroll-view class="scroll-view_H" scroll-x="true">
<view class="category-item category-item-active">全部商品</view> <view class="category-item category-item-active">全部商品</view>
<view class="category-item">至尊保驾</view> <!-- <view class="category-item">至尊保驾</view>
<view class="category-item">优选好房</view> <view class="category-item">优选好房</view>
<view class="category-item">商城福利</view> <view class="category-item">商城福利</view>
<view class="category-item">回头率</view> <view class="category-item">回头率</view> -->
</scroll-view> </scroll-view>
</view> --> </view>
<view class="warter-box"> <view class="warter-box">
<view class="headline"> <!-- <view class="headline">
<image src="../../static/images/rec-title.png" mode=""></image> <image src="../../static/images/rec-title.png" mode=""></image>
</view> </view> -->
<u-waterfall v-model="flowList" ref="uWaterfall"> <u-waterfall v-model="flowList" ref="uWaterfall">
<template v-slot:left="{ leftList }"> <template v-slot:left="{ leftList }">
<view class="warter" v-for="(item, index) in leftList" :key="index" @tap="toGoodsDetail(item.id)"> <view
<image class="warter-img" :src="item.image" :index="index" mode="widthFix"></image> class="warter"
v-for="(item, index) in leftList"
:key="index"
@tap="toGoodsDetail(item.id)"
>
<image
class="warter-img"
:src="item.image"
:index="index"
mode="widthFix"
></image>
<view class="goodsinfo-box"> <view class="goodsinfo-box">
<view class="title line2"> {{ item.storeName }} </view> <view class="title line2"> {{ item.storeName }} </view>
<view class="price-box acea-row row-between-wrapper"> <view class="price-box acea-row row-between-wrapper">
@ -177,8 +65,18 @@
</view> </view>
</template> </template>
<template v-slot:right="{ rightList }"> <template v-slot:right="{ rightList }">
<view class="warter" v-for="(item, index) in rightList" :key="index" @tap="toGoodsDetail(item.id)"> <view
<image class="warter-img" :src="item.image" :index="index" mode="widthFix"></image> class="warter"
v-for="(item, index) in rightList"
:key="index"
@tap="toGoodsDetail(item.id)"
>
<image
class="warter-img"
:src="item.image"
:index="index"
mode="widthFix"
></image>
<view class="goodsinfo-box"> <view class="goodsinfo-box">
<view class="title line2"> {{ item.storeName }} </view> <view class="title line2"> {{ item.storeName }} </view>
<view class="price-box acea-row row-between-wrapper"> <view class="price-box acea-row row-between-wrapper">
@ -189,7 +87,11 @@
</view> </view>
</template> </template>
</u-waterfall> </u-waterfall>
<u-loadmore bg-color="rgb(240, 240, 240)" :status="loadStatus" @loadmore="addRandomData"></u-loadmore> <u-loadmore
bg-color="rgb(240, 240, 240)"
:status="loadStatus"
@loadmore="addRandomData"
></u-loadmore>
</view> </view>
<tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar> <tabbar :current="currentTabIndex" @click="tabBarClick"></tabbar>
</view> </view>
@ -197,17 +99,17 @@
<script> <script>
import { getCategory, getProducts, getArticle, getActivity } from "@/api/store"; import { getCategory, getProducts, getArticle, getActivity } from "@/api/store";
import { trim } from "@/utils"; import { trim } from "@/utils";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import tabbar from "../../tabbarComponent/tabbar"; import tabbar from "../../tabbarComponent/tabbar";
import vSwiper from '@/components/vSwiper.vue' import vSwiper from "@/components/vSwiper.vue";
const app = getApp(); const app = getApp();
export default { export default {
components: { components: {
tabbar, tabbar,
vSwiper vSwiper,
}, },
name: "GoodsClass", name: "GoodsClass",
computed: mapGetters(['userInfo']), computed: mapGetters(["userInfo"]),
props: {}, props: {},
data: function () { data: function () {
return { return {
@ -221,11 +123,11 @@ export default {
currentTabIndex: 3, currentTabIndex: 3,
flowList: [], flowList: [],
isFixed: false, isFixed: false,
loadStatus: 'loadmore', loadStatus: "loadmore",
page: 1, page: 1,
limit: 10, limit: 10,
isLoad: true, // isLoad: true, //
yunList: [], articleList: [],
active: 1, active: 1,
show: false, show: false,
activity: [], activity: [],
@ -236,41 +138,43 @@ export default {
if (n) { if (n) {
this.activeCateId(n); this.activeCateId(n);
} }
} },
}, },
// onShow: function (options) { // onShow: function (options) {
// }, // },
mounted: function () { mounted: function () {
this.getProducts(); this.getProducts();
this.getArticle();
this.getActivity(); this.getActivity();
}, },
onReachBottom() { onReachBottom() {
if (this.isLoad) { if (this.isLoad) {
this.page = this.page+1 this.page = this.page + 1;
this.getProducts(); this.getProducts();
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
wx.showNavigationBarLoading(); wx.showNavigationBarLoading();
this.isLoad= true this.isLoad = true;
this.page= 1 this.page = 1;
this.getActivity();
this.clear().then(() => { this.clear().then(() => {
console.log('清除')
this.getProducts(); this.getProducts();
}) });
}, },
methods: { methods: {
toAritcleList() {
this.$yrouter.push("/pages/life/articleList/index");
},
async clear() { async clear() {
this.$refs.uWaterfall.clear(); this.$refs.uWaterfall.clear();
}, },
tabBarClick(index) { tabBarClick(index) {
this.currentTabIndex = index this.currentTabIndex = index;
}, },
goShoppingCart() { goShoppingCart() {
this.$yrouter.push('/pages/shop/ShoppingCart/index') this.$yrouter.push("/pages/shop/ShoppingCart/index");
}, },
goGoodSearch() { goGoodSearch() {
this.$yrouter.push("/pages/shop/GoodSearch/index"); this.$yrouter.push("/pages/shop/GoodSearch/index");
@ -278,13 +182,13 @@ export default {
goGoodsList(child) { goGoodsList(child) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsList/index", path: "/pages/shop/GoodsList/index",
query: { id: child.id, title: child.cateName } query: { id: child.id, title: child.cateName },
}); });
}, },
toGoodsDetail(id) { toGoodsDetail(id) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsCon/index", path: "/pages/shop/GoodsCon/index",
query: { id: id } query: { id: id },
}); });
}, },
activeCateId(n) { activeCateId(n) {
@ -299,7 +203,7 @@ export default {
} }
}, },
loadCategoryData() { loadCategoryData() {
getCategory().then(res => { getCategory().then((res) => {
this.category = res.data; this.category = res.data;
this.$nextTick(() => { this.$nextTick(() => {
if (this.$yroute.query.id) { if (this.$yroute.query.id) {
@ -307,63 +211,52 @@ export default {
} }
}); });
}); });
},
getArticle(){
let data = {
isHot: 0,
page: 0,
size: 100
}
getArticle(data).then(res=>{
console.log(res)
this.yunList = res.data.content
})
}, },
getActivity() { getActivity() {
getActivity().then(res=>{ getActivity().then((res) => {
this.articleList = res.data.articleList;
this.activity = res.data.activityList; this.activity = res.data.activityList;
console.log(res); });
})
}, },
toActiveDetail(e) { toActiveDetail(e) {
let id = e.currentTarget.dataset.id; let id = e.currentTarget.dataset.id;
uni.navigateTo({ uni.navigateTo({
url: '/pages/activity/detail/index?id=' + id url: "/pages/activity/detail/index?id=" + id,
}); });
}, },
tabClick(i) { tabClick(i) {
console.log(i,'aiiii') console.log(i, "aiiii");
this.active= i this.active = i;
}, },
getProducts() { getProducts() {
this.loadStatus = 'loading'; this.loadStatus = "loading";
getProducts({ page: this.page, limit: this.limit }).then((res) => { getProducts({ page: this.page, limit: this.limit }).then((res) => {
// console.log(res) // console.log(res)
if (this.page > 1) { if (this.page > 1) {
this.flowList = this.flowList.concat(res.data) this.flowList = this.flowList.concat(res.data);
} else { } else {
this.flowList = res.data this.flowList = res.data;
} }
this.isLoad = this.limit <= res.data.length // this.isLoad = this.limit <= res.data.length
if(this.limit <= res.data.length){ //length if (this.limit <= res.data.length) {
this.isLoad = true //length
this.isLoad = true;
} else { } else {
console.log('没有了') console.log("没有了");
this.isLoad = false this.isLoad = false;
this.loadStatus = 'nomore'; this.loadStatus = "nomore";
} }
wx.hideNavigationBarLoading() wx.hideNavigationBarLoading();
uni.stopPullDownRefresh() uni.stopPullDownRefresh();
}) });
}, },
submitForm: function () { submitForm: function () {
var val = trim(this.search); var val = trim(this.search);
if (val) { if (val) {
this.$yrouter.push({ this.$yrouter.push({
path: "/pages/shop/GoodsList/index", path: "/pages/shop/GoodsList/index",
query: { s: val } query: { s: val },
}); });
setTimeout(() => (this.search = ""), 500); setTimeout(() => (this.search = ""), 500);
} }
@ -374,24 +267,23 @@ export default {
alertMessage(msg) { alertMessage(msg) {
uni.showToast({ uni.showToast({
title: msg, title: msg,
icon: 'none' icon: "none",
}) });
}, },
}, },
beforeDestroy: function () { beforeDestroy: function () {
// document.removeEventListener("scroll", this.onScroll, false); // document.removeEventListener("scroll", this.onScroll, false);
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.productSort { .productSort {
// height: 100%; // height: 100%;
// padding-bottom: 200rpx; // padding-bottom: 200rpx;
background: #EEEEEE !important; background: #eeeeee !important;
position: relative; position: relative;
} }
@ -433,337 +325,56 @@ export default {
padding: 0; padding: 0;
margin-top: 34rpx; margin-top: 34rpx;
.search { .search {
background-color: #EEEEEE; background-color: #eeeeee;
border-radius: 8rpx; border-radius: 8rpx;
} }
} }
} }
} }
.category-tab-box {
.main-box{
width: 100%;
height: 522rpx;
position: relative;
}
.back-bg image{
width: 100%;
height: 522rpx;
}
.logo-title image{
margin-left: 20rpx;
width: 80rpx;
height: 50rpx;
}
.top-logo{
position: absolute;
width: 100%; width: 100%;
color: #fff; height: 108rpx;
font-weight: 600; line-height: 108rpx;
font-size: 32rpx; padding-left: 30rpx;
} // margin-bottom: 30rpx;
.details-btn{ padding-top: 190rpx;
width: 196rpx;
height: 52rpx;
border: 2rpx solid #FFFFFF;
border-radius: 26px;
position: absolute;
bottom: 100rpx;
left: 50%;
margin-left: -98rpx;
text-align: center;
line-height: 50rpx;
color: #fff;
font-size: 32rpx;
}
//
.yun-box{
margin: 8rpx 40rpx 28rpx 40rpx;
}
.headline-yun{
width: 112rpx;
height: 52rpx;
}
.more-r{
font-size: 24rpx;
color: #8B8B8B;
}
.more-r image{
width: 12rpx;
height: 18rpx;
margin-left: 8rpx;
}
.rotaion{
width: 670rpx;
margin-top: 24rpx;
}
//
.act-box{
width: 100%;
height: 400rpx;
margin-left: 40rpx;
}
.scroll-view_H { .scroll-view_H {
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
} .category-item {
.slide-left{
width: 584rpx;
height: 344rpx;
display: inline-block; display: inline-block;
border-radius: 16rpx;
background-color: #fff;
padding: 20rpx 32rpx 0 20rpx;
margin-right: 32rpx;
}
.act-title{
font-size: 28rpx; font-size: 28rpx;
color: #191919;
}
.resource-list{
width: 100%;
height: 190rpx;
margin: 18rpx 0 14rpx 0;
}
.act-img{
width: 162rpx;
height: 190rpx;
margin-right: 28rpx;
border-radius: 12rpx;
}
.act-adress,.act-time{
margin: 8rpx 0 20rpx 0;
}
.act-adress view,.act-time view{
width: 300rpx;
font-size: 24rpx;
color: #191919;
}
.act-time image{
width: 18rpx;
height: 22rpx;
margin: 7rpx 16rpx 0 0;
}
.act-adress image{
width: 19rpx;
height: 23rpx;
margin: 8rpx 14rpx 0 0;
}
.act-price{
margin-top: 40rpx;
}
.act-i {
font-size: 24rpx;
color: #FF5A0E;
}
.act-p{
font-size: 32rpx;
color: #2A2B2B;
font-weight: 600;
}
.act-bottom{
position: relative;
width: 562rpx;
height: 62rpx;
border-top: 1rpx solid #ECECEC;
}
.act-num image{
width: 36rpx;
height: 36rpx;
border-radius: 50%;
}
.act-num{
min-width: 154rpx;
}
.act-num text{
font-size: 20rpx;
color: #191919;
margin-left: 8rpx;
}
.enter-btn{
width: 138rpx;
height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
text-align: center; color: #999;
background: linear-gradient(39deg, #FF5A0D 0%, #FFAC85 100%); margin-right: 40rpx;
border-radius: 26rpx; &.category-item-active {
color: #fff; color: #ff6d31;
position: absolute; font-size: 32rpx;
right: 38rpx; font-weight: 500;
}
//
.rec-box{
width: 706rpx;
height: 493rpx;
margin: 32rpx 22rpx 8rpx 22rpx;
position: relative;
}
.rec-switch{
width: 706rpx;
height: 423rpx;
margin-top: 18rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx;
overflow: hidden;
}
.rec-bg{
width: 706rpx;
height: 423rpx;
}
.rec-title{
width: 100%;
height: 80rpx;
position: relative;
}
.rev-bg{
width: 376rpx;
height: 80rpx;
position: absolute;
left: 0;
}
.rev-bg2{
width: 376rpx;
height: 80rpx;
position: absolute;
left: 0;
background-image: url(../../static/images/rec-bg.png);
}
.rec-l,.rec-r{
width: 50%;
z-index: 2;
position: relative; position: relative;
} &::after {
.rec-l .rec-bg, .rec-r .rec-bg{ content: "";
width: 100%; width: 70rpx;
height: 100%; height: 8rpx;
border-radius: 6rpx;
display: block;
position: absolute; position: absolute;
top: 0; bottom: -24rpx;
left: 0; left: 0;
background: #ff7942;
} }
.rec-r .rec-bg{
transform: rotate(180deg);
} }
.rec-t{
width: 100%;
height: 100%;
position: absolute;
z-index: 3;
} }
.rec-l image{
width: 37rpx;
height: 37rpx;
margin-right: 8rpx;
} }
.rec-r image{
width: 42rpx;
height: 43rpx;
margin-right: 8rpx;
}
.rec-switch-a{
width: 100%;
height: 330rpx;
}
.list-box{
width: 100%;
height: 330rpx;
}
.rec-list{
position: relative;
height: 165rpx;
padding: 33rpx 40rpx 0 40rpx;
}
.rec-list image{
width: 64rpx;
height: 64rpx;
}
.rec-name{
font-size: 28rpx;
color: #1D1D1D;
margin-left: 16rpx;
}
.rec-address{
width: 80rpx;
height: 34rpx;
font-size: 24rpx;
line-height: 34rpx;
color: #FFFFFF;
background: #FF5100;
border-radius: 16px;
text-align: center;
}
.rec-end{
font-size: 24rpx;
color: #707070;
position: absolute;
right: 22rpx;
}
.rec-message{
width: 582rpx;
height: 40rpx;
font-size: 28rpx;
color: #1D1D1D;
margin-top: 15rpx;
}
// .category-tab-box{
// border: 1rpx solid black;
// width: 100%;
// height: 108rpx;
// line-height: 108rpx;
// padding-left: 30rpx;
// // margin-bottom: 30rpx;
// // padding-top: 190rpx;
// .scroll-view_H{
// white-space: nowrap;
// width: 100%;
// .category-item{
// display: inline-block;
// font-size: 28rpx;
// line-height: 40rpx;
// color: #999;
// margin-right: 40rpx;
// &.category-item-active{
// color: #FF6D31;
// font-size: 32rpx;
// font-weight: 500;
// position: relative;
// &::after{
// content: '';
// width: 70rpx;
// height: 8rpx;
// border-radius: 6rpx;
// display: block;
// position: absolute;
// bottom: -24rpx;
// left: 0;
// background: #FF7942;
// }
// }
// }
// }
// }
.headline image{
width: 148rpx;
height: 52rpx;
} }
.warter-box { .warter-box {
width: 100%; width: 100%;
padding: 24rpx 0 190rpx 24rpx; padding: 126rpx 24rpx 190rpx 24rpx;
.u-waterfall { .u-waterfall {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.u-column { .u-column {
.warter { .warter {
width: 336rpx !important; width: 336rpx !important;
border-radius: 10rpx; border-radius: 10rpx;
@ -782,7 +393,7 @@ export default {
.title { .title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #1D1D1D; color: #1d1d1d;
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
} }
@ -790,12 +401,12 @@ export default {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
line-height: 40rpx; line-height: 40rpx;
color: #FF7942; color: #ff7942;
} }
.old-price { .old-price {
font-size: 20rpx; font-size: 20rpx;
line-height: 28rpx; line-height: 28rpx;
color: #BFBFBF; color: #bfbfbf;
text-decoration: line-through; text-decoration: line-through;
} }
} }
@ -870,7 +481,7 @@ export default {
} }
.price { .price {
font-size: 28rpx; font-size: 28rpx;
color: #E5270F; color: #e5270f;
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 26rpx; margin-bottom: 26rpx;
} }

31
pages/life/learnMore/index.vue

@ -0,0 +1,31 @@
<template>
<swiper class="swiper-box" autoplay="true" indicator-dots='true' indicator-color='#B17815' indicator-active-color='#FFB93E' >
<swiper-item>
<image src="../../../static/images/learnMore1.png"></image>
</swiper-item>
<swiper-item>
<image src="../../../static/images/learnMore2.png"></image>
</swiper-item>
<swiper-item>
<image src="../../../static/images/learnMore3.png"></image>
</swiper-item>
<swiper-item>
<image src="../../../static/images/learnMore4.png"></image>
</swiper-item>
</swiper>
</template>
<script>
</script>
<style>
.swiper-box{
width: 100%;
height: 100vh;
background-color: #070604;
}
.swiper-box image{
width: 100%;
height: 100vh;
}
</style>

105
pages/life/temp/index.vue

@ -22,9 +22,9 @@
<view class="step-freight-box"> <view class="step-freight-box">
<view class="acea-row row-between"> <view class="acea-row row-between">
<view>阶梯运费</view> <view>阶梯运费</view>
<switch :checked="setpFreight" color="#FF6D31" style="transform:scale(0.7)" @change="switchChange" /> <switch :checked="templateList[0]" color="#FF6D31" style="transform:scale(0.7)" @change="switchChange" />
</view> </view>
<view class="step-box" v-show="setpFreight"> <view class="step-box" v-show="templateList[0]">
<view class="acea-row row-middle row-center"> <view class="acea-row row-middle row-center">
<input class="inp-price" type="text" v-model="templateList[0].first" /> <input class="inp-price" type="text" v-model="templateList[0].first" />
<text>{{type == 0 ? '件' : 'kg' }}()</text> <text>{{type == 0 ? '件' : 'kg' }}()</text>
@ -87,76 +87,8 @@
const app = getApp(); const app = getApp();
import selectTree from "@/components/select-tree/select-tree" import selectTree from "@/components/select-tree/select-tree"
import tkiTree from "@/components/tki-tree/tki-tree.vue" import tkiTree from "@/components/tki-tree/tki-tree.vue"
import { getCity, citys, addTemp } from "@/api/user"; import { getCity, citys, addTemp, getTempDetail } from "@/api/user";
let testList = [
{
city_id: 1,
id: 1,
isShow: 1,
lat: "39.904030",
level: 0,
lng: "116.407526",
mergerName: "北京",
name: "北京市",
parentId: 0,
children: [
{
areaCode: "110100000000",
children: null,
city_id: 2,
id: 35,
isShow: 1,
lat: "39.904030",
level: 1,
lng: "116.407526",
mergerName: "北京",
name: "北京市",
parentId: 1,
},
]
},
{
areaCode: "130000000000",
children: [
{
areaCode: "130100000000",
children: null,
city_id: 13268,
id: 37,
isShow: 1,
lat: "38.042306",
level: 1,
lng: "114.514859",
mergerName: "河北,石家庄",
name: "石家庄市",
parentId: 13267,
},
{
areaCode: "130200000000",
children: null,
city_id: 18128,
id: 38,
isShow: 1,
lat: "39.630867",
level: 1,
lng: "118.180193",
mergerName: "河北,唐山",
name: "唐山市",
parentId: 13267,
}
],
city_id: 13267,
id: 3,
isShow: 1,
lat: "38.037057",
level: 0,
lng: "114.468664",
mergerName: "河北",
name: "河北省",
parentId: 0,
}
]
var g = [ var g = [
{ {
region: [ region: [
@ -182,17 +114,36 @@ export default {
name: "", name: "",
type:0, type:0,
setpFreight: false, setpFreight: false,
list: testList, list: [],
templateList: g templateList: g,
id: null
}; };
}, },
mounted(){ mounted(){
if(this.$yroute.query.id){
this.id = this.$yroute.query.id
this.getTempDetail(this.$yroute.query.id)
}
citys().then((res)=>{ citys().then((res)=>{
let data = res.data; let data = res.data;
this.list = data this.list = data
}) })
}, },
methods: { methods: {
getTempDetail(id){
getTempDetail(id).then((res)=>{
if(res.success){
this.name= res.data.name
this.type= res.data.type
this.templateList = res.data.region_info
this.templateList.forEach((item)=>{
item.setpFreight = true
})
} else{
this.alertMessage(res.msg)
}
})
},
radioChange(e){ radioChange(e){
this.type = e.detail.value this.type = e.detail.value
}, },
@ -208,13 +159,13 @@ export default {
this.$refs.tkitree._show(); this.$refs.tkitree._show();
}, },
delTempItem(idx){ delTempItem(idx){
console.log(idx)
this.templateList.splice(idx,1) this.templateList.splice(idx,1)
}, },
// //
treeConfirm(e) { treeConfirm(e) {
// console.log(e,'') console.log(e,'确认')
// console.log(this.list,'') console.log(this.list,'列表')
if(e.length == 0) return
let list = this.list; let list = this.list;
let selectCity = e; let selectCity = e;
let selectName = []; let selectName = [];
@ -260,13 +211,13 @@ export default {
// //
treeCancel(e) { treeCancel(e) {
console.log(e) console.log(e)
}, },
submit(){ submit(){
let form = {} let form = {}
form.name = this.name form.name = this.name
form.type = this.type form.type = this.type
form.region_info = this.templateList form.region_info = this.templateList
form.id = this.id
if(form.name == '' ){ if(form.name == '' ){
return this.alertMessage('请填写模板名字') return this.alertMessage('请填写模板名字')

44
pages/life/tempList/index.vue

@ -5,9 +5,14 @@
<view class="temp-name"> <view class="temp-name">
{{index + 1}}{{item.name}} {{index + 1}}{{item.name}}
</view> </view>
<view class="acea-row row-middle">
<view class="handle-btn" @tap.stop="del(item)"> <view class="handle-btn" @tap.stop="del(item)">
<image src="../../../static/images/del-goods.png"></image> <image src="../../../static/images/del-goods.png"></image>
</view> </view>
<view class="handle-btn" @tap.stop="edit(item)">
<image src="../../../static/images/edit-icon.png"></image>
</view>
</view>
</view> </view>
</view> </view>
<view class="btn-box" @tap.stop="toTemp">新增运费模板</view> <view class="btn-box" @tap.stop="toTemp">新增运费模板</view>
@ -15,7 +20,7 @@
</template> </template>
<script> <script>
import { getTempList } from '@/api/user' import { getTempList, delTemp } from '@/api/user'
export default{ export default{
data(){ data(){
return { return {
@ -46,7 +51,24 @@
} }
}, },
del(item){ del(item){
let id = [item.id]
if(item.id == 1) return uni.showToast({ title: '默认模板不可删除!', icon:'none', })
uni.showModal({
title: '提示!',
content: '是否确认删除运费模板?',
success: (r) => {
if(r.confirm){
delTemp(id).then((res)=>{
if(res.success){
this.alertMessage('操作成功!')
this.getTempList()
} else{
this.alertMessage(res.msg)
}
})
}
}
})
}, },
getTempList(){ getTempList(){
getTempList().then((res)=>{ getTempList().then((res)=>{
@ -59,6 +81,17 @@
uni.navigateTo({ uni.navigateTo({
url:'/pages/life/temp/index' url:'/pages/life/temp/index'
}) })
},
edit(item){
uni.navigateTo({
url:'/pages/life/temp/index?id='+ item.id
})
},
alertMessage(msg){
uni.showToast({
title: msg,
icon: 'none'
})
} }
} }
} }
@ -94,9 +127,12 @@
} }
.handle-btn{ .handle-btn{
margin-left: 12rpx; margin-left: 12rpx;
width: 38rpx;
height: 100%;
text-align: center;
image{ image{
width: 29rpx; width: 35rpx;
height: 29rpx; height: 35rpx;
} }
} }
} }

378
pages/life/yunInfo/index.vue

@ -0,0 +1,378 @@
<template>
<view class="information-box">
<view class="search-box acea-row row-middle" >
<image src="../../../static/images/search-icon.png" mode=""></image>
<input type="text" value="" placeholder="请输入相关关键词"/>
<view class="search acea-row row-center-wrapper">搜一下</view>
</view>
<view class="vote-box">
<view class="news">
<view class="news-title-h">武汉12月底双层公交车将全面下线</view>
<view class="news-title-s">趁着有时间和你爱的人再去回味一下,那你认为有下线的必要吗</view>
</view>
<view class="vote">
</view>
</view>
<scroll-view class="scroll-view_N" scroll-x="true" >
<view class="rotaion" v-for="(item,index) in 7" :key="index">
<view class="acea-row row-center">
<image src="../../../static/images/collect.png" mode=""></image>
<view class="rotaion-h">今日大事</view>
<view class="rotaion-s">每日热点资讯</view>
</view>
</view>
</scroll-view>
<!-- 最新资讯 -->
<view class="newInfo-box">
<image src="../../../static/images/newInfo.png" mode="" class="newInfo-title-img"></image>
<view class="newInfo" >
<view class="modular acea-row row-between" v-for="(item,index) in 3" :key="index">
<view class="acea-row title" >
<view class="modular-h">海鸥出行将大巴车市场带入平台化阶段提高包车出行效率</view>
<view class="title-l acea-row row-between">
<view>云资讯</view>
<view>1小时前</view>
<view class="acea-row row-middle">203
<image src="../../../static/images/ear.png" mode="" ></image>
</view>
</view>
</view>
<image src="../../../static/images/home/top-bg.png" mode="" ></image>
</view>
</view>
</view>
<!-- 热点精选 -->
<view class="hotspot-box">
<image src="../../../static/images/user/hotspot.png" mode="" class="title-h-img"></image>
<scroll-view class="scroll-view_H acea-row" scroll-x="true" >
<view class="slide-box" v-for="(item,index) in 3" :key="index">
<image src="../../../static/images/home/top-bg.png" mode=""></image>
<view class="hotspot-con">
<view class="hotspot-icon">热点</view>
<view class="hotspot-title-h">禅易云生态加入云生态共建万亿私域资源圈获取海量资源与福利</view>
</view>
</view>
</scroll-view>
</view>
<!-- 值得关注 -->
<view class="follow-box">
<image src="../../../static/images/follow-title.png" mode="" class="title-h-img"></image>
<view class="follow-con" v-for="(item,index) in 3" :key="index">
<view class="follow-top acea-row row-between">
<view class="acea-row follow-title" >
<view class="follow-h">2021中国酒店与商用厨具行业品牌盛会</view>
<view class="follow-title-l acea-row row-between">
<view>云资讯</view>
<view>1小时前</view>
<view class="acea-row row-middle">203
<image src="../../../static/images/ear.png" mode="" ></image>
</view>
</view>
</view>
<image src="../../../static/images/home/top-bg.png" mode="" ></image>
</view>
<view class="follow-bottom acea-row row-middle">
<image src="../../../static/images/collect.png" mode=""></image>
<view class="follow-title-b">
<view class="title-s">云咨詢</view>
<view class="title-con">每天发布商业/生活等相关内容...</view>
</view>
<view class="follow-btn">关注+</view>
</view>
</view>
</view>
</view>
</template>
<script>
</script>
<style>
.information-box{
width: 100%;
height: 100vh;
position: relative;
}
.search-box{
width: 670rpx;
height: 68rpx;
border: 2rpx solid #FF5100;
border-radius: 8rpx;
margin: 52rpx auto;
font-size: 28rpx;
position: relative;
}
.search-box image{
width: 35rpx;
height: 35rpx;
margin: 0 29rpx 0 52rpx;
}
.search{
position: absolute;
right: 0;
width: 132rpx;
height: 68rpx;
background: linear-gradient(39deg, #FF5100 0%, #FFA074 100%);
border-radius: 8rpx;
color: #fff;
}
.vote-box{
width: 670rpx;
height: 358rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin: 0 auto;
position: relative;
}
.news{
width: 100%;
height: 248rpx;
background: #D2D2D2;
border-radius: 16rpx 16rpx 0 0;
color: #FFF;
position: absolute;
padding-left: 42rpx;
}
.news-title-h{
font-size: 28rpx;
position: absolute;
bottom: 54rpx;
}
.news-title-s{
font-size: 20rpx;
position: absolute;
bottom: 18rpx;
}
.vote{
width: 100%;
height: 110rpx;
position: absolute;
bottom: 0;
border: 1rpx solid #000000;
}
.scroll-view_N{
width: 100%;
height: 208rpx;
margin: 40rpx 0 0 40rpx;
white-space: nowrap;
}
.rotaion{
width: 168rpx;
padding: 32rpx 0 16rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin-right: 32rpx;
display: inline-block;
}
.rotaion image{
width: 80rpx;
height: 80rpx;
background: #FF6D2A;
border-radius: 50%;
}
.rotaion-h{
height: 34rpx;
font-size: 24rpx;
color: #333333;
margin: 12rpx 0 4rpx 0;
font-weight: 600;
}
.rotaion-s{
height: 26rpx;
font-size: 18rpx;
color: #9D9D9D;
}
/* 最新资讯 */
.newInfo-box{
margin: 44rpx 0 0rpx 0;
}
.newInfo-title-img{
width: 160rpx;
height: 52rpx;
margin: 0 0 18rpx 38rpx;
}
.newInfo{
width: 100%;
height: 528rpx;
border-top: 2rpx solid #EFEFEF;
}
.modular{
width: 100%;
height: 176rpx;
border-bottom: 2rpx solid #EFEFEF;
padding: 20rpx 40rpx 22rpx 40rpx;
}
.modular-h{
width: 392rpx;
height: 80rpx;
font-size: 28rpx;
color: #4A4A4A;
font-weight: 600;
}
.modular image{
width: 204rpx;
height: 134rpx;
}
.title{
width: 392rpx;
height: 134rpx;
}
.title-l{
width: 310rpx;
height: 34rpx;
font-size: 24rpx;
color: #707070;
}
.title-l image{
width: 24rpx;
height: 24rpx;
margin-left: 5rpx;
}
/* 热点精选 */
.hotspot-box{
width: 100%;
height: 456rpx;
}
.title-h-img{
width: 162rpx;
height: 62rpx;
margin: 32rpx 0 5rpx 40rpx;
}
.scroll-view_H{
width: 100%;
height: 344rpx;
white-space: nowrap;
}
.scroll-view_H image{
width: 670rpx;
height: 344rpx;
border-radius: 10rpx;
position: absolute;
}
.slide-box{
position: relative;
width: 670rpx;
height: 100%;
display: inline-block;
margin-right: 16rpx;
}
.hotspot-con{
width: 588rpx;
height: 130rpx;
bottom: 34rpx;
left: 24rpx;
position: absolute;
}
.hotspot-icon{
width: 72rpx;
height: 32rpx;
background: #FE3737;
border-radius: 12rpx 2rpx 12rpx 0;
position: absolute;
font-size: 22rpx;
color: #fff;
text-align: center;
}
.hotspot-title-h{
width: 588rpx;
height: 80rpx;
font-size: 28rpx;
color: #FFFFFF;
position: absolute;
bottom: 0;
white-space:pre-wrap;
}
/* 值得关注 */
.follow-box{
width: 100%;
height: 950rpx;
margin-bottom: 50rpx;
}
.follow-con{
width: 670rpx;
height: 250rpx;
margin: 0 auto;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin-bottom: 32rpx;
}
.follow-top{
width: 100%;
height: 170rpx;
padding: 20rpx 20rpx 26rpx 20rpx;
border-bottom: 1rpx solid #DCDCDC;
}
.follow-top image{
width: 232rpx;
height: 130rpx;
border-radius: 16rpx;
}
.follow-title{
width: 370rpx;
height: 100%;
}
.follow-h{
width: 370rpx;
height: 80rpx;
font-size: 28rpx;
color: #000000;
font-weight: 600;
}
.follow-title-l{
width: 250rpx;
height: 28rpx;
font-size: 20rpx;
color: #707070;
}
.follow-title-l image{
width: 24rpx;
height: 24rpx;
margin-left: 5rpx;
}
.follow-bottom{
width: 100%;
height: 80rpx;
padding: 12rpx 20rpx 16rpx 20rpx;
}
.follow-bottom image{
width: 52rpx;
height: 52rpx;
border-radius: 50%;
margin-right: 8rpx;
}
.follow-title-b{
}
.title-s{
height: 28rpx;
font-size: 20rpx;
margin-bottom: 6rpx;
font-weight: 600;
}
.title-con{
height: 22rpx;
font-size: 16rpx;
color: #707070;
}
.follow-btn{
width: 136rpx;
height: 40rpx;
background: linear-gradient(39deg, #FF5A0D 0%, #FFAC85 100%);
border-radius: 26rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
position: absolute;
right: 60rpx;
}
</style>

11
pages/order/OrderSubmission/index.vue

@ -67,7 +67,7 @@
</view> </view>
</view> </view>
</view> --> </view> -->
<view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true"> <!-- <view class="item acea-row row-between-wrapper" v-if="!isIntegral && deduction === false && enableIntegral === true">
<view>当前积分</view> <view>当前积分</view>
<view class="discount"> <view class="discount">
<view class="select-btn"> <view class="select-btn">
@ -80,12 +80,13 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<view class="item acea-row row-between-wrapper" v-if="shipping_type === 0"> <view class="item acea-row row-between-wrapper" v-if="shipping_type === 0">
<view>快递费用</view> <view>快递费用</view>
<view class="discount"> <!-- <view class="discount">
{{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }} {{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : '免运费' }}
</view> </view> -->
<view class="discount">{{ orderPrice.payPostage }}</view>
</view> </view>
<view v-if="shipping_type === 1"> <view v-if="shipping_type === 1">
<view class="item acea-row row-between-wrapper"> <view class="item acea-row row-between-wrapper">
@ -137,7 +138,7 @@
</view> </view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0 && !isIntegral"> <view class="item acea-row row-between-wrapper" v-if="orderPrice.payPostage > 0 && !isIntegral">
<view>运费</view> <view>运费</view>
<view class="money">{{ orderPrice.payPostage }}</view> <view class="money" v-if="Number(orderPrice.payPostage) > 0">{{ orderPrice.payPostage }}</view>
</view> </view>
<view class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0 && !isIntegral"> <view class="item acea-row row-between-wrapper" v-if="orderPrice.couponPrice > 0 && !isIntegral">
<view>优惠券抵扣</view> <view>优惠券抵扣</view>

18
pages/shop/GoodsCon/index.vue

@ -23,8 +23,8 @@
<view class="introduce">{{ storeInfo.storeName }}</view> <view class="introduce">{{ storeInfo.storeName }}</view>
<view class="label acea-row row-between-wrapper"> <view class="label acea-row row-between-wrapper">
<!-- <text v-if="!isIntegral">原价:{{ storeInfo.otPrice }}</text> --> <!-- <text v-if="!isIntegral">原价:{{ storeInfo.otPrice }}</text> -->
<text>库存:{{ storeInfo.stock }}{{ storeInfo.unitName }}</text> <text>库存:{{ storeInfo.stock }}</text>
<text>已售:{{ storeInfo.sales }}{{ storeInfo.unitName }}</text> <text>已售:{{ storeInfo.sales }}</text>
</view> </view>
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length"> <view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
<text class="hide line1"> <text class="hide line1">
@ -292,7 +292,7 @@ export default {
isIntegral: false, isIntegral: false,
} }
}, },
computed: mapGetters(['isLogin', 'location']), computed: mapGetters(['isLogin', 'location', 'userInfo']),
mounted: function() { mounted: function() {
this.$store.commit('get_to', 'goodcon') this.$store.commit('get_to', 'goodcon')
let url = handleQrCode() let url = handleQrCode()
@ -632,6 +632,12 @@ export default {
// //
joinCart: function() { joinCart: function() {
//0= //0=
if(uni.getStorageSync('uid') == this.storeInfo.merId){
return uni.showToast({
title: '不可以购买自己发布的商品!',
icon: 'none'
})
}
this.goCat(0) this.goCat(0)
}, },
// //
@ -726,6 +732,12 @@ export default {
}, },
// //
tapBuy: function() { tapBuy: function() {
if(uni.getStorageSync('uid') == this.storeInfo.merId){
return uni.showToast({
title: '不可以购买自己发布的商品!',
icon: 'none'
})
}
// 1= // 1=
this.goCat(1) this.goCat(1)
}, },

8
pages/user/agreement/index.vue

@ -217,19 +217,24 @@ export default {
width: 100%; width: 100%;
position: relative; position: relative;
} }
.agreement-box image { .agreement-box image {
width: 100%; width: 100%;
display: block; display: block;
} }
.agreement-box .img { .agreement-box .img {
height: 2848rpx; height: 2848rpx;
} }
.agreement-box .img1 { .agreement-box .img1 {
height: 924rpx; height: 924rpx;
} }
.agreement-box .img2 { .agreement-box .img2 {
height: 834rpx; height: 834rpx;
} }
.agreement-box .img3 { .agreement-box .img3 {
height: 1090rpx; height: 1090rpx;
} }
@ -249,13 +254,16 @@ export default {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
} }
.pay-box image { .pay-box image {
width: 100%; width: 100%;
display: block; display: block;
} }
.pay-box .img1 { .pay-box .img1 {
height: 609rpx; height: 609rpx;
} }
.pay-box .img2 { .pay-box .img2 {
height: 1235rpx; height: 1235rpx;
} }

9
pages/user/goodsManage/index.vue

@ -1,10 +1,10 @@
<template> <template>
<view class="goodsManage-page"> <view class="goodsManage-page">
<view class="nav acea-row row-around"> <view class="nav acea-row row-around">
<view class="item" :class="{ on: type === 1 }" @click="changeType(1)"> <view class="item" :class="{ on: type == 1 }" @click="changeType(1)">
<view>出售中</view> <view>出售中</view>
</view> </view>
<view class="item" :class="{ on: type === 0 }" @click="changeType(0)"> <view class="item" :class="{ on: type == 0 }" @click="changeType(0)">
<view>待上架</view> <view>待上架</view>
</view> </view>
</view> </view>
@ -60,12 +60,15 @@
} }
}, },
onShow() { onShow() {
this.$yroute.query.type ? this.type = this.$yroute.query.type : this.type = 1
this.getProducts() this.getProducts()
let pages = getCurrentPages(); let pages = getCurrentPages();
console.log(pages)
}, },
onReachBottom() { onReachBottom() {
if(this.loading){
this.page= this.page + 1
this.getProducts() this.getProducts()
}
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.goodsList = [] this.goodsList = []

7
pages/user/index.vue

@ -47,7 +47,7 @@
</view> </view>
</view> </view>
<view class="to-tyg-box" @tap="toMine"> <view class="to-tyg-box" @tap="toMine">
<image src="/static/images/user/tyg-img.png"></image> <image src="https://download.cyjyyjy.com/tyg-img.png"></image>
</view> </view>
</view> </view>
</view> </view>
@ -230,7 +230,6 @@ export default {
userInfo: {}, userInfo: {},
CustomBar: app.globalData.CustomBar, CustomBar: app.globalData.CustomBar,
menuHeight: app.globalData.menuHeight, menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
menuTop: app.globalData.menuTop, menuTop: app.globalData.menuTop,
demandCounts: 0, demandCounts: 0,
supplyCounts: 0, supplyCounts: 0,
@ -250,10 +249,9 @@ export default {
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// app.globalData.editTabbar();
this.getInfo(); this.getInfo();
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
@ -311,7 +309,6 @@ export default {
}, },
toAuth() { toAuth() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/release/index' url: '/pages/release/index'
}); });

2
pages/user/mine/index.vue

@ -199,7 +199,7 @@
if (this.shareFlag) { if (this.shareFlag) {
return { return {
title: '禅易云生态', title: '禅易云生态',
imageUrl: "/static/images/shareImg.png", imageUrl: "https://download.cyjyyjy.com/shareImg.png",
path: '/pages/user/agreement/index?id=' + this.userInfo.uid // path: '/pages/user/agreement/index?id=' + this.userInfo.uid //
}; };

2
pages/user/openStore/index.vue

@ -146,7 +146,7 @@
min-height: 100vh; min-height: 100vh;
background: #eee; background: #eee;
.form-box{ .form-box{
padding: 0rpx 40rpx; padding: 20rpx 40rpx;
.form-item{ .form-item{
width: 100%; width: 100%;
padding: 30rpx 28rpx; padding: 30rpx 28rpx;

54
project.private.config.json

@ -23,60 +23,6 @@
"pathName": "pages/release/perfectPersonInfo/index", "pathName": "pages/release/perfectPersonInfo/index",
"query": "", "query": "",
"scene": null "scene": null
},
{
"name": "pages/release/companyAuth/index",
"pathName": "pages/release/companyAuth/index",
"query": "",
"scene": null
},
{
"name": "pages/user/mine/index",
"pathName": "pages/user/mine/index",
"query": "",
"scene": null
},
{
"name": "pages/user/resourcesOrder/index",
"pathName": "pages/user/resourcesOrder/index",
"query": "",
"scene": null
},
{
"name": "pages/user/index",
"pathName": "pages/user/index",
"query": "",
"scene": null
},
{
"name": "pages/release/perfectPersonInfo/index",
"pathName": "pages/release/perfectPersonInfo/index",
"query": "isEdit=1",
"scene": null
},
{
"name": "pages/release/perfectCompanyInfo/index",
"pathName": "pages/release/perfectCompanyInfo/index",
"query": "",
"scene": null
},
{
"name": "pages/demandHall/createProject/index",
"pathName": "pages/demandHall/createProject/index",
"query": "",
"scene": null
},
{
"name": "pages/guide/index",
"pathName": "pages/guide/index",
"query": "",
"scene": null
},
{
"name": "pages/release/personAuth/index",
"pathName": "pages/release/personAuth/index",
"query": "",
"scene": null
} }
] ]
} }

BIN
static/images/ear.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

BIN
static/images/edit-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

BIN
static/images/eye.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
static/images/eye2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
static/images/follow-title.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
static/images/gd1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

BIN
static/images/gd2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

BIN
static/images/gd3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

BIN
static/images/hot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

BIN
static/images/learnMore1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 KiB

BIN
static/images/learnMore2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 KiB

BIN
static/images/learnMore3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 KiB

BIN
static/images/learnMore4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 KiB

BIN
static/images/life-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 KiB

BIN
static/images/new-bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

BIN
static/images/newInfo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
static/images/search-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/images/shareImg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

BIN
static/images/user/hotspot.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/images/user/tyg-img.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

BIN
static/images/vote1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

BIN
static/images/vote2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

22
uni_modules/uni-badge/changelog.md

@ -0,0 +1,22 @@
## 1.1.6(2021-09-22)
- 修复 在字节小程序上样式不生效的 bug
## 1.1.5(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.4(2021-07-29)
- 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性
## 1.1.3(2021-06-24)
- 优化 示例项目
## 1.1.1(2021-05-12)
- 新增 组件示例地址
## 1.1.0(2021-05-12)
- 新增 uni-badge 的 absolute 属性,支持定位
- 新增 uni-badge 的 offset 属性,支持定位偏移
- 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点
- 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+
- 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式
## 1.0.7(2021-05-07)
- 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug
- 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug
- 新增 uni-badge 属性 custom-style, 支持自定义样式
## 1.0.6(2021-02-04)
- 调整为uni_modules目录规范

253
uni_modules/uni-badge/components/uni-badge/uni-badge.vue

@ -0,0 +1,253 @@
<template>
<view class="uni-badge--x">
<slot />
<text v-if="text" :class="classNames" :style="[badgeWidth, positionStyle, customStyle, dotStyle]"
class="uni-badge"
@click="onClick()">{{displayValue}}</text>
</view>
</template>
<script>
/**
* Badge 数字角标
* @description 数字角标一般和其它控件列表9宫格等配合使用用于进行数量提示默认为实心灰色背景
* @tutorial https://ext.dcloud.net.cn/plugin?id=21
* @property {String} text 角标内容
* @property {String} type = [default|primary|success|warning|error] 颜色类型
* @value default 灰色
* @value primary 蓝色
* @value success 绿色
* @value warning 黄色
* @value error 红色
* @property {String} size = [normal|small] Badge 大小
* @value normal 一般尺寸
* @value small 小尺寸
* @property {String} inverted = [true|false] 是否无需背景颜色
* @event {Function} click 点击 Badge 触发事件
* @example <uni-badge text="1"></uni-badge>
*/
export default {
name: 'UniBadge',
emits:['click'],
props: {
type: {
type: String,
default: 'default'
},
inverted: {
type: Boolean,
default: false
},
isDot: {
type: Boolean,
default: false
},
maxNum: {
type: Number,
default: 99
},
absolute: {
type: String,
default: ''
},
offset: {
type: Array,
default () {
return [0, 0]
}
},
text: {
type: [String, Number],
default: ''
},
size: {
type: String,
default: 'normal'
},
customStyle: {
type: Object,
default () {
return {}
}
}
},
data() {
return {};
},
computed: {
width() {
return String(this.text).length * 8 + 12
},
classNames() {
const {
inverted,
type,
size,
absolute
} = this
return [
inverted ? 'uni-badge--' + type + '-inverted' : '',
'uni-badge--' + type,
'uni-badge--' + size,
absolute ? 'uni-badge--absolute' : ''
].join(' ')
},
positionStyle() {
if (!this.absolute) return {}
let w = this.width / 2,
h = 10
if (this.isDot) {
w = 5
h = 5
}
const x = `${- w + this.offset[0]}px`
const y = `${- h + this.offset[1]}px`
const whiteList = {
rightTop: {
right: x,
top: y
},
rightBottom: {
right: x,
bottom: y
},
leftBottom: {
left: x,
bottom: y
},
leftTop: {
left: x,
top: y
}
}
const match = whiteList[this.absolute]
return match ? match : whiteList['rightTop']
},
badgeWidth() {
return {
width: `${this.width}px`
}
},
dotStyle() {
if (!this.isDot) return {}
return {
width: '10px',
height: '10px',
borderRadius: '10px'
}
},
displayValue() {
const { isDot, text, maxNum } = this
return isDot ? '' : (Number(text) > maxNum ? `${maxNum}+` : text)
}
},
methods: {
onClick() {
this.$emit('click');
}
}
};
</script>
<style lang="scss" scoped>
$bage-size: 12px;
$bage-small: scale(0.8);
$bage-height: 20px;
.uni-badge--x {
/* #ifdef APP-NVUE */
// align-self: flex-start;
/* #endif */
/* #ifndef APP-NVUE */
display: inline-block;
/* #endif */
position: relative;
}
.uni-badge--absolute {
position: absolute;
}
.uni-badge {
/* #ifndef APP-NVUE */
display: flex;
overflow: hidden;
box-sizing: border-box;
/* #endif */
justify-content: center;
flex-direction: row;
height: $bage-height;
line-height: $bage-height;
color: $uni-text-color;
border-radius: 100px;
background-color: $uni-bg-color-hover;
background-color: transparent;
text-align: center;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-size: $bage-size;
/* #ifdef H5 */
cursor: pointer;
/* #endif */
}
.uni-badge--inverted {
padding: 0 5px 0 0;
color: $uni-bg-color-hover;
}
.uni-badge--default {
color: $uni-text-color;
background-color: $uni-bg-color-hover;
}
.uni-badge--default-inverted {
color: $uni-text-color-grey;
background-color: transparent;
}
.uni-badge--primary {
color: $uni-text-color-inverse;
background-color: $uni-color-primary;
}
.uni-badge--primary-inverted {
color: $uni-color-primary;
background-color: transparent;
}
.uni-badge--success {
color: $uni-text-color-inverse;
background-color: $uni-color-success;
}
.uni-badge--success-inverted {
color: $uni-color-success;
background-color: transparent;
}
.uni-badge--warning {
color: $uni-text-color-inverse;
background-color: $uni-color-warning;
}
.uni-badge--warning-inverted {
color: $uni-color-warning;
background-color: transparent;
}
.uni-badge--error {
color: $uni-text-color-inverse;
background-color: $uni-color-error;
}
.uni-badge--error-inverted {
color: $uni-color-error;
background-color: transparent;
}
.uni-badge--small {
transform: $bage-small;
transform-origin: center center;
}
</style>

88
uni_modules/uni-badge/package.json

@ -0,0 +1,88 @@
{
"id": "uni-badge",
"displayName": "uni-badge 数字角标",
"version": "1.1.6",
"description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
"keywords": [
"",
"badge",
"uni-ui",
"uniui",
"数字角标",
"徽章"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "y",
"联盟": "y"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

58
uni_modules/uni-badge/readme.md

@ -0,0 +1,58 @@
## Badge 数字角标
> **组件名:uni-badge**
> 代码块: `uBadge`
数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景,
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
### 基本用法
在 ``template`` 中使用组件
```html
<uni-badge size="small" :text="100" absolute="rightBottom" type="primary">
<button type="default">右上</button>
</uni-badge>
<uni-badge text="1"></uni-badge>
<uni-badge text="2" type="purple" @click="bindClick"></uni-badge>
<uni-badge text="3" type="primary" :inverted="true"></uni-badge>
```
## API
### Badge Props
|属性名 |类型 |默认值 |说明 |
|:-: |:-: |:-: |:-: |
|text |String |- |角标内容 |
|type |String |default|颜色类型,可选值:default(灰色)、primary(蓝色)、success(绿色)、warning(黄色)、error(红色)|
|size |String |normal |Badge 大小,可取值:normal、small |
|is-dot |Boolean|false |不展示数字,只有一个小点 |
|max-num |String/Numbuer|99 |展示封顶的数字值,超过 99 显示99+ |
|custom-style |Object | {} |自定义 Badge 样式, 样式对象语法 |
|inverted |Boolean|false |是否无需背景颜色,为 true 时,背景颜色将变为文字的字体颜色 |
|absolute (不支持 nvue) |String| rightTop|开启绝对定位, 角标将定位到其包裹的标签的四个角上,可选值: rightTop(右上角)、rightBottom(右下角)、leftBottom(左下角) 、leftTop(左上角) |
|offset |Array[number]| [0, 0]|距定位角中心点的偏移量,[-10, -10] 表示向 absolute 指定的方向偏移 10px,[10, 10] 表示向 absolute 指定的反方向偏移 10px,只有存在 absolute 属性时有效,与absolute 的值一一对应(例如:值为rightTop, 对应 offset 为 [right, Top])|
### Badge Events
|事件名 |事件说明 |返回参数 |
|:-: |:-: |:-: |
|@click |点击 Badge 触发事件| - |
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/badge/badge](https://hellouniapp.dcloud.net.cn/pages/extUI/badge/badge)
Loading…
Cancel
Save