Browse Source

no message

xiaoxin 2 years ago
parent
commit
b0f7ea101b

+ 145 - 4
pages/index/index.vue

@@ -55,6 +55,12 @@
 
 
 			<view class="form_item">
 			<view class="form_item">
 				<span class="icon">*</span>
 				<span class="icon">*</span>
+				是否授权
+				<uni-data-select placeholder="请选择是否授权" v-model="isAzt" :localdata="range_azt"></uni-data-select>
+			</view>
+
+			<view class="form_item">
+				<span class="icon">*</span>
 				产品类型(多选)
 				产品类型(多选)
 				<uni-data-checkbox multiple v-model="productType" :localdata="hobby"></uni-data-checkbox>
 				<uni-data-checkbox multiple v-model="productType" :localdata="hobby"></uni-data-checkbox>
 			</view>
 			</view>
@@ -65,6 +71,11 @@
 			</view>
 			</view>
 
 
 			<view class="form_item">
 			<view class="form_item">
+				加入的控标参数
+				<uni-easyinput type="textarea" :maxlength="-1" placeholder="建议填写加入的控标参数情况" v-model="projectParams"></uni-easyinput>
+			</view>
+
+			<view class="form_item">
 				附件材料(建议上传项目相关信息或清单图片)
 				附件材料(建议上传项目相关信息或清单图片)
 				<uni-file-picker
 				<uni-file-picker
 					ref="filePicker"
 					ref="filePicker"
@@ -85,6 +96,15 @@
 		</view>
 		</view>
 	</view>
 	</view>
 
 
+	<!-- 提交成功弹窗区域 -->
+	<uni-popup ref="popup" type="center" :is-mask-click="false">
+		<view class="popup_body">
+			<img class="img" mode="aspectFill" src="../../static/success.png" />
+			<view class="popup_text">提交成功</view>
+			<view class="popup_btn" @click="handleSubscribe">我知道了</view>
+		</view>
+	</uni-popup>
+
 	<!-- 用于图片压缩的canvas画布 -->
 	<!-- 用于图片压缩的canvas画布 -->
 	<canvas
 	<canvas
 		:style="{
 		:style="{
@@ -130,11 +150,16 @@ const projectAmount = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.ge
 const biddingTime = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).biddingTime : '')
 const biddingTime = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).biddingTime : '')
 // 所属行业
 // 所属行业
 const industry = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).industry : '')
 const industry = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).industry : '')
+// 是否授权
+const isAzt = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).isAzt : '')
 // 产品类型
 // 产品类型
 const productType = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).productType : [])
 const productType = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).productType : [])
 // 项目基本情况
 // 项目基本情况
 const projectInformation = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectInformation : '')
 const projectInformation = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectInformation : '')
 
 
+// 加入的控标参数
+const projectParams = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectParams : '')
+
 // 显示的图片数据
 // 显示的图片数据
 const projectImgList = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectImgList : [])
 const projectImgList = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectImgList : [])
 
 
@@ -179,6 +204,17 @@ const range = ref([
 		text: '其他'
 		text: '其他'
 	}
 	}
 ])
 ])
