caichengyu 9 時間 前
コミット
5ea012566e

+ 2 - 2
common/config.js

@@ -1,7 +1,7 @@
 // test 测试环境
 const test = {
-	BASE_URL: "https://testapi.xyyxt.net",
-	// BASE_URL: "http://120.79.166.78:19012",
+	// BASE_URL: "https://testapi.xyyxt.net",
+	BASE_URL: "http://120.79.166.78:19012",
 	// BASE_URL: "http://192.168.1.123:5055",
 	BASE_IMG_URL: "https://file-dev.xyyxt.net/",
 	domain: "h.xyyxt.net",

+ 7 - 0
common/httpList/login.js

@@ -223,5 +223,12 @@ export default {
 			data: data,
 			noToken: true,
 		});
+	},//用户操作日志
+	userloglist(data) {
+		return myRequest({
+			url: '/app/user/controls/record',
+			method: 'get',
+            data: data,
+		})
 	},
 };

+ 236 - 0
components/popup/technician.vue

@@ -0,0 +1,236 @@
+<!-- <template>
+	<nav-bar title="填写资料"></nav-bar>
+	  <view style="margin-top: 30rpx; padding: 0 40rpx">
+	    <u-form :model="form" ref="uForm" :error-type="errorType">
+	      <template v-for="(item, index) in listData">
+	        <u-form-item
+	          :key="index"
+	          v-if="item.type === 'input'"
+	          :label="item.label"
+	          :required="item.required"
+	          :label-width="auto"
+	          :prop="item.required ? item.prop : ''"
+	        >
+	          <u-input
+	            v-model="form[item.key]"
+	            :disabled="item.disabled"
+	            :placeholder="`请输入${item.label}`"
+	          />
+	        </u-form-item>
+	        <u-form-item
+	          :key="index"
+	          v-else-if="item.type === 'radio'"
+	          :label="item.label"
+	          :required="item.required"
+	          :label-width="auto"
+	          :prop="item.required ? item.prop : ''"
+	        >
+	          <u-radio-group v-model="form[item.key]">
+	            <u-radio
+	              v-for="(item1, i) in backDictArr(item)"
+	              :key="i"
+	              :name="item1.value"
+	              :disabled="item.disabled"
+	            >
+	              {{ item1.label }}
+	            </u-radio>
+	          </u-radio-group>
+	        </u-form-item>
+	        <u-form-item
+	          :key="index"
+	          v-else-if="item.type === 'select'"
+	          :label="item.label"
+	          :required="item.required"
+	          :label-width="auto"
+	          :prop="item.required ? item.prop : ''"
+	        >
+	          <u-input
+	            @click="open(item)"
+	            v-model="form[item.key]"
+	            type="select"
+	            :placeholder="`请选择${item.label}`"
+	          />
+	          <u-select
+	            v-model="item.show"
+	            :list="backDictArr(item)"
+	            :default-value="defaultValue"
+	            @confirm="
+	              (e) => {
+	                confirm(e, item.key);
+	              }
+	            "
+	          ></u-select>
+	        </u-form-item>
+	      </template>
+	    </u-form>
+	  </view>
+	  <view @click="submitForm" class="submit_btn">提交资料</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters, mapActions } from "vuex";
+export default {
+  name: "SaasMiniprogramInfoFill",
+
+  data() {
+    return {
+      listData: [],
+      form: {},
+      options: {},
+      errorType: ["message"],
+      auto: "180rpx",
+      defaultValue: [0],
+      isUploading: false,
+      rules: {
+        realname: [
+          {
+            required: true,
+            message: "请输入姓名",
+            trigger: ["change", "blur"],
+          },
+        ],
+        sex: [
+          {
+            validator: (rule, value, callback) => {
+              return !!value;
+            },
+            message: "请选择性别",
+            trigger: "change",
+          },
+        ],
+        idCard: [
+          {
+            required: true,
+            message: "请输入身份证号",
+            trigger: ["change", "blur"],
+          },
+        ],
+        eduLevel: [
+          {
+            required: true,
+            message: "请选择学历",
+            trigger: ["change", "blur"],
+          },
+        ],
+        companyName: [
+          {
+            required: true,
+            message: "请输入工作单位",
+            trigger: ["change", "blur"],
+          },
+        ],
+      },
+    };
+  },
+
+  async onLoad(options) {
+    this.options = options;
+    !this.userInfo && (await this.getUserInfo());
+    this.init();
+  },
+
+  methods: {
+    ...mapActions(["getUserInfo"]),
+    init() {
+      let { keys } = this.options;
+      if (!keys) {
+        return;
+      }
+      keys.split(",").forEach((key) => {
+        let item = list.find((item) => item.key == key);
+        if (item) {
+          const value = this.userInfo[key];
+          this.$set(this.form, key, value);
+          this.listData.push({ ...item, disabled: !!value });
+        }
+      });
+    },
+    backDictArr(item) {
+      let { dictKey, list } = item;
+      if (dictKey) {
+        if (!this.dictObj) {
+          return [];
+        }
+        list = this.dictObj[dictKey].map((e, i) => {
+          return { label: e, value: i };
+        });
+        item.list = list;
+      }
+      return list;
+    },
+    open(item) {
+      if (item.disabled) {
+        return;
+      }
+      let { key, list } = item;
+      const option = list.find((e) => e.label === this.form[key]);
+      this.defaultValue = [option ? option.value : 0];
+      item.show = true;
+    },
+    confirm(e, key) {
+      this.form[key] = e[0].label;
+    },
+    submitForm() {
+      if (this.isUploading) {
+        return;
+      }
+      this.isUploading = true;
+      this.$nextTick(() => {
+        this.$refs.uForm.validate((valid) => {
+          if (valid) {
+            this.$api
+              .appuserInfo(this.form)
+              .then((res) => {
+                if (res.data.code === 200) {
+                  uni.showToast({
+                    title: "提交成功",
+                    icon: "none",
+                  });
+                  this.getUserInfo();
+                  setTimeout(() => {
+                    uni.navigateBack();
+                  }, 1500);
+                } else {
+                  uni.showToast({
+                    title: res.data.msg,
+                    icon: "none",
+                  });
+                }
+              })
+              .finally(() => {
+                this.isUploading = false;
+              });
+          } else {
+            this.isUploading = false;
+            console.log(this.form);
+            console.log("验证失败");
+          }
+        });
+      });
+    },
+  },
+  computed: {
+    ...mapGetters(["userInfo", "dictObj"]),
+  },
+  onReady(res) {
+    this.$refs.uForm.setRules(this.rules);
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.submit_btn {
+  width: 526rpx;
+  height: 80rpx;
+  background: #007aff;
+  border-radius: 40rpx;
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  position: absolute;
+  left: 50%;
+  margin-left: -263rpx;
+  bottom: 140rpx;
+}
+</style> -->

+ 11 - 0
pages.json

@@ -288,6 +288,17 @@
 						}
 					}
 				},
