李万涛 1 year ago
parent
commit
4d5bfd20a1
100 changed files with 4916 additions and 131 deletions
  1. 38 1
      api/index/index.js
  2. 6 6
      common/config.js
  3. 147 0
      components/wike-painter/common/relation.js
  4. 218 0
      components/wike-painter/nvue.js
  5. 0 0
      components/wike-painter/painter.js
  6. 50 0
      components/wike-painter/props.js
  7. 479 0
      components/wike-painter/utils.js
  8. 407 0
      components/wike-painter/wike-painter.vue
  9. 9 0
      main.js
  10. 68 0
      pages.json
  11. 69 42
      pages/index/genHuiBen/index.scss
  12. 119 36
      pages/index/genHuiBen/index.vue
  13. 13 0
      pages/index/genRes/index.scss
  14. 94 13
      pages/index/genRes/index.vue
  15. 56 0
      pages/index/genRes/util.scss
  16. 26 6
      pages/index/index.vue
  17. 9 0
      pages/my/aboutUs/index.scss
  18. 33 0
      pages/my/aboutUs/index.vue
  19. 284 0
      pages/my/cash/index.scss
  20. 152 0
      pages/my/cash/index.vue
  21. 76 0
      pages/my/cashRecord/index.scss
  22. 64 0
      pages/my/cashRecord/index.vue
  23. 6 1
      pages/my/charge/index.vue
  24. 1 1
      pages/my/huiBen_record - 副本/index.vue
  25. 89 6
      pages/my/index.vue
  26. 229 0
      pages/my/jiangli/index.scss
  27. 113 0
      pages/my/jiangli/index.vue
  28. 117 0
      pages/my/kefu/index - 副本.scss
  29. 74 0
      pages/my/kefu/index - 副本.vue
  30. 68 0
      pages/my/kefu/index.scss
  31. 82 0
      pages/my/kefu/index.vue
  32. 96 0
      pages/my/myRecord/index.scss
  33. 149 0
      pages/my/myRecord/index.vue
  34. 173 0
      pages/my/pubCenter/index.scss
  35. 138 0
      pages/my/pubCenter/index.vue
  36. 156 0
      pages/my/team/index.scss
  37. 69 0
      pages/my/team/index.vue
  38. 173 0
      pages/my/tuiguangDashi/index.scss
  39. 72 0
      pages/my/tuiguangDashi/index.vue
  40. 49 0
      pages/my/tuiguangHaibao/index.scss
  41. 260 0
      pages/my/tuiguangHaibao/index.vue
  42. 65 19
      pages/my/userInfo/index.vue
  43. 212 0
      pages/my/yongjinDetail/index.scss
  44. 104 0
      pages/my/yongjinDetail/index.vue
  45. BIN
      static/other/biyan.png
  46. BIN
      static/other/c_arrR.png
  47. BIN
      static/other/defaultAvatar.png
  48. BIN
      static/other/huangguan.png
  49. BIN
      static/other/icon1.png
  50. BIN
      static/other/icon2.png
  51. BIN
      static/other/icon3.png
  52. BIN
      static/other/icon4.png
  53. BIN
      static/other/icon5.png
  54. BIN
      static/other/liujiaoxing.png
  55. BIN
      static/other/loading.gif
  56. BIN
      static/other/logo_b.png
  57. BIN
      static/other/wechat.png
  58. BIN
      static/other/yhk.png
  59. BIN
      static/other/zhifubao.png
  60. BIN
      static/other/zyan.png
  61. 4 0
      uni_modules/uview-ui/components/u-picker/props.js
  62. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  63. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  64. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  65. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/navBar/index.js.map
  66. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/privacyPopup/index.js.map
  67. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tabBar/index.js.map
  68. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/wike-painter/wike-painter.js.map
  69. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/category/index.js.map
  70. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/genHuiBen/index.js.map
  71. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/genRes/index.js.map
  72. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map
  73. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/index.js.map
  74. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/aboutUs/index.js.map
  75. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/cash/index.js.map
  76. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/cashRecord/index.js.map
  77. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/charge/index.js.map
  78. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/huiBen_record/index.js.map
  79. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map
  80. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/jiangli/index.js.map
  81. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/kefu/index.js.map
  82. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/myRecord/index.js.map
  83. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/pubCenter/index.js.map
  84. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/team/index.js.map
  85. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/tuiguangDashi/index.js.map
  86. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/tuiguangHaibao/index.js.map
  87. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/userInfo/index.js.map
  88. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/yongjinDetail/index.js.map
  89. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages/service/index.js.map
  90. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
  91. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-badge/u-badge.js.map
  92. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-button/u-button.js.map
  93. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-empty/u-empty.js.map
  94. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-icon/u-icon.js.map
  95. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-loading-icon/u-loading-icon.js.map
  96. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-overlay/u-overlay.js.map
  97. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-parse/node/node.js.map
  98. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-parse/u-parse.js.map
  99. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-picker/u-picker.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-popup/u-popup.js.map

+ 38 - 1
api/index/index.js

