Jelajahi Sumber

Wesmiler OTC 提交更新 0729

APPLE 3 tahun lalu
induk
melakukan
8e05d81ed8
41 mengubah file dengan 576 tambahan dan 278 penghapusan
  1. 8 0
      addons/otcapp/App.vue
  2. 35 0
      addons/otcapp/common/lang.js
  3. 9 4
      addons/otcapp/components/index.vue
  4. 0 1
      addons/otcapp/components/tabbar.vue
  5. 3 0
      addons/otcapp/main.js
  6. 1 1
      addons/otcapp/manifest.json
  7. 21 22
      addons/otcapp/pages.json
  8. 163 36
      addons/otcapp/pages/advert/index.vue
  9. 0 22
      addons/otcapp/pages/agreement/register.vue
  10. 168 0
      addons/otcapp/pages/article/help.vue
  11. 57 0
      addons/otcapp/pages/article/info.vue
  12. 61 0
      addons/otcapp/pages/article/page.vue
  13. 2 2
      addons/otcapp/pages/center/index.vue
  14. 0 1
      addons/otcapp/pages/chat/newList.vue
  15. 26 26
      addons/otcapp/pages/h5/order.vue
  16. 0 128
      addons/otcapp/pages/moneyWater/moneyWater.vue
  17. 2 0
      addons/otcapp/pages/order/advert.vue
  18. 2 0
      addons/otcapp/pages/order/index.vue
  19. 1 1
      addons/otcapp/pages/reg/reg.vue
  20. 15 5
      addons/otcapp/pages/trade/advert.vue
  21. 2 3
      addons/otcapp/unpackage/dist/build/h5/index.html
  22. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/index.css
  23. 0 7
      addons/otcapp/unpackage/dist/build/h5/static/js/chunk-vendors.3c6acce5.js
  24. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/index.f8c30a80.js
  25. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-collection~pages-account-transfer~pages-advert-index~pages-center-address~pages-center~d8db0102.e9e306a0.js
  26. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-advert-index~pages-auth-index~pages-center-address~pages-center-capital~pag~8276f2a5.cc9af845.js
  27. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-advert-index~pages-center-capital~pages-chat-newList~pages-index-index~page~748ee104.9b067a30.js
  28. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-advert-index.ef571bc5.js
  29. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-advert-index~pages-auth-index~pages-center-address~pages-center-payment-add~pages-center-payme~85404319.a0b4c1b6.js
  30. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-agreement-register.d0ea7e2e.js
  31. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-about.74b4b474.js
  32. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-help.d9048cbd.js
  33. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-index.b9d9a06a.js
  34. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-chat-newList.c7ec24ce.js
  35. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-h5-order.6c14c998.js
  36. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-index-index.a816edec.js
  37. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-login-login.2a65d8b2.js
  38. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-order-advert.ea038b49.js
  39. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-order-index.c40a0c7a.js
  40. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-reg-reg.ecbdaed6.js
  41. 0 1
      addons/otcapp/unpackage/dist/build/h5/static/js/pages-trade-advert.cafb618c.js

+ 8 - 0
addons/otcapp/App.vue

@@ -130,4 +130,12 @@
 	.u-radio__label {
 		color: inherit !important;
 	}
+
+	.u-type-none-light-bg {
+		padding: 18rpx 0 !important;
+	}
+
+	.u-type-none-light-bg .u-news-item {
+		color: #f1f1f1 !important;
+	}
 </style>

+ 35 - 0
addons/otcapp/common/lang.js

