From d01b40716871f0eb93c8a769f1e4b58357076332 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 04 Nov 2021 10:48:27 +0800
Subject: [PATCH] 活动地图修改
---
vue.config.js | 6 +-
public/grabOrdersMap/js/vueMain.js | 95 ++++++++++++++++++++++++++++++++++-------------
public/grabOrdersMap/css/body.css | 4 ++
public/grabOrdersMap/xcxmap.html | 5 +-
4 files changed, 78 insertions(+), 32 deletions(-)
diff --git a/public/grabOrdersMap/css/body.css b/public/grabOrdersMap/css/body.css
index 611fae4..ea5ef56 100644
--- a/public/grabOrdersMap/css/body.css
+++ b/public/grabOrdersMap/css/body.css
@@ -129,4 +129,8 @@
background-color: #fff;
border-bottom: 1px solid #e8e8e8;
/* margin-bottom: 10px; */
+}
+.customClass{
+ width: 250px;
+ height: 140px;
}
\ No newline at end of file
diff --git a/public/grabOrdersMap/js/vueMain.js b/public/grabOrdersMap/js/vueMain.js
index cb7f94f..7286c40 100644
--- a/public/grabOrdersMap/js/vueMain.js
+++ b/public/grabOrdersMap/js/vueMain.js
@@ -54,33 +54,65 @@
},
methods: {
openAPP(type) {
- console.log(type)
+ // console.log(type)
+ let that = this;
if (type != 1) {
//反馈
uni.navigateTo({
url: '/pages/grabOrders/feedback?data=' + JSON.stringify(this.data)
});
} else {
+ this.$confirm('是否参与活动:' + this.data.rname + "?", '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'success',
+ center: true,
+ customClass: "customClass"
+ }).then(() => {
+ let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
+ dataAppend = that.data;
+ axios.post(url, dataAppend).then(res => {
+ // console.log(res);
+ if (res.data.msg == "抢单成功") {
+ that.data.type = 0;
+ that.$message({
+ message: res.data.msg,
+ type: 'success'
+ });
+ return;
+ }
+ that.$message({
+ message: res.data.msg,
+ type: 'warning'
+ });
+ })
+ }).catch(() => {
+ // this.$message({
+ // type: 'info',
+ // message: '已取消删除'
+ // });
+ });
+ // return;
//抢单
// console.log(this.data)
// let up = this.data.appenUrl == '/api' ? "http://192.168.0.107:85" : this.data.appenUrl;
- let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
- dataAppend = this.data;
- axios.post(url, dataAppend).then(res => {
- console.log(res);
- if (res.data.msg == "抢单成功") {
- this.data.type = 0;
- this.$message({
- message: res.data.msg,
- type: 'success'
- });
- return;
- }
- this.$message({
- message: res.data.msg,
- type: 'warning'
- });
- })
+ // let url = "http://223.82.109.183:2082/api" + "/taskqd/Graborder",
+ // dataAppend = this.data;
+ // axios.post(url, dataAppend).then(res => {
+ // console.log(res);
+ // if (res.data.msg == "抢单成功") {
+ // this.data.type = 0;
+ // this.$message({
+ // message: res.data.msg,
+ // type: 'success'
+ // });
+ // return;
+ // }
+ // this.$message({
+ // message: res.data.msg,
+ // type: 'warning'
+ // });
+ // })
}
},
getDataList() {
@@ -88,15 +120,24 @@
that.beginCome();
},
beginCome() {
- // var data = [{
- // "id": '100000',
- // "place": '无数据',
- // "state": '0',
- // "dtype": '0',
- // "size": '300',
- // "jd": "114.91385",
- // "wd": "25.81051"
- // }]
+ var data = {
+ city: "无数据",
+ content: "无数据",
+ district: "无数据",
+ id: 5,
+ integral: "14",
+ jnum: 2,
+ line: "LINESTRING(115.88518439579809 28.67705200351289,115.89115548582284 28.677382855466767,115.89148633777671 28.675523782583074,115.88565704144649 28.675145666064356,115.88521590550799 28.67700473894805,115.88521590550799 28.67700473894805)",
+ num: 1,
+ province: "无数据",
+ raddress: "",
+ rname: "无数据",
+ rtype: "0",
+ serid: "1123598821738675201,",
+ time: "无数据",
+ url: "http://223.82.109.183:2081/zhba/upload/20211102/07fe327a76a43fa8d3431c73febade22.jpg",
+ type: "0"
+ }
//url解码
this.data = this.getQueryVariable('data') || data;
// this.getdata = data;
diff --git a/public/grabOrdersMap/xcxmap.html b/public/grabOrdersMap/xcxmap.html
index fcd5f95..eae7ec5 100644
--- a/public/grabOrdersMap/xcxmap.html
+++ b/public/grabOrdersMap/xcxmap.html
@@ -32,7 +32,7 @@
<!-- elementui -->
<script src="./lid/elementUi.js"></script>
<!-- <link rel="stylesheet" href="../map/lib/elementUi.css"> -->
- <link rel="stylesheet" href="./css/elementUi.css">
+ <link rel="stylesheet" href="./css/elementUI.css">
<!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
<!-- jqurey -->
@@ -136,7 +136,8 @@
</span>
</div>
<div class="once-c">
- <el-button :type="data.type==1?'success':'primary'" @click="openAPP(data.type)">{{data.type==1?'我参与':'我反馈'}}</el-button>
+ <!-- <el-button :type="data.type==1?'success':'primary'" >{{data.type==1?'我参与':'我反馈'}}</el-button> -->
+ <el-button :type="data.num==data.jnum?'info':(data.type==1?'success':'primary')" @click="openAPP(data.type)" :disabled="data.num==data.jnum">{{data.num==data.jnum?"人数已满":(data.type==1?'我参与':'我反馈')}}</el-button>
</div>
</div>
<!-- </div>
diff --git a/vue.config.js b/vue.config.js
index 2e8bfaf..2db2782 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -41,10 +41,10 @@
// target: 'http://192.168.0.111:83/',
//target: 'http://localhost:82/',
// target: 'http://223.82.109.183:2082/api/',
- // target: 'http://192.168.0.107:85/',//唐
- target: 'http://localhost:83/',
- //target: 'http://223.82.109.183:2082/api/',
+ target: 'http://192.168.0.107:85/',//唐
//target: 'http://localhost:83/',
+ //target: 'http://223.82.109.183:2082/api/',
+ // target: 'http://localhost:83/',
//target: 'https://web.byisf.com/api/',
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',
--
Gitblit v1.9.3