xqd
@@ -5,4 +5,41 @@ const {
 
 
 //测试接口
-export const getValidateCode = (params, config = {}) => http.post('/api/api/v1/common/send', params, config)
+export const login = (params, config = {}) => http.post('/auth/mini_program', params, config)
+export const getUserInfo = (params, config = {}) => http.get('/user/info', params, config)
+export const updateUserInfo = (params, config = {}) => http.post('/user/update', params, config)
+export const getTuijian = (params, config = {}) => http.get('/user/myShare', params, config)
+
+
+
+export const getChargeRecord = (params, config = {}) => http.get('/user/myOrderList', params, config)
+export const getConsumerRecord = (params, config = {}) => http.get('/user/myConsumeList', params, config)
+
+
+
+export const getJingxuan = (params, config = {}) => http.get('/getHandpick', params, config)
+
+
+
+export const getRoleparmas = (params, config = {}) => http.get('/user/myRoleList', params, config)
+
+
+export const postTask = (params, config = {}) => http.post('/ai/submitTask', params, config)
+
+
+// export const getGenRes = (params, config = {}) => http.get('/ai/getTaskDetail', params, config)
+
+
+export const getGenRes = (params, config = {}) => {
+
+	let apiUrl = '/ai/getTaskDetail'
+	Object.keys(params).forEach((item, index) => {
+		if (index == 0) {
+			apiUrl += `?${item}=${params[item]}`
+		} else {
+			apiUrl += `&${item}=${params[item]}`
+		}
+	})
+	console.log('处理后的apiUrl', apiUrl);
+	return http.get(apiUrl, params, config)
+}

+ 6 - 6
common/config.js

xqd
@@ -5,18 +5,18 @@ if (process.env.NODE_ENV === 'development') {
 		// picUrl: 'https://t23.9026.com',
 		// picBase: 'https://t23.9026.com/uploads/',
 
-		baseUrl: 'https://jgs.9026.com',
-		picUrl: 'https://jgs.9026.com',
-		picBase: 'https://jgs.9026.com/uploads/',
+		baseUrl: 'https://t18.9026.com',
+		picUrl: 'https://t18.9026.com',
+		picBase: 'https://t18.9026.com/api/',
 
 		appId: 'wx03acaa2776bdaceb',
 		shareModel: 0
 	}
 } else {
 	configUrl = {
-		baseUrl: 'https://jgs.9026.com',
-		picUrl: 'https://jgs.9026.com',
-		picBase: 'https://jgs.9026.com/uploads/',
+		baseUrl: 'https://t18.9026.com',
+		picUrl: 'https://t18.9026.com',
+		picBase: 'https://t18.9026.com/api/',
 
 		appId: 'wx03acaa2776bdaceb',
 		shareModel: 0

+ 147 - 0
components/wike-painter/common/relation.js

xqd
@@ -0,0 +1,147 @@
+const styles = (v ='') =>  v.split(';').filter(v => v && !/^[\n\s]+$/.test(v)).map(v => {
+						const key = v.slice(0, v.indexOf(':'))
+						const value = v.slice(v.indexOf(':')+1)
+						return {
+							[key
+								.replace(/-([a-z])/g, function() { return arguments[1].toUpperCase()})
+								.replace(/\s+/g, '')
+							]: value.replace(/^\s+/, '').replace(/\s+$/, '') || ''
+						}
+					})
+export function parent(parent) {
+	return {
+		provide() {
+			return {
+				[parent]: this
+			}
+		},
+		data() {
+			return {
+				el: {
+					css: {},
+					views: []
+				},
+			}
+		},
+		watch: {
+			css: { 
+				handler(v) {
+					if(this.canvasId) {
+						this.el.css = (typeof v == 'object' ? v : v && Object.assign(...styles(v))) || {}
+						this.canvasWidth = this.el.css && this.el.css.width || this.canvasWidth
+						this.canvasHeight = this.el.css && this.el.css.height || this.canvasHeight
+					}
+				},
+				immediate: true
+			}
+		}
+	}
+}
+export function children(parent, options = {}) {
+	const indexKey = options.indexKey || 'index'
+	return {
+		inject: {
+			[parent]: {
+				default: null
+			}
+		},
+		watch: {
+			el: {
+				handler(v, o) {
+					if(JSON.stringify(v) != JSON.stringify(o))
+						this.bindRelation()
+				},
+				deep: true,
+				immediate: true
+			},
+			src: {
+				handler(v, o) {
+					if(v != o)
+						this.bindRelation()
+				},
+				immediate: true
+			},
+			text: {
+				handler(v, o) {
+					if(v != o) this.bindRelation()
+				},
+				immediate: true
+			},
+			css: {
+				handler(v, o) {
+					if(v != o)
+						this.el.css = (typeof v == 'object' ? v : v && Object.assign(...styles(v))) || {}
+				},
+				immediate: true
+			},
+			replace: {
+				handler(v, o) {
+					if(JSON.stringify(v) != JSON.stringify(o))
+						this.bindRelation()
+				},
+				deep: true,
+				immediate: true
+			}
+		},
+		created() {
+			if(!this._uid) {
+				this._uid = this._.uid
+			}
+			Object.defineProperty(this, 'parent', {
+				get: () => this[parent] || [],
+			})
+			Object.defineProperty(this, 'index', {
+				get: () =>  {
+					this.bindRelation();
+					const {parent: {el: {views=[]}={}}={}} = this
+					return views.indexOf(this.el)
+				},
+			});
+			this.el.type = this.type
+			
+			this.bindRelation()
+		},
+		// #ifdef VUE3
+		beforeUnmount() {
+			this.removeEl()
+		},
+		// #endif
+		// #ifdef VUE2
+		beforeDestroy() {
+			this.removeEl()
+		},
+		// #endif
+		methods: {
+			removeEl() {
+				if (this.parent) {
+					this.parent.el.views = this.parent.el.views.filter(
+						(item) => item._uid !== this._uid
+					);
+				}
+			},
+			bindRelation() {
+				if(!this.el._uid) {
+					this.el._uid = this._uid 
+				}
+				if(['text','qrcode'].includes(this.type)) {
+					this.el.text = this.$slots && this.$slots.default && this.$slots.default[0].text || `${this.text || ''}`.replace(/\\n/g, '\n')
+				}
+				if(this.type == 'image') {
+					this.el.src = this.src
+				}
+				if (!this.parent) {
+					return;
+				}
+				let views = this.parent.el.views || [];
+				if(views.indexOf(this.el) !== -1) {
+					this.parent.el.views = views.map(v => v._uid == this._uid ? this.el : v)
+				} else {
+					this.parent.el.views = [...views, this.el];
+				}
+			}
+		},
+		mounted() {
+			// this.bindRelation()
+		},
+	}
+}

+ 218 - 0
components/wike-painter/nvue.js

xqd
@@ -0,0 +1,218 @@
+// #ifdef APP-NVUE
+import { sleep, getImageInfo, isBase64, useNvue, networkReg } from './utils';
+const dom = weex.requireModule('dom')
+import {version } from '../../package.json'
+
+export default {
+	data() {
+		return {
+			tempFilePath: [],
+			isInitFile: false,
+			osName: uni.getSystemInfoSync().osName
+		}
+	},
+	created() {
+		// if (this.hybrid) return
+		// useNvue('_doc/uni_modules/lime-painter/', version, this.timeout).then(res => {
+		// 	this.isInitFile = true
+		// })
+	},
+	methods: {
+		getParentWeith() {
+			return new Promise(resolve => {
+				dom.getComponentRect(this.$refs.limepainter, (res) => {
+					this.parentWidth = Math.ceil(res.size.width)
+					this.canvasWidth = this.canvasWidth || this.parentWidth ||300
+					this.canvasHeight = res.size.height || this.canvasHeight||150
+					resolve(res.size)
+				})
+			})
+		},
+		onPageFinish() {
+			this.webview = this.$refs.webview
+			this.webview.evalJS(`init(${this.dpr})`)
+		},
+		onMessage(e) {
+			const res = e.detail.data[0] || null;
+			if (res.event) {
+				if (res.event == 'inited') {
+					this.inited = true
+				}
+				if(res.event == 'fail'){
+					this.$emit('fail', res)
+				}
+				if (res.event == 'layoutChange') {
+					const data = typeof res.data == 'string' ? JSON.parse(res.data) : res.data
+					this.canvasWidth = Math.ceil(data.width);
+					this.canvasHeight = Math.ceil(data.height);
+				}
+				if (res.event == 'progressChange') {
+					this.progress = res.data * 1
+				}
+				if (res.event == 'file') {
+					this.tempFilePath.push(res.data)
+					if (this.tempFilePath.length > 7) {
+						this.tempFilePath.shift()
+					}
+					return
+				}
+				if (res.event == 'success') {
+					if (res.data) {
+						this.tempFilePath.push(res.data)
+						if (this.tempFilePath.length > 8) {
+							this.tempFilePath.shift()
+						}
+						if (this.isCanvasToTempFilePath) {
+							this.setFilePath(this.tempFilePath.join(''), {isEmit:true})
+						}
+					} else {
+						this.$emit('fail', 'canvas no data')
+					}
+					return
+				}
+				this.$emit(res.event, JSON.parse(res.data));
+			} else if (res.file) {
+				this.file = res.data;
+			} else{
+				console.info(res[0])
+			}
+		},
+		getWebViewInited() {
+			if (this.inited) return Promise.resolve(this.inited);
+			return new Promise((resolve) => {
+				this.$watch(
+					'inited',
+					async val => {
+						if (val) {
+							resolve(val)
+						}
+					}, {
+						immediate: true
+					}
+				);
+			})
+		},
+		getTempFilePath() {
+			if (this.tempFilePath.length == 8) return Promise.resolve(this.tempFilePath)
+			return new Promise((resolve) => {
+				this.$watch(
+					'tempFilePath',
+					async val => {
+						if (val.length == 8) {
+							resolve(val.join(''))
+						}
+					}
+				);
+			})
+		},
+		getWebViewDone() {
+			if (this.progress == 1) return Promise.resolve(this.progress);
+			return new Promise((resolve) => {
+				this.$watch(
+					'progress',
+					async val => {
+						if (val == 1) {
+							this.$emit('done')
+							this.done = true
+							resolve(val)
+						}
+					}, {
+						immediate: true
+					}
+				);
+			})
+		},
+		async render(args) {
+			try {
+				await this.getSize(args)
+				const {width} = args.css || args
+				if(!width && this.parentWidth) {
+					Object.assign(args, {width: this.parentWidth})
+				}
+				const newNode = await this.calcImage(args);
+				await this.getWebViewInited()
+				this.webview.evalJS(`source(${JSON.stringify(newNode)})`)
+				await this.getWebViewDone()
+				await sleep(this.afterDelay)
+				if (this.isCanvasToTempFilePath) {
+					const params = {
+						fileType: this.fileType,
+						quality: this.quality
+					}
+					this.webview.evalJS(`save(${JSON.stringify(params)})`)
+				}
+				return Promise.resolve()
+			} catch (e) {
+				this.$emit('fail', e)
+			}
+		},
+		getfile(e){
+			let url = plus.io.convertLocalFileSystemURL( e )
+			return new Promise((resolve,reject)=>{
+				plus.io.resolveLocalFileSystemURL(url, entry => {
+					var reader = null;
+					entry.file( file => {
+						reader = new plus.io.FileReader();
+						reader.onloadend =  ( read )=> {
+							resolve(read.target.result)
+						};
+						reader.readAsDataURL( file );
+					}, function ( error ) {
+						alert( error.message );
+					} );
+				},err=>{
+					resolve(e)
+				})
+			})
+		},
+		async calcImage(args) {
+			let node = JSON.parse(JSON.stringify(args))
+			const urlReg = /url\((.+)\)/
+			const {backgroundImage} = node.css||{}
+			const isBG = backgroundImage && urlReg.exec(backgroundImage)[1]
+			const url = node.url || node.src || isBG
+			if(['text', 'qrcode'].includes(node.type)) {
+				return node
+			}
+			if ((node.type === "image" || isBG) && url && !isBase64(url) && (this.osName == 'ios' ? true : !networkReg.test(url))) {
+				let {path} = await getImageInfo(url)
+				if(this.osName == 'ios') {
+					path = await this.getfile(path)
+				}
+				if (isBG) {
+					node.css.backgroundImage = `url(${path})`
+				} else {
+					node.src = path
+				}
+			} else if (node.views && node.views.length) {
+				for (let i = 0; i < node.views.length; i++) {
+					node.views[i] = await this.calcImage(node.views[i])
+				}
+			}
+			return node
+		},
+		async canvasToTempFilePath(args = {}) {
+			if (!this.inited) {
+				return this.$emit('fail', 'no init')
+			}
+			this.tempFilePath = []
+			if (args.fileType == 'jpg') {
+				args.fileType = 'jpeg'
+			}
+			this.webview.evalJS(`save(${JSON.stringify(args)})`)
+			try {
+				let tempFilePath = await this.getTempFilePath()
+				tempFilePath = await this.setFilePath(tempFilePath)
+				args.success({
+					errMsg: "canvasToTempFilePath:ok",
+					tempFilePath
+				})
+			} catch (e) {
+				args.fail({
+					error: e
+				})
+			}
+		}
+	}
+}
+// #endif

File diff suppressed because it is too large
+ 0 - 0
components/wike-painter/painter.js


+ 50 - 0
components/wike-painter/props.js

xqd
@@ -0,0 +1,50 @@
+export default {
+	props: {
+		board: Object,
+		pathType: String, // 'base64'、'url'
+		fileType: {
+			type: String,
+			default: 'png'
+		},
+		quality: {
+			type: Number,
+			default: 1
+		},
+		css: [String, Object],
+		// styles: [String, Object],
+		width: [Number, String],
+		height: [Number, String],
+		pixelRatio: Number,
+		customStyle: String,
+		isCanvasToTempFilePath: Boolean,
+		// useCanvasToTempFilePath: Boolean,
+		sleep: {
+			type: Number,
+			default: 1000 / 30
+		},
+		beforeDelay: {
+			type: Number,
+			default: 100
+		},
+		afterDelay: {
+			type: Number,
+			default: 100
+		},
+		// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+		type: {
+			type: String,
+			default: '2d'
+		},
+		// #endif
+		// #ifdef APP-NVUE
+		hybrid: Boolean,
+		timeout: {
+			type: Number,
+			default: 2000
+		},
+		// #endif
+		// #ifdef H5
+		useCORS: Boolean
+		// #endif
+	}
+}

+ 479 - 0
components/wike-painter/utils.js

xqd
@@ -0,0 +1,479 @@
+export const networkReg = /^(http|\/\/)/;
+export const isBase64 = (path) => /^data:image\/(\w+);base64/.test(path);
+export function sleep(delay) {
+	return new Promise(resolve => setTimeout(resolve, delay))
+}
+const isDev = ['devtools'].includes(uni.getSystemInfoSync().platform)
+// 缓存图片
+let cache = {}
+export function isNumber(value) {
+	return /^-?\d+(\.\d+)?$/.test(value);
+}
+export function toPx(value, baseSize, isDecimal = false) {
+	// 如果是数字
+	if (typeof value === 'number') {
+		return value
+	}
+	// 如果是字符串数字
+	if (isNumber(value)) {
+		return value * 1
+	}
+	// 如果有单位
+	if (typeof value === 'string') {
+		const reg = /^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g
+		const results = reg.exec(value);
+		if (!value || !results) {
+			return 0;
+		}
+		const unit = results[3];
+		value = parseFloat(value);
+		let res = 0;
+		if (unit === 'rpx') {
+			res = uni.upx2px(value);
+		} else if (unit === 'px') {
+			res = value * 1;
+		} else if (unit === '%') {
+			res = value * toPx(baseSize) / 100;
+		} else if (unit === 'em') {
+			res = value * toPx(baseSize || 14);
+		}
+		return isDecimal ? res.toFixed(2) * 1 : Math.round(res);
+	}
+	return 0
+}
+
+// 计算版本
+export function compareVersion(v1, v2) {
+	v1 = v1.split('.')
+	v2 = v2.split('.')
+	const len = Math.max(v1.length, v2.length)
+	while (v1.length < len) {
+		v1.push('0')
+	}
+	while (v2.length < len) {
+		v2.push('0')
+	}
+	for (let i = 0; i < len; i++) {
+		const num1 = parseInt(v1[i], 10)
+		const num2 = parseInt(v2[i], 10)
+
+		if (num1 > num2) {
+			return 1
+		} else if (num1 < num2) {
+			return -1
+		}
+	}
+	return 0
+}
+// #ifdef MP
+export const prefix = () => {
+	// #ifdef MP-TOUTIAO
+	return tt
+	// #endif
+	// #ifdef MP-WEIXIN
+	return wx
+	// #endif
+	// #ifdef MP-BAIDU
+	return swan
+	// #endif
+	// #ifdef MP-ALIPAY
+	return my
+	// #endif
+	// #ifdef MP-QQ
+	return qq
+	// #endif
+	// #ifdef MP-360
+	return qh
+	// #endif
+}
+// #endif
+
+
+const base64ToArrayBuffer = (data) => {
+	// #ifndef MP-WEIXIN || APP-PLUS
+	/**
+	 * Base64Binary.decode(base64_string);  
+	 * Base64Binary.decodeArrayBuffer(base64_string); 
+	 */
+	const Base64Binary = {
+		_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
+		/* will return a  Uint8Array type */
+		decodeArrayBuffer(input) {
+			const bytes = (input.length / 4) * 3;
+			const ab = new ArrayBuffer(bytes);
+			this.decode(input, ab);
+			return ab;
+		},
+		removePaddingChars(input) {
+			const lkey = this._keyStr.indexOf(input.charAt(input.length - 1));
+			if (lkey == 64) {
+				return input.substring(0, input.length - 1);
+			}
+			return input;
+		},
+		decode(input, arrayBuffer) {
+			//get last chars to see if are valid
+			input = this.removePaddingChars(input);
+			input = this.removePaddingChars(input);
+
+			const bytes = parseInt((input.length / 4) * 3, 10);
+
+			let uarray;
+			let chr1, chr2, chr3;
+			let enc1, enc2, enc3, enc4;
+			let i = 0;
+			let j = 0;
+
+			if (arrayBuffer)
+				uarray = new Uint8Array(arrayBuffer);
+			else
+				uarray = new Uint8Array(bytes);
+
+			input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+
+			for (i = 0; i < bytes; i += 3) {
+				//get the 3 octects in 4 ascii chars
+				enc1 = this._keyStr.indexOf(input.charAt(j++));
+				enc2 = this._keyStr.indexOf(input.charAt(j++));
+				enc3 = this._keyStr.indexOf(input.charAt(j++));
+				enc4 = this._keyStr.indexOf(input.charAt(j++));
+
+				chr1 = (enc1 << 2) | (enc2 >> 4);
+				chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+				chr3 = ((enc3 & 3) << 6) | enc4;
+
+				uarray[i] = chr1;
+				if (enc3 != 64) uarray[i + 1] = chr2;
+				if (enc4 != 64) uarray[i + 2] = chr3;
+			}
+			return uarray;
+		}
+	}
+	return Base64Binary.decodeArrayBuffer(data)
+	// #endif
+	// #ifdef MP-WEIXIN || APP-PLUS
+	return uni.base64ToArrayBuffer(data)
+	// #endif
+}
+
+
+/**
+ * base64转路径
+ * @param {Object} base64
+ */
+export function base64ToPath(base64) {
+	const [, format] = /^data:image\/(\w+);base64,/.exec(base64) || [];
+
+	return new Promise((resolve, reject) => {
+		// #ifdef MP
+		const fs = uni.getFileSystemManager()
+		//自定义文件名
+		if (!format) {
+			reject(new Error('ERROR_BASE64SRC_PARSE'))
+		}
+		const time = new Date().getTime();
+		let pre = prefix()
+		const filePath = `${pre.env.USER_DATA_PATH}/${time}.${format}`
+		//let buffer = base64ToArrayBuffer(bodyData)
+		fs.writeFile({
+			filePath,
+			data: base64.split(',')[1], //base64.replace(/^data:\S+\/\S+;base64,/, ''),
+			encoding: 'base64',
+			// data: buffer,
+			// encoding: 'binary',
+			success() {
+				resolve(filePath)
+			},
+			fail(err) {
+				reject(err)
+			}
+		})
+		// #endif
+
+		// #ifdef H5
+		// mime类型
+		let mimeString = base64.split(',')[0].split(':')[1].split(';')[0];
+		//base64 解码
+		let byteString = atob(base64.split(',')[1]);
+		//创建缓冲数组
+		let arrayBuffer = new ArrayBuffer(byteString.length);
+		//创建视图
+		let intArray = new Uint8Array(arrayBuffer);
+		for (let i = 0; i < byteString.length; i++) {
+			intArray[i] = byteString.charCodeAt(i);
+		}
+		resolve(URL.createObjectURL(new Blob([intArray], {
+			type: mimeString
+		})))
+		// #endif
+
+		// #ifdef APP-PLUS
+		const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
+		bitmap.loadBase64Data(base64, () => {
+			if (!format) {
+				reject(new Error('ERROR_BASE64SRC_PARSE'))
+			}
+			const time = new Date().getTime();
+			const filePath = `_doc/uniapp_temp/${time}.${format}`
+			bitmap.save(filePath, {},
+				() => {
+					bitmap.clear()
+					resolve(filePath)
+				},
+				(error) => {
+					bitmap.clear()
+					reject(error)
+				})
+		}, (error) => {
+			bitmap.clear()
+			reject(error)
+		})
+		// #endif
+	})
+}
+
+/**
+ * 路径转base64
+ * @param {Object} string
+ */
+export function pathToBase64(path) {
+	if (/^data:/.test(path)) return path
+	return new Promise((resolve, reject) => {
+		// #ifdef H5
+		let image = new Image();
+		image.setAttribute("crossOrigin", 'Anonymous');
+		image.onload = function() {
+			let canvas = document.createElement('canvas');
+			canvas.width = this.naturalWidth;
+			canvas.height = this.naturalHeight;
+			canvas.getContext('2d').drawImage(image, 0, 0);
+			let result = canvas.toDataURL('image/png')
+			resolve(result);
+			canvas.height = canvas.width = 0
+		}
+		image.src = path + '?v=' + Math.random()
+		image.onerror = (error) => {
+			reject(error);
+		};
+		// #endif
+
+		// #ifdef MP
+		if (uni.canIUse('getFileSystemManager')) {
+			uni.getFileSystemManager().readFile({
+				filePath: path,
+				encoding: 'base64',
+				success: (res) => {
+					resolve('data:image/png;base64,' + res.data)
+				},
+				fail: (error) => {
+					reject(error)
+				}
+			})
+		}
+		// #endif
+
+		// #ifdef APP-PLUS
+		plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), (entry) => {
+			entry.file((file) => {
+				const fileReader = new plus.io.FileReader()
+				fileReader.onload = (data) => {
+					resolve(data.target.result)
+				}
+				fileReader.onerror = (error) => {
+					reject(error)
+				}
+				fileReader.readAsDataURL(file)
+			}, reject)
+		}, reject)
+		// #endif
+	})
+}
+
+
+
+export function getImageInfo(path, useCORS) {
+	return new Promise(async (resolve, reject) => {
+		let src = path
+		if (cache[path] && cache[path].errMsg) {
+			resolve(cache[path])
+		} else {
+			try {
+				// if (!isBase64 && PLATFORM == UNI_PLATFORM.PLUS && !/^\/?(static|_doc)\//.test(src)) {
+				// 	src = await downloadFile(path) as string
+				// } else 
+				// #ifdef MP || APP-PLUS
+				if (isBase64(path)) {
+					src = await base64ToPath(path)
+				}
+				// #endif
+				// #ifdef H5
+				if(useCORS) {
+					src = await pathToBase64(path)
+				}
+				// #endif
+				
+			} catch (error) {
+				reject({
+					...error,
+					src
+				})
+			}
+			uni.getImageInfo({
+				src,
+				success: (image) => {
+					const localReg = /^\.|^\/(?=[^\/])/;
+					// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO
+					image.path = localReg.test(src) ?  `/${image.path}` : image.path;
+					// #endif
+					// #ifdef H5
+					image.path = image.path.replace(/^\./, window.location.origin)
+					// #endif
+					
+					if(this.canvas.createImage) {
+						const img = this.canvas.createImage()
+						img.src = image.path
+						img.onload = function() {
+							image.path = img
+							cache[path] = image
+							resolve(cache[path])
+						}
+						img.onerror = function(err) {
+							reject({err,path})
+						}
+					} else if (isDev) {
+						resolve(image)
+					} else {
+						cache[path] = image
+						resolve(cache[path])
+					}
+				},
+				fail(err) {
+					console.error({err, path})
+					reject({err,path})
+				}
+			})
+		}
+	})
+}
+
+export function downloadFile(url) {
+	if (!url) return Promise.reject({
+		err: 'no url'
+	})
+	return new Promise((resolve, reject) => {
+		if (cache[url]) {
+			return reject()
+		}
+		cache[url] = 1
+		uni.downloadFile({
+			url,
+			success(res) {
+				resolve(res)
+			},
+			fail(err) {
+				reject(err)
+			}
+		})
+	})
+}
+
+// #ifdef APP-PLUS
+const 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) {
+		const localFilePath = plus.io.convertAbsoluteFileSystem(path)
+		if (localFilePath !== path) {
+			return localFilePath
+		} else {
+			path = path.substr(1)
+		}
+	}
+	return '_www/' + path
+}
+const getFile = (url) => {
+	return new Promise((resolve, rejcet) => {
+		plus.io.resolveLocalFileSystemURL(url, resolve, (err) => {
+			resolve(false)
+		})
+	})
+}
+const createFile = ({
+	fs,
+	url,
+	target,
+	name
+}) => {
+	return new Promise((resolve, reject) => {
+		plus.io.resolveLocalFileSystemURL(url, res1 => {
+			fs.root.getDirectory(target, {
+				create: true
+			}, fileEntry => {
+				const success = () => {
+					res1.remove()
+					resolve()
+				}
+				getFile(target + name).then(res => {
+					if (res) {
+						res.remove((res2) => {
+							res1.moveTo(fileEntry, name, success, reject)
+						})
+					}
+					res1.moveTo(fileEntry, name, success, reject)
+				})
+			})
+		}, reject)
+	})
+}
+export function useNvue(target, version, timeout) {
+	return new Promise((resolve, reject) => {
+		plus.io.requestFileSystem(plus.io.PRIVATE_DOC, async (fs) => {
+			try {
+				cache['lime-painter'] = 0
+				let names = ['uni.webview.1.5.3.js', 'painter.js', 'index.html']
+				let urls = ['https://gitee.com/dcloud/uni-app/raw/dev/dist/',
+					'https://static-6d65bd90-8508-4d6c-abbc-a4ef5c8e49e7.bspapp.com/lime-painter/'
+				]
+				const oldVersion = plus.storage.getItem('lime-painter')
+				const isFile = await getFile(`${target}${names[1]}`)
+				if (isFile && oldVersion && compareVersion(oldVersion, version) >= 0) {
+					resolve()
+				} else {
+					for (var i = 0; i < names.length; i++) {
+						const name = names[i]
+						const file = await downloadFile(urls[i >= 1 ? 1 : 0] + name)
+						await createFile({
+							fs,
+							url: file.tempFilePath,
+							target,
+							name: name.includes('uni.webview') ? 'uni.webview.js' : name
+						})
+					}
+					plus.storage.setItem('lime-painter', version)
+					cache['lime-painter'] = version
+					resolve()
+				}
+			} catch (e) {
+				let index = parseInt(timeout / 20)
+				while (!cache['lime-painter'] && index) {
+					await sleep(20)
+					index--
+				}
+				if (cache['lime-painter']) {
+					resolve()
+				} else {
+					reject(e)
+				}
+			}
+		}, reject)
+	})
+}
+// #endif

+ 407 - 0
components/wike-painter/wike-painter.vue

