Browse Source

云资讯

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

15
App.vue

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

12
api/user.js

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

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

5
config/index.js

@ -2,12 +2,9 @@
// 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.111:8092/api'
export const VUE_APP_API_URL = 'http://10.11.32.109:8092/api'
// export const VUE_APP_API_URL = 'http://10.11.32.107: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 = '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_RESOURCES_URL = 'https://h5.yixiang.co/static'

1
main.js

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

14
pages.json

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

3
pages/Loading/index.vue

@ -25,6 +25,9 @@ export default {
data() {
return {}
},
onLoad() {
},
onShow() {
// console.log('getUser',this.userInfo)
var url = handleQrCode()

85
pages/demandHall/resourcesDetail/index.vue

@ -49,13 +49,8 @@
</view>
</view>
<view>
<swiper class="swiper-block" autoplay="true" circular="true" previous-margin="90rpx" next-margin="90rpx" current="0" @change="swiperChange">
<block v-for="(item, index) in detail.resourceImgs" :key="index">
<swiper-item class="swiper-item" @tap="previewImg">
<image mode="aspectFill" :src="item" :class="'slide-image ' + (swiperIndex == index ? 'active' : '')"></image>
</swiper-item>
</block>
</swiper>
<sSwiper :imgs="detail.resourceImgs"></sSwiper>
<vSwiper :imgs="detail.resourceImgs"></vSwiper>
</view>
<view class="btn-box">
<view class="contact-btn" @tap="toResourcesContact">立即沟通</view>
@ -66,7 +61,8 @@
<script>
// pages/demandHall/resourcesDetail/index.js
const app = getApp();
import sSwiper from '@/components/sSwiper.vue'
import vSwiper from '@/components/vSwiper.vue'
export default {
data() {
return {
@ -75,8 +71,7 @@ export default {
swiperIndex: 0
};
},
components: {},
components: { sSwiper, vSwiper },
props: {},
/**
@ -88,37 +83,6 @@ export default {
});
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>
@ -324,29 +274,4 @@ export default {
color: #707070;
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>

1516
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>

89
pages/life/addGoods/index.vue

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

206
pages/life/articleDetail/index.vue

@ -1,65 +1,159 @@
<template>
<view class="article-box">
<view class="headline">楚牛电商一季度卖了300亿原因竟是这</view>
<view class="information-box ">
<image src="../../../static/images/cart.png" mode=""></image>
<view class="acea-row">
<view class="name">云快讯</view>
<view class="">203 </view>
<view>3小时前</view>
</view>
</view>
<!-- <view class="statement">转载声明本文由云快讯收录观点仅代表作者本人不代表云快讯立场云快讯不对所包含的准确性可靠性或完整性提供任何明示请自行承担任何责任</view>
<image src="../../../static/images/gd1.png" mode="" class="article-bg1"></image> -->
</view>
<view class="article-box">
<view class="article-header">
<view class="headline">{{ detail.title }}</view>
<view class="acea-row">
<view class="header-img"><image :src="detail.authorLogo"></image></view>
<view class="">
<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>
</template>
<script>
import { getCategory , getProducts, getArticle} from "@/api/store";
export default{
data() {
return{
id:this.id,
}
},
methods:{
},
onLoad: function (option) {
this.id= this.$yroute.query.id;
console.log(this.id)
}
}
import { getArticleDetail } from "@/api/home";
export default {
data() {
return {
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: {
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) {
this.id = this.$yroute.query.id;
this.getArticleDetail();
},
};
</script>
<style lang="less">
.article-box{
width: 100%;
min-height: 100vh;
background: #F5F6F7;
padding: 0 40rpx;
}
.headline{
font-size: 32rpx;
color: #333333;
padding-top: 30rpx;
margin-bottom: 60rpx;
}
.information-box{
width: 278rpx;
height: 72rpx;
}
.information-box image{
width: 72rpx;
height: 72rpx;
margin-right: 20rpx;
}
.name{
// width: 180rpx;
// height: 40rpx;
}
.article-box {
width: 100%;
min-height: 100vh;
.article-header {
padding: 0 40rpx;
}
.headline {
font-size: 32rpx;
color: #333333;
padding-top: 20rpx;
margin-bottom: 30rpx;
font-weight: 500;
}
.header-img {
width: 72rpx;
height: 72rpx;
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;
}
}
</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>

1187
pages/life/index.vue

File diff suppressed because it is too large Load Diff

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="acea-row row-between">
<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 class="step-box" v-show="setpFreight">
<view class="step-box" v-show="templateList[0]">
<view class="acea-row row-middle row-center">
<input class="inp-price" type="text" v-model="templateList[0].first" />
<text>{{type == 0 ? '件' : 'kg' }}()</text>
@ -87,76 +87,8 @@
const app = getApp();
import selectTree from "@/components/select-tree/select-tree"
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 = [
{
region: [
@ -182,17 +114,36 @@ export default {
name: "",
type:0,
setpFreight: false,
list: testList,
templateList: g
list: [],
templateList: g,
id: null
};
},
mounted(){
if(this.$yroute.query.id){
this.id = this.$yroute.query.id
this.getTempDetail(this.$yroute.query.id)
}
citys().then((res)=>{
let data = res.data;
this.list = data
})
},
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){
this.type = e.detail.value
},
@ -208,13 +159,13 @@ export default {
this.$refs.tkitree._show();
},
delTempItem(idx){
console.log(idx)
this.templateList.splice(idx,1)
},
//
treeConfirm(e) {
// console.log(e,'')
// console.log(this.list,'')
console.log(e,'确认')
console.log(this.list,'列表')
if(e.length == 0) return
let list = this.list;
let selectCity = e;
let selectName = [];
@ -260,13 +211,13 @@ export default {
//
treeCancel(e) {
console.log(e)
},
submit(){
let form = {}
form.name = this.name
form.type = this.type
form.region_info = this.templateList
form.id = this.id
if(form.name == '' ){
return this.alertMessage('请填写模板名字')

48
pages/life/tempList/index.vue

@ -5,8 +5,13 @@
<view class="temp-name">
{{index + 1}}{{item.name}}
</view>
<view class="handle-btn" @tap.stop="del(item)">
<image src="../../../static/images/del-goods.png"></image>
<view class="acea-row row-middle">
<view class="handle-btn" @tap.stop="del(item)">
<image src="../../../static/images/del-goods.png"></image>
</view>
<view class="handle-btn" @tap.stop="edit(item)">
<image src="../../../static/images/edit-icon.png"></image>
</view>
</view>
</view>
</view>
@ -15,7 +20,7 @@
</template>
<script>
import { getTempList } from '@/api/user'
import { getTempList, delTemp } from '@/api/user'
export default{
data(){
return {
@ -46,7 +51,24 @@
}
},
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().then((res)=>{
@ -59,6 +81,17 @@
uni.navigateTo({
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{
margin-left: 12rpx;
width: 38rpx;
height: 100%;
text-align: center;
image{
width: 29rpx;
height: 29rpx;
width: 35rpx;
height: 35rpx;
}
}
}

249
pages/life/yunInfo/index.vue

@ -1,7 +1,7 @@
<template>
<view class="information-box">
<view class="search-box acea-row row-middle" >
<image src="../../../static/images/act-address.png" mode=""></image>
<image src="../../../static/images/search-icon.png" mode=""></image>
<input type="text" value="" placeholder="请输入相关关键词"/>
<view class="search acea-row row-center-wrapper">搜一下</view>
</view>
@ -14,28 +14,72 @@
</view>
</view>
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="rotaion acea-row row-center" >
<image src="../../../static/images/collect.png" mode=""></image>
<view class="rotaion-h">今日大事</view>
<view class="rotaion-s">每日热点资讯</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=""></image>
<view class="newInfo">
<view class="modular acea-row">
<view class="acea-row title" >1
<!-- <view class="modular-h">海鸥出行将大巴车市场带入平台化阶段提高包车出行效率</view>
<view class="title-l acea-row row-column-between">
<view>yun</view>
<view>yun</view>
<view>yun</view>
</view> -->
<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>
<view><image src="../../../static/images/gd2.png" mode="" ></image></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>
@ -110,19 +154,20 @@
bottom: 0;
border: 1rpx solid #000000;
}
.scroll-view_H{
.scroll-view_N{
width: 100%;
height: 208rpx;
margin: 40rpx 0 0 40rpx;
white-space: nowrap;
}
.rotaion{
width: 168rpx;
height: 208rpx;
padding-top: 32rpx;
padding: 32rpx 0 16rpx 0;
background: #FFFFFF;
box-shadow: 0px 6rpx 12rpx rgba(0, 0, 0, 0.16);
box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.16);
border-radius: 16rpx;
margin-right: 32rpx;
display: inline-block;
}
.rotaion image{
width: 80rpx;
@ -134,6 +179,8 @@
height: 34rpx;
font-size: 24rpx;
color: #333333;
margin: 12rpx 0 4rpx 0;
font-weight: 600;
}
.rotaion-s{
height: 26rpx;
@ -142,9 +189,9 @@
}
/* 最新资讯 */
.newInfo-box{
margin: 44rpx 0 32rpx 0;
margin: 44rpx 0 0rpx 0;
}
.newInfo-box image{
.newInfo-title-img{
width: 160rpx;
height: 52rpx;
margin: 0 0 18rpx 38rpx;
@ -166,20 +213,166 @@
height: 80rpx;
font-size: 28rpx;
color: #4A4A4A;
font-weight: 600;
}
.modular image{
width: 204rpx;
height: 134rpx;
border: 1rpx solid #212226;
}
.title{
width: 392rpx;
height: 134rpx;
border: 1rpx solid #212226;
}
.title-l{
width: 278rpx;
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>
</style>

11
pages/order/OrderSubmission/index.vue

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

18
pages/shop/GoodsCon/index.vue

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

482
pages/user/agreement/index.vue

@ -1,262 +1,270 @@
<template>
<!--pages/user/agreement/index.wxml-->
<view>
<view class="back-btn" :style="'top:' + navTopHeight + 'rpx'" @tap="backPage">
<!--pages/user/agreement/index.wxml-->
<view>
<view class="back-btn" :style="'top:' + navTopHeight + 'rpx'" @tap="backPage">
<image src="/static/images/back.png" mode></image>
</view>
<view class="pay-box" v-if="userInfo.nickname != '' && userInfo.isVip == 1">
<image src="https://download.cyjyyjy.com/pay1.png" class="img1"></image>
<image src="https://download.cyjyyjy.com/pay2.png" class="img2"></image>
</view>
<view class="agreement-box" v-else>
<image src="https://download.cyjyyjy.com/agreement1.png" class="img1"></image>
<image src="https://download.cyjyyjy.com/agreement2.png" class="img2"></image>
<image src="https://download.cyjyyjy.com/agreement3.png" class="img3"></image>
<!-- <image src="../../../images/agreement.png" class="img"></image> -->
<view class="btn-box" @tap="toPay" v-if="userInfo.nickname"></view>
<block v-else>
<button class="btn-box" v-if="canIUseGetUserProfile" @tap="getUserProfile"></button>
<button class="btn-box" v-else-if="canIUse" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<view v-else> 请使用1.4.4及以上版本基础库 </view>
</block>
</view>
</view>
<view class="pay-box" v-if="userInfo.nickname != '' && userInfo.isVip == 1">
<image src="https://download.cyjyyjy.com/pay1.png" class="img1"></image>
<image src="https://download.cyjyyjy.com/pay2.png" class="img2"></image>
</view>
<view class="agreement-box" v-else>
<image src="https://download.cyjyyjy.com/agreement1.png" class="img1"></image>
<image src="https://download.cyjyyjy.com/agreement2.png" class="img2"></image>
<image src="https://download.cyjyyjy.com/agreement3.png" class="img3"></image>
<!-- <image src="../../../images/agreement.png" class="img"></image> -->
<view class="btn-box" @tap="toPay" v-if="userInfo.nickname"></view>
<block v-else>
<button class="btn-box" v-if="canIUseGetUserProfile" @tap="getUserProfile"></button>
<button class="btn-box" v-else-if="canIUse" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<view v-else> 请使用1.4.4及以上版本基础库 </view>
</block>
</view>
</view>
</template>
<script>
// pages/user/agreement/index.js
const app = getApp();
// pages/user/agreement/index.js
const app = getApp();
export default {
data() {
return {
navTopHeight: app.globalData.menuTop + app.globalData.navTopHeight + 10,
userInfo: null,
canIUse: uni.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
code: "",
hasUserInfo: false
};
},
export default {
data() {
return {
navTopHeight: app.globalData.menuTop + app.globalData.navTopHeight + 10,
userInfo: null,
canIUse: uni.canIUse('button.open-type.getUserInfo'),
canIUseGetUserProfile: false,
code: "",
hasUserInfo: false
};
},
components: {},
props: {},
components: {},
props: {},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (uni.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
});
}
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (uni.getUserProfile) {
this.setData({
canIUseGetUserProfile: true
});
}
uni.login({
success: res => {
// res.code openId, sessionKey, unionId
this.setData({
code: res.code
});
}
});
let pages = getCurrentPages();
app.http('get', 'userinfo').then(res => {
if (res.data.success) {
uni.setStorageSync('userInfo', res.data.data);
this.setData({
userInfo: res.data.data
});
}
}).then(() => {
if (pages[pages.length - 2]) {
} else {
if (this.userInfo.isVip) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/mine/index'
});
}, 2000);
}
}
});
},
uni.login({
success: res => {
// res.code openId, sessionKey, unionId
this.setData({
code: res.code
});
}
});
let pages = getCurrentPages();
app.http('get', 'userinfo').then(res => {
if (res.data.success) {
uni.setStorageSync('userInfo', res.data.data);
this.setData({
userInfo: res.data.data
});
}
}).then(() => {
if (pages[pages.length - 2]) {
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onShow: function () {
app.getInfo();
},
} else {
if (this.userInfo.isVip) {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/mine/index'
});
}, 2000);
}
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {},
onShow: function() {
app.getInfo();
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
methods: {
getUserProfile(e) {
// 使wx.getUserProfile
uni.getUserProfile({
desc: '展示用户信息',
//
success: response => {
uni.showLoading({
title: '登陆中...'
});
let data = {
code: this.code,
iv: response.iv,
encryptedData: response.encryptedData,
spread: 0,
login_type: 0
};
app.http('POST', 'wxapp/auth', data).then(result => {
if (result.data.success) {
uni.hideLoading();
uni.setStorageSync('token', 'Bearer ' + result.data.data.token);
uni.setStorageSync('userInfo', result.data.data.user);
uni.showModal({
title: "提示",
content: '登陆成功!点击确定按钮完善信息',
success: res => {
if (res.confirm) {
if (result.data.data.user.isVip == false) {
uni.navigateTo({
url: '../personalData/index'
});
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/index'
});
}, 1000);
}
} else {
if (result.data.data.user.isVip == false) {
uni.navigateTo({
url: '../personalData/index'
});
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/index'
});
}, 1000);
}
}
}
});
} else {
uni.showToast({
title: result.data.msg,
icon: 'none'
});
}
});
}
});
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {},
getUserInfo(e) {
// 使getUserInfo2021413getUserInfo
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {},
methods: {
getUserProfile(e) {
// 使wx.getUserProfile
uni.getUserProfile({
desc: '展示用户信息',
//
success: response => {
uni.showLoading({
title: '登陆中...'
});
let data = {
code: this.code,
iv: response.iv,
encryptedData: response.encryptedData,
spread: 0,
login_type: 0
};
app.http('POST', 'wxapp/auth', data).then(result => {
if (result.data.success) {
uni.hideLoading();
uni.setStorageSync('token', 'Bearer ' + result.data.data.token);
uni.setStorageSync('userInfo', result.data.data.user);
uni.showModal({
title: "提示",
content: '登陆成功!点击确定按钮完善信息',
success: res => {
if (res.confirm) {
if (result.data.data.user.isVip == false) {
uni.navigateTo({
url: '../personalData/index'
});
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/index'
});
}, 1000);
}
} else {
if (result.data.data.user.isVip == false) {
uni.navigateTo({
url: '../personalData/index'
});
} else {
setTimeout(() => {
uni.reLaunch({
url: '/pages/user/index'
});
}, 1000);
}
}
}
});
} else {
uni.showToast({
title: result.data.msg,
icon: 'none'
});
}
});
}
});
},
toPay() {
uni.navigateTo({
url: '../personalData/index'
});
},
getUserInfo(e) {
// 使getUserInfo2021413getUserInfo
this.setData({
userInfo: e.detail.userInfo,
hasUserInfo: true
});
},
backPage() {
uni.navigateBack({
delta: 1
});
},
toPay() {
uni.navigateTo({
url: '../personalData/index'
});
},
/**
* 生命周期函数--监听页面显示
*/
getUser() {
this.setData({
userInfo: uni.getStorageSync('userInfo')
});
}
backPage() {
uni.navigateBack({
delta: 1
});
},
}
};
/**
* 生命周期函数--监听页面显示
*/
getUser() {
this.setData({
userInfo: uni.getStorageSync('userInfo')
});
}
}
};
</script>
<style>
/* pages/user/agreement/index.wxss */
.agreement-box{
width: 100%;
position: relative;
}
.agreement-box image{
width: 100%;
display: block;
}
.agreement-box .img{
height: 2848rpx;
}
.agreement-box .img1{
height: 924rpx;
}
.agreement-box .img2{
height: 834rpx;
}
.agreement-box .img3{
height: 1090rpx;
}
/* pages/user/agreement/index.wxss */
.agreement-box {
width: 100%;
position: relative;
}
.agreement-box image {
width: 100%;
display: block;
}
.agreement-box .img {
height: 2848rpx;
}
.agreement-box .img1 {
height: 924rpx;
}
.agreement-box .img2 {
height: 834rpx;
}
.agreement-box .img3 {
height: 1090rpx;
}
.btn-box {
width: 440rpx !important;
height: 142rpx !important;
padding: 0 !important;
position: absolute;
top: 658rpx;
left: 50%;
margin-left: -220rpx !important;
background: none !important;
}
.pay-box {
width: 100%;
min-height: 100vh;
}
.pay-box image {
width: 100%;
display: block;
}
.btn-box{
width: 440rpx !important;
height: 142rpx !important;
padding: 0 !important;
position: absolute;
top: 658rpx;
left: 50%;
margin-left: -220rpx !important;
background: none !important;
}
.pay-box .img1 {
height: 609rpx;
}
.pay-box{
width: 100%;
min-height: 100vh;
}
.pay-box image{
width: 100%;
display: block;
}
.pay-box .img1{
height: 609rpx;
}
.pay-box .img2{
height: 1235rpx;
}
</style>
.pay-box .img2 {
height: 1235rpx;
}
</style>

11
pages/user/goodsManage/index.vue

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

9
pages/user/index.vue

@ -47,7 +47,7 @@
</view>
</view>
<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>
@ -230,7 +230,6 @@ export default {
userInfo: {},
CustomBar: app.globalData.CustomBar,
menuHeight: app.globalData.menuHeight,
navHeight: app.globalData.navHeight,
menuTop: app.globalData.menuTop,
demandCounts: 0,
supplyCounts: 0,
@ -250,15 +249,14 @@ export default {
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// app.globalData.editTabbar();
this.getInfo();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
onPullDownRefresh() {
this.getInfo()
@ -311,7 +309,6 @@ export default {
},
toAuth() {
uni.navigateTo({
url: '/pages/release/index'
});

2
pages/user/mine/index.vue

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

2
pages/user/openStore/index.vue

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

54
project.private.config.json

@ -23,60 +23,6 @@
"pathName": "pages/release/perfectPersonInfo/index",
"query": "",
"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/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