lhl преди 1 година
родител
ревизия
169f162bfc
променени са 45 файла, в които са добавени 3946 реда и са изтрити 403 реда
  1. 8 0
      api/index.js
  2. 10 1
      api/set.js
  3. 196 0
      common/image.js
  4. 180 0
      components/guide/index.vue
  5. 100 23
      components/home/index.vue
  6. 25 5
      components/xzw-notice/xzw-notice.vue
  7. 2 1
      main.js
  8. 18 12
      pages.json
  9. 6 5
      pages/cart/cart.vue
  10. 2 0
      pages/category/category.vue
  11. 53 46
      pages/index/artDetail.vue
  12. 15 4
      pages/index/artList.vue
  13. 97 0
      pages/index/guide.vue
  14. 133 65
      pages/index/index.vue
  15. 2 1
      pages/money/pay.vue
  16. 5 0
      pages/order/createOrder.vue
  17. 2 2
      pages/order/order.vue
  18. 1 0
      pages/order/orderDetail.vue
  19. 1 0
      pages/product/list.vue
  20. 66 28
      pages/product/product.vue
  21. 408 154
      pages/public/wxLogin.vue
  22. 7 4
      pages/set/addressManage.vue
  23. 158 18
      pages/set/userinfo.vue
  24. 2 1
      pages/user/award.vue
  25. 7 7
      pages/user/team.vue
  26. 52 17
      pages/user/user.vue
  27. 5 2
      pages/user/withdrawal.vue
  28. 5 4
      pages/user/yjzye.vue
  29. 2 1
      pages/user/yjzz.vue
  30. 2 1
      pages/user/yue.vue
  31. BIN
      static/icon/home.png
  32. BIN
      static/icon/kf.png
  33. BIN
      static/user/close_x.png
  34. 22 0
      uni_modules/uni-icons/changelog.md
  35. 1169 0
      uni_modules/uni-icons/components/uni-icons/icons.js
  36. 96 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  37. 663 0
      uni_modules/uni-icons/components/uni-icons/uniicons.css
  38. BIN
      uni_modules/uni-icons/components/uni-icons/uniicons.ttf
  39. 86 0
      uni_modules/uni-icons/package.json
  40. 8 0
      uni_modules/uni-icons/readme.md
  41. 8 0
      uni_modules/xzw-notice/changelog.md
  42. 179 0
      uni_modules/xzw-notice/components/xzw-notice/xzw-notice.vue
  43. 82 0
      uni_modules/xzw-notice/package.json
  44. 61 0
      uni_modules/xzw-notice/readme.md
  45. 2 1
      utils/newRequest.js

+ 8 - 0
api/index.js

@@ -1,6 +1,14 @@
 import request from '@/utils/request'
 import exp from 'constants';
 