xqd
@@ -0,0 +1,407 @@
+<template>
+	<view class="lime-painter" ref="limepainter">
+		<view v-if="canvasId && size" :style="styles">
+			<!-- #ifndef APP-NVUE -->
+			<canvas class="lime-painter__canvas" v-if="use2dCanvas" :id="canvasId" type="2d" :style="size"></canvas>
+			<canvas class="lime-painter__canvas" v-else :canvas-id="canvasId" :style="size" :id="canvasId"
+				:width="boardWidth * dpr" :height="boardHeight * dpr"></canvas>
+
+			<!-- #endif -->
+			<!-- #ifdef APP-NVUE -->
+			<web-view :style="size" ref="webview"
+				src="/uni_modules/lime-painter/static/index.html"
+				class="lime-painter__canvas" @pagefinish="onPageFinish" @error="onError" @onPostMessage="onMessage">
+			</web-view>
+			<!-- #endif -->
+		</view>
+		<slot />
+	</view>
+</template>
+
+
+<script>
+	import { parent } from './common/relation'
+	import props from './props'
+	import {toPx, base64ToPath, pathToBase64, isBase64, sleep, getImageInfo}from './utils';
+	//  #ifndef APP-NVUE
+	import { compareVersion } from './utils';
+	import Painter from './painter'
+	// import Painter from '@lime/'
+	const nvue = {}
+	//  #endif
+	//  #ifdef APP-NVUE
+	import nvue from './nvue'
+	//  #endif
+	export default {
+		name: 'lime-painter',
+		mixins: [props, parent('painter'), nvue],
+		data() {
+			return {
+				// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+				use2dCanvas: true,
+				// #endif
+				// #ifndef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
+				use2dCanvas: false,
+				// #endif
+				canvasHeight: 150,
+				canvasWidth: null,
+				parentWidth: 0,
+				inited: false,
+				progress: 0,
+				firstRender: 0,
+				done: false
+			};
+		},
+		computed: {
+			styles() {
+				return `${this.size}${this.customStyle||''};`
+			},
+			canvasId() {
+				return `l-painter${this._uid || this._.uid}`
+			},
+			size() {
+				if (this.boardWidth && this.boardHeight) {
+					return `width:${this.boardWidth}px; height: ${this.boardHeight}px;`;
+				}
+			},
+			dpr() {
+				return this.pixelRatio || uni.getSystemInfoSync().pixelRatio;
+			},
+			boardWidth() {
+				const {width = 0} = (this.elements && this.elements.css) || this.elements || this
+				const w = toPx(width||this.width)
+				return w || Math.max(w, toPx(this.canvasWidth));
+			},
+			boardHeight() {
+				const {height = 0} = (this.elements && this.elements.css) || this.elements || this
+				const h = toPx(height||this.height)
+				return h || Math.max(h, toPx(this.canvasHeight));
+			},
+			hasBoard() {
+				return this.board && Object.keys(this.board).length
+			},
+			elements() {
+				return this.hasBoard ? this.board : JSON.parse(JSON.stringify(this.el))
+			}
+		},
+		watch: {
+			// #ifdef MP-WEIXIN ||  MP-ALIPAY
+			size(v) {
+				// #ifdef MP-WEIXIN
+				if (this.use2dCanvas) {
+					this.inited = false;
+				}
+				// #endif
+				// #ifdef MP-ALIPAY
+				this.inited = false;
+				// #endif
+			},
+			// #endif
+		},
+		created() {
+			const { SDKVersion, version, platform } = uni.getSystemInfoSync();
+			// #ifdef MP-WEIXIN
+			this.use2dCanvas = this.type === '2d' && compareVersion(SDKVersion, '2.9.2') >= 0  && !this.isPC;
+			// #endif
+			// #ifdef MP-TOUTIAO
+			this.use2dCanvas = this.type === '2d' && compareVersion(SDKVersion, '1.78.0') >= 0;
+			// #endif
+			// #ifdef MP-ALIPAY
+			this.use2dCanvas = this.type === '2d' && compareVersion(my.SDKVersion, '2.7.15') >= 0;
+			// #endif
+		},
+		async mounted() {
+			await sleep(30)
+			await this.getParentWeith()
+			this.$nextTick(() => {
+				setTimeout(() => {
+					this.$watch('elements', this.watchRender, {
+						deep: true,
+						immediate: true
+					});
+				}, 30)
+			})
+		},
+		methods: {
+			async watchRender(val, old) {
+				if (!val || !val.views || (!this.firstRender ? !val.views.length : !this.firstRender) || !Object.keys(val).length || JSON.stringify(val) == JSON.stringify(old)) return;
+				this.firstRender = 1
+				clearTimeout(this.rendertimer)
+				this.rendertimer = setTimeout(() => {
+					this.render(val);
+				}, this.beforeDelay)
+			},
+			async setFilePath(path, param) {
+				let filePath = path
+				const {pathType = this.pathType} =  param || this
+				if (pathType == 'base64' && !isBase64(path)) {
+					filePath = await pathToBase64(path)
+				} else if (pathType == 'url' && isBase64(path)) {
+					filePath = await base64ToPath(path)
+				}
+				if (param && param.isEmit) {
+					this.$emit('success', filePath);
+				}
+				return filePath
+			},
+			async getSize(args) {
+				const {width} = args.css || args
+				const {height} = args.css || args
+				if (!this.size) {
+					if (width || height) {
+						this.canvasWidth = width || this.canvasWidth
+						this.canvasHeight = height || this.canvasHeight
+						await sleep(30);
+					} else {
+						await this.getParentWeith()
+					}
+				}
+			},
+			canvasToTempFilePathSync(args) {
+				this.stopWatch = this.$watch('done', (v) => {
+					if (v) {
+						this.canvasToTempFilePath(args)
+						this.stopWatch && this.stopWatch()
+					}
+				}, {
+					immediate: true
+				})
+				
+			},
+			// #ifndef APP-NVUE
+			getParentWeith() {
+				return new Promise(resolve => {
+					uni.createSelectorQuery()
+						.in(this)
+						.select(`.lime-painter`)
+						.boundingClientRect()
+						.exec(res => {
+							const {width, height} = res[0]||{}
+							this.parentWidth = Math.ceil(width||0)
+							this.canvasWidth = this.parentWidth || 300
+							this.canvasHeight = height || this.canvasHeight||150
+							resolve(res[0])
+						})
+				})
+			},
+			async render(args = {}) {
+				if(!Object.keys(args).length) {
+					return console.error('空对象')
+				}
+				this.progress = 0
+				this.done = false
+				await this.getSize(args)
+				const ctx = await this.getContext();
+				let {
+					use2dCanvas,
+					boardWidth,
+					boardHeight,
+					canvas,
+					afterDelay
+				} = this;
+				if (use2dCanvas && !canvas) {
+					return Promise.reject(new Error('render: fail canvas has not been created'));
+				}
+				this.boundary = {
+					top: 0,
+					left: 0,
+					width: boardWidth,
+					height: boardHeight
+				};
+				this.painter = null
+				if (!this.painter) {
+					const {width} = args.css || args
+					const {height} = args.css || args
+					if(!width && this.parentWidth) {
+						Object.assign(args, {width: this.parentWidth})
+					}
+					const param = {
+						context: ctx,
+						canvas,
+						width: boardWidth,
+						height: boardHeight,
+						pixelRatio: this.dpr,
+						useCORS: this.useCORS,
+						createImage: getImageInfo.bind(this),
+						listen: {
+							onProgress: (v) => {
+								this.progress = v
+								this.$emit('progress', v)
+							},
+							onEffectFail: (err) => {
+								this.$emit('faill', err)
+							}
+						}
+					}
+					this.painter = new Painter(param)
+				} 
+				
+				// vue3 赋值给data会引起图片无法绘制 
+				const { width, height } = await this.painter.source(JSON.parse(JSON.stringify(args)))
+				this.boundary.height = this.canvasHeight = height
+				this.boundary.width = this.canvasWidth = width
+				await sleep(this.sleep);
+				// 可能会因为尺寸改变影响绘制上下文
+				this.painter.setContext(this.ctx)
+				await this.painter.render()
+				await new Promise(resolve => this.$nextTick(resolve));
+				if (!use2dCanvas) {
+					await this.canvasDraw();
+				}
+				if (afterDelay && use2dCanvas) {
+					await sleep(afterDelay);
+				}
+				this.$emit('done');
+				this.done = true
+				if (this.isCanvasToTempFilePath) {
+					this.canvasToTempFilePath()
+						.then(res => {
+							this.$emit('success', res.tempFilePath)
+						})
+						.catch(err => {
+							this.$emit('fail', new Error(JSON.stringify(err)));
+						});
+				}
+				return Promise.resolve({
+					ctx,
+					draw: this.painter,
+					node: this.node
+				});
+			},
+			canvasDraw(flag = false) {
+				return new Promise((resolve, reject) => this.ctx.draw(flag, () => setTimeout(() => resolve(), this
+					.afterDelay)));
+			},
+			async getContext() {
+				if (!this.canvasWidth) {
+					this.$emit('fail', 'painter no size')
+					console.error('painter no size: 请给画板或父级设置尺寸')
+					return Promise.reject();
+				}
+				if (this.ctx && this.inited) {
+					return Promise.resolve(this.ctx);
+				}
+				const { type, use2dCanvas, dpr, boardWidth, boardHeight } = this;
+				const _getContext = () => {
+					return new Promise(resolve => {
+						uni.createSelectorQuery()
+							.in(this)
+							.select(`#${this.canvasId}`)
+							.boundingClientRect()
+							.exec(res => {
+								if (res) {
+									const ctx = uni.createCanvasContext(this.canvasId, this);
+									if (!this.inited) {
+										this.inited = true;
+										this.use2dCanvas = false;
+										this.canvas = res;
+									}
+									// #ifdef MP-ALIPAY
+									ctx.scale(dpr, dpr);
+									// #endif
+									this.ctx = ctx
+									resolve(this.ctx);
+								}
+							});
+					});
+				};
+				if (!use2dCanvas) {
+					return _getContext();
+				}
+				return new Promise(resolve => {
+					uni.createSelectorQuery()
+						.in(this)
+						.select(`#${this.canvasId}`)
+						.node()
+						.exec(res => {
+							let {node: canvas} = res[0];
+							if (!canvas) {
+								this.use2dCanvas = false;
+								resolve(this.getContext());
+							}
+							const ctx = canvas.getContext(type);
+							if (!this.inited) {
+								this.inited = true;
+								this.use2dCanvas = true;
+								this.canvas = canvas;
+							}
+							this.ctx = ctx
+							resolve(this.ctx);
+						});
+				});
+			},
+			canvasToTempFilePath(args = {}) {
+				return new Promise(async (resolve, reject) => {
+					const { use2dCanvas, canvasId, dpr, fileType, quality } = this;
+					
+					const success = async (res) => {
+						try {
+							const tempFilePath = await this.setFilePath(res.tempFilePath || res)
+							resolve(Object.assign(res, {tempFilePath}))
+						} catch (e) {
+							this.$emit('fail', e)
+						}
+					}
+					
+					let { top: y = 0, left: x = 0, width, height } = this.boundary || this;
+					let destWidth = width * dpr;
+					let destHeight = height * dpr;
+					// #ifdef MP-ALIPAY
+					width = destWidth;
+					height = destHeight;
+					// #endif
+					
+					const copyArgs = Object.assign({
+						x,
+						y,
+						width,
+						height,
+						destWidth,
+						destHeight,
+						canvasId,
+						fileType,
+						quality,
+						success,
+						fail: reject
+					}, args);
+					
+					if (use2dCanvas) {
+						try{
+							// #ifndef MP-ALIPAY
+							if(!args.pathType && !this.pathType) {args.pathType = 'url'}
+							const tempFilePath = await this.setFilePath(this.canvas.toDataURL(`image/${args.fileType||fileType}`.replace(/pg/, 'peg'), args.quality||quality), args)
+							args.success && args.success({tempFilePath})
+							resolve({tempFilePath})
+							// #endif
+							// #ifdef MP-ALIPAY
+							this.canvas.toTempFilePath(copyArgs)
+							// #endif
+						}catch(e){
+							args.fail && args.fail(e)
+							reject(e)
+						}
+					} else {
+						// #ifdef MP-ALIPAY
+						uni.canvasToTempFilePath(copyArgs);
+						// #endif
+						// #ifndef MP-ALIPAY
+						uni.canvasToTempFilePath(copyArgs, this);
+						// #endif
+					}
+				})
+			}
+			// #endif
+		}
+	};
+</script>
+<style>
+	.lime-painter,
+	.lime-painter__canvas {
+		// #ifndef APP-NVUE
+		width: 100%;
+		// #endif
+		// #ifdef APP-NVUE
+		flex: 1;
+		// #endif
+	}
+</style>

+ 9 - 0
main.js

xqd
@@ -27,6 +27,15 @@ import uploadUrl from '@/common/config.js'
 
 // Vue.mixin(vuexStore);
 
+// 常见功能函数封装
+Vue.prototype.$toast = (title, icon = "none", duration = 1500) => {
+	uni.showToast({
+		title,
+		icon,
+		duration
+	})
+}
+
 // 引入请求封装 
 require('./utils/request/index')(app)
 

+ 68 - 0
pages.json

xqd
@@ -59,6 +59,74 @@
 			"style": {
 				"navigationBarTitleText": "绘本生成"
 			}