+
+const range_azt = ref([
+	{
+		value: 0,
+		text: '是'
+	},
+	{
+		value: 1,
+		text: '否'
+	}
+])
 // 产品类型数组
 // 产品类型数组
 const hobby = ref([
 const hobby = ref([
 	{
 	{
@@ -221,6 +257,63 @@ const imageStyles = {
 // 上传组件元素
 // 上传组件元素
 const filePicker = ref(null)
 const filePicker = ref(null)
 
 
+// 提交成功弹窗元素
+const popup = ref(null)
+
+// 模版id
+const templateOrder = ref('I3o8CRAiaaNbug3Ukkmv1t-pCIbzxU8OicqMWvdR9lc')
+
+// 点击弹窗 我知道了 按钮回调
+const handleSubscribe = () => {
+	popup.value.close()
+	// 订阅消息
+	uni.getSetting({
+		withSubscriptions: true,
+		success: (res) => {
+			// console.log(res)
+			if (res.subscriptionsSetting[templateOrder.value] !== 'reject') {
+				uni.requestSubscribeMessage({
+					tmplIds: [templateOrder.value],
+					success: (res) => {
+						// console.log(res)
+						if (res[templateOrder.value] !== 'reject') {
+							console.log('成功')
+							// uni.showToast({
+							// 	title:"订阅成功",
+							// 	icon:'success'
+							// })
+						} else {
+							console.log('拒绝2')
+							// uni.showToast({
+							// 	title:"订阅失败",
+							// 	icon:'fail'
+							// })
+						}
+					},
+					fail(err) {
+						console.log(err)
+						console.log('调用失败')
+					}
+				})
+			} else {
+				uni.showModal({
+					content: '当前没有订阅,是否去设置打开?',
+					confirmText: '确认',
+					cancelText: '取消',
+					success: (res) => {
+						if (res.confirm) {
+							uni.openSetting({
+								success: (res) => {}
+							})
+						} else {
+						}
+					}
+				})
+			}
+		}
+	})
+}
+
 // 日期选择框绑定回调
 // 日期选择框绑定回调
 const bindDateChange = (e) => {
 const bindDateChange = (e) => {
 	const val = e.detail.value
 	const val = e.detail.value
@@ -240,8 +333,10 @@ const handleSubmit = () => {
 			projectAmount: projectAmount.value,
 			projectAmount: projectAmount.value,
 			biddingTime: biddingTime.value,
 			biddingTime: biddingTime.value,
 			industry: industry.value,
 			industry: industry.value,
+			isAzt: isAzt.value,
 			productType: productType.value,
 			productType: productType.value,
 			projectInformation: projectInformation.value,
 			projectInformation: projectInformation.value,
+			projectParams: projectParams.value,
 			projectImgList: projectImgList.value,
 			projectImgList: projectImgList.value,
 			subImgList: subImgList.value
 			subImgList: subImgList.value
 		}
 		}
@@ -357,6 +452,13 @@ const handleValidate = () => {
 		})
 		})
 		return false
 		return false
 	}
 	}
+	if (isAzt.value === '') {
+		uni.showToast({
+			title: '请选择是否授权',
+			icon: 'none'
+		})
+		return false
+	}
 	if (productType.value.length == 0) {
 	if (productType.value.length == 0) {
 		uni.showToast({
 		uni.showToast({
 			title: '请选择产品类型',
 			title: '请选择产品类型',
@@ -394,17 +496,21 @@ const submit = async () => {
 	})
 	})
 	// console.log(res)
 	// console.log(res)
 	if (res.success && res.code == 1) {
 	if (res.success && res.code == 1) {
-		uni.showToast({
-			title: '提交成功',
-			duration: 3000
-		})
+		// uni.showToast({
+		// 	title: '提交成功',
+		// 	duration: 3000
+		// })
+		popup.value.open()
+
 		clientName.value = ''
 		clientName.value = ''
 		projectName.value = ''
 		projectName.value = ''
 		projectAmount.value = ''
 		projectAmount.value = ''
 		biddingTime.value = ''
 		biddingTime.value = ''
 		industry.value = ''
 		industry.value = ''
+		isAzt.value = ''
 		productType.value = []
 		productType.value = []
 		projectInformation.value = ''
 		projectInformation.value = ''
+		projectParams.value = ''
 		subImgList.value = []
 		subImgList.value = []
 		projectImgList.value = []
 		projectImgList.value = []
 		filePicker.value.clearFiles()
 		filePicker.value.clearFiles()
@@ -544,4 +650,39 @@ const handleDelete = (e) => {
 		}
 		}
 	}
 	}
 }
 }
+
+.popup_body {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	width: 480rpx;
+	height: 400rpx;
+	border-radius: 22rpx;
+	background-color: #fff;
+
+	.img {
+		margin-top: 50rpx;
+		width: 98rpx;
+		height: 98rpx;
+	}
+
+	.popup_text {
+		margin-top: 20rpx;
+		color: #0f194d;
+		font-size: 28rpx;
+	}
+
+	.popup_btn {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin-top: 50rpx;
+		width: 220rpx;
+		height: 76rpx;
+		color: #fff;
+		font-size: 25rpx;
+		border-radius: 43rpx;
+		background: linear-gradient(90deg, #1e7dfb 0%, #1b75eb 100%);
+	}
+}
 </style>
 </style>

BIN
static/success.png


+ 8 - 0
uni_modules/uni-popup/changelog.md

@@ -1,3 +1,11 @@
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
 ## 1.7.9(2022-04-02)
 ## 1.7.9(2022-04-02)
 - 修复 弹出层内部无法滚动的bug
 - 修复 弹出层内部无法滚动的bug
 ## 1.7.8(2022-03-28)
 ## 1.7.8(2022-03-28)

+ 5 - 1
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -10,7 +10,7 @@
 		</view>
 		</view>
 		<view v-else class="uni-dialog-content">
 		<view v-else class="uni-dialog-content">
 			<slot>
 			<slot>
-				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+				<input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
 			</slot>
 			</slot>
 		</view>
 		</view>
 		<view class="uni-dialog-button-group">
 		<view class="uni-dialog-button-group">
@@ -57,6 +57,10 @@
 		mixins: [popup],
 		mixins: [popup],
 		emits:['confirm','close'],
 		emits:['confirm','close'],
 		props: {
 		props: {
+			inputType:{
+				type: String,
+				default: 'text'
+			},
 			value: {
 			value: {
 				type: [String, Number],
 				type: [String, Number],
 				default: ''
 				default: ''

+ 3 - 9
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
-	<view v-if="showPopup||onceRender" v-show="showPopup"  class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
 		<view @touchstart="touchstart">
 		<view @touchstart="touchstart">
 			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
 			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
 				:duration="duration" :show="showTrans" @click="onTap" />
 				:duration="duration" :show="showTrans" @click="onTap" />
 			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
 			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
-				:show="showTrans" @click="onTap" :once-render="onceRender">
+				:show="showTrans" @click="onTap">
 				<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
 				<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
 					<slot />
 					<slot />
 				</view>
 				</view>
@@ -86,11 +86,6 @@
 				type: String,
 				type: String,
 				default: 'rgba(0, 0, 0, 0.4)'
 				default: 'rgba(0, 0, 0, 0.4)'
 			},
 			},
-			// 指定使用v-show指令,不重新渲染Pop组件
-			onceRender:{
-				type:Boolean,
-				default:false
-			},
 		},
 		},
 
 
 		watch: {
 		watch: {
@@ -274,8 +269,7 @@
 			open(direction) {
 			open(direction) {
 				// fix by mehaotian 处理快速打开关闭的情况
 				// fix by mehaotian 处理快速打开关闭的情况
 				if (this.showPopup) {
 				if (this.showPopup) {
-					clearTimeout(this.timer)
-					this.showPopup = false
+					return
 				}
 				}
 				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
 				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
 				if (!(direction && innerType.indexOf(direction) !== -1)) {
 				if (!(direction && innerType.indexOf(direction) !== -1)) {

+ 5 - 8
uni_modules/uni-popup/package.json

@@ -1,7 +1,7 @@
 {
 {
 	"id": "uni-popup",
 	"id": "uni-popup",
 	"displayName": "uni-popup 弹出层",
 	"displayName": "uni-popup 弹出层",
-	"version": "1.7.9",
+	"version": "1.8.3",
 	"description": " Popup 组件,提供常用的弹层",
 	"description": " Popup 组件,提供常用的弹层",
 	"keywords": [
 	"keywords": [
         "uni-ui",
         "uni-ui",
@@ -17,12 +17,8 @@
 	"directories": {
 	"directories": {
 		"example": "../../temps/example_temps"
 		"example": "../../temps/example_temps"
 	},
 	},
-	"dcloudext": {
-		"category": [
-			"前端组件",
-			"通用组件"
-		],
-		"sale": {
+    "dcloudext": {
+        "sale": {
 			"regular": {
 			"regular": {
 				"price": "0.00"
 				"price": "0.00"
 			},
 			},
@@ -38,7 +34,8 @@
 			"data": "无",
 			"data": "无",
 			"permissions": "无"
 			"permissions": "无"
 		},
 		},
-		"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
 	},
 	},
 	"uni_modules": {
 	"uni_modules": {
 		"dependencies": [
 		"dependencies": [

+ 2 - 0
uni_modules/uni-transition/changelog.md

@@ -1,3 +1,5 @@
+## 1.3.2(2023-05-04)
+- 修复 NVUE 平台报错的问题
 ## 1.3.1(2021-11-23)
 ## 1.3.1(2021-11-23)
 - 修复 init 方法初始化问题
 - 修复 init 方法初始化问题
 ## 1.3.0(2021-11-19)
 ## 1.3.0(2021-11-19)

+ 4 - 1
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
 class MPAnimation {
 class MPAnimation {
 	constructor(options, _this) {
 	constructor(options, _this) {
 		this.options = options
 		this.options = options
-		this.animation = uni.createAnimation(options)
+		// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
+		this.animation = uni.createAnimation({
+			...options
+		})
 		this.currentStepAnimates = {}
 		this.currentStepAnimates = {}
 		this.next = 0
 		this.next = 0
 		this.$ = _this
 		this.$ = _this

+ 6 - 1
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -1,5 +1,10 @@
 <template>
 <template>
-	<view v-if="isShow||onceRender" v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #ifndef APP-NVUE -->
+  <view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
+  <!-- #ifdef APP-NVUE -->
+  <view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+  <!-- #endif -->
 </template>
 </template>
 
 
 <script>
 <script>

+ 4 - 7
uni_modules/uni-transition/package.json

@@ -1,7 +1,7 @@
 {
 {
   "id": "uni-transition",
   "id": "uni-transition",
   "displayName": "uni-transition 过渡动画",
   "displayName": "uni-transition 过渡动画",
-  "version": "1.3.1",
+  "version": "1.3.2",
   "description": "元素的简单过渡动画",
   "description": "元素的简单过渡动画",
   "keywords": [
   "keywords": [
     "uni-ui",
     "uni-ui",
@@ -17,11 +17,7 @@
   "directories": {
   "directories": {
     "example": "../../temps/example_temps"
     "example": "../../temps/example_temps"
   },
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
     "sale": {
       "regular": {
       "regular": {
         "price": "0.00"
         "price": "0.00"
@@ -38,7 +34,8 @@
       "data": "无",
       "data": "无",
       "permissions": "无"
       "permissions": "无"
     },
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   },
   "uni_modules": {
   "uni_modules": {
     "dependencies": ["uni-scss"],
     "dependencies": ["uni-scss"],

+ 100 - 17
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -7,14 +7,16 @@ if (!Array) {
   const _easycom_uni_data_select2 = common_vendor.resolveComponent("uni-data-select");
   const _easycom_uni_data_select2 = common_vendor.resolveComponent("uni-data-select");
   const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
   const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
   const _easycom_uni_file_picker2 = common_vendor.resolveComponent("uni-file-picker");
   const _easycom_uni_file_picker2 = common_vendor.resolveComponent("uni-file-picker");
-  (_easycom_uni_easyinput2 + _easycom_uni_data_select2 + _easycom_uni_data_checkbox2 + _easycom_uni_file_picker2)();
+  const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
+  (_easycom_uni_easyinput2 + _easycom_uni_data_select2 + _easycom_uni_data_checkbox2 + _easycom_uni_file_picker2 + _easycom_uni_popup2)();
 }
 }
 const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
 const _easycom_uni_easyinput = () => "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js";
 const _easycom_uni_data_select = () => "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js";
 const _easycom_uni_data_select = () => "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.js";
 const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
 const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
 const _easycom_uni_file_picker = () => "../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js";
 const _easycom_uni_file_picker = () => "../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js";
+const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
 if (!Math) {
 if (!Math) {
-  (_easycom_uni_easyinput + _easycom_uni_data_select + _easycom_uni_data_checkbox + _easycom_uni_file_picker)();
+  (_easycom_uni_easyinput + _easycom_uni_data_select + _easycom_uni_data_checkbox + _easycom_uni_file_picker + _easycom_uni_popup)();
 }
 }
 const _sfc_main = {
 const _sfc_main = {
   __name: "index",
   __name: "index",
@@ -34,8 +36,10 @@ const _sfc_main = {
     const projectAmount = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectAmount : "");
     const projectAmount = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectAmount : "");
     const biddingTime = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).biddingTime : "");
     const biddingTime = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).biddingTime : "");
     const industry = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).industry : "");
     const industry = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).industry : "");
+    const isAzt = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).isAzt : "");
     const productType = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).productType : []);
     const productType = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).productType : []);
     const projectInformation = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectInformation : "");
     const projectInformation = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectInformation : "");
+    const projectParams = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectParams : "");
     const projectImgList = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectImgList : []);
     const projectImgList = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).projectImgList : []);
     const subImgList = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).subImgList : []);
     const subImgList = common_vendor.ref(common_vendor.index.getStorageSync("form_content") ? JSON.parse(common_vendor.index.getStorageSync("form_content")).subImgList : []);
     const wxPhone = common_vendor.ref(common_vendor.index.getStorageSync("wxPhone") || "");
     const wxPhone = common_vendor.ref(common_vendor.index.getStorageSync("wxPhone") || "");
@@ -73,6 +77,16 @@ const _sfc_main = {
         text: "其他"
         text: "其他"
       }
       }
     ]);
     ]);
+    const range_azt = common_vendor.ref([
+      {
+        value: 0,
+        text: "是"
+      },
+      {
+        value: 1,
+        text: "否"
+      }
+    ]);
     const hobby = common_vendor.ref([
     const hobby = common_vendor.ref([
       {
       {
         text: "网络",
         text: "网络",
@@ -110,6 +124,46 @@ const _sfc_main = {
       }
       }
     };
     };
     const filePicker = common_vendor.ref(null);
     const filePicker = common_vendor.ref(null);
+    const popup = common_vendor.ref(null);
+    const templateOrder = common_vendor.ref("I3o8CRAiaaNbug3Ukkmv1t-pCIbzxU8OicqMWvdR9lc");
+    const handleSubscribe = () => {
+      popup.value.close();
+      common_vendor.index.getSetting({
+        withSubscriptions: true,
+        success: (res) => {
+          if (res.subscriptionsSetting[templateOrder.value] !== "reject") {
+            common_vendor.index.requestSubscribeMessage({
+              tmplIds: [templateOrder.value],
+              success: (res2) => {
+                if (res2[templateOrder.value] !== "reject") {
+                  console.log("成功");
+                } else {
+                  console.log("拒绝2");
+                }
+              },
+              fail(err) {
+                console.log(err);
+                console.log("调用失败");
+              }
+            });
+          } else {
+            common_vendor.index.showModal({
+              content: "当前没有订阅,是否去设置打开?",
+              confirmText: "确认",
+              cancelText: "取消",
+              success: (res2) => {
+                if (res2.confirm) {
+                  common_vendor.index.openSetting({
+                    success: (res3) => {
+                    }
+                  });
+                }
+              }
+            });
+          }
+        }
+      });
+    };
     const bindDateChange = (e) => {
     const bindDateChange = (e) => {
       const val = e.detail.value;
       const val = e.detail.value;
       biddingTime.value = val;
       biddingTime.value = val;
@@ -126,8 +180,10 @@ const _sfc_main = {
           projectAmount: projectAmount.value,
           projectAmount: projectAmount.value,
           biddingTime: biddingTime.value,
           biddingTime: biddingTime.value,
           industry: industry.value,
           industry: industry.value,
+          isAzt: isAzt.value,
           productType: productType.value,
           productType: productType.value,
           projectInformation: projectInformation.value,
           projectInformation: projectInformation.value,
+          projectParams: projectParams.value,
           projectImgList: projectImgList.value,
           projectImgList: projectImgList.value,
           subImgList: subImgList.value
           subImgList: subImgList.value
         };
         };
@@ -240,6 +296,13 @@ const _sfc_main = {
         });
         });
         return false;
         return false;
       }
       }
+      if (isAzt.value === "") {
+        common_vendor.index.showToast({
+          title: "请选择是否授权",
+          icon: "none"
+        });
+        return false;
+      }
       if (productType.value.length == 0) {
       if (productType.value.length == 0) {
         common_vendor.index.showToast({
         common_vendor.index.showToast({
           title: "请选择产品类型",
           title: "请选择产品类型",
@@ -273,17 +336,16 @@ const _sfc_main = {
         }
         }
       });
       });
       if (res.success && res.code == 1) {
       if (res.success && res.code == 1) {
-        common_vendor.index.showToast({
-          title: "提交成功",
-          duration: 3e3
-        });
+        popup.value.open();
         clientName.value = "";
         clientName.value = "";
         projectName.value = "";
         projectName.value = "";
         projectAmount.value = "";
         projectAmount.value = "";
         biddingTime.value = "";
         biddingTime.value = "";
         industry.value = "";
         industry.value = "";
+        isAzt.value = "";
         productType.value = [];
         productType.value = [];
         projectInformation.value = "";
         projectInformation.value = "";
+        projectParams.value = "";
         subImgList.value = [];
         subImgList.value = [];
         projectImgList.value = [];
         projectImgList.value = [];
         filePicker.value.clearFiles();
         filePicker.value.clearFiles();
@@ -392,25 +454,38 @@ const _sfc_main = {
           localdata: range.value,
           localdata: range.value,
           modelValue: industry.value
           modelValue: industry.value
         }),
         }),
-        t: common_vendor.o(($event) => productType.value = $event),
+        t: common_vendor.o(($event) => isAzt.value = $event),
         v: common_vendor.p({
         v: common_vendor.p({
+          placeholder: "请选择是否授权",
+          localdata: range_azt.value,
+          modelValue: isAzt.value
+        }),
+        w: common_vendor.o(($event) => productType.value = $event),
+        x: common_vendor.p({
           multiple: true,
           multiple: true,
           localdata: hobby.value,
           localdata: hobby.value,
           modelValue: productType.value
           modelValue: productType.value
         }),
         }),
-        w: common_vendor.o(($event) => projectInformation.value = $event),
-        x: common_vendor.p({
+        y: common_vendor.o(($event) => projectInformation.value = $event),
+        z: common_vendor.p({
           type: "textarea",
           type: "textarea",
           maxlength: -1,
           maxlength: -1,
           placeholder: "建议填写竞争情况 , 客户情况",
           placeholder: "建议填写竞争情况 , 客户情况",
           modelValue: projectInformation.value
           modelValue: projectInformation.value
         }),
         }),
-        y: common_vendor.sr(filePicker, "1cf27b2a-10", {
+        A: common_vendor.o(($event) => projectParams.value = $event),
+        B: common_vendor.p({
+          type: "textarea",
+          maxlength: -1,
+          placeholder: "建议填写加入的控标参数情况",
+          modelValue: projectParams.value
+        }),
+        C: common_vendor.sr(filePicker, "1cf27b2a-12", {
           "k": "filePicker"
           "k": "filePicker"
         }),
         }),
-        z: common_vendor.o(select),
-        A: common_vendor.o(handleDelete),
-        B: common_vendor.p({
+        D: common_vendor.o(select),
+        E: common_vendor.o(handleDelete),
+        F: common_vendor.p({
           limit: "3",
           limit: "3",
           title: "最多上传3张图片",
           title: "最多上传3张图片",
           value: projectImgList.value,
           value: projectImgList.value,
@@ -418,10 +493,18 @@ const _sfc_main = {
           ["image-styles"]: imageStyles,
           ["image-styles"]: imageStyles,
           mode: "grid"
           mode: "grid"
         }),
         }),
-        C: common_vendor.o(handleSubmit),
-        D: common_vendor.unref(cw) + "px",
-        E: common_vendor.unref(cw) + "px",
-        F: -1
+        G: common_vendor.o(handleSubmit),
+        H: common_vendor.o(handleSubscribe),
+        I: common_vendor.sr(popup, "1cf27b2a-13", {
+          "k": "popup"
+        }),
+        J: common_vendor.p({
+          type: "center",
+          ["is-mask-click"]: false
+        }),
+        K: common_vendor.unref(cw) + "px",
+        L: common_vendor.unref(cw) + "px",
+        M: -1
       };
       };
     };
     };
   }
   }