+///api/article/category/list
+export function artCateList(data) {
+	return request({
+		url: '/api/article/category/list',
+		method: 'get',
+		data
+	});
+}
 // 促销商品
 export function groom4(data) {
 	return request({

+ 10 - 1
api/set.js

@@ -43,4 +43,13 @@ export function applelogin(data) {
 		data
 	});
 }
-// #endif
+// #endif
+
+// 
+export function setSpread(data) {
+	return request({
+		url: '/api/set_spread',
+		method: 'post',
+		data
+	});
+}

+ 196 - 0
common/image.js

@@ -0,0 +1,196 @@
+function getLocalFilePath(path) {
+    if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
+        return path
+    }
+    if (path.indexOf('file://') === 0) {
+        return path
+    }
+    if (path.indexOf('/storage/emulated/0/') === 0) {
+        return path
+    }
+    if (path.indexOf('/') === 0) {
+        var localFilePath = plus.io.convertAbsoluteFileSystem(path)
+        if (localFilePath !== path) {
+            return localFilePath
+        } else {
+            path = path.substr(1)
+        }
+    }
+    return '_www/' + path
+}
+
+function dataUrlToBase64(str) {
+    var array = str.split(',')
+    return array[array.length - 1]
+}
+
+var index = 0
+function getNewFileId() {
+    return Date.now() + String(index++)
+}
+
+function biggerThan(v1, v2) {
+    var v1Array = v1.split('.')
+    var v2Array = v2.split('.')
+    var update = false
+    for (var index = 0; index < v2Array.length; index++) {
+        var diff = v1Array[index] - v2Array[index]
+        if (diff !== 0) {
+            update = diff > 0
+            break
+        }
+    }
+    return update
+}
+
+export function pathToBase64(path) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            if (typeof FileReader === 'function') {
+                var xhr = new XMLHttpRequest()
+                xhr.open('GET', path, true)
+                xhr.responseType = 'blob'
+                xhr.onload = function() {
+                    if (this.status === 200) {
+                        let fileReader = new FileReader()
+                        fileReader.onload = function(e) {
+                            resolve(e.target.result)
+                        }
+                        fileReader.onerror = reject
+                        fileReader.readAsDataURL(this.response)
+                    }
+                }
+                xhr.onerror = reject
+                xhr.send()
+                return
+            }
+            var canvas = document.createElement('canvas')
+            var c2x = canvas.getContext('2d')
+            var img = new Image
+            img.onload = function() {
+                canvas.width = img.width
+                canvas.height = img.height
+                c2x.drawImage(img, 0, 0)
+                resolve(canvas.toDataURL())
+                canvas.height = canvas.width = 0
+            }
+            img.onerror = reject
+            img.src = path
+            return
+        }
+        if (typeof plus === 'object') {
+            plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
+                entry.file(function(file) {
+                    var fileReader = new plus.io.FileReader()
+                    fileReader.onload = function(data) {
+                        resolve(data.target.result)
+                    }
+                    fileReader.onerror = function(error) {
+                        reject(error)
+                    }
+                    fileReader.readAsDataURL(file)
+                }, function(error) {
+                    reject(error)
+                })
+            }, function(error) {
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            wx.getFileSystemManager().readFile({
+                filePath: path,
+                encoding: 'base64',
+                success: function(res) {
+                    resolve('data:image/png;base64,' + res.data)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}
+
+export function base64ToPath(base64) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            base64 = base64.split(',')
+            var type = base64[0].match(/:(.*?);/)[1]
+            var str = atob(base64[1])
+            var n = str.length
+            var array = new Uint8Array(n)
+            while (n--) {
+                array[n] = str.charCodeAt(n)
+            }
+            return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
+        }
+        var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
+        if (extName) {
+            extName = extName[1]
+        } else {
+            reject(new Error('base64 error'))
+        }
+        var fileName = getNewFileId() + '.' + extName
+        if (typeof plus === 'object') {
+            var basePath = '_doc'
+            var dirPath = 'uniapp_temp'
+            var filePath = basePath + '/' + dirPath + '/' + fileName
+            if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
+                plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
+                    entry.getDirectory(dirPath, {
+                        create: true,
+                        exclusive: false,
+                    }, function(entry) {
+                        entry.getFile(fileName, {
+                            create: true,
+                            exclusive: false,
+                        }, function(entry) {
+                            entry.createWriter(function(writer) {
+                                writer.onwrite = function() {
+                                    resolve(filePath)
+                                }
+                                writer.onerror = reject
+                                writer.seek(0)
+                                writer.writeAsBinary(dataUrlToBase64(base64))
+                            }, reject)
+                        }, reject)
+                    }, reject)
+                }, reject)
+                return
+            }
+            var bitmap = new plus.nativeObj.Bitmap(fileName)
+            bitmap.loadBase64Data(base64, function() {
+                bitmap.save(filePath, {}, function() {
+                    bitmap.clear()
+                    resolve(filePath)
+                }, function(error) {
+                    bitmap.clear()
+                    reject(error)
+                })
+            }, function(error) {
+                bitmap.clear()
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            var filePath = wx.env.USER_DATA_PATH + '/' + fileName
+            wx.getFileSystemManager().writeFile({
+                filePath: filePath,
+                data: dataUrlToBase64(base64),
+                encoding: 'base64',
+                success: function() {
+                    resolve(filePath)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}

+ 180 - 0
components/guide/index.vue

@@ -0,0 +1,180 @@
+<template>
+	<!-- 开屏广告 -->
+	<view class="content">
+		<swiper class="swiper" :class="advData.list.length==1?'on':''" :autoplay="autoplay" :interval="interval" :duration="duration" :circular="circular" @change="stopChange"
+			v-if="advData.list.length">
+			<swiper-item v-for="(item,index) in advData.list" :key="index" @click.stop="jump(item.url)">
+				<view class="swiper-item">
+					<view class="swiper-item-img">
+						<image :src="item.image" mode="aspectFill"></image>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
+		<view class="video-box" v-if="advData.type == 'video' && advData.video_link">
+			<video class="vid" :src="advData.video_link" :autoplay="true" :loop="true" :muted="true"
+				:controls="false"></video>
+		</view>
+		<view class="jump-over" @tap="launchFlag()">跳过<text v-if="closeType == 1">{{time}}</text><slot name="bottom"></slot></view>
+	</view>
+</template>
+
+<script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	let app = getApp();
+	export default {
+		data() {
+			return {
+				autoplay: true,
+				circular: true,
+				duration: 500,
+				interval: 2500,
+				jumpover: '跳过',
+				experience: '立即体验',
+				time: this.advData.config.open_screen_time,
+				timecount: undefined,
+				navH: 0
+			}
+		},
+		props: {
+			advData: {
+				type: Object,
+				default: () => {}
+			},
+			// 1 倒计时 2 手动关闭(预留)
+			closeType: {
+				type: Number,
+				default: 1
+			}
+		},
+		mounted() {
+			this.timer()
+			// #ifdef MP
+			this.navH = app.globalData.navHeight;
+			// #endif
+			// #ifndef MP
+			this.navH = 80;
+			// #endif
+		},
+		methods: {
+			stopChange(){
+				if(this.advData.list.length == 1){
+					return false
+				}
+			},
+			timer() {
+				var t = this.advData.config.open_screen_time || 5
+				this.timecount = setInterval(() => {
+					t--
+					this.time = t
+					if (t <= 0) {
+						clearInterval(this.timecount)
+						this.launchFlag()
+					}
+				}, 1000)
+			},
+			launchFlag() {
+				clearInterval(this.timecount)
+				uni.switchTab({
+					url: '/pages/index/index'
+				});
+			},
+			jump(url) {
+				if(url){
+					clearInterval(this.timecount)
+					if (url.indexOf("http") != -1) {
+						uni.navigateTo({
+							url: `/pages/annex/web_view/index?url=${url}`
+						});
+					} else {
+						if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index', '/pages/index/index', '/pages/plant_grass/index']
+							.indexOf(url) == -1) {
+							uni.navigateTo({
+								url: url
+							})
+						} else {
+							uni.reLaunch({
+								url: url
+							})
+						}
+					}
+				}
+			},
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	page,
+	.content {
+		width: 100%;
+		height: 100%;
+		background-size: 100% auto;
+		padding: 0;
+		// position: relative;
+	}
+	.swiper {
+		width: 100%;
+		height: 100vh;
+		background: #FFFFFF;
+		// &.on{
+		// 	position: relative;
+		// 	&:after {
+		// 	 content: '';
+		// 	 position: absolute;
+		// 	 top: 0;
+		// 	 left: 0;
+		// 	 right: 0;
+		// 	 bottom: 0;
+		// 	 z-index: 2;
+		// 	}
+		// }
+	}
+	.swiper-item {
+		width: 100%;
+		height: 100%;
+		text-align: center;
+		position: relative;
+		display: flex;
+		align-items: flex-end;
+		flex-direction: column-reverse
+	}
+	.swiper-item-img {
+		width: 100vw;
+		height: 100vh;
+		margin: 0 auto;
+		display: flex;
+	}
+	.swiper-item-img image {
+		width: 100%;
+		height: 100%;
+	}
+	.jump-over {
+		position: absolute;
+		height: 45rpx;
+		line-height: 45rpx;
+		padding: 0 15rpx;
+		border-radius: 30rpx;
+		font-size: 24rpx;
+		color: #b09e9a;
+		border: 1px solid #b09e9a;
+		z-index: 999;
+		right: 30rpx;
+		bottom: 150rpx;
+	}
+	.video-box {
+		width: 100vw;
+		height: 100vh;
+		.vid {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 100 - 23
components/home/index.vue

@@ -1,19 +1,25 @@
 <template>
 	<view style="touch-action: none;">
-		<view class="home" style="position:fixed;" :style="{ top: top + 'px', bottom: bottom }" id="right-nav" @touchmove.stop.prevent="setTouchMove">
-			<view class="homeCon bg-color-red" :class="homeActive === true ? 'on' : ''" v-if="homeActive">
-				<navigator hover-class='none' url='/pages/index/index' open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
+		<view class="home" style="position:fixed;" :style="{ top: top + 'px', bottom: bottom }" id="right-nav"
+			@touchmove.stop.prevent="setTouchMove">
+			<view class="homeCon bg-color-red dd" :class="homeActive === true ? 'on' : ''" v-if="homeActive"
+				:style="{'width': showH?'100rpx':'200rpx'}">
+				<image src="../../static/icon/home.png" mode="heightFix" class="logo" style="margin-right: 20rpx;"
+					@click="goHome" v-if="!showH"></image>
+				<button open-type="contact" bindcontact="handleContact" class="logo">
+					<image src="../../static/icon/kf.png" mode="heightFix" class="logo"></image>
+				</button>
+				<!-- <navigator hover-class='none' url='/pages/index/index' open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
 				<navigator hover-class='none' url='/pages/order_addcart/order_addcart' open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
-				<navigator hover-class='none' url='/pages/user/index' open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
+				<navigator hover-class='none' url='/pages/user/index' open-type='switchTab' class='iconfont icon-yonghu1'></navigator> -->
 			</view>
-			<view @click="open" class="pictrueBox">
+			<view @click="open" class="pictrueBox" id="home">
 				<view class="pictrue">
 					<image :src="
               homeActive === true
-                ? '/static/images/close.gif'
-                : '/static/images/open.gif'
-            "
-					 class="image" />
+                ? 'https://xmyl.qiniu1314.com/static/images/close.gif'
+                : 'https://xmyl.qiniu1314.com/static/images/open.gif'
+            " class="image" />
 				</view>
 			</view>
 		</view>
@@ -29,28 +35,80 @@
 		data: function() {
 			return {
 				top: "",
-				bottom: ""
+				bottom: "",
+				homeActive: false,
+				showH: false,
+				pagesH: 580
 			};
 		},
-		computed: mapGetters(["homeActive"]),
+		onReady() {
+			let that = this
+			wx.getSystemInfo({
+				success: function(res) {
+					const screenWidth = res.screenWidth; // 屏幕宽度
+					const screenHeight = res.screenHeight; // 屏幕高度
+
+					wx.createSelectorQuery().selectViewport().boundingClientRect(function(rect) {
+						const viewportWidth = rect.width; // 视口宽度
+						const viewportHeight = rect.height; // 视口高度
+
+						const fullScreenWidth = screenWidth * viewportWidth / rect.width; // 页面全屏宽度
+						const fullScreenHeight = screenHeight * viewportHeight / rect.height; // 页面全屏高度
+
+						console.log('页面全屏宽度:', fullScreenWidth);
+						console.log('页面全屏高度:', fullScreenHeight);
+						that.pagesH = fullScreenHeight *1  - 100;
+					}).exec();
+				},
+				fail: function(error) {
+					console.log('获取系统信息失败', error);
+				}
+			});
+		},
 		methods: {
+			handleContact(e) {
+				console.log(e)
+			},
+			goHome() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
 			setTouchMove(e) {
 				var that = this;
-				if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
+				console.log(e.touches[0].clientY)
+
+				if (e.touches[0].clientY < that.pagesH  && e.touches[0].clientY > 66) {
 					that.top = e.touches[0].clientY
-					// that.setData({
-					// 	top: e.touches[0].clientY
-					// })
 				}
 			},
 			open: function() {
 				this.homeActive ?
-					this.$store.commit("CLOSE_HOME") :
-					this.$store.commit("OPEN_HOME");
-			}
+					this.closeHome() :
+					this.openHome();
+			},
+			openHome() {
+				this.homeActive = true;
+				uni.setStorageSync('homeActive', true)
+			},
+			closeHome() {
+				this.homeActive = false;
+				uni.setStorageSync('homeActive', false)
+			},
 		},
 		created() {
+
+			// 获取当前页面的实例
+			const pages = getCurrentPages();
+			const currentPage = pages[pages.length - 1];
+
+			// 获取页面路由信息
+			const route = currentPage.route
+			this.showH = (route == 'pages/index/index')
+
+			console.log(this.showH, 'route')
 			this.bottom = "50px";
+			this.homeActive = uni.getStorageSync('homeActive')
 		}
 	};
 </script>
@@ -82,13 +140,13 @@
 	.home .homeCon.on {
 		opacity: 1;
 		animation: bounceInRight 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
-		width: 300rpx;
+		width: 200rpx;
 		height: 86rpx;
 		margin-bottom: 20rpx;
 		display: flex;
 		justify-content: center;
 		align-items: center;
-		background: #f44939 !important;
+		background: #9b0000 !important;
 	}
 
 	.home .homeCon .iconfont {
@@ -96,6 +154,7 @@
 		color: #fff;
 		display: inline-block;
 		margin: 0 auto;
+		background: #9b0000 !important;
 	}
 
 	.home .pictrue {
@@ -103,16 +162,34 @@
 		height: 86rpx;
 		border-radius: 50%;
 		margin: 0 auto;
+		background: #9b0000 !important;
 	}
 
 	.home .pictrue .image {
 		width: 100%;
 		height: 100%;
 		border-radius: 50%;
-		transform: rotate(90deg);
+		/* transform: rotate(90deg);
 		ms-transform: rotate(90deg);
 		moz-transform: rotate(90deg);
 		webkit-transform: rotate(90deg);
-		o-transform: rotate(90deg);
+		o-transform: rotate(90deg); */
+	}
+
+	.logo {
+		height: 60rpx;
+		width: 60rpx;
+		background: none;
+		margin: 0;
+		padding: 0;
+	}
+
+	.logo::after {
+		border: none;
+	}
+
+	.dd {
+		display: flex;
+		/* justify-content: space-around; */
 	}
-</style>
+</style>

+ 25 - 5
components/xzw-notice/xzw-notice.vue

@@ -1,8 +1,10 @@
 <template>
 	<view class="xzw_notice" :style="{color:getColor(theme),backgroundColor:getBgColor(theme)}">
-		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound" :color="getColor(theme)" size="22" />
+		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound"
+			:color="getColor(theme)" size="22" />
 		<!-- 垂直滚动用到轮播组件 -->
-		<swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true" :interval="speed=='fast'?4000:speed=='normal'?6000:10000" :duration="500" :circular="true" disable-touch>
+		<swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true"
+			:interval="speed=='fast'?4000:speed=='normal'?6000:10000" :duration="500" :circular="true" disable-touch>
 			<swiper-item v-for="(item, index) in list" :key="index" class="swiperIn" @click="goItem(item)">
 				<view>{{item[theKey]}}</view>
 			</swiper-item>
@@ -39,7 +41,13 @@
 			list: {
 				type: Array,
 				default () {
-					return [{ id: 1, title: '公告1' }, { id: 2, title: '公告2' }]
+					return [{
+						id: 1,
+						title: '公告1'
+					}, {
+						id: 2,
+						title: '公告2'
+					}]
 				}
 			},
 			//公告数组的键名
@@ -65,6 +73,7 @@
 		},
 		methods: {
 			getColor(theme) {
+
 				if (theme == "primary") {
 					return "#2979FF"
 				} else if (theme == "error") {
@@ -75,7 +84,7 @@
 					return "#1BBF6C"
 				} else if (theme == "info") {
 					return "#909399"
-				}else if(theme.indexOf('#') != -1) {
+				} else if (theme.indexOf('#') != -1) {
 					return theme
 				} else {
 					return "#303133"
@@ -93,7 +102,7 @@
 				} else if (theme == "info") {
 					return "#F4F4F5"
 				} else {
-					return "#FFFFFF"
+					return "#ebebeb"
 				}
 			},
 			// 点击公告
@@ -129,16 +138,20 @@
 		padding: 0 20upx;
 		box-sizing: border-box;
 		width: 100%;
+
 		.notice_left {
 			margin: 0 20upx 0 0;
 		}
+
 		.notice_center {
 			flex: 1;
 			height: 90upx;
+
 			.swiperIn {
 				height: 80upx;
 				display: flex;
 				align-items: center;
+
 				view {
 					overflow: hidden;
 					display: -webkit-box;
@@ -147,6 +160,7 @@
 				}
 			}
 		}
+
 		.notice_center2 {
 			flex: 1;
 			position: relative;
@@ -154,24 +168,30 @@
 			align-items: center;
 			height: 90upx;
 			overflow: hidden;
+
 			view {
 				position: absolute;
 				white-space: nowrap;
 				padding-left: 100%;
+
 				&.fast {
 					animation: notice 4s linear infinite both;
 				}
+
 				&.normal {
 					animation: notice 6s linear infinite both;
 				}
+
 				&.slow {
 					animation: notice 10s linear infinite both;
 				}
 			}
 		}
+
 		.notice_right {
 			margin: 0 0 0 20upx;
 		}
+
 		@keyframes notice {
 			100% {
 				transform: translate3d(-100%, 0, 0);

+ 2 - 1
main.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import store from './store'
 import App from './App'
+import home from './components/home/index.vue'
 /**
  *  所有测试用数据均存放于根目录json.js
  *  
@@ -30,7 +31,7 @@ const prePage = ()=>{
 	return prePage.$vm;
 }
 
-
+Vue.component('home',home)
 Vue.config.productionTip = false
 Vue.prototype.$fire = new Vue();
 Vue.prototype.$store = store;

+ 18 - 12
pages.json

@@ -1,5 +1,11 @@
 {
 	"pages": [{
+			"path": "pages/index/guide",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
+			}
+		},{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "首页",
@@ -450,18 +456,18 @@
 				"selectedIconPath": "static/tabBar/t1-1.png",
 				"text": "首页"
 			},
-			// {
-			// 	"pagePath": "pages/category/category",
-			// 	"iconPath": "static/tabBar/t2.png",
-			// 	"selectedIconPath": "static/tabBar/t2-1.png",
-			// 	"text": "分类"
-			// },
-			// {
-			// 	"pagePath": "pages/cart/cart",
-			// 	"iconPath": "static/tabBar/t4.png",
-			// 	"selectedIconPath": "static/tabBar/t3-1.png",
-			// 	"text": "购物车"
-			// },
+			{
+				"pagePath": "pages/category/category",
+				"iconPath": "static/tabBar/t2.png",
+				"selectedIconPath": "static/tabBar/t2-1.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/t4.png",
+				"selectedIconPath": "static/tabBar/t3-1.png",
+				"text": "购物车"
+			},
 			{
 				"pagePath": "pages/user/user",
 				"iconPath": "static/tabBar/t3.png",

+ 6 - 5
pages/cart/cart.vue

@@ -40,7 +40,7 @@
 						<view class="item-right">
 							<text class="clamp title">{{ item.productInfo.store_name }}</text>
 							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }}</text>
+							<text class="price">¥{{ item.productInfo.price}}</text>
 							<!-- <uni-number-box
 								class="step"
 								:min="1"
@@ -273,7 +273,8 @@ export default {
 			let checked = true;
 			list.forEach(item => {
 				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
+					total += (item.productInfo.price*1 - item.vip_truePrice*1) * item.cart_num;
+					
 				} else if (checked === true) {
 					checked = false;
 				}
@@ -395,8 +396,7 @@ export default {
 		.price {
 			font-size: $font-base + 2rpx;
 			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
+			
 		}
 		.attr {
 			font-size: $font-sm + 2rpx;
@@ -423,9 +423,10 @@ export default {
 		}
 		.title {
 			font-size: 34rpx;
-			font-family: PingFang SC;
 			font-weight: bold;
 			color: #333333;
+			height: 40rpx;
+			line-height: 40rpx;
 		}
 	}
 	.del-btn {

+ 2 - 0
pages/category/category.vue

@@ -195,6 +195,8 @@ page,
 	font-size: 32rpx;
 	color: $font-color-base;
 	position: relative;
+	padding-left: 10rpx;
+	text-align: center;
 	&.active {
 		color: $base-color;
 		background: #fff;

+ 53 - 46
pages/index/artDetail.vue

@@ -1,66 +1,73 @@
 <template>
 	<view class="container">
-	<view class="notice-item">
-		<jyf-parser :html="description" ref="article"></jyf-parser>
-	</view>
+		<view class="notice-item">
+			<jyf-parser :html="description" ref="article"></jyf-parser>
+		</view>
+		<home></home>
 	</view>
 </template>
 
 <script>
-	import { getDetail ,  } from '@/api/index.js';
+	import {
+		getDetail,
+	} from '@/api/index.js';
 	import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
-	export default{
+	export default {
 		components: {
-		   jyfParser
-		 },
-		data(){
-			return{
-				id:'',
-				list:"",
-				description:'',
-				type:0,
-				
+			jyfParser
+		},
+		data() {
+			return {
+				id: '',
+				list: "",
+				description: '',
+				type: 0,
+
 			}
 		},
 		onLoad(option) {
 			this.id = option.id;
-				this.loadData();
+			this.loadData();
 		},
-		methods:{
-			loadData(){
+		methods: {
+			loadData() {
 				let obj = this;
-			getDetail(obj.id).then(function(e) {
-				obj.list = e.data;
-				if(obj.list.content != null){
-					obj.description = obj.list.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
-				}//小程序商品详情图超出屏幕问题
-			});
+				getDetail(obj.id).then(function(e) {
+					obj.list = e.data;
+					if (obj.list.content != null) {
+						obj.description = obj.list.content.replace(/<img/g,
+							"<img style='max-width:100%;height:auto;'");
+					} //小程序商品详情图超出屏幕问题
+				});
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-page {
-	min-height: 100%;
-	background:#FFFFFF;
-}
-.notice_name {
-	font-size: 35rpx !important;
-	color: #303133;
-	padding: 25rpx 25rpx 0rpx 25rpx;
-	margin-bottom: 25rpx;
-}
-.course-video{
-			width: 100%;
-			height: 500rpx;
-		}
-.notice-item {
-	width: 100%;
-	height: 100%;
-	color: #666666;
-	padding: 35rpx 35rpx;
-	font-size: 23rpx;
-	padding-bottom: 30rpx;
-}
-</style>
+	page {
+		min-height: 100%;
+		background: #FFFFFF;
+	}
+
+	.notice_name {
+		font-size: 35rpx !important;
+		color: #303133;
+		padding: 25rpx 25rpx 0rpx 25rpx;
+		margin-bottom: 25rpx;
+	}
+
+	.course-video {
+		width: 100%;
+		height: 500rpx;
+	}
+
+	.notice-item {
+		width: 100%;
+		height: 100%;
+		color: #666666;
+		padding: 35rpx 35rpx;
+		font-size: 23rpx;
+		padding-bottom: 30rpx;
+	}
+</style>

+ 15 - 4
pages/index/artList.vue

@@ -7,16 +7,22 @@
 					{{item.title}}
 				</view>
 				<view class="time">
-					{{item.add_time | time}}
+					{{item.add_time }}
 				</view>
 			</view>
 		</view>
+		<empty v-if="list.length == 0"></empty>
+		<home></home>
 	</view>
 </template>
 
 <script>
-	import { getArtList} from '@/api/index.js';
+	import empty from '@/components/empty';
+	import { getArtList,artCateList} from '@/api/index.js';
 	export default {
+		components: {
+			empty
+		},
 		data() {
 			return {
 				list: [],
@@ -27,6 +33,11 @@
 			if(opt.id) {
 				this.id = opt.id
 			}
+			if(opt.tit) {
+				uni.setNavigationBarTitle({
+					title:opt.tit
+				})
+			}
 			this.loadData()
 		},
 		onShow() {
@@ -56,11 +67,11 @@
 			loadData(){
 				let obj = this;
 				getArtList({
-					page: 1,
+					page:1,
 					limit: 100
 				},obj.id).then(({ data }) => {
-					console.log(data);
 					obj.list = data;
+					console.log(obj.list,'dd')
 				});
 			},
 			Jump(id) {

+ 97 - 0
pages/index/guide.vue

@@ -0,0 +1,97 @@
+<template>
+	<view class="main">
+		<guide v-if="guidePages" :advData="advData"></guide>
+	</view>
+</template>
+
+<script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	import guide from '@/components/guide/index.vue'
+	import {
+		loadIndexs
+	} from '@/api/index.js'
+	export default {
+		components: {
+			guide
+		},
+		data() {
+			return {
+				guidePages: false,
+				frequency: '',
+				advData: {
+					config: {
+						open_screen_time: 3
+					}
+				}
+			}
+		},
+		onLoad(option) {
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			// #endif
+			// #ifdef H5
+			if (option.spread) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread',
+					data: option.spread
+				});
+			}
+			// #endif
+		},
+		onShow() {
+			// // #ifdef H5
+			// if(this.$wechat.isWeixin()){
+			// 	this.$wechat.wechat();
+			// }
+			// // #endif
+			this.loadExecution()
+		},
+		methods: {
+			loadExecution() {
+				loadIndexs().then(res => {
+					console.log(res,'res')
+					let list = res.data.open_one;
+					if(list.length == 0) {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+					}else {
+						this.advData.list = res.data.open_one;
+						this.guidePages = true;
+					}
+
+				}).catch(err => {
+						uni.switchTab({
+							url: '/pages/index/index'
+						});
+				})
+			}
+		},
+		onHide() {
+			this.guidePages = false
+		}
+	}
+</script>
+
+<style>
+	page,
+	.main {
+		width: 100%;
+		height: 100%;
+	}
+</style>

+ 133 - 65
pages/index/index.vue

@@ -10,15 +10,26 @@
 				<image :src="item.pic" />
 			</swiper-item>
 		</swiper>
+		<view class="notice" v-if="notlist.length > 0">
+			<xzw-notice theme="base" :direction="notlist.length > 2?'row':'column'" speed="slow" :list="notlist" @goItem="goItem" @goMore="goMore" :showMore="notlist.length > 1"/>
+		</view>
 		<!-- 轮播图 end -->
-		<view class="tip flex" v-if="auth == 1 && prod.length> 0">
+		<view class="cate-section flex" v-if="flist.length > 0  && auth == 0">
+			<view class="cate-item flex" v-for="item in flist" @click="navto(item.url)">
+				<view class="img-wrapper flex">
+					<image :src="item.pic" mode=""></image>
+				</view>
+				<view class="item-title">{{item.name}}</view>
+			</view>
+		</view>
+		<view class="tip flex">
 			<image src="../../static/index/hg.png" mode=""></image>
 			<view class="">
-				<text>/</text>礼包商品
+				<text>/</text>会员联盟
 			</view>
 		</view>
-		<view class="goods-list flex" v-if="auth == 1">
-			<view class="goods" v-for="item in prod" @click="navTo('/pages/product/product?id=' + item.id)">
+		<view class="goods-list flex">
+			<view class="goods" v-for="item in miniList" @click="navTo('/pages/product/product?id=' + item.id)">
 				<image :src="item.image" mode="" class="logo"></image>
 				<view class="price flex">
 					<view class="val">
@@ -30,53 +41,33 @@
 				</view>
 			</view>
 		</view>
-		<template v-if="auth == 0">
-			<view class="tip flex" >
-				<image src="../../static/index/hg.png" mode=""></image>
-				<view class="">
-					<text>/</text>会员联盟
-				</view>
-			</view>
-			<view class="goods-list flex" >
-				<view class="goods" v-for="item in miniList" @click="navTo('/pages/product/product?id=' + item.id)">
-					<image :src="item.image" mode="" class="logo"></image>
-					<view class="price flex">
-						<view class="val">
-							¥{{item.price}}
-						</view>
-						<view class="more">
-							立即加入>
-						</view>
+		<view class="big-goods-list">
+			<view class="big-good" v-for="item in bigList" @click="navTo('/pages/product/product?id=' + item.id)">
+				<image :src="item.image" mode="" class="logo"></image>
+				<view class="price flex">
+					<view class="val">
+						¥{{item.price}}
 					</view>
-				</view>
-			</view>
-			<view class="big-goods-list">
-				<view class="big-good" v-for="item in bigList" @click="navTo('/pages/product/product?id=' + item.id)">
-					<image :src="item.image" mode="" class="logo"></image>
-					<view class="price flex">
-						<view class="val">
-							¥{{item.price}}
-						</view>
-						<view class="more">
-							立即加入>
-						</view>
+					<view class="more">
+						立即加入>
 					</view>
 				</view>
 			</view>
-			<image v-if="list.length> 0" :src="list[0].image_input[0]" mode="widthFix" style="display: block;margin: 38rpx 38rpx;width: 671rpx;"></image>
+		</view>
+		<template v-if="auth == 0">
+			<image v-if="list.length> 0" :src="list[0].image_input[0]" mode="widthFix"
+				style="display: block;margin: 38rpx 38rpx;width: 671rpx;"></image>
 		</template>
+		<home :showH="false"></home>
 	</view>
 </template>
 
 <script>
-	import {
-		xzwNotoce
-	} from '@/components/xzw-notice/xzw-notice.vue'
 	import {
 		loadIndexs,
 		getArtList,
 		groom1,
-		
+
 	} from '@/api/index.js';
 	import {
 		getUserInfo,
@@ -103,11 +94,10 @@
 	} from '@/utils/wxAuthorized';
 	// #endif
 	export default {
-		components: {
-			xzwNotoce
-		},
 		data() {
 			return {
+				notlist: [],
+				flist: [],
 				miniList: [],
 				bigList: [],
 				prod: [],
@@ -131,8 +121,8 @@
 				period: 1,
 				shareImage: '',
 				fgList: '', //复购商品
-				bastList:[],
-				levelList:[],
+				bastList: [],
+				levelList: [],
 			};
 		},
 		computed: {
@@ -185,8 +175,7 @@
 
 			return shareObj;
 		},
-		onReachBottom() {
-		},
+		onReachBottom() {},
 		onLoad: function(option) {
 			// #ifdef MP
 			if (option.scene) {
@@ -212,9 +201,15 @@
 			// this.getLevelList()
 			this.loadData();
 			this.getArtList();
+			this.getnotlist()
 			this.getProduct()
 		},
 		methods: {
+			goMore() {
+				uni.navigateTo({
+					url:'/pages/index/artList?id=8&tit=公告'
+				})
+			},
 			getProduct() {
 				getProducts().then(res => {
 					this.prod = res.data
@@ -240,18 +235,22 @@
 					this.list = data;
 				});
 			},
+			getnotlist() {
+				
+				getArtList({
+					page: 1,
+					limit: 3
+				}, 8).then(({
+					data
+				}) => {
+					this.notlist = data;
+				});
+			},
 			goItem(e) {
-				console.log('bbbbbbbbbb', e);
 				uni.navigateTo({
 					url: '/pages/index/artDetail?id=' + e.id
 				})
 			},
-			goMore() {
-				console.log('dddddddddd');
-				uni.navigateTo({
-					url: '/pages/index/artList?id=2'
-				})
-			},
 			gogogo(item) {
 				if (!item.path) {
 					uni.navigateTo({
@@ -281,12 +280,23 @@
 						is_level: 1,
 						page: 1,
 						limit: 50,
-					}).then(res => {
-						obj.goodList = obj.goodList.concat(res.data)
-						obj.miniList = obj.goodList.slice(0,2)
-						obj.bigList = obj.goodList.slice(2)
-						console.log(obj.miniList,'obj.miniList')
-						console.log(obj.bigList)
+					}).then(ress => {
+						obj.goodList = obj.goodList.concat(ress.data)
+						getProducts({
+							is_agent: 1,
+							page: 1,
+							limit: 50,
+						}).then(resss => {
+							obj.goodList = obj.goodList.concat(resss.data)
+							
+							obj.miniList = obj.goodList.slice(0, 2)
+							obj.bigList = obj.goodList.slice(2)
+							
+						})
+						
+						// obj.miniList = obj.goodList.slice(0, 2)
+						// obj.bigList = obj.goodList.slice(2)
+						
 					})
 				})
 			},
@@ -355,6 +365,7 @@
 						let goods = data.info;
 						console.log(goods, '商品信息');
 						this.auth = data.auth;
+						this.flist = data.menus;
 						this.carouselList = data.banner;
 						this.swiperLength = this.carouselList.length;
 						this.bastList = data.benefit;
@@ -476,7 +487,7 @@
 	}
 
 
-	
+
 	.status_bar {
 		height: var(--status-bar-height);
 		width: 100%;
@@ -539,10 +550,11 @@
 		}
 
 	}
+
 	.goods-list {
 		padding: 0 35rpx;
 		flex-wrap: wrap;
-	
+
 		.good {
 			width: 324rpx;
 			height: 460rpx;
@@ -550,19 +562,22 @@
 			border-radius: 25rpx;
 			margin-bottom: 20rpx;
 			position: relative;
+
 			image {
 				width: 324rpx;
 				height: 324rpx;
 			}
+
 			&:last-of-type {
 				margin-bottom: 0;
 			}
+
 			.pic {
 				width: 324rpx;
 				height: 324rpx;
 				border-radius: 25rpx;
 			}
-	
+
 			.store-name {
 				width: 285rpx;
 				margin: auto;
@@ -571,13 +586,15 @@
 				margin: 10rpx 0;
 				padding-left: 20rpx;
 			}
+
 			.key {
 				font-weight: 500;
 				font-size: 17rpx;
 				color: #654427;
 				text-align: center;
-				padding:20rpx  0 ;
+				padding: 20rpx 0;
 			}
+
 			.price {
 				width: 268rpx;
 				height: 52rpx;
@@ -587,11 +604,13 @@
 				right: 0;
 				bottom: 30rpx;
 				// margin: auto;
-				padding:0 16rpx;
+				padding: 0 16rpx;
+
 				.val {
 					font-weight: bold;
 					font-size: 34rpx;
 					color: #7E0000;
+
 					text {
 						padding-left: 10rpx;
 						font-weight: 500;
@@ -600,10 +619,11 @@
 						text-decoration-line: line-through;
 					}
 				}
-				
+
 			}
 		}
 	}
+
 	.big-goods-list {
 		.big-good {
 			width: 674rpx;
@@ -612,17 +632,21 @@
 			border-radius: 25rpx;
 			background-color: #fff;
 		}
+
 		.logo {
 			width: 674rpx;
 			height: 313rpx;
 		}
+
 		.price {
-			padding:10rpx 20rpx;
+			padding: 10rpx 20rpx;
+
 			.val {
 				font-weight: bold;
 				font-size: 39rpx;
 				color: #7E0000;
 			}
+
 			.more {
 				font-weight: bold;
 				font-size: 22rpx;
@@ -630,4 +654,48 @@
 			}
 		}
 	}
+
+	.cate-section {
+		justify-content: space-around;
+		// background-color: #fff;
+		padding: 43rpx 0 10rpx;
+		flex-wrap: wrap;
+		justify-content: flex-start;
+
+		.cate-item {
+			flex-grow: 0;
+			width: 33.3%;
+			flex-direction: column;
+			text-align: center;
+			align-items: center;
+			justify-content: center;
+			padding-bottom: 20rpx;
+
+			.img-wrapper {
+				width: 90rpx;
+				height: 90rpx;
+				border-radius: 20rpx;
+				position: relative;
+
+				image {
+					width: 90rpx;
+					height: 90rpx;
+					position: absolute;
+					left: 50%;
+					top: 50%;
+					transform: translate(-50%, -50%);
+				}
+			}
+
+			.item-title {
+				margin-top: 15rpx;
+				font-size: 24rpx;
+				font-weight: 900;
+				color: #000;
+			}
+		}
+	}
+	.notice {
+		padding: 0 20rpx;
+	}
 </style>

+ 2 - 1
pages/money/pay.vue

@@ -139,7 +139,7 @@
 				// #endif
 				pinkid: '', //保存拼团商品id
 				is_mark: 0,
-				erweimasrc:''
+				erweimasrc:'',
 			};
 		},
 		computed: {
@@ -445,6 +445,7 @@
 				let prepage = obj.$api.prePage();
 
 				let data = {
+					is_agent:prepage.is_agent,
 					is_level: prepage.is_level,
 					is_pack: prepage.is_pack,
 					real_name: prepage.addressData.real_name, //联系人名称

+ 5 - 0
pages/order/createOrder.vue

@@ -202,6 +202,7 @@
 
 			</view>
 		</uni-popup>
+		<home></home>
 	</view>
 </template>
 
@@ -282,12 +283,16 @@
 				is_zero: 0,
 				affiliation_uid: 0,
 				is_level: 0,
+				is_agent: 0
 			};
 		},
 		onLoad(option) {
 			if(option.is_pack) {
 				this.is_pack = option.is_pack
 			}
+			if(option.is_agent) {
+				this.is_agent = option.is_agent
+			}
 			if(option.is_zero) {
 				this.is_zero = option.is_zero
 			}

+ 2 - 2
pages/order/order.vue

@@ -56,7 +56,7 @@
 						<view class="action-box b-t" v-if="item.status != 5">
 							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
 							<button v-if="item._status._title == '未支付' && item.pay_type != 'paying'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '未支付' && item.pay_type == 'paying'" @click.stop="showDf(item)" class="action-btn recom">出示代付码</button>
+							<!-- <button v-if="item._status._title == '未支付' && item.pay_type == 'paying'" @click.stop="showDf(item)" class="action-btn recom">出示代付码</button> -->
 							<!-- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button> -->
 							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
 							<!-- <button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
@@ -92,7 +92,7 @@
 				:foreground="foreground" :pdground="pdground" :icon="icon" :iconSize="iconSize" :lv="lv" :onval="onval"
 				:showLoading="showLoading" :loadMake="loadMake" :usingComponents="usingComponents" @result="qrR"/>
 		</view>
-		
+		<home></home>
 	</view>
 </template>
 

+ 1 - 0
pages/order/orderDetail.vue

@@ -170,6 +170,7 @@
 				<view class="bottom  border-radius-all bg-danger text-white padding-c-30 font-size-lg padding-v-10">查看拼团</view>
 			</navigator>
 		</view>
+		<home></home>
 	</view>
 </template>
 

+ 1 - 0
pages/product/list.vue

@@ -42,6 +42,7 @@
 				</scroll-view>
 			</view>
 		</view>
+		<home></home>
 	</view>
 </template>
 

+ 66 - 28
pages/product/product.vue

@@ -72,7 +72,7 @@
 		<view class="page-bottom" v-if="goodsType == 0">
 			<view class="action-btn-group">
 				<view class="buy-now">
-					<!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="goodsObjact.is_pack == 0">加入购物车</button> -->
+					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="goodsObjact.is_pack == 0 && goodsObjact.is_level == 0 && goodsObjact.is_agent == 0">加入购物车</button>
 					<button type="primary" class=" action-btn no-border  add-cart-btn"
 						@click.stop="toggleSpec(1)">立即购买</button>
 				</view>
@@ -119,14 +119,15 @@
 		<!-- <view :class="{ seckillBottom: goodsType == 1, goodsBottom: goodsType == 0 }"></view> -->
 		<!-- 分享 -->
 		<!-- <share ref="share" :contentHeight="580" :shareList="shareList"></share> -->
+		<home></home>
 	</view>
 </template>
 
 <script>
 	// import share from '@/components/share';
 	import {
-		passUser
-	} from '@/api/zero.js'
+		loadIndexs
+	} from '@/api/index.js'
 	import uniNumberBox from '@/components/uni-number-box.vue';
 	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
 	import {
@@ -221,19 +222,12 @@
 				is_bk: 0,
 				is_xf: 0,
 				goodIntegral: 0, //需要使用的积分
+				auth: 1,
 			};
 		},
 		async onLoad(options) {
 			let obj = this;
-			if (options.isfg) {
-				this.isfg = options.isfg
-			}
-			if (options.is_bk) {
-				obj.is_bk = options.is_bk
-			}
-			if (options.is_xf) {
-				obj.is_xf = options.is_xf
-			}
+			this.getIndex()
 			//保存商品id
 			this.goodsid = options.id;
 			// 判断有无人邀请
@@ -274,7 +268,6 @@
 
 				this.goodsDetail();
 			}
-			// this.passUser()
 		},
 		computed: {
 			// #ifdef H5
@@ -284,10 +277,16 @@
 			...mapState('user', ['userInfo', 'hasLogin'])
 		},
 		methods: {
-			passUser() {
-				passUser().then(res => {
-					this.pUser = res.data
-				})
+			getIndex() {
+				loadIndexs({})
+					.then(({
+						data
+					}) => {
+						this.auth = data.auth;
+					})
+					.catch(e => {
+						uni.stopPullDownRefresh();
+					});
 			},
 			navTo(url) {
 				uni.navigateTo({
@@ -343,11 +342,17 @@
 					}
 
 					//保存默认选中的对象字符串名称
-					let str = obj.specSelected.join(',');
-					// 设置默认值
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodIntegral = obj.productValue[str].integral
+					try{
+						let str = obj.specSelected.join(',');
+						// 设置默认值
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodIntegral = obj.productValue[str].integral
+					}catch(e){
+						//TODO handle the exception
+						console.log(e)
+					}
+				
 
 					// #ifdef H5
 					obj.shareDate();
@@ -465,7 +470,8 @@
 					mer_id: obj.shopId,
 					is_pack: obj.goodsObjact.is_pack,
 					is_zero: obj.goodsObjact.is_zero,
-					is_level: obj.goodsObjact.is_level
+					is_level: obj.goodsObjact.is_level,
+					is_agent: obj.goodsObjact.is_agent
 					// type: 0,//0为余额支付  1为消费券支付 2为积分支付
 				};
 				if (obj.type == 2) {
@@ -493,7 +499,42 @@
 					data.combinationId = obj.goodsid; //拼团编号
 					data.productId = obj.goodsObjact.product_id; //商品编号
 				}
+				if(obj.userInfo && obj.userInfo.uid) {
+					getUserInfo().then(res => {
+						if(res.data.spread_uid == 0 && obj.auth == 0 && (obj.goodsObjact.is_level == 1 ||obj.goodsObjact.is_pack == 1  || obj.goodsObjact.is_agent == 1) ) {
+							try{
+								uni.showModal({
+									title: '提示',
+									content: '您当前没有推荐人,暂无法购买该商品',
+									confirmText:'立即绑定',
+									success(e) {
+										if(e.confirm) {
+											uni.navigateTo({
+												url:'/pages/set/userinfo'
+											})
+										}
+									}
+									// showCancel: true
+								});
+							}catch(e){
+								console.log(e,'err')
+								//TODO handle the exception
+							}
+							
+							return;
+						}else {
+							obj.gogoBuy(data)
+						}
+					})
+				}else {
+					obj.gogoBuy(data)
+				}
+				
 
+			},
+			stopPrevent() {},
+			gogoBuy(data) {
+				let obj = this
 				cartAdd(data)
 					.then(function({
 						data
@@ -502,8 +543,7 @@
 							// 跳转到支付页
 							uni.navigateTo({
 								url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj
-									.goodsType + '&is_pack=' + obj.goodsObjact.is_pack + '&affiliation_uid=' +
-									obj.goodsObjact.affiliation_uid + '&is_zero=' + obj.goodsObjact.is_zero + '&is_level=' + obj.goodsObjact.is_level
+									.goodsType + '&is_pack=' + obj.goodsObjact.is_pack + '&is_level=' + obj.goodsObjact.is_level + '&is_agent=' + obj.goodsObjact.is_agent
 							});
 						}
 						if (obj.type == 2) {
@@ -518,9 +558,7 @@
 					.catch(e => {
 						console.log(e);
 					});
-
-			},
-			stopPrevent() {}
+			}
 		}
 	};
 </script>

+ 408 - 154
pages/public/wxLogin.vue

@@ -8,187 +8,441 @@
 			<button class="userInfo" type="warn" @click="isclick?'':userInfoData()" :class="{'nocaction': isclick}">
 				<!-- <text class="iconfont iconweixin"></text> -->
 				<text>
-				授权登录
+					授权登录
 				</text>
 			</button>
 		</view>
 		<!-- #endif -->
+		<view class="auth_wrap" :class="isAuth?'show':''">
+			<view class="mask"></view>
+			<view class="auth_content">
+				<view class="auth_top">
+					<view class="ptitle">获取您的昵称、头像、手机号</view>
+					<view class="txt">获取用户头像、昵称、手机号信息,主要用于完善个人资料,向用户提供更好使用体验</view>
+					<view class="close" @tap="closePopup">
+						<image src="../../static/user/close_x.png" mode=""></image>
+					</view>
+				</view>
+				<view class="auth_ul">
+					<view class="auth_li">
+						<view class="tit">头像</view>
+						<view class="rit">
+							<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
+								<image class="avatar" :src="avatarUrl"></image>
+							</button>
+						</view>
+					</view>
+					<view class="auth_li">
+						<view class="tit">昵称</view>
+						<view class="rit">
+							<input type="nickname" class="weui-input" placeholder="请输入昵称" @blur="onNickname" />
+						</view>
+					</view>
+				</view>
+				<view class="confirm_btn" @tap.stop="editUser">保存</view>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	import { getUserInfo } from '@/api/login.js';
-// #ifdef H5
-import { loginWinxin } from '@/utils/wxAuthorized';
-// #endif
-// #ifdef MP-WEIXIN
-import { loginWinxinMp } from '@/utils/wxMinProgram';
-import { wechatMpAuth } from '@/api/wx';
-// #endif
-import { mapMutations,mapState } from 'vuex';
-export default {
-	data() {
-		return {
-			userInfo:{},//授权用户信息
-			code:'',//授权code
-			isclick: false,//是否点击了
-		};
-	},
-	onLoad(option) {
-		this.loadData();
-	},
-	computed: {
-		// ...mapState(['baseURL','urlFile']) 
-	},
-	methods: {
-		// ...mapMutations(['login', 'setUserInfo']),
-		...mapMutations('user',['login', 'setUserInfo']),
-		loadData() {
-			let obj = this;
-			// #ifdef H5
-			loginWinxin();
-			// #endif
-			// #ifdef MP-WEIXIN
-			loginWinxinMp().then(() => {
+	import {
+		userEdit,
+	} from '@/api/set.js';
+	import {
+		getUserInfo
+	} from '@/api/login.js';
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// #ifdef MP-WEIXIN
+	import {
+		loginWinxinMp
+	} from '@/utils/wxMinProgram';
+	import {
+		wechatMpAuth
+	} from '@/api/wx';
+	// #endif
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				isAuth: false, //控制授权弹框显示与隐藏
+				avatarUrl: 'https://xmyl.qiniu1314.com/static/image/avt.png', //头像
+				nickname: '', //昵称
+				isFrist: '', //判断是否是第一次授权
+				userInfo: {}, //授权用户信息
+				code: '', //授权code
+				isclick: false, //是否点击了
+			};
+		},
+		onLoad(option) {
+			this.loadData();
+			let AlertLogin = uni.getStorageSync('AlertLogin');
+			if (AlertLogin) {
+				console.log('登录过一次')
+				this.isFrist = 2
+			} else {
+				console.log('首次登录');
+				this.isFrist = 1
+			}
+		},
+		computed: {
+			// ...mapState(['baseURL','urlFile']) 
+		},
+		methods: {
+			// ...mapMutations(['login', 'setUserInfo']),
+			...mapMutations('user', ['login', 'setUserInfo']),
+			goSetBase(url) {
+				this.backUrl = url;
+				this.isAuth = true;
+			},
+			closePopup() {
+				this.isAuth = false;
+				let ur = this.backUrl;
+				uni.navigateTo({
+					url: ur,
+					fail() {
+						uni.switchTab({
+							url: ur,
+							fail() {
+								uni.switchTab({
+									url: '/pages/index/index'
+								})
+							}
+						})
+					}
+				})
+			},
+			editUser() {
+				userEdit({
+						avatar: this.avatarUrl,
+						nickname: this.nickname
+					})
+					.then(e => {
+						this.closePopup()
+						console.log(e);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//监听昵称变化
+			onNickname(e) {
+				this.nickname = e.detail.value;
+			},
+			onChooseAvatar(e) {
+				let _this = this;
+				uni.showLoading({
+					title: '上传中'
+				})
+				uni.uploadFile({
+					url: _this.$store.state.baseURL + '/api/upload/image', //仅为示例,非真实的接口地址
+					filePath: e.detail.avatarUrl,
+					name: 'file',
+					header: {
+						"Authori-zation": 'Bearer ' + uni.getStorageSync('token')
+					},
+					success: (uploadFileRes) => {
+						if ("string" === typeof uploadFileRes.data) {
+							_this.avatarUrl = JSON.parse(uploadFileRes.data).data.url
+						} else {
+							_this.avatarUrl = uploadFileRes.data.data.url
+
+						}
+					},
+					complete() {
+						uni.hideLoading()
+					}
+				});
+			},
+			loadData() {
+				let obj = this;
+				// #ifdef H5
+				loginWinxin();
+				// #endif
+				// #ifdef MP-WEIXIN
+				loginWinxinMp().then(() => {
 					wx.login({
 						success(e) {
-							console.log(e,'loginWinxinMp');
+							console.log(e, 'loginWinxinMp');
 							obj.code = e.code;
 						},
-						fill:function (e) {
+						fill: function(e) {
 							console.log(e)
 						}
 					})
-			});
-			// #endif
-		},
-		// 用户确认授权
-		userInfoData(){
-			let that = this
-			if(that.isclick) {
-				return 
-			}
-			that.isclick = true
-			wx.getUserProfile({
-				desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-				success: res => {
-					console.log(res,'that.userInfo+++++++++++++++++++')
-					that.userInfo = res;
-					uni.showLoading({
-						title: '授权中',
-						mask: true
-					});
-					that.loadMp();
-				},
-				fail: err => {
-					that.isclick = false
-					uni.showToast({
-						title: '您拒绝了请求,不能正常使用小程序',
-						icon: 'error',
-						duration: 2000
-					});
-					return;
+				});
+				// #endif
+			},
+			// 用户确认授权
+			userInfoData() {
+				let that = this
+				if (that.isclick) {
+					return
 				}
-			});
-			// this.userInfo = e;
-			// console.log(e,'用户确认授权')
-			// this.loadMp()
-				
-		},
-		// #ifdef MP-WEIXIN
-		loadMp() {
-			let obj = this;
-			// 获取登录授权页数据
-			let user = obj.userInfo;
-			console.log(user)
-			// 获取推广人id
-			let spread_spid = uni.getStorageSync('spread') || '';
-			// #ifdef MP
-			let spread_code = uni.getStorageSync('spread_code') || '';
-			// #endif
-			
-			wechatMpAuth({
-				code: obj.code,
-				iv: user.iv,
-				encryptedData: user.encryptedData,
-				spread_spid: spread_spid,
+				that.isclick = true
+				wx.getUserProfile({
+					desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success: res => {
+						console.log(res, 'that.userInfo+++++++++++++++++++')
+						that.userInfo = res;
+						uni.showLoading({
+							title: '授权中',
+							mask: true
+						});
+						that.loadMp();
+					},
+					fail: err => {
+						that.isclick = false
+						uni.showToast({
+							title: '您拒绝了请求,不能正常使用小程序',
+							icon: 'error',
+							duration: 2000
+						});
+						return;
+					}
+				});
+				// this.userInfo = e;
+				// console.log(e,'用户确认授权')
+				// this.loadMp()
+
+			},
+			// #ifdef MP-WEIXIN
+			loadMp() {
+				let obj = this;
+				// 获取登录授权页数据
+				let user = obj.userInfo;
+				console.log(user)
+				// 获取推广人id
+				let spread_spid = uni.getStorageSync('spread') || '';
 				// #ifdef MP
-				spread_code: spread_code,
+				let spread_code = uni.getStorageSync('spread_code') || '';
 				// #endif
-			}).then(({ data }) => {
-				obj.wchatAuth(data);
-				console.log(data,'wechatMpAuth++++++++++++++++++++++++++')
-				
-			}).catch( err => {
-				// obj.loding = false;
-				// uni.hideLoading();
-			});
-		},
-		// #endif
-		wchatAuth(data) {
-			let obj = this;
-			// 保存token
-			uni.setStorageSync('token', data.token);
-			console.log(data.token,'token++++++++++++++')
-			// 获取用户基础信息
-			getUserInfo({}).then(e => {
-				console.log('userInfo+++++++++++',e)
-				obj.login();
-				uni.hideLoading();
-				// 保存返回用户数据
-				obj.setUserInfo(e.data);
-				let ur = uni.getStorageSync('present') || '/pages/index/index';
-				// 用于处理缓存bug
-				if (ur=='pages/product/product') {
-					ur = '/pages/index/index'
-				}
-				uni.switchTab({
-					url: ur,
-					fail(e) {
-						uni.navigateTo({
+
+				wechatMpAuth({
+					code: obj.code,
+					iv: user.iv,
+					encryptedData: user.encryptedData,
+					spread_spid: spread_spid,
+					// #ifdef MP
+					spread_code: spread_code,
+					// #endif
+				}).then(({
+					data
+				}) => {
+					obj.wchatAuth(data);
+					console.log(data, 'wechatMpAuth++++++++++++++++++++++++++')
+
+				}).catch(err => {
+					// obj.loding = false;
+					// uni.hideLoading();
+				});
+			},
+			// #endif
+			wchatAuth(data) {
+				let obj = this;
+				// 保存token
+				uni.setStorageSync('token', data.token);
+				console.log(data.token, 'token++++++++++++++')
+				// 获取用户基础信息
+				getUserInfo({}).then(e => {
+					console.log('userInfo+++++++++++', e)
+					obj.login();
+					uni.hideLoading();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					let ur = uni.getStorageSync('present') || '/pages/index/index';
+					// 用于处理缓存bug
+					if (ur == 'pages/product/product') {
+						ur = '/pages/index/index'
+					}
+					if (e.data.nickname == '微信用户') {
+						obj.goSetBase(ur)
+					} else {
+						uni.switchTab({
 							url: ur,
 							fail(e) {
 								uni.navigateTo({
-									url: '/pages/index/index',
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index',
+										});
+									}
 								});
 							}
 						});
 					}
+
 				});
-			});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page,
-.content {
-	height: 100%;
-	background-color: #fff;
-}
-.bg-img,
-.logo-img-box {
-	position: absolute;
-	top: 0;
-	left: 0;
-	width: 100%;
-	height: 100%;
-}
-.logo-img {
-	margin-top: 20vh;
-	margin-left: 176rpx;
-	width: 385rpx;
-	height: 394rpx;
-}
-.userInfo {
-	margin: 0 100rpx;
-	margin-top: 50rpx;
-	color: #FFFFFF;
-	border-radius: 99rpx;
-	background-color: $base-color !important;
-}
-.nocaction {
-	background-color: #999;
-}
-</style>
+	page,
+	.content {
+		height: 100%;
+		background-color: #fff;
+	}
+
+	.bg-img,
+	.logo-img-box {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+	}
+
+	.logo-img {
+		margin-top: 20vh;
+		margin-left: 176rpx;
+		width: 385rpx;
+		height: 394rpx;
+	}
+
+	.userInfo {
+		margin: 0 100rpx;
+		margin-top: 50rpx;
+		color: #FFFFFF;
+		border-radius: 99rpx;
+		background-color: $base-color !important;
+	}
+
+	.nocaction {
+		background-color: #999;
+	}
+
+	.auth_wrap {
+		position: fixed;
+		width: 100%;
+		bottom: -120%;
+		transition: all 0.35s linear;
+
+		&.show {
+			bottom: 0;
+			transition: all 0.35s linear;
+
+			.mask {
+				display: block;
+			}
+		}
+
+		.mask {
+			width: 100%;
+			height: 100vh;
+			position: fixed;
+			background: rgba(0, 0, 0, 0.5);
+			z-index: 98;
+			top: 0;
+			display: none;
+		}
+
+		.auth_content {
+			padding: 32rpx 32rpx 72rpx 32rpx;
+			position: relative;
+			z-index: 99;
+			background: #fff;
+			border-radius: 16rpx 16rpx 0 0;
+
+			.auth_top {
+				position: relative;
+
+				.ptitle {
+					font-size: 30rpx;
+					font-weight: bold;
+					margin-bottom: 24rpx;
+				}
+
+				.txt {
+					font-size: 26rpx;
+					color: #999;
+				}
+
+				.close {
+					width: 26rpx;
+					height: 26rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.auth_ul {
+				margin-top: 16rpx;
+
+				.auth_li {
+					display: flex;
+					align-items: center;
+					border-top: solid 1px #f5f5f5;
+					padding: 24rpx 0;
+
+					&:last-child {
+						border-bottom: solid 1px #f5f5f5;
+					}
+
+					.tit {
+						width: 140rpx;
+						font-size: 30rpx;
+					}
+
+					.rit {
+						width: calc(100% - 140rpx);
+
+						input {
+							font-size: 28rpx;
+							height: 72rpx;
+							width: 100%;
+						}
+
+						image {
+							width: 54rpx;
+							height: 54rpx;
+							border-radius: 50%;
+						}
+
+						button {
+							width: 100%;
+							height: 72rpx;
+							background: #fff;
+							text-align: left;
+							padding: 0;
+
+							&:after {
+								border: solid 1px #fff;
+							}
+
+							// opacity: 0;
+						}
+					}
+				}
+			}
+
+			.confirm_btn {
+				width: 420rpx;
+				margin: 46rpx auto 0 auto;
+				background: #39b54a;
+				color: #fff;
+				border-radius: 8rpx;
+				height: 94rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 30rpx;
+			}
+		}
+	}
+</style>

+ 7 - 4
pages/set/addressManage.vue

@@ -9,9 +9,9 @@
 			<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码" placeholder-class="placeholder" />
 		</view>
 		<view class="row b-b">
-			<text class="tit">地址</text>
-			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
-			<text class="iconfont iconlocation"></text>
+			<text class="tit">省市区</text>
+			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择省市区'}}</pickerAddress>
+			<!-- <text class="iconfont iconlocation"></text> -->
 		</view>
 		<view class="row b-b">
 			<text class="tit">门牌号</text>
@@ -123,8 +123,11 @@ export default {
 			// 	this.$api.msg('请输入正确的手机号码');
 			// 	return;
 			// }
+			if(!data.mobile) {
+				return this.$api.msg('请填写收货人手机号码');
+			}
 			if (!data.address) {
-				this.$api.msg('请在地图选择所在位置');
+				this.$api.msg('请选择省市区');
 				return;
 			}
 			if (!data.area) {

+ 158 - 18
pages/set/userinfo.vue

@@ -17,28 +17,27 @@
 		</view>
 		<view class="row">
 			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder"  />
+			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder" />
 		</view>
 		<view class="row">
 			<text class="tit">ID</text>
 			<input class="input" type="text" disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
 		</view>
-		<!-- <view class="row" v-if="userInfo.tjr">
+		<view class="row" v-if="!userInfo.spread_uid">
 			<text class="tit">推荐人</text>
-			<input class="input" type="text" disabled="true" v-model="userInfo.tjr" placeholder-class="placeholder" />
-		</view> -->
+			<input class="input" type="text" placeholder="请输入推荐人UID" v-model="tjr" placeholder-class="placeholder" />
+		</view>
 		<view class="add-btn tj" @click="confirm">提交</view>
 		<view class="add-btn" @click="cancel">退出</view>
 		<!-- #ifdef APP -->
 		<yk-authpup ref="WRITE_EXTERNAL_STORAGE" type="top" @changeAuth="changeAuth"
-		    permissionID="WRITE_EXTERNAL_STORAGE"></yk-authpup>  
+			permissionID="WRITE_EXTERNAL_STORAGE"></yk-authpup>
 		<!-- #endif -->
-		
 	</view>
 </template>
 
 <script>
-	 import ykAuthpup from "@/components/yk-authpup/yk-authpup";
+	import ykAuthpup from "@/components/yk-authpup/yk-authpup";
 	import {
 		mapState,
 		mapMutations
@@ -48,7 +47,8 @@
 	} from '@/api/order.js';
 	import {
 		userEdit,
-		logout
+		logout,
+		setSpread
 	} from '@/api/set.js';
 	export default {
 		components: {
@@ -58,6 +58,7 @@
 			return {
 				show: false,
 				password: '',
+				tjr: ''
 			}
 		},
 		onLoad() {
@@ -68,6 +69,7 @@
 		},
 		methods: {
 			...mapMutations('user', ['logout']),
+			//获取头像变化的值
 			openAuth() {
 				this.$refs['WRITE_EXTERNAL_STORAGE'].open()
 			},
@@ -84,18 +86,31 @@
 				})
 			},
 			confirm() {
+				let that = this;
 				userEdit({
-						avatar: this.userInfo.avatar,
-						nickname: this.userInfo.nickname
+						avatar: that.userInfo.avatar,
+						nickname: that.userInfo.nickname
 					})
 					.then(e => {
-						this.$api.msg('修改成功');
-						setTimeout(() => {
-							uni.switchTab({
-								url: '/pages/user/user'
-							});
-						}, 1000);
-						console.log(e);
+						that.$api.msg('修改成功');
+						if(!that.userInfo.spread_uid && that.tjr) {
+							setSpread({
+								spread_uid: that.tjr
+							}).then(res => {
+								setTimeout(() => {
+									uni.switchTab({
+										url: '/pages/user/user'
+									});
+								}, 1000);
+							})
+						}else {
+							setTimeout(() => {
+								uni.switchTab({
+									url: '/pages/user/user'
+								});
+							}, 1000);
+						}
+						
 					})
 					.catch(e => {
 						console.log(e);
@@ -208,7 +223,7 @@
 		display: flex;
 		align-items: center;
 		justify-content: center;
-		margin:40rpx auto 30rpx;
+		margin: 40rpx auto 30rpx;
 		width: 560rpx;
 		height: 80rpx;
 		background: #fff;
@@ -271,4 +286,129 @@
 			color: #32C6FF;
 		}
 	}
+
+	.auth_wrap {
+		position: fixed;
+		width: 100%;
+		bottom: -120%;
+		transition: all 0.35s linear;
+
+		&.show {
+			bottom: 0;
+			transition: all 0.35s linear;
+
+			.mask {
+				display: block;
+			}
+		}
+
+		.mask {
+			width: 100%;
+			height: 100vh;
+			position: fixed;
+			background: rgba(0, 0, 0, 0.5);
+			z-index: 98;
+			top: 0;
+			display: none;
+		}
+
+		.auth_content {
+			padding: 32rpx 32rpx 72rpx 32rpx;
+			position: relative;
+			z-index: 99;
+			background: #fff;
+			border-radius: 16rpx 16rpx 0 0;
+
+			.auth_top {
+				position: relative;
+
+				.ptitle {
+					font-size: 30rpx;
+					font-weight: bold;
+					margin-bottom: 24rpx;
+				}
+
+				.txt {
+					font-size: 26rpx;
+					color: #999;
+				}
+
+				.close {
+					width: 26rpx;
+					height: 26rpx;
+					position: absolute;
+					right: 0;
+					top: 0;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+
+			.auth_ul {
+				margin-top: 16rpx;
+
+				.auth_li {
+					display: flex;
+					align-items: center;
+					border-top: solid 1px #f5f5f5;
+					padding: 24rpx 0;
+
+					&:last-child {
+						border-bottom: solid 1px #f5f5f5;
+					}
+
+					.tit {
+						width: 140rpx;
+						font-size: 30rpx;
+					}
+
+					.rit {
+						width: calc(100% - 140rpx);
+
+						input {
+							font-size: 28rpx;
+							height: 72rpx;
+							width: 100%;
+						}
+
+						image {
+							width: 54rpx;
+							height: 54rpx;
+							border-radius: 50%;
+						}
+
+						button {
+							width: 100%;
+							height: 72rpx;
+							background: #fff;
+							text-align: left;
+							padding: 0;
+
+							&:after {
+								border: solid 1px #fff;
+							}
+
+							// opacity: 0;
+						}
+					}
+				}
+			}
+
+			.confirm_btn {
+				width: 420rpx;
+				margin: 46rpx auto 0 auto;
+				background: #39b54a;
+				color: #fff;
+				border-radius: 8rpx;
+				height: 94rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 30rpx;
+			}
+		}
+	}
 </style>

+ 2 - 1
pages/user/award.vue

@@ -13,7 +13,7 @@
 			</view>
 			<view class="moneybtn-box">
 				<!-- 佣金转余额 -->
-				<view class="money-btn" @click="navto('/pages/user/yjzye?type=1')"></view>
+				<view class="money-btn" @click="navto('/pages/user/yjzye?type=1')">奖金转余额</view>
 				<!-- 佣金提现 -->
 				<view class="money-btn"  @click="navto('/pages/user/withdrawal')" v-if="auth == 0">奖金提现</view>
 				<!-- <view class="money-btn" v-else></view> -->
@@ -59,6 +59,7 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<home></home>
 	</view>
 </template>
 

+ 7 - 7
pages/user/team.vue

@@ -18,7 +18,7 @@
 				<view>我的推广</view>
 			</view>
 			<view class="money-box" style="padding-top: 20rpx;" >
-				<!-- <view>我的贡献值:{{userInfo.team_amount}}</view> -->
+				<view>团队业绩:{{userInfo.team_amount}}</view>
 			</view>
 		</view>
 		<view class="flex buttom-box">
@@ -47,14 +47,11 @@
 								<view class="title">
 									<view class="title-name">{{ item.nickname}}</view>
 								</view>
-								<view class="flex star" v-if="item.zero_level >= 7">
-									<image src="../../static/icon/star.png" mode="" v-for="item in (item.zero_level*1 - 6)"></image>
-								</view>
 								<view class="time">
-									<text >{{ showPone(item.phone)  }}  </text><text v-if="item.level">({{ showLevel(item)}})</text>
+									<text v-if="item.level">({{ showLevel(item)}})</text>
 								</view>
 								<view class="time">
-									<!-- <text>贡献值:{{item.team_amount}}</text> -->
+									<text>消费金额:{{item.numberCount || '0'}}</text>
 								</view>
 								<view class="time">
 									<text>{{ item.time }}</text>
@@ -66,6 +63,7 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<home></home>
 	</view>
 </template>
 <script>
@@ -149,11 +147,13 @@
 			showPone(phoen) {
 				if(phoen) {
 					return phoen.replace(/(\d{3})\d{4}(\d{4})/, '$1∗∗∗∗$2');
+				}else {
+					return ''
 				}
 			},
 			showLevel(val) {
 				let data = this.listList.find(item => item.grade == val.level)
-				if(data) {
+				if(data && data.name) {
 					return data.name
 				}else {
 					if(val.orderCount > 0) {

+ 52 - 17
pages/user/user.vue

@@ -12,16 +12,16 @@
 					@click="navTo('/pages/set/userinfo')"></image>
 				<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else
 					@click="navTo('/pages/set/userinfo')"></image>
-				<!-- <image class="user-shop-icon" v-if="userInfo && userInfo.level" :src="showLevel(userInfo.level)"
-					mode=""></image> -->
-				<view class="user-name" v-if="userInfo && userInfo.uid" style="color: #fdbc36;width: 500px;">
-					{{userInfo.level?showLevel(userInfo.level):""}}
+					<!-- 					{{userInfo.level?showLevel(userInfo.level):""}} -->
+					<view class="user-name clamp2">{{ userInfo.nickname || '游客'}}</view>
+				<view class="user-name" v-if="userInfo && userInfo.uid" >
+					<image v-if="userInfo && userInfo.level > 0" :src="showLevel(userInfo.level)" mode="heightFix" style="height: 35rpx;display: inline-block;margin:5rpx;"></image>
+					<image v-if="userInfo && userInfo.zero_level > 0" :src="showLevel(userInfo.zero_level)" mode="heightFix" style="height:35rpx;display: inline-block;margin:5rpx;"></image>
+				</view>
+				
+				<view class="user-id" v-if="userInfo && userInfo.uid" style="padding-top: 5rpx;">
+					UID:{{userInfo.uid}}
 				</view>
-				<!-- 					{{userInfo.level && userInfo.zero_level_name && userInfo.zero_level > 0 ?' - ': ''}}{{ userInfo.zero_level_name && userInfo.zero_level > 0?userInfo.zero_level_name:''}} -->
-				<view class="user-name clamp2">{{ userInfo.nickname || '游客'}}</view>
-				<!-- <view class="user-id" v-if="userInfo && userInfo.uid">
-					{{showLevel(userInfo.level)}}
-				</view> -->
 			</view>
 			</image>
 		</view>
@@ -151,10 +151,15 @@
 					<image class="oitem-image" src="../../static/user/m5.png" mode=""></image>
 					<view class="oitem-font">收货地址</view>
 				</view>
-				<view class="oitem" @click="openPp('popupkf')">
-					<image class="oitem-image" src="../../static/user/m6.png" mode=""></image>
-					<view class="oitem-font">联系客服</view>
-				</view>
+				<!-- <button open-type="contact" class="basebtn ">
+					<view class="oitems">
+						<image class="oitem-image" src="../../static/user/m6.png" mode="" ></image>
+						<view class="oitem-font">联系客服</view>
+					</view>
+				</button> -->
+				<!-- <view class="oitem" @click="openPp('popupkf')">
+					
+				</view> -->
 				<view class="oitem" @click="navTo('/pages/set/userinfo')">
 					<image class="oitem-image" src="../../static/user/m7.png" mode=""></image>
 					<view class="oitem-font">设置</view>
@@ -401,17 +406,22 @@
 				}
 			},
 			getLevelList() {
-				getLevelList().then(res => {
+				getLevelList({
+					type: 1
+				}).then(res => {
 					console.log(res);
 					this.listList = res.data.list
+					getLevelList().then(res => {
+						this.listList =this.listList.concat(res.data.list) 
+					})
 				})
 			},
 			showLevel(val) {
 				let data = this.listList.find(item => item.grade == val)
 				console.log(data);
 				if (data) {
-					// return data.icon
-					return data.name
+					return data.icon
+					// return data.name
 				} else {
 					return ''
 				}
@@ -582,7 +592,17 @@
 		}
 	};
 </script>
-<style lang="scss">
+<style lang="scss" lang="scss">
+	.basebtn {
+		background: #fff;
+		padding: 0;
+
+		// margin: 0;
+		&::after {
+			border: none;
+		}
+	}
+
 	%flex-center {
 		display: flex;
 		flex-direction: column;
@@ -1110,4 +1130,19 @@
 		// -webkit-text-fill-color: transparent;
 		color: #fff;
 	}
+	.oitems {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		.oitem-image {
+			height: 40rpx;
+			width: 42rpx;
+		}
+		.oitem-font {
+			margin-top: 20rpx;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
 </style>

+ 5 - 2
pages/user/withdrawal.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
+		<uni-notice-bar single="true" :text="'提现手续费:' + commission + '%'"></uni-notice-bar>
 		<view class="content-money">
 			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
 				<view class="buttom">
@@ -19,6 +19,7 @@
 				<view class="buttom" @click="withdrawal = money">全部提现</view>
 			</view>
 		</view>
+		<uni-notice-bar v-if="withdrawal > 0" single="true" :text="'实际到账:' + (withdrawal * (1-0.01*commission)).toFixed(2) "></uni-notice-bar>
 		<view class="list">
 			<radio-group @change="tabRadio">
 				<!-- <label>
@@ -116,7 +117,7 @@
 		</view>
 		<button class="add-btn modified" @click="navTo('/pages/user/sqdl')">银行卡管理</button>
 		<button class="add-btn up" @click="confirm">提交申请</button>
-		
+		<home></home>
 	</view>
 </template>
 
@@ -158,6 +159,7 @@
 		},
 		data() {
 			return {
+				commission: 0,
 				auth: 1,
 				bankInfo: {},
 				weixin_no: '',
@@ -215,6 +217,7 @@
 					console.log(data, 'data+++++++++')
 					this.minPrice = data.minPrice;
 					this.money = data.brokerage_price
+					this.commission = data.commission*1
 				});
 				
 			},

+ 5 - 4
pages/user/yjzye.vue

@@ -20,6 +20,7 @@
 			</view>
 		</view>
 		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">兑换</button>
+		<home></home>
 	</view>
 </template>
 
@@ -33,7 +34,7 @@
 		yjzye,
 		rechargeWechat
 	} from '@/api/user.js';
-	import { passUser } from '@/api/zero.js'
+	// import { passUser } from '@/api/zero.js'
 	import {
 		mapMutations,
 		mapState
@@ -92,9 +93,9 @@
 						obj.login();
 						// 保存返回用户数据
 						obj.setUserInfo(e.data);
-						passUser().then(re => {
-							this.pUser = re.data
-						})
+						// passUser().then(re => {
+						// 	this.pUser = re.data
+						// })
 					})
 					.catch(e => {
 						console.log(e);

+ 2 - 1
pages/user/yjzz.vue

@@ -24,6 +24,7 @@
 			</view>
 		</view>
 		<button class="add-btn up"  @click="!loding ? confirm('zz') : ''">赠送</button>
+		<home></home>
 		<!-- <button class="add-btn up jy"  @click="!loding ? confirm('jy') : ''">交易</button> -->
 	</view>
 </template>
@@ -107,7 +108,7 @@
 						obj.loding = false;
 						// 保存返回用户数据
 						obj.setUserInfo(e.data);
-						this.passUser()
+						// this.passUser()
 					})
 					.catch(e => {
 						console.log(e);

+ 2 - 1
pages/user/yue.vue

@@ -15,7 +15,7 @@
 				<view class="moneybtn-box">
 					<view class="money-btn" ></view>
 					<!-- 余额互转 -->
-					<view class="money-btn" @click="navto('/pages/user/yjzz?type=1')"></view>
+					<view class="money-btn" @click="navto('/pages/user/yjzz?type=1')">余额互转</view>
 				</view>
 			</view>
 		</view>
@@ -57,6 +57,7 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<home></home>
 	</view>
 </template>
 

BIN
static/icon/home.png


BIN
static/icon/kf.png


BIN
static/user/close_x.png


+ 22 - 0
uni_modules/uni-icons/changelog.md

@@ -0,0 +1,22 @@
+## 1.3.5(2022-01-24)
+- 优化 size 属性可以传入不带单位的字符串数值
+## 1.3.4(2022-01-24)
+- 优化 size 支持其他单位
+## 1.3.3(2022-01-17)
+- 修复 nvue 有些图标不显示的bug,兼容老版本图标
+## 1.3.2(2021-12-01)
+- 优化 示例可复制图标名称
+## 1.3.1(2021-11-23)
+- 优化 兼容旧组件 type 值
+## 1.3.0(2021-11-19)
+- 新增 更多图标
+- 优化 自定义图标使用方式
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
+## 1.1.7(2021-11-08)
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.5(2021-05-12)
+- 新增 组件示例地址
+## 1.1.4(2021-02-05)
+- 调整为uni_modules目录规范

+ 1169 - 0
uni_modules/uni-icons/components/uni-icons/icons.js

@@ -0,0 +1,1169 @@
+export default {
+  "id": "2852637",
+  "name": "uniui图标库",
+  "font_family": "uniicons",
+  "css_prefix_text": "uniui-",
+  "description": "",
+  "glyphs": [
+    {
+      "icon_id": "25027049",
+      "name": "yanse",
+      "font_class": "color",
+      "unicode": "e6cf",
+      "unicode_decimal": 59087
+    },
+    {
+      "icon_id": "25027048",
+      "name": "wallet",
+      "font_class": "wallet",
+      "unicode": "e6b1",
+      "unicode_decimal": 59057
+    },
+    {
+      "icon_id": "25015720",
+      "name": "settings-filled",
+      "font_class": "settings-filled",
+      "unicode": "e6ce",
+      "unicode_decimal": 59086
+    },
+    {
+      "icon_id": "25015434",
+      "name": "shimingrenzheng-filled",
+      "font_class": "auth-filled",
+      "unicode": "e6cc",
+      "unicode_decimal": 59084
+    },
+    {
+      "icon_id": "24934246",
+      "name": "shop-filled",
+      "font_class": "shop-filled",
+      "unicode": "e6cd",
+      "unicode_decimal": 59085
+    },
+    {
+      "icon_id": "24934159",
+      "name": "staff-filled-01",
+      "font_class": "staff-filled",
+      "unicode": "e6cb",
+      "unicode_decimal": 59083
+    },
+    {
+      "icon_id": "24932461",
+      "name": "VIP-filled",
+      "font_class": "vip-filled",
+      "unicode": "e6c6",
+      "unicode_decimal": 59078
+    },
+    {
+      "icon_id": "24932462",
+      "name": "plus_circle_fill",
+      "font_class": "plus-filled",
+      "unicode": "e6c7",
+      "unicode_decimal": 59079
+    },
+    {
+      "icon_id": "24932463",
+      "name": "folder_add-filled",
+      "font_class": "folder-add-filled",
+      "unicode": "e6c8",
+      "unicode_decimal": 59080
+    },
+    {
+      "icon_id": "24932464",
+      "name": "yanse-filled",
+      "font_class": "color-filled",
+      "unicode": "e6c9",
+      "unicode_decimal": 59081
+    },
+    {
+      "icon_id": "24932465",
+      "name": "tune-filled",
+      "font_class": "tune-filled",
+      "unicode": "e6ca",
+      "unicode_decimal": 59082
+    },
+    {
+      "icon_id": "24932455",
+      "name": "a-rilidaka-filled",
+      "font_class": "calendar-filled",
+      "unicode": "e6c0",
+      "unicode_decimal": 59072
+    },
+    {
+      "icon_id": "24932456",
+      "name": "notification-filled",
+      "font_class": "notification-filled",
+      "unicode": "e6c1",
+      "unicode_decimal": 59073
+    },
+    {
+      "icon_id": "24932457",
+      "name": "wallet-filled",
+      "font_class": "wallet-filled",
+      "unicode": "e6c2",
+      "unicode_decimal": 59074
+    },
+    {
+      "icon_id": "24932458",
+      "name": "paihangbang-filled",
+      "font_class": "medal-filled",
+      "unicode": "e6c3",
+      "unicode_decimal": 59075
+    },
+    {
+      "icon_id": "24932459",
+      "name": "gift-filled",
+      "font_class": "gift-filled",
+      "unicode": "e6c4",
+      "unicode_decimal": 59076
+    },
+    {
+      "icon_id": "24932460",
+      "name": "fire-filled",
+      "font_class": "fire-filled",
+      "unicode": "e6c5",
+      "unicode_decimal": 59077
+    },
+    {
+      "icon_id": "24928001",
+      "name": "refreshempty",
+      "font_class": "refreshempty",
+      "unicode": "e6bf",
+      "unicode_decimal": 59071
+    },
+    {
+      "icon_id": "24926853",
+      "name": "location-ellipse",
+      "font_class": "location-filled",
+      "unicode": "e6af",
+      "unicode_decimal": 59055
+    },
+    {
+      "icon_id": "24926735",
+      "name": "person-filled",
+      "font_class": "person-filled",
+      "unicode": "e69d",
+      "unicode_decimal": 59037
+    },
+    {
+      "icon_id": "24926703",
+      "name": "personadd-filled",
+      "font_class": "personadd-filled",
+      "unicode": "e698",
+      "unicode_decimal": 59032
+    },
+    {
+      "icon_id": "24923351",
+      "name": "back",
+      "font_class": "back",
+      "unicode": "e6b9",
+      "unicode_decimal": 59065
+    },
+    {
+      "icon_id": "24923352",
+      "name": "forward",
+      "font_class": "forward",
+      "unicode": "e6ba",
+      "unicode_decimal": 59066
+    },
+    {
+      "icon_id": "24923353",
+      "name": "arrowthinright",
+      "font_class": "arrow-right",
+      "unicode": "e6bb",
+      "unicode_decimal": 59067
+    },
+		{
+		  "icon_id": "24923353",
+		  "name": "arrowthinright",
+		  "font_class": "arrowthinright",
+		  "unicode": "e6bb",
+		  "unicode_decimal": 59067
+		},
+    {
+      "icon_id": "24923354",
+      "name": "arrowthinleft",
+      "font_class": "arrow-left",
+      "unicode": "e6bc",
+      "unicode_decimal": 59068
+    },
+		{
+		  "icon_id": "24923354",
+		  "name": "arrowthinleft",
+		  "font_class": "arrowthinleft",
+		  "unicode": "e6bc",
+		  "unicode_decimal": 59068
+		},
+    {
+      "icon_id": "24923355",
+      "name": "arrowthinup",
+      "font_class": "arrow-up",
+      "unicode": "e6bd",
+      "unicode_decimal": 59069
+    },
+		{
+		  "icon_id": "24923355",
+		  "name": "arrowthinup",
+		  "font_class": "arrowthinup",
+		  "unicode": "e6bd",
+		  "unicode_decimal": 59069
+		},
+    {
+      "icon_id": "24923356",
+      "name": "arrowthindown",
+      "font_class": "arrow-down",
+      "unicode": "e6be",
+      "unicode_decimal": 59070
+    },{
+      "icon_id": "24923356",
+      "name": "arrowthindown",
+      "font_class": "arrowthindown",
+      "unicode": "e6be",
+      "unicode_decimal": 59070
+    },
+    {
+      "icon_id": "24923349",
+      "name": "arrowdown",
+      "font_class": "bottom",
+      "unicode": "e6b8",
+      "unicode_decimal": 59064
+    },{
+      "icon_id": "24923349",
+      "name": "arrowdown",
+      "font_class": "arrowdown",
+      "unicode": "e6b8",
+      "unicode_decimal": 59064
+    },
+    {
+      "icon_id": "24923346",
+      "name": "arrowright",
+      "font_class": "right",
+      "unicode": "e6b5",
+      "unicode_decimal": 59061
+    },
+		{
+		  "icon_id": "24923346",
+		  "name": "arrowright",
+		  "font_class": "arrowright",
+		  "unicode": "e6b5",
+		  "unicode_decimal": 59061
+		},
+    {
+      "icon_id": "24923347",
+      "name": "arrowup",
+      "font_class": "top",
+      "unicode": "e6b6",
+      "unicode_decimal": 59062
+    },
+		{
+		  "icon_id": "24923347",
+		  "name": "arrowup",
+		  "font_class": "arrowup",
+		  "unicode": "e6b6",
+		  "unicode_decimal": 59062
+		},
+    {
+      "icon_id": "24923348",
+      "name": "arrowleft",
+      "font_class": "left",
+      "unicode": "e6b7",
+      "unicode_decimal": 59063
+    },
+		{
+		  "icon_id": "24923348",
+		  "name": "arrowleft",
+		  "font_class": "arrowleft",
+		  "unicode": "e6b7",
+		  "unicode_decimal": 59063
+		},
+    {
+      "icon_id": "24923334",
+      "name": "eye",
+      "font_class": "eye",
+      "unicode": "e651",
+      "unicode_decimal": 58961
+    },
+    {
+      "icon_id": "24923335",
+      "name": "eye-filled",
+      "font_class": "eye-filled",
+      "unicode": "e66a",
+      "unicode_decimal": 58986
+    },
+    {
+      "icon_id": "24923336",
+      "name": "eye-slash",
+      "font_class": "eye-slash",
+      "unicode": "e6b3",
+      "unicode_decimal": 59059
+    },
+    {
+      "icon_id": "24923337",
+      "name": "eye-slash-filled",
+      "font_class": "eye-slash-filled",
+      "unicode": "e6b4",
+      "unicode_decimal": 59060
+    },
+    {
+      "icon_id": "24923305",
+      "name": "info-filled",
+      "font_class": "info-filled",
+      "unicode": "e649",
+      "unicode_decimal": 58953
+    },
+    {
+      "icon_id": "24923299",
+      "name": "reload-01",
+      "font_class": "reload",
+      "unicode": "e6b2",
+      "unicode_decimal": 59058
+    },
+    {
+      "icon_id": "24923195",
+      "name": "mic_slash_fill",
+      "font_class": "micoff-filled",
+      "unicode": "e6b0",
+      "unicode_decimal": 59056
+    },
+    {
+      "icon_id": "24923165",
+      "name": "map-pin-ellipse",
+      "font_class": "map-pin-ellipse",
+      "unicode": "e6ac",
+      "unicode_decimal": 59052
+    },
+    {
+      "icon_id": "24923166",
+      "name": "map-pin",
+      "font_class": "map-pin",
+      "unicode": "e6ad",
+      "unicode_decimal": 59053
+    },
+    {
+      "icon_id": "24923167",
+      "name": "location",
+      "font_class": "location",
+      "unicode": "e6ae",
+      "unicode_decimal": 59054
+    },
+    {
+      "icon_id": "24923064",
+      "name": "starhalf",
+      "font_class": "starhalf",
+      "unicode": "e683",
+      "unicode_decimal": 59011
+    },
+    {
+      "icon_id": "24923065",
+      "name": "star",
+      "font_class": "star",
+      "unicode": "e688",
+      "unicode_decimal": 59016
+    },
+    {
+      "icon_id": "24923066",
+      "name": "star-filled",
+      "font_class": "star-filled",
+      "unicode": "e68f",
+      "unicode_decimal": 59023
+    },
+    {
+      "icon_id": "24899646",
+      "name": "a-rilidaka",
+      "font_class": "calendar",
+      "unicode": "e6a0",
+      "unicode_decimal": 59040
+    },
+    {
+      "icon_id": "24899647",
+      "name": "fire",
+      "font_class": "fire",
+      "unicode": "e6a1",
+      "unicode_decimal": 59041
+    },
+    {
+      "icon_id": "24899648",
+      "name": "paihangbang",
+      "font_class": "medal",
+      "unicode": "e6a2",
+      "unicode_decimal": 59042
+    },
+    {
+      "icon_id": "24899649",
+      "name": "font",
+      "font_class": "font",
+      "unicode": "e6a3",
+      "unicode_decimal": 59043
+    },
+    {
+      "icon_id": "24899650",
+      "name": "gift",
+      "font_class": "gift",
+      "unicode": "e6a4",
+      "unicode_decimal": 59044
+    },
+    {
+      "icon_id": "24899651",
+      "name": "link",
+      "font_class": "link",
+      "unicode": "e6a5",
+      "unicode_decimal": 59045
+    },
+    {
+      "icon_id": "24899652",
+      "name": "notification",
+      "font_class": "notification",
+      "unicode": "e6a6",
+      "unicode_decimal": 59046
+    },
+    {
+      "icon_id": "24899653",
+      "name": "staff",
+      "font_class": "staff",
+      "unicode": "e6a7",
+      "unicode_decimal": 59047
+    },
+    {
+      "icon_id": "24899654",
+      "name": "VIP",
+      "font_class": "vip",
+      "unicode": "e6a8",
+      "unicode_decimal": 59048
+    },
+    {
+      "icon_id": "24899655",
+      "name": "folder_add",
+      "font_class": "folder-add",
+      "unicode": "e6a9",
+      "unicode_decimal": 59049
+    },
+    {
+      "icon_id": "24899656",
+      "name": "tune",
+      "font_class": "tune",
+      "unicode": "e6aa",
+      "unicode_decimal": 59050
+    },
+    {
+      "icon_id": "24899657",
+      "name": "shimingrenzheng",
+      "font_class": "auth",
+      "unicode": "e6ab",
+      "unicode_decimal": 59051
+    },
+    {
+      "icon_id": "24899565",
+      "name": "person",
+      "font_class": "person",
+      "unicode": "e699",
+      "unicode_decimal": 59033
+    },
+    {
+      "icon_id": "24899566",
+      "name": "email-filled",
+      "font_class": "email-filled",
+      "unicode": "e69a",
+      "unicode_decimal": 59034
+    },
+    {
+      "icon_id": "24899567",
+      "name": "phone-filled",
+      "font_class": "phone-filled",
+      "unicode": "e69b",
+      "unicode_decimal": 59035
+    },
+    {
+      "icon_id": "24899568",
+      "name": "phone",
+      "font_class": "phone",
+      "unicode": "e69c",
+      "unicode_decimal": 59036
+    },
+    {
+      "icon_id": "24899570",
+      "name": "email",
+      "font_class": "email",
+      "unicode": "e69e",
+      "unicode_decimal": 59038
+    },
+    {
+      "icon_id": "24899571",
+      "name": "personadd",
+      "font_class": "personadd",
+      "unicode": "e69f",
+      "unicode_decimal": 59039
+    },
+    {
+      "icon_id": "24899558",
+      "name": "chatboxes-filled",
+      "font_class": "chatboxes-filled",
+      "unicode": "e692",
+      "unicode_decimal": 59026
+    },
+    {
+      "icon_id": "24899559",
+      "name": "contact",
+      "font_class": "contact",
+      "unicode": "e693",
+      "unicode_decimal": 59027
+    },
+    {
+      "icon_id": "24899560",
+      "name": "chatbubble-filled",
+      "font_class": "chatbubble-filled",
+      "unicode": "e694",
+      "unicode_decimal": 59028
+    },
+    {
+      "icon_id": "24899561",
+      "name": "contact-filled",
+      "font_class": "contact-filled",
+      "unicode": "e695",
+      "unicode_decimal": 59029
+    },
+    {
+      "icon_id": "24899562",
+      "name": "chatboxes",
+      "font_class": "chatboxes",
+      "unicode": "e696",
+      "unicode_decimal": 59030
+    },
+    {
+      "icon_id": "24899563",
+      "name": "chatbubble",
+      "font_class": "chatbubble",
+      "unicode": "e697",
+      "unicode_decimal": 59031
+    },
+    {
+      "icon_id": "24881290",
+      "name": "upload-filled",
+      "font_class": "upload-filled",
+      "unicode": "e68e",
+      "unicode_decimal": 59022
+    },
+    {
+      "icon_id": "24881292",
+      "name": "upload",
+      "font_class": "upload",
+      "unicode": "e690",
+      "unicode_decimal": 59024
+    },
+    {
+      "icon_id": "24881293",
+      "name": "weixin",
+      "font_class": "weixin",
+      "unicode": "e691",
+      "unicode_decimal": 59025
+    },
+    {
+      "icon_id": "24881274",
+      "name": "compose",
+      "font_class": "compose",
+      "unicode": "e67f",
+      "unicode_decimal": 59007
+    },
+    {
+      "icon_id": "24881275",
+      "name": "qq",
+      "font_class": "qq",
+      "unicode": "e680",
+      "unicode_decimal": 59008
+    },
+    {
+      "icon_id": "24881276",
+      "name": "download-filled",
+      "font_class": "download-filled",
+      "unicode": "e681",
+      "unicode_decimal": 59009
+    },
+    {
+      "icon_id": "24881277",
+      "name": "pengyouquan",
+      "font_class": "pyq",
+      "unicode": "e682",
+      "unicode_decimal": 59010
+    },
+    {
+      "icon_id": "24881279",
+      "name": "sound",
+      "font_class": "sound",
+      "unicode": "e684",
+      "unicode_decimal": 59012
+    },
+    {
+      "icon_id": "24881280",
+      "name": "trash-filled",
+      "font_class": "trash-filled",
+      "unicode": "e685",
+      "unicode_decimal": 59013
+    },
+    {
+      "icon_id": "24881281",
+      "name": "sound-filled",
+      "font_class": "sound-filled",
+      "unicode": "e686",
+      "unicode_decimal": 59014
+    },
+    {
+      "icon_id": "24881282",
+      "name": "trash",
+      "font_class": "trash",
+      "unicode": "e687",
+      "unicode_decimal": 59015
+    },
+    {
+      "icon_id": "24881284",
+      "name": "videocam-filled",
+      "font_class": "videocam-filled",
+      "unicode": "e689",
+      "unicode_decimal": 59017
+    },
+    {
+      "icon_id": "24881285",
+      "name": "spinner-cycle",
+      "font_class": "spinner-cycle",
+      "unicode": "e68a",
+      "unicode_decimal": 59018
+    },
+    {
+      "icon_id": "24881286",
+      "name": "weibo",
+      "font_class": "weibo",
+      "unicode": "e68b",
+      "unicode_decimal": 59019
+    },
+    {
+      "icon_id": "24881288",
+      "name": "videocam",
+      "font_class": "videocam",
+      "unicode": "e68c",
+      "unicode_decimal": 59020
+    },
+    {
+      "icon_id": "24881289",
+      "name": "download",
+      "font_class": "download",
+      "unicode": "e68d",
+      "unicode_decimal": 59021
+    },
+    {
+      "icon_id": "24879601",
+      "name": "help",
+      "font_class": "help",
+      "unicode": "e679",
+      "unicode_decimal": 59001
+    },
+    {
+      "icon_id": "24879602",
+      "name": "navigate-filled",
+      "font_class": "navigate-filled",
+      "unicode": "e67a",
+      "unicode_decimal": 59002
+    },
+    {
+      "icon_id": "24879603",
+      "name": "plusempty",
+      "font_class": "plusempty",
+      "unicode": "e67b",
+      "unicode_decimal": 59003
+    },
+    {
+      "icon_id": "24879604",
+      "name": "smallcircle",
+      "font_class": "smallcircle",
+      "unicode": "e67c",
+      "unicode_decimal": 59004
+    },
+    {
+      "icon_id": "24879605",
+      "name": "minus-filled",
+      "font_class": "minus-filled",
+      "unicode": "e67d",
+      "unicode_decimal": 59005
+    },
+    {
+      "icon_id": "24879606",
+      "name": "micoff",
+      "font_class": "micoff",
+      "unicode": "e67e",
+      "unicode_decimal": 59006
+    },
+    {
+      "icon_id": "24879588",
+      "name": "closeempty",
+      "font_class": "closeempty",
+      "unicode": "e66c",
+      "unicode_decimal": 58988
+    },
+    {
+      "icon_id": "24879589",
+      "name": "clear",
+      "font_class": "clear",
+      "unicode": "e66d",
+      "unicode_decimal": 58989
+    },
+    {
+      "icon_id": "24879590",
+      "name": "navigate",
+      "font_class": "navigate",
+      "unicode": "e66e",
+      "unicode_decimal": 58990
+    },
+    {
+      "icon_id": "24879591",
+      "name": "minus",
+      "font_class": "minus",
+      "unicode": "e66f",
+      "unicode_decimal": 58991
+    },
+    {
+      "icon_id": "24879592",
+      "name": "image",
+      "font_class": "image",
+      "unicode": "e670",
+      "unicode_decimal": 58992
+    },
+    {
+      "icon_id": "24879593",
+      "name": "mic",
+      "font_class": "mic",
+      "unicode": "e671",
+      "unicode_decimal": 58993
+    },
+    {
+      "icon_id": "24879594",
+      "name": "paperplane",
+      "font_class": "paperplane",
+      "unicode": "e672",
+      "unicode_decimal": 58994
+    },
+    {
+      "icon_id": "24879595",
+      "name": "close",
+      "font_class": "close",
+      "unicode": "e673",
+      "unicode_decimal": 58995
+    },
+    {
+      "icon_id": "24879596",
+      "name": "help-filled",
+      "font_class": "help-filled",
+      "unicode": "e674",
+      "unicode_decimal": 58996
+    },
+    {
+      "icon_id": "24879597",
+      "name": "plus-filled",
+      "font_class": "paperplane-filled",
+      "unicode": "e675",
+      "unicode_decimal": 58997
+    },
+    {
+      "icon_id": "24879598",
+      "name": "plus",
+      "font_class": "plus",
+      "unicode": "e676",
+      "unicode_decimal": 58998
+    },
+    {
+      "icon_id": "24879599",
+      "name": "mic-filled",
+      "font_class": "mic-filled",
+      "unicode": "e677",
+      "unicode_decimal": 58999
+    },
+    {
+      "icon_id": "24879600",
+      "name": "image-filled",
+      "font_class": "image-filled",
+      "unicode": "e678",
+      "unicode_decimal": 59000
+    },
+    {
+      "icon_id": "24855900",
+      "name": "locked-filled",
+      "font_class": "locked-filled",
+      "unicode": "e668",
+      "unicode_decimal": 58984
+    },
+    {
+      "icon_id": "24855901",
+      "name": "info",
+      "font_class": "info",
+      "unicode": "e669",
+      "unicode_decimal": 58985
+    },
+    {
+      "icon_id": "24855903",
+      "name": "locked",
+      "font_class": "locked",
+      "unicode": "e66b",
+      "unicode_decimal": 58987
+    },
+    {
+      "icon_id": "24855884",
+      "name": "camera-filled",
+      "font_class": "camera-filled",
+      "unicode": "e658",
+      "unicode_decimal": 58968
+    },
+    {
+      "icon_id": "24855885",
+      "name": "chat-filled",
+      "font_class": "chat-filled",
+      "unicode": "e659",
+      "unicode_decimal": 58969
+    },
+    {
+      "icon_id": "24855886",
+      "name": "camera",
+      "font_class": "camera",
+      "unicode": "e65a",
+      "unicode_decimal": 58970
+    },
+    {
+      "icon_id": "24855887",
+      "name": "circle",
+      "font_class": "circle",
+      "unicode": "e65b",
+      "unicode_decimal": 58971
+    },
+    {
+      "icon_id": "24855888",
+      "name": "checkmarkempty",
+      "font_class": "checkmarkempty",
+      "unicode": "e65c",
+      "unicode_decimal": 58972
+    },
+    {
+      "icon_id": "24855889",
+      "name": "chat",
+      "font_class": "chat",
+      "unicode": "e65d",
+      "unicode_decimal": 58973
+    },
+    {
+      "icon_id": "24855890",
+      "name": "circle-filled",
+      "font_class": "circle-filled",
+      "unicode": "e65e",
+      "unicode_decimal": 58974
+    },
+    {
+      "icon_id": "24855891",
+      "name": "flag",
+      "font_class": "flag",
+      "unicode": "e65f",
+      "unicode_decimal": 58975
+    },
+    {
+      "icon_id": "24855892",
+      "name": "flag-filled",
+      "font_class": "flag-filled",
+      "unicode": "e660",
+      "unicode_decimal": 58976
+    },
+    {
+      "icon_id": "24855893",
+      "name": "gear-filled",
+      "font_class": "gear-filled",
+      "unicode": "e661",
+      "unicode_decimal": 58977
+    },
+    {
+      "icon_id": "24855894",
+      "name": "home",
+      "font_class": "home",
+      "unicode": "e662",
+      "unicode_decimal": 58978
+    },
+    {
+      "icon_id": "24855895",
+      "name": "home-filled",
+      "font_class": "home-filled",
+      "unicode": "e663",
+      "unicode_decimal": 58979
+    },
+    {
+      "icon_id": "24855896",
+      "name": "gear",
+      "font_class": "gear",
+      "unicode": "e664",
+      "unicode_decimal": 58980
+    },
+    {
+      "icon_id": "24855897",
+      "name": "smallcircle-filled",
+      "font_class": "smallcircle-filled",
+      "unicode": "e665",
+      "unicode_decimal": 58981
+    },
+    {
+      "icon_id": "24855898",
+      "name": "map-filled",
+      "font_class": "map-filled",
+      "unicode": "e666",
+      "unicode_decimal": 58982
+    },
+    {
+      "icon_id": "24855899",
+      "name": "map",
+      "font_class": "map",
+      "unicode": "e667",
+      "unicode_decimal": 58983
+    },
+    {
+      "icon_id": "24855825",
+      "name": "refresh-filled",
+      "font_class": "refresh-filled",
+      "unicode": "e656",
+      "unicode_decimal": 58966
+    },
+    {
+      "icon_id": "24855826",
+      "name": "refresh",
+      "font_class": "refresh",
+      "unicode": "e657",
+      "unicode_decimal": 58967
+    },
+    {
+      "icon_id": "24855808",
+      "name": "cloud-upload",
+      "font_class": "cloud-upload",
+      "unicode": "e645",
+      "unicode_decimal": 58949
+    },
+    {
+      "icon_id": "24855809",
+      "name": "cloud-download-filled",
+      "font_class": "cloud-download-filled",
+      "unicode": "e646",
+      "unicode_decimal": 58950
+    },
+    {
+      "icon_id": "24855810",
+      "name": "cloud-download",
+      "font_class": "cloud-download",
+      "unicode": "e647",
+      "unicode_decimal": 58951
+    },
+    {
+      "icon_id": "24855811",
+      "name": "cloud-upload-filled",
+      "font_class": "cloud-upload-filled",
+      "unicode": "e648",
+      "unicode_decimal": 58952
+    },
+    {
+      "icon_id": "24855813",
+      "name": "redo",
+      "font_class": "redo",
+      "unicode": "e64a",
+      "unicode_decimal": 58954
+    },
+    {
+      "icon_id": "24855814",
+      "name": "images-filled",
+      "font_class": "images-filled",
+      "unicode": "e64b",
+      "unicode_decimal": 58955
+    },
+    {
+      "icon_id": "24855815",
+      "name": "undo-filled",
+      "font_class": "undo-filled",
+      "unicode": "e64c",
+      "unicode_decimal": 58956
+    },
+    {
+      "icon_id": "24855816",
+      "name": "more",
+      "font_class": "more",
+      "unicode": "e64d",
+      "unicode_decimal": 58957
+    },
+    {
+      "icon_id": "24855817",
+      "name": "more-filled",
+      "font_class": "more-filled",
+      "unicode": "e64e",
+      "unicode_decimal": 58958
+    },
+    {
+      "icon_id": "24855818",
+      "name": "undo",
+      "font_class": "undo",
+      "unicode": "e64f",
+      "unicode_decimal": 58959
+    },
+    {
+      "icon_id": "24855819",
+      "name": "images",
+      "font_class": "images",
+      "unicode": "e650",
+      "unicode_decimal": 58960
+    },
+    {
+      "icon_id": "24855821",
+      "name": "paperclip",
+      "font_class": "paperclip",
+      "unicode": "e652",
+      "unicode_decimal": 58962
+    },
+    {
+      "icon_id": "24855822",
+      "name": "settings",
+      "font_class": "settings",
+      "unicode": "e653",
+      "unicode_decimal": 58963
+    },
+    {
+      "icon_id": "24855823",
+      "name": "search",
+      "font_class": "search",
+      "unicode": "e654",
+      "unicode_decimal": 58964
+    },
+    {
+      "icon_id": "24855824",
+      "name": "redo-filled",
+      "font_class": "redo-filled",
+      "unicode": "e655",
+      "unicode_decimal": 58965
+    },
+    {
+      "icon_id": "24841702",
+      "name": "list",
+      "font_class": "list",
+      "unicode": "e644",
+      "unicode_decimal": 58948
+    },
+    {
+      "icon_id": "24841489",
+      "name": "mail-open-filled",
+      "font_class": "mail-open-filled",
+      "unicode": "e63a",
+      "unicode_decimal": 58938
+    },
+    {
+      "icon_id": "24841491",
+      "name": "hand-thumbsdown-filled",
+      "font_class": "hand-down-filled",
+      "unicode": "e63c",
+      "unicode_decimal": 58940
+    },
+    {
+      "icon_id": "24841492",
+      "name": "hand-thumbsdown",
+      "font_class": "hand-down",
+      "unicode": "e63d",
+      "unicode_decimal": 58941
+    },
+    {
+      "icon_id": "24841493",
+      "name": "hand-thumbsup-filled",
+      "font_class": "hand-up-filled",
+      "unicode": "e63e",
+      "unicode_decimal": 58942
+    },
+    {
+      "icon_id": "24841494",
+      "name": "hand-thumbsup",
+      "font_class": "hand-up",
+      "unicode": "e63f",
+      "unicode_decimal": 58943
+    },
+    {
+      "icon_id": "24841496",
+      "name": "heart-filled",
+      "font_class": "heart-filled",
+      "unicode": "e641",
+      "unicode_decimal": 58945
+    },
+    {
+      "icon_id": "24841498",
+      "name": "mail-open",
+      "font_class": "mail-open",
+      "unicode": "e643",
+      "unicode_decimal": 58947
+    },
+    {
+      "icon_id": "24841488",
+      "name": "heart",
+      "font_class": "heart",
+      "unicode": "e639",
+      "unicode_decimal": 58937
+    },
+    {
+      "icon_id": "24839963",
+      "name": "loop",
+      "font_class": "loop",
+      "unicode": "e633",
+      "unicode_decimal": 58931
+    },
+    {
+      "icon_id": "24839866",
+      "name": "pulldown",
+      "font_class": "pulldown",
+      "unicode": "e632",
+      "unicode_decimal": 58930
+    },
+    {
+      "icon_id": "24813798",
+      "name": "scan",
+      "font_class": "scan",
+      "unicode": "e62a",
+      "unicode_decimal": 58922
+    },
+    {
+      "icon_id": "24813786",
+      "name": "bars",
+      "font_class": "bars",
+      "unicode": "e627",
+      "unicode_decimal": 58919
+    },
+    {
+      "icon_id": "24813788",
+      "name": "cart-filled",
+      "font_class": "cart-filled",
+      "unicode": "e629",
+      "unicode_decimal": 58921
+    },
+    {
+      "icon_id": "24813790",
+      "name": "checkbox",
+      "font_class": "checkbox",
+      "unicode": "e62b",
+      "unicode_decimal": 58923
+    },
+    {
+      "icon_id": "24813791",
+      "name": "checkbox-filled",
+      "font_class": "checkbox-filled",
+      "unicode": "e62c",
+      "unicode_decimal": 58924
+    },
+    {
+      "icon_id": "24813794",
+      "name": "shop",
+      "font_class": "shop",
+      "unicode": "e62f",
+      "unicode_decimal": 58927
+    },
+    {
+      "icon_id": "24813795",
+      "name": "headphones",
+      "font_class": "headphones",
+      "unicode": "e630",
+      "unicode_decimal": 58928
+    },
+    {
+      "icon_id": "24813796",
+      "name": "cart",
+      "font_class": "cart",
+      "unicode": "e631",
+      "unicode_decimal": 58929
+    }
+  ]
+}

+ 96 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -0,0 +1,96 @@
+<template>
+	<!-- #ifdef APP-NVUE -->
+	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
+	<!-- #endif -->
+	<!-- #ifndef APP-NVUE -->
+	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
+	<!-- #endif -->
+</template>
+
+<script>
+	import icons from './icons.js';
+	const getVal = (val) => {
+		const reg = /^[0-9]*$/g
+		return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
+	} 
+	// #ifdef APP-NVUE
+	var domModule = weex.requireModule('dom');
+	import iconUrl from './uniicons.ttf'
+	domModule.addRule('fontFace', {
+		'fontFamily': "uniicons",
+		'src': "url('"+iconUrl+"')"
+	});
+	// #endif
+
+	/**
+	 * Icons 图标
+	 * @description 用于展示 icons 图标
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+	 * @property {Number} size 图标大小
+	 * @property {String} type 图标图案,参考示例
+	 * @property {String} color 图标颜色
+	 * @property {String} customPrefix 自定义图标
+	 * @event {Function} click 点击 Icon 触发事件
+	 */
+	export default {
+		name: 'UniIcons',
+		emits:['click'],
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333333'
+			},
+			size: {
+				type: [Number, String],
+				default: 16
+			},
+			customPrefix:{
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				icons: icons.glyphs
+			}
+		},
+		computed:{
+			unicode(){
+				let code = this.icons.find(v=>v.font_class === this.type)
+				if(code){
+					return unescape(`%u${code.unicode}`)
+				}
+				return ''
+			},
+			iconSize(){
+				return getVal(this.size)
+			}
+		},
+		methods: {
+			_onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/* #ifndef APP-NVUE */
+	@import './uniicons.css';
+	@font-face {
+		font-family: uniicons;
+		src: url('./uniicons.ttf') format('truetype');
+	}
+
+	/* #endif */
+	.uni-icons {
+		font-family: uniicons;
+		text-decoration: none;
+		text-align: center;
+	}
+
+</style>

+ 663 - 0
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -0,0 +1,663 @@
+.uniui-color:before {
+  content: "\e6cf";
+}
+
+.uniui-wallet:before {
+  content: "\e6b1";
+}
+
+.uniui-settings-filled:before {
+  content: "\e6ce";
+}
+
+.uniui-auth-filled:before {
+  content: "\e6cc";
+}
+
+.uniui-shop-filled:before {
+  content: "\e6cd";
+}
+
+.uniui-staff-filled:before {
+  content: "\e6cb";
+}
+
+.uniui-vip-filled:before {
+  content: "\e6c6";
+}
+
+.uniui-plus-filled:before {
+  content: "\e6c7";
+}
+
+.uniui-folder-add-filled:before {
+  content: "\e6c8";
+}
+
+.uniui-color-filled:before {
+  content: "\e6c9";
+}
+
+.uniui-tune-filled:before {
+  content: "\e6ca";
+}
+
+.uniui-calendar-filled:before {
+  content: "\e6c0";
+}
+
+.uniui-notification-filled:before {
+  content: "\e6c1";
+}
+
+.uniui-wallet-filled:before {
+  content: "\e6c2";
+}
+
+.uniui-medal-filled:before {
+  content: "\e6c3";
+}
+
+.uniui-gift-filled:before {
+  content: "\e6c4";
+}
+
+.uniui-fire-filled:before {
+  content: "\e6c5";
+}
+
+.uniui-refreshempty:before {
+  content: "\e6bf";
+}
+
+.uniui-location-filled:before {
+  content: "\e6af";
+}
+
+.uniui-person-filled:before {
+  content: "\e69d";
+}
+
+.uniui-personadd-filled:before {
+  content: "\e698";
+}
+
+.uniui-back:before {
+  content: "\e6b9";
+}
+
+.uniui-forward:before {
+  content: "\e6ba";
+}
+
+.uniui-arrow-right:before {
+  content: "\e6bb";
+}
+
+.uniui-arrowthinright:before {
+  content: "\e6bb";
+}
+
+.uniui-arrow-left:before {
+  content: "\e6bc";
+}
+
+.uniui-arrowthinleft:before {
+  content: "\e6bc";
+}
+
+.uniui-arrow-up:before {
+  content: "\e6bd";
+}
+
+.uniui-arrowthinup:before {
+  content: "\e6bd";
+}
+
+.uniui-arrow-down:before {
+  content: "\e6be";
+}
+
+.uniui-arrowthindown:before {
+  content: "\e6be";
+}
+
+.uniui-bottom:before {
+  content: "\e6b8";
+}
+
+.uniui-arrowdown:before {
+  content: "\e6b8";
+}
+
+.uniui-right:before {
+  content: "\e6b5";
+}
+
+.uniui-arrowright:before {
+  content: "\e6b5";
+}
+
+.uniui-top:before {
+  content: "\e6b6";
+}
+
+.uniui-arrowup:before {
+  content: "\e6b6";
+}
+
+.uniui-left:before {
+  content: "\e6b7";
+}
+
+.uniui-arrowleft:before {
+  content: "\e6b7";
+}
+
+.uniui-eye:before {
+  content: "\e651";
+}
+
+.uniui-eye-filled:before {
+  content: "\e66a";
+}
+
+.uniui-eye-slash:before {
+  content: "\e6b3";
+}
+
+.uniui-eye-slash-filled:before {
+  content: "\e6b4";
+}
+
+.uniui-info-filled:before {
+  content: "\e649";
+}
+
+.uniui-reload:before {
+  content: "\e6b2";
+}
+
+.uniui-micoff-filled:before {
+  content: "\e6b0";
+}
+
+.uniui-map-pin-ellipse:before {
+  content: "\e6ac";
+}
+
+.uniui-map-pin:before {
+  content: "\e6ad";
+}
+
+.uniui-location:before {
+  content: "\e6ae";
+}
+
+.uniui-starhalf:before {
+  content: "\e683";
+}
+
+.uniui-star:before {
+  content: "\e688";
+}
+
+.uniui-star-filled:before {
+  content: "\e68f";
+}
+
+.uniui-calendar:before {
+  content: "\e6a0";
+}
+
+.uniui-fire:before {
+  content: "\e6a1";
+}
+
+.uniui-medal:before {
+  content: "\e6a2";
+}
+
+.uniui-font:before {
+  content: "\e6a3";
+}
+
+.uniui-gift:before {
+  content: "\e6a4";
+}
+
+.uniui-link:before {
+  content: "\e6a5";
+}
+
+.uniui-notification:before {
+  content: "\e6a6";
+}
+
+.uniui-staff:before {
+  content: "\e6a7";
+}
+
+.uniui-vip:before {
+  content: "\e6a8";
+}
+
+.uniui-folder-add:before {
+  content: "\e6a9";
+}
+
+.uniui-tune:before {
+  content: "\e6aa";
+}
+
+.uniui-auth:before {
+  content: "\e6ab";
+}
+
+.uniui-person:before {
+  content: "\e699";
+}
+
+.uniui-email-filled:before {
+  content: "\e69a";
+}
+
+.uniui-phone-filled:before {
+  content: "\e69b";
+}
+
+.uniui-phone:before {
+  content: "\e69c";
+}
+
+.uniui-email:before {
+  content: "\e69e";
+}
+
+.uniui-personadd:before {
+  content: "\e69f";
+}
+
+.uniui-chatboxes-filled:before {
+  content: "\e692";
+}
+
+.uniui-contact:before {
+  content: "\e693";
+}
+
+.uniui-chatbubble-filled:before {
+  content: "\e694";
+}
+
+.uniui-contact-filled:before {
+  content: "\e695";
+}
+
+.uniui-chatboxes:before {
+  content: "\e696";
+}
+
+.uniui-chatbubble:before {
+  content: "\e697";
+}
+
+.uniui-upload-filled:before {
+  content: "\e68e";
+}
+
+.uniui-upload:before {
+  content: "\e690";
+}
+
+.uniui-weixin:before {
+  content: "\e691";
+}
+
+.uniui-compose:before {
+  content: "\e67f";
+}
+
+.uniui-qq:before {
+  content: "\e680";
+}
+
+.uniui-download-filled:before {
+  content: "\e681";
+}
+
+.uniui-pyq:before {
+  content: "\e682";
+}
+
+.uniui-sound:before {
+  content: "\e684";
+}
+
+.uniui-trash-filled:before {
+  content: "\e685";
+}
+
+.uniui-sound-filled:before {
+  content: "\e686";
+}
+
+.uniui-trash:before {
+  content: "\e687";
+}
+
+.uniui-videocam-filled:before {
+  content: "\e689";
+}
+
+.uniui-spinner-cycle:before {
+  content: "\e68a";
+}
+
+.uniui-weibo:before {
+  content: "\e68b";
+}
+
+.uniui-videocam:before {
+  content: "\e68c";
+}
+
+.uniui-download:before {
+  content: "\e68d";
+}
+
+.uniui-help:before {
+  content: "\e679";
+}
+
+.uniui-navigate-filled:before {
+  content: "\e67a";
+}
+
+.uniui-plusempty:before {
+  content: "\e67b";
+}
+
+.uniui-smallcircle:before {
+  content: "\e67c";
+}
+
+.uniui-minus-filled:before {
+  content: "\e67d";
+}
+
+.uniui-micoff:before {
+  content: "\e67e";
+}
+
+.uniui-closeempty:before {
+  content: "\e66c";
+}
+
+.uniui-clear:before {
+  content: "\e66d";
+}
+
+.uniui-navigate:before {
+  content: "\e66e";
+}
+
+.uniui-minus:before {
+  content: "\e66f";
+}
+
+.uniui-image:before {
+  content: "\e670";
+}
+
+.uniui-mic:before {
+  content: "\e671";
+}
+
+.uniui-paperplane:before {
+  content: "\e672";
+}
+
+.uniui-close:before {
+  content: "\e673";
+}
+
+.uniui-help-filled:before {
+  content: "\e674";
+}
+
+.uniui-paperplane-filled:before {
+  content: "\e675";
+}
+
+.uniui-plus:before {
+  content: "\e676";
+}
+
+.uniui-mic-filled:before {
+  content: "\e677";
+}
+
+.uniui-image-filled:before {
+  content: "\e678";
+}
+
+.uniui-locked-filled:before {
+  content: "\e668";
+}
+
+.uniui-info:before {
+  content: "\e669";
+}
+
+.uniui-locked:before {
+  content: "\e66b";
+}
+
+.uniui-camera-filled:before {
+  content: "\e658";
+}
+
+.uniui-chat-filled:before {
+  content: "\e659";
+}
+
+.uniui-camera:before {
+  content: "\e65a";
+}
+
+.uniui-circle:before {
+  content: "\e65b";
+}
+
+.uniui-checkmarkempty:before {
+  content: "\e65c";
+}
+
+.uniui-chat:before {
+  content: "\e65d";
+}
+
+.uniui-circle-filled:before {
+  content: "\e65e";
+}
+
+.uniui-flag:before {
+  content: "\e65f";
+}
+
+.uniui-flag-filled:before {
+  content: "\e660";
+}
+
+.uniui-gear-filled:before {
+  content: "\e661";
+}
+
+.uniui-home:before {
+  content: "\e662";
+}
+
+.uniui-home-filled:before {
+  content: "\e663";
+}
+
+.uniui-gear:before {
+  content: "\e664";
+}
+
+.uniui-smallcircle-filled:before {
+  content: "\e665";
+}
+
+.uniui-map-filled:before {
+  content: "\e666";
+}
+
+.uniui-map:before {
+  content: "\e667";
+}
+
+.uniui-refresh-filled:before {
+  content: "\e656";
+}
+
+.uniui-refresh:before {
+  content: "\e657";
+}
+
+.uniui-cloud-upload:before {
+  content: "\e645";
+}
+
+.uniui-cloud-download-filled:before {
+  content: "\e646";
+}
+
+.uniui-cloud-download:before {
+  content: "\e647";
+}
+
+.uniui-cloud-upload-filled:before {
+  content: "\e648";
+}
+
+.uniui-redo:before {
+  content: "\e64a";
+}
+
+.uniui-images-filled:before {
+  content: "\e64b";
+}
+
+.uniui-undo-filled:before {
+  content: "\e64c";
+}
+
+.uniui-more:before {
+  content: "\e64d";
+}
+
+.uniui-more-filled:before {
+  content: "\e64e";
+}
+
+.uniui-undo:before {
+  content: "\e64f";
+}
+
+.uniui-images:before {
+  content: "\e650";
+}
+
+.uniui-paperclip:before {
+  content: "\e652";
+}
+
+.uniui-settings:before {
+  content: "\e653";
+}
+
+.uniui-search:before {
+  content: "\e654";
+}
+
+.uniui-redo-filled:before {
+  content: "\e655";
+}
+
+.uniui-list:before {
+  content: "\e644";
+}
+
+.uniui-mail-open-filled:before {
+  content: "\e63a";
+}
+
+.uniui-hand-down-filled:before {
+  content: "\e63c";
+}
+
+.uniui-hand-down:before {
+  content: "\e63d";
+}
+
+.uniui-hand-up-filled:before {
+  content: "\e63e";
+}
+
+.uniui-hand-up:before {
+  content: "\e63f";
+}
+
+.uniui-heart-filled:before {
+  content: "\e641";
+}
+
+.uniui-mail-open:before {
+  content: "\e643";
+}
+
+.uniui-heart:before {
+  content: "\e639";
+}
+
+.uniui-loop:before {
+  content: "\e633";
+}
+
+.uniui-pulldown:before {
+  content: "\e632";
+}
+
+.uniui-scan:before {
+  content: "\e62a";
+}
+
+.uniui-bars:before {
+  content: "\e627";
+}
+
+.uniui-cart-filled:before {
+  content: "\e629";
+}
+
+.uniui-checkbox:before {
+  content: "\e62b";
+}
+
+.uniui-checkbox-filled:before {
+  content: "\e62c";
+}
+
+.uniui-shop:before {
+  content: "\e62f";
+}
+
+.uniui-headphones:before {
+  content: "\e630";
+}
+
+.uniui-cart:before {
+  content: "\e631";
+}

BIN
uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 86 - 0
uni_modules/uni-icons/package.json

@@ -0,0 +1,86 @@
+{
+  "id": "uni-icons",
+  "displayName": "uni-icons 图标",
+  "version": "1.3.5",
+  "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "icon",
+    "图标"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.2.14"
+  },
+  "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": ["uni-scss"],
+    "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"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 8 - 0
uni_modules/uni-icons/readme.md

@@ -0,0 +1,8 @@
+## Icons 图标
+> **组件名:uni-icons**
+> 代码块: `uIcons`
+
+用于展示 icons 图标 。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 8 - 0
uni_modules/xzw-notice/changelog.md

@@ -0,0 +1,8 @@
+## 1.2.0(2023-10-28)
+- 增加预览地址
+## 1.1.0(2023-10-12)
+- 增加滚动速度控制, 有快中慢三档
+- 水平滚动支持多条数据轮播
+- 增加示例项目
+## 1.0.0(2022-02-13)
+- 发布1.0.0版本

+ 179 - 0
uni_modules/xzw-notice/components/xzw-notice/xzw-notice.vue

@@ -0,0 +1,179 @@
+<template>
+	<view class="xzw_notice" :style="{color:getColor(theme),backgroundColor:getBgColor(theme)}">
+		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound" :color="getColor(theme)" size="22" />
+		<!-- 垂直滚动用到轮播组件 -->
+		<swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true" :interval="speed=='fast'?4000:speed=='normal'?6000:10000" :duration="500" :circular="true" disable-touch>
+			<swiper-item v-for="(item, index) in list" :key="index" class="swiperIn" @click="goItem(item)">
+				<view>{{item[theKey]}}</view>
+			</swiper-item>
+		</swiper>
+		<!-- 水平滚动取第一条公告 -->
+		<view class="notice_center2" v-else>
+			<view :class="speed">{{list[rowIndex][theKey]}}</view>
+		</view>
+		<view class="notice_right" v-if="showMore">
+			<view @click="goMore">更多</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		name: "xzw-notice",
+		props: {
+			//主题色,default|primary|error|warning|success|info
+			theme: {
+				type: String,
+				default: 'default'
+			},
+			// 是否显示左侧icon
+			showIcon: {
+				type: [Boolean, String],
+				default: true
+			},
+			// 是否显示更多
+			showMore: {
+				type: [Boolean, String],
+				default: true
+			},
+			//公告数组,必须是二维数组
+			list: {
+				type: Array,
+				default () {
+					return [{ id: 1, title: '公告1' }, { id: 2, title: '公告2' }]
+				}
+			},
+			//公告数组的键名
+			theKey: {
+				type: String,
+				default: 'title'
+			},
+			//方向,column垂直,row水平时取第一条公告
+			direction: {
+				type: String,
+				default: 'column'
+			},
+			//滚动速度,快fast,慢slow,默认normal
+			speed: {
+				type: String,
+				default: 'normal'
+			}
+		},
+		data() {
+			return {
+				rowIndex: 0
+			}
+		},
+		methods: {
+			getColor(theme) {
+				if (theme == "primary") {
+					return "#2979FF"
+				} else if (theme == "error") {
+					return "#FA3534"
+				} else if (theme == "warning") {
+					return "#FF9A43"
+				} else if (theme == "success") {
+					return "#1BBF6C"
+				} else if (theme == "info") {
+					return "#909399"
+				} else {
+					return "#303133"
+				}
+			},
+			getBgColor(theme) {
+				if (theme == "primary") {
+					return "#ECF5FF"
+				} else if (theme == "error") {
+					return "#FEF0F0"
+				} else if (theme == "warning") {
+					return "#FDF6EC"
+				} else if (theme == "success") {
+					return "#DBF1E1"
+				} else if (theme == "info") {
+					return "#F4F4F5"
+				} else {
+					return "#FFFFFF"
+				}
+			},
+			// 点击公告
+			goItem(item) {
+				this.$emit('goItem', item)
+			},
+			//点击更多
+			goMore() {
+				this.$emit('goMore')
+			}
+		},
+		created() {
+			if (this.direction == "row") {
+				let time = this.speed == "fast" ? 4000 : this.speed == "normal" ? 6000 : 10000
+				setInterval(() => {
+					if (this.rowIndex == this.list.length - 1) {
+						this.rowIndex = 0;
+					} else {
+						this.rowIndex++;
+					}
+				}, time);
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.xzw_notice {
+		font-size: 26upx;
+		height: 90upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx;
+		box-sizing: border-box;
+		width: 100%;
+		.notice_left {
+			margin: 0 20upx 0 0;
+		}
+		.notice_center {
+			flex: 1;
+			height: 90upx;
+			.swiperIn {
+				height: 80upx;
+				display: flex;
+				align-items: center;
+				view {
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-line-clamp: 1;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.notice_center2 {
+			flex: 1;
+			position: relative;
+			display: flex;
+			align-items: center;
+			height: 90upx;
+			overflow: hidden;
+			view {
+				position: absolute;
+				white-space: nowrap;
+				padding-left: 100%;
+				&.fast {
+					animation: notice 4s linear infinite both;
+				}
+				&.normal {
+					animation: notice 6s linear infinite both;
+				}
+				&.slow {
+					animation: notice 10s linear infinite both;
+				}
+			}
+		}
+		.notice_right {
+			margin: 0 0 0 20upx;
+		}
+		@keyframes notice {
+			100% {
+				transform: translate3d(-100%, 0, 0);
+			}
+		}
+	}
+</style>

+ 82 - 0
uni_modules/xzw-notice/package.json

@@ -0,0 +1,82 @@
+{
+	"id": "xzw-notice",
+	"displayName": "垂直滚动通告栏水平滚动公告栏",
+	"version": "1.2.0",
+	"author": "kangle",
+	"description": "xzw-notice,垂直滚动通告栏水平滚动公告栏",
+	"keywords": [
+        "xzw-notice"
+    ],
+	"repository": "https://github.com/kangleyunju/uniapp",
+	"engines": {
+		"HBuilderX": "^3.5.1"
+	},
+	"dcloudext": {
+		"type": "component-vue",
+		"sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+		"npmurl": "https://www.npmjs.com/package/js-useful-tools"
+	},
+	"uni_modules": {
+		"dependencies": [],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+				"aliyun": "y"
+			},
+			"client": {
+				"Vue": {
+					"vue2": "y",
+					"vue3": "y"
+				},
+				"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",
+					"飞书": "y",
+					"京东": "y"
+				},
+				"快应用": {
+					"华为": "y",
+					"联盟": "y"
+				}
+			}
+		}
+	}
+}

+ 61 - 0
uni_modules/xzw-notice/readme.md

@@ -0,0 +1,61 @@
+### 说明
+1. 本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+2. 由于官方公告组件uni-notice-bar没有垂直滚动的功能,所以利用swiper加入了垂直滚动,加入了常用主题色,可以自己去添加,需要用到uni-icons
+
+### 优势
+简单实用,代码就100行,支持扩展,小巧美观,滚动速度有快中慢三档,如果不满意可以自行调整
+
+### 预览地址
+http://kangleyunju.gitee.io/uniapp
+
+### 使用方法
+
+1. 默认垂直滚动
+```
+<xzw-notice :list="list"/>
+```
+2. 不同主题色theme
+```
+<xzw-notice theme="error" direction="row" speed="slow" :list="list"/>
+```
+3. 水平滚动
+```
+<xzw-notice theme="info" direction="row" :list="list"/>
+```
+4. 滚动速度,快中慢三档,fast,normal,slow
+```
+<xzw-notice theme="primary" :list="list" theKey="title" speed="fast" direction="row"/>
+```
+5. 点击公告,点击更多触发事件
+```
+<xzw-notice theme="warning" :list="list" @goItem="goItem" @goMore="goMore" />
+```
+6. 绑定公告数组,默认取每一项的title字段,可以通过theKey改变读取的字段
+```
+<xzw-notice theme="success" :list="list" theKey="title" speed="fast"/>
+```
+7. 是否显示左侧喇叭,是否显示右侧更多
+```
+<xzw-notice theme="primary" :list="list" theKey="title" :showIcon="false" :showMore="false" speed="slow"/>
+```
+
+### 属性
+
+|属性名		    |类型		   |默认值	    |说明				    |							
+|:-:		      |:-:		   |:-:		    |:-:				    |								
+|list		      |Array	   |[]			  |公告数组			  |										
+|theme	  	  |String	   |default   |主题色			    |	
+|showIcon	    |Boolean	 |true      |是否显示左侧喇叭	|
+|showMore     |Boolean   |true      |是否显示右侧更多	|						
+|theKey	      |String    |title	    |公告数组的键名	  |													
+|direction    |String    |column	  |滚动的方向      |
+|speed        |String    |normal	  |滚动速度        |
+
+
+### 事件
+
+|事件称名		|说明				|返回值	|
+|:-:			  |:-:				|:-:   	|
+|@goItem		|点击公告		|-		  |
+|@goMore	  |点击更多		|-		  |
+

+ 2 - 1
utils/newRequest.js

@@ -120,7 +120,7 @@ let service = {
 							sourceType: ['album'],
 							count: num,
 							success(res) {
-								// console.log(res);
+								console.log(res,'tup');
 								// 缓存文件路径
 								resolve(res.tempFilePaths)
 							},
@@ -134,6 +134,7 @@ let service = {
 				},
 				// 上传图片
 				upload_one(path) {
+					console.log(path,'path')
 					return new Promise((resolve, reject) => {
 						uni.showLoading({
 							title: '上传中'