@@ -33,6 +33,7 @@ let langs = {
 		'chat_title': '您正在与商家聊天',
 		'chat_custom_title': '您正在与客服聊天',
 		'message_title': '消息',
+		'article_title': '详情',
 
 		'loadmore': '加载更多',
 		'loading': '正在加载...',
@@ -381,6 +382,22 @@ let langs = {
 		'transfer_wait': '等待交易匹配',
 		'collection_success': '确认已收款',
 		'wait_pay': '等待对方付款',
+
+		'advert_limit': '单笔限额',
+		'price_type': '价格类型',
+		'price_1': '固定价格',
+		'price_2': '浮动价格',
+		'limit_min': '最低金额',
+		'limit_max': '最高金额',
+		'advert_price': '填写价格',
+		'advert_time': '有效期',
+		'trade_price': '平台价',
+		'real_price': '实际价',
+		'select_date': '选择有效日期',
+		'input_limit_min': '请填写最低单笔限额',
+		'input_limit_max': '请填写最高单笔限额',
+		'limit_error': '最低限额不能超出最高限额',
+		'input_price': '请输入有效价格',
 	},
 
 	// 英文
@@ -416,6 +433,7 @@ let langs = {
 		'chat_title': 'Chat conversation',
 		'chat_custom_title': 'Customer service chat',
 		'message_title': 'Message',
+		'article_title': 'Detail',
 
 		'loadmore': 'Load more',
 		'loading': 'Loading...',
@@ -753,6 +771,23 @@ let langs = {
 		'transfer_wait': 'Waiting match',
 		'collection_success': 'Confirm receipt',
 		'wait_pay': 'Waiting pay',
+
+		'advert_limit': 'Single limit',
+		'price_type': 'Price type',
+		'price_1': 'Fixed price',
+		'price_2': 'Floating price',
+		'limit_min': 'Min amount',
+		'limit_max': 'Max amount',
+		'advert_price': 'Fill in the price',
+		'advert_time': 'Effective time',
+		'trade_price': 'Platform price',
+		'real_price': 'Actual price',
+		'select_date': 'Select effective date',
+		'input_limit_min': 'Please fill in the minimum single transaction limit',
+		'input_limit_max': 'Please fill in the maximum single transaction limit',
+		'limit_error': 'The minimum limit cannot exceed the maximum limit',
+		'input_price': 'Please enter a valid price',
+
 	},
 };
 

+ 9 - 4
addons/otcapp/components/index.vue

@@ -56,9 +56,13 @@
 				<view class="info">
 					<image class="icon" src="../static/icons/message.png" mode=""></image>
 					<view class="list" v-if="notices.length>0">
-						<u-swiper @change="change" :vertical="vertical" :height="30" :list="notices" :title="title"
-							:effect3d="effect3d" :indicator-pos="indicatorPos" :mode="mode1" :interval="3000"
-							@click="click"></u-swiper>
+						<!--
+						<u-swiper @change="change" :vertical="true" :height="30" :list="notices" :title="true"
+							:effect3d="effect3d" :indicator-pos="indicatorPos" :mode="'none'" :circular="true"
+							:interval="3000" @click="click"></u-swiper>
+							-->
+						<u-notice-bar :type="'none'" :volume-icon="false" mode="vertical" :list="notices">
+						</u-notice-bar>
 					</view>
 					<view class="list" v-else>
 						<text>{{lang.no_notice}}</text>
@@ -670,10 +674,11 @@
 					display: flex;
 
 					.list {
-						color: #f1f1f1;
+						color: #f1f1f1 !important;
 						margin: 0rpx 10rpx;
 						line-height: 58rpx;
 						width: calc(100% - 116rpx);
+
 					}
 
 					.icon {

+ 0 - 1
addons/otcapp/components/tabbar.vue

@@ -67,7 +67,6 @@
 			let user_type = uni.getStorageSync('otc.user_type')
 			user_type = typeof(user_type) != 'undefined' ? user_type : 1;
 			user_type = user_type > 0 ? user_type : 1;
-			console.log(user_type)
 			if (user_type != 1) {
 				this.list = this.list2
 				this.$forceUpdate()

+ 3 - 0
addons/otcapp/main.js

@@ -34,6 +34,9 @@ Vue.prototype.checkLogin = function() {
 	return true;
 }
 
+import VueClipboard from 'vue-clipboard2' //引入插件
+Vue.use(VueClipboard) //安装插件
+
 const app = new Vue({
 	...App
 })

+ 1 - 1
addons/otcapp/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "UTC",
+    "name" : "OTC",
     "appid" : "__UNI__C98AF6D",
     "description" : "交易平台",
     "versionName" : "1.0.0",

+ 21 - 22
addons/otcapp/pages.json

@@ -54,14 +54,6 @@
 			}
 
 		}, {
-			"path": "pages/agreement/register",
-			"style": {
-				"navigationBarTitleText": "用户注册协议",
-				"enablePullDownRefresh": false,
-				"navigationStyle": "custom" // 隐藏系统导航栏
-			}
-
-		}, {
 			"path": "pages/order/index",
 			"style": {
 				"navigationBarTitleText": "交易订单",
@@ -121,20 +113,6 @@
 			}
 
 		}, {
-			"path": "pages/center/help",
-			"style": {
-				"navigationBarTitleText": "帮助中心",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
-			"path": "pages/center/about",
-			"style": {
-				"navigationBarTitleText": "关于OTC",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
 			"path": "pages/auth/index",
 			"style": {
 				"navigationBarTitleText": "身份认证",
@@ -301,6 +279,27 @@
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
 
+		}, {
+			"path": "pages/article/help",
+			"style": {
+				"navigationBarTitleText": "帮助中心",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/article/info",
+			"style": {
+				"navigationBarTitleText": "文章详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/article/page",
+			"style": {
+				"navigationBarTitleText": "单页",
+				"enablePullDownRefresh": false
+			}
+
 		}
 	],
 	"globalStyle": {

+ 163 - 36
addons/otcapp/pages/advert/index.vue

@@ -33,13 +33,8 @@
 						<image class="icon" src="/static/icons/usdt_min.png" mode=""></image>
 					</view>
 					<view class="item price">
-						<template v-if="formData.price_type==1">
-
-						</template>
-						<template v-else>
-							<u-number-box v-model="value" @change="valChange"></u-number-box>
-						</template>
-
+						<u-input type="text" :value="v.price" :placeholder="lang.advert_price" disabled>
+						</u-input>
 					</view>
 					<view class="item pay">
 						<template v-if="v.pay_type" v-for="(vo, kk) in v.pay_type">
@@ -55,7 +50,7 @@
 						<text class="time" v-else>{{lang.unsaled}}</text>
 					</view>
 					<view class="item op">
-						<text class="btn" @click="unsale(v, 1)">{{lang.unsale}}</text>
+						<text class="btn" @click="unsale(v, k)">{{lang.unsale}}</text>
 					</view>
 				</view>
 
@@ -68,7 +63,7 @@
 			:mask-close-able="true" width="90%" :show-title="true" :z-index="96" :show-cancel-button="true"
 			:confirm-text="lang.confirm" :cancel-text="lang.cancel" confirm-color="#bb955e">
 			<view v-slot class="u-modal-content">
-				<u-form labelPosition="left" :model="formData" ref="tradeForm" :labelWidth="'120rpx'">
+				<u-form labelPosition="left" :model="formData" ref="tradeForm" :labelWidth="'130rpx'">
 					<u-form-item :label="lang.publish_type">
 						<u-radio-group v-model="formData.type" placement="row" @change="radioGroupChange">
 							<u-radio activeColor="#bb955e" :label="lang.trade_buy" name="1">{{lang.trade_buy}}</u-radio>
@@ -79,10 +74,10 @@
 					<u-form-item :label="lang.publishname">
 						<u-input type="text" v-model="userInfo.username" disabled placeholder=""></u-input>
 					</u-form-item>
-					<u-form-item :label="lang.limit">
-						<u-input type="text" :placeholder="lang.limit_min+' USDT'">
+					<u-form-item :label="lang.advert_limit">
+						<u-input type="text" v-model="formData.limit_min" :placeholder="lang.limit_min+' CNY'">
 						</u-input>~
-						<u-input type="text" :placeholder="lang.limit_max+' USDT'">
+						<u-input type="text" v-model="formData.limit_max" :placeholder="lang.limit_max+' CNY'">
 						</u-input>
 					</u-form-item>
 					<u-form-item :label="lang.price_type">
@@ -93,10 +88,28 @@
 						</u-radio-group>
 					</u-form-item>
 					<u-form-item :label="lang.price">
-						<u-input type="text" :value="info.price+' CNY'" disabled placeholder=""></u-input>
-						<view class="price">
+						<template v-if="formData.price_type==1">
+							<u-input type="text" v-model="formData.price" :placeholder="lang.advert_price">
+							</u-input>
+							<text class="unit">CNY</text>
+						</template>
+						<template v-else>
+							<view class="price-box">
+								<view class="float-price">
+									<u-number-box v-model="formData.prioce" @change="changePrice" :input-width="100"
+										:positive-integer="false"
+										:min="-(formData.type==1? trade.buy_price:trade.sell_price)" :max="10"
+										:step="0.1">
+									</u-number-box>
+								</view>
+								<view class="price">
+									<text
+										class="text">{{lang.trade_price}}:{{(formData.type==1?trade.buy_price:trade.sell_price)}}</text>
+									<text class="text real">{{lang.real_price}}:{{formData.real_price}}</text>
+								</view>
+							</view>
+						</template>
 
-						</view>
 					</u-form-item>
 					<u-form-item :label="lang.pay_type">
 						<u-checkbox-group @change="checkboxGroupChange">
@@ -111,16 +124,9 @@
 							</u-checkbox>
 						</u-checkbox-group>
 					</u-form-item>
-					<u-form-item :label="lang.advert_num" prop="formData.num">
-						<u-input v-if="formData.type==1" type="text" v-model="formData.num"
-							:placeholder="lang.input_buy_num" @input="countTotal">
-						</u-input>
-						<u-input v-else type="text" v-model="formData.num" :placeholder="lang.input_sell_num"
-							@input="countTotal">
-						</u-input>
-					</u-form-item>
-					<u-form-item :label="lang.trade_total">
-						<u-input type="text" :value="formData.total+' CNY'" disabled>
+					<u-form-item :label="lang.advert_time" prop="formData.expired_at">
+						<u-input type="text" v-model="formData.expired_at" :placeholder="lang.select_date"
+							@click="showDate=true" readonly>
 						</u-input>
 					</u-form-item>
 					<u-form-item :label="lang.trade_password" prop="formData.trade_password">
@@ -132,6 +138,9 @@
 			</view>
 		</u-modal>
 
+		<u-calendar v-model="showDate" :mode="'date'" @change="changeDate" :min-date="minDate()" :max-date="maxDate()">
+		</u-calendar>
+
 		<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
 		<tabbars :currentIndex="4"></tabbars>
 	</view>
@@ -147,6 +156,7 @@
 			return {
 				index: 0,
 				page: 1,
+				showDate: false,
 				loadMore: false,
 				loadStatus: 'loadmore',
 				loaded: false,
@@ -154,16 +164,18 @@
 				info: {},
 				// 表单数据
 				formData: {
-					pay_type: '',
+					pay_type: [1],
 					price_type: 1,
-					type: 2,
+					type: 1,
+					limit_min: '',
+					limit_max: '',
 					trade_password: '',
 					price: '',
 					real_price: '0.00',
-					expried_at: '',
+					expired_at: '',
 				},
 				checkboxArr: {
-					bank: false,
+					bank: true,
 					wxpay: false,
 					alipay: false,
 				},
@@ -178,11 +190,14 @@
 				// 用户收款方式
 				payment: [],
 				adverts: [],
+				// 交易参数
+				trade: {},
 			};
 		},
 		onLoad(options) {
 			let type = typeof(options.type) != 'undefined' ? options.type : 1;
 			this.formData.type = type == 1 ? 1 : 2;
+			this.getTrade()
 			this.getData()
 			this.getUserInfo()
 
@@ -198,11 +213,24 @@
 			}
 		},
 		methods: {
+			minDate() {
+				let _date = new Date();
+				let day = _date.getFullYear() + '-' + (_date.getMonth() + 1) + '-' + _date.getDate();
+				return day;
+			},
+			maxDate() {
+				let _date = new Date();
+				let day = (_date.getFullYear() + 1) + '-' + (_date.getMonth() + 1) + '-' + _date.getDate();
+				console.log(day)
+				return day;
+			},
 			// 切换交易类型
 			changeType(type) {
 				let _this = this;
 				this.$nextTick(() => {
-					this.formData.type = type;
+					_this.formData.type = type;
+					_this.page = 1;
+					_this.adverts = [];
 					_this.getData();
 				});
 			},
@@ -212,6 +240,26 @@
 			priceGroupChange(e) {
 				this.formData.price_type = e;
 			},
+			changePrice(e) {
+				console.log(e)
+				// 购买价格
+				this.formData.price = e.value
+				if (this.formData.type == 1) {
+					this.formData.real_price = (parseFloat(this.trade.buy_price) + parseFloat(e.value)).toFixed(2)
+				} else {
+					this.formData.real_price = (parseFloat(this.trade.sell_price) + parseFloat(e.value)).toFixed(2)
+				}
+
+				if (this.formData.real_price <= 0) {
+					this.formData.price = ''
+					this.formData.real_price = '0.00'
+				}
+
+				this.$forceUpdate()
+			},
+			changeDate(date) {
+				this.formData.expired_at = date.result ? date.result + ' 23:59:59' : '';
+			},
 			// 计算实际价格
 			countPrice() {
 				this.formData.price = parseFloat(this.formData.price)
@@ -224,7 +272,7 @@
 				this.showPopup = true
 			},
 			checkboxGroupChange(e) {
-				console.log(e)
+				this.formData.pay_type = e
 			},
 			//获取用户数据
 			getUserInfo() {
@@ -244,13 +292,16 @@
 			// 购买
 			unsale(data, index) {
 				let _this = this;
+
 				this.$request.sendToken('/api/advert/status', {
 					id: data.id,
 					status: 2
 				}, 'POST').then(res => {
 					if (res.success == true) {
-						_this.adverts[index].status = 2;
 						this.$u.toast(res.msg);
+						setTimeout(function() {
+							_this.getData()
+						}, 800)
 					} else {
 						this.$u.toast(res.msg);
 					}
@@ -259,13 +310,60 @@
 			// 添加
 			submit() {
 				let _this = this;
-				this.$request.sendToken('/api/advert/add', _this.formData, 'POST').then(res => {
+				console.log(_this.formData)
+				if (this.formData.limit_min <= 0) {
+					this.$u.toast(this.lang.input_limit_min);
+					_this.$refs.uModal.clearLoading();
+					return false;
+				}
+				if (this.formData.limit_max <= 0) {
+					this.$u.toast(this.lang.input_limit_max);
+					_this.$refs.uModal.clearLoading();
+					return false;
+				}
+				if (parseFloat(this.formData.limit_min) >= parseFloat(this.formData.limit_max)) {
+					this.$u.toast(this.lang.limit_error);
+					_this.$refs.uModal.clearLoading();
+					return false;
+
+				}
+				if (this.formData.price <= 0 && this.formData.price_type == 1) {
+					this.$u.toast(this.lang.input_price);
+					_this.$refs.uModal.clearLoading();
+					return false;
+				}
+				if (this.formData.expired_at == '') {
+					this.$u.toast(this.lang.select_date);
+					_this.$refs.uModal.clearLoading();
+					return false;
+				}
+				if (this.formData.trade_password == '') {
+					this.$u.toast(this.lang.input_trade_password);
+					_this.$refs.uModal.clearLoading();
+					return false;
+
+				}
+				this.$request.sendToken('/api/advert/edit', _this.formData, 'POST').then(res => {
 					if (res.success == true) {
-						_this.showPopup = false;
-						_this.getData()
+						this.$u.toast(res.msg);
+						setTimeout(function() {
+							_this.showPopup = false;
+							_this.formData = {
+								pay_type: [1],
+								price_type: 1,
+								type: 1,
+								limit_min: '',
+								limit_max: '',
+								trade_password: '',
+								price: '',
+								real_price: '0.00',
+								expired_at: '',
+							};
+							_this.getData()
+						}, 800)
 					} else {
 						this.$u.toast(res.msg);
-						_this.$refs.payConfirmModal.clearLoading();
+						_this.$refs.uModal.clearLoading();
 					}
 				})
 			},
@@ -302,6 +400,15 @@
 					}
 				})
 			},
+			// 获取交易参数
+			getTrade() {
+				let _this = this;
+				let locale = uni.getStorageSync('locale')
+				this.$request.sendToken('/api/trade', {}, 'POST').then(res => {
+					// 打印调用成功回调
+					this.trade = res.data.trade
+				})
+			},
 		}
 	}
 </script>
@@ -484,6 +591,8 @@
 					text-align: left;
 				}
 
+
+
 			}
 
 			.head {
@@ -532,6 +641,24 @@
 			}
 		}
 
+		.unit {
+			color: #666;
+		}
+
+		.price-box {
+			width: 100%;
+
+			.price {
+				width: 100%;
+
+				.text {
+					display: inline-block;
+				}
+
+				.real {}
+			}
+		}
+
 		.info {
 			padding: 19rpx 0;
 

+ 0 - 22
addons/otcapp/pages/agreement/register.vue

@@ -1,22 +0,0 @@
-<template>
-	<view>
-		使用协议
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style>
-
-</style>

+ 168 - 0
addons/otcapp/pages/article/help.vue

@@ -0,0 +1,168 @@
+<template>
+	<view class="main">
+		<view class="articles">
+			<view class="list-box" v-if="dataList.length<=0">
+				<view class="no-data">
+					<image class="icon" src="/static/icons/no-data.png" mode=""></image>
+					<view class="text">
+						-- {{lang.no_data}} --
+					</view>
+				</view>
+			</view>
+			<view class="list-box" v-else>
+				<view class="lists" v-for="(v,k) in dataList" :key="k">
+					<view class="list-item" @click="gotoPage('/pages/article/info?id='+v.id)">
+						<view class="name">
+							<text class="text">{{k+1}}.{{v.title}}</text>
+							<image class="icon right" src="/static/icons/right.png" mode=""></image>
+						</view>
+						<view class="info">
+							<view class="text">{{v.message}}
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<u-loadmore :status="loadStatus"></u-loadmore>
+			</view>
+		</view>
+
+		<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
+		<tabbars :currentIndex="1"></tabbars>
+	</view>
+</template>
+
+<script>
+	import tabbars from "@/components/tabbar.vue"
+	export default {
+		components: {
+			tabbars
+		},
+		data() {
+			return {
+				loadMore: false,
+				loadStatus: 'loadmore',
+				loaded: false,
+				params: {
+					page: 1,
+					pageSize: 15,
+				},
+				dataList: [],
+			}
+		},
+		onLoad() {
+			this.getData()
+			uni.setNavigationBarTitle({
+				title: this.lang.help_title
+			})
+		},
+		onReachBottom() {
+			if (!this.loaded) {
+				this.params.page++;
+				this.loadMore = true
+				this.getData();
+			}
+		},
+		methods: {
+			// 获取数据
+			getData() {
+				let _this = this;
+				_this.loadStatus = 'loading'
+				let params = JSON.parse(JSON.stringify(this.params));
+				this.$request.sendToken('/api/article/help', params, 'POST').then(res => {
+					_this.loadStatus = 'loadmore'
+					if (res.success == true) {
+						if (_this.loadMore == true && res.data.list.length > 0) {
+							let len = res.data.list.length
+							for (let i = 0; i <= len; i++) {
+								if (typeof(res.data.list[i]) != 'undefined') {
+									_this.dataList.push(res.data.list[i])
+								}
+							}
+							_this.loadMore = false
+
+						} else if (res.data.list.length > 0) {
+							_this.dataList = res.data.list ? res.data.list : [];
+						}
+
+						if (this.params.page != 1 && res.data.list.length <= 0) {
+							_this.loaded = true
+							_this.loadStatus = 'nomore'
+						}
+						if (this.params.page == 1 && res.data.list.length <= 0) {
+							_this.loaded = true
+							_this.loadStatus = 'nodata'
+						}
+
+					} else {
+						this.$u.toast(res.msg);
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.articles {
+		padding-bottom: 198rpx;
+		padding-top: 38rpx;
+	}
+
+	.lists {
+		color: #999;
+		margin: 20rpx 40rpx;
+		padding: 20rpx;
+		border-radius: 20rpx;
+		// background-color: #36373F;
+		background: linear-gradient(275deg, rgba(45, 45, 53, 0.1) 0%, #505058 100%);
+
+		.u-row {
+			overflow: hidden;
+		}
+
+		.list-item {
+			.name {
+				width: 100%;
+
+				vertical-align: middle;
+				display: block;
+
+				.icon {
+					vertical-align: middle;
+					width: 46rpx;
+					height: 46rpx;
+				}
+
+				.text {
+					vertical-align: middle;
+					margin-left: 10rpx;
+				}
+
+				.right {
+					float: right;
+				}
+			}
+
+			.info {
+				.text {
+					margin-left: 38rpx;
+					max-width: 80%;
+				}
+			}
+		}
+	}
+
+
+	.no-data {
+		text-align: center;
+		margin-top: 40%;
+		color: #6e6c6b;
+
+		.icon {
+			width: 120rpx;
+			height: 120rpx;
+			margin: 0 auto;
+		}
+	}
+</style>

+ 57 - 0
addons/otcapp/pages/article/info.vue

@@ -0,0 +1,57 @@
+<template>
+	<view class="main">
+		<u-parse class="content" :html="info.content"></u-parse>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: 0,
+				info: {}
+			}
+		},
+		onLoad(options) {
+			this.id = typeof(options.id) != 'undefined' ? options.id : 0;
+			if (this.id <= 0) {
+				this.$u.toast(this.lang.params_error);
+				setTimeout(function() {
+					uni.navigateBack({
+						delta: 1,
+					})
+				}, 800);
+				return false;
+			}
+
+			this.getInfo();
+
+			uni.setNavigationBarTitle({
+				title: this.lang.article_title
+			})
+
+		},
+		methods: {
+			getInfo() {
+				let _this = this
+				this.$request.sendToken('/api/article/info', {
+					id: _this.id
+				}, 'POST').then(res => {
+					if (res.success == true) {
+						_this.info = res.data;
+					} else {
+						this.$u.toast(res.msg);
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		color: #f1f1f1;
+		padding: 38rpx 19rpx;
+
+	}
+</style>

+ 61 - 0
addons/otcapp/pages/article/page.vue

@@ -0,0 +1,61 @@
+<template>
+	<view class="main">
+		<u-parse class="content" :html="info.content"></u-parse>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				type: 0,
+				info: {}
+			}
+		},
+		onLoad(options) {
+			this.type = typeof(options.type) != 'undefined' ? options.type : 0;
+			if (this.type <= 0) {
+				this.$u.toast(this.lang.params_error);
+				setTimeout(function() {
+					uni.navigateBack({
+						delta: 1,
+					})
+				}, 800);
+				return false;
+			}
+
+			this.getInfo();
+
+
+		},
+		methods: {
+			getInfo() {
+				let _this = this
+				this.$request.sendToken('/api/article/page', {
+					type: _this.type
+				}, 'POST').then(res => {
+					if (res.success == true) {
+						_this.info = res.data;
+
+						if (this.info.id > 0) {
+							uni.setNavigationBarTitle({
+								title: _this.info.title
+							})
+						}
+
+					} else {
+						_this.$u.toast(res.msg);
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		color: #f1f1f1;
+		padding: 38rpx 19rpx;
+
+	}
+</style>

+ 2 - 2
addons/otcapp/pages/center/index.vue

@@ -73,12 +73,12 @@
 					{
 						logoPath: '/static/icons/help.png',
 						title: this.lang.help_center,
-						pagePath: '/pages/center/help'
+						pagePath: '/pages/article/help'
 					},
 					{
 						logoPath: '/static/icons/about.png',
 						title: this.lang.about_us,
-						pagePath: '/pages/center/about'
+						pagePath: '/pages/article/page?type=2'
 					},
 					{
 						logoPath: '/static/icons/custom_icon.png',

+ 0 - 1
addons/otcapp/pages/chat/newList.vue

@@ -74,7 +74,6 @@
 			})
 		},
 		onReachBottom() {
-			console.log(777)
 			if (!this.loaded) {
 				this.params.page++;
 				this.loadMore = true

+ 26 - 26
addons/otcapp/pages/h5/order.vue

@@ -34,7 +34,8 @@
 									<view class="info-text">
 										<text class="label">{{lang.business}}:</text><text
 											class="text">{{payment.real_name}}</text><text class="copy"
-											@click="copy(payment.real_name)">{{lang.copy}}</text>
+											v-clipboard:copy="payment.real_name" v-clipboard:success="onCopy"
+											v-clipboard:error="copyError">{{lang.copy}}</text>
 										<view class="auth">
 											<text class="auth-text"
 												v-if="orderInfo.idcard_check==1">{{lang.is_auth}}</text>
@@ -46,7 +47,9 @@
 										<view class="info-text">
 											<text class="label">{{lang.trade_account}}:</text><text
 												class="text">{{payment.account}}({{payment.type==2?lang.wxpay:lang.alipay}})</text><text
-												class="copy" @click="copy(payment.account)">{{lang.copy}}</text>
+												class="copy" v-clipboard:copy="payment.account"
+												v-clipboard:success="onCopy"
+												v-clipboard:error="copyError">{{lang.copy}}</text>
 										</view>
 										<view class="info-text">
 											<text class="label">{{lang.pay_qrcode}}:</text><text class="text">
@@ -59,18 +62,21 @@
 										<view class="info-text">
 											<text class="label">{{lang.trade_account}}:</text><text
 												class="text">{{payment.bank_card}}</text><text class="copy"
-												@click="copy(payment.bank_card)">{{lang.copy}}</text>
+												v-clipboard:copy="payment.bank_card" v-clipboard:success="onCopy"
+												v-clipboard:error="copyError">{{lang.copy}}</text>
 										</view>
 										<view class="info-text">
 											<text class="label">{{lang.trade_bank}}:</text><text
 												class="text">{{payment.bank_name}}{{payment.branch_name}}</text><text
-												class="copy"
-												@click="copy(payment.bank_name+''+payment.branch_name)">{{lang.copy}}</text>
+												class="copy" v-clipboard:copy="payment.bank_name+''+payment.branch_name"
+												v-clipboard:success="onCopy"
+												v-clipboard:error="copyError">{{lang.copy}}</text>
 										</view>
 										<view class="info-text">
 											<text class="label">{{lang.total}}:</text><text
 												class="text total">¥{{orderInfo.total}}</text><text class="copy"
-												@click="copy(orderInfo.total)">{{lang.copy}}</text>
+												v-clipboard:copy="orderInfo.total" v-clipboard:success="onCopy"
+												v-clipboard:error="copyError">{{lang.copy}}</text>
 										</view>
 									</template>
 								</view>
@@ -199,11 +205,12 @@
 			<text class="text" v-if="chatCount>0" v-text="chatCount>99?'99+': chatCount">0</text>
 		</view>
 
-
 	</view>
 </template>
 
 <script>
+	// import ClipboardJS from "clipboard";
+	import VueClipboard from 'vue-clipboard2' //引入插件
 	import pageHeader from './header'
 	export default {
 		components: {
@@ -322,25 +329,13 @@
 					}
 				}, 1000)
 			},
-			// 复制
-			copy(text) {
-				let _this = this
-				//#ifndef H5
-				uni.setClipboardData({
-					data: text,
-					success: function() {
-						_this.$u.toast(_this.lang.copy_success);
-					},
-					fail: function() {
-						_this.$u.toast(_this.lang.copy_fail);
-					}
-				});
-				//#endif
-
-				// #ifdef H5
-				this.$u.toast(_this.lang.no_support_copy);
-				// #endif
+			onCopy(e) {
+				this.$u.toast(this.lang.copy_success);
 			},
+			copyError(e) {
+				this.$u.toast(this.lang.copy_fail);
+			},
+
 			radioGroupChange(e) {
 				this.formData.pay_type = e;
 			},
@@ -348,7 +343,9 @@
 
 				this.showPopup = true;
 				if (this.orderInfo.pay_img) {
-					this.fileList = [this.orderInfo.pay_img]
+					this.fileList[0] = {
+						url: this.orderInfo.pay_img
+					}
 				}
 				this.formData.pay_type = this.orderInfo.pay_type
 				this.formData.pay_img = this.orderInfo.pay_img
@@ -525,6 +522,7 @@
 					success: function(res) {
 						if (res.confirm) {
 							_this.formData.id = _this.orderInfo.id
+							_this.formData.token = _this.token
 							_this.formData.status = 3
 							_this.$request.sendToken('/oapi/trade/pay', _this.formData, 'POST')
 								.then(
@@ -552,6 +550,7 @@
 					success: function(res) {
 						if (res.confirm) {
 							_this.formData.id = _this.orderInfo.id
+							_this.formData.token = _this.token
 							_this.formData.status = 3
 							_this.$request.sendToken('/oapi/trade/collection', _this.formData, 'POST').then(
 								res => {
@@ -576,6 +575,7 @@
 					success: function(res) {
 						if (res.confirm) {
 							_this.formData.id = _this.orderInfo.id
+							_this.formData.token = _this.token
 							_this.formData.status = 3
 							_this.$request.sendToken('/oapi/trade/cancel', _this.formData, 'POST').then(
 								res => {

+ 0 - 128
addons/otcapp/pages/moneyWater/moneyWater.vue

@@ -1,128 +0,0 @@
-<template>
-	<view class="login-form">
-		<view class="form-header">
-			<u-icon name="arrow-left" size="40" color="#ffffff" @click="back()"></u-icon>
-			<text>充值记录</text>
-		</view>
-		
-		<view class="content" v-for="(item,index) in list" :key="index">
-			<view class="con_son">
-				<view class="con_l_parent">
-					<view class="con_l">
-					</view>
-				</view>
-				<view class="pic">
-					<u-image width="90%" height="120rpx" src="/static/user/jinbi.png.png" style="margin: 0 auto;margin-bottom: 15rpx;"></u-image>
-				</view>
-			</view>
-			<view class="con_bot" >
-				<view class="box1">
-					<view class="son1">
-						<text>下单:</text>
-						<text>{{item.money}}元</text>
-					</view>
-					<view class="son2">
-						<text>余额:</text>
-						<text>{{item.num}}元</text>
-					</view>
-				</view>
-				<view class="box2">
-					<view class="son1">
-						<text></text>
-						<text>{{item.time2}}</text>
-					</view>
-					<view class="son2">
-						<text></text>
-						<text>{{item.change}}</text>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			list:[
-				{money:'999999',time2:'2021–03-27 16:45:55',num:'102',change:'下单成功'},
-				{money:'999999',time2:'2021–03-27 16:45:55',num:'102',change:'下单成功'},
-				{money:'999999',time2:'2021–03-27 16:45:55',num:'102',change:'下单成功'},
-				{money:'999999',time2:'2021–03-27 16:45:55',num:'102',change:'下单成功'},
-				{money:'999999',time2:'2021–03-27 16:45:55',num:'102',change:'下单成功'},
-			]
-	}},
-	methods: {
-		back() {
-			uni.navigateBack();
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.login-form {
-	padding: 80rpx;
-}
-.form-header {
-	color: #ffffff;
-	font-size: 50upx;
-	font-weight: bold;
-	margin-bottom: 50upx;
-	text {
-		padding: 10upx 30upx;
-	}
-}
-.content{
-width: 90%;
-min-height: 280upx;
-background: linear-gradient(251deg, #36373F 0%, #36373F 100%);
-border-radius: 20upx;
-margin-bottom: 20upx;
-	// display: flex;
-	// box-sizing: content-box;
-}
-.content text{
-	height: 34upx;
-	font-size: 26upx;
-	font-family: PingFangSC-Regular, PingFang SC;
-	font-weight: 400;
-	color: #FFFFFF;
-	line-height: 34upx;
-}
-.con_l_parent{
-	display: flex;
-	align-items: center;
-	min-height: 200upx;
-	// background: red;
-	width: 10upx;
-	
-}
-.con_l{
-	width: 10upx;
-	height: 140upx;
-	background: #51C4A7;
-	border-radius: 0px 10upx 10upx 0px;
-}
-.con_son{
-	width: 100%;
-	height: 170upx;
-	display: flex;
-}
-.pic{
-	width: 100%;
-	margin-top: 30upx;
-}
-.box1,.box2{
-	display: flex;
-	justify-content: space-between;
-	padding-left: 15upx;
-	padding-right: 15upx;
-}
-.box2{
-	margin-top: 10upx;
-}
-
-
-</style>

+ 2 - 0
addons/otcapp/pages/order/advert.vue

@@ -715,6 +715,8 @@
 
 	.u-modal-content {
 		padding: 19rpx;
+		max-height: 760rpx;
+		overflow-y: scroll;
 
 		.u-form-item {
 			.icon {

+ 2 - 0
addons/otcapp/pages/order/index.vue

@@ -713,6 +713,8 @@
 
 	.u-modal-content {
 		padding: 19rpx;
+		max-height: 760rpx;
+		overflow-y: scroll;
 
 		.u-form-item {
 			.icon {

+ 1 - 1
addons/otcapp/pages/reg/reg.vue

@@ -36,7 +36,7 @@
 			<view class="agreement">
 				<u-checkbox v-model="check" @change="checkboxChange"></u-checkbox>
 				<view class="agreement-text">
-					{{lang.protocl}}<text @click="gotoPage('/pages/agreement/register')"
+					{{lang.protocl}}<text @click="gotoPage('/pages/article/page?type=3')"
 						class="agree">{{lang.service_agree}}</text>
 				</view>
 			</view>

+ 15 - 5
addons/otcapp/pages/trade/advert.vue

@@ -61,11 +61,11 @@
 		</view>
 
 		<!-- 确认交易 -->
-		<u-modal :title="lang.confirm_trade" v-model="showPopup" @confirm="confirm" ref="payConfirmModal"
+		<u-modal class="modal" :title="lang.confirm_trade" v-model="showPopup" @confirm="confirm" ref="payConfirmModal"
 			:async-close="true" :mask-close-able="true" width="90%" :show-title="true" :z-index="96"
 			:show-cancel-button="true" :confirm-text="lang.confirm" :cancel-text="lang.cancel" confirm-color="#bb955e">
 			<view v-slot class="u-modal-content">
-				<u-form labelPosition="left" :model="formData" ref="tradeForm" :labelWidth="'120rpx'">
+				<u-form labelPosition="left" :model="formData" ref="tradeForm" :labelWidth="'140rpx'">
 					<u-form-item :label="lang.publishname">
 						<u-input type="text" v-model="info.username_hidden" disabled placeholder=""></u-input>
 					</u-form-item>
@@ -100,7 +100,7 @@
 						<image class="icon" src="/static/icons/right.png" mode=""></image>
 					</u-form-item>
 					<u-form-item :label="lang.advert_num" prop="formData.num">
-						<u-input v-if="formData.type==1" type="text" v-model="formData.num"
+						<u-input v-if="formData.type==2" type="text" v-model="formData.num"
 							:placeholder="lang.input_buy_num" @input="countTotal">
 						</u-input>
 						<u-input v-else type="text" v-model="formData.num" :placeholder="lang.input_sell_num"
@@ -195,7 +195,7 @@
 			},
 			// 计算总额
 			countTotal() {
-				this.formData.num = parseFloat(this.formData.num)
+				this.formData.num = this.formData.num > 0 ? parseFloat(this.formData.num) : ''
 				this.formData.total = this.formData.num > 0 ? (this.formData.num * this.info
 					.price).toFixed(6) : '0.00';
 
@@ -351,6 +351,7 @@
 				_this.loadStatus = 'loading'
 				this.$request.sendToken('/api/advert/index', {
 					page: this.page,
+					// pageSize: 10,
 					type: _this.formData.type
 				}, 'POST').then(res => {
 					_this.loadStatus = 'loadmore'
@@ -383,6 +384,13 @@
 </script>
 
 <style lang="scss" scoped>
+	.main {
+		height: 100%;
+		overflow-y: scroll;
+		min-height: 800rpx;
+		padding-bottom: 240rpx;
+	}
+
 	.trade {
 		margin: 38rpx 28rpx;
 
@@ -556,7 +564,7 @@
 				}
 
 				.pay {
-					width: 180rpx;
+					width: 210rpx;
 					line-height: 82rpx;
 					text-align: left;
 				}
@@ -593,6 +601,8 @@
 
 	.u-modal-content {
 		padding: 19rpx;
+		max-height: 760rpx;
+		overflow-y: scroll;
 
 		.u-form-item {
 			.icon {

File diff ditekan karena terlalu besar
+ 2 - 3
addons/otcapp/unpackage/dist/build/h5/index.html


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/index.css


File diff ditekan karena terlalu besar
+ 0 - 7
addons/otcapp/unpackage/dist/build/h5/static/js/chunk-vendors.3c6acce5.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/index.f8c30a80.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-collection~pages-account-transfer~pages-advert-index~pages-center-address~pages-center~d8db0102.e9e306a0.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-advert-index~pages-auth-index~pages-center-address~pages-center-capital~pag~8276f2a5.cc9af845.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-account-logs~pages-advert-index~pages-center-capital~pages-chat-newList~pages-index-index~page~748ee104.9b067a30.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-advert-index.ef571bc5.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-advert-index~pages-auth-index~pages-center-address~pages-center-payment-add~pages-center-payme~85404319.a0b4c1b6.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-agreement-register.d0ea7e2e.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-about.74b4b474.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-help.d9048cbd.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-center-index.b9d9a06a.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-chat-newList.c7ec24ce.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-h5-order.6c14c998.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-index-index.a816edec.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-login-login.2a65d8b2.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-order-advert.ea038b49.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-order-index.c40a0c7a.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-reg-reg.ecbdaed6.js


File diff ditekan karena terlalu besar
+ 0 - 1
addons/otcapp/unpackage/dist/build/h5/static/js/pages-trade-advert.cafb618c.js