+ 2 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.json

@@ -4,6 +4,7 @@
     "uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
     "uni-easyinput": "../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput",
     "uni-data-select": "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select",
     "uni-data-select": "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select",
     "uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
     "uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
-    "uni-file-picker": "../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker"
+    "uni-file-picker": "../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker",
+    "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
   }
   }
 }
 }

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 31 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -53,4 +53,35 @@
   text-align: center;
   text-align: center;
   font-size: 24rpx;
   font-size: 24rpx;
   color: #999999;
   color: #999999;
+}
+.popup_body.data-v-1cf27b2a {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 480rpx;
+  height: 400rpx;
+  border-radius: 22rpx;
+  background-color: #fff;
+}
+.popup_body .img.data-v-1cf27b2a {
+  margin-top: 50rpx;
+  width: 98rpx;
+  height: 98rpx;
+}
+.popup_body .popup_text.data-v-1cf27b2a {
+  margin-top: 20rpx;
+  color: #0f194d;
+  font-size: 28rpx;
+}
+.popup_body .popup_btn.data-v-1cf27b2a {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 50rpx;
+  width: 220rpx;
+  height: 76rpx;
+  color: #fff;
+  font-size: 25rpx;
+  border-radius: 43rpx;
+  background: linear-gradient(90deg, #1e7dfb 0%, #1b75eb 100%);
 }
 }