+				{
+					"path": "wd/my_log",
+					"style": {
+						"navigationBarTitleText": "操作日志",
+						"navigationStyle": "custom", // 隐藏系统导航栏
+						"app-plus": {
+							"titleNView": false, //禁用原生导航栏
+							"bounce": "none"
+						}
+					}
+				},
 				{
 					"path": "bank/free_question",
 					"style": {

+ 9 - 0
pages/wd/index.vue

@@ -98,6 +98,15 @@
 						<u-icon name="arrow-right" color="#999" size="24"></u-icon>
 					</view>
 				</navigator>
+				<navigator hover-class="none" url="/pages2/wd/my_log" class="menu_box">
+					<view class="box_left">
+						<image src="/static/icon/my_icon1.png" class="my_icon"></image>
+						<view>操作日志</view>
+					</view>
+					<view class="box_right">
+						<u-icon name="arrow-right" color="#999" size="24"></u-icon>
+					</view>
+				</navigator>
 			</view>
 			<view class="logout" @click="logout">退出</view>
 		</view>

+ 1 - 1
pages2/bank/questionBankAllExplain.vue

@@ -638,7 +638,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确","错误"],
       show: false,
       showDialog: false,
       bankList: [],

+ 1 - 1
pages2/bank/questionBankExplain.vue

@@ -454,7 +454,7 @@ export default {
       showpopups: false,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确","错误"],
       show: false,
       showDialog: false,
       bankList: [],

+ 1 - 1
pages2/msg/index.vue

@@ -2,7 +2,7 @@
 	<view>
 		<nav-bar title="我的消息"></nav-bar>
 		<view v-if="!listData.length"><u-empty text="消息列表为空" mode="message"></u-empty></view>
-		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;">
+		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;opacity: 0.7">
 			<navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}&orderGoodsId=${item.orderGoodsId}&goodsId=${item.goodsId}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
 				<view class="headers">
 					<view class="header_left">

+ 9 - 9
pages2/verify/input.vue

@@ -58,13 +58,13 @@
 							<u-input :disabled="disable" v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
 						</u-form-item>
 						<u-form-item :key="index" v-if="item.inputType == 2" :label="item.fieldName" :label-width="auto"
-							:required="item.required" :prop="item.required ? item.fieldKey : ''">
-							<picker :disabled="disable" :key="item.fieldKey"
+							:required="item.required" :prop="item.required ? item.fieldKey : ''" :disabled="(item.fieldKey === 'apply_post')">
+							<picker :disabled="disable||(item.fieldKey === 'apply_post')" :key="item.fieldKey"
 								@change="bindPickerChange(item.fieldKey, $event)" :value="form[item.fieldKey]"
 								:range="getarrays(item.fieldKey)">
 								<view class="picker">
 									{{ returnName(item.fieldKey) }}
-									<image src="@/static/icon/clears.png" v-if="clearWatch(item.fieldKey)"
+									<image src="@/static/icon/clears.png" v-if="clearWatch(item.fieldKey)&&item.fieldKey !== 'apply_post'"
 										@click.stop="clearFun(item.fieldKey)" mode="" style="
                       width: 30rpx;
                       height: 30rpx;
@@ -708,12 +708,12 @@
 								"🚀 ~ file: input.vue:908 ~ .then ~ goodsData:",
 								this.goodsData
 							);
-							// if (this.goodsData.categoryName) {
-							//   this.$set(this.form, "apply_post", this.goodsData.categoryName);
-							//   if (this.goodsData.categoryName) {
-							//     this.apply_post_disabled = true;
-							//   }
-							// }
+							if (this.goodsData.categoryName) {
+							  this.$set(this.form, "apply_post", this.goodsData.categoryName);
+							  if (this.goodsData.categoryName) {
+							    this.apply_post_disabled = true;
+							  }
+							}
 							if (this.userInfo && this.userInfo.companyName) {
 								this.$set(this.form, "work_unit", this.userInfo.companyName);
 							}

+ 172 - 0
pages2/wd/my_log.vue

@@ -0,0 +1,172 @@
+<template>
+	<view>
+		<nav-bar title="操作日志"></nav-bar>
+		<view v-if="!listData.length"><u-empty text="操作日志为空" mode="message"></u-empty></view>
+		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;" class="item">
+			<view class="headers">
+					<view class="header_left">
+						<image :src="item.type === 1||item.type === 2 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>
+						<text class="msgTitle">
+							{{ (item.type === 1||item.type === 2 ? '登录日志' : '操作日志')}}
+						</text>
+					</view>
+					<view class="header_right">{{ $method.timestampToTime(item.createTime, false) }}</view>
+				</view>
+				<u-line color="#D6D6DB" />
+				<view style="display: flex;justify-content: space-between;padding: 25rpx;color: #666666;">
+					操作内容:{{ item.type==1?"登录":item.type==2?"退出登录":item.type==3?"修改密码":item.type==4?"修改个人信息":"其他"}}
+				</view>
+				<u-line color="#D6D6DB" />
+		</view>
+		<u-divider v-if="totals !== 0 && listData.length === totals" bg-color="#eaeef1">到底了</u-divider>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+export default {
+	components: {},
+	data() {
+		return {
+			current: 0,
+			img1: '/static/icon/msg_icon1.png',
+			img2: '/static/icon/msg_icon2.png',
+			listData: [],
+			totals: 0,
+			formData: {
+				pageNum: 1,
+				pageSize: 10
+			}
+		};
+	},
+	onPullDownRefresh() {
+		this.formData.pageNum = 1
+		this.$api
+			.userloglist(this.formData)
+			.then(res => {
+				if (res.data.code === 200) {
+					this.listData = res.data.rows;
+					this.totals = res.data.total;
+				}
+			})
+			.finally(() => {
+				uni.stopPullDownRefresh();
+			});
+	},
+	onLoad(option) {
+		this.$store.getters.dictObj;
+		this.getInfo();
+	},
+	onShow() {
+		// this.getInfo();
+	},
+	onShareAppMessage(res) {
+		return {
+			title: '中正',
+			path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
+		};
+	},
+	methods: {
+		getInfo() {
+			this.$api.userloglist(this.formData).then(res => {
+				if (res.data.code === 200) {
+					this.listData = res.data.rows;
+					this.totals = res.data.total;
+				}
+			});
+		},
+		againGetApi() {
+			this.$api.userloglist(this.formData).then(res => {
+				if (res.data.code === 200) {
+					this.listData = this.listData.concat(res.data.rows);
+				}
+			});
+		}
+	},
+	onReachBottom() {
+		if (this.listData.length < this.totals) {
+			this.formData.pageNum++;
+			this.againGetApi();
+		}
+	},
+	computed: { ...mapGetters(['userInfo']) }
+};
+</script>
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style lang="scss" scoped>
+.btn2 {
+	width: 144rpx;
+	height: 48rpx;
+	background: #ffffff;
+	border: 2rpx solid #007aff;
+	border-radius: 16rpx;
+	text-align: center;
+	line-height: 48rpx;
+	color: #007aff;
+	margin: 0 8rpx;
+}
+.btn1 {
+	width: 144rpx;
+	height: 48rpx;
+	background: #ffffff;
+	border: 2rpx solid #999999;
+	border-radius: 16rpx;
+	text-align: center;
+	line-height: 48rpx;
+	color: #999999;
+	margin: 0 8rpx;
+}
+.item {
+	background: #ffffff;
+	border-radius: 16rpx;
+	padding: 15rpx;
+}
+.priceTag {
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ff2d55;
+	display: flex;
+	flex-direction: row-reverse;
+}
+
+.bottomBox {
+	position: fixed;
+	bottom: 0;
+	width: 100%;
+	left: 0;
+	height: 98rpx;
+	background-color: #ffffff;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 0 30rpx;
+}
+.headers {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	height: 60rpx;
+	.header_left {
+		color: #333333;
+		font-size: 30rpx;
+		font-weight: bold;
+		display: flex;
+		align-items: center;
+	}
+	.header_right {
+		color: #999999;
+		font-size: 24rpx;
+	}
+}
+.msgTitle {
+	width: 420rpx;
+	overflow: hidden;
+	text-overflow:ellipsis; 
+	white-space: nowrap;
+}
+</style>

+ 16 - 1
pages3/course/detail.vue

@@ -175,7 +175,10 @@
 						<view class="share_w">购物车</view>
 					</view>
 				</view>
-				<view style="display: flex; color: #ffffff; align-items: center">
+				<view style="display: flex; color: #ffffff; align-items: center" v-if="detail.educationName=='技工办证'">
+					<view class="btn2" @click="buyBefore()">立即申报 </view>
+				</view>
+				<view style="display: flex; color: #ffffff; align-items: center" v-else>
 					<view class="btn1" v-if="!disCode" @click="addCart()">加入购物车</view>
 					<view class="btn2" @click="buy()">立即购买 </view>
 				</view>
@@ -266,6 +269,7 @@
 	import handoutsBox from "@/components/course/handoutsBox.vue";
 	import courseTree from "@/components/course/courseTree.vue";
 	import myPlayer from "@/components/myPlayer/polyvPlayer.vue";
+	import PopupTechVue from "../../components/popup/technician.vue";
 	import {
 		mapGetters,
 		mapMutations
@@ -275,6 +279,7 @@
 			handoutsBox,
 			courseTree,
 			myPlayer,
+			PopupTechVue,
 		},
 		data() {
 			return {
@@ -854,6 +859,16 @@
 						});
 				});
 			},
+			 //技工证购买前填写申报资料验证
+			   async buyBefore(){
+				   if (this.$method.isGoLogin()) {
+				   	return;
+				   }
+				   let canbuy = await this.ordercheckbuy(this.detail.goodsId);
+				   if (!canbuy) return;
+			       // console.log(this.goodsDetail)
+			       this.$refs.technician.openBoxs(this.goodsDetail.subjectNames,this.goodsDetail.goodsId);
+			    },
 			async buy() {
 				if (this.$method.isGoLogin()) {
 					return;

+ 3 - 3
pages3/news/detail.vue

@@ -56,10 +56,10 @@
 	};
 </script>
 
-<style>
+<style lang="scss" scoped>
 	.html_content {
-		padding: 20rpx;;
-	  img {
+		padding: 20rpx;
+	 &> img {
 	    max-width: 100% !important;
 	    height: auto !important;
 	  }