+		},
+		{
+			"path": "pages/my/pubCenter/index",
+			"style": {
+				"navigationBarTitleText": "推广中心"
+			}
+		},
+		{
+			"path": "pages/my/jiangli/index",
+			"style": {
+				"navigationBarTitleText": "推荐奖励"
+			}
+		},
+
+		{
+			"path": "pages/my/tuiguangDashi/index",
+			"style": {
+				"navigationBarTitleText": "推广大使"
+			}
+		},
+
+		{
+			"path": "pages/my/yongjinDetail/index",
+			"style": {
+				"navigationBarTitleText": "佣金明细"
+			}
+		},
+		{
+			"path": "pages/my/cash/index",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/my/cashRecord/index",
+			"style": {
+				"navigationBarTitleText": "提现记录"
+			}
+		},
+		{
+			"path": "pages/my/team/index",
+			"style": {
+				"navigationBarTitleText": "推广团队"
+			}
+		},
+		{
+			"path": "pages/my/tuiguangHaibao/index",
+			"style": {
+				"navigationBarTitleText": "推广海报"
+			}
+		},
+		{
+			"path": "pages/my/myRecord/index",
+			"style": {
+				"navigationBarTitleText": "我的记录"
+			}
+		},
+		{
+			"path": "pages/my/kefu/index",
+			"style": {
+				"navigationBarTitleText": "客服中心"
+			}
+		},
+		{
+			"path": "pages/my/aboutUs/index",
+			"style": {
+				"navigationBarTitleText": "关于我们"
+			}
 		}
 	],
 	"globalStyle": {

+ 69 - 42
pages/index/genHuiBen/index.scss

xqd xqd xqd xqd
@@ -144,20 +144,22 @@
 		.parmasBox{
 			margin-top: 40rpx;
 			padding: 0 30rpx;
-			.titleBox{
-				background: #F0F1F4;
-				background: linear-gradient(90deg,#F0F1F4,#fff);
-				height: 62rpx;
-				width: 60%;
-				border-radius: 32rpx 0rpx 0rpx 0rpx;
-				font-size: 32rpx;
-				font-family: SourceHanSansCN, SourceHanSansCN;
-				font-weight: bold;
-				color: #333333;
-				display: flex;
-				align-items: center;
-				padding-left: 32rpx;
-			}
+				.titleBox{
+					background: #F0F1F4;
+					background: linear-gradient(90deg,#F0F1F4,#fff);
+					height: 62rpx;
+					width: 60%;
+					border-radius: 32rpx 0rpx 0rpx 0rpx;
+					font-size: 32rpx;
+					font-family: SourceHanSansCN, SourceHanSansCN;
+					font-weight: bold;
+					color: #333333;
+					display: flex;
+					align-items: center;
+					padding-left: 32rpx;
+				}
+			
+			
 			.inputBox{
 				width: 100%;
 				min-height: 452rpx;
@@ -169,6 +171,25 @@
 				font-family: PingFang-SC, PingFang-SC;
 				font-weight: 500;
 				// color: #CCCCCC;
+				.selAndTileBox{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					.selBtn{
+						width: 28%;
+						height: 108rpx;
+						background: #FFFFFF;
+						border-radius: 20rpx;
+						font-size: 30rpx;
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: 500;
+						color: #333333;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+					}
+				}
+				
 				.nickname{
 					height: 108rpx;
 					background: #FFFFFF;
@@ -177,42 +198,15 @@
 					align-items: center;
 					justify-content: space-between;
 					padding: 0 24rpx;
+					width: 65%;
 					.nackI{
-						
 					}
 					.arrIcon{
 						width: 12rpx;
 						height: 20rpx;
 					}
 				}
-				.otherBox{
-					margin-top: 24rpx;
-					display: flex;
-					flex-wrap: wrap;
-					justify-content: space-between;
-					.item{
-						height: 108rpx;
-						background: #FFFFFF;
-						border-radius: 20rpx;
-						display: flex;
-						align-items: center;
-						justify-content: space-between;
-						padding: 0 24rpx;
-						width: 45%;
-						margin-bottom: 24rpx;
-						.nackI{
-							
-						}
-						.arrIcon{
-							width: 12rpx;
-							height: 20rpx;
-						}
-					}
-					.item:nth-child(3),.item:nth-child(4){
-						margin-bottom: 0rpx;
-					}
 				
-				}
 			}
 		}
 	}
@@ -317,4 +311,37 @@
 	
 	::v-deep .u-picker__view__column__item{
 		// color: #007AFF!important;
+	}
+	
+	
+	
+	.otherBox{
+		margin-top: 24rpx;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		
+		// background: red;
+		.item{
+			height: 108rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 0 24rpx;
+			width: 45%;
+			margin-bottom: 24rpx;
+			.nackI{
+				
+			}
+			.arrIcon{
+				width: 12rpx;
+				height: 20rpx;
+			}
+		}
+		.item:nth-child(3),.item:nth-child(4){
+			margin-bottom: 0rpx;
+		}
+	
 	}

+ 119 - 36
pages/index/genHuiBen/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -43,12 +43,16 @@
 				故事主角信息
 			</view>
 			<view class="inputBox">
-				<view class="nickname">
-					<input type="text" class="nackI" v-model="formData.nickName" placeholder="请输入昵称" />
-					<image :src="picBase+'arrR2.png'" mode="heightFix" class="arrIcon">
-					</image>
+				<view class="selAndTileBox">
+					<view class="nickname">
+						<input type="text" class="nackI" v-model="formData.nickName" placeholder="请输入昵称" />
+						<image :src="picBase+'arrR2.png'" mode="heightFix" class="arrIcon">
+						</image>
+					</view>
+					<view class="selBtn" @click="show5=true">
+						选择主角
+					</view>
 				</view>
-
 				<view class="otherBox">
 					<view class="item" @click="show=true">
 						<input type="text" class="nackI" disabled v-model="formData.sex" placeholder="选择性别" />
@@ -73,9 +77,6 @@
 				</view>
 			</view>
 		</view>
-
-
-
 		<view class="pos">
 		</view>
 		<view class="btnBox">
@@ -84,7 +85,7 @@
 				</image>
 				客服
 			</view>
-			<view class="right">
+			<view class="right" @click="gen">
 				<view class="top">
 					立即生成
 				</view>
@@ -94,33 +95,19 @@
 			</view>
 		</view>
 
-
-
-		<!-- 性别弹框 -->
-		<!-- <u-popup :show="show" @close="close" @open="open" :round="10">
-			<view class="topBar">
-				<view class="left">
-					取消
-				</view>
-				<view class="mid">
-					昵称选择
-				</view>
-				<view class="right">
-					确定
-				</view>
-			</view>
-			<view class="content">
-				<text>出淤泥而不染,濯清涟而不妖</text>
-			</view>
-		</u-popup> -->
 		<u-picker :show="show" title="性别选择" aColor="#007AFF" :columns="columns" confirmColor="#007AFF"
 			@confirm="confirm1" @cancel="show=false"></u-picker>
-		<u-picker :show="show2" title="年龄选择" aColor="#007AFF" :columns="columns2" confirmColor="#007AFF"
+		<u-picker :show="show2" title="年龄选择" keyName="label" aColor="#007AFF" :columns="columns2" confirmColor="#007AFF"
 			@confirm="confirm2" @cancel="show2=false"></u-picker>
 		<u-picker :show="show3" title="星座选择" aColor="#007AFF" :columns="columns3" confirmColor="#007AFF"
 			@confirm="confirm3" @cancel="show3=false"></u-picker>
 		<u-picker :show="show4" title="班级选择" aColor="#007AFF" :columns="columns4" confirmColor="#007AFF"
 			@confirm="confirm4" @cancel="show4=false"></u-picker>
+
+		<u-picker keyName="name" :show="show5" title="选择主角" aColor="#007AFF" :columns="columns5" confirmColor="#007AFF"
+			@confirm="confirm5" @cancel="show5=false"></u-picker>
+
+
 	</view>
 </template>
 
@@ -128,12 +115,18 @@
 	// import navBar from '@/components/navBar/index.vue'
 
 	import uploadUrl from '@/common/config.js'
+
+	import {
+		getRoleparmas,
+		postTask
+	} from '@/api/index/index.js'
 	export default {
 		// components: {
 		// 	navBar
 		// },
 		data() {
 			return {
+				// roleList:[],
 				picBase: this.$picBase2,
 				fileList1: [],
 
@@ -146,15 +139,19 @@
 				},
 				show: false,
 				columns: [
-					['男', '女']
+					['男', '女']
 				],
 				show2: false,
 				columns2: [
-					['一岁', '两岁']
+					[
+						'1岁',
+						'2岁'
+					]
+
 				],
 				show3: false,
 				columns3: [
-					['金牛', '双子']
+					['白羊座', '金牛', '双子座 ', '巨蟹座', '狮子座', '处女座', '天秤座', '天蝎座', '射手座', '摩羯座', '水瓶座', '双鱼座']
 				],
 				show4: false,
 				columns4: [
@@ -162,12 +159,82 @@
 				],
 
 
+				show5: false,
+				columns5: [
+
+				],
+				roleId: -1
+
+
 			}
 		},
 		onLoad() {
-
+			this.getRoleparmas()
 		},
 		methods: {
+			async gen() {
+
+				// console.log('fileList1',this.fileList1[0].url);
+				// return
+				if (this.fileList1.length == 0) {
+					return this.$toast('请上传图片')
+				}
+				if (!this.formData.nickName) {
+					return this.$toast('请输入昵称')
+				}
+				if (!this.formData.sex) {
+					return this.$toast('请选择性别')
+				}
+				if (!this.formData.age) {
+					return this.$toast('请选择年龄')
+				}
+				if (!this.formData.star) {
+					return this.$toast('请选择星座')
+				}
+				if (!this.formData.class) {
+					return this.$toast('请选择班级')
+				}
+				let p = {}
+				if (this.roleId != -1) {
+					p = {
+						roleId: this.roleId,
+						image: this.fileList1[0].url
+					}
+				} else {
+					p = {
+						image: this.fileList1[0].url,
+						name: this.formData.nickName,
+						sex: this.formData.sex,
+						age: this.formData.age.slice(0, 1),
+						star: this.formData.star,
+						level: this.formData.class,
+					}
+				}
+				let res1 = await postTask(p)
+				console.log('生成任务提交返回值--------2', res1);
+				if (res1.code == 0) {
+					this.$toast('生成任务提交成功')
+					setTimeout(() => {
+						uni.navigateTo({
+							url: '/pages/index/genRes/index?taskId=' + res1.data.id
+						})
+					}, 1500)
+				} else {
+					this.$toast(res1.message)
+				}
+			},
+
+
+			async getRoleparmas() {
+				let res1 = await getRoleparmas()
+				console.log('角色列表返回值--------2', res1);
+				if (res1.code == 0) {
+					this.columns5[0] = res1.data.data
+					// this.chargeList=[]
+				} else {
+					this.$toast(res1.message)
+				}
+			},
 			confirm1(e) {
 				console.log('e', e);
 				this.formData.sex = e.value[0]
@@ -188,6 +255,17 @@
 				this.formData.class = e.value[0]
 				this.show4 = false
 			},
+			confirm5(e) {
+				console.log('e-----5', e.indexs[0], e.value[0]);
+				this.formData.class = e.value[0].level
+				this.formData.nickName = e.value[0].name
+				this.formData.sex = e.value[0].sex
+				this.formData.star = e.value[0].star
+				this.formData.age = e.value[0].age + '岁'
+
+				this.roleId = e.value[0].id
+				this.show5 = false
+			},
 			// 删除图片
 			deletePic(event) {
 				this[`fileList${event.name}`].splice(event.index, 1)
@@ -219,18 +297,23 @@
 				return new Promise((resolve, reject) => {
 					let a = uni.uploadFile({
 						// url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
-						url: uploadUrl.baseUrl + '/api/upload', // 仅为示例,非真实的接口地址
+						url: uploadUrl.baseUrl + '/api/avatar/upload', // 仅为示例,非真实的接口地址
 						filePath: url,
 						name: 'file',
+						header: {
+							'Content-Type': 'multipart/form-data',
+							'Authorization': uni.getStorageSync('token')
+						},
 						formData: {
 							user: 'test',
-							'tag': 'lamp'
+							'tag': 'lamp',
+
 						},
 						success: (res) => {
 
 							console.log('uploadFilePromise返回值', res);
 							setTimeout(() => {
-								resolve(JSON.parse(res.data).file)
+								resolve(JSON.parse(res.data).data.url)
 							}, 1000)
 						}
 					});

+ 13 - 0
pages/index/genRes/index.scss

xqd xqd
@@ -24,6 +24,7 @@
 	 
 	 .contentBox{
 		 min-height: 1004rpx;
+		 
 		 background: linear-gradient(180deg, #DCEBFF 0%, #FFFFFF 100%);
 		 box-shadow: 0rpx 8rpx 16rpx -8rpx rgba(0,71,190,0.4);
 		 border-radius:0 32rpx 32rpx 32rpx;
@@ -137,4 +138,16 @@
 			font-weight: bold;
 			color: #017AFF;
 		}
+	}
+	
+	
+	.loadingBox{
+		// background: red;
+		.loadingImg{
+			// width: 50%;
+			margin-top: 40%;
+			// transform: translateY(-50%);
+			// margin-left: 50%;
+			// transform: translate(-50%,-50%);
+		}
 	}

+ 94 - 13
pages/index/genRes/index.vue

xqd xqd xqd
@@ -1,28 +1,28 @@
 <template>
 	<view class="container">
-		<navBar title="绘本生成" :back="true" color="#333333" background="#FFFFFF" />
+		<navBar title="绘本生成" :back="true" @onBack="onBack" color="#333333" background="#FFFFFF" />
 		<view class="mainBox">
 			<view class="titleBox">
 			</view>
 
 			<view class="contentBox">
 				<view class="bgTag">
-					图图与大橡树的其妙冒险
+					{{huibenRes.title?huibenRes.title:'内容生成中...'}}
 				</view>
 				<view class="storeBox">
-					<image class="img1"
-						src="https://img1.baidu.com/it/u=1890390320,3399874998&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800"
-						mode=""></image>
-					<!-- 		<image class="img2"
-						src="https://img1.baidu.com/it/u=1890390320,3399874998&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800"
-						mode=""></image> -->
-					<text>{{storeTxt}}</text>
+
+					<view class="loadingBox" v-if="showLoading">
+						<image class="loadingImg" mode="widthFix" :src="picBase+'loading.gif'"></image>
+					</view>
+
+					<u-parse v-else :content="huibenRes.pinyin_content"></u-parse>
+
+					<!-- <u-parse :content="content"></u-parse> -->
 				</view>
+
 			</view>
 		</view>
 
-
-
 		<view class="btnBox">
 			<view class="btn b1">
 				下载PDF
@@ -35,6 +35,46 @@
 </template>
 
 <script>
+	export default {
+		data() {
+			return {
+				webviewStyles: {
+					progress: {
+						color: '#FF3333'
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>
+复制代码
+
+</view>
+</view>
+</view>
+
+
+
+<view class="btnBox">
+	<view class="btn b1">
+		下载PDF
+	</view>
+	<view class="btn b2">
+		下载图片
+	</view>
+</view>
+</view>
+</template>
+
+<script>
+	import content from "../../../utils/pinyin.js"
+	import {
+		getGenRes
+	} from '@/api/index/index.js'
 	// import navBar from '@/components/navBar/index.vue'
 	export default {
 		// components: {
@@ -42,18 +82,59 @@
 		// },
 		data() {
 			return {
-				storeTxt: '好好好好红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或红红火火好好好好红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或好好好好红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或红红火好好好好红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或红红火火恍恍惚惚好好好好红红火火恍恍惚惚或或或或或或或或或或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或或或或或或或或或或或'
+				picBase: this.$picBase2,
+				taskId: -1,
+				huibenRes: null,
+				showLoading: true,
+				timer: null,
+				content: ''
 			}
 		},
-		onLoad() {
+		onLoad(o) {
+
+			console.log('content', content);
+			this.content = content.content
+			if (o.taskId) {
+				this.taskId = o.taskId
 
+				console.log('this.taskId', this.taskId);
+
+				this.timer = setInterval(() => {
+					this.getGenRes()
+				}, 1000)
+			}
 		},
 		methods: {
+			onBack() {
+
+				console.log('onBack()-----------');
+				if (this.timer) {
+					clearInterval(this.timer)
+				}
+			},
+			async getGenRes() {
+				let res1 = await getGenRes({
+					id: this.taskId
+				})
+				console.log('查询生成结果返回值--------2', res1);
+				if (res1.code == 0) {
 
+					if (res1.data.state == 6) {
+						this.huibenRes = res1.data
+						this.content = `${res1.data.pinyin_content}`
+						this.showLoading = false
+						clearInterval(this.timer)
+					}
+					// this.chargeList=[]
+				} else {
+					this.$toast(res1.message)
+				}
+			},
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
 	@import "./index.scss";
+	@import "./util.scss";
 </style>

+ 56 - 0
pages/index/genRes/util.scss

xqd
@@ -0,0 +1,56 @@
+ ::v-deep .pinyin{
+            font-size:2rem;
+			color:red!important;
+        }
+       ::v-deep .pinyin span{
+            display:inline-block;
+			float:left;
+			text-align: center;
+			line-height: 30rpx;
+			
+			color: red!important;
+        }
+       ::v-deep .pinyin sup{
+            font-size:13rpx;
+			display:block;
+			padding: 0 5rpx;
+			line-height: 20rpx;
+			color: white!important;
+        }
+       ::v-deep sup{
+            font-size: 24rpx!important;
+            line-height: 24rpx!important;
+            border-radius: 5rpx;
+            // background-color: white !important;
+            color: red!important;
+
+        }
+		
+		::v-deep ._span{
+			color: black;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			margin-left: 0!important;
+			margin: 10rpx 8rpx;
+		}
+		::v-deep ._span:first-child{
+	
+			// margin-left:2rem!important;
+			margin-left:90rpx!important;
+		}
+		
+		::v-deep ._{
+			display: flex;
+			flex-wrap: wrap;
+			text-align: justify;
+			// justify-content: space-between;
+		}
+		
+		::v-deep ._img{
+			height: 600rpx!important;
+			display: block!important;
+			width: 100%!important;
+			border-radius: 30rpx;
+		}

+ 26 - 6
pages/index/index.vue

xqd xqd xqd
@@ -40,11 +40,11 @@
 					</image>
 				</view>
 				<view class="list">
-					<view class="item" v-for="(item,index) in list1">
-						<image class="pic" :src="item" mode="widthFix">
+					<view class="item" v-for="(item,index) in jingxuanList">
+						<image class="pic" :src="item.sd_image.replace('localhost:8000',baseUrl)" mode="widthFix">
 						</image>
 						<view class="des">
-							图图与大橡树的其妙冒险
+							{{item.title}}
 						</view>
 					</view>
 				</view>
@@ -62,15 +62,19 @@
 
 <script>
 	import {
-		getValidateCode
+		getJingxuan
 	} from '@/api/index/index.js'
 	import PrivacyPopup from "@/components/privacyPopup/index.vue";
+	import uploadUrl from '@/common/config.js'
 	export default {
 		components: {
 			PrivacyPopup
 		},
 		data() {
 			return {
+				baseUrl:uploadUrl.baseUrl,
+				jingxuanList:[],
+				
 				navImg: require('@/static/other/logo.png'),
 				showPop: false,
 				urlTitle: '',
@@ -94,21 +98,37 @@
 						"text": "我的"
 					}
 				],
-				routePath: ''
+				routePath: '',
 			}
 		},
 
-		onLoad() {
+		onLoad(o) {
+			
+			
+			
 			uni.hideTabBar()
 			let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
 			let curRoute = routes[routes.length - 1].route // 获取当前页面路由,也就是最后一个打开的页面路由
 			this.routePath = curRoute;
 			console.log('routePath', this.routePath);
+			this.getJingxuan()
 		},
 		onShow() {
 			this.handlePrivate()
+			
 		},
 		methods: {
+			async getJingxuan() {
+						let res1 = await getJingxuan()
+						console.log('首页精选返回值--------2', res1);
+						if (res1.code == 0) {
+							this.jingxuanList=res1.data.data
+							// this.chargeList=[]
+						} else {
+						this.$toast(res1.message)
+						}
+					},
+			
 			toGen() {
 				uni.navigateTo({
 					url: '/pages/index/genRes/index'

+ 9 - 0
pages/my/aboutUs/index.scss

xqd
@@ -0,0 +1,9 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .topBox{
+	
+		}
+	}

+ 33 - 0
pages/my/aboutUs/index.vue

xqd
@@ -0,0 +1,33 @@
+<template>
+	<view class="container">
+		<navBar title="关于我们" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="topBox">
+			关于我们
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 284 - 0
pages/my/cash/index.scss

xqd
@@ -0,0 +1,284 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+.box {
+    padding-top: 24rpx;
+	
+background: #F7F8FB;
+min-height: 100vh;
+    .addpd {
+        padding: 0 30rpx;
+    }
+
+    .top {
+      height: 96rpx;
+      background: #FFFFFF;
+      border-radius: 32rpx;
+	  padding-left: 24rpx;
+	  padding-right: 24rpx;
+   
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+      
+
+        .left {
+          
+font-size: 32rpx;
+font-family: PingFang-SC, PingFang-SC;
+font-weight: 500;
+color: #080F18;
+        }
+
+        .right {
+            display: flex;
+            align-items: center;
+            font-size: 28rpx;
+            font-family: PingFang-SC, PingFang-SC;
+            font-weight: bold;
+            color: #333333;
+
+            .icon {
+                width: 34rpx;
+                height: 32rpx;
+                margin-right: 12rpx;
+            }
+			.icon_arrR{
+				width: 12rpx;
+				height: 21rpx;
+				margin-left:16rpx;
+			}
+        }
+    }
+
+    .money {
+        display: flex;
+        flex-direction: column;
+        // height: 248rpx;
+        background: #FFFFFF;
+        border-radius: 32rpx;
+        margin-top: 24rpx;
+
+        padding: 32rpx 28rpx 48rpx 28rpx;
+
+        .label {
+            font-size: 32rpx;
+            font-family: PingFang-SC, PingFang-SC;
+            font-weight: 500;
+            color: #080F18;
+            margin-bottom: 60rpx;
+        }
+
+        .bot {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+
+
+            border-bottom: 2rpx solid #ECECEC;
+            // padding-bottom: 6rpx;
+
+            .left {
+                display: flex;
+                align-items: center;
+
+                .danwei {
+                    font-size: 52rpx;
+                    font-family: PingFang-SC, PingFang-SC;
+                    font-weight: bold;
+                    color: #080F18;
+                }
+
+                input {
+                    font-size: 32rpx;
+                    font-family: PingFang-SC, PingFang-SC;
+                    font-weight: bold;
+                    color: #080F18;
+                    width: 42vw;
+                }
+            }
+
+            .tips {
+                font-size: 24rpx;
+                font-family: PingFang-SC, PingFang-SC;
+                font-weight: 500;
+                color: #999999;
+            }
+        }
+
+
+
+    }
+
+    .info {
+        background: #FFFFFF;
+        border-radius: 20rpx;
+
+        margin-top: 24rpx;
+        padding-left: 24rpx;
+        padding-right: 24rpx;
+
+        .item {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            height: 100rpx;
+
+
+            .label {
+                font-size: 28rpx;
+                font-family: PingFangSC, PingFang SC;
+                font-weight: 400;
+                color: #333333;
+            }
+
+            input {
+				font-size: 28rpx;
+                text-align: right;
+                width: 70vw;
+            }
+        }
+
+        .bb {
+            border-bottom: 1rpx solid #E6E7E8;
+        }
+    }
+
+    .botTxt {
+        margin-top: 26rpx;
+        display: flex;
+        align-items: start;
+
+        .icon {
+            width: 24rpx;
+            height: 24rpx;
+            margin-right: 8rpx;
+            margin-top: 8rpx;
+        }
+
+        .right {
+            .item {
+                display: flex;
+                align-items: center;
+                font-size: 24rpx;
+                font-family: PingFang-SC, PingFang-SC;
+                font-weight: 400;
+              color: #007AFF;
+                line-height: 36rpx;
+
+            }
+        }
+    }
+}
+
+
+
+.quxiao {
+    font-size: 32rpx;
+    font-family: PingFang-SC, PingFang-SC;
+    font-weight: 500;
+    color: #999999;
+    margin-left: 28rpx;
+}
+
+.queren {
+    font-size: 32rpx;
+    font-family: PingFang-SC, PingFang-SC;
+    font-weight: 500;
+    color: #01C1C4;
+    margin-right: 28rpx;
+}
+
+.content {
+    padding: 130rpx 28rpx;
+
+    .item {
+        height: 96rpx;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+
+    .bord {
+        border-top: 1rpx solid #CECFD1;
+        border-bottom: 1rpx solid #CECFD1;
+    }
+
+    .active {
+        font-weight: bold;
+        color: #01C1C4;
+        border-top: 1rpx solid #CECFD1;
+        border-bottom: 1rpx solid #CECFD1;
+    }
+}
+
+
+.myRoot{
+    border-radius: 20rpx 20rpx 0rpx 0rpx!important;
+    box-shadow: 0rpx -10rpx 32rpx 0rpx rgba(0, 0, 0, 0.04)!important;
+    // position: relative!important;
+    // z-index: 999999!important;
+    position: fixed!important;
+    bottom: 0!important;
+    width: 100%;
+}
+.myAc {
+    font-weight: bold;
+    color: #01C1C4 !important;
+    // border-top: 1rpx solid #CECFD1;
+    // border-bottom: 1rpx solid #CECFD1;
+}
+
+.van-picker__confirm {
+    font-size: 32rpx !important;
+    font-family: PingFang-SC, PingFang-SC !important;
+    font-weight: 500 !important;
+    color: #01C1C4 !important;
+}
+
+.van-picker__title {
+    font-size: 32rpx !important;
+    font-family: PingFangSC, PingFang SC !important;
+    font-weight: 500 !important;
+    color: #080F18 !important;
+}
+	}
+	
+	
+	
+	
+	.btnBox{
+		height: 176rpx;
+		background: #FFFFFF;
+		// background:red;
+		box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		padding-top: 32rpx;
+		.btn{
+			height: 96rpx;
+			background: linear-gradient(132deg, #0298FF 0%, #017AFF 100%);
+			box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,122,255,0.2);
+			border-radius: 54rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+	}
+	
+	::v-deep .u-picker{
+		border-radius: 30rpx 30rpx 0 0;
+	}
+	::v-deep .u-popup__content{
+		border-radius: 30rpx 30rpx 0 0!important;
+	}

+ 152 - 0
pages/my/cash/index.vue

xqd
@@ -0,0 +1,152 @@
+<template>
+	<view class="container">
+		<navBar title="提现" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class='box'>
+			<view class='addpd'>
+				<view class='top'>
+					<view class='left'>
+						提现方式
+					</view>
+					<view class='right' @click="handleOpen">
+						<image class='icon' mode=""
+							:src="currWayIndex[0]==0?'../../../static/other/wechat.png':currWayIndex[0]==1?'../../../static/other/zhifubao.png':'../../../static/other/yhk.png'" />
+						{{currWay}}
+						<image class='icon_arrR' mode="" src="../../../static/other/c_arrR.png" />
+					</view>
+				</view>
+
+
+				<view class='money'>
+					<view class='label'>
+						提现金额
+					</view>
+					<view class='bot'>
+						<view class='left'>
+							<view class='danwei'>
+								¥
+							</view>
+							<input class="" placeholder="请输入提现金额" v-model="formData.money">
+							</input>
+						</view>
+						<view class='tips'>
+							可提现余额¥{{availMoney}}
+						</view>
+					</view>
+				</view>
+
+
+				<view class='info'>
+					<view class='item bb'>
+						<view class='label'>
+							名字
+						</view>
+						<input class="" placeholder="名字" v-model="formData.name">
+						</input>
+					</view>
+
+					<view class='item bb' v-if="currWay=='银行卡'">
+						<view class='label'>
+							开户行
+						</view>
+						<input class="" placeholder="请输入开户行名称" v-model="formData.bankName">
+						</input>
+					</view>
+
+					<view class='item'>
+						<view class='label'>
+							账号
+						</view>
+						<input class="" placeholder="账号" v-model="formData.account">
+						</input>
+					</view>
+				</view>
+
+
+				<view class='botTxt'>
+					<!-- <image class='icon' mode="" src="{{picBaseUrl+'winfo.png'}}"/> -->
+					<image class='icon' mode="" src="../../../static/other/wechat.png" />
+
+					<view class='right'>
+						<view class='item' @click="toCashRecord">
+							提现记录
+						</view>
+						<!-- <view class='item'>
+							收取提现金额的{{tipInfo.percent}}手续费
+						</view>
+						<view class='item'>
+							如有疑问,请及时联系客服
+						</view> -->
+					</view>
+				</view>
+
+			</view>
+		</view>
+		<u-picker :show="showPopup" :columns="wayList" title="提现方式" aColor="#007AFF" :defaultIndex="currWayIndex"
+			:closeOnClickOverlay="true" @confirm="handleConfirm" @cancel="showPopup=false"></u-picker>
+
+		<view class="btnBox">
+			<view class="btn" @click="post">
+				提交申请
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				wayList: [
+					[
+						'微信余额',
+						'支付宝',
+						'银行卡'
+					]
+				],
+
+				currWay: '微信余额',
+				currWayIndex: [0],
+				availMoney: 0,
+				formData: {
+					money: '',
+					name: '',
+					account: '',
+					bankName: ''
+				},
+				showPopup: false,
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			handleConfirm(e) {
+				console.log('e', e, );
+				this.currWay = e.value[0]
+				this.currWayIndex = e.indexs
+				this.showPopup = false
+			},
+			handleOpen() {
+				this.showPopup = true
+			},
+			post() {
+				console.log('提现参数', this.formData, this.currWayIndex);
+			},
+			toCashRecord() {
+				uni.navigateTo({
+					url: '/pages/my/cashRecord/index'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 76 - 0
pages/my/cashRecord/index.scss

xqd
@@ -0,0 +1,76 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+		min-height: 100vh;
+		background:#F7F8FB ;
+.list{
+	padding: 24rpx 30rpx;
+	.item{
+		// height: 242rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+		border-radius: 32rpx;
+		padding: 40rpx 24rpx;
+		margin-bottom: 24rpx;
+		.top{
+			display: flex;
+			justify-content: space-between;
+			padding-bottom: 24rpx;
+			border-bottom: 1rpx solid #E6E7E8;
+			.name{
+				font-size: 28rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.money{
+				font-size: 32rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+		.bot{
+			padding-top: 24rpx;
+			
+			.refuseBox{
+				// height: 112rpx;
+				background: #F4F4F4;
+				border-radius: 12rpx;
+				padding: 18rpx 24rpx;
+				
+				font-size: 26rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: 500;
+				color: #333333;
+				
+				margin-bottom: 32rpx;
+			}
+			.item1{
+				display: flex;
+				justify-content: space-between;
+				.left{
+					font-size: 26rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #333333;
+				}
+				.right{
+					font-size: 26rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #EF8116;
+				}
+				.rb{
+					color: #333333;
+				}
+			}
+			.item1:first-child{
+				margin-bottom: 32rpx;
+			}
+		}
+	}
+}
+	}

+ 64 - 0
pages/my/cashRecord/index.vue

xqd
@@ -0,0 +1,64 @@
+<template>
+	<view class="container">
+		<navBar title="提现记录" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="list">
+			<view class="item" v-for="i in 4">
+				<view class="top">
+					<view class="name">
+						提现至微信
+					</view>
+					<view class="money">
+						¥100
+					</view>
+				</view>
+				<view class="bot">
+					<view class="item1">
+						<view class="left">
+							申请状态
+						</view>
+						<view class="right">
+							申请中
+						</view>
+					</view>
+					
+					<view class="refuseBox">
+						拒绝原因:这是一个拒绝提现,具体为什么拒绝,账号有问题
+					</view>
+					<view class="item1">
+						<view class="left">
+							申请时间
+						</view>
+						<view class="right rb">
+							2023-10-20 12:21
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 6 - 1
pages/my/charge/index.vue

xqd xqd
@@ -18,7 +18,7 @@
 					</view>
 				</view>
 
-				<view class="btn">
+				<view class="btn" @click="toRecord">
 					记录
 				</view>
 			</view>
@@ -72,6 +72,11 @@
 		methods: {
 			selTaocan(i) {
 				this.curIndex = i
+			},
+			toRecord(){
+				uni.navigateTo({
+					url: '/pages/my/myRecord/index?tabIndex=0'
+				})
 			}
 		}
 	}

+ 1 - 1
pages/my/huiBen_record - 副本/index.vue

xqd
@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<navBar title="" :navImg="navImg" :back="false" color="#333333" background="#FFFFFF" />
+		<navBar title="推荐奖励" :back="true" color="#333333" background="#FFFFFF" />
 
 		<view class="topBox">
 			hbjl

+ 89 - 6
pages/my/index.vue

xqd xqd xqd xqd xqd xqd
@@ -6,11 +6,14 @@
 
 		<view class="topBox">
 			<view class="userBox">
-				<image class="avatar" @click="toUserInfo" :src="picBase+'edit.png'" mode=""></image>
-				<view class="nickname" @click="toUserInfo">
-					刘晓艺
+				<image class="avatar" @click="toUserInfo" :src="!userInfo?picBase+'defaultAvatar.png':userInfo.avatar" mode=""></image>
+				<view class="nickname" @click="toUserInfo" v-if="userInfo">
+				{{!userInfo.name?'默认用户':userInfo.name}}
 				</view>
-				<image class="icon" @click="toUserInfo" :src="picBase+'edit.png'" mode=""></image>
+				<view class="nickname" @click="login" v-else>
+					立即登录
+				</view>
+				<image class="icon" @click="toUserInfo" :src="picBase+'edit.png'" mode="" v-if="userInfo"></image>
 			</view>
 
 			<view class="infoBox">
@@ -40,7 +43,7 @@
 					</view>
 				</view>
 
-				<view class="item">
+				<view class="item" @click="toTuguangDashi">
 					<image class="icon" :src="picBase+'edit.png'" mode=""></image>
 					<view class="right">
 						<view class="t1">
@@ -54,7 +57,7 @@
 			</view>
 
 			<view class="serListBox">
-				<view class="item" v-for="(item,index) in serList">
+				<view class="item" v-for="(item,index) in serList" @click="toPage(index)">
 					<view class="left">
 						<image class="icon" src="../../static/other/edit.png" mode=""></image>
 						{{item.name}}
@@ -67,6 +70,10 @@
 </template>
 
 <script>
+	import {
+		login,
+		getUserInfo
+	} from '@/api/index/index.js'
 	// import navBar from '@/components/navBar/index.vue'
 	export default {
 		// components: {
@@ -74,6 +81,9 @@
 		// },
 		data() {
 			return {
+				userInfo:null,
+				
+				
 				picBase: this.$picBase,
 				navImg: require('@/static/other/logo.png'),
 				tabBarList: [{
@@ -119,8 +129,81 @@
 			this.routePath = curRoute;
 			console.log('routePath', this.routePath);
 
+		},
+		async onShow(){
+			
+			if(uni.getStorageSync('token')){
+				this.getUserInfo()
+			}
+			
 		},
 		methods: {
+			async getUserInfo() {
+				let res1 = await getUserInfo()
+				console.log('用户信息返回值--------', res1);
+				if (res1.code == 0) {
+					uni.setStorageSync('userInfo', res1.data)
+					this.userInfo=res1.data
+				} else {
+				this.$toast(res1.message)
+				}
+			},
+			login() {
+				let _this = this
+				uni.showLoading({
+					title: '登录中...'
+				})
+				uni.login({
+					provider: 'weixin',
+					success: async (res) => {
+						if (res.errMsg == 'login:ok') {
+							let parmas = {
+								code: res.code,
+							}
+							console.log('登录所传的parmas参数:', parmas);
+							let res1 = await login(parmas)
+			
+							console.log('登录返回值--------', res1);
+							if (res1.code == 0) {
+								uni.hideLoading()
+								uni.setStorageSync('token', res1.data.token)
+								uni.setStorageSync('userInfo', res1.data.user_info)
+								_this.userInfo=res1.data.user_info
+								_this.$toast('登录成功')
+								// setTimeout(() => {
+								// 	uni.reLaunch({
+								// 		url: '/pages/my'
+								// 	})
+								// }, 1500)
+							} else {
+								uni.hideLoading()
+							_this.$toast(res1.message)
+							}
+						}
+					}
+				});
+			},
+			toPage(i) {
+				if (i == 0) {
+					uni.navigateTo({
+						url: '/pages/my/jiangli/index'
+					})
+				} else if (i == 1) {
+					uni.navigateTo({
+						url: '/pages/my/myRecord/index?tabIndex=1'
+					})
+				}
+			},
+			toTuguangDashi() {
+				uni.navigateTo({
+					url: '/pages/my/tuiguangDashi/index'
+				})
+			},
+			toTuguangCenter() {
+				uni.navigateTo({
+					url: '/pages/my/pubCenter/index'
+				})
+			},
 			onTabBar(e) {
 				console.log('e------------', e);
 				uni.switchTab({

+ 229 - 0
pages/my/jiangli/index.scss

xqd
@@ -0,0 +1,229 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .outerBox{
+	 // background: skyblue;
+	padding-top: 84rpx;
+
+	min-height: 100vh;
+	.addPd{
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		.countBox{
+			
+			height: 290rpx;
+			background:#0489F9;
+			// border: 2rpx solid;
+			
+			border-top: 2rpx solid #FBFDFE;
+			// border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 2 2;
+			
+			border-radius: 30rpx;
+			padding-top: 48rpx;
+			padding-left: 102rpx;
+			padding-right: 102rpx;
+			
+			display: flex;
+			justify-content: space-between;
+			.left,.right{
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				
+				
+				.num{
+					font-size: 48rpx;
+					font-family: SourceHanSansCN, SourceHanSansCN;
+					font-weight: 800;
+					color: #FFFFFF;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					height: 118rpx;
+					width: 160rpx;
+		            background: linear-gradient(180deg, rgba(128,236,255,0.45) 0%, rgba(255,255,255,0.02) 100%);
+					border-radius: 50rpx 50rpx 0 0;
+					
+					border: 3rpx solid #fff;
+					border-bottom: none;
+					// border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 3 3;
+					
+					
+					// background: linear-gradient(180deg, rgba(128,236,255,0.45) 0%, rgba(255,255,255,0.02) 100%);
+					// border-radius: 50rpx;
+					// opacity: 0.9;
+					// border: 3rpx solid;
+					// border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 3 3;
+					// backdrop-filter: blur(10px);
+				}
+				.tip{
+					font-size: 30rpx;
+					font-family: SourceHanSansCN, SourceHanSansCN;
+					font-weight: 500;
+					color: #007AFF;
+					width: 216rpx;
+					height: 54rpx;
+					background: linear-gradient(135deg, rgba(166,234,255,0.8) 0%, rgba(78,220,255,0.8) 100%);
+					border-radius: 27rpx 0rpx 27rpx 27rpx;
+					border: 1rpx solid #7FDBFF;
+					backdrop-filter: blur(10px);
+					
+					display: flex;
+					align-items: center;
+					justify-content: center;
+				}
+			}
+		}
+	}
+	
+	
+	.mianContent{
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		padding-top: 64rpx;
+		min-height: 1116rpx;
+		background: #FFFFFF;
+		// background: skyblue;
+		box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+		border-radius: 40rpx 40rpx 0 0;
+		.tipBox{
+			// height: 182rpx;
+			background: #F0F1F4;
+			border-radius: 8rpx;
+			padding-top: 12rpx;
+			padding-bottom: 40rpx;
+			padding-left: 20rpx;
+			padding-right: 20rpx;
+			.top{
+				display: flex;
+				align-items: center;
+				font-size: 28rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+				.tag{
+					width: 78rpx;
+					height: 34rpx;
+					background: linear-gradient(132deg, #4FDDFF 0%, #5ECFFF 49%, #017AFF 100%);
+					filter: blur(0.5px);
+					
+					font-size: 32rpx;
+					font-family: DIN, DIN;
+					font-weight: normal;
+					color: #080F18;
+					font-style: italic;
+					margin-right: 12rpx;
+					
+					display: flex;
+					align-items: center;
+					// justify-content: center;
+					text-align: center;
+				}
+			}
+			.bot{
+				font-size: 26rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: 400;
+				color: #333333;
+				margin-top: 22rpx;
+			}
+		}
+		.titleBox{
+			margin-top: 48rpx;
+			background: #F0F1F4;
+			background: linear-gradient(90deg,#F0F1F4,#fff);
+			height: 62rpx;
+			width: 60%;
+			border-radius: 32rpx 0rpx 0rpx 0rpx;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			padding-left: 32rpx;
+		}
+		.list{
+			display: flex;
+			flex-direction: column;
+			padding-top: 34rpx;
+			
+			.item{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin-bottom: 40rpx;
+				.left{
+					display: flex;
+					align-items: center;
+					.avatar{
+						width: 64rpx;
+						height: 64rpx;
+						border-radius: 50%;
+						margin-right: 32rpx;
+					}
+					.des{
+						.name{
+							font-size: 28rpx;
+							font-family: PingFang-SC, PingFang-SC;
+							font-weight: bold;
+							color: #333333;
+						}
+						.time{
+							font-size: 24rpx;
+							font-family: PingFang-SC, PingFang-SC;
+							font-weight: 500;
+							color: #999999;
+							margin-top: 16rpx;
+						}
+					}
+				}
+				.right{
+					font-size: 28rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: bold;
+					color: #333333;
+				}
+			
+			}
+			
+		}
+		
+	}
+	
+	
+	
+		}
+	}
+	
+	
+	
+	.btnBox{
+		height: 176rpx;
+		background: #FFFFFF;
+		// background:red;
+		box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		padding-top: 32rpx;
+		.btn{
+			height: 96rpx;
+			background: linear-gradient(132deg, #0298FF 0%, #017AFF 100%);
+			box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,122,255,0.2);
+			border-radius: 54rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+	}

+ 113 - 0
pages/my/jiangli/index.vue

xqd
@@ -0,0 +1,113 @@
+<template>
+	<view class="container">
+		<navBar title="推荐奖励" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="outerBox">
+			<view class="addPd">
+				<view class="countBox">
+					<view class="left">
+						<view class="num">
+{{jiangli.currentDiamondCount}}
+						</view>
+						<view class="tip">
+							剩余次数
+						</view>
+					</view>
+					<view class="right">
+						<view class="num">
+							{{jiangli.shareDiamondCount}}
+						</view>
+						<view class="tip">
+							推荐奖励次数
+						</view>
+					</view>
+				</view>
+			</view>
+
+
+			<view class="mianContent">
+				<view class="tipBox">
+					<view class="top">
+						<view class="tag">
+							TIPS
+						</view>
+						推荐奖励说明
+					</view>
+					<view class="bot">
+						推荐新用户,新用户成功注册后,将奖励推荐次数5次。推荐越多,奖励将会越多哦!
+					</view>
+				</view>
+
+				<view class="titleBox">
+					推荐奖励明细
+				</view>
+				<view class="list">
+					<view class="item" v-for="(item,index) in jiangli.data">
+						<view class="left">
+							<image :src="item.user.avatar?item.user.avatar:picBase+'defaultAvatar.png'" mode="" class="avatar"></image>
+							<view class="des">
+								<view class="name">
+									{{item.user.name}}
+								</view>
+								<view class="time">
+									{{item.updated_at}}
+								</view>
+							</view>
+						</view>
+						<view class="right">
+							奖励次数:{{item.diamond}}
+						</view>
+					</view>
+				</view>
+
+
+			</view>
+		</view>
+		<view class="btnBox">
+			<view class="btn" @click="toTuijian">
+				立即推荐
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getTuijian,
+	} from '@/api/index/index.js'
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				picBase: this.$picBase2,
+			jiangli:null,
+			}
+		},
+		onLoad() {
+		this.getTuijian()
+		},
+		methods: {
+			toTuijian(){
+				uni.navigateTo({
+					url:'/'
+				})
+			},
+async getTuijian() {
+			let res1 = await getTuijian()
+			console.log('推荐奖励返回值--------2', res1);
+			if (res1.code == 0) {
+				this.jiangli=res1.data
+			} else {
+			this.$toast(res1.message)
+			}
+		},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 117 - 0
pages/my/kefu/index - 副本.scss

xqd
@@ -0,0 +1,117 @@
+	view {
+		box-sizing: border-box;
+	}
+	::v-deep .u-button{
+		// background: red!important;
+		width: 130rpx!important;
+		height: 52rpx!important;
+		background: #017AFF!important;
+		box-shadow: 0rpx 4rpx 8rpx -4rpx #C2F4F6!important;
+		border-radius: 26rpx!important;
+		display: flex!important;
+		justify-content: center!important;
+		align-items: center!important;
+		
+		font-size: 26rpx!important;
+		font-family: PingFang-SC, PingFang-SC!important;
+		font-weight: 500!important;
+		color: #FFFFFF!important;
+	}
+	::v-deep .u-button__text{
+		font-size: 26rpx!important;
+		font-family: PingFang-SC, PingFang-SC!important;
+		font-weight: 500!important;
+		color: #FFFFFF!important;
+	}
+ 
+	.container {
+.navBox {
+    display: flex;
+    align-items: center;
+}
+
+.box {
+    // min-height: 100vh;
+    // background: linear-gradient(to right, #D2EEF1 0%, #DEE8F6 35%, #DEF4F5 100%);
+	background: #0180FB;
+    padding-top: 44rpx;
+
+    .list {
+        // width: 750rpx;
+        min-height: 1424rpx;
+        background: #FFFFFF;
+        border-radius: 32rpx 32rpx 0rpx 0rpx;
+        padding-top: 30rpx;
+
+        overflow-y: scroll;
+
+        .item {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 30rpx 30rpx;
+
+            .left {
+                display: flex;
+                flex-direction: column;
+
+                //    align-items: flex-start;
+                //    justify-content: start;
+                .top {
+                    font-size: 28rpx;
+                    font-family: PingFangSC, PingFang SC;
+                    font-weight: 600;
+                    color: #000000;
+                   
+
+                    .icon {
+                        width: 26rpx;
+                        height: 26rpx;
+                        margin-right: 6rpx;
+                    }
+
+                }
+
+                .bot {
+                    font-size: 28rpx;
+                    font-family: PingFang-SC, PingFang-SC;
+                    font-weight: 500;
+                    color: #000000;
+
+                    margin-top: 24rpx;
+                }
+            }
+
+            .right {
+                display: flex;
+                align-items: center;
+                .btnBox {
+                    // width: 116rpx;
+                    width: 130rpx;
+                    height: 52rpx;
+                    background: #017AFF;
+                    box-shadow: 0rpx 4rpx 8rpx -4rpx #C2F4F6;
+                    border-radius: 26rpx;
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+
+                    font-size: 26rpx;
+                    font-family: PingFang-SC, PingFang-SC;
+                    font-weight: 500;
+                    color: #FFFFFF;
+                }
+
+                .conBtn{
+                    // background: red;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    border: none;
+                    width: 130rpx;
+                }
+            }
+        }
+    }
+}
+	}

+ 74 - 0
pages/my/kefu/index - 副本.vue

xqd
@@ -0,0 +1,74 @@
+<template>
+	<view class="container">
+		<navBar title="客服中心" :back="true" color="#333333" background="#FFFFFF" />
+		<view class='box' >
+		<view class='list'>
+		<view class='item'>
+		<view class='left'>
+		<view class='top'>
+		 <image class='icon' mode="" src="../../../static/tabbar/my.png">
+		    </image>
+		    手机号码
+		</view>
+		   <view class='bot'>
+		  {{phone}}
+		   </view>
+		</view>
+		<view class='right'>
+		<view class='btnBox'  style="background:#017AFF;" @click="call(phone)" >
+		拨号
+		</view>
+		</view>
+		</view>
+		
+		
+		
+		<view class='item'>
+		<view class='left'>
+		<view class='top'>
+		 <image class='icon' mode="" src="../../../static/tabbar/my.png">
+		    </image>
+		    微信官方客服
+		</view>
+		</view>
+		<view class='right'>
+		<!-- <view class='btnBox'  style="background:#017AFF;">
+		联系
+		</view> -->
+		<u-button customStyle="{'font-size': 26rpx}" class="btnBox" text="联系" open-type="contact"></u-button>
+		
+		<!-- <van-button custom-class="btnBox conBtn"  round type="default" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">联系</van-button> -->
+		</view>
+		</view>
+		</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+			phone:'15609038522'
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+ call(e){
+    wx.makePhoneCall({
+      phoneNumber: e //仅为示例,并非真实的电话号码
+    })
+  },
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 68 - 0
pages/my/kefu/index.scss

xqd
@@ -0,0 +1,68 @@
+	view {
+		box-sizing: border-box;
+	}
+	
+ 
+	.container {
+
+	}
+	
+	page {
+		background: #F6F7FB;
+	}
+	
+	.kefu {
+		background: #ffffff;
+		padding: 38rpx 30rpx;
+		display: flex;
+		align-items: center;
+		font-weight: bold;
+		// margin-top: 38rpx;
+		font-size: 32rpx;
+		border-bottom: 1px solid #ededed;
+	
+		.dian {
+			width: 20rpx;
+			height: 20rpx;
+			border-radius: 50%;
+			background: #207CF7;
+			margin-right: 16rpx;
+		}
+	}
+	
+	.qrcode_path {
+		width: 100%;
+		// height: 800rpx;
+		padding: 30rpx;
+		background: #ffffff;
+		display: flex;
+		justify-content: center;
+	
+		image {
+			width: 92%;
+			height: 100%;
+	
+		}
+	}
+	
+	.sds {
+		background: #ffffff;
+		padding: 0 30rpx;
+	}
+	
+	.yijian {
+		width: 150rpx;
+		margin-left: 30rpx;
+	}
+	
+	.server {
+		display: flex;
+		justify-content: center;
+	
+		margin: 60rpx 0;
+	
+		image {
+			width: 100px;
+			height: 100px;
+		}
+	}

+ 82 - 0
pages/my/kefu/index.vue

xqd
@@ -0,0 +1,82 @@
+<template>
+	<view class="container">
+		<navBar title="客服中心" :back="true" color="#333333" background="#FFFFFF" />
+		
+		
+		<view class="server">
+			<image src="../../../static/other/yhk.png" mode=""></image>
+		</view>
+		<view v-if="phone" class="kefu">
+			<view class="dian"></view>
+			<view class="">客服手机号:{{phone}}</view>
+			<view class="yijian"><u-button @click="call(phone)" color="#207CF7" size="mini" type="primary" shape="circle"
+					text="一键拨号"></u-button></view>
+		</view>
+		<view v-if="weiChat" class="kefu">
+			<view class="dian"></view>
+			<view>客服微信号:{{weiChat}}</view>
+			<view class="yijian"><u-button @click="fhuzhi" color="#207CF7" size="mini" type="primary" shape="circle"
+					text="一键复制"></u-button></view>
+		
+		</view>
+		<!-- <view class="sds">dfhsfsdh25</view> -->
+		<block v-if="code">
+			<view class="kefu">
+				<view class="dian"></view>
+				<view class="">客服二维码</view>
+			</view>
+			<view class="qrcode_path">
+				<image @click="viewsave(code)" :src="code" mode="widthFix"></image>
+				<!-- <image src="@/static/images/head.jpg" mode="widthFix"></image> -->
+			</view>
+		</block>
+		
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+			phone:'15609038522',
+			weiChat:'qweqwe',
+			code:'https://img0.baidu.com/it/u=3232582821,3516640051&fm=253&fmt=auto&app=138&f=JPEG?w=625&h=500'
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			viewsave(e) {
+				uni.previewImage({
+					urls: [e],
+					current: 0
+				})
+			},
+			fhuzhi() {
+				var that = this;
+				uni.setClipboardData({
+					data: that.weiChat,
+					success: function() {
+						uni.showToast({
+							title: '微信号已复制'
+						})
+					}
+				});
+			},
+ call(e){
+    wx.makePhoneCall({
+      phoneNumber: e //仅为示例,并非真实的电话号码
+    })
+  },
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 96 - 0
pages/my/myRecord/index.scss

xqd
@@ -0,0 +1,96 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .mainBox{
+background:#F7F8FB ;
+
+
+.list{
+	overflow-y: scroll;
+	overflow-x: hidden;
+	min-height: 100vh;
+	padding: 30rpx;
+	padding-top: 110rpx;
+	.item{
+		// height: 154rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+		border-radius: 32rpx;
+		
+		padding: 40rpx 32rpx;
+		position: relative;
+		margin-bottom: 24rpx;
+		.water{
+			width: 114rpx;
+			height: 120rpx;
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			z-index: 0;
+			
+			border-radius:0 0 0 32rpx;
+		}
+		.top{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			position: relative;
+			z-index: 1;
+			.name{
+				font-size: 28rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.money{
+				font-size: 32rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #333333;
+				padding-right: 18rpx;
+			}
+		}
+		.bot{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 14rpx;
+			position: relative;
+			z-index: 1;
+			.count{
+				font-size: 24rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: 500;
+				color: #666666;
+				
+				width: 110rpx;
+				height: 32rpx;
+				background: #C5E1FF;
+				border-radius: 0rpx 14rpx 0rpx 14rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+			}
+			.time{
+				font-size: 24rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+}
+		}
+	}
+	
+	::v-deep .u-tabs{
+		background: #FFFFFF!important;
+		box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0,0,0,0.05)!important;
+		border-radius: 0rpx 0rpx 32rpx 32rpx!important;
+		
+		position: fixed;
+		width: 100%;
+		z-index: 3;
+	}

+ 149 - 0
pages/my/myRecord/index.vue

xqd
@@ -0,0 +1,149 @@
+<template>
+	<view class="container">
+		<navBar title="我的记录" :back="true" color="#333333" background="#FFFFFF" />
+<view class="mainBox">
+	 <!-- <u-sticky bgColor="#fff"> -->
+	   <u-tabs :current="tabIndex" :list="list1" :scrollable="false" @click="tabclick" lineColor="#007AFF" :activeStyle="activeStyle" :itemStyle="itemStyle" lineWidth="24"></u-tabs>
+	  <!-- </u-sticky> -->
+	
+<view class="list" v-if="tabIndex==0">
+	
+	<view class="empty" style="margin-top: 50%;" v-if="chargeList.length==0">
+		<u-empty
+		        mode="data"		
+		/>
+	</view>
+	<view class="item" v-for="(item,index) in chargeList" v-else>
+		<!-- <image src="../../../static/other/icon2.png" mode="" class="water"></image> -->
+		<view class="top">
+			<view class="name">
+				{{item.config_data.title}}
+			</view>
+			<view class="money">
+				¥{{item.amount}}
+			</view>
+		</view>
+		<view class="bot">
+			<view class="count">
+				次数+{{item.diamond}}
+			</view>
+			<view class="time">
+				{{item.created_at}}
+			</view>
+		</view>
+	</view>
+</view>
+
+
+
+<view class="list" v-else>
+	<view class="empty" style="margin-top: 50%;" v-if="cusumerList.length==0">
+		<u-empty
+		        mode="data"		
+		/>
+	</view>
+	
+	<view class="item" v-for="(item,index) in cusumerList" v-else>
+		<!-- <image src="../../../static/other/icon2.png" mode="" class="water"></image> -->
+		<view class="top">
+			<view class="name">
+				{{item.nickname}}
+			</view>
+			<view class="money">
+				剩余{{item.surplus_diamond}}
+			</view>
+		</view>
+		<view class="bot">
+			<view class="count">
+				次数-{{item.plot}}
+			</view>
+			<view class="time">
+				{{item.created_at}}
+			</view>
+		</view>
+	</view>
+</view>
+</view>
+	
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	
+	import {
+		getChargeRecord,
+		getConsumerRecord
+	} from '@/api/index/index.js'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				tabIndex:0,
+				activeStyle:{
+					color:'#007AFF',
+					'font-size': '28rpx',
+					'font-family': 'PingFang-SC, PingFang-SC',
+					'font-weight': 'bold'
+				},
+				itemStyle:{
+					width:'50%',
+					// background:'#fff',
+					display: 'flex',
+					'justify-content': 'center',
+					'align-items': 'center',
+					height: '80rpx'
+				},
+list1: [{
+                    name: '充值记录',
+                }, {
+                    name: '消费记录',
+                }],
+				chargeList:[],
+				cusumerList:[]
+			}
+		},
+		onLoad(o) {
+if(o.tabIndex){
+	this.tabIndex=Number(o.tabIndex)
+}
+
+this.getChargeRecord()
+this.getConsumerRecord()
+		},
+		methods: {
+			
+			async getChargeRecord() {
+						let res1 = await getChargeRecord()
+						console.log('充值记录返回值--------2', res1);
+						if (res1.code == 0) {
+							this.chargeList=res1.data.data
+							// this.chargeList=[]
+						} else {
+						this.$toast(res1.message)
+						}
+					},
+
+async getConsumerRecord() {
+						let res1 = await getConsumerRecord()
+						console.log('消耗记录返回值--------2', res1);
+						if (res1.code == 0) {
+							this.cusumerList=res1.data.data
+							// this.cusumerList=[]
+						} else {
+						this.$toast(res1.message)
+						}
+					},
+tabclick(e){
+	console.log(e,e.index);
+	this.tabIndex=e.index
+}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 173 - 0
pages/my/pubCenter/index.scss

xqd
@@ -0,0 +1,173 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .outerBox{
+	background: #0C2036;
+	min-height: 100vh;
+	padding: 0 30rpx;
+	padding-top: 108rpx;
+	.userBox{
+		font-size: 28rpx;
+		font-family: SourceHanSansCN, SourceHanSansCN;
+		font-weight: bold;
+		color: #FFFFFF;
+		
+		display: flex;
+		align-items: center;
+		
+		
+		
+		.avatar{
+			width: 48rpx;
+			height: 48rpx;
+			border-radius: 50%;
+			margin-right: 16rpx;
+		}
+		.flag{
+			font-size: 20rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #4E2A1E;
+			
+			width: 128rpx;
+			height: 28rpx;
+			background: linear-gradient(90deg, #FFEDDD 0%, #C7977A 100%);
+			border: 1rpx solid;
+			border-image: linear-gradient(251deg, rgba(255, 255, 255, 0.32), rgba(255, 249, 237, 0.4)) 1 1;
+			
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			margin-left: 16rpx;
+			.hg_i{
+				width: 23rpx;
+				height: 17rpx;
+				margin-left: 4rpx;
+			}
+		}
+	}
+	
+	
+	.card{
+		height: 296rpx;
+		background: #2A79CF;
+		border-radius: 20rpx;
+		
+		position: relative;
+		
+		margin-top: 32rpx;
+		padding: 48rpx;
+		
+		.ljx_i{
+			width: 236rpx;
+			height: 236rpx;
+			
+			position: absolute;
+			top:-102rpx;
+			right: 46rpx;
+			
+		}
+		
+		.labelBox{
+			font-size: 48rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+			
+			.eye{
+				width: 34rpx;
+				height: 10rpx;
+				margin-left: 18rpx;
+			}
+			margin-bottom: 36rpx;
+		}
+		
+		.shouRu{
+			font-size: 28rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: 400;
+			color: #FFFFFF;
+			display: flex;
+			align-items: center;
+			
+			.left{
+				margin-right: 66rpx;
+				display: flex;
+				align-items: center;
+			}
+			.right{
+				display: flex;
+				align-items: center;
+			}
+		}
+	}
+	.titleM{
+		font-size: 30rpx;
+		font-family: SourceHanSansCN, SourceHanSansCN;
+		font-weight: bold;
+		color: #fff;
+		margin-top: 34rpx;
+		text-align: center;
+	}
+	.list{
+		display: flex;
+		flex-wrap: wrap;
+		// justify-content: space-between;
+		// padding:0 68rpx;
+		margin-top: 36rpx;
+		.item{
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			
+			font-size: 26rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: 500;
+			color: #FFFFFF;
+			width: 104rpx;
+			margin: 0 62rpx;
+			margin-bottom: 48rpx;
+			
+			
+			.iconBox{
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 96rpx;
+				height: 96rpx;
+				background: rgba(14,100,235,0.2);
+				border-radius: 50%;
+				margin-bottom: 20rpx;
+				
+				.icon{
+					width: 46rpx;
+					height: 40rpx;
+				}
+			}
+		}
+	}
+	
+	.bLogo{
+		font-size: 24rpx;
+		font-family: DOUYUFont;
+		color: #007AFF;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		margin-top: 284rpx;
+		
+		.logo{
+			width: 80rpx;
+			height: 72rpx;
+			margin-bottom: 18rpx;
+		}
+	}
+	
+	
+		}
+	}

+ 138 - 0
pages/my/pubCenter/index.vue

xqd
@@ -0,0 +1,138 @@
+<template>
+	<view class="container">
+		<navBar title="推广中心" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="outerBox">
+			<view class="userBox">
+				<image class="avatar" :src="!userInfo?picBase+'defaultAvatar.png':userInfo.avatar" mode=""></image>
+				{{userInfo.name}}
+				<view class="flag">
+					推广大使
+					<image src="../../../static/other/huangguan.png" mode="" class="hg_i"></image>
+				</view>
+			</view>
+
+			<view class="card">
+				<image src="../../../static/other/liujiaoxing.png" mode="widthFix" class="ljx_i"></image>
+
+				<view class="labelBox">
+					推广收入.
+					<image :src="state?eyeSrc:eyeSrc2" mode="widthFix" class="eye" @click="handleShow"></image>
+				</view>
+
+				<view class="shouRu">
+					<view class="left">
+						累计收入:{{state?'¥ 999':'******'}}
+					</view>
+					<view class="right">
+						可提现收入: {{state?'¥ 999':'******'}}
+					</view>
+				</view>
+			</view>
+
+
+			<view class="titleM">
+				推广大使权益
+			</view>
+			<view class="list">
+				<view class="item" v-for="(item,index) in serList" @click="toPage(index)">
+					<view class="iconBox">
+						<image :src="item.icon" mode="widthFix" class="icon"></image>
+					</view>
+					{{item.txt}}
+				</view>
+			</view>
+			<view class="bLogo">
+				<image src="../../../static/other/biyan.png" mode="" class="logo"></image>
+				短腿鹤伴读
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	import {
+		getUserInfo
+	} from '@/api/index/index.js'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				picBase: this.$picBase2,
+				userInfo:null,
+				state: true,
+				eyeSrc: '../../../static/other/zyan.png',
+				eyeSrc2: '../../../static/other/biyan.png',
+				serList: [{
+						txt: '推广团队',
+						icon: '../../../static/other/icon1.png'
+					},
+					{
+						txt: '佣金明细',
+						icon: '../../../static/other/icon2.png'
+					},
+					{
+						txt: '佣金提现',
+						icon: '../../../static/other/icon3.png'
+					},
+					{
+						txt: '提现明细',
+						icon: '../../../static/other/icon4.png'
+					},
+					{
+						txt: '分享海报',
+						icon: '../../../static/other/icon5.png'
+					},
+				]
+			}
+		},
+		onLoad() {
+this.getUserInfo()
+		},
+		methods: {
+			async getUserInfo() {
+				let res1 = await getUserInfo()
+				console.log('用户信息返回值--------', res1);
+				if (res1.code == 0) {
+					uni.setStorageSync('userInfo', res1.data)
+					this.userInfo=res1.data
+				} else {
+				this.$toast(res1.message)
+				}
+			},
+			handleShow() {
+				this.state = !this.state
+			},
+			toPage(i) {
+				if (i == 0) {
+					uni.navigateTo({
+						url: '/pages/my/team/index'
+					})
+				} else if (i == 1) {
+					uni.navigateTo({
+						url: '/pages/my/yongjinDetail/index'
+					})
+				} else if (i == 2) {
+					uni.navigateTo({
+						url: '/pages/my/cash/index'
+					})
+				} else if (i == 3) {
+					uni.navigateTo({
+						url: '/pages/my/cashRecord/index'
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/my/tuiguangHaibao/index'
+					})
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 156 - 0
pages/my/team/index.scss

xqd
@@ -0,0 +1,156 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .topBox{
+	height: 140rpx;
+	background: #55ACF9;
+	padding-top: 24rpx;
+	padding-left: 30rpx;
+	padding-right: 30rpx;
+	.bar{
+		height: 64rpx;
+		background: #E2F0FF;
+		border-radius: 32rpx;
+		display: flex;
+		align-items: center;
+		padding-left: 20rpx;
+		font-size: 28rpx;
+		font-family: PingFang-SC, PingFang-SC;
+		font-weight: bold;
+		color: #333333;
+		.tag{
+			width: 78rpx;
+			height: 34rpx;
+			background: linear-gradient(132deg, #4FDDFF 0%, #5ECFFF 49%, #017AFF 100%);
+			filter: blur(0.5px);
+			display: flex;
+			align-items: center;
+			// justify-content: center;
+			font-style: italic;
+			margin-right: 12rpx;
+		}
+	}
+	
+	
+		}
+		.mianContent{
+			padding-left: 30rpx;
+			padding-right: 30rpx;
+			padding-top: 48rpx;
+			min-height:calc(100vh - 140rpx);
+			background: #FFFFFF;
+			// background: skyblue;
+			box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+			border-radius: 40rpx 40rpx 0 0;
+			position: relative;
+			margin-top: -30rpx;
+			.sanjiaoxing{
+				position:absolute;
+				top: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				 width: 0;
+				    height: 0;
+				    border-left: 20rpx solid transparent;
+				    border-right: 20rpx solid transparent;
+				    border-top: 20rpx solid #56AAFB; 
+			}
+			
+			.list{
+				display: flex;
+				flex-direction: column;
+				padding-top: 34rpx;
+				// background: red;
+				height: 100%;
+				
+				.item{
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					margin-bottom:24rpx;
+					
+					height: 176rpx;
+					background: linear-gradient(287deg, #E5F1FF 0%, #FFFFFF 100%);
+					box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+					border-radius: 32rpx;
+					border: 2rpx solid rgba(102, 178, 255, 1);
+					// border-image: linear-gradient(90deg, rgba(102, 178, 255, 1), rgba(255, 255, 255, 0)) 2 2;
+					// border-image-repeat: round;
+					// border-image-slice: 1; 
+					padding-left: 32rpx;
+					padding-right: 32rpx;
+					position: relative;
+					
+					.water2{
+						width: 114rpx;
+						height: 126rpx;
+						position: absolute;
+						bottom: 0;
+						left: 0;
+						border-radius:0 0 0 32rpx;
+						z-index: 0;
+					}
+					.left{
+						display: flex;
+						align-items: center;
+						position: relative;
+						z-index: 1;
+						.avatar{
+							width: 80rpx;
+							height: 80rpx;
+							border-radius: 50%;
+							margin-right: 20rpx;
+						}
+						.des{
+							.name{
+								font-size: 28rpx;
+								font-family: PingFang-SC, PingFang-SC;
+								font-weight: bold;
+								color: #333333;
+							}
+							.time{
+								font-size: 24rpx;
+								font-family: PingFang-SC, PingFang-SC;
+								font-weight: 500;
+								color: #999999;
+								margin-top: 14rpx;
+							}
+						}
+					}
+					.right{
+						display: flex;
+						flex-direction:column;
+						align-items: flex-end;
+					.money{
+						font-size: 32rpx;
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: bold;
+						color: #333333;
+						
+					}
+					.count{
+						width: 144rpx;
+						height: 32rpx;
+						background: linear-gradient(135deg, #A6EAFF 0%, #4EDCFF 100%);
+						border-radius: 0rpx 14rpx 0rpx 14rpx;
+						
+						font-size: 24rpx;
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: 500;
+						color: #007AFF;
+						
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						margin-top: 16rpx;
+					}
+					}
+				
+				}
+				
+			}
+			
+		}
+	}

+ 69 - 0
pages/my/team/index.vue

xqd
@@ -0,0 +1,69 @@
+<template>
+	<view class="container">
+		<navBar title="推广团队" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="topBox">
+			<view class="bar">
+				<view class="tag">
+					TIPS
+				</view>
+				团队人数 235人
+			</view>
+		</view>
+
+		<view class="mianContent">
+			<view class="sanjiaoxing">
+			</view>
+			<view class="list">
+				<view class="item" v-for="i in 6">
+					<!-- <image src="../../../static/tabbar/my.png" mode="" class="water2"></image> -->
+					<view class="left">
+						<image src="../../../static/tabbar/my.png" mode="" class="avatar"></image>
+						<view class="des">
+							<view class="name">
+								达布溜
+							</view>
+							<view class="time">
+								2023-10-20 12:21
+							</view>
+						</view>
+					</view>
+					<view class="right">
+						<view class="money">
+							¥2398
+						</view>
+						<view class="count">
+							充值次数5
+						</view>
+					</view>
+				</view>
+			</view>
+
+
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 173 - 0
pages/my/tuiguangDashi/index.scss

xqd
@@ -0,0 +1,173 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .topBox{
+	 height: 500rpx;
+	background: #A5CDFF;
+	padding-top: 40rpx;
+	padding-left: 30rpx;
+	padding-right: 30rpx;
+	padding-bottom: 16rpx;
+	
+	.top{
+		height: 146rpx;
+		background:#016BF1 ;
+		border-radius: 30rpx 30rpx 0 0;
+		border: 1rpx solid #fff;
+		border-bottom: none;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		.en{
+			font-size: 28rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: 400;
+			color: #5CAAFF;
+		}
+		.zh{
+			font-size: 52rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #D6EAFF;
+		}
+	}
+	.bot{
+		font-size: 30rpx;
+		font-family: SourceHanSansCN, SourceHanSansCN;
+		font-weight: 500;
+		color: #333333;
+		
+		height: 270rpx;
+		background: rgba(255,255,255,0.5);
+		box-shadow: 0rpx 2rpx 8rpx -4rpx rgba(1,122,255,0.2);
+		backdrop-filter: blur(10px);
+		border-radius:0 0  30rpx 30rpx ;
+		
+		padding-top: 32rpx;
+		padding-left: 40rpx;
+		padding-right: 40rpx;
+	}
+		}
+		
+		.form{
+			margin-top: -20rpx;
+			min-height: 800rpx;
+			background: #FFFFFF;
+			// background: red;
+			box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+			
+			border-radius: 30rpx 30rpx 0 0;
+			position: relative;
+			
+		padding-top: 68rpx;
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+			
+			.sanjiaoxing{
+				position:absolute;
+				top: 0;
+				left: 50%;
+				transform: translateX(-50%);
+				 width: 0;
+				    height: 0;
+				    border-left: 20rpx solid transparent;
+				    border-right: 20rpx solid transparent;
+				    border-top: 20rpx solid #B3D4FF; 
+			}
+			.titleBox{
+				// margin-top: 48rpx;
+				background: #F0F1F4;
+				background: linear-gradient(90deg,#F0F1F4,#fff);
+				height: 62rpx;
+				width: 60%;
+				border-radius: 32rpx 0rpx 0rpx 0rpx;
+				font-size: 32rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: bold;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				padding-left: 32rpx;
+			}
+			
+			.inputbox{
+				height: 320rpx;
+				background: #F0F1F4;
+				border-radius: 0rpx 32rpx 32rpx 32rpx;
+				padding: 40rpx 32rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				align-items: center;
+				
+				.name,.phone{
+					box-sizing: border-box;
+					height: 108rpx;
+					background: #FFFFFF;
+					border-radius: 20rpx;
+					width: 100%;
+					padding-left: 24rpx;
+					font-size: 30rpx;
+					
+				}
+				.name{
+					
+				}
+				.phone{
+					
+				}
+			}
+			.tipBox{
+				font-size: 24rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: 400;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				margin-top: 24rpx;
+				
+				.info{
+					width: 24rpx;
+					height: 24rpx;
+					margin-right: 8rpx;
+				}
+				text{
+					color: #017AFF;
+					margin-left: 10rpx;
+				}
+			}
+		}
+		
+	}
+	
+	
+	
+	.btnBox{
+		height: 176rpx;
+		background: #FFFFFF;
+		// background:red;
+		box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		padding-top: 32rpx;
+		.btn{
+			height: 96rpx;
+			background: linear-gradient(132deg, #0298FF 0%, #017AFF 100%);
+			box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,122,255,0.2);
+			border-radius: 54rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+	}

+ 72 - 0
pages/my/tuiguangDashi/index.vue

xqd
@@ -0,0 +1,72 @@
+<template>
+	<view class="container">
+		<navBar title="推广大使" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="topBox">
+			<view class="top">
+				<view class="en">
+					PROMOTION AND RECRUI
+				</view>
+				<view class="zh">
+					推广大使招募
+				</view>
+			</view>
+			<view class="bot">
+				入驻说明,加入分销商需要沟通买399年卡会员,联系客服开通
+			</view>
+		</view>
+
+		<view class="form">
+			<view class="sanjiaoxing">
+			</view>
+			<view class="titleBox">
+				推荐奖励明细
+			</view>
+			<view class="inputbox">
+				<input type="text" class="name" placeholder="输入姓名" v-model="formData.name" />
+				<input type="text" class="phone" placeholder="输入手机号" v-model="formData.phone" />
+			</view>
+			<view class="tipBox">
+				<image src="../../../static/tabbar/my.png" mode="" class="info"></image>
+				我已阅读并同意以上规则以及
+				<text> 推广员功能服务协议</text>
+			</view>
+		</view>
+
+
+		<view class="btnBox">
+			<view class="btn" @click="apply">
+				申请成为推广大使
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				formData: {
+					name: '',
+					phone: ''
+				}
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			apply() {
+				console.log('form', this.formData);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 49 - 0
pages/my/tuiguangHaibao/index.scss

xqd
@@ -0,0 +1,49 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+.haobaoBox{
+	height: 50vh;
+	display: flex;
+	justify-content: center;
+	padding-top: 56rpx;
+}
+	}
+	
+	
+	
+	
+	.btnBox{
+		height: 176rpx;
+		background: #FFFFFF;
+		// background:red;
+		box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		padding-top: 32rpx;
+		
+		z-index: 9999999999999999999999999999999;
+		.btn{
+			height: 96rpx;
+			background: linear-gradient(132deg, #0298FF 0%, #017AFF 100%);
+			box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,122,255,0.2);
+			border-radius: 54rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+	}
+	
+	.haibao{
+		border-radius: 30rpx;
+		height: 1168rpx;
+	}

+ 260 - 0
pages/my/tuiguangHaibao/index.vue

xqd
@@ -0,0 +1,260 @@
+<template>
+	<view class="container">
+		<navBar title="推广海报" :back="true" color="#333333" background="#FFFFFF" />
+		<!-- <view class="test" @click="createPoster">
+			生成
+		</view> -->
+
+		<view class="haobaoBox" v-if="showPoster">
+			<wike-painter style="display: none;" :board="posterObj" @done="posterSuccess" ref="painter"></wike-painter>
+		<image :src="haibaoUrl" mode="" class="haibao"></image>
+		</view>
+
+
+		<view class="btnBox">
+			<view class="btn" @click="toSave">
+				保存到手机相册
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+				picBase: this.$picBase2,
+				
+				
+				isLoading: true,
+				tobheight: 45,
+				// platform: this.$platform.get(),
+				showAuthModal: true,
+				empty: false,
+
+				pages: 1,
+				currentTab: 0,
+
+				hasAuth: true, //是否有权限
+				commissionLv: {
+					name: '合伙人'
+				},
+				//合伙人等级
+				commissionWallet: null, //合伙人钱包
+				agentFrom: null, //是否显示我的资料
+				showLv: true,
+
+				loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
+				currentPage: 1,
+				lastPage: 1,
+				logMap: {
+					system: this.$IMG_URL + '/imgs/commission/commission_base_notice.png',
+					admin: this.$IMG_URL + '/imgs/commission/commission_base_avatar.png'
+				},
+				showTerm: true, //条件弹窗
+				showGoodsTerm: false, //商品条件
+				showMoneyTerm: false, //金额条件
+				goodsTermList: [],
+				moneyTermNum: 0,
+				authNotice: {},
+
+
+				showPoster: false,
+				posterObj: {},
+				posterfff: '您好,我是AI语言模型,可以帮助你做很多事情。例如:\n- 回答你的问题\n- 给你提供某些信息\n- 帮你搜索网页\n- 聊天和闲聊\n- 玩一些小游戏\n- 计算数学题\n- 翻译语言\n- 生成文本\n等等.....\n如果你有任何问题或需要帮助,请随时告诉我。',
+				spmplatform: 0,
+				is_examine: 1,
+				commission_price: 0,
+				// info: {},
+				posterheight: 0,
+				poster_bg_img_path: '',
+				commission_alias: '',
+
+
+
+				info: {
+					commission_alias: "",
+					commission_price: "0",
+					extract_min_price: "100",
+					first: "50",
+					instructions: "满100可以提现,48小时到账",
+					intro: "<p><span style=\"color: rgb(102, 102, 102); font-family: \" helvetica=\"\" pingfang=\"\" font-size:=\"\" text-align:=\"\" text-wrap:=\"\" background-color:=\"\">入驻说明,加入分销商需要沟通买399年卡会员.</span></p><p><font color=\"#666666\">联系客服开通!</font></p>",
+					is_commission: "1",
+					is_examine: "2",
+					is_ranking: "1",
+					is_self_buy: "2",
+					is_self_buy_commission: "2",
+					level: "2",
+					poster_bg_height: "1334",
+					poster_bg_img: "1671",
+					poster_bg_img_filename: "分销海报.jpg",
+					poster_bg_img_path: "https://nywhcm.com/addons/wike_aging/public/static/storage/20230625/74f8be11f3f174e63576a777c71d644b.jpg",
+					poster_bg_width: "750",
+					poster_qrcode_width: "135",
+					poster_qrcode_width_filename: "tmp_c1537e2c3beb0a3d14f87a63da8b84cc548ea7871f918188.jpg",
+					poster_qrcode_width_path: "https://nywhcm.com/addons/wike_aging/public/static/storage/20230322/17859fbc20087bd430f224905f5d9370.jpg",
+					poster_qrcode_x: "514",
+					poster_qrcode_y: "1174",
+					second: "10",
+					third: "0"
+				},
+				haibaoUrl:''
+			}
+		},
+		onLoad() {
+			this.createPoster()
+		},
+		methods: {
+			toSave() {
+				uni.showLoading({
+					title: '海报生成中'
+				});
+				this.$refs.painter.canvasToTempFilePathSync({
+					// 在nvue里是jpeg
+					fileType: 'jpg',
+					quality: 1,
+					success: res => {
+						// #ifdef MP-WEIXIN
+						wx.showShareImageMenu({
+							path: res.tempFilePath
+						})
+						// this.showPoster = false;
+						uni.hideLoading();
+						// #endif
+					}
+				});
+			},
+			getdownload(e) {
+				return new Promise((resolve, reject) => {
+					uni.request({
+						url: e,
+						method: 'GET',
+						responseType: 'arraybuffer',
+						success: ress => {
+							let base64 = wx.arrayBufferToBase64(ress.data);
+							base64 = 'data:image/jpeg;base64,' + base64
+							resolve(base64);
+						},
+						fail: (e) => {
+							resolve('fail');
+						}
+					})
+				});
+			},
+			posterSuccess() {
+				uni.hideLoading();
+			},
+			test() {
+				console.log('1212232323---------', this.commissionLv);
+			},
+			revertUrl(){
+				this.$refs.painter.canvasToTempFilePathSync({
+					// 在nvue里是jpeg
+					fileType: 'jpg',
+					quality: 1,
+					success: res => {
+						this.haibaoUrl=res.tempFilePath
+						console.log('this.haibaoUrl',this.haibaoUrl);
+					}
+				});
+			},
+
+			async createPoster(e) {
+
+				let that = this;
+				let httpsurl = '';
+				uni.showLoading({
+					title: '海报渲染中'
+				});
+
+				console.log('1212232323---------', that.info);
+
+				if (that.info.poster_bg_img_path.indexOf("https") < 0) {
+					httpsurl = await that.getdownload(that.info.poster_bg_img_path.replace("http:", "https:"));
+				} else {
+					httpsurl = await that.getdownload(that.info.poster_bg_img_path);
+				}
+				if (httpsurl == 'fail') {
+					uni.hideLoading();
+					uni.showToast({
+						title: '生成失败',
+						icon: 'none'
+					})
+					return;
+				}
+				let proportionally = this.info.poster_bg_width / uni.$u.sys().windowWidth;
+				(this.posterObj = {
+					width: (this.info.poster_bg_width / proportionally) + 'px',
+					height: (this.info.poster_bg_height / proportionally) + 'px',
+					background: '#fff',
+					borderRadius: '16rpx',
+
+					views: [{
+							src: httpsurl,
+							type: "image",
+							css: {
+								width: (this.info.poster_bg_width / proportionally) + 'px',
+								height: (this.info.poster_bg_height / proportionally) + 'px',
+							}
+						},
+						{
+							type: 'view',
+							css: {
+								left: (this.info.poster_qrcode_x / proportionally) + 'px',
+								top: (this.info.poster_qrcode_y / proportionally) + 'px',
+								position: 'fixed',
+
+							},
+							// #ifdef H5
+							views: [{
+								type: 'qrcode',
+								text: this.qrcode,
+								css: {
+									width: (this.info.poster_qrcode_width / proportionally) + 'px',
+									height: (this.info.poster_qrcode_width / proportionally) + 'px',
+									background: '#fff'
+								}
+							}],
+							// #endif
+							// #ifdef MP-WEIXIN
+							views: [{
+								type: 'image',
+								src: this.qrcode,
+								css: {
+									width: (this.info.poster_qrcode_width / proportionally) + 'px',
+									height: (this.info.poster_qrcode_width / proportionally) + 'px',
+									background: '#fff'
+								}
+							}]
+							// #endif
+						}
+					]
+				}),
+				(
+				this.showPoster = true,
+				// this.revertUrl()
+				
+				setTimeout(()=>{
+					that.$refs.painter.canvasToTempFilePathSync({
+						// 在nvue里是jpeg
+						fileType: 'jpg',
+						quality: 1,
+						success: res => {
+							that.haibaoUrl=res.tempFilePath
+							console.log('that.haibaoUrl',that.haibaoUrl);
+						}
+					})
+				},1000)
+				);
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

+ 65 - 19
pages/my/userInfo/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd
@@ -19,7 +19,7 @@
 						昵称
 					</view>
 					<view class="right">
-						<input type="text" placeholder="请输入昵称" v-model="userInfo.nackname" />
+						<input type="text" placeholder="请输入昵称" v-model="userInfo.name" />
 						<image :src="picBase+'edit2.png'" mode="heightFix" class="editIcon"></image>
 					</view>
 				</view>
@@ -28,7 +28,7 @@
 						手机号
 					</view>
 					<view class="right">
-						<input type="number" placeholder="请输入手机号" v-model="userInfo.phone" />
+						<input type="number" placeholder="请输入手机号" v-model="userInfo.mobile" />
 						<image :src="picBase+'edit2.png'" mode="heightFix" class="editIcon"></image>
 					</view>
 				</view>
@@ -37,14 +37,14 @@
 						ID号
 					</view>
 					<view class="right">
-						{{userInfo.id}}
+						{{'00000000'+userInfo.id}}
 					</view>
 				</view>
 			</view>
 
 
 			<view class="btnBox">
-				<view class="btn b1">
+				<view class="btn b1" @click="updateUserInfo">
 					保存修改
 				</view>
 				<view class="btn b2" @click="logoOut">
@@ -57,7 +57,10 @@
 </template>
 
 <script>
-	// import navBar from '@/components/navBar/index.vue'
+	import {
+		getUserInfo,
+		updateUserInfo
+	} from '@/api/index/index.js'
 	import uploadUrl from '@/common/config.js'
 	export default {
 		// components: {
@@ -66,21 +69,62 @@
 		data() {
 			return {
 				picBase: this.$picBase2,
-				userInfo: {
-					// avatar: this.$picBase2 + 'logo.png',
-					avatar: '',
-					nackname: '海绵宝',
-					phone: '10928309109',
-					id: '237429302'
-				},
-				mode: 0
+				// userInfo: {
+				// 	// avatar: this.$picBase2 + 'logo.png',
+				// 	avatar: '',
+				// 	nackname: '海绵宝',
+				// 	phone: '10928309109',
+				// 	id: '237429302'
+				// },
+				mode: 0,
+				
+				userInfo:null,
 			}
 		},
 		onLoad() {
-
+				this.getUserInfo()
 		},
 		methods: {
-
+			async updateUserInfo() {
+				let phoneReg = /^[1][3,4,5,7,8,9][0-9]{9}$/
+				if(!this.userInfo.avatar){
+					return this.$toast('请上传头像')
+				}
+				if(!this.userInfo.name){
+					return this.$toast('请输入昵称')
+				}
+				if (!this.userInfo.mobile ||!phoneReg.test(this.userInfo.mobile)) {
+					return this.$toast('请输入合法的手机号')
+				}
+				
+				let p={
+					name:this.userInfo.name,
+					avatar:this.userInfo.avatar,
+					mobile:this.userInfo.mobile
+				}
+				this.userInfo
+				console.log('更新用户信息参数--------', p);
+				let res1 = await updateUserInfo(p)
+				console.log('更新用户信息返回值--------', res1);
+				if (res1.code == 0) {
+					this.$toast('保存成功')
+					setTimeout(()=>{
+						uni.navigateBack()
+					},1500)
+				} else {
+				this.$toast(res1.message)
+				}
+			},
+		async getUserInfo() {
+			let res1 = await getUserInfo()
+			console.log('用户信息返回值--------2', res1);
+			if (res1.code == 0) {
+				uni.setStorageSync('userInfo', res1.data)
+				this.userInfo=res1.data
+			} else {
+			this.$toast(res1.message)
+			}
+		},
 			logoOut() {
 				uni.showModal({
 					title: '提示',
@@ -89,6 +133,7 @@
 					success: function(res) {
 						if (res.confirm) {
 							uni.removeStorageSync('token')
+							uni.removeStorageSync('userInfo')
 							uni.reLaunch({
 								url: '/pages/my/index'
 							})
@@ -114,11 +159,12 @@
 				console.log('upImg的file', file)
 				let _this = this
 				uni.uploadFile({
-					url: uploadUrl.baseUrl + '/api/upload',
+					url: uploadUrl.baseUrl + '/api/avatar/upload',
 					filePath: file,
 					name: 'file',
 					header: {
-						'Content-Type': 'multipart/form-data'
+						'Content-Type': 'multipart/form-data',
+						'Authorization':uni.getStorageSync('token')
 					},
 					formData: {
 						'fileType': 'images',
@@ -128,8 +174,8 @@
 					success: function(uploadRes) {
 						let result = JSON.parse(uploadRes.data)
 						if (result.code == 0) {
-							_this.userInfo.avatar = result.data.file
-							console.log('上传后的头像url地址', result.data.file)
+							_this.userInfo.avatar = result.data.url
+							console.log('上传后的头像url地址', result.data.url)
 						}
 					},
 					fail: function(err) {

+ 212 - 0
pages/my/yongjinDetail/index.scss

xqd
@@ -0,0 +1,212 @@
+	view {
+		box-sizing: border-box;
+	}
+ 
+	.container {
+ .bgBox{
+	background: #F7F8FB;
+	min-height: 100vh;
+	.topBox{
+		padding-top: 48rpx;
+		padding-left: 50rpx;
+		padding-right: 50rpx;
+		.userBox{
+			font-size: 28rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #FFFFFF;
+			
+			display: flex;
+			align-items: center;
+			.avatar{
+				width: 48rpx;
+				height: 48rpx;
+				border-radius: 50%;
+				margin-right: 16rpx;
+			}
+			.flag{
+				font-size: 20rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: bold;
+				color: #4E2A1E;
+				
+				width: 128rpx;
+				height: 28rpx;
+				background: linear-gradient(90deg, #FFEDDD 0%, #C7977A 100%);
+				border: 1rpx solid;
+				border-image: linear-gradient(251deg, rgba(255, 255, 255, 0.32), rgba(255, 249, 237, 0.4)) 1 1;
+				
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				
+				margin-left: 16rpx;
+				.hg_i{
+					width: 23rpx;
+					height: 17rpx;
+					margin-left: 4rpx;
+				}
+			}
+		}
+		
+		.cardTop{
+			height: 186rpx;
+			background: linear-gradient(360deg, #EAEEFD 0%, #F6FAFF 100%);
+			border-radius: 16rpx 16rpx 0 0;
+			padding-top: 40rpx;
+			padding-left: 28rpx;
+			display: flex;
+			
+			position: relative;
+			margin-top: 32rpx;
+			.water_coin{
+				height: 126rpx;
+				width: 272rpx;
+				position: absolute;
+				right: 0;
+				bottom: 0;
+				z-index: 0;
+			}
+			.left{
+				
+			}
+			.right{
+				margin-left: 172rpx;
+				position: relative;
+				z-index: 1;
+			}
+			.txt{
+				font-size: 24rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: 400;
+				color: #666666;
+				margin-bottom: 18rpx;
+			}
+			.money{
+				font-size: 48rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: 800;
+				color: #333333;
+			}
+		}
+		
+	}
+	.botContent{
+		padding:0 30rpx;
+		.cardBot{
+			// width: 690rpx;
+			height: 176rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+			border-radius: 0rpx 0rpx 32rpx 32rpx;
+			padding-top: 32rpx;
+			padding-left: 24rpx;
+			padding-right: 24rpx;
+			.btn{
+				height: 96rpx;
+				background: linear-gradient(132deg, #0298FF 0%, #017AFF 100%);
+				box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,122,255,0.2);
+				border-radius: 54rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				font-size: 32rpx;
+				font-family: SourceHanSansCN, SourceHanSansCN;
+				font-weight: bold;
+				color: #FFFFFF;
+			}
+		}
+		.titleBox{
+			margin-top: 50rpx;
+			background: #F0F1F4;
+			background: linear-gradient(270deg, #F7F8FB 0%, #F0F1F4 100%);
+			height: 62rpx;
+			width: 60%;
+			border-radius: 32rpx 0rpx 0rpx 0rpx;
+			font-size: 32rpx;
+			font-family: SourceHanSansCN, SourceHanSansCN;
+			font-weight: bold;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			padding-left: 32rpx;
+		}
+		.list{
+			margin-top: 32rpx;
+			.item{
+				// height: 206rpx;
+				background: #FFFFFF;
+				box-shadow: 0rpx 4rpx 16rpx -8rpx rgba(0,103,104,0.16);
+				border-radius: 32rpx;
+				padding-top: 40rpx;
+				padding-left: 32rpx;
+				padding-right: 32rpx;
+				display: flex;
+				flex-direction: column;
+				padding-bottom: 32rpx;
+				margin-bottom: 24rpx;
+				position:relative;
+				.water2{
+					position: absolute;
+					bottom: 0;
+					left: 0;
+					width: 114rpx;
+					height: 172rpx;
+					z-index: 0;
+				}
+				.top{
+					display: flex;
+					justify-content: space-between;
+					padding-bottom: 24rpx;
+					border-bottom: 2rpx solid #F4F4F4;
+					position: relative;
+					z-index: 0;
+					.left{
+						display: flex;
+						align-items: center;
+						.avatar{
+							width: 64rpx;
+							height: 64rpx;
+							border-radius: 50%;
+							margin-right: 32rpx;
+						}
+						.des{
+								
+							.name{
+								font-size: 28rpx;
+								font-family: PingFang-SC, PingFang-SC;
+								font-weight: bold;
+								color: #333333;
+							}
+							.time{
+								font-size: 24rpx;
+								font-family: PingFang-SC, PingFang-SC;
+								font-weight: 500;
+								color: #999999;
+								margin-top: 16rpx;
+							}
+						}
+					}
+					.right{
+						font-size: 32rpx;
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: bold;
+						color: #333333;
+						padding-right: 26rpx;
+					}
+				}
+				.bot{
+					position: relative;
+					z-index: 0;
+					font-size: 24rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #999999;
+					padding-top: 22rpx;
+				}
+			}
+		}
+	}
+	
+		}
+	}

+ 104 - 0
pages/my/yongjinDetail/index.vue

xqd
@@ -0,0 +1,104 @@
+<template>
+	<view class="container">
+		<navBar title="佣金明细" :back="true" color="#333333" background="#FFFFFF" />
+
+		<view class="bgBox">
+			<view class="topBox">
+				<view class="userBox">
+					<image class="avatar" src="../../../static/tabbar/my.png" mode=""></image>
+					达布溜
+					<view class="flag">
+						推广大使
+						<image src="../../../static/other/huangguan.png" mode="" class="hg_i"></image>
+					</view>
+				</view>
+
+				<view class="cardTop">
+					<!-- <image src="../../../static/tabbar/my.png" mode="" class="water_coin"></image> -->
+					<view class="left">
+						<view class="txt">
+							累计收入(元)
+						</view>
+						<view class="money">
+							¥2389
+						</view>
+					</view>
+					<view class="right">
+						<view class="txt">
+							可提现收入(元)
+						</view>
+						<view class="money">
+							¥329
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="botContent">
+				<view class="cardBot">
+					<view class="btn" @click="cash">
+						立即提现
+					</view>
+				</view>
+
+				<view class="titleBox">
+					佣金明细
+				</view>
+
+				<view class="list">
+					<view class="item" v-for="i in 3">
+						<!-- <image src="../../../static/tabbar/my.png" mode="" class="water2"></image> -->
+						<view class="top">
+							<view class="left">
+								<image src="../../../static/tabbar/my.png" mode="" class="avatar"></image>
+								<view class="des">
+									<view class="name">
+										推荐用户XXXXX
+									</view>
+									<view class="time">
+										2023-10-20 12:21
+									</view>
+								</view>
+							</view>
+							<view class="right">
+								+36
+							</view>
+						</view>
+						<view class="bot">
+							购买了299.9的尊享套餐,您获得了佣金36元
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	// import navBar from '@/components/navBar/index.vue'
+	export default {
+		// components: {
+		// 	navBar
+		// },
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			cash() {
+				uni.navigateTo({
+					url: '/pages/my/cash/index'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "./index.scss";
+</style>

BIN
static/other/biyan.png


BIN
static/other/c_arrR.png


BIN
static/other/defaultAvatar.png


BIN
static/other/huangguan.png


BIN
static/other/icon1.png


BIN
static/other/icon2.png


BIN
static/other/icon3.png


BIN
static/other/icon4.png


BIN
static/other/icon5.png


BIN
static/other/liujiaoxing.png


BIN
static/other/loading.gif


BIN
static/other/logo_b.png


BIN
static/other/wechat.png


BIN
static/other/yhk.png


BIN
static/other/zhifubao.png


BIN
static/other/zyan.png


+ 4 - 0
uni_modules/uview-ui/components/u-picker/props.js

xqd
@@ -1,6 +1,10 @@
 export default {
 	props: {
 		// 是否展示picker弹窗
+		// acColor: {
+		// 	type: String,
+		// 	default: 'black'
+		// },
 		aColor: {
 			type: String,
 			default: 'black'

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/navBar/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/privacyPopup/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/tabBar/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/wike-painter/wike-painter.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/category/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/genHuiBen/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/genRes/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/map/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/aboutUs/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/cash/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/cashRecord/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/charge/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/huiBen_record/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/jiangli/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/kefu/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/myRecord/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/pubCenter/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/team/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/tuiguangDashi/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/tuiguangHaibao/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/userInfo/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/my/yongjinDetail/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/service/index.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-badge/u-badge.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-button/u-button.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-empty/u-empty.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-icon/u-icon.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-loading-icon/u-loading-icon.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-overlay/u-overlay.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-parse/node/node.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-parse/u-parse.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-picker/u-picker.js.map


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uview-ui/components/u-popup/u-popup.js.map


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