+ 93 - 93
util/imageCompress.js

@@ -1,97 +1,97 @@
- //通过canvas将图片压缩至指定大小
+//通过canvas将图片压缩至指定大小
 
 
- //判断图片大小是否满足需求,limitSize的单位是kb
- function imageSizeIsLessLimitSize(imagePath, limitSize, lessCallback, moreCallback) {
- 	//获取文件信息
- 	wx.getFileSystemManager().getFileInfo({
- 		filePath: imagePath,
- 		success: (res) => {
- 			// console.log("压缩前图片大小", res.size / 1024, 'kb');
- 			//如果图片太大了走moreCallback
- 			if (res.size > 1024 * limitSize) {
- 				moreCallback()
- 			}
- 			//图片满足要求了走lessCallback
- 			else {
- 				lessCallback()
- 			}
- 		}
- 	})
- }
+//判断图片大小是否满足需求,limitSize的单位是kb
+function imageSizeIsLessLimitSize(imagePath, limitSize, lessCallback, moreCallback) {
+	//获取文件信息
+	wx.getFileSystemManager().getFileInfo({
+		filePath: imagePath,
+		success: (res) => {
+			// console.log("压缩前图片大小", res.size / 1024, 'kb');
+			//如果图片太大了走moreCallback
+			if (res.size > 1024 * limitSize) {
+				moreCallback()
+			}
+			//图片满足要求了走lessCallback
+			else {
+				lessCallback()
+			}
+		}
+	})
+}
 
 
- //将图片画在画布上并获取画好之后的图片的路径
- function getCanvasImage(canvasId, imagePath, imageW, imageH, getImgSuccess) {
- 	//创建画布内容
- 	const ctx = wx.createCanvasContext(canvasId);
- 	//图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
- 	ctx.drawImage(imagePath, 0, 0, imageW, imageH);
- 	//这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
- 	ctx.draw(false, setTimeout(function() {
- 		//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
- 		wx.canvasToTempFilePath({
- 			canvasId: canvasId,
- 			x: 0,
- 			y: 0,
- 			width: imageW,
- 			height: imageH,
- 			quality: 1, //最高质量
- 			success: (res) => {
- 				//将取出的图片路径通过回调函数返回
- 				getImgSuccess(res.tempFilePath);
- 			}
- 		})
- 	}, 200));
- }
+//将图片画在画布上并获取画好之后的图片的路径
+function getCanvasImage(canvasId, imagePath, imageW, imageH, getImgSuccess) {
+	//创建画布内容
+	const ctx = wx.createCanvasContext(canvasId);
+	//图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
+	ctx.drawImage(imagePath, 0, 0, imageW, imageH);
+	//这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
+	ctx.draw(false, setTimeout(function() {
+		//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
+		wx.canvasToTempFilePath({
+			canvasId: canvasId,
+			x: 0,
+			y: 0,
+			width: imageW,
+			height: imageH,
+			quality: 1, //最高质量
+			success: (res) => {
+				//将取出的图片路径通过回调函数返回
+				getImgSuccess(res.tempFilePath);
+			}
+		})
+	}, 200));
+}
 
 
- //主函数,默认限制大小1024kb即1mb,drawWidth是绘画区域的大小
- //初始值传入为画布自身的边长(我们这是一个正方形的画布)
- function getLessLimitSizeImage(canvasId, imagePath, limitSize = 1024, drawWidth, callback) {
- 	//判断图片尺寸是否满足要求
- 	imageSizeIsLessLimitSize(imagePath, limitSize,
- 		(lessRes) => {
- 			//满足要求走callback,将压缩后的文件路径返回
- 			callback(imagePath);
- 		},
- 		(moreRes) => {
- 			//不满足要求需要压缩的时候
- 			wx.getImageInfo({
- 				src: imagePath,
- 				success: (imageInfo) => {
- 					let maxSide = Math.max(imageInfo.width, imageInfo.height);
- 					let windowW = drawWidth;
- 					let scale = 1;
- 					/*
- 					这里的目的是当绘画区域缩小的比图片自身尺寸还要小的时候
- 					取图片长宽的最大值,然后和当前绘画区域计算出需要放缩的比例
- 					然后再画经过放缩后的尺寸,保证画出的一定是一个完整的图片。由于每次递归绘画区域都会缩小,
- 					所以不用担心scale永远都是1绘画尺寸永远不变的情况,只要不满足压缩后体积的要求
- 					就会缩小绘画区域,早晚会有绘画区域小于图片尺寸的情况发生
- 					*/
- 					if (maxSide > windowW) {
- 						scale = windowW / maxSide;
- 					}
- 					//trunc是去掉小数
- 					let imageW = Math.trunc(imageInfo.width * scale);
- 					let imageH = Math.trunc(imageInfo.height * scale);
- 					// console.log('调用压缩', imageW, imageH);
- 					//图片在规定绘画区域上画并获取新的图片的path
- 					getCanvasImage(canvasId, imagePath, imageW, imageH,
- 						(pressImgPath) => {
- 							/*
- 							再去检查是否满足要求,始终缩小绘画区域,让图片适配绘画区域
- 							这里乘以0.95是必须的,如果不缩小绘画区域,会出现尺寸比绘画区域小,
- 							而体积比要求压缩体积大的情况出现,就会无穷递归下去,因为scale的值永远是1
- 							但0.95不是固定的,你可以根据需要自己改,0到1之间,越小则绘画区域缩小的越快
- 							但不建议取得太小,绘画区域缩小的太快,压出来的将总是很糊的
- 							*/
- 							getLessLimitSizeImage(canvasId, pressImgPath, limitSize, drawWidth *
- 								0.95, callback);
- 						}
- 					)
- 				}
- 			})
- 		}
- 	)
- }
+//主函数,默认限制大小1024kb即1mb,drawWidth是绘画区域的大小
+//初始值传入为画布自身的边长(我们这是一个正方形的画布)
+function getLessLimitSizeImage(canvasId, imagePath, limitSize = 1024, drawWidth, callback) {
+	//判断图片尺寸是否满足要求
+	imageSizeIsLessLimitSize(imagePath, limitSize,
+		(lessRes) => {
+			//满足要求走callback,将压缩后的文件路径返回
+			callback(imagePath);
+		},
+		(moreRes) => {
+			//不满足要求需要压缩的时候
+			wx.getImageInfo({
+				src: imagePath,
+				success: (imageInfo) => {
+					let maxSide = Math.max(imageInfo.width, imageInfo.height);
+					let windowW = drawWidth;
+					let scale = 1;
+					/*
+					这里的目的是当绘画区域缩小的比图片自身尺寸还要小的时候
+					取图片长宽的最大值,然后和当前绘画区域计算出需要放缩的比例
+					然后再画经过放缩后的尺寸,保证画出的一定是一个完整的图片。由于每次递归绘画区域都会缩小,
+					所以不用担心scale永远都是1绘画尺寸永远不变的情况,只要不满足压缩后体积的要求
+					就会缩小绘画区域,早晚会有绘画区域小于图片尺寸的情况发生
+					*/
+					if (maxSide > windowW) {
+						scale = windowW / maxSide;
+					}
+					//trunc是去掉小数
+					let imageW = Math.trunc(imageInfo.width * scale);
+					let imageH = Math.trunc(imageInfo.height * scale);
+					// console.log('调用压缩', imageW, imageH);
+					//图片在规定绘画区域上画并获取新的图片的path
+					getCanvasImage(canvasId, imagePath, imageW, imageH,
+						(pressImgPath) => {
+							/*
+							再去检查是否满足要求,始终缩小绘画区域,让图片适配绘画区域
+							这里乘以0.95是必须的,如果不缩小绘画区域,会出现尺寸比绘画区域小,
+							而体积比要求压缩体积大的情况出现,就会无穷递归下去,因为scale的值永远是1
+							但0.95不是固定的,你可以根据需要自己改,0到1之间,越小则绘画区域缩小的越快
+							但不建议取得太小,绘画区域缩小的太快,压出来的将总是很糊的
+							*/
+							getLessLimitSizeImage(canvasId, pressImgPath, limitSize, drawWidth *
+								0.95, callback);
+						}
+					)
+				}
+			})
+		}
+	)
+}
 
 
- export default getLessLimitSizeImage
+export default getLessLimitSizeImage