Browse Source

2023-12-6

cmy 1 year ago
parent
commit
b87af6ccef

+ 3 - 3
api/order.js

@@ -11,11 +11,11 @@ export function confirm(data) {
 	});
 }
 //获取可使用优惠券
-export function couponsOrder(data, price) {
+export function couponsOrder(data) {
 	return request({
-		url: '/api/coupons/order/' + price,
+		url: '/api/coupons/order/' + data.money+'/'+data.cartId,
 		method: 'get',
-		data
+		data:{}
 	});
 }
 //获取优惠券列表

+ 34 - 0
api/user.js

@@ -200,7 +200,41 @@ export function details(data, id) {
 		data
 	});
 }
+// 我的文章
+export function my_article(data, id) {
+	return request({
+		url: '/api/article/my/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 我的文章详情
+export function my_detail(data, id) {
+	return request({
+		url: '/api/article/my_detail/' + id,
+		method: 'get',
+		data
+	});
+}
 
+// 删除文章
+export function delete_article(data, id) {
+	return request({
+		url: '/api/article/delete/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 新增 修改文章
+export function add_article(data) {
+	return request({
+		url: '/api/article/add',
+		method: 'post',
+		data
+	});
+}
 //我的商品
 export function user_product(data) {
 	return request({

+ 347 - 0
components/jin-edit/jin-edit.vue

@@ -0,0 +1,347 @@
+<template>
+	<view class="container" :style="{height: height}">
+		<editor class="ql-container" :placeholder="placeholder" :show-img-size="true" :show-img-toolbar="true"
+			:show-img-resize="true" @ready="onEditorReady" id="editor" @statuschange="statuschange" @focus="editFocus"
+			@blur="editBlur" ref="editot"></editor>
+		<!-- 操作工具 -->
+		<view class="tool-view">
+			<!-- 文字相关操作 -->
+			<view class="font-more" :style="{ height: showMoreTool ? '100rpx' : 0 }">
+				<jinIcon class="single" type="&#xe6e7;" font-size="44rpx" title="加粗" @click="setBold"
+					:color="showBold ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6fe;" font-size="44rpx" title="斜体" @click="setItalic"
+					:color="showItalic ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6f8;" font-size="44rpx" title="分割线" @click="setIns"
+					:color="showIns ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6e3;" font-size="44rpx" title="标题" @click="setHeader"
+					:color="showHeader ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6f1;" font-size="44rpx" title="居中" @click="setCenter"
+					:color="showCenter ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6ed;" font-size="44rpx" title="居右" @click="setRight"
+					:color="showRight ? activeColor : '#666666'"></jinIcon>
+			</view>
+			<view class="setting-layer-mask" v-if="showSettingLayer" @click="showSetting"></view>
+			<view class="setting-layer" v-if="showSettingLayer">
+				<view class="single" @click="release(true)">
+					<jinIcon class="icon" type="&#xe639;"></jinIcon>
+					<view>公开发布</view>
+				</view>
+				<view class="single" @click="release(false)">
+					<jinIcon class="icon" type="&#xe655;"></jinIcon>
+					<view>暂时保存</view>
+				</view>
+			</view>
+			<view class="tool">
+				<jinIcon class="single" type="&#xe6f3;" font-size="44rpx" title="插入图片" @click="insertImage"></jinIcon>
+				<jinIcon class="single" type="&#xe6f9;" font-size="44rpx" title="修改文字样式" @click="showMore"
+					:color="showMoreTool ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6eb;" font-size="44rpx" title="分割线" @click="insertDivider"></jinIcon>
+				<jinIcon class="single" type="&#xe6e8;" font-size="44rpx" title="撤销" @click="undo"></jinIcon>
+				<jinIcon class="single" type="&#xe705;" font-size="44rpx" title="重做" @click="redo"></jinIcon>
+				<jinIcon class="single" type="&#xeb8a;" font-size="44rpx" title="设置" @click="release(true)">
+				</jinIcon>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import jinIcon from './jin-icons.vue';
+	export default {
+		props: {
+			// 点击图片时显示图片大小控件
+			showImgSize: {
+				type: Boolean,
+				default: false
+			},
+			// 点击图片时显示工具栏控件
+			showImgToolbar: {
+				type: Boolean,
+				default: false
+			},
+			// 点击图片时显示修改尺寸控件
+			showImgResize: {
+				type: Boolean,
+				default: false
+			},
+			// 占位符
+			placeholder: {
+				type: String,
+				default: '开始输入...'
+			},
+			// 图片上传的地址
+			uploadFileUrl: {
+				type: String,
+				default: '#'
+			},
+			// 上传文件时的name
+			fileKeyName: {
+				type: String,
+				default: 'file'
+			},
+			// 上传图片时,http请求的header
+			header: {
+				type: Object
+			},
+			// 初始化html
+			html: {
+				type: String
+			},
+			// 整个控件的高度
+			height: {
+				type: String,
+				default: '100vh'
+			}
+		},
+		computed: {
+			...mapState(['baseURL'])
+		},
+		data() {
+			return {
+				showMoreTool: false,
+				showBold: false,
+				showItalic: false,
+				showIns: false,
+				showHeader: false,
+				showCenter: false,
+				showRight: false,
+				showSettingLayer: false,
+				activeColor: '#F56C6C'
+			};
+		},
+		components: {
+			jinIcon
+		},
+		mounted() {},
+		methods: {
+			onEditorReady(e) {
+				uni.createSelectorQuery()
+					.in(this)
+					.select('.ql-container')
+					.fields({
+						size: true,
+						context: true
+					}, res => {
+						this.editorCtx = res.context;
+						this.editorCtx.setContents({
+							html: this.html
+						})
+					})
+					.exec();
+			},
+			undo() {
+				this.editorCtx.undo();
+			},
+			// 插入图片
+			insertImage() {
+				uni.chooseImage({
+					count: 9, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: async (res) => {
+						var tempFilePaths = res.tempFilePaths;
+						uni.showLoading({
+							title: '正在上传中...'
+						})
+						for (let temp of tempFilePaths) {
+							console.log(88, temp);
+							// 图片上传服务器
+							await uni.uploadFile({
+								url: this.baseURL + this.uploadFileUrl,
+								filePath: temp,
+								name: this.fileKeyName,
+								header: this.header,
+								success: res => {
+									console.log(res, 'shangchuan')
+									// 上传完成后处理
+									let bb
+									console.log(res, '上传完成后处理')
+									if ("string" === typeof res.data) {
+										bb = JSON.parse(res.data).data
+									} else {
+										bb = res.data.data
+									}
+									this.editorCtx.insertImage({
+										src: bb.url, // 此处需要将图片地址切换成服务器返回的真实图片地址
+										alt: '图片',
+										success: function(e) {}
+									});
+									uni.hideLoading()
+								},
+								fail: res => {
+									console.log(res, 'fail');
+								}
+							});
+						}
+					}
+				});
+			},
+			/// 插入分割线
+			insertDivider() {
+				this.editorCtx.insertDivider();
+			},
+			redo() {
+				this.editorCtx.redo();
+			},
+			showMore() {
+				this.showMoreTool = !this.showMoreTool;
+				this.editorCtx.setContents()
+			},
+			setBold() {
+				this.showBold = !this.showBold;
+				this.editorCtx.format('bold');
+			},
+			setItalic() {
+				this.showItalic = !this.showItalic;
+				this.editorCtx.format('italic');
+			},
+			checkStatus(name, detail, obj) {
+				if (detail.hasOwnProperty(name)) {
+					this[obj] = true;
+				} else {
+					this[obj] = false;
+				}
+			},
+			statuschange(e) {
+				var detail = e.detail;
+				this.checkStatus('bold', detail, 'showBold');
+				this.checkStatus('italic', detail, 'showItalic');
+				this.checkStatus('ins', detail, 'showIns');
+				this.checkStatus('header', detail, 'showHeader');
+				if (detail.hasOwnProperty('align')) {
+					if (detail.align == 'center') {
+						this.showCenter = true;
+						this.showRight = false;
+					} else if (detail.align == 'right') {
+						this.showCenter = false;
+						this.showRight = true;
+					} else {
+						this.showCenter = false;
+						this.showRight = false;
+					}
+				} else {
+					this.showCenter = false;
+					this.showRight = false;
+				}
+			},
+			setIns() {
+				this.showIns = !this.showIns;
+				this.editorCtx.format('ins');
+			},
+			setHeader() {
+				this.showHeader = !this.showHeader;
+				this.editorCtx.format('header', this.showHeader ? 'H2' : false);
+			},
+			setCenter() {
+				this.showCenter = !this.showCenter;
+				this.editorCtx.format('align', this.showCenter ? 'center' : false);
+			},
+			setRight() {
+				this.showRight = !this.showRight;
+				this.editorCtx.format('align', this.showRight ? 'right' : false);
+			},
+			showSetting() {
+				this.showSettingLayer = !this.showSettingLayer;
+			},
+			async editFocus(e) {},
+			editBlur(e) {},
+			release(isPublic) {
+				// this.showSettingLayer = false;
+				this.editorCtx.getContents({
+					success: res => {
+						Object.assign(res, {
+							isPublic: isPublic
+						})
+						this.$emit('editOk', res);
+					}
+				})
+			},
+		}
+	};
+</script>
+
+<style scoped>
+	.container {
+		box-sizing: border-box;
+		display: flex;
+		flex-direction: column;
+		height: 100%;
+		box-sizing: border-box;
+		/* padding-top: 30rpx; */
+	}
+
+	.ql-container {
+		line-height: 150%;
+		font-size: 34rpx;
+		width: 100%;
+		background: #fff;
+		width: calc(100% - 60rpx);
+		margin: 0 auto;
+		flex: 1;
+		box-sizing: border-box;
+		margin-top: 30rpx;
+		/* padding-bottom: 5rpx; */
+	}
+
+	.tool-view {
+		width: 100%;
+		background: #eee;
+		/* margin-top: 20px; */
+	}
+
+	.tool {
+		height: 100rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		width: 100%;
+	}
+
+	.font-more {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		width: 100%;
+		background: rgb(235, 235, 235);
+		overflow: hidden;
+		transition: all 0.15s;
+	}
+
+	.setting-layer {
+		position: absolute;
+		bottom: 100rpx;
+		background: #fff;
+		width: 250rpx;
+		right: 20rpx;
+		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+		border-radius: 8rpx;
+	}
+
+	.setting-layer .single {
+		height: 80rpx;
+		font-size: 32rpx;
+		padding: 0 30rpx;
+		display: flex;
+		align-items: center;
+		line-height: 80rpx;
+		flex-direction: row;
+		color: #666;
+	}
+
+	.setting-layer .single .icon {
+		margin-right: 20rpx;
+	}
+
+	.setting-layer-mask {
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100vw;
+		height: 100vh;
+		background: transparent;
+	}
+</style>

+ 48 - 0
components/jin-edit/jin-icons.vue

@@ -0,0 +1,48 @@
+<template>
+	<view class="content">
+		<view class="icon" :style="{color: color, fontSize: fontSize}" v-html="type" @click="toclick"></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			type: {
+				type: String,
+				default: '&#xe644;'
+			},
+			color: {
+				type: String,
+				default: '#666666'
+			},
+			fontSize: {
+				type: String,
+				default: '34rpx'
+			}
+		},
+		methods: {
+			toclick() {
+				this.$emit('click');
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.content{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	@font-face {
+		font-family: 'jin';
+		/** 阿里巴巴矢量图标库的字体库地址,可以替换自己的字体库地址 **/
+		src: url('https://at.alicdn.com/t/font_1491431_6m7ltjo8wi.ttf') format('truetype');
+	}
+
+	.icon {
+		font-family: jin !important;
+		font-size: 34rpx;
+	}
+
+</style>

+ 65 - 0
components/jin-edit/readme.md

@@ -0,0 +1,65 @@
+## jin-edit 基于editor的富文本编辑器
+
+### 兼容性
+
+这是一个uni-app的通用组件,兼容微信小程序端、安卓端、ios端(未测试)、H5端。作者因没有ios设备无法对ios端进行测试,其他端测试无问题。
+
+微信小程序 | APP | H5
+:--: | :--: | :--:
+√ | √ | √
+
+我的HbuilderX版本2.6.7,不同的版本可能会造成不兼容的问题。
+
+### 使用方式
+
+1. 将此组件进入你的项目中的 /components/ 目录中
+2. 在某个页面中使用该插件
+- 在 `script` 中引用组件
+```javascript
+import jinEdit from '../../components/jin-edit/jin-edit.vue';
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	components: {
+		jinEdit
+	},
+	methods: {
+		// 点击发布
+		editOk(res) {
+			console.log(res);
+		}
+	}
+}
+```
+- 在 `template` 中使用组件
+```html
+<jinEdit placeholder="请输入内容" @editOk="editOk" uploadFileUrl="/#"></jinEdit> 
+```
+
+### Demo
+
+[uni-jin(一个uni-app组件集合)](https://github.com/wangjinxin613/uni-jin)
+
+### 参数
+
+属性 | 类型 | 默认值 | 说明
+:--: | :--: | :--: | :--:
+showImgSize | Boolean | false | 点击图片时显示图片大小控件
+showImgToolbar | Boolean | false | 点击图片时显示工具栏控件
+showImgResize | Boolean | false | 点击图片时显示修改尺寸控件
+placeholder | String | '' | 编辑器占位符
+uploadFileUrl | String | '#' | 图片上传的服务器地址
+fileKeyName | String | 'file' | 图片上传时的name
+header | Object | - | 图片上传http请求的header
+html | String | - | 初始化的html 
+
+### 方法
+
+方法名 | 参数 | 说明
+:--: | :--: | :--:
+editOk | e={html,text,delta,isPublic} | 点击发布按钮触发	
+
+以上

+ 0 - 194
components/uni-load-more/uni-load-more.vue

@@ -1,194 +0,0 @@
-<template>
-	<view class="uni-load-more">
-		<view class="uni-load-more__img" v-show="status === 'loading' && showIcon">
-			<view class="load1">
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-			</view>
-			<view class="load2">
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-			</view>
-			<view class="load3">
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-				<view :style="{background:color}"></view>
-			</view>
-		</view>
-		<text class="uni-load-more__text" :style="{color:color}">{{status === 'more' ? contentText.contentdown : (status === 'loading' ? contentText.contentrefresh : contentText.contentnomore)}}</text>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "uni-load-more",
-		props: {
-			status: {
-				//上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
-				type: String,
-				default: 'more'
-			},
-			showIcon: {
-				type: Boolean,
-				default: true
-			},
-			color: {
-				type: String,
-				default: "#777777"
-			},
-			contentText: {
-				type: Object,
-				default () {
-					return {
-						contentdown: "上拉显示更多",
-						contentrefresh: "正在加载...",
-						contentnomore: "没有更多数据了"
-					};
-				}
-			}
-		},
-		data() {
-			return {}
-		}
-	}
-</script>
-
-<style>
-	@charset "UTF-8";
-
-	.uni-load-more {
-		display: flex;
-		flex-direction: row;
-		height: 80upx;
-		align-items: center;
-		justify-content: center
-	}
-
-	.uni-load-more__text {
-		font-size: 28upx;
-		color: #999
-	}
-
-	.uni-load-more__img {
-		height: 24px;
-		width: 24px;
-		margin-right: 10px
-	}
-
-	.uni-load-more__img>view {
-		position: absolute
-	}
-
-	.uni-load-more__img>view view {
-		width: 6px;
-		height: 2px;
-		border-top-left-radius: 1px;
-		border-bottom-left-radius: 1px;
-		background: #999;
-		position: absolute;
-		opacity: .2;
-		transform-origin: 50%;
-		animation: load 1.56s ease infinite
-	}
-
-	.uni-load-more__img>view view:nth-child(1) {
-		transform: rotate(90deg);
-		top: 2px;
-		left: 9px
-	}
-
-	.uni-load-more__img>view view:nth-child(2) {
-		transform: rotate(180deg);
-		top: 11px;
-		right: 0
-	}
-
-	.uni-load-more__img>view view:nth-child(3) {
-		transform: rotate(270deg);
-		bottom: 2px;
-		left: 9px
-	}
-
-	.uni-load-more__img>view view:nth-child(4) {
-		top: 11px;
-		left: 0
-	}
-
-	.load1,
-	.load2,
-	.load3 {
-		height: 24px;
-		width: 24px
-	}
-
-	.load2 {
-		transform: rotate(30deg)
-	}
-
-	.load3 {
-		transform: rotate(60deg)
-	}
-
-	.load1 view:nth-child(1) {
-		animation-delay: 0s
-	}
-
-	.load2 view:nth-child(1) {
-		animation-delay: .13s
-	}
-
-	.load3 view:nth-child(1) {
-		animation-delay: .26s
-	}
-
-	.load1 view:nth-child(2) {
-		animation-delay: .39s
-	}
-
-	.load2 view:nth-child(2) {
-		animation-delay: .52s
-	}
-
-	.load3 view:nth-child(2) {
-		animation-delay: .65s
-	}
-
-	.load1 view:nth-child(3) {
-		animation-delay: .78s
-	}
-
-	.load2 view:nth-child(3) {
-		animation-delay: .91s
-	}
-
-	.load3 view:nth-child(3) {
-		animation-delay: 1.04s
-	}
-
-	.load1 view:nth-child(4) {
-		animation-delay: 1.17s
-	}
-
-	.load2 view:nth-child(4) {
-		animation-delay: 1.3s
-	}
-
-	.load3 view:nth-child(4) {
-		animation-delay: 1.43s
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1
-		}
-
-		100% {
-			opacity: .2
-		}
-	}
-</style>

+ 1 - 3
manifest.json

@@ -109,12 +109,10 @@
             "mode" : "hash"
         },
         "devServer" : {
-            "port" : 4526, //端口号
             "proxy" : {
                 "/api" : {
                     // "target" : "http://test.shangshigo.com", //请求的目标域名
-                    "target" : "https://xx.accle.shop", //请求的目标域名
-                    "changeOrigin" : true
+                    "target" : "http://fpl.qiniu1314.com" //请求的目标域名
                 }
             }
         },

+ 36 - 11
pages.json

@@ -44,6 +44,15 @@
 					"bounce": "none"
 				}
 			}
+		},
+		{
+			"path": "pages/redirect/redirect",
+			"style": {
+				"navigationBarTitleText": "微信登录跳转页面",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
 		}
 	],
 	// 模块分包
@@ -76,12 +85,7 @@
 	   {
 		"root": "pages/share",
 		"name": "share",
-		"pages": [  {
-		   	"path": "plshare",
-		   	"style": {
-		   		"navigationBarTitleText": "分享内容"
-		   	}
-		   },
+		"pages": [
 		   {
 		   	"path": "wzshare",
 		   	"style": {
@@ -98,13 +102,11 @@
 		   	}
 		   },
 		   {
-		   	"path": "plDetail",
+		   	"path": "myarticle",
 		   	"style": {
-		   		"navigationBarTitleText": "内容详情",
+		   		"navigationBarTitleText": "种草专区",
 		   		"app-plus": {
-		   			"titleNView": {
-		   				"type": "transparent"
-		   			}
+		   			"titleNView": false
 		   		}
 		   	}
 		   },
@@ -221,6 +223,18 @@
 		   "root": "pages/money",
 		   "name": "money",
 		   "pages": [
+			   {
+			   	"path": "pay",
+			   	"style": {
+			   		"navigationBarTitleText": "支付"
+			   	}
+			   },
+			   {
+			   	"path": "paySuccess",
+			   	"style": {
+			   		"navigationBarTitleText": "支付成功"
+			   	}
+			   },
 			   {
 			   	"path": "qudou",
 			   	"style": {
@@ -354,6 +368,17 @@
 			   		}
 			   	}
 			   },
+			   {
+			   	"path": "wxLogin",
+			   	"style": {
+			   		"navigationBarTitleText": "微信登录",
+			   		"app-plus": {
+			   			"titleNView": {
+			   				"type": "transparent"
+			   			}
+			   		}
+			   	}
+			   },
 			   {
 			   	"path": "login",
 			   	"style": {

+ 56 - 26
pages/index/index.vue

@@ -10,9 +10,9 @@
 				</view>
 			</view>
 			<swiper class="carousel" autoplay="true" duration="400" interval="5000">
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
+				<swiper-item v-for="(item, index) in bastListBanner" :key="index" class="carousel-item"
 					@click="bannerNavToUrl(item)">
-					<image :src="item.pic" />
+					<image :src="item.img" />
 				</swiper-item>
 			</swiper>
 			<view class="stre flex">
@@ -60,28 +60,25 @@
 				<view class="sg">首购推荐</view>
 			</view>
 			<swiper class="car" autoplay="true" duration="400" interval="5000">
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
-					@click="bannerNavToUrl(item)">
-					<image :src="item.pic" />
+				<swiper-item v-for="(item, index) in bastListBanner" :key="index" class="carousel-item" >
+					<image :src="item.img" />
 				</swiper-item>
 			</swiper>
 			<!-- 列表 -->
-			<view class="splist flex" v-for="item in 3">
+			<view class="splist flex" v-for="item in bastList" @click="navToDetailPage(item)">
 				<view class="tp">
-					<image class="list-iamg" src="../../static/img/sp.png" mode=""></image>
+					<image class="list-iamg" :src="item.image" mode=""></image>
 				</view>
 				<view class="right" >
-					<view class="list-title clamp2">风平乐樱桃乐乐樱桃乐乐樱桃乐乐樱桃乐乐樱桃乐</view>
+					<view class="list-title clamp2">{{item.store_name}}</view>
 					<view class="ysjg flex-start">
-						<view class="yj">¥139</view>
-						<view class="dz">直降40元</view>
+						<view class="yj">¥{{item.ot_price}}</view>
+						<view class="dz">直降{{item.ot_price-item.price}}元</view>
 					</view>
 					<view class="bto flex">
-						<view class="xj">¥99</view>
+						<view class="xj">¥{{item.price}}</view>
 						<!-- TODO 详情id为传 -->
-						<navigator url="/pages/index/product">
 							<view class="ljgm">立即购买</view>
-						</navigator>
 					</view>
 				</view>
 			</view>
@@ -90,22 +87,20 @@
 				<image class="tj-ic" src="../../static/img/sy-icon.png" mode=""></image>
 				<view class="sg">复购专区</view>
 			</view>
-			<view class="splist flex" v-for="item in 3">
+			<view class="splist flex" v-for="item in benefit" @click="navToDetailPage(item)">
 				<view class="tp">
 					<image class="list-iamg" src="../../static/img/sp.png" mode=""></image>
 				</view>
 				<view class="right" >
-					<view class="list-title clamp2">风平乐樱桃姜黄复合肽压片 糖果套盒...风平乐樱桃姜黄复风平乐樱桃姜黄复风平乐樱桃姜黄复风平乐樱桃姜黄复</view>
+					<view class="list-title clamp2">{{item.store_name}}</view>
 					<view class="ysjg flex-start">
-						<view class="yj">¥139</view>
-						<view class="dz">直降40元</view>
+						<view class="yj">¥{{item.ot_price}}</view>
+						<view class="dz">直降{{item.ot_price-item.price}}元</view>
 					</view>
 					<view class="bto flex">
-						<view class="xj">¥99</view>
+						<view class="xj">¥{{item.price}}</view>
 						<!-- TODO 详情id为传 -->
-						<navigator url="/pages/index/product">
 							<view class="ljgm">立即购买</view>
-						</navigator>
 					</view>
 				</view>
 			</view>
@@ -160,19 +155,54 @@
 			return {
 				current: 0,
 				tabbar: tabbar1,
+				swiperLength:0,
+				bastList:[],//首购推荐
+				bastListBanner:[],
+				benefit:[],//复购推荐
 				carouselList: [], //轮播图列表
 				kefu: '',
 			};
 		},
-		
+		onLoad: function(option) {
+			// #ifndef MP
+			if (option.spread) {
+				// 存储其他邀请人
+				uni.setStorageSync('spread', option.spread);
+			}
+			// #endif
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			// #endif
+		},
 		onShow() {
+			this.loadData();
 		},
 		methods: {
-			...mapMutations(['setLat', 'setLon', 'setChoose']),
-			// 底部轮播图切换
-			changeBottom(res) {
-				this.actionArtInd = res.detail.current;
-				console.log(res);
+			async loadData() {
+				console.log(111,'this.bastList');
+				loadIndexs({})
+					.then(({
+						data
+					}) => {
+						let goods = data.info;
+						this.carouselList = data.banner;
+						this.swiperLength = this.carouselList.length;
+						this.bastList = data.info.bastList; //爆款推荐
+						this.bastListBanner = data.info.bastBanner; //爆款推荐
+						this.benefit = data.benefit;
+						console.log(this.bastList,'this.bastList');
+						uni.stopPullDownRefresh();
+					})
+					.catch(e => {
+						console.log(e);
+						uni.stopPullDownRefresh();
+					});
 			},
 			// 打开客服
 			openKf() {

+ 0 - 4
pages/index/search.vue

@@ -63,12 +63,8 @@
 </template>
 
 <script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import { searchKeyword, getProducts } from '@/api/product.js';
 export default {
-	components: {
-		uniLoadMore
-	},
 	data() {
 		return {
 			arrlist: [], //热门关键词

+ 383 - 0
pages/money/pay.vue

@@ -0,0 +1,383 @@
+<template>
+	<view class="app">
+		<view class="price-box">
+			<text>支付金额</text>
+			<text class="price">{{ money }}</text>
+		</view>
+		<view class="pay-type-list">
+			<view class="type-item b-b" @click="changePayType(1)">
+				<text class="icon iconfont iconweixin"></text>
+				<view class="con">
+					<text class="tit">微信支付</text>
+					<text>推荐使用微信支付</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="type-item b-b" @click="changePayType(2)">
+				<text class="icon iconfont iconzhifubao"></text>
+				<view class="con"><text class="tit">支付宝支付</text></view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
+			</view>
+			<!-- #endif -->
+			<view class="type-item" @click="changePayType(3)">
+				<text class="icon iconfont iconyue"></text>
+				<view class="con">
+					<text class="tit">余额支付</text>
+					<text>可用余额 ¥{{ now_money }}</text>
+				</view>
+				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
+			</view>
+		</view>
+		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
+	</view>
+</template>
+
+<script>
+import { balance } from '@/api/wallet.js';
+import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
+import { mapState } from 'vuex';
+// #ifdef H5
+import weichatObj from '@/plugin/jweixin-module/index.js';
+// #endif
+export default {
+	data() {
+		return {
+			payType: 1, //支付类型
+			// #ifdef H5
+			payName: 'weixin',
+			// #endif
+			// #ifdef MP-WEIXIN
+			payName: 'weixin',
+			// #endif
+			orderInfo: {},
+			money: 0.0, //订单金额
+			now_money: 0.0, //余额
+			orderKey: '',
+			orderId: '', //保存订单id
+			payLoding: false, //判断是否支付中
+			type: '', //判断是否从订单中进入
+			// #ifdef H5
+			froms: '', //保存h5中数据来源对象
+			// #endif
+			pinkid: '' //保存拼团商品id
+		};
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj']),
+		// #endif
+		...mapState('user',['userInfo'])
+	},
+	onLoad(options) {
+		if (options.type == 1) {
+			this.type = 1;
+			this.orderId = options.ordid;
+			this.money = options.money;
+		} else {
+			this.orderKey = options.key;
+			let prepage = this.$api.prePage();
+			computedOrderkey({
+				orderkey: this.orderKey,
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //地址编号
+				useIntegral: prepage.checkedPoints ? 1 : 0
+			}).then(({ data }) => {
+				// 获取支付金额
+				this.money = data.result.pay_price;
+			});
+		}
+		// 保存pinkid
+		if (options.pinkid) {
+			this.pinkid = options.pinkid;
+		}
+		// 载入余额
+		balance({}).then(({ data }) => {
+			// 获取余额
+			this.now_money = data.now_money;
+		});
+	},
+	methods: {
+		//选择支付方式
+		changePayType(type) {
+			this.payType = type;
+			if (this.payType == 1) {
+				this.payName = 'weixin';
+			}
+			if (this.payType == 2) {
+				this.payName = 'ali';
+			}
+			if (this.payType == 3) {
+				this.payName = 'yue';
+			}
+		},
+		// 支付金额
+		orderMoneyPay() {
+			let obj = this;
+			console.log('支付金额')
+			orderPay({
+				uni: obj.orderId,
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				paytype: obj.payName //支付类型  weixin-微信 yue-余额
+			})
+				.then(e => {
+					// console.log(obj.payName,'支付类型')
+					// console.log(e,'支付金额')
+					// 判断是否为余额支付
+					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+						if (e.status == 200) {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					}
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						let da = e.data.result.jsConfig;
+						let data = {
+							// #ifdef H5
+							timestamp: da.timestamp,
+							// #endif
+							// #ifdef MP
+							timeStamp: da.timestamp,
+							// #endif
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								obj.paySuccessTo();
+							},
+							fail: () => {
+								
+								uni.navigateTo({
+									url: '/pages/order/order?state=0'
+								});
+							}
+						};
+						// #ifdef H5
+						if(obj.payName == 'weixin'){
+						weichatObj.chooseWXPay(data);
+						}
+						// #endif
+						// #ifdef MP-WEIXIN
+						if(obj.payName == 'weixin' || obj.payName == 'routine' ){
+							// console.log('开始支付')
+							wx.requestPayment(data);
+						}
+						// #endif
+					}
+					uni.hideLoading();
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					// 支付完成
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		},
+		// 支付成功跳转
+		paySuccessTo() {
+			let obj = this
+			uni.hideLoading();
+			uni.redirectTo({
+				url: '/pages/money/paySuccess?orderid=' + this.orderId
+			});
+			
+		},
+		//确认支付
+		confirm: async function() {
+			let obj = this;
+			// 判断是否余额不足
+			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
+				uni.showModal({
+					title: '提示',
+					content: '账户余额不足!',
+					showCancel: false,
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				return;
+			}
+			uni.showLoading({
+				title: '支付中',
+				mask: true
+			})
+			
+			// 支付中
+			obj.payLoding = true;
+			// #ifdef H5
+			// 获取当前是否为微信浏览器
+			obj.froms = uni.getStorageSync('weichatBrowser') || '';
+			// #endif
+			// 判断是否为未支付订单中跳转进入
+			if (obj.type != 1) {
+				// 初次生成订单
+				obj.firstCreateOrder();
+			} else {
+				// 已经生成订单未支付
+				obj.orderMoneyPay();
+			}
+		},
+		// 初次订单创建
+		firstCreateOrder() {
+			let obj = this;
+			// 获取下单页面数据
+			let prepage = obj.$api.prePage();
+
+			let data = {
+				real_name: prepage.addressData.real_name, //联系人名称
+				phone: prepage.addressData.phone, //联系人号码
+				couponId: prepage.couponChecked.id, //优惠券编号
+				addressId: prepage.addressData.id, //支付地址id
+				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+				payType: obj.payName, //支付类型  weixin-微信 yue-余额
+				mark: prepage.desc, //备注
+				// #ifdef H5
+				from: obj.froms ? 'weixin' : 'H5', //来源
+				// #endif
+				// #ifdef MP-WEIXIN
+				from: 'routine', //来源
+				// #endif
+				// #ifdef APP-PLUS
+				from: 'app', //来源
+				// #endif
+				shipping_type: 1 //提货方式 1 快递 2自提
+			};
+			// 判断是否拼团商品
+			if (obj.pinkid) {
+				data.pinkId = obj.pinkid;
+			}
+			// 生成订单
+			createOrderkey(data, obj.orderKey)
+				.then(({ data, status, msg }) => {
+					// console.log('生成订单')
+					// 判断是否支付失败
+					if (data.status == 'ORDER_EXIST') {
+						uni.showModal({
+							title: '提示',
+							content: msg,
+							showCancel: false
+						});
+						uni.hideLoading();
+						obj.payLoding = false;
+						return;
+					}
+					// 保存订单号
+					obj.orderId = data.result.orderId;
+					// 判断是否为余额支付
+					if (obj.payName == 'yue') {
+						if (status == 200 && data.status == 'SUCCESS') {
+							obj.paySuccessTo();
+						} else {
+							obj.$api.msg(msg);
+						}
+					} else {
+						// 立即支付
+						obj.orderMoneyPay();
+					}
+				})
+				.catch(e => {
+					uni.hideLoading();
+					obj.payLoding = false;
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.app {
+	width: 100%;
+}
+
+.price-box {
+	background-color: #fff;
+	height: 265upx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	font-size: 28upx;
+	color: #909399;
+
+	.price {
+		font-size: 50upx;
+		color: #303133;
+		margin-top: 12upx;
+		&:before {
+			content: '¥';
+			font-size: 40upx;
+		}
+	}
+}
+
+.pay-type-list {
+	margin-top: 20upx;
+	background-color: #fff;
+	padding-left: 60upx;
+	.type-item {
+		height: 120upx;
+		padding: 20upx 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding-right: 60upx;
+		font-size: 30upx;
+		position: relative;
+	}
+
+	.icon {
+		width: 100upx;
+		font-size: 52upx;
+	}
+	.iconyue {
+		color: #fe8e2e;
+	}
+	.iconweixin {
+		color: #36cb59;
+	}
+	.iconzhifubao {
+		color: #01aaef;
+	}
+	.tit {
+		font-size: $font-lg;
+		color: $font-color-dark;
+		margin-bottom: 4upx;
+	}
+	.con {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		font-size: $font-sm;
+		color: $font-color-light;
+	}
+}
+.mix-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 630upx;
+	height: 80upx;
+	margin: 80upx auto 30upx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10upx;
+	/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
+}
+
+.clickbg {
+	background-color: $color-gray !important;
+}
+</style>

+ 65 - 0
pages/money/paySuccess.vue

@@ -0,0 +1,65 @@
+<template>
+	<view class="content">
+		<text class="success-icon iconfont iconroundcheck"></text>
+		<text class="tit">支付成功</text>
+		<view class="btn-group">
+			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
+			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderId:''
+			}
+		},
+		onLoad(opt) {
+			// 保存订单号
+			this.orderId = opt.orderid;
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.content{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+	.success-icon{
+		font-size: 160upx;
+		color: #5dbc7c;
+		margin-top: 100upx;
+	}
+	.tit{
+		font-size: 38upx;
+		color: #303133;
+	}
+	.btn-group{
+		padding-top: 100upx;
+	}
+	.mix-btn {
+		margin-top: 30upx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 600upx;
+		height: 80upx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10upx;
+		&.hollow{
+			background: #fff;
+			color: #303133;
+			border: 1px solid #ccc;
+		}
+	}
+</style>

File diff suppressed because it is too large
+ 38 - 89
pages/order/createOrder.vue


+ 0 - 2
pages/order/order.vue

@@ -57,12 +57,10 @@
 </template>
 
 <script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
 export default {
 	components: {
-		uniLoadMore,
 		empty
 	},
 	data() {

+ 0 - 2
pages/order/refundOrder.vue

@@ -78,7 +78,6 @@
 </template>
 
 <script>
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	import empty from '@/components/empty';
 	import {
 		orderList,
@@ -88,7 +87,6 @@
 	} from '@/api/order.js';
 	export default {
 		components: {
-			uniLoadMore,
 			empty
 		},
 		data() {

+ 292 - 0
pages/public/wxLogin.vue

@@ -0,0 +1,292 @@
+<template>
+	<view class="content">
+		<!-- #ifndef H5 -->
+		<!-- <image class="bg-img" :src="baseURL+urlFile+'/img/img09.png'" mode=" scaleToFill"></image> -->
+		<view class="logo-img-box">
+			<image class="logo-img" :src="baseURL+'/static/img/logo.png'" mode=" aspectFit"></image>
+			<!-- 获取头像登录 -->
+			<!-- <button class="userInfo" type="warn" @click="isclick?'':userInfoData()" :class="{'nocaction': isclick}">
+				<text class="iconfont iconweixin"></text>
+				<text>
+				微信授权登录
+				</text>
+			</button> -->
+			<!-- 获取手机号登录 -->
+			<button class="userInfo" type="warn" :class="{'nocaction': loding}" open-type="getPhoneNumber"
+				@getphonenumber="getPhoneNumber">
+				<text class="iconfont iconweixin"></text>
+				<text>
+					微信授权登录
+				</text>
+			</button>
+
+		</view>
+		<!-- #endif -->
+	</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, //是否点击了
+				iv1: '',
+				encryptedData1: '',
+				hasphone: false,
+				loding: false
+			};
+		},
+		onLoad() {
+			this.loadData();
+		},
+		computed: {
+			...mapState(['baseURL', 'urlFile'])
+		},
+		methods: {
+			// ...mapMutations(['login', 'setUserInfo']),
+			...mapMutations('user', ['login', 'setUserInfo']),
+			close() {
+				this.$refs.popupsq.close()
+			},
+			getPhoneNumber(e) {
+				let obj = this
+				console.log(e, 'e+++++++++++++++')
+				if(obj.loding) {
+					return
+				}
+				obj.loding = true
+				// 用户同意授权
+				if (e.detail.errMsg == "getPhoneNumber:ok") {
+					console.log('chenggong++++++++++++++')
+					// obj.hasphone = true
+					obj.iv1 = e.detail.iv
+					obj.encryptedData1 = e.detail.encryptedData
+					// obj.$refs.popupsq.open()
+					uni.showLoading({
+						title: '授权中',
+						mask: true
+					});
+					obj.loadMp();
+				} else {
+					obj.loding = false
+					uni.showToast({
+						title: '您拒绝了请求,不能正常使用小程序',
+						icon: 'error',
+						duration: 2000
+					});
+					return;
+				}
+			},
+			loadData() {
+				let obj = this;
+				// #ifdef H5
+				loginWinxin();
+				// #endif
+				// #ifdef MP-WEIXIN
+				loginWinxinMp().then((e) => {
+					console.log(e, 'ddddddddddddddddddddddd')
+					// obj.code = e.code
+					wx.login({
+						success(e) {
+							console.log(e, 'loginWinxinMp');
+							obj.code = e.code;
+							console.log(obj.code, 'wxlogin.code++++++')
+						},
+						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;
+					}
+				});
+				// 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,
+					iv: obj.iv1,
+					encryptedData: obj.encryptedData1,
+					// encryptedData: user.encryptedData,
+					spread_spid: spread_spid,
+					// #ifdef MP
+					spread_code: spread_code,
+					// #endif
+				}).then(({
+					data
+				}) => {
+					uni.hideLoading();
+					obj.loding = false;
+					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/shop/product') {
+						ur = '/pages/index/index'
+					}
+					uni.switchTab({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								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: #add86a !important;
+	}
+
+	.nocaction {
+		background-color: #999;
+	}
+
+	.popupsq-wrap {
+		width: 550rpx;
+		height: 450rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		padding: 0 30rpx;
+
+		.btn {
+			width: 240rpx;
+			height: 90rpx;
+			text-align: center;
+			line-height: 90rpx;
+			font-size: 30rpx;
+			border-radius: 45rpx;
+			font-weight: bold;
+		}
+
+		.qx {
+			color: #000;
+			border: #f0f0f0 1px solid;
+
+		}
+
+		.qr {
+			color: #fff;
+			background-color: #a8d561;
+		}
+	}
+</style>

+ 138 - 0
pages/redirect/redirect.vue

@@ -0,0 +1,138 @@
+<template>
+	<view>
+	</view>
+</template>
+<script>
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	// #ifdef H5
+	import {
+		wechatAuth
+	} from '@/api/wx';
+	// #endif
+	// #ifdef MP-WEIXIN
+	import {
+		wechatMpAuth
+	} from '@/api/wx';
+	// #endif
+	export default {
+		computed: {
+			...mapState(['urlFile', 'baseURL'])
+		},
+		onLoad(option) {
+			let obj = this;
+			// 判断是否需要保存定向地址
+			// #ifdef H5
+			this.loadH5()
+			// #endif
+			// #ifdef MP-WEIXIN
+			this.loadMp(option)
+			// #endif
+		},
+		methods: {
+			...mapMutations('user', ['login', 'setUserInfo']),
+			// #ifdef H5
+			loadH5() {
+				let obj = this;
+				let url = window.location.href;
+				let code = url.match(/code=([0-9]|[a-z]|[A-Z])*/g)[0].replace('code=', '');
+				let spread = uni.getStorageSync('spread') || '';
+				wechatAuth({
+					code: code,
+					spread: spread,
+				}).then(({
+					data
+				}) => {
+					obj.wchatAuth(data);
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			},
+			// #endif
+			// #ifdef MP-WEIXIN
+			loadMp(option) {
+				let obj = this;
+				// 获取登录授权页数据
+				let user = obj.$api.prePage().userInfo;
+				// #ifndef MP
+				// 获取推广人id
+				let spread_spid = uni.getStorageSync('spread') || '';
+				// #endif
+				// #ifdef MP
+				// 小程序推广人
+				let spread_code = uni.getStorageSync('spread_code') || '';
+				// #endif
+				wechatMpAuth({
+					code: option.code,
+					iv: user.target.iv,
+					encryptedData: user.target.encryptedData,
+					// #ifndef MP
+					spread_spid: spread_spid,
+					// #endif
+					// #ifdef MP
+					spread_code: spread_code
+					// #endif
+				}).then(({
+					data
+				}) => {
+					obj.wchatAuth(data);
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});
+			},
+			// #endif
+			wchatAuth(data) {
+				let obj = this;
+				// 保存token
+				uni.setStorageSync('token', data.token);
+				// 获取用户基础信息
+				getUserInfo({}).then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					let ur = uni.getStorageSync('present') || '/pages/index/index';
+					// 用于处理缓存bug
+					if (ur == 'pages/product/product') {
+						ur = '/pages/index/index'
+					}
+					console.log(obj.baseURL + obj.urlFile + '/#' + ur);
+					location.href = obj.baseURL + obj.urlFile + '/#' + ur;
+					uni.switchTab({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: ur,
+								fail(e) {
+									uni.navigateTo({
+										url: '/pages/index/index',
+									});
+								}
+							});
+						}
+					});
+				}).catch((e) => {
+					console.log(e.message,'cuowu');
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			}
+		}
+	};
+</script>
+<style></style>

+ 1 - 1
pages/set/userinfo.vue

@@ -13,7 +13,7 @@
 			<input class="input" type="text"  disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
 		</view>
 		<view class="row">
-			<text class="tit">账户</text>
+			<text class="tit">手机号</text>
 			<input class="input" type="text"  disabled="true" v-model="userInfo.phone" placeholder-class="placeholder" />
 		</view>
 		<view class="add-btn" @click="confirm">提交</view>

+ 507 - 0
pages/share/myarticle.vue

@@ -0,0 +1,507 @@
+<template>
+	<view class="content">
+		<view class="main">
+			<view class="box-1">
+				<view class="box-left">标题:</view>
+				<input type="text" :disabled="lx != 0" v-model="title" placeholder-class="placeholder"
+					class="list-input" placeholder="请填写文章标题" />
+			</view>
+			<view class="box-1">
+				<view class="box-left">作者:</view>
+				<input type="text" :disabled="lx != 0" v-model="author" placeholder-class="placeholder"
+					class="list-input" placeholder="请填写文章作者" />
+			</view>
+			<view class="box-1">
+				<view class="box-left">文章简介:</view>
+				<input type="text" :disabled="lx != 0" v-model="synopsis" placeholder-class="placeholder"
+					class="list-input" placeholder="请填写文章简介" />
+			</view>
+			<view class="upload-box">
+				<view class="upload-left">文章头图</view>
+				<view class="upload-right " @click.stop="banner_img_up()">
+					<view class="upload-imgbox">
+						
+					<image v-if="!banner_img" class="upload-img " src="/static/img/add.png"></image>
+					<image v-if="banner_img" class="upload-img " :src="banner_img"></image>
+					</view>
+				</view>
+			</view>
+			<view class="upload-box">
+				<view class="upload-left">分享素材</view>
+				<view class="flex">
+					<view class="upload-right flex-start">
+						<view class="position-relative upload-imgbox" v-for="(src,ind) in image_input">
+							<image :src="src" class="upload-img "></image>
+							<view class="delText" @click="image_input.splice(ind,1)">
+								删除
+							</view>
+						</view>
+						<view class="upload-imgbox">
+							<image @click.stop="scImgMian()" class="upload-img " src="/static/img/add.png"></image>
+						</view>
+
+					</view>
+				</view>
+			</view>
+			<!-- <view class="box-1">
+				<view class="box-left">
+					关联商品 :
+				</view>
+				<view class="list-input" v-if="!product" @click="open()">
+					请选择关联商品
+				</view>
+				<view class="list-input clamp" v-else @click="open()">
+					{{product.store_name}}
+				</view>
+			</view> -->
+			<view class="bjq" v-if="showwz == 0&&lx ==0">
+				<jinEdit ref="set" placeholder="请输入文章内容" @editOk="editOk" uploadFileUrl="/api/upload/image"
+					:header="{'Authori-zation': AuthoriZation}" :showImgSize="true" :html="content" height="50vh">
+				</jinEdit>
+			</view>
+			<view class="bjq" v-if="lx !=0">
+				<view v-html="content"></view>
+			</view>
+		</view>
+		<view @click.stop="submit('1')" v-if="lx == 0" class="address-box submit-box"><text
+				class="submit-btn">提交文章</text></view>
+		<view @click.stop="submit('0')" v-if="lx == 0" class="address-box submit-box"><text
+				class="submit-btn gren">保存草稿</text></view>
+		<!-- <uni-popup ref="choose" type="bottom">
+			<view class="choose-main">
+				<view class="choose-top flex">
+					<view class="choose-font" @click="close()">
+						取消
+					</view>
+				</view>
+				<view class="top-box">
+					<view class="top">
+						<view class="top-icon">
+							<image src="../../static/icon/icon.png" mode=""></image>
+						</view>
+						<view class="top-main"><input type="text" v-model="keyworld" placeholder="请输入商品名称"></view>
+					</view>
+					<view class="top-font" @click="clickSearch()">
+						搜索
+					</view>
+				</view>
+				<scroll-view scroll-y="true" style="height: 600rpx;" @scrolltolower="getProduct()">
+					<view class="choose-item flex" v-for="(item,index) in productlist" @click="xuanzhe(item)">
+						<view class="choose-image">
+							<image :src="item.image" mode=""></image>
+						</view>
+						<view class="choose-rigt">
+							<view class="choose-name">
+								{{item.store_name}}
+							</view>
+							<view class="choose-price">
+								{{item.price}}
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</uni-popup> -->
+	</view>
+</template>
+
+<script>
+	import {
+		upload
+	} from '@/api/order.js';
+	// import {
+	// 	getProducts,
+	// 	goodsDetail
+	// } from '@/api/product.js'
+	import {
+		my_detail,
+		add_article
+	} from '@/api/user.js';
+	import jinEdit from '@/components/jin-edit/jin-edit.vue';
+	export default {
+		components: {
+			jinEdit
+		},
+		data() {
+			return {
+				lx: 0,
+				AuthoriZation: '',
+				id: 0,
+				title: '', //文章标题
+				author: '', //文章作者
+				banner_img: '', //头图
+				image_input: [], //文章图片
+				content: '', //文章内容
+				synopsis: '', //文章简介
+				product: '', //关联商品
+				productlist: [], //商品列表
+				page: 1,
+				limit: 10,
+				loadType: 'more',
+				keyworld: '',
+				showwz: 0,
+			};
+		},
+		onLoad(opt) {
+			if (opt.id) {
+				this.showwz = 1;
+				this.id = opt.id;
+				this.loadData();
+			}
+			if (opt.type) {
+				this.lx = opt.type
+			}
+			console.log(this.product);
+			// this.getProduct();
+			this.AuthoriZation = 'Bearer ' + uni.getStorageSync('token')
+		},
+		onShow() {},
+		onReachBottom() {},
+		onReady() {},
+		methods: {
+			editOk(res) {
+				//  保存富文本转出的html
+				this.content = res.html
+				console.log(this.content);
+			},
+			// getProduct() {
+			// 	const obj = this
+			// 	if (obj.loadType == 'noMore' || obj.loadType == 'loading') {
+			// 		return
+			// 	}
+			// 	obj.loadType = 'loading'
+			// 	getProducts({
+			// 		page: obj.page,
+			// 		limit: obj.limit,
+			// 		keyword: obj.keyworld
+			// 	}).then(({
+			// 		data
+			// 	}) => {
+			// 		obj.productlist = obj.productlist.concat(data);
+			// 		obj.page++
+			// 		if (data.length == obj.limit) {
+			// 			obj.loadType = 'more'
+			// 		} else {
+			// 			obj.loadType = 'noMore'
+			// 		}
+			// 	})
+			// },
+			loadData() {
+				my_detail({}, this.id).then(({
+					data
+				}) => {
+					this.title = data.news.title
+					this.author = data.news.author
+					this.image_input =data.news.share_images;
+					this.banner_img = data.news.image_input[0];
+					this.synopsis = data.news.synopsis
+					// this.spxq(data.news.product_id)
+					this.content = data.news.content
+					this.showwz = 0
+				})
+			},
+			// spxq(id) {
+			// 	goodsDetail({}, id).then(({
+			// 		data
+			// 	}) => {
+			// 		this.product = data.storeInfo
+			// 		console.log(data);
+			// 	})
+			// },
+			banner_img_up() {
+				if (this.lx != 0) {
+					return
+				}
+				let obj = this;
+				upload({
+						file: ''
+					})
+					.then(e => {
+						console.log(e, 'e');
+						obj.banner_img = e[0].url;
+					})
+					.catch(e => {});
+
+			},
+			scImgMian() {
+				if (this.lx != 0) {
+					return
+				}
+				let obj = this;
+				upload({
+						file: ''
+					})
+					.then(e => {
+						console.log(e, 'e');
+						obj.image_input.push(e[0].url);
+					})
+					.catch(e => {});
+			},
+			// clickSearch() {
+			// 	this.page = 1;
+			// 	this.limit = 10;
+			// 	this.loadType = 'more'
+			// 	this.getProduct();
+			// },
+			// open() {
+			// 	if (this.lx != 0) {
+			// 		return
+			// 	}
+			// 	this.$refs.choose.open()
+			// },
+			// close() {
+			// 	this.$refs.choose.close()
+			// },
+			xuanzhe(opt) {
+				this.product = opt;
+				console.log(this.product, '123456');
+				this.$refs.choose.close();
+			},
+			submit(type) {
+				const obj = this
+				this.$refs.set.release(true)
+				setTimeout(() => {
+					if (!obj.title) {
+						return this.$api.msg('请输入文章标题')
+					}
+					if (!obj.author) {
+						return this.$api.msg('请输入文章作者')
+					}
+					if (!obj.image_input) {
+						return this.$api.msg('请输入文章头图')
+					}
+					if (!obj.synopsis) {
+						return this.$api.msg('请输入文章简介')
+					}
+					if (!obj.content) {
+						return this.$api.msg('请输入文章内容')
+					}
+					add_article({
+						type: type,
+						id: obj.id,
+						title: obj.title,
+						author: obj.author,
+						image_input: obj.banner_img,
+						synopsis: obj.synopsis,
+						share_title: obj.title,
+						share_synopsis: obj.synopsis,
+						share_images: obj.image_input.join(','),
+						content: obj.content,
+						product_id: 0
+					}).then(e => {
+						uni.navigateTo({
+							url: '/pages/user/release?id=0'
+						})
+					})
+				}, 10)
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+	}
+
+	.box-1 {
+		background: #ffffff;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		width: 100%;
+		padding: 20rpx;
+
+		.box-left {
+			width: 25%;
+			text-align: left;
+			color: #000000;
+
+		}
+
+		.list-input {
+			width: 75%;
+			font-size: 28rpx;
+			color: #959595;
+			text-align: right;
+			padding-right: 24rpx;
+		}
+	}
+
+	.upload-box {
+		width: 100%;
+		background: #ffffff;
+		border-radius: 27rpx;
+		display: flex;
+		flex-direction: column;
+		padding: 30rpx 40rpx;
+		margin: 20rpx auto 30rpx;
+		padding-right: 0;
+
+		.upload-left {
+			font-weight: 400;
+			font-size: 28rpx;
+		}
+
+		.upload-right {
+			flex-wrap: wrap;
+
+			.delText {
+				background-color: rgba(0, 0, 0, 0.6);
+				color: #FFF;
+				text-align: center;
+				position: absolute;
+				bottom: 0;
+				width: 100%;
+			}
+
+			.upload-imgbox {
+				margin-top: 20rpx;
+				margin-right: 20rpx;
+
+				.upload-img {
+					width: 200rpx;
+					height: 200rpx;
+				}
+			}
+		}
+	}
+
+	.main {
+		padding: 20rpx;
+	}
+
+	.bjq {
+		margin-top: 20rpx;
+		background: #ffffff;
+		padding: 20rpx;
+	}
+
+	.address-box {
+		padding: 15rpx 40rpx;
+		margin-bottom: 10px;
+	}
+
+	.submit-box {
+		bottom: 0;
+		left: 0;
+		width: 750rpx;
+	}
+
+	.submit-btn {
+		margin-top: 10px;
+		display: inline-block;
+		width: 670rpx;
+		height: 96rpx;
+		line-height: 96rpx;
+		text-align: center;
+		background-color: #000000;
+		opacity: 1;
+		box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
+		border-radius: 56rpx;
+		font-size: 39rpx;
+		font-weight: bold;
+		color: rgba(255, 255, 255, 1);
+	}
+
+	.gren {
+		background: #ffffff;
+		color: #000000;
+		border: 1px solid #000000;
+	}
+
+	.choose-main {
+		background: #ffffff;
+
+	}
+
+	.choose-top {
+		padding: 20rpx 40rpx 20rpx;
+		font-size: 32rpx;
+		justify-content: flex-end;
+
+		.choose-font {
+			color: #d4c7c2;
+		}
+	}
+
+	.choose-item {
+		padding: 40rpx 20rpx;
+		justify-content: flex-start;
+
+		.choose-image {
+			width: 100rpx;
+			height: 100rpx;
+
+			image {
+				width: 100%;
+				height: 100%
+			}
+		}
+
+		.choose-rigt {
+			height: 100rpx;
+			margin-left: 20rpx;
+			padding: 10rpx 0;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+
+			.choose-name {
+				font-size: $font-base;
+				color: $font-color-dark;
+				font-weight: bold;
+			}
+
+			.choose-price {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 800;
+				color: #ff4c4c;
+				line-height: 1;
+			}
+		}
+	}
+
+	.top-box {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.top-font {
+		font-size: 32rpx;
+		color: #000000;
+		margin-left: 20rpx;
+	}
+
+	.top {
+		width: 550rpx;
+		height: 58rpx;
+		background: #ededed;
+		border-radius: 29rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.top-icon {
+			width: 32rpx;
+			height: 32rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.top-main {
+			margin-left: 20rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #cbcbcb;
+		}
+	}
+</style>

+ 0 - 482
pages/share/plDetail.vue

@@ -1,482 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top">
-			<image :src="info.main_pic || ''" mode="widthFix"></image>
-		</view>
-		<view class="title">{{ info.title || '' }}</view>
-		<view class="tip">{{ info.comment || '' }}</view>
-		<view class="main" v-for="(ls, index) in info.pics" :key="index">
-			<image :src="ls" mode="widthFix"></image>
-		</view>
-		<view class="navbar flex">
-			<view class="navbar-item" @click.stop="shareLink()">
-				<view class="navbar-icon">
-					<image src="../../static/icon/sharejt.png" mode=""></image>
-				</view>
-				<view class="navbar-font">分享</view>
-			</view>
-			<view class="xian"></view>
-			<view class="navbar-item" @click.stop="wzdz()">
-				<view class="navbar-icon" v-if="info.user_good == 1">
-					<image src="../../static/icon/zanguo.png" mode=""></image>
-				</view>
-				<view class="navbar-icon" v-else>
-					<image src="../../static/icon/zan.png" mode=""></image>
-				</view>
-				<view class="navbar-font">{{ info.goods_count }}</view>
-			</view>
-		</view>
-		<view v-if="shareShow" class="Shraremask" @click="cancel">
-			<view class="mask-content">
-				<scroll-view class="view-content" scroll-y>
-					<view class="share-header">分享到</view>
-					<view class="share-list">
-						<view class="share-item">
-							<button class="wechat-box" open-type="share">
-								<image class="itemImage" src="../../static/icon/share1.png" mode=""></image>
-								<text class="itemText">微信好友</text>
-							</button>
-							<view class="wechat-box" @click="navTo('/pages/zc/plshare?id=' + id)">
-								<image class="itemImage" src="../../static/icon/share2.png" mode=""></image>
-								<text class="itemText">朋友圈</text>
-							</view>
-							<view class="wechat-box" @click="copy()">
-								<image class="itemImage" src="../../static/icon/share3.png" mode=""></image>
-								<text class="itemText">复制链接</text>
-							</view>
-							<view class="wechat-box" @click="shareToFriend()">
-								<image class="itemImage" src="../../static/icon/share4.png" mode=""></image>
-								<text class="itemText">生成海报</text>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-				<view class="bottomButtom b-t" @click="cancel">取消</view>
-			</view>
-		</view>
-		<uni-popup ref="popupshare" type="center">
-			<view class="share-box">
-				<image :src="shareImage" mode="" class="box-img" @longpress="saveImg()"></image>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		reply_detail,
-		reply_good,
-		short_link,
-		reply_poster
-	} from '@/api/activity.js';
-	import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
-	import {
-		mapState
-	} from 'vuex';
-	export default {
-		data() {
-			return {
-				id: '',
-				info: {},
-				shareShow: false,
-				shareImage: ''
-			};
-		},
-		computed: {
-			...mapState('user', ['hasLogin', 'userInfo'])
-		},
-		onLoad(option) {
-			if (option.id) {
-				this.id = option.id;
-			}
-			// #ifdef MP
-			if (option.scene) {
-				if (typeof option.scene == 'string') {
-					// let scene = ('{' + option.scene + "}").replace('qr%26', '').replace(/%3D/g, ':').replace(/%26/g, ',')
-					// 	.replace('id', '\"id\"').replace('pid', '\"pid\"');
-					let scene = ('{' + option.scene + '}')
-						.replace('qr%26', '')
-						.replace(/%3D/g, ':')
-						.replace(/%26/g, ',')
-						.replace('id', '"id"')
-						.replace('pid', '"pid"')
-						.replace(/=/g, ':')
-						.replace(/&/g, ',');
-					console.log(scene, 'scene');
-					let opt = JSON.parse(scene);
-					console.log(opt);
-					// 保存拼团订单id
-					this.id = opt.id;
-					if (opt.pid) {
-						// 存储邀请人
-						// this.spread = opt.pid;
-						uni.setStorageSync('spread', opt.pid);
-					}
-				}
-			}
-			// #endif
-		},
-		onShow() {
-			this.loadData();
-		},
-		onReachBottom() {},
-		onReady() {},
-		// #ifdef MP
-		onShareAppMessage: function(res) {
-			console.log(this.share);
-			if (res.from === 'button') {
-				// 来自页面内分享按钮
-				let pages = getCurrentPages();
-				// 获取当前页面
-				let page = pages[pages.length - 1];
-				let path = '/' + page.route + '?';
-				// 保存传值
-				for (let i in page.options) {
-					path += i + '=' + page.options[i] + '&';
-				}
-				// 保存邀请人
-				let data = {
-					path: path,
-					imageUrl: this.info.share_images[0],
-					title: this.info.title
-				};
-				console.log('data', data);
-				return data;
-			}
-		},
-		// #endif
-		methods: {
-			loadData() {
-				reply_detail({}, this.id).then(({
-					data
-				}) => {
-					this.info = data;
-				});
-			},
-			// 文章点赞
-			wzdz() {
-				reply_good({}, this.id).then(e => {
-					if (this.info.user_good == 0) {
-						this.info.user_good = 1;
-						this.info.goods_count += 1;
-					} else {
-						this.info.user_good = 0;
-						this.info.goods_count -= 1;
-					}
-				});
-			},
-			navTo(url) {
-				uni.navigateTo({
-					url
-				});
-			},
-			shareLink(item) {
-				console.log('dainjideniang');
-				this.shareShow = true;
-			},
-			shareToFriend() {
-				let obj = this;
-				uni.showLoading({
-					title: 'Loading...',
-					mask: true
-				});
-				reply_poster({}, this.id)
-					.then(({
-						data
-					}) => {
-						obj.shareImage = data.url;
-						console.log(obj.shareImage, '123456');
-						uni.hideLoading();
-						this.$refs.popupshare.open();
-					})
-					.catch(e => {
-						uni.hideLoading();
-					});
-			},
-			copy() {
-				short_link({
-					url: 'pages/zc/plDetail?id=' + this.id
-				}).then(({
-					data
-				}) => {
-					console.log(data);
-					this.comfirm(data.link);
-				});
-			},
-			comfirm(text) {
-				console.log(text);
-				const result = uniCopy(text);
-				if (result === false) {
-					uni.showToast({
-						title: '不支持'
-					});
-				} else {
-					uni.showToast({
-						title: '复制成功',
-						icon: 'none'
-					});
-				}
-			},
-			//取消分享
-			cancel() {
-				this.shareShow = false;
-			},
-			saveImg(w) {
-				console.log(w);
-				let obj = this;
-				uni.downloadFile({
-					//下载图片
-					url: obj.shareImage,
-					success: res => {
-						console.log(res.tempFilePath);
-						uni.saveImageToPhotosAlbum({
-							//将图片保存在手机
-							filePath: res.tempFilePath, //保存的位置
-							success: res => {
-								uni.showToast({
-									title: '保存成功',
-									icon: 'none'
-								});
-							}
-						});
-					}
-				});
-			},
-			// 富文本视频解析
-			getVideo(data) {
-				let videoList = [];
-				let videoReg = /<video.*?(?:>|\/>)/gi; //匹配到字符串中的 video 标签
-				let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; //匹配到字符串中的 video 标签 的路径
-				let arr = data.match(videoReg) || []; // arr 为包含所有video标签的数组
-				let articleList = data.split('</video>'); // 把字符串  从视频标签分成数组
-				arr.forEach((item, index) => {
-					var src = item.match(srcReg);
-					videoList.push(src[1]); //所要显示的字符串中 所有的video 标签 的路径
-				});
-				let needArticleList = [];
-				articleList.forEach((item, index) => {
-					if (item != '' && item != undefined) {
-						//  常见的标签渲染
-						needArticleList.push({
-							type: 'rich-text',
-							value: item + '</video>'
-						});
-					}
-					let articleListLength = articleList.length; // 插入到原有video 标签位置
-					if (index < articleListLength && videoList[index] != undefined) {
-						needArticleList.push({
-							type: 'video',
-							value: videoList[index]
-						});
-					}
-				});
-				return needArticleList;
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		min-height: 100%;
-		height: auto;
-	}
-
-	.top {
-		width: 750rpx;
-
-		image {
-			width: 100%;
-		}
-	}
-
-	.title {
-		margin-top: 20rpx;
-		text-align: center;
-		font-size: 32rpx;
-		font-family: PingFang SC;
-		font-weight: 800;
-		color: #303030;
-	}
-
-	.tip {
-		margin-top: 20rpx;
-		padding: 0 10rpx;
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #969696;
-	}
-
-	.main {
-		margin-top: 60rpx;
-
-		image {
-			width: 750rpx;
-		}
-	}
-
-	.navbar {
-		background: #ffffff;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		width: 750rpx;
-		padding: 50rpx 0;
-
-		.xian {
-			width: 2px;
-			background: #999999;
-			height: 36rpx;
-		}
-
-		.navbar-item {
-			width: 50%;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-
-			.navbar-icon {
-				width: 36rpx;
-				height: 36rpx;
-
-				image {
-					width: 100%;
-					height: 100%;
-				}
-			}
-
-			.navbar-font {
-				margin-left: 17rpx;
-				font-size: 22rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-			}
-		}
-	}
-
-	.Shraremask {
-		position: fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		display: flex;
-		justify-content: center;
-		align-items: flex-end;
-		z-index: 998;
-		transition: 0.3s;
-		background-color: rgba(51, 51, 51, 0.6);
-
-		.bottomButtom {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			width: 100%;
-			height: 90rpx;
-			background: #fff;
-			z-index: 9;
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-		}
-	}
-
-	.mask-content {
-		margin-bottom: 88rpx;
-		width: 100%;
-		height: 380rpx;
-		transition: 0.3s;
-		background: #fff;
-
-		&.has-bottom {
-			padding-bottom: 90rpx;
-		}
-
-		.view-content {
-			height: 100%;
-		}
-	}
-
-	.share-header {
-		height: 110rpx;
-		font-size: $font-base + 2rpx;
-		color: font-color-dark;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		padding-top: 10rpx;
-
-		&:before,
-		&:after {
-			content: '';
-			width: 240rpx;
-			height: 0;
-			border-top: 1px solid $border-color-base;
-			transform: scaleY(0.5);
-			margin-right: 30rpx;
-		}
-
-		&:after {
-			margin-left: 30rpx;
-			margin-right: 0;
-		}
-	}
-
-	.share-list {
-		display: flex;
-		width: 80%;
-		margin: 0rpx auto;
-	}
-
-	.share-item {
-		min-width: 33.33%;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 180rpx;
-		width: 100%;
-
-		.wechat-box {
-			width: 50%;
-			height: 100%;
-			background: #ffffff;
-			border: 0;
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-
-			&::after {
-				border: 0;
-			}
-
-			.itemImage {
-				width: 80rpx;
-				height: 80rpx;
-				margin-bottom: 16rpx;
-			}
-
-			.itemText {
-				font-size: $font-base;
-				color: $font-color-base;
-				line-height: 2;
-			}
-		}
-	}
-
-	.share-box {
-		width: 600rpx;
-		height: 1000rpx;
-		background: red;
-
-		.box-img {
-			width: 600rpx;
-			height: 1000rpx;
-		}
-	}
-</style>

+ 0 - 291
pages/share/plshare.vue

@@ -1,291 +0,0 @@
-<template>
-	<view class="content">
-		<view class="box">
-			<view class="title flex">
-				<view class="title-font">分享文案</view>
-				<view class="title-btn" @click="comfirm()">复制文案</view>
-			</view>
-			<view class="box-info">
-				<view class="info-title">{{ info.title }}</view>
-				<view class="info-tip">{{ info.comment }}</view>
-				<view class="info-url">{{ url }}</view>
-			</view>
-			<view class="title flex" style="margin-top: 20rpx;">
-				<view class="title-font">
-					分享素材
-					<text>(已选{{ nowlen }}/{{ alllen }})</text>
-				</view>
-			</view>
-			<view class="image-box">
-				<view class="image-item" v-for="(item, index) in imageBox" @click="change(item)">
-					<image :src="item.url" mode=""></image>
-					<view class="isxuan" v-if="item.isxuan"></view>
-				</view>
-			</view>
-		</view>
-		<view class="btn" @click="onDown()">下载</view>
-	</view>
-</template>
-
-<script>
-import sunuiGrand from '@/components/sunui-grand/sunui-grand.vue';
-import { reply_detail, short_link } from '@/api/activity.js';
-import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
-export default {
-	data() {
-		return {
-			info: {},
-			url: '',
-			imageBox: [],
-			alllen: '',
-			nowlen: ''
-		};
-	},
-	components: {
-		sunuiGrand
-	},
-	onLoad(opt) {
-		this.id = opt.id;
-	},
-	onShow() {
-		this.imageBox = [];
-		this.loadData();
-	},
-	onReachBottom() {},
-	onReady() {},
-	methods: {
-		loadData() {
-			const obj = this;
-			reply_detail({}, this.id).then(({ data }) => {
-				data.pics.forEach(e => {
-					let u = {
-						isxuan: true,
-						url: e
-					};
-					obj.imageBox.push(u);
-				});
-				this.alllen = obj.imageBox.length;
-				this.nowlen = obj.imageBox.length;
-				this.info = data;
-			});
-			short_link({ url: 'pages/zc/plDetail?id=' + this.id }).then(({ data }) => {
-				console.log(data);
-				this.url = data.link;
-			});
-		},
-		change(opt) {
-			if (opt.isxuan) {
-				opt.isxuan = false;
-				this.nowlen -= 1;
-			} else {
-				opt.isxuan = true;
-				this.nowlen += 1;
-			}
-		},
-		comfirm() {
-			let text = this.info.comment + this.url;
-			const result = uniCopy(text);
-			if (result === false) {
-				uni.showToast({
-					title: '不支持'
-				});
-			} else {
-				uni.showToast({
-					title: '复制成功',
-					icon: 'none'
-				});
-			}
-		},
-		onDown() {
-			let that = this;
-			let index = 0;
-			let list = [];
-			that.imageBox.forEach(e => {
-				if (e.isxuan) {
-					list.push(e.url);
-				}
-			});
-			// console.log('触发下载图片');
-			// 第一步,先调用授权功能
-			uni.authorize({
-				scope: 'scope.writePhotosAlbum',
-				success() {
-					// 1 授权成功遍历所有要下载的图片
-					if (list && list.length > 0) {
-						// console.log(that.pathList, '============查看有没有图片数据=============>');
-						let i = 1;
-						list.forEach(item => {
-							// 1.1 调用下载api方法
-							uni.showLoading({
-								title: '下载第' + i + '图片中,共' + list.length + '张'
-							});
-							uni.downloadFile({
-								url: item, // 获取要下载的服务器里的图片地址
-								success: res => {
-									// 1.2 获取远程图片地址后,将图片地址缓存到本地
-									if (res.statusCode === 200) {
-										// console.log(res, '============下载后的图片地址=============>');
-										uni.saveImageToPhotosAlbum({
-											filePath: res.tempFilePath, // 把远程的图片地址及图片保存到本地
-											success: function(res) {
-												// 1.3保存成功后弹框提示保存成功
-												i += 1;
-												uni.showToast({
-													title: '保存成功',
-													icon: 'none'
-												});
-											},
-											fail: function(res) {
-												// console.log(res, '============fail=============>');
-												// 1.4保存失败给用户弹框提示
-												uni.showToast({
-													title: '保存失败',
-													icon: 'none'
-												});
-												if (res.errMsg == 'saveImageToPhotosAlbum:fail cancel') {
-													return;
-												}
-											}
-										});
-									}
-								}
-							});
-						});
-					} else {
-						uni.showToast({
-							title: '暂无数据',
-							icon: 'none'
-						});
-					}
-				},
-				fail() {
-					// 2、授权失败 弹框再次要求授权
-					uni.showModal({
-						title: '您需要授权相册权限',
-						success(res) {
-							// 2.1点击确认按钮就调取授权设置页面
-							if (res.confirm) {
-								// 2.2 开启授权设置页面
-								uni.openSetting({
-									success(res) {},
-									fail(res) {}
-								});
-							}
-						}
-					});
-				}
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	min-height: 100%;
-	height: auto;
-	background: #f8f8f8;
-}
-.box {
-	width: 730rpx;
-	margin: 20rpx auto 0;
-	border-radius: 20rpx;
-	background: #ffffff;
-	padding: 20rpx;
-	.title {
-		.title-font {
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: 800;
-			color: #303030;
-			text {
-				display: inline-block;
-				margin-left: 10rpx;
-				color: #999999;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-			}
-		}
-		.title-btn {
-			width: 150rpx;
-			height: 50rpx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			border: 1px solid #e66f6f;
-			border-radius: 30rpx;
-			color: #e66f6f;
-		}
-	}
-	.box-info {
-		background: #f6f6f6;
-		width: 700rpx;
-		padding: 20rpx;
-		margin: 20rpx auto 0;
-		.info-title {
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 800;
-			color: #303030;
-		}
-		.info-tip {
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #303030;
-		}
-		.info-url {
-			margin-top: 20rpx;
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #666666;
-		}
-	}
-	.image-box {
-		margin-top: 20rpx;
-		display: flex;
-		align-items: center;
-		flex-wrap: wrap;
-		.image-item {
-			margin: 10rpx;
-			position: relative;
-			width: 33%;
-			height: 300rpx;
-			.isxuan {
-				position: absolute;
-				top: 20rpx;
-				right: 20rpx;
-				width: 30rpx;
-				height: 30rpx;
-				border-radius: 50%;
-				background: #e04b4b;
-			}
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-}
-.btn {
-	margin: 0 auto;
-	position: fixed;
-	bottom: 20rpx;
-	left: 0;
-	right: 0;
-	width: 710rpx;
-	height: 80rpx;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	background: #e04b4b;
-	color: #ffffff;
-	font-size: 26rpx;
-	font-family: PingFang SC;
-	font-weight: 500;
-	border-radius: 50rpx;
-}
-</style>

+ 28 - 16
pages/share/share.vue

@@ -1,25 +1,25 @@
 <template>
 	<view class="content">
-		<view class="list-scroll-content" v-for="item in 3">
+		<view class="list-scroll-content" v-for="(item, index) in bjsclist" :key="index" @click="navTo('/pages/share/wzDetail?id=' + item.id)">
 			<view class="main">
 				<view class="main-userInfo">
 					<view class="avatar">
-						<image src="../../static/icon/fire.png" mode=""></image>
+						<image :src="item.image_input[0]" mode=""></image>
 					</view>
 					<view class="main-user-info">
-						<view class="main-userName">冲冲冲</view>
-						<view class="main-user-time">2022-12-20 20:52</view>
+						<view class="main-userName">{{item.title}}</view>
+						<view class="main-user-time">{{item.add_time}}</view>
 					</view>
 					<view class="fenxiang flex">
 						<image class="img-lj" src="../../static/icon/lj.png"></image>
-						<view class="wen-lj">45612</view>
+						<view class="wen-lj">{{item.visit}}</view>
 					</view>
 				</view>
 				<view class="text">
-					<view>风平乐樱桃姜黄复合肽压片糖果套盒,轻松饱腹降 低食欲不再是梦,C天然果蔬纤维素多种果蔬纤维 满足日常膳食营养,专享价【989】</view>
+					<view>{{ item.synopsis }}</view>
 				</view>
 				<view class="fh-im">
-					<image v-for="item in 4" class="fh-img" src="../../static/img/sp.png" mode=""></image>
+					<image v-for="img in item.image_input" class="fh-img" :src="img" mode=""></image>
 				</view>
 			</view>
 		</view>
@@ -36,25 +36,20 @@
 	import {
 		article
 	} from '@/api/user.js';
-	import {
-		reply_list
-	} from '@/api/product.js';
-	import {
-		article_good,
-		reply_good
-	} from '@/api/activity.js';
 	import {
 		tabbar1
 	} from '@/utils/tabbar.js';  //底部导航栏
 	export default {
 		data() {
 			return {
-				
+				bjsclist:[],
 				tabbar: tabbar1,
 			};
 		},
-		onLoad() {},
+		onLoad() {
+		},
 		onShow() {
+			this.loadData();
 		},
 		onReachBottom() {},
 		
@@ -64,6 +59,23 @@
 					url
 				});
 			},
+			async loadData(source) {
+				let obj = this;
+					article({
+								page: 1,
+								limit: 1000
+							},
+							1
+						)
+						.then(({
+							data
+						}) => {
+							this.bjsclist = data;
+						})
+						.catch(e => {
+							console.log(e);
+						});
+			}
 		}
 	};
 </script>

+ 2 - 2
pages/share/wzDetail.vue

@@ -10,7 +10,7 @@
 			<video v-if="ls.type == 'video' && ls.value" :src="ls.value" style="width:100%;height: 300px"
 				frameborder="0"></video>
 		</view>
-		<view class="navbar flex">
+		<!-- <view class="navbar flex">
 			<view class="navbar-item" @click.stop="shareLink()">
 				<view class="navbar-icon">
 					<image src="../../static/icon/sharejt.png" mode=""></image>
@@ -27,7 +27,7 @@
 				</view>
 				<view class="navbar-font">{{ info.goods_count }}</view>
 			</view>
-		</view>
+		</view> -->
 		<view v-if="shareShow" class="Shraremask" @click="cancel">
 			<view class="mask-content">
 				<scroll-view class="view-content" scroll-y>

+ 250 - 60
pages/user/release.vue

@@ -1,79 +1,217 @@
 <template>
 	<view class="content">
-		<view class="main"  v-for="(list, index) in lists" :key="index">
-			<view class="main-userInfo">
-				<view class="avatar">
-					<image src="../../static/icon/fire.png" mode=""></image>
-				</view>
-				<view class="main-user-info">
-					<view class="main-userName">{{list.nicheng}}</view>
-					<view class="main-user-time">{{list.time}}</view>
-				</view>
-				<view class="fenxiang flex">
-					<image class="img-lj" src="../../static/icon/lj.png"></image>
-					<view class="wen-lj">{{list.zf}}</view>
-				</view>
-			</view>
-			<view class="text">
-				<view>{{list.content}}</view>
-			</view>
-			<view class="fh-im">
-				<image v-for="item in 8" class="fh-img" src="../../static/img/sp.png" mode=""></image>
-			</view>
-			<view class="bot flex">
-				<image class="del" src="../../static/icon/del.png" mode=""></image>
-				<view @click="dele(index)" class="sc">删除</view>
-			</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
 		</view>
-		<navigator url="/pages/user/sucai">
-			<button class="rele">发布素材</button>
-		</navigator>
-		<u-tabbar activeColor="#01A6A8" inactive-color='#666666' :list="tabbar"></u-tabbar>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" :class="{ yan: tabCurrentIndex == 0 }"
+					@scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<view class="main" v-for="(item, index) in tabItem.orderList" :key="index" @click="navTo('/pages/share/myarticle?id=' + item.id + '&type=' + tabCurrentIndex)">
+						<view class="main-userInfo">
+							<view class="avatar">
+								<image :src="item.author" mode=""></image>
+							</view>
+							<view class="main-user-info">
+								<view class="main-userName">{{item.title}}</view>
+								<view class="main-user-time">{{item.add_time}}</view>
+							</view>
+							<view class="fenxiang flex">
+								<image class="img-lj" src="../../static/icon/lj.png"></image>
+								<view class="wen-lj">{{item.visit}}</view>
+							</view>
+						</view>
+						<view class="text">
+							<view>{{item.content}}</view>
+						</view>
+						<view class="fh-im">
+							<image v-for="item in item.share_images" class="fh-img" :src="item" mode=""></image>
+						</view>
+						<view class="bot flex">
+							<image class="del" src="../../static/icon/del.png" mode=""></image>
+							<view @click.stop="del(item.id)" class="sc">删除</view>
+						</view>
+					</view>
+					<!-- 订单列表 -->
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+			<button class="rele" @click="navTo('/pages/share/myarticle')" >发布素材</button>
 	</view>
-	
 </template>
 
 <script>
+	import empty from '@/components/empty';
 	import {
-		article
+		my_article,
+		delete_article,
 	} from '@/api/user.js';
 	import {
-		reply_list
-	} from '@/api/product.js';
-	import {
-		article_good,
-		reply_good
-	} from '@/api/activity.js';
-	import {
-		tabbar1
-	} from '@/utils/tabbar.js';  //底部导航栏
+		getTime
+	} from '@/utils/rocessor.js'
 	export default {
+		components: {
+			empty
+		},
 		data() {
 			return {
-				lists: [
-					{nicheng: 'cccc', time: '202311.21', zf: '456212', content: '风平乐樱桃姜黄复合肽压片糖果套盒,轻松饱腹降'},
-					{nicheng: 'bbbb', time: '202311.21', zf: '4562', content: '风平乐樱桃姜黄复合肽压片糖果套盒,轻松饱腹降'},
-					{nicheng: 'aaaa', time: '202311.21', zf: '4562', content: '风平乐樱桃姜黄复合肽压片糖果套盒,轻松饱腹降'}
-				],
-				tabbar: tabbar1,
+				height: '',
+				tabCurrentIndex: 0,
+				navList: [{
+						type: 0,
+						state: -1,
+						text: '草稿箱',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						type: 1,
+						state: 1,
+						text: '已审核',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						type: 1,
+						state: 0,
+						text: '审核中',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				]
 			};
 		},
 		onLoad() {
-			
+		this.loadData();
 		},
-		onShow() {
+		onShow() {},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
 		},
-		onReachBottom() {},
-		
+
 		methods: {
-			dele(index) {
-				this.lists.splice(index, 1)
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			dele(id) {
+				const obj = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否删除这个草稿',
+					success: function(res) {
+						if (res.confirm) {
+							delete_article({}, id).then(({
+								data
+							}) => {
+								obj.$api.msg('删除成功');
+								obj.loadData('shua');
+							});
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
 			},
 			navTo(url) {
 				uni.navigateTo({
 					url
 				});
 			},
+			async loadData(source) {
+				let obj = this;
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				let type = navItem.type;
+				if (source === 'shua') {
+					navItem.loadingType = 'more';
+					navItem.page = 1;
+					navItem.limit = 10;
+					navItem.orderList = [];
+				}
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				my_article({
+						page: navItem.page,
+						limit: navItem.limit,
+						state: state
+					}, type)
+					.then(({
+						data
+					}) => {
+						let arr = []
+						data.list = data.list.map((e)=>{
+							e.share_images = e.share_images.split(',');
+							return e
+						});
+						if (state == -1) {
+							arr = data.list
+						}
+						if (state == 0) {
+							arr = data.list.filter(e => {
+								return e.check_status == 0
+							})
+						}
+						if (state == 1) {
+							arr = data.list.filter(e => {
+								return e.check_status != 0
+							})
+						}
+						arr.forEach(e => {
+							e.add_time = getTime(e.add_time)
+						})
+						console.log(arr);
+						navItem.orderList = navItem.orderList.concat(arr);
+						navItem.page++;
+						if (navItem.limit == data.list.length) {
+							navItem.loadingType = 'more';
+						} else {
+							navItem.loadingType = 'noMore';
+						}
+						obj.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e,'233');
+					});
+			}
 		}
 	};
 </script>
@@ -84,13 +222,50 @@
 		min-height: 100%;
 		height: auto;
 	}
-	
+
+	.navbar {
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #c54b4a;
+				}
+			}
+		}
+	}
+
 	.main {
 		margin: 20rpx;
 		padding: 35rpx 20rpx 24rpx;
 		background: #ffffff;
 		width: 702rpx;
 		border-radius: 30rpx;
+
 		image {
 			width: 100%;
 			height: 100%;
@@ -99,15 +274,18 @@
 		.main-userInfo {
 			display: flex;
 			align-items: center;
+
 			.avatar {
 				width: 80rpx;
 				height: 80rpx;
 				background: #ffffff;
 				border-radius: 50%;
 			}
+
 			.main-user-info {
 				margin-left: 14rpx;
 				line-height: 1;
+
 				.main-userName {
 					font-size: 28rpx;
 					font-weight: bold;
@@ -122,12 +300,15 @@
 					color: #666666;
 				}
 			}
+
 			.fenxiang {
 				padding-left: 310rpx;
+
 				.img-lj {
 					width: 28rpx;
 					height: 28rpx;
 				}
+
 				.wen-lj {
 					font-size: 28rpx;
 					color: #FF6F0F;
@@ -135,6 +316,7 @@
 				}
 			}
 		}
+
 		.text {
 			word-wrap: break-word;
 			word-break: normal;
@@ -143,21 +325,24 @@
 			font-weight: 500;
 			color: #666666;
 		}
+
 		.fh-im {
 			.fh-img {
 				// margin: auto 10rpx;
-				margin: 10rpx 21rpx 0rpx 0rpx ;
+				margin: 10rpx 21rpx 0rpx 0rpx;
 				width: 200rpx;
 				height: 200rpx;
 				// padding: 10rpx;
 			}
 		}
+
 		.bot {
 			.del {
 				margin-left: 540rpx;
 				width: 24rpx;
 				height: 28rpx;
 			}
+
 			.sc {
 				padding-right: 40rpx;
 				font-size: 24rpx;
@@ -166,15 +351,20 @@
 			}
 		}
 	}
+
 	.rele {
-		width: 625rpx;
-		height: 89rpx;
+		position: fixed;
+		width: 750rpx;
+		bottom: 0rpx;
 		background-color: #FF6F0F;
 		color: #ffffff;
-		border-radius: 15rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		margin: 40rpx auto;
+	}
+
+	.swiper-box {
+		margin-top: 20rpx;
+
+		.tab-content {
+			position: relative;
+		}
 	}
 </style>

+ 0 - 2
pages/user/team.vue

@@ -44,12 +44,10 @@
 		mapState,
 		mapMutations
 	} from 'vuex';
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	import empty from '@/components/empty';
 	export default {
 		components: {
 			empty,
-			uniLoadMore
 		},
 		onReady(res) {
 			var _this = this;

+ 5 - 13
pages/user/user.vue

@@ -41,7 +41,7 @@
 			</view>
 			<view class="order-section">
 				<!-- 后添加 -->
-				<view class="order-item" @click="navTo('/pages/order/refundOrder?state=0')" hover-class="common-hover"
+				<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"
 					:hover-stay-time="50">
 					<view class=" icon1 position-relative">
 						<image class="icon-img" src="/static/user/a.png" mode="aspectFit"></image>
@@ -83,8 +83,8 @@
 		<uni-list class="tool-list margin-t-30">
 			<uni-list-item class="item" title="我的素材" @click="navTo('/pages/user/release')"
 				thumb="/static/icon/user-sc.png"></uni-list-item>
-				<uni-list-item class="item" title="我的检测" @click="navTo('/pages/user/jiance')"
-					thumb="/static/icon/user-jc.png"></uni-list-item>
+				<!-- <uni-list-item class="item" title="我的检测" @click="navTo('/pages/user/jiance')"
+					thumb="/static/icon/user-jc.png"></uni-list-item> -->
 			<uni-list-item class="item" title="推广海报" @click="navTo('/pages/user/shareQrCode')"
 				thumb="/static/icon/user-tg.png"></uni-list-item>
 			<!-- <uni-list-item class="item" title="收款信息" @click="navTo('/pages/collection/collection')"
@@ -127,18 +127,10 @@
 	} from 'vuex';
 	import uniList from '@/components/uni-list/uni-list.vue';
 	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	import uniCopy from '@/components/js_sdk/xb-copy/uni-copy.js';
 	import {
 		orderData,
 		getUserInfo,
-		rate,
-		apply_status
 	} from '@/api/user.js';
-	import {
-		signList,
-		integral,
-		signUser
-	} from '@/api/functionalUnit.js';
 	import {
 		saveUrl,
 		interceptor
@@ -227,9 +219,9 @@
 				} else {
 					uni.navigateTo({
 						url,
-						fail() {
+						fail(e) {
 							uni.switchTab({
-								url
+								url,
 							});
 						}
 					});

BIN
static/img/index-center-banner.png


+ 1 - 1
store/index.js

@@ -7,7 +7,7 @@ const store = new Vuex.Store({
 	namespaced: true,
 	state: {
 		// baseURL: 'https://www.shangshiyiqu.com', //地址配置
-		baseURL: 'https://xx.accle.shop', //测试地址配置
+		baseURL: 'http://dxdl.qiniu1314.com', //测试地址配置
 		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor: false, //是否打开强制登录

+ 9 - 5
utils/loginUtils.js

@@ -10,17 +10,21 @@ export function interceptor() {
 	let url = '/pages/public/login'
 	// #ifdef H5
 	// 判断是否为公众号调用微信授权登录
-	// let weichatBrowser = uni.getStorageSync('weichatBrowser');
-	// if (weichatBrowser) {
-	// 	url = '/pages/public/wxLogin';
-	// }
+	let weichatBrowser = uni.getStorageSync('weichatBrowser');
+	if (weichatBrowser) {
+		url = '/pages/public/wxLogin';
+	}
 	// #endif
 	// #ifdef MP-WEIXIN
 	url = '/pages/public/wxLogin';
 	// #endif
 	if (pageUrl != url) {
+		console.log(url);
 		uni.navigateTo({
-			url
+			url,
+			fail(e) {
+				console.log(e,'cw');
+			}
 		})
 	}
 }

+ 1 - 1
utils/request.js

@@ -11,7 +11,7 @@ service.interceptors.response(
 			let res = response.data;
 			// 解析字符串为数字
 			if (res.status !== 200 && res.status) {
-				console.log(res.status);
+				console.log(res.status,'410000');
 				if (res.status == 410000) {
 					// 调用退出登录方法清空用户信息
 					store.commit('user/logout');

Some files were not shown because too many files changed in this diff